V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
sardina
V2EX  ›  分享创造

用 Golang 写了一个 Bing Ai Chat Sdk,欢迎试用😊

  •  
  •   sardina · 2023-04-22 00:17:43 +08:00 · 1223 次点击
    这是一个创建于 372 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Github 地址: https://github.com/labulakalia/bingchat

    首先要有一个 Bing Ai 的权限,并且可以连接,否则需要先设置http_proxy或者https_proxy

    使用示例

    ➜ ./bingchat -c cookies.json
    local http proxy is set
    Bing Ai Chat Copilot
    /reset [styles]
          1  more create
          2  more balance
          3  more precise
    /quit
      quit
    /help
      print help
    Current Style: Balance 
    Ask> hello
    Hello! How can I help you today? 😊
    Prompt suggest
    1: What is the weather like today?
    2: What is the latest news?
    3: Can you tell me a joke?
    Ask> 2
    Here are some of the latest news sources you can check out:
    - [The Guardian]( https://www.theguardian.com/world)
    - [NBC News]( https://www.nbcnews.com/latest-stories)
    - [RTÉ News]( https://www.rte.ie/news/)
    
    Which one would you like to check out?
    Prompt suggest
    1: What is the latest news on politics?
    2: What is the latest news on sports?
    3: What is the latest news on entertainment?
    Ask> /reset 1
    Switch Style Create
    Ask> 
    
    

    欢迎 Star/PR

    billzhuang
        1
    billzhuang  
       2023-04-22 09:58:45 +08:00 via iPhone
    bing ai 的 api 在哪儿?
    sardina
        2
    sardina  
    OP
       2023-04-22 10:46:57 +08:00 via iPhone
    @billzhuang 没有 api ,爬网页的接口,需要自已导出 bing.com 的 cookie 来使用
    sardina
        3
    sardina  
    OP
       2023-04-22 15:00:57 +08:00
    修复了会话被 bing 关闭后,不能继续发消息的 bug
    laizenan
        4
    laizenan  
       2023-04-24 13:58:12 +08:00
    有点像 EdgeGPT ,用 js 写了个类似的( https://github.com/lonelam/EdgeGPTJs) 主要的痛点在于手动导出 cookie 的步骤过于复杂,对用户不友好。如果能封装一个页面,然后手动拿 cookie ,会不会更好用。
    sardina
        5
    sardina  
    OP
       2023-04-24 23:31:56 +08:00
    @laizenan 确实挺复杂的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3299 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:29 · PVG 19:29 · LAX 04:29 · JFK 07:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.