Giter Club home page Giter Club logo

openai-chatgpt's Introduction

openai-chatgpt

Example usage

Install

$ npm install --global openai-chatgpt

CLI

$ openai-chatgpt --help

  Usage
    $ openai-chatgpt

  Options
    --reset  Reset Openai API Key

  Examples
    $ openai-chatgpt --reset

This readme is automatically generated by create-ink-app

openai-chatgpt's People

Contributors

gmpetrov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openai-chatgpt's Issues

Error: Model does not exist

Seems like the model has been patched:

โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
[ERROR] ChatGPTError: ChatGPT error 404: {
    "error": {
        "message": "That model does not exist",
        "type": "invalid_request_error",
        "param": null,
        "code": null
    }
}

    at file:///Users/braden/Library/pnpm/global/5/.pnpm/[email protected]/node_modules/chatgpt/build/index.js:202:29
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 404,
  statusText: 'Not Found',
  [cause]: Response {
    [Symbol(realm)]: null,
    [Symbol(state)]: {
      aborted: false,
      rangeRequested: false,
      timingAllowPassed: true,
      requestIncludesCredentials: true,
      type: 'default',
      status: 404,
      timingInfo: [Object],
      cacheState: '',
      statusText: 'Not Found',
      headersList: [HeadersList],
      urlList: [Array],
      body: [Object]
    },
    [Symbol(headers)]: HeadersList {
      [Symbol(headers map)]: [Map],
      [Symbol(headers map sorted)]: null
    }
  }
}

SyntaxError: Unexpected token '.'

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/mnt/c/Users/DELL/AppData/Roaming/npm/node_modules/openai-chatgpt/dist/cli.js:10:31)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

I keep getting this error for quite a few of my queries

[ERROR] TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:12789:11)
at async file:///opt/homebrew/lib/node_modules/openai-chatgpt/node_modules/chatgpt/build/index.js:193:25 {
cause: HeadersTimeoutError: Headers Timeout Error
at Timeout.onParserTimeout [as _onTimeout] (node:internal/deps/undici/undici:9457:32)
at listOnTimeout (node:internal/timers:570:11)
at process.processTimers (node:internal/timers:511:7) {
code: 'UND_ERR_HEADERS_TIMEOUT'
}
}

Error: Invalid environment: global fetch not defined

[ERROR] Error: Invalid environment: global fetch not defined at file:///usr/local/lib/node_modules/openai-chatgpt/node_modules/chatgpt/build/index.js:15:9 at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:385:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) at async sendMessage (/usr/local/lib/node_modules/openai-chatgpt/dist/utils/send-message.js:11:32) at async /usr/local/lib/node_modules/openai-chatgpt/dist/components/App.js:87:25

FetchError: request failed, getaddrinfo ENOTFOUND

Hello, I'm using the unofficial free API using the access token I got from chatGPT: https://chat.openai.com/api/auth/session
However I get this ENOTFOUND error.

node version: v16.13.2

[ERROR] FetchError: request to https://chat.duti.tech/api/conversation failed, reason: getaddrinfo ENOTFOUND chat.duti.tech
    at ClientRequest.<anonymous> (file:///usr/lib/node_modules/openai-chatgpt/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:402:35)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  erroredSysCall: 'getaddrinfo'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.