bard

package
v0.0.0-...-6bcf4b5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bard

type Bard struct {
	Cookie1PSID   string
	Cookie1PSIDTS string
	Cookie1PSIDCC string

	// Timeout in seconds
	TimeoutSnim0e int
	TimeoutQuery  int
	// contains filtered or unexported fields
}

Bard is the main struct for the Bard AI

func New

func New(cookie1psid, cookie1psidts, cookie1psidcc string, l *zerolog.Logger) *Bard

New creates a new Bard AI instance. Cookie is the __Secure-1PSID cookie from Google

func (*Bard) Ask

func (b *Bard) Ask(prompt string) (string, error)

Ask generates a Bard AI response and returns it to the user

func (*Bard) Clear

func (b *Bard) Clear()

Clear clears the bard answer IDs

type Log

type Log struct {
	*zerolog.Logger
}

Log is a wrapper around zerolog.Logger to make it compatible with resty

func (Log) Debugf

func (l Log) Debugf(msg string, args ...interface{})

Debugf implements resty.Logger interface

func (Log) Errorf

func (l Log) Errorf(msg string, args ...interface{})

Errorf implements resty.Logger interface

func (Log) Fatalf

func (l Log) Fatalf(msg string, args ...interface{})

Fatalf implements resty.Logger interface

func (Log) Infof

func (l Log) Infof(msg string, args ...interface{})

Infof implements resty.Logger interface

func (Log) Warnf

func (l Log) Warnf(msg string, args ...interface{})

Warnf implements resty.Logger interface

Jump to

Keyboard shortcuts

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