transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
MIT License
16.07k stars 2.11k forks source link

has no exported member 'ChatGPTUnofficialProxyAPI' #614

Closed owen2345 closed 10 months ago

owen2345 commented 10 months ago

Verify latest release

Verify webapp is working

Environment details

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"
  }
}

Describe the Bug

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'

I am importing the wrong package?