V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
woshipanghu
V2EX  ›  OpenAI

分享下 2 个可行的 openai proxy 支持 SSE

  •  
  •   woshipanghu · Mar 12, 2023 · 2018 views
    This topic created in 1142 days ago, the information mentioned may be changed or developed.

    需要部署到自己的服务器

    云函数基本都不支持 SSE

    https://github.com/x-dr/chatgptProxyAPI

    https://github.com/nangcr/chatgpt-aws-proxy

    用的是 nginx 服务器的话 还需要设置下缓存

    serve{ gzip off; location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_buffer_size 1k; } }

    现在是积累很多个字之后,前端就会读取到

    想实现一个字一个字返回的现在 还在研究 应该就是 nginx 上的 buffer 需要设置继续研究

    Supplement 1  ·  Mar 13, 2023
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5651 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 01:32 · PVG 09:32 · LAX 18:32 · JFK 21:32
    ♥ Do have faith in what you're doing.