Skip to content

Commit 22680fd

Browse files
Access embeddin output (run-llama#19635)
1 parent 0ff1dd3 commit 22680fd

File tree

2 files changed

+3
-3
lines changed
  • llama-index-integrations/embeddings/llama-index-embeddings-ollama

2 files changed

+3
-3
lines changed

llama-index-integrations/embeddings/llama-index-embeddings-ollama/llama_index/embeddings/ollama/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ def get_general_text_embedding(self, texts: str) -> List[float]:
9090
result = self._client.embed(
9191
model=self.model_name, input=texts, options=self.ollama_additional_kwargs
9292
)
93-
return result["embedding"]
93+
return result.embeddings[0]
9494

9595
async def aget_general_text_embedding(self, prompt: str) -> List[float]:
9696
"""Asynchronously get Ollama embedding."""
9797
result = await self._async_client.embed(
9898
model=self.model_name, input=prompt, options=self.ollama_additional_kwargs
9999
)
100-
return result["embedding"]
100+
return result.embeddings[0]

llama-index-integrations/embeddings/llama-index-embeddings-ollama/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dev = [
2626

2727
[project]
2828
name = "llama-index-embeddings-ollama"
29-
version = "0.8.0"
29+
version = "0.8.1"
3030
description = "llama-index embeddings ollama integration"
3131
authors = [{name = "Your Name", email = "[email protected]"}]
3232
requires-python = ">=3.9,<4.0"

0 commit comments

Comments
 (0)