Skip to content

Commit

Permalink
add Message object to pydantic models
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs committed Aug 10, 2024
1 parent 2f9cde3 commit 0e19e80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agentops/llm_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ def patched_function(*args, **kwargs):
def override_anthropic_sync_completion(self):
from anthropic.resources import messages
from anthropic.types import (
Message,
RawContentBlockDeltaEvent,
RawContentBlockStartEvent,
RawContentBlockStopEvent,
Expand All @@ -1057,6 +1058,7 @@ def patched_function(*args, **kwargs):
if completion_override:
result_model = None
pydantic_models = (
Message,
RawContentBlockDeltaEvent,
RawContentBlockStartEvent,
RawContentBlockStopEvent,
Expand Down Expand Up @@ -1097,6 +1099,7 @@ def patched_function(*args, **kwargs):
def override_anthropic_async_completion(self):
from anthropic.resources import messages
from anthropic.types import (
Message,
RawContentBlockDeltaEvent,
RawContentBlockStartEvent,
RawContentBlockStopEvent,
Expand All @@ -1122,6 +1125,7 @@ async def patched_function(*args, **kwargs):
if completion_override:
result_model = None
pydantic_models = (
Message,
RawContentBlockDeltaEvent,
RawContentBlockStartEvent,
RawContentBlockStopEvent,
Expand Down

0 comments on commit 0e19e80

Please sign in to comment.