kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
docs: add a note in the readme about onProgress and onConversationResponse
rodzic
95428250d4
commit
7719f15331
|
@ -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>
|
<details>
|
||||||
<summary>Usage in CommonJS (Dynamic import)</summary>
|
<summary>Usage in CommonJS (Dynamic import)</summary>
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ export class ChatGPTAPI {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`,
|
Authorization: `Bearer ${accessToken}`,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'user-agent': this._userAgent
|
'User-Agent': this._userAgent
|
||||||
},
|
},
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
signal: abortSignal,
|
signal: abortSignal,
|
||||||
|
|
Ładowanie…
Reference in New Issue