Closed ELvis168 closed 4 months ago
返回值和样例不一样 data: {"id": "chate409d33e-fbe9-4290-a8bf-c9d948bdff0d", "object": "chat.completion.chunk", "model": "chatglm3", "created": 1720529812, "status": 1, "message_type": 1, "message_id": null, "is_ref": false, "choices": [{"delta": {"content": "", "tool_calls": []}, "role": "assistant"}]} data: {"id": "chat32887d5b-85c5-47bb-b3c9-e0d52d288eed", "object": "chat.completion.chunk", "model": "chatglm3", "created": 1720529818, "status": 8, "message_type": 1, "message_id": null, "is_ref": false, "choices": [{"delta": {"content": "peer closed connection without sending complete message body (incomplete chunked read)", "tool_calls": []}, "role": "assistant"}]}
模型配置错误
模型配置错误
能帮看下哪个配置吗 { "DEFAULT_LLM_MODEL": "chatglm3", "DEFAULT_EMBEDDING_MODEL": "bge-large-zh-v1.5", "Agent_MODEL": "chatglm3", "HISTORY_LEN": 3, "MAX_TOKENS": null, "TEMPERATURE": 0.7, "SUPPORT_AGENT_MODELS": [ "chatglm3-6b", "openai-api", "Qwen-14B-Chat", "Qwen-7B-Chat", "qwen-turbo" ], "LLM_MODEL_CONFIG": { "preprocess_model": { "chatglm3": { "temperature": 0.05, "max_tokens": 4096, "history_len": 100, "prompt_name": "default", "callbacks": false } }, "llm_model": { "chatglm3": { "temperature": 0.9, "max_tokens": 4096, "history_len": 10, "prompt_name": "default", "callbacks": true } }, "action_model": { "chatglm3": { "temperature": 0.01, "max_tokens": 4096, "prompt_name": "ChatGLM3", "callbacks": true } }, "postprocess_model": { "chatglm3": { "temperature": 0.01, "max_tokens": 4096, "prompt_name": "default", "callbacks": true } }, "image_model": { "sd-turbo": { "size": "256*256" } } }, "MODEL_PLATFORMS": [ { "platform_name": "xinference", "platform_type": "xinference", "api_base_url": "http://127.0.0.1:9997/v1", "api_key": "EMPT", "api_concurrencies": 5, "llm_models": [ "chatglm3" ], "embed_models": [ "bge-large-zh-v1.5" ], "image_models": [], "reranking_models": [], "speech2text_models": [], "tts_models": [] } ], "TOOL_CONFIG": { "search_local_knowledgebase": { "use": false, "top_k": 3, "score_threshold": 1.0, "conclude_prompt": { "with_result": "<指令>根据已知信息,简洁和专业的来回答问题。如果无法从中得到答案,请说 \"根据已知信息无法回答该问题\",不允许在答案中添加编造成分,答案请使用中文。 </指令>\n<已知信息>{{ context }}</已知信息>\n<问题>{{ question }}</问题>\n", "without_result": "请你根据我的提问回答我的问题:\n{{ question }}\n请注意,你必须在回答结束后强调,你的回答是根据你的经验回答而不是参考资料回答的。\n" } }, "search_internet": { "use": false, "search_engine_name": "bing", "search_engine_config": { "bing": { "result_len": 3, "bing_search_url": "https://api.bing.microsoft.com/v7.0/search", "bing_key": "" }, "metaphor": { "result_len": 3, "metaphor_api_key": "", "split_result": false, "chunk_size": 500, "chunk_overlap": 0 }, "duckduckgo": { "result_len": 3 } }, "top_k": 10, "verbose": "Origin", "conclude_prompt": "<指令>这是搜索到的互联网信息,请你根据这些信息进行提取并有调理,简洁的回答问题。如果无法从中得到答案,请说 “无法搜索到能回答问题的内容”。 </指令>\n<已知信息>{{ context }}</已知信息>\n<问题>\n{{ question }}\n</问题>\n" }, "arxiv": { "use": false }, "shell": { "use": false }, "weather_check": { "use": false, "apikey": "S8vrB4U-c5mvAMiK" }, "search_youtube": { "use": false }, "wolfram": { "use": false, "appid": "" }, "calculate": { "use": false }, "vqa_processor": { "use": false, "model_path": "your model path", "tokenizer_path": "your tokenizer path", "device": "cuda:1" }, "aqa_processor": { "use": false, "model_path": "your model path", "tokenizer_path": "yout tokenizer path", "device": "cuda:2" }, "text2images": { "use": false }, "text2sql": { "use": false, "sqlalchemy_connect_str": "mysql+pymysql://用户名:密码@主机地址/数据库名称e", "read_only": false, "top_k": 50, "return_intermediate_steps": true, "table_names": [], "table_comments": {} } }, "class_name": "ConfigModel" }
xinference报错 2024-07-10 11:10:35,271 xinference.api.restful_api 49223 ERROR Chat completion stream got an error: [address=0.0.0.0:45149, pid=49880] not enough values to unpack (expected 2, got 1) Traceback (most recent call last): File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/api/restful_api.py", line 1476, in stream_results async for item in iterator: File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 340, in anext return await self._actor_ref.xoscar_next(self._uid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/context.py", line 227, in send return self._process_result_message(result) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/context.py", line 102, in _process_result_message raise message.as_instanceof_cause() File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/pool.py", line 659, in send result = await self._run_coro(message.message_id, coro) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/pool.py", line 370, in _run_coro return await coro File "/root/anaconda3/envs/xinference2/lib/python3.11/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 "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 431, in xoscar_next raise e File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 417, in __xoscar_next__ r = await asyncio.to_thread(_wrapper, gen) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 402, in _wrapper return next(_gen) File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/core/model.py", line 300, in _to_json_generator for v in gen: File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/model/llm/utils.py", line 544, in _to_chat_completion_chunks for i, chunk in enumerate(chunks): ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/model/llm/pytorch/chatglm.py", line 172, in _stream_generator for chunktext, in self._model.stream_chat( ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 35, in generator_context response = gen.send(None) ^^^^^^^^^^^^^^^^^ File "/root/.cache/huggingface/modules/transformers_modules/chatglm3-pytorch-6b/modeling_chatglm.py", line 1077, in stream_chat response, new_history = self.process_response(response, history) ^^^^^^^^^^^^^^^^^ File "/root/.cache/huggingface/modules/transformers_modules/chatglm3-pytorch-6b/modeling_chatglm.py", line 1003, in process_response metadata, content = response.split("\n", maxsplit=1) ^^^^^^^^^^^^^^^^^ ValueError: [address=0.0.0.0:45149, pid=49880] not enough values to unpack (expected 2, got 1)
模型配置错误
不选中"启用Agent",选择单个工具。是可以的
xinference报错 2024-07-10 11:10:35,271 xinference.api.restful_api 49223 ERROR Chat completion stream got an error: [address=0.0.0.0:45149, pid=49880] not enough values to unpack (expected 2, got 1) Traceback (most recent call last): File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/api/restful_api.py", line 1476, in stream_results async for item in iterator: File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 340, in anext return await self._actor_ref.xoscar_next(self._uid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/context.py", line 227, in send return self._process_result_message(result) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/context.py", line 102, in _process_result_message raise message.as_instanceof_cause() File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/pool.py", line 659, in send result = await self._run_coro(message.message_id, coro) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/pool.py", line 370, in _run_coro return await coro File "/root/anaconda3/envs/xinference2/lib/python3.11/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 "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 431, in xoscar_next raise e File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 417, in xoscar_next r = await asyncio.to_thread(_wrapper, gen) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 402, in _wrapper return next(_gen) File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/core/model.py", line 300, in _to_json_generator for v in gen: File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/model/llm/utils.py", line 544, in _to_chat_completion_chunks for i, chunk in enumerate(chunks): ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/model/llm/pytorch/chatglm.py", line 172, in _stream_generator for chunktext, in self._model.stream_chat( ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 35, in generator_context response = gen.send(None) ^^^^^^^^^^^^^^^^^ File "/root/.cache/huggingface/modules/transformers_modules/chatglm3-pytorch-6b/modeling_chatglm.py", line 1077, in stream_chat response, new_history = self.process_response(response, history) ^^^^^^^^^^^^^^^^^ File "/root/.cache/huggingface/modules/transformers_modules/chatglm3-pytorch-6b/modeling_chatglm.py", line 1003, in process_response metadata, content = response.split("\n", maxsplit=1) ^^^^^^^^^^^^^^^^^ ValueError: [address=0.0.0.0:45149, pid=49880] not enough values to unpack (expected 2, got 1)
兄弟,我和你一样的错误,你咋解决的呀
xinference报错 2024-07-10 11:10:35,271 xinference.api.restful_api 49223 ERROR Chat completion stream got an error: [address=0.0.0.0:45149, pid=49880] not enough values to unpack (expected 2, got 1) Traceback (most recent call last): File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/api/restful_api.py", line 1476, in stream_results async for item in iterator: File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 340, in anext return await self._actor_ref.xoscar_next(self._uid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/context.py", line 227, in send return self._process_result_message(result) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/context.py", line 102, in _process_result_message raise message.as_instanceof_cause() File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/pool.py", line 659, in send result = await self._run_coro(message.message_id, coro) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/backends/pool.py", line 370, in _run_coro return await coro File "/root/anaconda3/envs/xinference2/lib/python3.11/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 "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 431, in xoscar_next raise e File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 417, in xoscar_next r = await asyncio.to_thread(_wrapper, gen) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xoscar/api.py", line 402, in _wrapper return next(_gen) File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/core/model.py", line 300, in _to_json_generator for v in gen: File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/model/llm/utils.py", line 544, in _to_chat_completion_chunks for i, chunk in enumerate(chunks): ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/xinference/model/llm/pytorch/chatglm.py", line 172, in _stream_generator for chunktext, in self._model.stream_chat( ^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/xinference2/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 35, in generator_context response = gen.send(None) ^^^^^^^^^^^^^^^^^ File "/root/.cache/huggingface/modules/transformers_modules/chatglm3-pytorch-6b/modeling_chatglm.py", line 1077, in stream_chat response, new_history = self.process_response(response, history) ^^^^^^^^^^^^^^^^^ File "/root/.cache/huggingface/modules/transformers_modules/chatglm3-pytorch-6b/modeling_chatglm.py", line 1003, in process_response metadata, content = response.split("\n", maxsplit=1) ^^^^^^^^^^^^^^^^^ ValueError: [address=0.0.0.0:45149, pid=49880] not enough values to unpack (expected 2, got 1)
兄弟,我和你一样的错误,你咋解决的呀 没解决,换了个模型qwen
问题描述 / Problem Description 试用agent对话报错:peer closed connection without sending complete message body (incomplete chunked read
复现问题的步骤 / Steps to Reproduce 按照api文档调agent接口
预期的结果 / Expected Result 返回正常
实际结果 / Actual Result
环境信息 / Environment Information