A collection of Go code for handling Bing chat bot, Bard chat bot, and Bing Image creator API.
This project provides Go code for handling Bing chat bot, Bard chat bot, and Bing Image creator API. It offers functionality to interact with these services and can be used as a starting point for developing chat bots and working with Bing Image creation.
- Integration with Bing chat bot
- Integration with Bard chat bot
- Utilization of Bing Image creator API
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/agreyfox/bardapi.git
-
Install Go and set up your Go environment. Refer to the official Go documentation for instructions.
-
Install the project dependencies:
go get -u ./...
-
Configure the necessary cookie information by following the instructions
Project | Cookie Name | Value Example |
---|---|---|
bard | __Secure-1PSID | XAhS5XJUzxxxxxxxx |
bing | all cookies | Use "Cookie Editor" to save cookies to JSON file |
Bing Image Creator | _U | 1uAhsjMwUpAXXXXXXXXXXXXXXXXXX |
.
Here are test examples of how to use the code:
func TestNewBingImageClient(t *testing.T) {
bi, _ := NewImageGen(Cookie_U, false, "test.log")
img, err := bi.GetImages("Film still of an elderly wise yellow man playing chess, medium shot, mid-shot")
if err != nil {
t.Errorf("error %s", err)
}
for _, item := range img {
t.Logf(item)
}
bi.MakeThumbnail(true)
bi.SaveImages(img, ".", "img")
}
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
Please make sure to follow the code of conduct in all your interactions with the project.
If you have any questions or need assistance, please reach out to e_raeb@yahoo.com.