Versions in this module Expand all Collapse all v0 v0.6.2 Mar 12, 2024 v0.6.1 Mar 11, 2024 Changes in this version + const ApiBaseUrl + const ApiVersion + const ChatMessageRoleAssistant + const ChatMessageRoleSystem + const ChatMessageRoleUser + type Candidate struct + Content Content + FinishReason string + Index int + SafetyRatings []SafetyRating + type Client struct + ApiBaseUrl string + ApiKey string + ApiVersion string + Model string + SafetySettings []SafetySetting + func NewClient(key string) *Client + func (c *Client) CreateChatCompletion(contents []Content) (*ResponseBody, error) + func (c *Client) CreateImageCompletion(contents []Content) (*ResponseBody, error) + type Content struct + Parts []Part + Role string + type Error struct + Code int + Message string + Status string + type InlineData struct + Data string + MimeType string + type Part struct + InlineData InlineData + Text string + type RequestBody struct + Contents []Content + SafetySettings []SafetySetting + type ResponseBody struct + Candidates []Candidate + Error Error + PromptFeedback struct{ ... } + type SafetyRating struct + Category string + Probability string + type SafetySetting struct + Category string + Threshold string