openai-go icon indicating copy to clipboard operation
openai-go copied to clipboard

Reasoning content for ChatCompletionChunkChoiceDelta

Open yourlogarithm opened this issue 3 months ago • 0 comments

Added the reasoning content field for the ChatCompletionChunkChoiceDelta:

// A chat completion delta generated by streamed model responses.
type ChatCompletionChunkChoiceDelta struct {
    ...
    ReasoningContent string `json:"reasoning_content,nullable"`
    ...
}

It is present in the json body of SSE events when streaming is enabled. This is true for the vLLM openai-compatible api at least, so it would be nice to have it here as well.

yourlogarithm avatar Sep 06 '25 15:09 yourlogarithm