hackingwu
V2EX  ›  微信

微信小程序可以实现类似 chatgpt 那样的流式请求吗

  •  
  •   hackingwu · Mar 27, 2023 · 1788 views
    This topic created in 1173 days ago, the information mentioned may be changed or developed.

    在微信小程序中对接 openai ,怎么实现打字机的那种效果,不用等结果一次性返回。而是读取响应流呢

    5 replies    2023-03-27 20:34:42 +08:00
    uplee
        1
    uplee  
       Mar 27, 2023
    可以,websocket 或者 chunk 流
    em70
        2
    em70  
       Mar 27, 2023
    chatgpt 用的就是 h5 实现,小程序也可以用 h5
    hackingwu
        3
    hackingwu  
    OP
       Mar 27, 2023
    @uplee 我试过 chunk 好像不行
    hackingwu
        4
    hackingwu  
    OP
       Mar 27, 2023
    @em70 h5 会提示 继续访问
    em70
        5
    em70  
       Mar 27, 2023
    @hackingwu 什么继续访问啊,我们小程序+H5 都跑了几个月了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2952 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 10:52 · PVG 18:52 · LAX 03:52 · JFK 06:52
    ♥ Do have faith in what you're doing.