When using embeddings indexing files with Tongyi Qianwen or Cohere, an error occurs.
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.0.0
Cloud or Self Hosted
Cloud
Steps to reproduce
When using embeddings to create a knowledge base with Tongyi Qianwen or Cohere, the following error occurs.
PluginInvokeError: {"'error_type":"unmarshal_error " "message":"unmarshal json failed: json: cannot unmarshal number into Go struct field GetTextEmbeddingNumTokensR esponse.num_tokens of type [lint"}
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
To resolve the JSON unmarshalling error when using embeddings with Tongyi Qianwen or Cohere, you should switch your Dify installation to version v0.15.3 instead of using version 1.0.0 [1].
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
Fixed in https://github.com/langgenius/dify-official-plugins/pull/300 @dosubot
Hey @crazywoola! I'm here to help with bugs, technical questions, and engineering knowledge. But it looks like you're diving into some GitHub pull request details, which is a bit outside my wheelhouse. If you think I should be able to help with this, feel free to reach out to the Dosu Team. They'll know what to do! 😊
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