Implement chat completion streaming (#101)

* Implement chat completion streaming

* Optimize the implementation of chat completion stream

* Fix linter error
This commit is contained in:
Afeyer
2023-03-03 13:52:02 +08:00
committed by GitHub
parent 58d99eb220
commit 39ca4e9488
4 changed files with 142 additions and 14 deletions

View File

@@ -49,7 +49,7 @@ type ChatCompletionResponse struct {
Usage Usage `json:"usage"`
}
// CreateChatCompletion — API call to Creates a completion for the chat message.
// CreateChatCompletion — API call to Create a completion for the chat message.
func (c *Client) CreateChatCompletion(
ctx context.Context,
request ChatCompletionRequest,