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
13 changes: 0 additions & 13 deletions wren-ai-service/src/pipelines/generation/sql_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@
{% endfor %}
{% endif %}

{% if exclude %}
### EXCLUDED STATEMETS ###
Ensure that the following excluded statements are not used in the generated queries to maintain variety and avoid repetition.
{% for doc in exclude %}
{{ doc.statement }}
{% endfor %}
{% endif %}

{{ text_to_sql_rules }}
{% if instructions %}
{{ instructions }}
Expand Down Expand Up @@ -77,7 +69,6 @@
def prompt(
query: str,
documents: List[str],
exclude: List[Dict],
text_to_sql_rules: str,
prompt_builder: PromptBuilder,
configuration: Configuration | None = None,
Expand All @@ -86,7 +77,6 @@ def prompt(
return prompt_builder.run(
query=query,
documents=documents,
exclude=exclude,
text_to_sql_rules=text_to_sql_rules,
instructions=construct_instructions(configuration),
sql_samples=sql_samples,
Expand Down Expand Up @@ -162,7 +152,6 @@ async def run(
self,
query: str,
contexts: List[str],
exclude: List[Dict],
configuration: Configuration = Configuration(),
sql_samples: List[Dict] | None = None,
project_id: str | None = None,
Expand All @@ -173,7 +162,6 @@ async def run(
inputs={
"query": query,
"documents": contexts,
"exclude": exclude,
"sql_samples": sql_samples,
"project_id": project_id,
"configuration": configuration,
Expand All @@ -191,5 +179,4 @@ async def run(
"sql_generation",
query="this is a test query",
contexts=[],
exclude=[],
)
1 change: 0 additions & 1 deletion wren-ai-service/src/web/v1/services/ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ async def ask(
].run(
query=user_query,
contexts=documents,
exclude=historical_question_result,
project_id=ask_request.project_id,
configuration=ask_request.configurations,
sql_samples=sql_samples,
Expand Down
Loading