Versions in this module Expand all Collapse all v0 v0.2.9 Dec 3, 2026 Changes in this version + func IncludeThoughts(req *GenerateContentRequest) bool + func NewStreamConverter(body io.ReadCloser, model string, opts ResponseOptions) io.ReadCloser + func ToChatRequest(req *GenerateContentRequest, model string, stream bool) (*core.ChatRequest, error) + type Blob struct + Data string + MimeType string + MimeTypeAlt string + type Candidate struct + Content ResponseContent + FinishReason string + Index int + type Content struct + Parts []Part + Role string + type ErrorObject struct + Code int + Message string + Status string + type ErrorResponse struct + Error ErrorObject + func ErrorFromGateway(err *core.GatewayError) (int, ErrorResponse) + func NewErrorResponse(status int, message string) ErrorResponse + type FunctionCall struct + Args json.RawMessage + ID string + Name string + type FunctionCallingConfig struct + AllowedFunctionNames []string + AllowedFunctionNamesAlt []string + Mode string + type FunctionDeclaration struct + Description string + Name string + Parameters json.RawMessage + ParametersJSONSchema json.RawMessage + ParametersJSONSchemaAlt json.RawMessage + type FunctionResponse struct + ID string + Name string + Parts json.RawMessage + Response json.RawMessage + type GenerateContentRequest struct + CachedContent string + CachedContentAlt string + Contents []Content + GenerationConfig *GenerationConfig + GenerationConfigAlt *GenerationConfig + SafetySettings json.RawMessage + SafetySettingsAlt json.RawMessage + Store *bool + SystemInstruction *Content + SystemInstructionAlt *Content + ToolConfig *ToolConfig + ToolConfigAlt *ToolConfig + Tools []Tool + func DecodeGenerateContentRequest(body []byte) (*GenerateContentRequest, error) + type GenerateContentResponse struct + Candidates []Candidate + ModelVersion string + ResponseID string + UsageMetadata *UsageMetadata + func FromChatResponse(resp *core.ChatResponse, opts ResponseOptions) *GenerateContentResponse + type GenerationConfig struct + CandidateCount *int + CandidateCountAlt *int + FrequencyPenalty *float64 + FrequencyPenaltyAlt *float64 + MaxOutputTokens *int + MaxOutputTokensAlt *int + PresencePenalty *float64 + PresencePenaltyAlt *float64 + ResponseJSONSchema json.RawMessage + ResponseJSONSchemaAlt json.RawMessage + ResponseMimeType string + ResponseMimeTypeAlt string + ResponseModalities []string + ResponseModalitiesAlt []string + ResponseSchema json.RawMessage + ResponseSchemaAlt json.RawMessage + Seed *int64 + StopSequences []string + StopSequencesAlt []string + Temperature *float64 + ThinkingConfig *ThinkingConfig + ThinkingConfigAlt *ThinkingConfig + TopP *float64 + TopPAlt *float64 + type ModelInfo struct + Description string + DisplayName string + InputTokenLimit int + Name string + OutputTokenLimit int + SupportedGenerationMethods []string + func FromModel(model core.Model) ModelInfo + type ModelsList struct + Models []ModelInfo + NextPageToken string + func FromModels(models []core.Model) *ModelsList + type Part struct + CodeExecutionResult json.RawMessage + CodeExecutionResultAlt json.RawMessage + ExecutableCode json.RawMessage + ExecutableCodeAlt json.RawMessage + FileData json.RawMessage + FileDataAlt json.RawMessage + FunctionCall *FunctionCall + FunctionCallAlt *FunctionCall + FunctionResponse *FunctionResponse + FunctionResponseAlt *FunctionResponse + InlineData *Blob + InlineDataAlt *Blob + Text string + Thought bool + ThoughtSignature string + ThoughtSignatureAlt string + type ResponseContent struct + Parts []ResponsePart + Role string + type ResponseOptions struct + IncludeThoughts bool + type ResponsePart struct + FunctionCall *FunctionCall + Text *string + Thought bool + ThoughtSignature string + type ThinkingConfig struct + IncludeThoughts bool + IncludeThoughtsAlt bool + ThinkingBudget *int + ThinkingBudgetAlt *int + ThinkingLevel string + ThinkingLevelAlt string + type Tool struct + FunctionDeclarations []FunctionDeclaration + FunctionDeclarationsAlt []FunctionDeclaration + func (t *Tool) UnmarshalJSON(data []byte) error + type ToolConfig struct + FunctionCallingConfig *FunctionCallingConfig + FunctionCallingConfigAlt *FunctionCallingConfig + type UsageMetadata struct + CachedContentTokenCount int + CandidatesTokenCount int + PromptTokenCount int + ThoughtsTokenCount int + TotalTokenCount int