/bard-sdk-go

Google Bard API SDK for Go

Primary LanguageGo

Google Bard SDK for Go

Based on these GitHub Repository

Installation

go get github.com/islu/bard-sdk-go

Authentication

  1. Go to https://bard.google.com
  2. F12 for console
  3. Session: Application → Cookies → Copy the value of __Secure-1PSID cookie.

Usage

Simple Usage

package main

import "github.com/islu/bard-sdk-go/bard"

func main() {
    bot, err := bard.NewChatbot("BARD_API_KEY")
    if err != nil {
        // log.Fatalln(err)
        return
    }
    response := bot.Ask("your prompt")
}