bardapi

module
v0.0.0-...-02b0d32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: MIT

README

AI Bot Unofficial API

License

A collection of Go code for handling Bing chat bot, Bard chat bot, and Bing Image creator API.

Table of Contents

Overview

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.

Features

  • Integration with Bing chat bot
  • Integration with Bard chat bot
  • Utilization of Bing Image creator API

Getting Started

To get started with the project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/agreyfox/bardapi.git
    
  2. Install Go and set up your Go environment. Refer to the official Go documentation for instructions.

  3. Install the project dependencies:

    go get -u ./...
    
  4. 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

.

Usage

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")
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

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.

Support

If you have any questions or need assistance, please reach out to e_raeb@yahoo.com.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL