调用agent查询本地知识库报错:APIError: Caught exception: An error occurred during streaming
问题描述 / Problem Description 调用agent查询本地知识库报错: chatchat终端报错信息:
Entering new AgentExecutor chain... INFO: 127.0.0.1:38928 - "POST /v1/chat/completions HTTP/1.1" 200 OK 2024-08-09 09:18:30,390 httpx 22987 INFO HTTP Request: POST http://127.0.0.1:7861/v1/chat/completions "HTTP/1.1 200 OK" 2024-08-09 09:18:30,398 httpx 22987 INFO HTTP Request: POST http://127.0.0.1:9997/v1/chat/completions "HTTP/1.1 200 OK" 2024-08-09 09:18:31.734 | ERROR | chatchat.server.api_server.openai_routes:generator:105 - openai request error: An error occurred during streaming 2024-08-09 09:18:31.758 | ERROR | chatchat.server.utils:wrap_done:46 - APIError: Caught exception: An error occurred during streaming
chatchat 可视化web页面报错信息:
问:大模型在推理过程中有哪些优化显存的策略
答:这个问题涉及到大模型的优化策略,我需要调用一下大模型优化的知识库来回答这个问题。
An error occurred during streaming
xinference报错信息:
2024-08-09 09:18:31,730 xinference.api.restful_api 11477 ERROR Chat completion stream got an error: [address=0.0.0.0:45209, pid=12401] unhashable type: 'slice'
Traceback (most recent call last):
File "/home/envs/xinference/lib/python3.10/site-packages/xinference/model/llm/utils.py", line 587, in _to_chat_completion_chunks
for i, chunk in enumerate(chunks):
File "/home/envs/xinference/lib/python3.10/site-packages/xinference/model/llm/pytorch/chatglm.py", line 497, in _stream_generator
chunk_text = chunk_text[last_chunk_text_length:]
TypeError: [address=0.0.0.0:45209, pid=12401] unhashable type: 'slice'
复现问题的步骤 / Steps to Reproduce
- 执行 startup.py
- 页面点击启动Agent、显示Agent过程、选择工具为 本地知识库
- 对话框输入问题
- 回答:这个问题涉及到大模型的优化策略,我需要调用一下大模型优化的知识库来回答这个问题。后报错:An error occurred during streaming
环境信息 / Environment Information
- Langchain-Chatchat 版本 / commit 号:0.3.1.3
- 部署方式(pypi 安装 / 源码部署 / docker 部署): dev deployment
- 使用的模型推理框架(Xinference / Ollama / OpenAI API 等):Xinference
- 使用的 LLM 模型(GLM-4-9B / Qwen2-7B-Instruct 等):chatglm3
- 使用的 Embedding 模型(bge-large-zh-v1.5 / m3e-base 等):bge-large-zh-v1.5
- 使用的向量库类型 (faiss / milvus / pg_vector 等): faiss
- 操作系统及版本 / Operating system and version: Ubuntu20.04
- Python 版本 / Python version: 3.10.12
- 推理使用的硬件(GPU / CPU / MPS / NPU 等) / Inference hardware (GPU / CPU / MPS / NPU, etc.): GPU
我也是,用的chatglm3 + bge large 也是报错An error occurred during streaming 换成qwen虽然不报错 但不知道为什么卡的不行
有解决办法嘛
有解决办法嘛 不用transformers换成vllm启动试试
这个问题已经被标记为 stale ,因为它已经超过 30 天没有任何活动。
这个问题已经被自动关闭,因为它被标为 stale 后超过 14 天没有任何活动。