-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Error: Response output is missing or does not contain embeddings. #10047
Comments
I found a similar unsolved discussion regarding the error "Response output is missing or does not contain embeddings" [1]. Additionally, there are related issues that might provide some insights:
For your specific case, ensure that the document size is within the allowed limits and check the configuration settings related to the embedding process. If the problem persists, reviewing the logs for any additional error messages might provide more clues. |
I reviewed the source code, and during the process of obtaining the API key, it first retrieves historical decrypted results from the Redis cache. The stored data in Redis consists of the encrypted results. It seems that this piece of code did not properly modify the credentials, resulting in the direct use of the encrypted values from the database: https://github.com/langgenius/dify/blob/0.10.1/api/core/provider_manager.py#L588-L595 |
I obtained the encrypted credentials data and private key from Redis in the environment which has the error and simulated the decryption process locally. An exception was thrown on this line of code: https://github.com/langgenius/dify/blob/main/api/libs/rsa.py#L76 Error message is: I conducted further debugging and found that the failure was caused by the https://github.com/langgenius/dify/blob/main/api/libs/gmpy2_pkcs10aep_cipher.py#L200 I further examined the encryption and decryption process and ultimately discovered that the error was due to the RSA public key stored in the db being inconsistent with the public key retrieved from the private key file. However, I am currently unsure why this inconsistency exists. Perhaps there was an issue with updating the public key when generating the new private key. |
From the code, it appears that the public key in the db is only written once during tenant creation. If the private key for the same tenant is regenerated afterward, it will lead to an inconsistency. It seems there are no other methods in the code to update the public key. One SOLUTION is to use the command provided by Dify to reset the key pair, but be aware that this will invalidate the existing model authentication and require reconfiguration of all providers. https://github.com/langgenius/dify/blob/main/api/commands.py#L98-L115 In api container, |
I have submitted a Pull Request(#10210) for your review. Thank you! @crazywoola |
Hi, @yinzih. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. Issue Summary
Next Steps
Thank you for your understanding and contribution! |
Self Checks
Dify version
0.10.2
Cloud or Self Hosted
Cloud
Steps to reproduce
When I create a knowledge base, I get an error when embedding processing.
[tongyi] Error: Response output is missing or does not contain embeddings.
How can I solve this problem?
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: