Skip to content

Commit

Permalink
minor fix for output tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs committed Aug 10, 2024
1 parent 364c6f6 commit 27dabf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agentops/llm_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def handle_stream_chunk(chunk: Message):
elif isinstance(chunk, RawContentBlockStopEvent):
pass
elif isinstance(chunk, RawMessageDeltaEvent):
self.llm_event.completion_tokens += chunk.message.usage.output_tokens
self.llm_event.completion_tokens = chunk.usage.output_tokens
elif isinstance(chunk, RawMessageStopEvent):
self.llm_event.completion = accumulated_delta
self.llm_event.end_timestamp = get_ISO_time()
Expand Down

0 comments on commit 27dabf5

Please sign in to comment.