Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchatmangpt committed Jun 7, 2024
2 parents 8f3bcb3 + 8ad2d9f commit d87e64e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dspygen/utils/dspy_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def init_dspy(model: str = "gpt-3.5-turbo-instruct", lm_class=dspy.OpenAI, max_t
return lm


def init_ol(model: str = "phi3:instruct", max_tokens: int = 800, lm_instance=None, lm_class=dspy.OllamaLocal, timeout=10):
def init_ol(model: str = "phi3:instruct", base_url="http://0.0.0.0:11434", max_tokens: int = 800, lm_instance=None, lm_class=dspy.OllamaLocal, timeout=10):
if lm_instance:
dspy.settings.configure(lm=lm_instance)
return lm_instance
else:
lm = lm_class(model=model, max_tokens=max_tokens, timeout_s=timeout)
lm = lm_class(model=model, base_url=base_url, max_tokens=max_tokens, timeout_s=timeout)
dspy.settings.configure(lm=lm)
return lm

0 comments on commit d87e64e

Please sign in to comment.