Giter Club home page Giter Club logo

chatgpt-api's Issues

docker部署后错误

请问通过docker部署之后打开网页提示cannot get/ 如何解决呢?另外docker里面想部署到10000号端口是不可以的吗?

调用接口好像变了

我昨天还能调用,今天就有错了
b'{"message":"fetch failed"}'
{"message":"fetch failed"}
{'message': 'fetch failed'}

访问报错“TypeError: fetch failed”

按照流程进行设置了,遇见报错:
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11413:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fetchSSE (file:///D:/github_project/chatgpt-api/node_modules/chatgpt/build/index.js:46:15) {
cause: Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1540:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:959:8)
}
}
TypeError: fetch failed
}
}

是调用包出现问题吗,是没有走代理导致的问题?

No bypass servers available

报错是为什么
{
"message": "ChatGPT error 500: {"error":"No bypass servers available. please wait 5 mins and try again."}"
}

docker 安装了,怎么进docker,怎么使用docker来调用?

int@kint:~/gpt/chatgpt-api$ ls
catch_error.mjs index.mjs package-lock.json requirements.txt
dockerfile package.json readme.md send_message.mjs

kint@kint:~/gpt/chatgpt-api$ docker build -f ./dockerfile .
[+] Building 30.4s (4/10)
=> [internal] load build definition from dockerfile 0.0s
=> => transferring dockerfile: 307B 0.0s
=> [internal] load .dockerignore 0.0s
[+] Building 30.5s (4/10)
=> [internal] load metadata for docker.io/library/node:18-alpine 9.4s
=> [1/6] FROM docker.io/library/node:18-alpine@sha256:ffc770cdc09c9e83cccd99d663bb6ed56cfaa1bab94baf1b12b626aebeca9c10 21.1s
=> => resolve docker.io/library/node:18-alpine@sha256:ffc770cdc09c9e83cccd99d663bb6ed56cfaa1bab94baf1b12b626aebeca9c10 0.0s
[+] Building 51.0s (11/11) FINISHED
=> [internal] load build definition from dockerfile 0.0s
=> => transferring dockerfile: 307B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 82B 0.0s
=> [internal] load metadata for docker.io/library/node:18-alpine 9.4s
=> [1/6] FROM docker.io/library/node:18-alpine@sha256:ffc770cdc09c9e83cccd99d663bb6ed56cfaa1bab94baf1b12b626aebeca9c10 37.0s
=> => resolve docker.io/library/node:18-alpine@sha256:ffc770cdc09c9e83cccd99d663bb6ed56cfaa1bab94baf1b12b626aebeca9c10 0.0s
=> => sha256:63b65145d645c1250c391b2d16ebe53b3747c295ca8ba2fcb6b0cf064a4dc21c 3.37MB / 3.37MB 34.2s
=> => sha256:f41005eb563ce84e6c742a787d6a598fde273c134e94c90acc6115853a7f8315 47.54MB / 47.54MB 4.0s
=> => sha256:69dcb013f10fed3864b0f9915d6721b09f0c6717e5452ee96e04fde6082322a7 2.35MB / 2.35MB 36.9s
=> => sha256:ffc770cdc09c9e83cccd99d663bb6ed56cfaa1bab94baf1b12b626aebeca9c10 1.43kB / 1.43kB 0.0s
=> => sha256:19eaf41f3b8c2ac2f609ac8103f9246a6a6d46716cdbe49103fdb116e55ff0cc 1.16kB / 1.16kB 0.0s
=> => sha256:f520ad35ba68f1ed1301a5eda87eaa722e468a9fc3a179868a035dc4c5dddaef 6.48kB / 6.48kB 0.0s
=> => sha256:00a00d31565028f3c00c64959dafe4587320e8c99a39982ccda8a8a9ccef7123 449B / 449B 4.3s
=> => extracting sha256:63b65145d645c1250c391b2d16ebe53b3747c295ca8ba2fcb6b0cf064a4dc21c 0.1s
=> => extracting sha256:f41005eb563ce84e6c742a787d6a598fde273c134e94c90acc6115853a7f8315 0.7s
=> => extracting sha256:69dcb013f10fed3864b0f9915d6721b09f0c6717e5452ee96e04fde6082322a7 0.0s
=> => extracting sha256:00a00d31565028f3c00c64959dafe4587320e8c99a39982ccda8a8a9ccef7123 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 402.88kB 0.0s
=> [2/6] RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories 0.3s
=> [3/6] RUN apk add -U tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && apk del tzdata 1.8s
=> [4/6] WORKDIR /app 0.0s
=> [5/6] COPY . . 0.0s
=> [6/6] RUN npm install 2.3s
=> exporting to image 0.2s
=> => exporting layers 0.2s
=> => writing image sha256:fad5e3eb6843a30083dc787d8842f6fb5a929e863fa07d2ee727a1f71e5eb365 0.0s


kint@kint:~/gpt/chatgpt-api$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
fad5e3eb6843 5 seconds ago 209MB

kint@kint:~/gpt/chatgpt-api$ docker run -d -p 3000:3000 fad5e3eb6843
bfeb68b0efd5209b6f09bac14d881978d9107e7c16f094e803796e8594bde1a8

Unexpected non-whitespace character after JSON at position 4

SyntaxError: Unexpected non-whitespace character after JSON at position 4
at JSON.parse ()
at onMessage (file:///home/jxell/chatgpt-api/node_modules/chatgpt/build/index.js:622:47)
at file:///home/jxell/chatgpt-api/node_modules/chatgpt/build/index.js:62:7
at parseEventStreamLine (file:///home/jxell/chatgpt-api/node_modules/eventsource-parser/dist/index.js:73:9)
at Object.feed (file:///home/jxell/chatgpt-api/node_modules/eventsource-parser/dist/index.js:61:7)
at feed (file:///home/jxell/chatgpt-api/node_modules/chatgpt/build/index.js:84:12)
at fetchSSE (file:///home/jxell/chatgpt-api/node_modules/chatgpt/build/index.js:100:7)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Error: File not found.

在Docker中部署,POST get_access_token返回错误的值,这是什么原因导致的?
{
"message": "File not found."
}
Screen Shot 2023-04-28 at 18 23 54

Invalid environment; fetch is not defined

  1. 访问页面显示部署成功
  2. 调用接口时使用POST方法传递了 access_tokenprompt 两个字段,结果提示以下内容
{
    "message": "Invalid environment; fetch is not defined"
}

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.