@@ -82,22 +82,22 @@ const (
8282 FinishReasonNull FinishReason = "null"
8383)
8484
85- // ChatCompletionDelta represents a delta/chunk in a streaming response
85+ // MessageDelta represents a delta/chunk in a streaming response
8686type MessageDelta struct {
8787 Role string `json:"role,omitempty"`
8888 Content string `json:"content,omitempty"`
8989 FunctionCall * tools.FunctionCall `json:"function_call,omitempty"`
9090 ToolCalls []tools.ToolCall `json:"tool_calls,omitempty"`
9191}
9292
93- // ChatCompletionStreamChoice represents a choice in a streaming response
93+ // MessageStreamChoice represents a choice in a streaming response
9494type MessageStreamChoice struct {
9595 Index int `json:"index"`
9696 Delta MessageDelta `json:"delta"`
9797 FinishReason FinishReason `json:"finish_reason,omitempty"`
9898}
9999
100- // ChatCompletionStreamResponse represents a streaming response from the model
100+ // MessageStreamResponse represents a streaming response from the model
101101type MessageStreamResponse struct {
102102 ID string `json:"id"`
103103 Object string `json:"object"`
@@ -114,7 +114,7 @@ type Usage struct {
114114 CachedOutputTokens int `json:"cached_output_tokens"`
115115}
116116
117- // ChatCompletionStream interface represents a stream of chat completions
117+ // MessageStream interface represents a stream of chat completions
118118type MessageStream interface {
119119 // Recv gets the next completion chunk
120120 Recv () (MessageStreamResponse , error )
0 commit comments