Giter Site home page Giter Site logo

Comments (7)

c121914yu avatar c121914yu commented on August 29, 2024 1

应该没啥问题。不是很复杂。那估计是sealos那边有问题,我去他们群里问问

from fastgpt.

c121914yu avatar c121914yu commented on August 29, 2024

你好,这个问题应该是sealos自动签名证书问题。
请问是一开始就报错,还是后续报错?

可以浏览器直接访问: https://tgohwtdlrmer.cloud.sealos.io/openai/v1 看下https有没有错误提示,以及能不能收到响应。

from fastgpt.

Textcat avatar Textcat commented on August 29, 2024

浏览器访问sealos的外部地址,会有以下提示:

你的连接不是专用连接
攻击者可能试图从 ypqbhsfefwuf.cloud.sealos.io 窃取你的信息(例如,密码、消息或信用卡)。
NET::ERR_CERT_AUTHORITY_INVALID
Subject: Kubernetes Ingress Controller Fake Certificate

Issuer: Kubernetes Ingress Controller Fake Certificate

Expires on: 2024年3月29日

Current date: 2023年5月11日

from fastgpt.

c121914yu avatar c121914yu commented on August 29, 2024

可能是证书,没生效。可以去变更下nginx。
点击变更应用,点下更新应用

from fastgpt.

Textcat avatar Textcat commented on August 29, 2024

尝试了但是不行,nginx文件如下,是哪里写错了吗:

user nginx;
worker_processes auto;
worker_rlimit_nofile 51200;

events {
    worker_connections 1024;
}

http {
    resolver 8.8.8.8;
    proxy_ssl_server_name on;

    access_log off;
    server_names_hash_bucket_size 512;
    client_header_buffer_size 64k;
    large_client_header_buffers 4 64k;
    client_max_body_size 50M;

    proxy_connect_timeout       240s;
    proxy_read_timeout          240s;
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;


    server {
        listen 80;
        server_name ypqbhsfefwuf.cloud.sealos.io; # 这个地方替换成 sealos 提供的内容

        location ~ /openai/(.*) {
            # auth check
            if ($http_auth != "auth") { # 安全凭证
                return 403;
            }

            proxy_pass https://api.openai.com/$1$is_args$args;
            proxy_set_header Host api.openai.com;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            # 如果响应是流式的
            proxy_set_header Connection '';
            proxy_http_version 1.1;
            chunked_transfer_encoding off;
            proxy_buffering off;
            proxy_cache off;
            # 如果响应是一般的
            proxy_buffer_size 128k;
            proxy_buffers 4 256k;
            proxy_busy_buffers_size 256k;
        }
    }
}

from fastgpt.

c121914yu avatar c121914yu commented on August 29, 2024

sealos回应已解决。可以尝试下

from fastgpt.

Textcat avatar Textcat commented on August 29, 2024

已经测试过,可以使用了。

from fastgpt.

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.