kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/330/head
rodzic
0f0c12e275
commit
34c886b5c4
|
@ -104,7 +104,6 @@ console.log(res.text)
|
||||||
You can add streaming via the `onProgress` handler:
|
You can add streaming via the `onProgress` handler:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// timeout after 2 minutes (which will also abort the underlying HTTP request)
|
|
||||||
const res = await api.sendMessage('Write a 500 word essay on frogs.', {
|
const res = await api.sendMessage('Write a 500 word essay on frogs.', {
|
||||||
// print the partial response as the AI is "typing"
|
// print the partial response as the AI is "typing"
|
||||||
onProgress: (partialResponse) => console.log(partialResponse.text)
|
onProgress: (partialResponse) => console.log(partialResponse.text)
|
||||||
|
|
|
@ -10,10 +10,12 @@ import { fetchSSE } from './fetch-sse'
|
||||||
|
|
||||||
// NOTE: this is not a public model, but it was leaked by the ChatGPT webapp.
|
// NOTE: this is not a public model, but it was leaked by the ChatGPT webapp.
|
||||||
// const CHATGPT_MODEL = 'text-chat-davinci-002-20230126'
|
// const CHATGPT_MODEL = 'text-chat-davinci-002-20230126'
|
||||||
const CHATGPT_MODEL = 'text-chat-davinci-002-20221122'
|
// const CHATGPT_MODEL = 'text-chat-davinci-002-20221122'
|
||||||
|
// const CHATGPT_MODEL = 'text-chat-davinci-002-sensitive-20230126'
|
||||||
|
// const CHATGPT_MODEL = 'text-chat-davinci-002-sh-alpha-aoruigiofdj83'
|
||||||
|
|
||||||
// Official model (costs money and is not fine-tuned for chat)
|
// Official model (costs money and is not fine-tuned for chat)
|
||||||
// const CHATGPT_MODEL = 'text-davinci-003'
|
const CHATGPT_MODEL = 'text-davinci-003'
|
||||||
|
|
||||||
const USER_LABEL_DEFAULT = 'User'
|
const USER_LABEL_DEFAULT = 'User'
|
||||||
const ASSISTANT_LABEL_DEFAULT = 'ChatGPT'
|
const ASSISTANT_LABEL_DEFAULT = 'ChatGPT'
|
||||||
|
|
Ładowanie…
Reference in New Issue