Closed owen2345 closed 10 months ago
chatgpt
Docker ubuntu Node 18
My package:
{ "dependencies": { "chatgpt": "^3.3.4", "dotenv": "^14.2.0", "matrix-bot-sdk": "^0.6.2", "puppeteer": "^19.4.1", "tsx": "^3.13.0", "typescript": "^4.5.2" } }
I am tying the simple example from readme:
import { ChatGPTUnofficialProxyAPI } from 'chatgpt' async function example() { const api = new ChatGPTUnofficialProxyAPI({ accessToken: process.env.OPENAI_ACCESS_TOKEN }) const res = await api.sendMessage('Hello World!') console.log(res.text) }
Then when running: ts-node sample.ts I got Module '"chatgpt"' has no exported member 'ChatGPTUnofficialProxyAPI'
ts-node sample.ts
Module '"chatgpt"' has no exported member 'ChatGPTUnofficialProxyAPI'
I am importing the wrong package?
Verify latest release
chatgpt
releaseVerify webapp is working
Environment details
Docker ubuntu Node 18
My package:
Describe the Bug
I am tying the simple example from readme:
Then when running:
ts-node sample.ts
I gotModule '"chatgpt"' has no exported member 'ChatGPTUnofficialProxyAPI'
I am importing the wrong package?