Skip to content

Ollama Integration Fix #16

@tompan-123

Description

@tompan-123

In escargot/language_models/ollama.py, the get_embedding() function on line 139 should use the embedding model ID and extract the embedding using the "embedding" key from the response. The fixed function should be:

def get_embedding(self, text_to_embed):
response = ollama.embed(model=self.embedding_id, input=text_to_embed)
return response["embeddings"][0]

Additionally, escargot needs to be installed from the git repo for ollama integration to work; the PyPI version is likely not up to date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions