Commit 19966aae authored by jwgatt's avatar jwgatt

update authclass

parent 5ff31917
import dotenv from 'dotenv-safe'
import { oraPromise } from 'ora'
import { ChatGPTAPI, getOpenAIAuth } from '../src'
import { ChatGPTAPIBrowser } from '../src'
dotenv.config()
......@@ -16,12 +16,12 @@ async function main() {
const email = process.env.OPENAI_EMAIL
const password = process.env.OPENAI_PASSWORD
const authInfo = await getOpenAIAuth({
const api = new ChatGPTAPIBrowser({
email,
password
password,
debug: false,
minimize: true
})
const api = new ChatGPTAPI({ ...authInfo })
await api.initSession()
const prompt = 'Write a poem about cats.'
......
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