Skip to content

Commit 09eb132

Browse files
authored
Chore!: Remove the 'prompt' CLI command (#5310)
1 parent c40d791 commit 09eb132

File tree

3 files changed

+0
-102
lines changed

3 files changed

+0
-102
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ duckdb = []
107107
fabric = ["pyodbc>=5.0.0"]
108108
gcppostgres = ["cloud-sql-python-connector[pg8000]>=1.8.0"]
109109
github = ["PyGithub>=2.6.0"]
110-
llm = ["langchain", "openai"]
111110
motherduck = ["duckdb>=1.2.0"]
112111
mssql = ["pymssql"]
113112
mssql-odbc = ["pyodbc>=5.0.0"]
@@ -213,7 +212,6 @@ module = [
213212
"pymssql.*",
214213
"pyodbc.*",
215214
"psycopg2.*",
216-
"langchain.*",
217215
"pytest_lazyfixture.*",
218216
"dbt.adapters.*",
219217
"slack_sdk.*",

sqlmesh/cli/main.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,50 +1079,6 @@ def rewrite(obj: Context, sql: str, read: str = "", write: str = "") -> None:
10791079
)
10801080

10811081

1082-
@cli.command("prompt")
1083-
@click.argument("prompt")
1084-
@click.option(
1085-
"-e",
1086-
"--evaluate",
1087-
is_flag=True,
1088-
help="Evaluate the generated SQL query and display the results.",
1089-
)
1090-
@click.option(
1091-
"-t",
1092-
"--temperature",
1093-
type=float,
1094-
help="Sampling temperature. 0.0 - precise and predictable, 0.5 - balanced, 1.0 - creative. Default: 0.7",
1095-
default=0.7,
1096-
)
1097-
@opt.verbose
1098-
@click.pass_context
1099-
@error_handler
1100-
@cli_analytics
1101-
def prompt(
1102-
ctx: click.Context,
1103-
prompt: str,
1104-
evaluate: bool,
1105-
temperature: float,
1106-
verbose: int,
1107-
) -> None:
1108-
"""Uses LLM to generate a SQL query from a prompt."""
1109-
from sqlmesh.integrations.llm import LLMIntegration
1110-
1111-
context = ctx.obj
1112-
1113-
llm_integration = LLMIntegration(
1114-
context.models.values(),
1115-
context.engine_adapter.dialect,
1116-
temperature=temperature,
1117-
verbosity=Verbosity(verbose),
1118-
)
1119-
query = llm_integration.query(prompt)
1120-
1121-
context.console.log_status_update(query)
1122-
if evaluate:
1123-
context.console.log_success(context.fetchdf(query))
1124-
1125-
11261082
@cli.command("clean")
11271083
@click.pass_obj
11281084
@error_handler

sqlmesh/integrations/llm.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)