Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

ollama undo instrument (#397)

Braelyn Boynton51433d9e4573
diff --git a/agentops/llms/ollama.py b/agentops/llms/ollama.py
index d17aba9a..e5779283 100644
--- a/agentops/llms/ollama.py
+++ b/agentops/llms/ollama.py
@@ -65,7 +65,7 @@ class OllamaProvider(InstrumentedProvider):
self._override_chat_async_client()
def undo_override(self):
- if original_func is not None:
+ if original_func is not None and original_func != {}:
import ollama
ollama.chat = original_func["ollama.chat"]