agentic
agentic copied to clipboard
getting 401 with `new ChatGPTAPIBrowser({ ...openAIAuth })`
Verify latest release
- [X] I verified that the issue exists in the latest
chatgpt
release
Verify webapp is working
- [X] I verify that the ChatGPT webapp is working properly for this account.
Environment details
Describe the Bug
// index.js
import { ChatGPTAPIBrowser, getOpenAIAuth } from 'chatgpt'
import * as dotenv from 'dotenv'
dotenv.config()
const demo = async () => {
const openAIAuth = await getOpenAIAuth({
email: process.env.OPENAI_EMAIL,
password: process.env.OPENAI_PASSWORD,
})
const api = new ChatGPTAPIBrowser({ ...openAIAuth })
await api.initSession()
}
demo()
i just run this demo by Node
node index.js
after then, I've actually logged in to the automatically open chrome
but the terminal threw the following error
Did I use something wrong?