EpistasisLab / EpistasisLab/escargot

Ollama Integration Fix

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
39
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.