We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OllamaEmbedder.get_embedding() always returns empty list.
Run following test code:
from agno.embedder.ollama import OllamaEmbedder embeddings = OllamaEmbedder().get_embedding("The quick brown fox jumps over the lazy dog.")
Return the embedding result as a list.
It always return empty list
It is caused by wrong key in ollama response:
https://github.com/agno-agi/agno/blob/main/libs/agno/agno/embedder/ollama.py
def get_embedding(self, text: str) -> List[float]: try: response = self._response(text=text) if response is None: return [] return response.get("embedding", []) except Exception as e: logger.warning(e) return []
According to Ollama document "https://ollama.com/blog/embedding-models", the key in ollama response should be "embeddings", instead of "embedding".
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
OllamaEmbedder.get_embedding() always returns empty list.
Steps to Reproduce
Run following test code:
Expected Behavior
Return the embedding result as a list.
Actual Behavior
It always return empty list
Root Cause
It is caused by wrong key in ollama response:
https://github.com/agno-agi/agno/blob/main/libs/agno/agno/embedder/ollama.py
According to Ollama document "https://ollama.com/blog/embedding-models", the key in ollama response should be "embeddings", instead of "embedding".
The text was updated successfully, but these errors were encountered: