AgentOps-AI / agentops

Python SDK for agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks like CrewAI, Langchain, and Autogen
https://agentops.ai
MIT License
1.18k stars 93 forks source link

fix `undo_override_ollama` #278

Closed siyangqiu closed 5 days ago

siyangqiu commented 5 days ago

📥 Pull Request

📘 Description If you don't have ollama installed and you call stop_instrumenting(), you will have a crash because undo_override tries to import ollama to undo the override. This change adds a check to see if you have ollama installed.

CLOSES #277

codecov[bot] commented 5 days ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Flag Coverage Δ
unittests 42.57% <0.00%> (-0.03%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
agentops/llm_tracker.py 9.77% <0.00%> (-0.03%) :arrow_down: