Error reported when using knowledge base embedding model text-embedding-3-large #5561

Closed
opened 2026-02-21 18:11:37 -05:00 by yindo · 5 comments
Owner

Originally created by @yunfeng13 on GitHub (Sep 12, 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.8.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

An error is reported when using the knowledge base embedding model text-embedding-3-large, but it actually has a token, and switching to other embedding models does not report an error.
image

✔️ Expected Behavior

Find the reason why the index fails, but it will be fine if you change the model

Actual Behavior

text-embedding-3-large model error

Originally created by @yunfeng13 on GitHub (Sep 12, 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.8.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce An error is reported when using the knowledge base embedding model text-embedding-3-large, but it actually has a token, and switching to other embedding models does not report an error. ![image](https://github.com/user-attachments/assets/b7d2cde8-29cf-4422-8932-936b07652f3c) ### ✔️ Expected Behavior Find the reason why the index fails, but it will be fine if you change the model ### ❌ Actual Behavior text-embedding-3-large model error
yindo added the 🌚 invalid label 2026-02-21 18:11:37 -05:00
yindo closed this issue 2026-02-21 18:11:37 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 12, 2024):

I found some similar discussions and issues that might be relevant to the error you're encountering:

  1. [openai] Error: argument should be a bytes-like object or ASCII string, not 'list'General Discussion (Open)
  2. dify reported an error when using openai recall test to be a bytes-like object or ASCll string, not 'list'Help (Open)
  3. Error occurred when adding Doubao TEXT Embedding model (Closed)

The closed issue was resolved by a pull request: PR 4431 [1][2][3].

For the text-embedding-3-large model, ensure that the input requirements are met:

  • Context Size: 8191
  • Max Chunks: 32
  • Texts: List of strings, capable of batch processing
  • User: Optional unique identifier of the user [4][5].

Additionally, Dify has specific error handling mechanisms for embedding models, including credential validation, connection errors, server errors, authentication errors, rate limiting, and bad request errors. These mechanisms ensure that various error conditions are appropriately handled and communicated [6][7].

You might want to check if the input data being passed to the model meets these requirements and if the error handling mechanisms are being triggered correctly. If the issue persists, consider looking into the discussions and the closed issue for more context and potential solutions.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 12, 2024): <!-- Answer --> I found some similar discussions and issues that might be relevant to the error you're encountering: 1. [[openai] Error: argument should be a bytes-like object or ASCII string, not 'list'General Discussion](https://github.com/langgenius/dify/discussions/6805) (Open) 2. [dify reported an error when using openai recall test to be a bytes-like object or ASCll string, not 'list'Help](https://github.com/langgenius/dify/discussions/6752) (Open) 3. [Error occurred when adding Doubao TEXT Embedding model](https://github.com/langgenius/dify/issues/4550) (Closed) The closed issue was resolved by a pull request: [PR 4431](https://github.com/langgenius/dify/pull/4431) <sup>[[1]](https://github.com/langgenius/dify/discussions/6805)</sup><sup>[[2]](https://github.com/langgenius/dify/discussions/6752)</sup><sup>[[3]](https://github.com/langgenius/dify/issues/4550)</sup>. For the `text-embedding-3-large` model, ensure that the input requirements are met: - **Context Size**: 8191 - **Max Chunks**: 32 - **Texts**: List of strings, capable of batch processing - **User**: Optional unique identifier of the user <sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/openai/text_embedding/text-embedding-3-large.yaml)</sup><sup>[[5]](https://github.com/langgenius/dify-docs/blob/main/en/guides/model-configuration/interfaces.md)</sup>. Additionally, Dify has specific error handling mechanisms for embedding models, including credential validation, connection errors, server errors, authentication errors, rate limiting, and bad request errors. These mechanisms ensure that various error conditions are appropriately handled and communicated <sup>[[6]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/minimax/text_embedding/text_embedding.py)</sup><sup>[[7]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/nvidia/text_embedding/text_embedding.py)</sup>. You might want to check if the input data being passed to the model meets these requirements and if the error handling mechanisms are being triggered correctly. If the issue persists, consider looking into the discussions and the closed issue for more context and potential solutions. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 12, 2024):

Is is an official key from OpenAI?

@crazywoola commented on GitHub (Sep 12, 2024): Is is an official key from OpenAI?
Author
Owner

@yunfeng13 commented on GitHub (Sep 12, 2024):

这是来自 OpenAI 的官方密钥吗?

No, it’s the secret key provided by the transfer platform

@yunfeng13 commented on GitHub (Sep 12, 2024): > 这是来自 OpenAI 的官方密钥吗? No, it’s the secret key provided by the transfer platform
Author
Owner

@crazywoola commented on GitHub (Sep 12, 2024):

This is because the third party OpenAI api does not return the correct response in base64. We force it on our side for a better performance.

See duplicated question here. https://github.com/langgenius/dify/issues/7351

@crazywoola commented on GitHub (Sep 12, 2024): This is because the third party OpenAI api does not return the correct response in base64. We force it on our side for a better performance. See duplicated question here. https://github.com/langgenius/dify/issues/7351
Author
Owner

@imxieqing commented on GitHub (Sep 12, 2024):

There is still no compatibility issue with dify from version 0.6 to version 0.8

@imxieqing commented on GitHub (Sep 12, 2024): There is still no compatibility issue with dify from version 0.6 to version 0.8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5561