-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
The finish_reason field doesn't appear to be being passed through to the client.
Here's an example of the incoming data from OpenAI:
final returned processed chunk: ModelResponseStream(id='chatcmpl-B1z1HwsKbjazcsxVWxtBgG1FEOFEJ', created=1739812588, model='gpt-4o', object='chat.completion.chunk', system_fingerprint='fp_523b9b6e5f', choices=[StreamingChoices(finish_reason=None, index=0, delta=Delta(provider_specific_fields=None, refusal=None, content='?', role=None, function_call=None, tool_calls=None, audio=None), logprobs=None)], stream_options={'include_usage': True}, citations=None)
The response looks like this:
data: {"id":"chatcmpl-B1z1HwsKbjazcsxVWxtBgG1FEOFEJ","created":1739812588,"model":"gpt-4o","object":"chat.completion.chunk","system_fingerprint":"fp_523b9b6e5f","choices":[{"index":0,"delta":{"content":"?"}}],"stream_options":{"include_usage":true}}It does get returned on the last message when it is something other than None.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels