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

Incorrect documentation for Conversations

Open qhenkart opened this issue 1 month ago • 0 comments

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

qhenkart avatar Oct 16 '25 06:10 qhenkart