Agent.py", line 305 框架时不时报错?请问是什么原因
fly627600815 opened this issue · comments
Agently\Agent\Agent.py", line 305, in start_in_theard
raise Exception(f"[Agent Request] Error: { str(e) }")
Exception: [Agent Request] Error: Error code: 400 - {'code': 400, 'message': '400 Client Error: model_error ', 'status': 400}
这个错误是你请求的模型返回的400错误
可能是会话数据太长导致的,看文档有一个set_max_length方法,但是框架里面没有这个方法
.set_chat_history_max_length()方法是Session插件里提供的一个方法,只在使用Session插件管理chat history时候有效
使用Session插件管理chat history的方法可参考:
https://agently.tech/guides/agentic_request/guide.html#_20
After Agently update to v4, we move q&a and suggestion to discussion tab, welcome to join us there:
https://github.com/AgentEra/Agently/discussions/categories/q-a