Skip to content

Commit

Permalink
Fixed Store embedding model url
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninoLorenzo committed Jul 16, 2024
1 parent b97c091 commit c9385c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/agent/knowledge/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class LLMRouter(Router):
Using a local model is not the best choice for performance, HuggingFace
Inference API could be used in future"""

def __init__(self, model: str = 'gemma:2b'):
def __init__(self, model: str = 'gemma2:9b'):
self.llm = LLM(model)
self.system_prompt = PROMPTS[model]['routing']['system']
self.user_prompt = PROMPTS[model]['routing']['user']
Expand Down
3 changes: 2 additions & 1 deletion src/agent/knowledge/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Store:

def __init__(self,
url: str = 'http://localhost:6333',
embedding_url: str = 'http://localhost:11434',
in_memory: bool = False,
router: Router = None
):
Expand All @@ -38,7 +39,7 @@ def __init__(self,
coll = {}
self._collections: Dict[str: Collection] = coll

self._encoder = ollama.embeddings
self._encoder = ollama.Client(host=embedding_url).embeddings
self._embedding_model: str = 'nomic-embed-text'
self._embedding_size: int = len(
self._encoder(
Expand Down

0 comments on commit c9385c8

Please sign in to comment.