Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undo_override_ollama #278

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions agentops/llm_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,9 @@
completions.AsyncCompletions.create = original_create_async

def undo_override_ollama(self):
import ollama
if "ollama" in sys.modules:
import ollama

Check warning on line 715 in agentops/llm_tracker.py

View check run for this annotation

Codecov / codecov/patch

agentops/llm_tracker.py#L715

Added line #L715 was not covered by tests

ollama.chat = original_func["ollama.chat"]
ollama.Client.chat = original_func["ollama.Client.chat"]
ollama.AsyncClient.chat = original_func["ollama.AsyncClient.chat"]
ollama.chat = original_func["ollama.chat"]
ollama.Client.chat = original_func["ollama.Client.chat"]
ollama.AsyncClient.chat = original_func["ollama.AsyncClient.chat"]

Check warning on line 719 in agentops/llm_tracker.py

View check run for this annotation

Codecov / codecov/patch

agentops/llm_tracker.py#L717-L719

Added lines #L717 - L719 were not covered by tests
Loading