Skip to content

Commit

Permalink
fix function name
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs committed Aug 17, 2024
1 parent 7a17a4c commit 6bc844f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions agentops/llms/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, client):
self.tool_event = {}
self.tool_id = ""

def _handle_response(
def handle_response(
self, response, kwargs, init_timestamp, session: Optional[Session] = None
):
"""Handle responses for Anthropic"""
Expand Down Expand Up @@ -206,13 +206,13 @@ def patched_function(*args, **kwargs):
f"{pprint.pformat(completion_override)}"
)
return None
return self._handle_response(
return self.handle_response(
result_model, kwargs, init_timestamp, session=session
)

# Call the original function with its original arguments
result = original_create(*args, **kwargs)
return self._handle_response(
return self.handle_response(
result, kwargs, init_timestamp, session=session
)

Expand Down Expand Up @@ -274,12 +274,12 @@ async def patched_function(*args, **kwargs):
)
return None

return self._handle_response(
return self.handle_response(
result_model, kwargs, init_timestamp, session=session
)

result = await original_create_async(*args, **kwargs)
return self._handle_response(
return self.handle_response(
result, kwargs, init_timestamp, session=session
)

Expand Down

0 comments on commit 6bc844f

Please sign in to comment.