Skip to content

[BUG] 简洁阐述问题 / Concise description of the issue #5289

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

Open
RATOR-codes opened this issue Mar 27, 2025 · 1 comment
Open

[BUG] 简洁阐述问题 / Concise description of the issue #5289

RATOR-codes opened this issue Mar 27, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@RATOR-codes
Copy link

问题描述 / Problem Description
更换系统所调用的模型为deepseek API,在使用RAG功能时会出现下面报错,请问有什么解决办法?

2025-03-27 13:28:40,497 httpx 6934 INFO HTTP Request: POST https://api.deepseek.com/v1/embeddings "HTTP/1.1 404 Not Found"
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/root/miniconda3/envs/chatchat/lib/python3.8/site-packages/sse_starlette/sse.py", line 269, in call
await wrap(partial(self.listen_for_disconnect, receive))
File "/root/miniconda3/envs/chatchat/lib/python3.8/site-packages/sse_starlette/sse.py", line 258, in wrap
await func()
File "/root/miniconda3/envs/chatchat/lib/python3.8/site-packages/sse_starlette/sse.py", line 215, in listen_for_disconnect
message = await receive()
File "/root/miniconda3/envs/chatchat/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 524, in receive
await self.message_event.wait()
File "/root/miniconda3/envs/chatchat/lib/python3.8/asyncio/locks.py", line 309, in wait
await fut
asyncio.exceptions.CancelledError

复现问题的步骤 / Steps to Reproduce

  1. 执行 '...' / Run '...'
  2. 点击 '...' / Click '...'
  3. 滚动到 '...' / Scroll to '...'
  4. 问题出现 / Problem occurs

预期的结果 / Expected Result
描述应该出现的结果 / Describe the expected result.

实际结果 / Actual Result
描述实际发生的结果 / Describe the actual result.

环境信息 / Environment Information

  • Langchain-Chatchat 版本 / commit 号:(例如:0.3.1 或 commit 123456) / Langchain-Chatchat version / commit number: (e.g., 0.3.1 or commit 123456)
  • 部署方式(pypi 安装 / 源码部署 / docker 部署):pypi 安装 / Deployment method (pypi installation / dev deployment / docker deployment): pypi installation
  • 使用的模型推理框架(Xinference / Ollama / OpenAI API 等):Xinference / Model serve method(Xinference / Ollama / OpenAI API, etc.): Xinference
  • 使用的 LLM 模型(GLM-4-9B / Qwen2-7B-Instruct 等):GLM-4-9B / LLM used (GLM-4-9B / Qwen2-7B-Instruct, etc.): GLM-4-9B
  • 使用的 Embedding 模型(bge-large-zh-v1.5 / m3e-base 等):bge-large-zh-v1.5 / Embedding model used (bge-large-zh-v1.5 / m3e-base, etc.): bge-large-zh-v1.5
  • 使用的向量库类型 (faiss / milvus / pg_vector 等): faiss / Vector library used (faiss, milvus, pg_vector, etc.): faiss
  • 操作系统及版本 / Operating system and version: MacOS
  • Python 版本 / Python version: 3.8
  • 推理使用的硬件(GPU / CPU / MPS / NPU 等) / Inference hardware (GPU / CPU / MPS / NPU, etc.): GPU
  • 其他相关环境信息 / Other relevant environment information:

附加信息 / Additional Information
添加与问题相关的任何其他信息 / Add any other information related to the issue.

@RATOR-codes RATOR-codes added the bug Something isn't working label Mar 27, 2025
Copy link

dosubot bot commented Mar 27, 2025

@RATOR-codes 你好,我是Dosu。我可以帮助你解决 bug、回答问题,还可以帮助你成为贡献者。在等待人类维护者的过程中,我会尽力帮助你。

I found a similar open issue related to a 404 error when using the Deepseek API. The suggested solution is to ensure you are accessing the correct endpoint. For API requests, you should use one of the following endpoints:

  • /chat/chat
  • /chat/search_engine_chat
  • /chat/feedback
  • /llm_model/list_running_models
  • /llm_model/list_config_models
  • /llm_model/get_model_config
  • /llm_model/stop
  • /llm_model/change
  • /server/configs
  • /server/list_search_engines
  • /server/get_prompt_template
  • /other/completion
  • /other/embed_texts

These endpoints are all POST requests. Additionally, consider changing the openai_api_port in server/llm_api.py and api_base_url in configs/model_config.py to avoid port conflicts [1].

For the specific issue with the Deepseek API, ensure that the endpoint URL is correct and that the API is properly configured to handle requests. The '/embeddings' endpoint in the Deepseek API is used to vectorize text, and it should return embeddings in the format BaseResponse(data=List[List[float]]) [2]. Double-check the endpoint URL and the parameters being sent in the request.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | 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