Skip to content

Commit

Permalink
ollama api base constant fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rashadphz committed Jun 23, 2024
1 parent 86c3301 commit 1e9d339
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/llm/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from abc import ABC, abstractmethod

import instructor
Expand Down Expand Up @@ -33,6 +34,8 @@ def __init__(
self,
model: str,
):
os.environ.setdefault("OLLAMA_API_BASE", "http://localhost:11434")

validation = validate_environment(model)
if validation["missing_keys"]:
raise ValueError(f"Missing keys: {validation['missing_keys']}")
Expand Down

0 comments on commit 1e9d339

Please sign in to comment.