Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ duckdb = []
fabric = ["pyodbc>=5.0.0"]
gcppostgres = ["cloud-sql-python-connector[pg8000]>=1.8.0"]
github = ["PyGithub>=2.6.0"]
llm = ["langchain", "openai"]
motherduck = ["duckdb>=1.2.0"]
mssql = ["pymssql"]
mssql-odbc = ["pyodbc>=5.0.0"]
Expand Down Expand Up @@ -213,7 +212,6 @@ module = [
"pymssql.*",
"pyodbc.*",
"psycopg2.*",
"langchain.*",
"pytest_lazyfixture.*",
"dbt.adapters.*",
"slack_sdk.*",
Expand Down
44 changes: 0 additions & 44 deletions sqlmesh/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,50 +1079,6 @@ def rewrite(obj: Context, sql: str, read: str = "", write: str = "") -> None:
)


@cli.command("prompt")
@click.argument("prompt")
@click.option(
"-e",
"--evaluate",
is_flag=True,
help="Evaluate the generated SQL query and display the results.",
)
@click.option(
"-t",
"--temperature",
type=float,
help="Sampling temperature. 0.0 - precise and predictable, 0.5 - balanced, 1.0 - creative. Default: 0.7",
default=0.7,
)
@opt.verbose
@click.pass_context
@error_handler
@cli_analytics
def prompt(
ctx: click.Context,
prompt: str,
evaluate: bool,
temperature: float,
verbose: int,
) -> None:
"""Uses LLM to generate a SQL query from a prompt."""
from sqlmesh.integrations.llm import LLMIntegration

context = ctx.obj

llm_integration = LLMIntegration(
context.models.values(),
context.engine_adapter.dialect,
temperature=temperature,
verbosity=Verbosity(verbose),
)
query = llm_integration.query(prompt)

context.console.log_status_update(query)
if evaluate:
context.console.log_success(context.fetchdf(query))


@cli.command("clean")
@click.pass_obj
@error_handler
Expand Down
56 changes: 0 additions & 56 deletions sqlmesh/integrations/llm.py

This file was deleted.