An error occurred while create knowledge base with baidu vector databse and wenxin embedding model #6470

Closed
opened 2026-02-21 18:15:53 -05:00 by yindo · 1 comment
Owner

Originally created by @WayneCao on GitHub (Oct 31, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. Deploy dify with source code and select baidu vector database.
  2. Upload a pdf document to create knowledge base with wenxin embedding model.
  3. An “Internal Server Error” message appears at the top right.

✔️ Expected Behavior

No response

Actual Behavior

Some error log found in celery.log
error

Originally created by @WayneCao on GitHub (Oct 31, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10.2 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1. Deploy dify with source code and select baidu vector database. 2. Upload a pdf document to create knowledge base with wenxin embedding model. 3. An “Internal Server Error” message appears at the top right. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior Some error log found in celery.log ![error](https://github.com/user-attachments/assets/55294333-1043-4f77-84dc-bb0358a8f3da)
yindo added the 👻 feat:rag label 2026-02-21 18:15:53 -05:00
yindo closed this issue 2026-02-21 18:15:53 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 31, 2024):

Hello @WayneCao! I'm here to help you with any bugs, questions, or contributions you may have. Let's work together to solve the issue you're facing.

I found a relevant discussion regarding an "Internal Server Error" when creating a knowledge base with the Baidu vector database and Wenxin embedding model in Dify version 0.10.2. This error could be caused by a non-200 HTTP response from the API call to the Wenxin service. Specifically, in the WenxinTextEmbedding class, the embed_documents method makes a POST request to the Wenxin API. If the response status code is not 200, an InternalServerError is raised with the message "Failed to invoke ernie bot" along with the response text [1].

To troubleshoot this issue, you might want to check the following:

  1. API Endpoint: Ensure that the API endpoint for the Wenxin service is correct and accessible.
  2. Network Issues: Verify that there are no network connectivity issues between your Dify deployment and the Wenxin service.
  3. Server-Side Issues: Check if there are any server-side issues with the Wenxin service that might be causing the error.

If you have access to the error logs, they might provide more specific information about the cause of the error.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 31, 2024): <!-- Greeting --> Hello @WayneCao! I'm here to help you with any bugs, questions, or contributions you may have. Let's work together to solve the issue you're facing. <!-- Answer --> I found a relevant discussion regarding an "Internal Server Error" when creating a knowledge base with the Baidu vector database and Wenxin embedding model in Dify version 0.10.2. This error could be caused by a non-200 HTTP response from the API call to the Wenxin service. Specifically, in the `WenxinTextEmbedding` class, the `embed_documents` method makes a POST request to the Wenxin API. If the response status code is not 200, an `InternalServerError` is raised with the message "Failed to invoke ernie bot" along with the response text <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/wenxin/text_embedding/text_embedding.py)</sup>. To troubleshoot this issue, you might want to check the following: 1. **API Endpoint**: Ensure that the API endpoint for the Wenxin service is correct and accessible. 2. **Network Issues**: Verify that there are no network connectivity issues between your Dify deployment and the Wenxin service. 3. **Server-Side Issues**: Check if there are any server-side issues with the Wenxin service that might be causing the error. If you have access to the error logs, they might provide more specific information about the cause of the error. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6470