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 ,使用Xinference框架启动大模型,当chatchat端请求超时时出问题 #5070

Open
jiangnanwuming opened this issue Nov 10, 2024 · 6 comments
Labels
bug Something isn't working stale

Comments

@jiangnanwuming
Copy link

复现问题的步骤 / Steps to Reproduce

  1. xinference端启动 Qwen2.5-72B-Instruct-Q8_0 模型
  2. chatchat端执行:chatchat start -a
  3. chatchat端超时
  4. xinference端只是大模型出结果慢导致chatchat超时,xinference能出正确结果。

预期的结果 / Expected Result
2024-11-10 04:57:18,289 httpx 735507 INFO HTTP Request: POST http://50.64.105.117:9798/v1/chat/completions "HTTP/1.1 200 OK"
INFO: 50.64.105.117:40538 - "POST /v1/chat/completions HTTP/1.1" 200 OK
2024-11-10 04:57:18,292 httpx 735507 INFO HTTP Request: POST http://50.64.105.117:7861/v1/chat/completions "HTTP/1.1 200 OK"

实际结果 / Actual Result
2024-11-10 05:49:37,188 openai._base_client 736346 INFO Retrying request to /chat/completions in 0.970921 seconds
2024-11-10 05:59:38,163 openai._base_client 736346 INFO Retrying request to /chat/completions in 1.773561 seconds
2024-11-10 06:09:39.942 | ERROR | chatchat.server.api_server.openai_routes:get_model_client:61 - failed when request to ('Qwen2.5-72B-Instruct-Q8_0', 'xinference')
INFO: 50.64.105.117:59152 - "POST /v1/chat/completions HTTP/1.1" 200 OK
2024-11-10 06:09:39,948 httpx 736346 INFO HTTP Request: POST http://50.64.105.117:7861/v1/chat/completions "HTTP/1.1 200 OK"
2024-11-10 06:09:39.949 | ERROR | chatchat.server.utils:wrap_done:46 - AttributeError: Caught exception: 'NoneType' object has no attribute 'dict'

环境信息 / Environment Information

  • 0.3.1.3
  • 源码部署
  • Xinference
  • Qwen2.5-72B-Instruct-Q8_0
  • ubuntu22
  • Python version: 3.11
  • 推理使用的硬件GPU
@jiangnanwuming jiangnanwuming added the bug Something isn't working label Nov 10, 2024
@948024326
Copy link

要处理langchain-chatchat项目的agent的处理部分,这个用的新版的pydantic泛型类型检查了

@jiangnanwuming
Copy link
Author

在文件 model_settings.yaml中设置到HTTPX_DEFAULT_TIMEOUT为3600000 还是报相同的问题

@948024326
Copy link

你可以debug断点看看,我处理过这个问题的, 你可以先debug他原生提供的几个工具示例的入参 和你自己写的工具的入参 我记得有区别 所以得多处理下来着

@jiangnanwuming
Copy link
Author

相同的工具函数,如果大模型生成的文本长度少一点能正常返回显示,如果生成的文本比较长,就会出现上面的问题,应该和传递的参数没关系

@jiangnanwuming
Copy link
Author

jiangnanwuming commented Nov 12, 2024

现在发现,把site-packages/openai/_constants.py中的 DEFAULT_TIMEOUT 从600.0 修改到 6000.0 就可以了,配置文件basic_settings.yaml中的超时设置并没起作用

Copy link

这个问题已经被标记为 stale ,因为它已经超过 30 天没有任何活动。

@github-actions github-actions bot added the stale label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants