docs: add a note in the readme about onProgress and onConversationResponse

pull/50/head^2
Travis Fischer 2022-12-08 03:08:16 -06:00
rodzic 25510460fc
commit 0f995702fb
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -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,