Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent.py", line 305 框架时不时报错?请问是什么原因 #190

Open
fly627600815 opened this issue Jan 21, 2025 · 3 comments
Open

Comments

@fly627600815
Copy link

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}

@Maplemx
Copy link
Collaborator

Maplemx commented Jan 22, 2025

这个错误是你请求的模型返回的400错误

@fly627600815
Copy link
Author

可能是会话数据太长导致的,看文档有一个set_max_length方法,但是框架里面没有这个方法

@Maplemx
Copy link
Collaborator

Maplemx commented Jan 23, 2025

.set_chat_history_max_length()方法是Session插件里提供的一个方法,只在使用Session插件管理chat history时候有效

使用Session插件管理chat history的方法可参考:
https://agently.tech/guides/agentic_request/guide.html#_20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants