Skip to content

Commit 0d74da3

Browse files
committed
Update steps
1 parent 5bdab7c commit 0d74da3

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

text_2_sql/autogen/src/autogen_text_2_sql/autogen_text_2_sql.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ def __init__(self, state_store: StateStore, **kwargs):
5151
def get_all_agents(self):
5252
"""Get all agents for the complete flow."""
5353

54-
self.user_message_rewrite_agent = LLMAgentCreator.create(
54+
user_message_rewrite_agent = LLMAgentCreator.create(
5555
"user_message_rewrite_agent", **self.kwargs
5656
)
5757

58-
self.parallel_query_solving_agent = ParallelQuerySolvingAgent(**self.kwargs)
58+
parallel_query_solving_agent = ParallelQuerySolvingAgent(**self.kwargs)
5959

60-
self.answer_agent = LLMAgentCreator.create("answer_agent", **self.kwargs)
60+
answer_agent = LLMAgentCreator.create("answer_agent", **self.kwargs)
6161

6262
agents = [
63-
self.user_message_rewrite_agent,
64-
self.parallel_query_solving_agent,
65-
self.answer_agent,
63+
user_message_rewrite_agent,
64+
parallel_query_solving_agent,
65+
answer_agent,
6666
]
6767

6868
return agents
@@ -71,8 +71,11 @@ def get_all_agents(self):
7171
def termination_condition(self):
7272
"""Define the termination condition for the chat."""
7373
termination = (
74-
TextMentionTermination("TERMINATE")
75-
| SourceMatchTermination("answer_agent")
74+
SourceMatchTermination("answer_agent")
75+
# | TextMentionTermination(
76+
# "[]",
77+
# sources=["user_message_rewrite_agent"],
78+
# )
7679
| TextMentionTermination(
7780
"contains_disambiguation_requests",
7881
sources=["parallel_query_solving_agent"],

text_2_sql/text_2_sql_core/src/text_2_sql_core/prompts/user_message_rewrite_agent.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ system_message: |
4242
- Consider whether the question relates to **data analysis** or is **possibly related** to `{{ use_case }}`.
4343
- If unsure whether a question is relevant to the use case, **do not filter it out**.
4444
- If the question **is disallowed**, return an **empty list of steps** in the JSON output.
45-
- `"TERMINATE"` is an **internal rule**—it is **not** included in the JSON output.
4645
- **Set `"requires_sql_queries": true`** if the question requires database access to answer.
4746
**Set `"requires_sql_queries": false`** if it does not (e.g., "What can you help me with?").
4847

text_2_sql/text_2_sql_core/src/text_2_sql_core/structured_outputs/answer_agent_with_follow_up_questions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44

55

66
class AnswerAgentWithFollowUpQuestionsAgentOutput(BaseModel):
7+
"""The output of the answer agent with follow up questions."""
8+
79
answer: str
810
follow_up_questions: list[str]

0 commit comments

Comments
 (0)