Skip to content

Conversation

@Kaikaikaifang
Copy link

@Kaikaikaifang Kaikaikaifang commented Mar 12, 2025

image

In the stream_response, forgot to modify the format of usage.

Why this error occur

in _run_single_turn_stream (run.py), treat the usage as ResponseUsage, but in fact the usage is CompletionUsage, because forgot to modify the format of usage in stream_response (openai_chatcompletions.py).

fix #63

@Kaikaikaifang
Copy link
Author

@rm-openai Please review this pr to fix the current issue where the stream response is not tracking properly.

Copy link
Collaborator

@rm-openai rm-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good - can you please add a test so this doesn't regress?

@benjaminbascary97
Copy link

Waiting on this to be merged asap

@rm-openai
Copy link
Collaborator

FYI I put out #112 so that we can merge this faster

@rm-openai rm-openai closed this Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants