kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
docs: add a note in the readme about onProgress and onConversationResponse
rodzic
25510460fc
commit
0f995702fb
|
@ -97,6 +97,8 @@ const response = await api.sendMessage('this is a timeout test', {
|
|||
})
|
||||
```
|
||||
|
||||
You can stream responses using the `onProgress` or `onConversationResponse` callbacks. See the [docs](./docs/classes/ChatGPTAPI.md) for more details.
|
||||
|
||||
<details>
|
||||
<summary>Usage in CommonJS (Dynamic import)</summary>
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ export class ChatGPTAPI {
|
|||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
'user-agent': this._userAgent
|
||||
'User-Agent': this._userAgent
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
signal: abortSignal,
|
||||
|
|
Ładowanie…
Reference in New Issue