V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
dartabe
V2EX  ›  程序员

用 Vercel 的 Serverless function 转发 Gemini API 的流式数据遇到的一点问题

  •  
  •   dartabe · 45 天前 · 824 次点击
    这是一个创建于 45 天前的主题,其中的信息可能已经有所发展或是发生改变。

    普通的 code 用 Node.js runtime 无法产生流式输出

    改成 Edge runtime 然后返回 new ReadableStream 就可以了

    Debug 好久 chatGPT 这时候 debug 就不靠谱了

    当然只是用在自己的 toy project

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1842 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:41 · PVG 08:41 · LAX 17:41 · JFK 20:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.