Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Answer ¶ added in v0.0.18
type Answer struct {
Content string
ConversationID string
ResponseID string
FactualityQueries []any
TextQuery string
Choices []Choice
Links []string
Images []any
ProgramLang string
Code string
StatusCode int
}
BardAnswer represents the response from the Bard AI service. It contains the generated text content, conversation ID, response ID, factuality queries, original text query, and any choices provided.
type Choice ¶
type Choice struct {
// ID is a unique identifier for the choice.
ID string
// Content is the text content of the choice.
Content string
}
Choice represents an alternative response option provided by Bard.
type Client ¶ added in v0.0.18
type Client struct {
// contains filtered or unexported fields
}
func NewBardClient ¶
func NewBardClient(token string, opts ...ClientOption) (*Client, error)
type ClientOption ¶ added in v0.0.18
type ClientOption func(*Client)
func WithCookies ¶
func WithCookies(cookies map[string]string) ClientOption
func WithSession ¶
func WithSession(session *http.Client) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
Click to show internal directories.
Click to hide internal directories.