Skip to content

Commit 20f179d

Browse files
committed
chore: fix example types
1 parent ad5a9b6 commit 20f179d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const openai = new OpenAI();
77

88
async function main() {
99
// Explicit non streaming params type:
10-
const params: OpenAI.Chat.CompletionCreateParams = {
10+
const params: OpenAI.Chat.ChatCompletionCreateParams = {
1111
model: 'gpt-4',
1212
messages: [{ role: 'user', content: 'Say this is a test!' }],
1313
};
1414
const completion = await openai.chat.completions.create(params);
1515
console.log(completion.choices[0]?.message?.content);
1616

1717
// Explicit streaming params type:
18-
const streaming_params: OpenAI.Chat.CompletionCreateParams = {
18+
const streaming_params: OpenAI.Chat.ChatCompletionCreateParams = {
1919
model: 'gpt-4',
2020
messages: [{ role: 'user', content: 'Say this is a test!' }],
2121
stream: true,

0 commit comments

Comments
 (0)