kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
chatgpt-api
rodzic
14fda06562
commit
2bf3c7e1ed
|
@ -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)
|
||||
|
|
|
@ -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'
|
||||
|
|
Ładowanie…
Reference in New Issue