执行python chatchat/cli.py start -a命令进行源码启动时,报错提示
Traceback (most recent call last):
File "D:\Programs\Python\Python311\Lib\multiprocessing\process.py", line 314, in _bootstrap
self.run()
File "D:\Programs\Python\Python311\Lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\startup.py", line 52, in run_api_server
from chatchat.server.api_server.server_app import create_app
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\api_server\server_app.py", line 13, in
from chatchat.server.api_server.chat_routes import chat_router
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\api_server\chat_routes.py", line 11, in
from chatchat.server.chat.kb_chat import kb_chat
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\chat\kb_chat.py", line 15, in
from chatchat.server.agent.tools_factory.search_internet import search_engine
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\agent\tools_factory__init.py", line 4, in
from .search_local_knowledgebase import search_local_knowledgebase
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\agent\tools_factory\search_local_knowledgebase.py", line 34, in
@regist_tool(description=template_knowledge, title="本地知识库")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\agent\tools_factory\toolsregistry.py", line 109, in wrapper
t = partial(def_func)
^^^^^^^^^^^^^^^^^^
File "D:\Programs\Python\Python311\Lib\site-packages\langchain_core\tools.py", line 1266, in _partial
return _make_with_name(func.name__)(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Programs\Python\Python311\Lib\site-packages\langchain_core\tools.py", line 1222, in _make_tool
return StructuredTool.from_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Programs\Python\Python311\Lib\site-packages\langchain_core\tools.py", line 1036, in from_function
raise ValueError(
ValueError: Function must have a docstring if description not provided.
执行python chatchat/cli.py start -a命令进行源码启动时,报错提示 Traceback (most recent call last): File "D:\Programs\Python\Python311\Lib\multiprocessing\process.py", line 314, in _bootstrap self.run() File "D:\Programs\Python\Python311\Lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\startup.py", line 52, in run_api_server from chatchat.server.api_server.server_app import create_app File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\api_server\server_app.py", line 13, in
from chatchat.server.api_server.chat_routes import chat_router
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\api_server\chat_routes.py", line 11, in
from chatchat.server.chat.kb_chat import kb_chat
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\chat\kb_chat.py", line 15, in
from chatchat.server.agent.tools_factory.search_internet import search_engine
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\agent\tools_factory__init.py", line 4, in
from .search_local_knowledgebase import search_local_knowledgebase
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\agent\tools_factory\search_local_knowledgebase.py", line 34, in
@regist_tool(description=template_knowledge, title="本地知识库")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\PycharmProjects\Langchain-Chatchat03\libs\chatchat-server\chatchat\server\agent\tools_factory\toolsregistry.py", line 109, in wrapper
t = partial(def_func)
^^^^^^^^^^^^^^^^^^
File "D:\Programs\Python\Python311\Lib\site-packages\langchain_core\tools.py", line 1266, in _partial
return _make_with_name(func. name__)(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Programs\Python\Python311\Lib\site-packages\langchain_core\tools.py", line 1222, in _make_tool
return StructuredTool.from_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Programs\Python\Python311\Lib\site-packages\langchain_core\tools.py", line 1036, in from_function
raise ValueError(
ValueError: Function must have a docstring if description not provided.