Skip to content

Commit 52401d3

Browse files
committed
Update chat history
1 parent effb419 commit 52401d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

text_2_sql/autogen/src/autogen_text_2_sql/autogen_text_2_sql.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ async def process_question(
187187
# Update input
188188
for idx, chat in enumerate(chat_history):
189189
# For now only consider the user query
190-
agent_input[f"chat_{idx}"] = chat.request.question
190+
chat_history_key = f"chat_{idx}"
191+
agent_input[
192+
chat_history_key
193+
] = chat.request_response_pair.request.question
191194

192195
async for message in self.agentic_flow.run_stream(task=json.dumps(agent_input)):
193196
logging.debug("Message: %s", message)

0 commit comments

Comments
 (0)