GithubHelp home page GithubHelp logo

Comments (13)

cuicui-V5 avatar cuicui-V5 commented on May 22, 2024

https://docs.astro.build/zh-cn/guides/deploy/

from chatgpt-demo.

blkcor avatar blkcor commented on May 22, 2024

因为使用vercel部署的 vercel会自动执行一些edge function,dist会作为中间产物生成,最终会生成一个vercel目录

from chatgpt-demo.

hieiip1203 avatar hieiip1203 commented on May 22, 2024

我没成功

from chatgpt-demo.

ninvfeng avatar ninvfeng commented on May 22, 2024

本地build可以看这个
https://docs.astro.build/zh-cn/guides/integrations-guide/node/

安装
npx astro add node
npm install @astrojs/node

启动
node ./dist/server/entry.mjs

from chatgpt-demo.

ninvfeng avatar ninvfeng commented on May 22, 2024

直接build静态文件好像是不行的

from chatgpt-demo.

lxxxv5 avatar lxxxv5 commented on May 22, 2024

本地build可以看这个 https://docs.astro.build/zh-cn/guides/integrations-guide/node/

安装 npx astro add node npm install @astrojs/node

启动 node ./dist/server/entry.mjs

本地启动后开始对话,看到 /api/generate 接口一直在 pending 是怎么回事啊

from chatgpt-demo.

appsdog avatar appsdog commented on May 22, 2024

在centos上部署很复杂啊。

设置和安装依赖项npm i
制作一个副本.env.example,然后将其重命名为.env

添加到.env OPENAI_API_KEY=sk-xxx...
运行应用 npm run dev

这四步成功了,打开网站,403

from chatgpt-demo.

ninvfeng avatar ninvfeng commented on May 22, 2024

本地build可以看这个 https://docs.astro.build/zh-cn/guides/integrations-guide/node/
安装 npx astro add node npm install @astrojs/node
启动 node ./dist/server/entry.mjs

本地启动后开始对话,看到 /api/generate 接口一直在 pending 是怎么回事啊

估计是接口地址被屏蔽了 curl https://api.openai.com 看下, 如果一直pending就是被qiang了

from chatgpt-demo.

super6wenzi avatar super6wenzi commented on May 22, 2024

本地build可以看这个 https://docs.astro.build/zh-cn/guides/integrations-guide/node/
安装 npx astro add node npm install @astrojs/node
启动 node ./dist/server/entry.mjs

本地启动后开始对话,看到 /api/generate 接口一直在 pending 是怎么回事啊

估计是接口地址被屏蔽了 curl https://api.openai.com 看下, 如果一直pending就是被qiang了

被墙了怎么处理呢

from chatgpt-demo.

ninvfeng avatar ninvfeng commented on May 22, 2024

本地build可以看这个 https://docs.astro.build/zh-cn/guides/integrations-guide/node/
安装 npx astro add node npm install @astrojs/node
启动 node ./dist/server/entry.mjs

本地启动后开始对话,看到 /api/generate 接口一直在 pending 是怎么回事啊

估计是接口地址被屏蔽了 curl https://api.openai.com 看下, 如果一直pending就是被qiang了

被墙了怎么处理呢

最简单的, 按本项目推荐的部署方式直接用Vercel, 我选的是香港地区, 填个key就能用, 方便得很

from chatgpt-demo.

ddiu8081 avatar ddiu8081 commented on May 22, 2024

现在默认的 build 模式已经改为了 node,可以 build 后使用 node ./dist/server/entry.mjs 运行。

from chatgpt-demo.

ddiu8081 avatar ddiu8081 commented on May 22, 2024

本地build可以看这个 https://docs.astro.build/zh-cn/guides/integrations-guide/node/
安装 npx astro add node npm install @astrojs/node
启动 node ./dist/server/entry.mjs

本地启动后开始对话,看到 /api/generate 接口一直在 pending 是怎么回事啊

估计是接口地址被屏蔽了 curl https://api.openai.com 看下, 如果一直pending就是被qiang了

被墙了怎么处理呢

本地运行的话,可以使用 HTTPS_PROXY 变量,为 OpenAI 接口指定一个 HTTP 代理。

from chatgpt-demo.

web256 avatar web256 commented on May 22, 2024

HOST=0.0.0.0 PORT=80 node ./dist/server/entry.mjs
访问 /api/generate 接口 500 这个错误日志在哪看?

npm run dev 正常
node 执行就失败

from chatgpt-demo.

Related Issues (20)

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.