Skip to content

fix: update Ollama embedding API usage#1

Open
earthenvessel wants to merge 1 commit into
NeoVand:mainfrom
earthenvessel:fix/ollama-embed-endpoint
Open

fix: update Ollama embedding API usage#1
earthenvessel wants to merge 1 commit into
NeoVand:mainfrom
earthenvessel:fix/ollama-embed-endpoint

Conversation

@earthenvessel
Copy link
Copy Markdown

Summary

Update to use Ollama's current embedding API.

Changes

  • switch embedding requests from /api/embeddings to /api/embed
  • change the request payload from prompt to input
  • parse the modern embeddings response shape
  • keep compatibility with legacy single-embedding responses
  • return early from hybrid_search() when query embedding fails

Why

Recent Ollama versions use /api/embed for embeddings. The previous implementation was calling the older endpoint and caused document processing failures like: 500 Server Error: Internal Server Error for url: http://host.docker.internal:11434/api/embeddings

Validation

  • ran python -m py_compile app.py
  • verified the updated request URL and payload shape
  • verified parsing for modern response format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant