mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 17:57:06 +08:00
feat: support command in mcp
This commit is contained in:
@@ -357,7 +357,11 @@ async def analysis_or_predict(session: SessionDep, current_user: CurrentUser, ch
|
||||
traceback.print_exc()
|
||||
if stream:
|
||||
def _err(_e: Exception):
|
||||
yield 'data:' + orjson.dumps({'content': str(_e), 'type': 'error'}).decode() + '\n\n'
|
||||
if in_chat:
|
||||
yield 'data:' + orjson.dumps({'content': str(_e), 'type': 'error'}).decode() + '\n\n'
|
||||
else:
|
||||
yield f'❌ **ERROR:**\n'
|
||||
yield f'> {str(_e)}\n'
|
||||
|
||||
return StreamingResponse(_err(e), media_type="text/event-stream")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user