logancyang / obsidian-copilot

THE Copilot in Obsidian
GNU Affero General Public License v3.0
2.55k stars 177 forks source link

For vector embedding of cohereAI, it reports an error #114

Closed zonszer closed 4 weeks ago

zonszer commented 1 year ago

Hi, thanks for the plugin!

In the latest version (2.3.6) when using cohere AI API key for vector embedding, it reports an error: image|500

But when I changed to huggingface API key it works well.
Still not known why this problem occurs, could anyone provide some suggestions?

logancyang commented 1 year ago

Hmm, I just tried and cohereAI embedding is working for me. So you don't even see the "Vector store created successfully" message, right?

This is what GPT4 says, so I suspect Cohere is returning some HTML 404 page because of wrong credentials. Is your API key correct? I wonder if anybody else is seeing this issue as well.

Screenshot 2023-07-20 at 2 45 37 PM
zonszer commented 1 year ago

Thank you for your prompt response! I have recently checked and tested my cohere API key. Based on my evaluation, the cohere API key in obsidian-copilot appears to be correct as it successfully ran in other instances, resulting in usage billing. So, I am still unsure about the cause of this particular issue.

image Anyway, I sincerely appreciate your assistance! Perhaps, when I have some free time, I should examine the return value of the post to gain further information.

ZHN202 commented 10 months ago

I'm having the same problem. @logancyang It should be a network problem. @zonszer image I called cohere's python api to test it and can reproduce the same problem when closing the web proxy. When I turn on the web proxy, I can use the python api without problems, but the problem still occurs on obsidian. I don't have a solution yet. Maybe it's a problem with the typescript api. When the official implementation of the interface comes out there may be no problem at all!

22rikard commented 10 months ago

same issue,it return statusCode 502 bad gateway,it seem like it had been blocked me,although i was using gobal mode in CLASH. i fix it by turn on the 'TUN MODE' in CLASH

ZHN202 commented 10 months ago

same issue,it return statusCode 502 bad gateway,it seem like it had been blocked me,although i was using gobal mode in CLASH. i fix it by turn on the 'TUN MODE' in CLASH

Thank you. Problem solved.