Versions in this module Expand all Collapse all v0 v0.1.0 Nov 5, 2023 Changes in this version + const ModelBard + func ListModels() []string + type Answer struct + Choices []Choice + Code string + Content string + ConversationID string + FactualityQueries []any + Images []any + Links []string + ProgramLang string + ResponseID string + StatusCode int + TextQuery string + func (a *Answer) ToChatCompletionResponse() llm.ChatCompletionResponse + func (a *Answer) ToChatCompletionStreamResponse() llm.ChatCompletionStreamResponse + type Bard struct + func New(token string, dao llm.Dao, opts ...ClientOption) (*Bard, error) + func (b *Bard) CreateConversation(ctx context.Context, name string) (llm.Conversation, error) + func (b *Bard) CreateMessage(ctx context.Context, conversationId string, req llm.ChatCompletionRequest) (llm.Message, error) + func (b *Bard) CreateMessageStream(ctx context.Context, conversationId string, req llm.ChatCompletionRequest, ...) + type Choice struct + Content string + ID string + type Client struct + func NewClient(token string, opts ...ClientOption) (*Client, error) + func (c *Client) Ask(prompt, conversationID, responseID, choiceID string, reqID int) (*Answer, error) + func (c *Client) CreateChatCompletion(ctx context.Context, req llm.ChatCompletionRequest) (llm.ChatCompletionResponse, error) + func (c *Client) CreateChatCompletionStream(ctx context.Context, req llm.ChatCompletionRequest, ...) + func (c *Client) FirstAsk(prompt string) (*Answer, error) + func (c *Client) ListModels() []string + type ClientOption func(*Client) + func WithCookies(cookies map[string]string) ClientOption + func WithTimeout(timeout time.Duration) ClientOption