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

[BUG] 0.3.1版本基于旧版本的fastchat服务时使用不了Agent与RAG功能 #5206

Open
fzhsbc opened this issue Jan 26, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@fzhsbc
Copy link

fzhsbc commented Jan 26, 2025

问题描述 / 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
exec(code, module.dict)
File "
/Langchain-Chatchat/libs/chatchat-server/chatchat/webui.py", line 71, in
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暂时可以共存到前端完成升级。

@fzhsbc fzhsbc added the bug Something isn't working label Jan 26, 2025
@fzhsbc fzhsbc changed the title [BUG] 0.3.1版本使用不了Agent与RAG功能 [BUG] 0.3.1版本基于旧版本的fastchat服务时使用不了Agent与RAG功能 Jan 26, 2025
Copy link

dosubot bot commented Jan 26, 2025

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:

  1. 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
  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.

  3. 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].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant