Giter Site home page Giter Site logo

Comments (17)

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


Title: After deploying using cloudflare pages, the DALL plug-in cannot be called

It can be called normally when deployed on vercel. Hasn't vercel been blocked recently? So I deployed it according to the cloudflare deployment tutorial of ChatGPT-Next-Web (
https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/docs/cloudflare-pages-en.md), other plug-ins can be used normally, only the DALL plug-in cannot be used, and the environment variables have also been added. R2 parameter, no file is written to R2, I hope someone can solve it, thank you!
image
image

from chatgpt-next-web-langchain.

Hk-Gosuto avatar Hk-Gosuto commented on September 25, 2024

vercel 被墙的问题可以尝试解析域名到 76.223.126.88,cf 的问题晚些我会去尝试复现一下。

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


For the problem of vercel being blocked, you can try to resolve the domain name to 76.223.126.88. For the cf problem, I will try to reproduce it later.

from chatgpt-next-web-langchain.

happychos avatar happychos commented on September 25, 2024

@Hk-Gosuto 非常感谢!我之前是vercel部署完后按照vercel域名设置提示在cloudflare用CNAME记录,墙之前可以正常使用。如果解析域名76.223.126.88是不是添加A记录,我试过了还是不行呢,是不是需要vercel中还需要设置呢?请大佬具体说下可以吗,谢谢!

墙之前是按照vercel提示设置的
image

目前cloudflare是这样设置的,但还是无法使用
image

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Hk-Gosuto Thank you very much! I used to use CNAME records in cloudflare according to the vercel domain name setting prompts after vercel was deployed, and it could be used normally before the wall. If the domain name 76.223.126.88 is resolved, is it necessary to add an A record? I have tried it but it still doesn't work. Do I need to set it up in vercel? Could you please tell me more specifically? Thank you!

Vercel was set up like this before the wall
image

Currently cloudflare is set up like this, but it still cannot be used.
image

from chatgpt-next-web-langchain.

happychos avatar happychos commented on September 25, 2024

@Hk-Gosuto 可能是设置生效需要时间吧,已经可以了,非常感谢!

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Hk-Gosuto Maybe it takes time for the settings to take effect, but it’s ready. Thank you very much!

from chatgpt-next-web-langchain.

Hk-Gosuto avatar Hk-Gosuto commented on September 25, 2024

这个问题应该是 cf 本身运行环境导致的,与该问题类似 https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1436。
暂时没有好的解决方案,我会先在文档中标注该问题。
我在部署期间还发现原项目新增的 webdav 相关功能的运行时配置还会导致部署失败,尽量不要使用 cf 来部署该项目吧。

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


This problem should be caused by the running environment of cf itself, which is similar to this problem ChatGPTNextWeb#1436.
There is no good solution yet, I will mark the problem in the documentation first.
During the deployment, I also found that the runtime configuration of the new webdav-related functions of the original project would also cause deployment failure. Try not to use cf to deploy the project.

from chatgpt-next-web-langchain.

happychos avatar happychos commented on September 25, 2024

@Hk-Gosuto 我是按照nextweb issues反馈的将app/api/cors/[...path]/route.ts最后一行改为export const runtime = 'edge';,可以正常部署最新的项目,webdav功能也有,我没试过能否正常使用,但插件除了DALL都是可以正常使用的,是不是和对route.ts的更改有关系呢,还有我是把R2参数和其他参数一样直接录入到cloudflare中pages部署的环境变量中,这样部署对吗?
cloudflare部署方案如果vercel再被墙作为备用方案应该还可以。

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Hk-Gosuto According to the issues feedback, change the last line of app/api/cors/[...path]/route.ts to export const runtime = 'edge';, the latest project can be deployed normally, and the webdav function is also available. I I have not tried whether it can be used normally, but the plug-ins can be used normally except DALL. Is it related to the changes to route.ts? Also, I entered the R2 parameters directly into the pages deployment in cloudflare like other parameters. environment variables, is this the right way to deploy?

from chatgpt-next-web-langchain.

Hk-Gosuto avatar Hk-Gosuto commented on September 25, 2024

@Hk-Gosuto 我是按照nextweb issues反馈的将app/api/cors/[...path]/route.ts最后一行改为export const runtime = 'edge';,可以正常部署最新的项目,webdav功能也有,我没试过能否正常使用,但插件除了DALL都是可以正常使用的,是不是和对route.ts的更改有关系呢,还有我是把R2参数和其他参数一样直接录入到cloudflare中pages部署的环境变量中,这样部署对吗?

你的配置没有问题,报错是出现在 openai-node 这个包里,dall-e 插件是基于该库实现的。

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Hk-Gosuto I followed the feedback from nextweb issues and changed the last line of app/api/cors/[...path]/route.ts to export const runtime = 'edge';. The latest project, webdav, can be deployed normally. There are also functions. I have not tried whether they can be used normally, but the plug-ins can be used normally except DALL. Is it related to the changes to route.ts? Also, I entered the R2 parameter directly into the same as other parameters. In the environment variables deployed by pages in cloudflare, is this the right way to deploy?

There is no problem with your configuration. The error appears in the openai-node package, and the dall-e plug-in is implemented based on this library.

from chatgpt-next-web-langchain.

Hk-Gosuto avatar Hk-Gosuto commented on September 25, 2024

我用 fetch 重写了 dall-e 插件,该问题应该解决了。
不过还是建议使用 vercel 或 docker 来进行部署,不保证以后增加的插件都可以只在 cf 环境下正常运行。

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


I rewrote the dall-e plugin using fetch and the problem should be solved.
However, it is still recommended to use vercel or docker for deployment. There is no guarantee that plug-ins added in the future can run normally only in the cf environment.

from chatgpt-next-web-langchain.

happychos avatar happychos commented on September 25, 2024

@Hk-Gosuto 已经部署成功了,多谢大佬!

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on September 25, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Hk-Gosuto has been deployed successfully, thank you!

from chatgpt-next-web-langchain.

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.