MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    newBingAPI——随手搓的newBing的API

    其他项目发布
    1
    1
    138
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      heartalborada-del last edited by

      项目地址
      代码写的很烂,欢迎大佬pr!

      newBing API

      这是一个newBing API的Java实现

      Commit activity

      目前请先将 byPassCN 设置成 false

      How to use it

      <dependency>
          <groupId>io.github.heartalborada-del</groupId>
          <artifactId>newBingAPI</artifactId>
          <version>latest</version>
      </dependency>
      
      import io.github.heartalborada_del.newBingAPI.interfaces.Callback;
      import com.google.gson.JsonObject;
      
      public class Main {
          public static void main(String[] args) {
              new Chat(
                      "Your cookies",
                      false
              ).newChat().newQuestion("Your question", new Callback() {
                  @Override
                  public void onSuccess(JsonObject rawData) {
                      //TODO
                  }
      
                  @Override
                  public void onFailure(JsonObject rawData, String cause) {
                      //TODO
                  }
                  @Override
                  public void onUpdate(JsonObject rawData){
                      //TODO
                  }
              });
          }
      }
      

      Version

      Maven central version

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact