Git Product home page Git Product logo

Comments (11)

colin4k avatar colin4k commented on August 17, 2024 1

openai-proxy,可以通过腾讯云函数部署

@colin4k 老哥你那有免费的代理,或者部署代码的方法吗?我自己测一下

from writely.

colin4k avatar colin4k commented on August 17, 2024 1

@colin4k 你那里如何了

因为腾讯云之前玩欠费了,我今天试了下用 cloudflare 部署了一个代理,是没问题的 image

https://github.com/fuergaosi233/openai-proxy 用的这个项目部署的

谢谢关注,在cloudflare上重新部署代理之后ok了

from writely.

anc95 avatar anc95 commented on August 17, 2024

谢谢,我看一看

from writely.

colin4k avatar colin4k commented on August 17, 2024

看了一下插件管理的错误日志,貌似在实际使用时自定义的url不生效,报网络连接错误

from writely.

anc95 avatar anc95 commented on August 17, 2024

@colin4k 我怀疑可能是跨域错误,你试试给你的 API 代理设置一下允许跨域头试一试

from writely.

colin4k avatar colin4k commented on August 17, 2024

@colin4k 我怀疑可能是跨域错误,你试试给你的 API 代理设置一下允许跨域头试一试

大概知道是什么原因了,因为我的api proxy不支持https,在访问https的网页并使用插件时会先出现以下错误:
Mixed Content: The page at 'https://baijiahao.baidu.com/s?id=1760848053589375628' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://xxx.xxx.xxx/v1/chat/completions'. This request has been blocked; the content must be served over HTTPS.
然后再报一个网络连接错误。这个有办法可以支持吗?

from writely.

colin4k avatar colin4k commented on August 17, 2024

还是不行,特地尝试了一个http的网页,还是报以下错误
Uncaught (in promise) Error: Network Error
dist/content/index.js:70284 (匿名函数)

var require_createError = __commonJS({
  "node_modules/axios/lib/core/createError.js"(exports, module2) {
    "use strict";
    var enhanceError = require_enhanceError();
    module2.exports = function createError(message2, config2, code, request3, response) {
      ==var error3 = new Error(message2);==
      return enhanceError(error3, config2, code, request3, response);
    };
  }

from writely.

anc95 avatar anc95 commented on August 17, 2024

@colin4k 老哥你那有免费的代理,或者部署代码的方法吗?我自己测一下

from writely.

anc95 avatar anc95 commented on August 17, 2024

我估计还是跨域等原因(毕竟在 options 页面里你是可以访问的呢

其中一个方式是,通过 backrgound.js 代理下请求,应该是可以解决跨域问题
https://developer.chrome.com/docs/extensions/mv3/xhr/#xhr-vs-content-scripts

from writely.

colin4k avatar colin4k commented on August 17, 2024

我估计还是跨域等原因(毕竟在 options 页面里你是可以访问的呢

其中一个方式是,通过 backrgound.js 代理下请求,应该是可以解决跨域问题 https://developer.chrome.com/docs/extensions/mv3/xhr/#xhr-vs-content-scripts

好的,我试试,谢谢。

from writely.

anc95 avatar anc95 commented on August 17, 2024

@colin4k 你那里如何了

因为腾讯云之前玩欠费了,我今天试了下用 cloudflare 部署了一个代理,是没问题的
image

https://github.com/fuergaosi233/openai-proxy 用的这个项目部署的

from writely.

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.