Skip to content

Commit e6eecab

Browse files
committed
Merge origin/main into refresh_tests (keeping refreshed tests)
2 parents b0ba813 + d4b862d commit e6eecab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/server/agents/chatbot.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ async def vs_retrieve(state: OptimizerState, config: RunnableConfig) -> Optimize
247247
logger.info("Found Documents: %i", len(documents_dict))
248248
return {"context_input": retrieve_question, "documents": documents_dict}
249249

250+
250251
async def nl2sql(state: OptimizerState, config: RunnableConfig) -> OptimizerState:
251252
"""Execute NL2SQL tool calling flow with streaming response.
252253
@@ -354,7 +355,16 @@ async def nl2sql(state: OptimizerState, config: RunnableConfig) -> OptimizerStat
354355

355356
# If we hit max iterations, return what we have
356357
logger.warning("NL2SQL: Max iterations reached")
357-
return {"messages": [AIMessage(content="I'm sorry, I wasn't able to complete the request.")]}
358+
return {
359+
"messages": [
360+
AIMessage(
361+
content="""
362+
I'm sorry, I wasn't able to complete the request due to the selected model's lack of MCP support.
363+
Please, try again with a different model.
364+
"""
365+
)
366+
]
367+
}
358368

359369
except APIConnectionError as ex:
360370
logger.error("NL2SQL: API connection error: %s", ex)

0 commit comments

Comments
 (0)