Commit 0f995702 authored by Travis Fischer's avatar Travis Fischer

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

parent 25510460
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment