Skip to content

Commit 3d92585

Browse files
Rename followUpQuestions -> followUpSuggestions (#159)
1 parent ad57b59 commit 3d92585

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

text_2_sql/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Text2Sql__DatabaseEngine=<DatabaseEngine> # TSQL or Postgres or Snowflake or Dat
55
Text2Sql__UseQueryCache=<Determines if the Query Cache will be used to speed up query generation. Defaults to True.> # True or False
66
Text2Sql__PreRunQueryCache=<Determines if the results from the Query Cache will be pre-run to speed up answer generation. Defaults to True.> # True or False
77
Text2Sql__UseColumnValueStore=<Determines if the Column Value Store will be used for schema selection Defaults to True.> # True or False
8-
Text2Sql__GenerateFollowUpQuestions=<Determines if follow up questions will be generated. Defaults to True.> # True or False
8+
Text2Sql__GenerateFollowUpSuggestions=<Determines if follow up questions will be generated. Defaults to True.> # True or False
99

1010
# Open AI Connection Details
1111
OpenAI__CompletionDeployment=<openAICompletionDeploymentId. Used for data dictionary creator>

text_2_sql/autogen/src/autogen_text_2_sql/autogen_text_2_sql.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def __init__(self, state_store: StateStore, **kwargs):
4848

4949
self._agentic_flow = None
5050

51-
self._generate_follow_up_questions = (
52-
os.environ.get("Text2Sql__GenerateFollowUpQuestions", "True").lower()
51+
self._generate_follow_up_suggestions = (
52+
os.environ.get("Text2Sql__GenerateFollowUpSuggestions", "True").lower()
5353
== "true"
5454
)
5555

@@ -62,9 +62,9 @@ def get_all_agents(self):
6262

6363
parallel_query_solving_agent = ParallelQuerySolvingAgent(**self.kwargs)
6464

65-
if self._generate_follow_up_questions:
65+
if self._generate_follow_up_suggestions:
6666
answer_agent = LLMAgentCreator.create(
67-
"answer_with_follow_up_questions_agent", **self.kwargs
67+
"answer_with_follow_up_suggestions_agent", **self.kwargs
6868
)
6969
else:
7070
answer_agent = LLMAgentCreator.create("answer_agent", **self.kwargs)
@@ -82,7 +82,7 @@ def termination_condition(self):
8282
"""Define the termination condition for the chat."""
8383
termination = (
8484
SourceMatchTermination("answer_agent")
85-
| SourceMatchTermination("answer_with_follow_up_questions_agent")
85+
| SourceMatchTermination("answer_with_follow_up_suggestions_agent")
8686
# | TextMentionTermination(
8787
# "[]",
8888
# sources=["user_message_rewrite_agent"],
@@ -110,9 +110,9 @@ def unified_selector(self, messages):
110110
# Handle transition after parallel query solving
111111
elif (
112112
current_agent == "parallel_query_solving_agent"
113-
and self._generate_follow_up_questions
113+
and self._generate_follow_up_suggestions
114114
):
115-
decision = "answer_with_follow_up_questions_agent"
115+
decision = "answer_with_follow_up_suggestions_agent"
116116
elif current_agent == "parallel_query_solving_agent":
117117
decision = "answer_agent"
118118

@@ -325,7 +325,7 @@ async def process_user_message(
325325
)
326326
elif (
327327
message.source == "answer_agent"
328-
or message.source == "answer_with_follow_up_questions_agent"
328+
or message.source == "answer_with_follow_up_suggestions_agent"
329329
):
330330
payload = ProcessingUpdatePayload(
331331
message="Generating the answer...",
@@ -338,7 +338,7 @@ async def process_user_message(
338338
if (
339339
message.messages[-1].source == "answer_agent"
340340
or message.messages[-1].source
341-
== "answer_with_follow_up_questions_agent"
341+
== "answer_with_follow_up_suggestions_agent"
342342
):
343343
# If the message is from the answer_agent, we need to return the final answer
344344
payload = self.extract_answer_payload(message.messages)

text_2_sql/autogen/src/autogen_text_2_sql/creators/llm_agent_creator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import logging
1010
from text_2_sql_core.structured_outputs import (
1111
AnswerAgentOutput,
12-
AnswerWithFollowUpQuestionsAgentOutput,
12+
AnswerWithFollowUpSuggestionsAgentOutput,
1313
UserMessageRewriteAgentOutput,
1414
)
1515
from autogen_core.model_context import BufferedChatCompletionContext
@@ -117,8 +117,8 @@ def create(cls, name: str, **kwargs) -> AssistantAgent:
117117
# Import the structured output agent
118118
if name == "answer_agent":
119119
structured_output = AnswerAgentOutput
120-
elif name == "answer_with_follow_up_questions_agent":
121-
structured_output = AnswerWithFollowUpQuestionsAgentOutput
120+
elif name == "answer_with_follow_up_suggestions_agent":
121+
structured_output = AnswerWithFollowUpSuggestionsAgentOutput
122122
elif name == "user_message_rewrite_agent":
123123
structured_output = UserMessageRewriteAgentOutput
124124

text_2_sql/text_2_sql_core/src/text_2_sql_core/payloads/interaction_payloads.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class Source(InteractionPayloadBase):
8181
answer: str
8282
steps: list[list[str]] = Field(default_factory=list, alias="Steps")
8383
sources: list[Source] = Field(default_factory=list)
84-
follow_up_questions: list[str] | None = Field(
85-
default=None, alias="followUpQuestions"
84+
follow_up_suggestions: list[str] | None = Field(
85+
default=None, alias="followUpSuggestions"
8686
)
8787

8888
payload_type: Literal[PayloadType.ANSWER_WITH_SOURCES] = Field(

text_2_sql/text_2_sql_core/src/text_2_sql_core/prompts/answer_with_follow_up_questions_agent.yaml renamed to text_2_sql/text_2_sql_core/src/text_2_sql_core/prompts/answer_with_follow_up_suggestions_agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ system_message: |
2525
<output>
2626
{
2727
"answer": "The response to the user's question.",
28-
"follow_up_questions": [
28+
"follow_up_suggestions": [
2929
"Follow-up question 1",
3030
"Follow-up question 2",
3131
"Follow-up question 3"

text_2_sql/text_2_sql_core/src/text_2_sql_core/structured_outputs/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from text_2_sql_core.structured_outputs.user_message_rewrite_agent import (
77
UserMessageRewriteAgentOutput,
88
)
9-
from text_2_sql_core.structured_outputs.answer_with_follow_up_questions_agent import (
10-
AnswerWithFollowUpQuestionsAgentOutput,
9+
from text_2_sql_core.structured_outputs.answer_with_follow_up_suggestions_agent import (
10+
AnswerWithFollowUpSuggestionsAgentOutput,
1111
)
1212
from text_2_sql_core.structured_outputs.answer_agent import AnswerAgentOutput
1313

1414
__all__ = [
1515
"AnswerAgentOutput",
16-
"AnswerWithFollowUpQuestionsAgentOutput",
16+
"AnswerWithFollowUpSuggestionsAgentOutput",
1717
"SQLSchemaSelectionAgentOutput",
1818
"UserMessageRewriteAgentOutput",
1919
]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from pydantic import BaseModel
44

55

6-
class AnswerWithFollowUpQuestionsAgentOutput(BaseModel):
6+
class AnswerWithFollowUpSuggestionsAgentOutput(BaseModel):
77
"""The output of the answer agent with follow up questions."""
88

99
answer: str
10-
follow_up_questions: list[str]
10+
follow_up_suggestions: list[str]

0 commit comments

Comments
 (0)