kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: remove reverse proxy URL from demo
rodzic
8af7e8311d
commit
d621fb7c45
|
@ -14,17 +14,22 @@ dotenv.config()
|
|||
* ```
|
||||
*/
|
||||
async function main() {
|
||||
// WARNING: this method will expose your access token to a third-party. Please be
|
||||
// aware of the risks before using this method.
|
||||
const api = new ChatGPTAPI({
|
||||
// rate limit of 15 requests per 15 seconds
|
||||
apiReverseProxyUrl: 'https://chatgpt.pawan.krd/api/completions',
|
||||
// TODO: this is a placeholder URL; there are several available reverse proxies,
|
||||
// but we're not including them here out of an abundance of caution.
|
||||
// More info on proxy servers in Discord: https://discord.gg/v9gERj825w
|
||||
apiReverseProxyUrl: 'https://your-secret-proxy-url.com/completions',
|
||||
|
||||
// change this to an `accessToken` extracted from the ChatGPT site's `https://chat.openai.com/api/auth/session` response
|
||||
apiKey: process.env.OPENAI_ACCESS_TOKEN,
|
||||
completionParams: {
|
||||
// override this depending on the ChatGPT model you want to use
|
||||
// NOTE: if you are on a paid plan, you can't use the free model and vice-versa
|
||||
// model: 'text-davinci-002-render' // free, default model
|
||||
model: 'text-davinci-002-render-paid' // paid, default model
|
||||
// model: 'text-davinci-002-render-sha' // paid, turbo model
|
||||
model: 'text-davinci-002-render-sha' // paid, default model (turbo)
|
||||
// model: 'text-davinci-002-render-paid' // paid, legacy model
|
||||
},
|
||||
debug: false
|
||||
})
|
||||
|
|
|
@ -8,12 +8,6 @@ import * as types from './types'
|
|||
import { fetch } from './fetch'
|
||||
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-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'
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue