-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Ollama - failed to embed chunk #1836
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
Comments
To clarify - the question relates more to "what is the actual embedding API call sent" than debugging the error message from the API itself. Since the manual curl call works I believe there's just a slight difference in the sent data |
Good catch on the trailing slash! That's an Ollama specific issue since we're doing some additional URL construction. Pushed a fix to resolve that. Thanks for verifying the curl works on your end. We don't have any debug logs for embeddings at the moment unfortunately. Your best bet would probably be to run Continue locally using our https://github.com/continuedev/continue/blob/main/CONTRIBUTING.md guidelines and set some debug breakpoints. From the error message you have, does it seem like there is anything unusual in the chunk that is getting embeded? |
I'll check to local run on Monday, but here's the raw (file name changed, but the slashed are as they were) logs and curl for one file embedding. It does seem that every single file fails, so I doubt it's related to the chunk contents: Log:
Curl:
Curl response:
|
I had the same issue. I thought I can see that you're also missing the |
That's it, thanks @simonoscr ! I also figured it was set automatically since the other configs didn't need it, but adding Content-Type fixed it. Working config:
I added #1855 to hopefully fix this by default |
Thank you @spaasis and @simonoscr for seeing this through to completion! Appreciate the PR to fix the behavior for everyone. |
Before submitting your bug report
Relevant environment info
Description
Hi! I'm testing Continue integration to our Open WebUI instance https://github.com/open-webui/open-webui
I got all the other pieces working, but the API calls to /embeddings fail. See the log entry.
However, if I do the API call manually, it passes and returns embeddings:
I tried to eye the source code to figure out what is different in the manual API call vs the one that Continue makes, but couldn't find a difference. Is there a debug log I could turn on to see the actual API calls?
Btw the
apiBase
configuration forembeddingsProvider
requires a trailing/
but the other model configurations don't ;) Before I spotted this I got a bunch of "method not allowed"-messages.Let me know if I can help you debug further. Loving Continue so far!
To reproduce
Open any project and start indexing
Log output
The text was updated successfully, but these errors were encountered: