Skip to content

heartalborada-del/newbingAPI

Repository files navigation

newBing API

这是一个newBing API的Java实现

CodeQL CommitActivity issues license

目前请先将 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(or you can set it empty)",
                "Set new bing mode(Creative/Balanced/Precise)"
        ).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

MavenCentralVersion

About

一个能用但不多的newBingAPI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages