Chanzhaoyu / chatgpt-web

用 Express 和 Vue3 搭建的 ChatGPT 演示网页
MIT License
31.52k stars 11.22k forks source link

Help, i can't run your code #878

Closed mmoktl2k8 closed 1 year ago

mmoktl2k8 commented 1 year ago

Dear @Chanzhaoyu,

I changed my API but not run, nomarl port also port 3002. Localhots the same, please help me :)

1

![1](https://user-images.git Ảnh màn hình 2023-03-25 lúc 12 50 27

Many Thanks BR,

weifeng12x commented 1 year ago

well, you can comment out unused nodes, here is an example

      # 二选一
      OPENAI_API_KEY: sk-rx
      # 二选一
      #OPENAI_ACCESS_TOKEN: xxx
      # API接口地址,可选,设置 OPENAI_API_KEY 时可用
      #OPENAI_API_BASE_URL: xxx
      # API模型,可选,设置 OPENAI_API_KEY 时可用
      OPENAI_API_MODEL: gpt4
      # 反向代理,可选
      #API_REVERSE_PROXY: xxx
      # 访问权限密钥,可选
      AUTH_SECRET_KEY: YourSecretKey
      # 每小时最大请求次数,可选,默认无限
      MAX_REQUEST_PER_HOUR: 2000
      # 超时,单位毫秒,可选
      TIMEOUT_MS: 60000
      # Socks代理,可选,和 SOCKS_PROXY_PORT 一起时生效
      #SOCKS_PROXY_HOST: xxx
      # Socks代理端口,可选,和 SOCKS_PROXY_HOST 一起时生效
      #SOCKS_PROXY_PORT: xxx
      # HTTPS 代理,可选,支持 http,https,socks5
      #HTTPS_PROXY: http://xxx:7890
Chanzhaoyu commented 1 year ago
  1. You exposed your key, so I deleted the picture.
  2. Is this GitHub Pages?
  3. Have you tried to run locally?
Chanzhaoyu commented 1 year ago

GitHub Pages is not applicable to this project.

mmoktl2k8 commented 1 year ago
  1. You exposed your key, so I deleted the picture.
  2. Is this GitHub Pages?
  3. Have you tried to run locally?

I also can't run locally. Maybe i unclear about Vue, i'm newcomer, please Admin, thanks :)

Chanzhaoyu commented 1 year ago
  1. 根目录 pnpm bootstrap
  2. service 目录 pnpm install
  3. service/.env.example 修改为 service/.env
  4. 填入你的 key
  5. 根目录运行 pnpm dev
  6. service 运行 pnpm start
  7. 打开 http://loclhost:1002

你试试本地是否可行?

Chanzhaoyu commented 1 year ago
  1. root directory run pnpm bootstrap

  2. service directory run pnpm install

  3. service/.env.example modified to service/.env

  4. enter your key

  5. root directory run pnpm dev

  6. service directory run pnpm start

  7. open http://loclhost:1002/

Do you want to try it locally?

Chanzhaoyu commented 1 year ago

If you really can't, you can try Railway.

bjgdtc commented 1 year ago

Changing the network, I have the same problem as you. Mobile phone access is OK, computer end is always not good, finally my computer closed agent access immediately normal.

assassinliujie commented 1 year ago

If you really can't, you can try Railway. openai会ban railway部署的号了,要不支持一下别的平台比如cloudflare的或者aws的apprunner

weekyweeky commented 1 year ago

i can run it locally until yesterday , it shows fetch failed and there is UND_ERR_CONNECT_TIMEOUT in terminal today . how can i solve it

mmoktl2k8 commented 1 year ago

railway

But my account Github and Railway not verifed, please help me solutions, many thanks :)

mmoktl2k8 commented 1 year ago

But my account Github and Railway not verifed, please help me solutions, many thanks :)

mmoktl2k8 commented 1 year ago

please help me

assassinliujie commented 1 year ago

what's your server system version. have you tried docker-compose?