Skip to content

Commit 4785151

Browse files
docs: add missing parameter to code snippet (#26)
1 parent 55f2616 commit 4785151

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ import com.openai.models.ChatCompletionCreateParams;
9191
import java.util.List;
9292

9393
ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
94+
.message(List.of(ChatCompletionMessageParam.ofChatCompletionUserMessageParam(ChatCompletionUserMessageParam.builder()
95+
.content(ChatCompletionUserMessageParam.Content.ofTextContent("Say this is a test"))
96+
.role(ChatCompletionUserMessageParam.Role.user)
97+
.build())))
9498
.model("gpt-4o")
9599
.build();
96100
ChatCompletion chatCompletion = client.chat().completions().create(params);

0 commit comments

Comments
 (0)