-
Notifications
You must be signed in to change notification settings - Fork 11
/
assistant
38 lines (35 loc) · 883 Bytes
/
assistant
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import OpenAI from "openai";
const openai = new OpenAI({
organization: 'org-1eSMT7ggOXLuAunPuYw6AnbS',
});
import OpenAI from "openai";
const openai = new OpenAI({
organization: 'org-1eSMT7ggOXLuAunPuYw6AnbS',
});
import OpenAI from "openai";
const openai = new OpenAI({
organization: 'org-1eSMT7ggOXLuAunPuYw6AnbS',
});
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1677858242,
"model": "gpt-3.5-turbo-0613",
"usage": {
"prompt_tokens": 13,
"completion_tokens": 7,
"total_tokens": 20
},
"choices": [
{
"message": {
"role": "assistant",
"content": "\n\nThis is a test!"
},
"logprobs": null,
"finish_reason": "stop",
"index": 0
}
]
}
https://platform.openai.com/docs/api-reference/streaming