Skip to content
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

model embedding credentials is not initialized #3295

Closed
4 tasks done
talosL opened this issue Apr 10, 2024 · 4 comments
Closed
4 tasks done

model embedding credentials is not initialized #3295

talosL opened this issue Apr 10, 2024 · 4 comments
Assignees
Labels
🐞 bug Something isn't working 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database.

Comments

@talosL
Copy link

talosL commented Apr 10, 2024

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.0-fix1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I was uploading a file using the knowledge base, the interface threw a 400 error with the message "model embedding credentials is not initialized". However, my model configuration is correct.

✔️ Expected Behavior

Calculate the consumed tokens correctly and segment them.

❌ Actual Behavior

model embedding credentials is not initialized

Copy link

dosubot bot commented Apr 10, 2024

Hey @talosL, nice to see you digging into the depths of Dify once more. Hope this one's a less bumpy ride than the last!

It looks like the issue you're encountering, "model embedding credentials is not initialized," could be due to a few potential reasons:

  1. The credentials, specifically the api_key, might not be correctly set in the JinaTextEmbeddingModel instance. Ensure that the credentials are properly passed and initialized before attempting any file uploads.
  2. There might be a problem in the application logic where the model is being used before the credentials have been set. This requires a review of the sequence in which your application initializes and uses the model.
  3. If your application integrates with other components or services for the text embedding model, verify that these integrations correctly manage and pass the model's credentials.

For a deeper dive into how credentials are managed, you can refer to the OpenLLMTextEmbeddingModel class in the text_embedding.py file within the repository. This class is responsible for validating and initializing the credentials. The initialization and usage of the credentials happen in the _invoke method, which constructs a request to the model's server using the server_url from the credentials.

If you've made any changes in Dify version 0.6.0-fix1 that might affect the model embedding credentials initialization process, reviewing these changes could provide insights into the issue. Additionally, understanding the error handling process for this specific error in your application could help in diagnosing and resolving the problem.

If you need further clarification or assistance, feel free to provide more details about your setup or the specific changes you've made.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added 🐞 bug Something isn't working 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. labels Apr 10, 2024
@crazywoola
Copy link
Member

image Please provide more details such as which embedding model.

@JohnJyong
Copy link
Contributor

@talosL

@talosL
Copy link
Author

talosL commented Apr 11, 2024

Sorry, this is indeed empty. It will work normally once I set it correctly.

@talosL talosL closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database.
Projects
None yet
Development

No branches or pull requests

3 participants