chatgpt-api
Travis Fischer 2023-02-12 22:53:40 -06:00
rodzic 14fda06562
commit 2bf3c7e1ed
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -104,7 +104,6 @@ console.log(res.text)
You can add streaming via the `onProgress` handler:
```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.', {
// print the partial response as the AI is "typing"
onProgress: (partialResponse) => console.log(partialResponse.text)

Wyświetl plik

@ -10,10 +10,12 @@ import { fetchSSE } from './fetch-sse'
// 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-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)
// const CHATGPT_MODEL = 'text-davinci-003'
const CHATGPT_MODEL = 'text-davinci-003'
const USER_LABEL_DEFAULT = 'User'
const ASSISTANT_LABEL_DEFAULT = 'ChatGPT'