Closed nilin1998 closed 1 week ago
我也是
这个怎么解决呀?
我也遇到这个问题了,工具选择数学计算器,计算1+1=?是可以的,但是用本地知识库问答,就会报以上错误,试了python=3.8,3.10,3.11三个版本都有这个问题,
一样的问题。报错一模一样。
请按以下步骤排查一下:
请按以下步骤排查一下:
- 更新 langchain-chatchat 到 0.3.1.1 版本
- 把数据目录下的 *.yaml 配置文件删掉,重新执行 chatchat init
- 如果还不行,请更换 qwen 模型试试。已知 glm4-chat Agent 能力匹配不太稳定。
已操作,问题依旧。
xinference中如下报错
2024-07-19 01:55:48,242 xinference.api.restful_api 23736 ERROR Chat completion stream got an error: [address=127.0.0.1:55254, pid=27020] 1 validation error for CreateCompletion
tool_choice
extra fields not permitted (type=value_error.extra)
Traceback (most recent call last):
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\api\restful_api.py", line 1574, in stream_results
iterator = await model.chat(
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\context.py", line 231, in send
return self._process_result_message(result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\context.py", line 102, in _process_result_message
raise message.as_instanceof_cause()
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\pool.py", line 656, in send
result = await self._run_coro(message.message_id, coro)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\pool.py", line 367, in _run_coro
return await coro
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\api.py", line 384, in __on_receive__
return await super().__on_receive__(message) # type: ignore
^^^^^^^^^^^^^^^^^
File "xoscar\\core.pyx", line 558, in __on_receive__
raise ex
File "xoscar\\core.pyx", line 520, in xoscar.core._BaseActor.__on_receive__
async with self._lock:
^^^^^^^^^^^^^^^^^
File "xoscar\\core.pyx", line 521, in xoscar.core._BaseActor.__on_receive__
with debug_async_timeout('actor_lock_timeout',
^^^^^^^^^^^^^^^^^
File "xoscar\\core.pyx", line 526, in xoscar.core._BaseActor.__on_receive__
result = await result
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\utils.py", line 45, in wrapped
ret = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 90, in wrapped_func
ret = await fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\api.py", line 462, in _wrapper
r = await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 505, in chat
response = await self._call_wrapper(
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 114, in _async_wrapper
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 394, in _call_wrapper
ret = await asyncio.to_thread(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\asyncio\threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\model\llm\ggml\llamacpp.py", line 317, in chat
generate_config = self._sanitize_generate_config(generate_config)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\model\llm\ggml\llamacpp.py", line 295, in _sanitize_generate_config
generate_config = super()._sanitize_generate_config(generate_config)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\model\llm\ggml\llamacpp.py", line 101, in _sanitize_generate_config
**CreateCompletionLlamaCpp(**generate_config).dict()
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\pydantic\v1\main.py", line 341, in __init__
raise validation_error
^^^^^^^^^^^^^^^^^
pydantic.v1.error_wrappers.ValidationError: [address=127.0.0.1:55254, pid=27020] 1 validation error for CreateCompletion
tool_choice
extra fields not permitted (type=value_error.extra)
2024-07-19 01:56:59,483 xinference.api.restful_api 23736 ERROR Chat completion stream got an error: [address=127.0.0.1:55254, pid=27020] 1 validation error for CreateCompletion
tool_choice
extra fields not permitted (type=value_error.extra)
Traceback (most recent call last):
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\api\restful_api.py", line 1574, in stream_results
iterator = await model.chat(
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\context.py", line 231, in send
return self._process_result_message(result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\context.py", line 102, in _process_result_message
raise message.as_instanceof_cause()
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\pool.py", line 656, in send
result = await self._run_coro(message.message_id, coro)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\backends\pool.py", line 367, in _run_coro
return await coro
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\api.py", line 384, in __on_receive__
return await super().__on_receive__(message) # type: ignore
^^^^^^^^^^^^^^^^^
File "xoscar\\core.pyx", line 558, in __on_receive__
raise ex
File "xoscar\\core.pyx", line 520, in xoscar.core._BaseActor.__on_receive__
async with self._lock:
^^^^^^^^^^^^^^^^^
File "xoscar\\core.pyx", line 521, in xoscar.core._BaseActor.__on_receive__
with debug_async_timeout('actor_lock_timeout',
^^^^^^^^^^^^^^^^^
File "xoscar\\core.pyx", line 526, in xoscar.core._BaseActor.__on_receive__
result = await result
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\utils.py", line 45, in wrapped
ret = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 90, in wrapped_func
ret = await fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xoscar\api.py", line 462, in _wrapper
r = await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 505, in chat
response = await self._call_wrapper(
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 114, in _async_wrapper
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\core\model.py", line 394, in _call_wrapper
ret = await asyncio.to_thread(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\asyncio\threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\model\llm\ggml\llamacpp.py", line 317, in chat
generate_config = self._sanitize_generate_config(generate_config)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\model\llm\ggml\llamacpp.py", line 295, in _sanitize_generate_config
generate_config = super()._sanitize_generate_config(generate_config)
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\xinference\model\llm\ggml\llamacpp.py", line 101, in _sanitize_generate_config
**CreateCompletionLlamaCpp(**generate_config).dict()
^^^^^^^^^^^^^^^^^
File "d:\CondaEnv\xinfernce\Lib\site-packages\pydantic\v1\main.py", line 341, in __init__
raise validation_error
^^^^^^^^^^^^^^^^^
pydantic.v1.error_wrappers.ValidationError: [address=127.0.0.1:55254, pid=27020] 1 validation error for CreateCompletion
tool_choice
extra fields not permitted (type=value_error.extra)
看报错信息,是 llamacpp 不支持 tool_choice 参数。
请问一下,那我这个报错是啥原因呢?
RemoteProtocolError: peer closed connection without sending complete message body (incomplete chunked read)
Traceback:
File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.dict)
File "/usr/local/lib/python3.10/site-packages/chatchat/webui.py", line 73, in
同,我是调用联网搜索场景,和agent加知识库场景出现的该问题
我也遇到了这个问题,解决了吗?
这个问题已经被标记为 stale
,因为它已经超过 30 天没有任何活动。
当前选用的模型为glm4-chat,对话时报错,详细的错误为: