openai-go
openai-go copied to clipboard
Incorrect documentation for Conversations
Conversations now represents an OpenAI API and object set https://platform.openai.com/docs/api-reference/conversations/create
However the documentation literally states this for conversations
Conversations
param := openai.ChatCompletionNewParams{
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("What kind of houseplant is easy to take care of?"),
},
Seed: openai.Int(1),
Model: openai.ChatModelGPT4o,
}
completion, err := client.Chat.Completions.New(ctx, param)
param.Messages = append(param.Messages, completion.Choices[0].Message.ToParam())
param.Messages = append(param.Messages, openai.UserMessage("How big are those?"))
// continue the conversation
completion, err = client.Chat.Completions.New(ctx, param)
It would be great to have documentation that matches both the code updates in this repo as well as the specs officially defined by openai