You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @fzhsbc! I'm here to help you with any bugs or questions you have. Let's tackle this issue together!
To resolve the issues you're experiencing with the Agent and RAG functionalities in Langchain-Chatchat version 0.3.1, you can try the following steps:
TypeError with proxies Argument: This error is related to the httpx library version. You should downgrade the httpx package to version 0.27.2, where the proxies argument is supported. Run the following command:
pip install httpx==0.27.2
'NoneType' Object Error: This error occurs because the API call api.list_knowledge_bases() is returning None. Downgrading httpx as mentioned above should help resolve this issue as well, since it is likely related to the same underlying problem.
Agent Tools Not Available: Ensure that the tools are correctly registered and available for the agent. Check the tool registration in your code and make sure they are properly set up using the @regist_tool decorator. If the tools are registered correctly, verify that the agent configuration is correct and that it is set to use the registered tools.
These steps should help you maintain compatibility between versions 0.2 and 0.3 without changing the model service [1][2].
问题描述 / Problem Description
模型使用的是0.2旧版本启动的fastchat服务,在修改config后现在普通对话是可以正常执行并对话的的,但存在以下两个问题:
1.在点击RAG时显示:
2025-01-26 15:13:47.279 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /knowledge_base/list_knowledge_bases: Client.init() got an unexpected keyword argument 'proxies'
2025-01-26 15:13:47.282 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /knowledge_base/list_knowledge_bases: Client.init() got an unexpected keyword argument 'proxies'
2025-01-26 15:13:47.282 | ERROR | chatchat.webui_pages.utils:get:64 - TypeError: error when get /knowledge_base/list_knowledge_bases: Client.init() got an unexpected keyword argument 'proxies'
2025-01-26 15:13:47.283 | ERROR | chatchat.webui_pages.utils:to_json:233 - AttributeError: API未能返回正确的JSON。'NoneType' object has no attribute 'json'
2025-01-26 15:13:47.283 Uncaught app exception
Traceback (most recent call last):
File "
site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script/Langchain-Chatchat/libs/chatchat-server/chatchat/webui.py", line 71, inexec(code, module.dict)
File "
kb_chat(api=api)
File "~/Langchain-Chatchat/libs/chatchat-server/chatchat/webui_pages/kb_chat.py", line 118, in kb_chat
kb_list = [x["kb_name"] for x in api.list_knowledge_bases()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
sample库是存在的
2.点击agent时显示没有可用工具,且回答时并未显示执行agent,但仍有回答.
能否在不更换模型服务的情况下修复?这样0.2与0.3暂时可以共存到前端完成升级。
The text was updated successfully, but these errors were encountered: