mirror of
https://github.com/GuDaStudio/geminimcp.git
synced 2026-02-05 01:50:25 +08:00
v0.1.4:更新server
This commit is contained in:
@@ -195,20 +195,17 @@ async def gemini(
|
|||||||
except json.JSONDecodeError as error:
|
except json.JSONDecodeError as error:
|
||||||
# Improved error handling: include problematic line
|
# Improved error handling: include problematic line
|
||||||
err_message = line
|
err_message = line
|
||||||
success = False
|
|
||||||
break
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
err_message = f"Unexpected error: {error}. Line: {line!r}"
|
err_message = f"Unexpected error: {error}. Line: {line!r}"
|
||||||
success = False
|
|
||||||
break
|
|
||||||
|
|
||||||
if success and thread_id is None:
|
|
||||||
|
if thread_id is None:
|
||||||
success = False
|
success = False
|
||||||
err_message = (
|
err_message = (
|
||||||
"Failed to get `SESSION_ID` from the gemini session. \n\n" + err_message
|
"Failed to get `SESSION_ID` from the gemini session. \n\n" + err_message
|
||||||
)
|
)
|
||||||
|
|
||||||
if success and len(agent_messages) == 0:
|
if len(agent_messages) == 0:
|
||||||
success = False
|
success = False
|
||||||
err_message = (
|
err_message = (
|
||||||
"Failed to get `agent_messages` from the gemini session. \n\n You can try to set `return_all_messages` to `True` to get the full information. \n\n "
|
"Failed to get `agent_messages` from the gemini session. \n\n You can try to set `return_all_messages` to `True` to get the full information. \n\n "
|
||||||
|
|||||||
Reference in New Issue
Block a user