Skip to content

Commit

Permalink
Add minimum version
Browse files Browse the repository at this point in the history
  • Loading branch information
sprajosh committed Jun 14, 2024
1 parent dbc0d5c commit c79233b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions agentops/llm_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,16 @@ def override_api(self):
)

if api == "ollama":
logger.warning("ollama support is still in dev stage.")
module_version = version(api)

self.override_ollama_chat()
self.override_ollama_chat_client()
self.override_ollama_chat_async_client()
if Version(module_version) >= parse("0.0.1"):
self.override_ollama_chat()
self.override_ollama_chat_client()
self.override_ollama_chat_async_client()
else:
logger.warning(
f"Only Ollama>=0.0.1 supported. v{module_version} found."
)

def stop_instrumenting(self):
self.undo_override_openai_v1_async_completion()
Expand Down

0 comments on commit c79233b

Please sign in to comment.