Documentation ¶
Overview ¶
Package firebaseml provides access to the Firebase ML API.
For product documentation, see: https://firebase.google.com
Library status ¶
These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.
Creating a client ¶
Usage example:
import "google.golang.org/api/firebaseml/v2beta" ... ctx := context.Background() firebasemlService, err := firebaseml.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:
firebasemlService, err := firebaseml.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) firebasemlService, err := firebaseml.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See google.golang.org/api/option.ClientOption for details on options.
Index ¶
- Constants
- type Date
- type GoogleCloudAiplatformV1beta1Blob
- type GoogleCloudAiplatformV1beta1Candidate
- type GoogleCloudAiplatformV1beta1Citation
- type GoogleCloudAiplatformV1beta1CitationMetadata
- type GoogleCloudAiplatformV1beta1CodeExecutionResult
- type GoogleCloudAiplatformV1beta1Content
- type GoogleCloudAiplatformV1beta1CountTokensRequest
- type GoogleCloudAiplatformV1beta1CountTokensResponse
- type GoogleCloudAiplatformV1beta1DynamicRetrievalConfig
- type GoogleCloudAiplatformV1beta1ExecutableCode
- type GoogleCloudAiplatformV1beta1FileData
- type GoogleCloudAiplatformV1beta1FunctionCall
- type GoogleCloudAiplatformV1beta1FunctionCallingConfig
- type GoogleCloudAiplatformV1beta1FunctionDeclaration
- type GoogleCloudAiplatformV1beta1FunctionResponse
- type GoogleCloudAiplatformV1beta1GenerateContentRequest
- type GoogleCloudAiplatformV1beta1GenerateContentResponse
- type GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback
- type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
- type GoogleCloudAiplatformV1beta1GenerationConfig
- type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig
- type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode
- type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode
- type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval
- type GoogleCloudAiplatformV1beta1GroundingChunk
- type GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext
- type GoogleCloudAiplatformV1beta1GroundingChunkWeb
- type GoogleCloudAiplatformV1beta1GroundingMetadata
- type GoogleCloudAiplatformV1beta1GroundingSupport
- type GoogleCloudAiplatformV1beta1LogprobsResult
- type GoogleCloudAiplatformV1beta1LogprobsResultCandidate
- type GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates
- type GoogleCloudAiplatformV1beta1Part
- type GoogleCloudAiplatformV1beta1Retrieval
- type GoogleCloudAiplatformV1beta1RetrievalMetadata
- type GoogleCloudAiplatformV1beta1SafetyRating
- type GoogleCloudAiplatformV1beta1SafetySetting
- type GoogleCloudAiplatformV1beta1Schema
- type GoogleCloudAiplatformV1beta1SearchEntryPoint
- type GoogleCloudAiplatformV1beta1Segment
- type GoogleCloudAiplatformV1beta1Tool
- type GoogleCloudAiplatformV1beta1ToolCodeExecution
- type GoogleCloudAiplatformV1beta1ToolConfig
- type GoogleCloudAiplatformV1beta1VertexAISearch
- type GoogleCloudAiplatformV1beta1VertexRagStore
- type GoogleCloudAiplatformV1beta1VertexRagStoreRagResource
- type GoogleCloudAiplatformV1beta1VideoMetadata
- type ModelOperationMetadata
- type ProjectsLocationsPublishersModelsCountTokensCall
- func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall
- func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, error)
- func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall
- func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header
- type ProjectsLocationsPublishersModelsGenerateContentCall
- func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsGenerateContentCall
- func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, error)
- func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsGenerateContentCall
- func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Header
- type ProjectsLocationsPublishersModelsService
- func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, ...) *ProjectsLocationsPublishersModelsCountTokensCall
- func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, ...) *ProjectsLocationsPublishersModelsGenerateContentCall
- func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, ...) *ProjectsLocationsPublishersModelsStreamGenerateContentCall
- type ProjectsLocationsPublishersModelsStreamGenerateContentCall
- func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall
- func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, error)
- func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall
- func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header
- type ProjectsLocationsPublishersService
- type ProjectsLocationsService
- type ProjectsService
- type Service
Constants ¶
const ( // See, edit, configure, and delete your Google Cloud data and see the email // address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Date ¶
type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, // or 0 to specify a year by itself or a year and month where the day isn't // significant. Day int64 `json:"day,omitempty"` // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without // a month and day. Month int64 `json:"month,omitempty"` // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date // without a year. Year int64 `json:"year,omitempty"` // ForceSendFields is a list of field names (e.g. "Day") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Day") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
Date: Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
func (Date) MarshalJSON ¶
type GoogleCloudAiplatformV1beta1Blob ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Blob struct { // Data: Required. Raw bytes. Data string `json:"data,omitempty"` // MimeType: Required. The IANA standard MIME type of the source data. MimeType string `json:"mimeType,omitempty"` // ForceSendFields is a list of field names (e.g. "Data") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Data") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Blob: Content blob. It's preferred to send as text directly rather than raw bytes.
func (GoogleCloudAiplatformV1beta1Blob) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Blob) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Candidate ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Candidate struct { // AvgLogprobs: Output only. Average log probability score of the candidate. AvgLogprobs float64 `json:"avgLogprobs,omitempty"` // CitationMetadata: Output only. Source attribution of the generated content. CitationMetadata *GoogleCloudAiplatformV1beta1CitationMetadata `json:"citationMetadata,omitempty"` // Content: Output only. Content parts of the candidate. Content *GoogleCloudAiplatformV1beta1Content `json:"content,omitempty"` // FinishMessage: Output only. Describes the reason the mode stopped generating // tokens in more detail. This is only filled when `finish_reason` is set. FinishMessage string `json:"finishMessage,omitempty"` // FinishReason: Output only. The reason why the model stopped generating // tokens. If empty, the model has not stopped generating the tokens. // // Possible values: // "FINISH_REASON_UNSPECIFIED" - The finish reason is unspecified. // "STOP" - Token generation reached a natural stopping point or a configured // stop sequence. // "MAX_TOKENS" - Token generation reached the configured maximum output // tokens. // "SAFETY" - Token generation stopped because the content potentially // contains safety violations. NOTE: When streaming, content is empty if // content filters blocks the output. // "RECITATION" - The token generation stopped because of potential // recitation. // "OTHER" - All other reasons that stopped the token generation. // "BLOCKLIST" - Token generation stopped because the content contains // forbidden terms. // "PROHIBITED_CONTENT" - Token generation stopped for potentially containing // prohibited content. // "SPII" - Token generation stopped because the content potentially contains // Sensitive Personally Identifiable Information (SPII). // "MALFORMED_FUNCTION_CALL" - The function call generated by the model is // invalid. FinishReason string `json:"finishReason,omitempty"` // GroundingMetadata: Output only. Metadata specifies sources used to ground // generated content. GroundingMetadata *GoogleCloudAiplatformV1beta1GroundingMetadata `json:"groundingMetadata,omitempty"` // Index: Output only. Index of the candidate. Index int64 `json:"index,omitempty"` // LogprobsResult: Output only. Log-likelihood scores for the response tokens // and top tokens LogprobsResult *GoogleCloudAiplatformV1beta1LogprobsResult `json:"logprobsResult,omitempty"` // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` // ForceSendFields is a list of field names (e.g. "AvgLogprobs") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AvgLogprobs") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Candidate: A response candidate generated from the model.
func (GoogleCloudAiplatformV1beta1Candidate) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Candidate) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1Candidate) UnmarshalJSON ¶ added in v0.188.0
func (s *GoogleCloudAiplatformV1beta1Candidate) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1Citation ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Citation struct { // EndIndex: Output only. End index into the content. EndIndex int64 `json:"endIndex,omitempty"` // License: Output only. License of the attribution. License string `json:"license,omitempty"` // PublicationDate: Output only. Publication date of the attribution. PublicationDate *Date `json:"publicationDate,omitempty"` // StartIndex: Output only. Start index into the content. StartIndex int64 `json:"startIndex,omitempty"` // Title: Output only. Title of the attribution. Title string `json:"title,omitempty"` // Uri: Output only. Url reference of the attribution. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "EndIndex") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Citation: Source attributions for content.
func (GoogleCloudAiplatformV1beta1Citation) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Citation) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1CitationMetadata ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1CitationMetadata struct { // Citations: Output only. List of citations. Citations []*GoogleCloudAiplatformV1beta1Citation `json:"citations,omitempty"` // ForceSendFields is a list of field names (e.g. "Citations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Citations") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1CitationMetadata: A collection of source attributions for a piece of content.
func (GoogleCloudAiplatformV1beta1CitationMetadata) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1CitationMetadata) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1CodeExecutionResult ¶ added in v0.201.0
type GoogleCloudAiplatformV1beta1CodeExecutionResult struct { // Outcome: Required. Outcome of the code execution. // // Possible values: // "OUTCOME_UNSPECIFIED" - Unspecified status. This value should not be used. // "OUTCOME_OK" - Code execution completed successfully. // "OUTCOME_FAILED" - Code execution finished but with a failure. `stderr` // should contain the reason. // "OUTCOME_DEADLINE_EXCEEDED" - Code execution ran for too long, and was // cancelled. There may or may not be a partial output present. Outcome string `json:"outcome,omitempty"` // Output: Optional. Contains stdout when code execution is successful, stderr // or other description otherwise. Output string `json:"output,omitempty"` // ForceSendFields is a list of field names (e.g. "Outcome") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Outcome") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1CodeExecutionResult: Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode].
func (GoogleCloudAiplatformV1beta1CodeExecutionResult) MarshalJSON ¶ added in v0.201.0
func (s GoogleCloudAiplatformV1beta1CodeExecutionResult) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Content ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Content struct { // Parts: Required. Ordered `Parts` that constitute a single message. Parts may // have different IANA MIME types. Parts []*GoogleCloudAiplatformV1beta1Part `json:"parts,omitempty"` // Role: Optional. The producer of the content. Must be either 'user' or // 'model'. Useful to set for multi-turn conversations, otherwise can be left // blank or unset. Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Parts") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Parts") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Content: The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.
func (GoogleCloudAiplatformV1beta1Content) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Content) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1CountTokensRequest ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1CountTokensRequest struct { // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // GenerationConfig: Optional. Generation config that the model will use to // generate the response. GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` // Instances: Optional. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` // Model: Optional. The name of the publisher model requested to serve the // prediction. Format: // `projects/{project}/locations/{location}/publishers/*/models/*` Model string `json:"model,omitempty"` // SystemInstruction: Optional. The user provided system instructions for the // model. Note: only text should be used in parts and content in each part will // be in a separate paragraph. SystemInstruction *GoogleCloudAiplatformV1beta1Content `json:"systemInstruction,omitempty"` // Tools: Optional. A list of `Tools` the model may use to generate the next // response. A `Tool` is a piece of code that enables the system to interact // with external systems to perform an action, or set of actions, outside of // knowledge and scope of the model. Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Contents") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1CountTokensRequest: Request message for PredictionService.CountTokens.
func (GoogleCloudAiplatformV1beta1CountTokensRequest) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1CountTokensRequest) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1CountTokensResponse ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1CountTokensResponse struct { // TotalBillableCharacters: The total number of billable characters counted // across all instances from the request. TotalBillableCharacters int64 `json:"totalBillableCharacters,omitempty"` // TotalTokens: The total number of tokens counted across all instances from // the request. TotalTokens int64 `json:"totalTokens,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "TotalBillableCharacters") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "TotalBillableCharacters") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1CountTokensResponse: Response message for PredictionService.CountTokens.
func (GoogleCloudAiplatformV1beta1CountTokensResponse) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1CountTokensResponse) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1DynamicRetrievalConfig ¶ added in v0.200.0
type GoogleCloudAiplatformV1beta1DynamicRetrievalConfig struct { // DynamicThreshold: Optional. The threshold to be used in dynamic retrieval. // If not set, a system default value is used. DynamicThreshold float64 `json:"dynamicThreshold,omitempty"` // Mode: The mode of the predictor to be used in dynamic retrieval. // // Possible values: // "MODE_UNSPECIFIED" - Always trigger retrieval. // "MODE_DYNAMIC" - Run retrieval only when system decides it is necessary. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "DynamicThreshold") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DynamicThreshold") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1DynamicRetrievalConfig: Describes the options to customize dynamic retrieval.
func (GoogleCloudAiplatformV1beta1DynamicRetrievalConfig) MarshalJSON ¶ added in v0.200.0
func (s GoogleCloudAiplatformV1beta1DynamicRetrievalConfig) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1DynamicRetrievalConfig) UnmarshalJSON ¶ added in v0.200.0
func (s *GoogleCloudAiplatformV1beta1DynamicRetrievalConfig) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1ExecutableCode ¶ added in v0.201.0
type GoogleCloudAiplatformV1beta1ExecutableCode struct { // Code: Required. The code to be executed. Code string `json:"code,omitempty"` // Language: Required. Programming language of the `code`. // // Possible values: // "LANGUAGE_UNSPECIFIED" - Unspecified language. This value should not be // used. // "PYTHON" - Python >= 3.10, with numpy and simpy available. Language string `json:"language,omitempty"` // ForceSendFields is a list of field names (e.g. "Code") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Code") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1ExecutableCode: Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE].
func (GoogleCloudAiplatformV1beta1ExecutableCode) MarshalJSON ¶ added in v0.201.0
func (s GoogleCloudAiplatformV1beta1ExecutableCode) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1FileData ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1FileData struct { // FileUri: Required. URI. FileUri string `json:"fileUri,omitempty"` // MimeType: Required. The IANA standard MIME type of the source data. MimeType string `json:"mimeType,omitempty"` // ForceSendFields is a list of field names (e.g. "FileUri") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "FileUri") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1FileData: URI based data.
func (GoogleCloudAiplatformV1beta1FileData) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1FileData) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1FunctionCall ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1FunctionCall struct { // Args: Optional. Required. The function parameters and values in JSON object // format. See [FunctionDeclaration.parameters] for parameter details. Args googleapi.RawMessage `json:"args,omitempty"` // Name: Required. The name of the function to call. Matches // [FunctionDeclaration.name]. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Args") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Args") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1FunctionCall: A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.
func (GoogleCloudAiplatformV1beta1FunctionCall) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1FunctionCall) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1FunctionCallingConfig ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1FunctionCallingConfig struct { // AllowedFunctionNames: Optional. Function names to call. Only set when the // Mode is ANY. Function names should match [FunctionDeclaration.name]. With // mode set to ANY, model will predict a function call from the set of function // names provided. AllowedFunctionNames []string `json:"allowedFunctionNames,omitempty"` // Mode: Optional. Function calling mode. // // Possible values: // "MODE_UNSPECIFIED" - Unspecified function calling mode. This value should // not be used. // "AUTO" - Default model behavior, model decides to predict either function // calls or natural language response. // "ANY" - Model is constrained to always predicting function calls only. If // "allowed_function_names" are set, the predicted function calls will be // limited to any one of "allowed_function_names", else the predicted function // calls will be any one of the provided "function_declarations". // "NONE" - Model will not predict any function calls. Model behavior is same // as when not passing any function declarations. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AllowedFunctionNames") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1FunctionCallingConfig: Function calling config.
func (GoogleCloudAiplatformV1beta1FunctionCallingConfig) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1FunctionCallingConfig) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1FunctionDeclaration ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1FunctionDeclaration struct { // Description: Optional. Description and purpose of the function. Model uses // it to decide how and whether to call the function. Description string `json:"description,omitempty"` // Name: Required. The name of the function to call. Must start with a letter // or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and // dashes, with a maximum length of 64. Name string `json:"name,omitempty"` // Parameters: Optional. Describes the parameters to this function in JSON // Schema Object format. Reflects the Open API 3.03 Parameter Object. string // Key: the name of the parameter. Parameter names are case sensitive. Schema // Value: the Schema defining the type used for the parameter. For function // with no parameters, this can be left unset. Parameter names must start with // a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or // underscores with a maximum length of 64. Example with 1 required and 1 // optional parameter: type: OBJECT properties: param1: type: STRING param2: // type: INTEGER required: - param1 Parameters *GoogleCloudAiplatformV1beta1Schema `json:"parameters,omitempty"` // Response: Optional. Describes the output from this function in JSON Schema // format. Reflects the Open API 3.03 Response Object. The Schema defines the // type used for the response value of the function. Response *GoogleCloudAiplatformV1beta1Schema `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Description") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1FunctionDeclaration: Structured representation of a function declaration as defined by the OpenAPI 3.0 specification (https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
func (GoogleCloudAiplatformV1beta1FunctionDeclaration) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1FunctionDeclaration) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1FunctionResponse ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1FunctionResponse struct { // Name: Required. The name of the function to call. Matches // [FunctionDeclaration.name] and [FunctionCall.name]. Name string `json:"name,omitempty"` // Response: Required. The function response in JSON object format. Use // "output" key to specify function output and "error" key to specify error // details (if any). If "output" and "error" keys are not specified, then whole // "response" is treated as function output. Response googleapi.RawMessage `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Name") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1FunctionResponse: The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.
func (GoogleCloudAiplatformV1beta1FunctionResponse) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1FunctionResponse) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerateContentRequest ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { // CachedContent: Optional. The name of the cached content used as context to // serve the prediction. Note: only used in explicit caching, where users can // have control over caching (e.g. what content to cache) and enjoy guaranteed // cost savings. Format: // `projects/{project}/locations/{location}/cachedContents/{cachedContent}` CachedContent string `json:"cachedContent,omitempty"` // Contents: Required. The content of the current conversation with the model. // For single-turn queries, this is a single instance. For multi-turn queries, // this is a repeated field that contains conversation history + latest // request. Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // GenerationConfig: Optional. Generation config. GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` // Labels: Optional. The labels with user-defined metadata for the request. It // is used for billing and reporting only. Label keys and values can be no // longer than 63 characters (Unicode codepoints) and can only contain // lowercase letters, numeric characters, underscores, and dashes. // International characters are allowed. Label values are optional. Label keys // must start with a letter. Labels map[string]string `json:"labels,omitempty"` // SafetySettings: Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` // SystemInstruction: Optional. The user provided system instructions for the // model. Note: only text should be used in parts and content in each part will // be in a separate paragraph. SystemInstruction *GoogleCloudAiplatformV1beta1Content `json:"systemInstruction,omitempty"` // ToolConfig: Optional. Tool config. This config is shared for all tools // provided in the request. ToolConfig *GoogleCloudAiplatformV1beta1ToolConfig `json:"toolConfig,omitempty"` // Tools: Optional. A list of `Tools` the model may use to generate the next // response. A `Tool` is a piece of code that enables the system to interact // with external systems to perform an action, or set of actions, outside of // knowledge and scope of the model. Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "CachedContent") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CachedContent") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerateContentRequest: Request message for [PredictionService.GenerateContent].
func (GoogleCloudAiplatformV1beta1GenerateContentRequest) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1GenerateContentRequest) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerateContentResponse ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GenerateContentResponse struct { // Candidates: Output only. Generated candidates. Candidates []*GoogleCloudAiplatformV1beta1Candidate `json:"candidates,omitempty"` // ModelVersion: Output only. The model version used to generate the response. ModelVersion string `json:"modelVersion,omitempty"` // PromptFeedback: Output only. Content filter results for a prompt sent in the // request. Note: Sent only in the first stream chunk. Only happens when no // candidates were generated due to content violations. PromptFeedback *GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback `json:"promptFeedback,omitempty"` // UsageMetadata: Usage metadata about the response(s). UsageMetadata *GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata `json:"usageMetadata,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Candidates") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Candidates") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerateContentResponse: Response message for [PredictionService.GenerateContent].
func (GoogleCloudAiplatformV1beta1GenerateContentResponse) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1GenerateContentResponse) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback struct { // BlockReason: Output only. Blocked reason. // // Possible values: // "BLOCKED_REASON_UNSPECIFIED" - Unspecified blocked reason. // "SAFETY" - Candidates blocked due to safety. // "OTHER" - Candidates blocked due to other reason. // "BLOCKLIST" - Candidates blocked due to the terms which are included from // the terminology blocklist. // "PROHIBITED_CONTENT" - Candidates blocked due to prohibited content. BlockReason string `json:"blockReason,omitempty"` // BlockReasonMessage: Output only. A readable block reason message. BlockReasonMessage string `json:"blockReasonMessage,omitempty"` // SafetyRatings: Output only. Safety ratings. SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` // ForceSendFields is a list of field names (e.g. "BlockReason") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "BlockReason") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback: Content filter results for a prompt sent in the request.
func (GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata struct { // CachedContentTokenCount: Output only. Number of tokens in the cached part in // the input (the cached content). CachedContentTokenCount int64 `json:"cachedContentTokenCount,omitempty"` // CandidatesTokenCount: Number of tokens in the response(s). CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` // PromptTokenCount: Number of tokens in the request. When `cached_content` is // set, this is still the total effective prompt size meaning this includes the // number of tokens in the cached content. PromptTokenCount int64 `json:"promptTokenCount,omitempty"` // TotalTokenCount: Total token count for prompt and response candidates. TotalTokenCount int64 `json:"totalTokenCount,omitempty"` // ForceSendFields is a list of field names (e.g. "CachedContentTokenCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CachedContentTokenCount") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata: Usage metadata about response(s).
func (GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerationConfig ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GenerationConfig struct { // AudioTimestamp: Optional. If enabled, audio timestamp will be included in // the request to the model. AudioTimestamp bool `json:"audioTimestamp,omitempty"` // CandidateCount: Optional. Number of candidates to generate. CandidateCount int64 `json:"candidateCount,omitempty"` // FrequencyPenalty: Optional. Frequency penalties. FrequencyPenalty float64 `json:"frequencyPenalty,omitempty"` // Logprobs: Optional. Logit probabilities. Logprobs int64 `json:"logprobs,omitempty"` // MaxOutputTokens: Optional. The maximum number of output tokens to generate // per message. MaxOutputTokens int64 `json:"maxOutputTokens,omitempty"` // PresencePenalty: Optional. Positive penalties. PresencePenalty float64 `json:"presencePenalty,omitempty"` // ResponseLogprobs: Optional. If true, export the logprobs results in // response. ResponseLogprobs bool `json:"responseLogprobs,omitempty"` // ResponseMimeType: Optional. Output response mimetype of the generated // candidate text. Supported mimetype: - `text/plain`: (default) Text output. - // `application/json`: JSON response in the candidates. The model needs to be // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` // ResponseSchema: Optional. The `Schema` object allows the definition of input // and output data types. These types can be objects, but also primitives and // arrays. Represents a select subset of an OpenAPI 3.0 schema object // (https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible // response_mime_type must also be set. Compatible mimetypes: // `application/json`: Schema for JSON response. ResponseSchema *GoogleCloudAiplatformV1beta1Schema `json:"responseSchema,omitempty"` // RoutingConfig: Optional. Routing configuration. RoutingConfig *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` // Seed: Optional. Seed. Seed int64 `json:"seed,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. TopP float64 `json:"topP,omitempty"` // ForceSendFields is a list of field names (e.g. "AudioTimestamp") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AudioTimestamp") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerationConfig: Generation config.
func (GoogleCloudAiplatformV1beta1GenerationConfig) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1GenerationConfig) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1GenerationConfig) UnmarshalJSON ¶ added in v0.185.0
func (s *GoogleCloudAiplatformV1beta1GenerationConfig) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig ¶ added in v0.190.0
type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig struct { // AutoMode: Automated routing. AutoMode *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode `json:"autoMode,omitempty"` // ManualMode: Manual routing. ManualMode *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode `json:"manualMode,omitempty"` // ForceSendFields is a list of field names (e.g. "AutoMode") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AutoMode") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig: The configuration for routing the request to a specific model.
func (GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig) MarshalJSON ¶ added in v0.190.0
func (s GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode ¶ added in v0.190.0
type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode struct { // ModelRoutingPreference: The model routing preference. // // Possible values: // "UNKNOWN" - Unspecified model routing preference. // "PRIORITIZE_QUALITY" - Prefer higher quality over low cost. // "BALANCED" - Balanced model routing preference. // "PRIORITIZE_COST" - Prefer lower cost over higher quality. ModelRoutingPreference string `json:"modelRoutingPreference,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelRoutingPreference") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ModelRoutingPreference") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode: When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference.
func (GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode) MarshalJSON ¶ added in v0.190.0
func (s GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode ¶ added in v0.190.0
type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode struct { // ModelName: The model name to use. Only the public LLM models are accepted. // e.g. 'gemini-1.5-pro-001'. ModelName string `json:"modelName,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ModelName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode: When manual routing is set, the specified model will be used directly.
func (GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode) MarshalJSON ¶ added in v0.190.0
func (s GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval struct { // DynamicRetrievalConfig: Specifies the dynamic retrieval configuration for // the given source. DynamicRetrievalConfig *GoogleCloudAiplatformV1beta1DynamicRetrievalConfig `json:"dynamicRetrievalConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "DynamicRetrievalConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DynamicRetrievalConfig") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GoogleSearchRetrieval: Tool to retrieve public web data for grounding, powered by Google.
func (GoogleCloudAiplatformV1beta1GoogleSearchRetrieval) MarshalJSON ¶ added in v0.200.0
func (s GoogleCloudAiplatformV1beta1GoogleSearchRetrieval) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GroundingChunk ¶ added in v0.186.0
type GoogleCloudAiplatformV1beta1GroundingChunk struct { // RetrievedContext: Grounding chunk from context retrieved by the retrieval // tools. RetrievedContext *GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext `json:"retrievedContext,omitempty"` // Web: Grounding chunk from the web. Web *GoogleCloudAiplatformV1beta1GroundingChunkWeb `json:"web,omitempty"` // ForceSendFields is a list of field names (e.g. "RetrievedContext") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "RetrievedContext") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GroundingChunk: Grounding chunk.
func (GoogleCloudAiplatformV1beta1GroundingChunk) MarshalJSON ¶ added in v0.186.0
func (s GoogleCloudAiplatformV1beta1GroundingChunk) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext ¶ added in v0.186.0
type GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext struct { // Text: Text of the attribution. Text string `json:"text,omitempty"` // Title: Title of the attribution. Title string `json:"title,omitempty"` // Uri: URI reference of the attribution. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Text") to include in API requests // with the JSON null value. By default, fields with empty values are omitted // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext: Chunk from context retrieved by the retrieval tools.
func (GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext) MarshalJSON ¶ added in v0.186.0
func (s GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GroundingChunkWeb ¶ added in v0.186.0
type GoogleCloudAiplatformV1beta1GroundingChunkWeb struct { // Title: Title of the chunk. Title string `json:"title,omitempty"` // Uri: URI reference of the chunk. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Title") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Title") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GroundingChunkWeb: Chunk from the web.
func (GoogleCloudAiplatformV1beta1GroundingChunkWeb) MarshalJSON ¶ added in v0.186.0
func (s GoogleCloudAiplatformV1beta1GroundingChunkWeb) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GroundingMetadata ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1GroundingMetadata struct { // GroundingChunks: List of supporting references retrieved from specified // grounding source. GroundingChunks []*GoogleCloudAiplatformV1beta1GroundingChunk `json:"groundingChunks,omitempty"` // GroundingSupports: Optional. List of grounding support. GroundingSupports []*GoogleCloudAiplatformV1beta1GroundingSupport `json:"groundingSupports,omitempty"` // RetrievalMetadata: Optional. Output only. Retrieval metadata. RetrievalMetadata *GoogleCloudAiplatformV1beta1RetrievalMetadata `json:"retrievalMetadata,omitempty"` // RetrievalQueries: Optional. Queries executed by the retrieval tools. RetrievalQueries []string `json:"retrievalQueries,omitempty"` // SearchEntryPoint: Optional. Google search entry for the following-up web // searches. SearchEntryPoint *GoogleCloudAiplatformV1beta1SearchEntryPoint `json:"searchEntryPoint,omitempty"` // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` // ForceSendFields is a list of field names (e.g. "GroundingChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "GroundingChunks") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GroundingMetadata: Metadata returned to client when grounding is enabled.
func (GoogleCloudAiplatformV1beta1GroundingMetadata) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1GroundingMetadata) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1GroundingSupport ¶ added in v0.186.0
type GoogleCloudAiplatformV1beta1GroundingSupport struct { // ConfidenceScores: Confidence score of the support references. Ranges from 0 // to 1. 1 is the most confident. This list must have the same size as the // grounding_chunk_indices. ConfidenceScores []float64 `json:"confidenceScores,omitempty"` // GroundingChunkIndices: A list of indices (into 'grounding_chunk') specifying // the citations associated with the claim. For instance [1,3,4] means that // grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved // content attributed to the claim. GroundingChunkIndices []int64 `json:"groundingChunkIndices,omitempty"` // Segment: Segment of the content this support belongs to. Segment *GoogleCloudAiplatformV1beta1Segment `json:"segment,omitempty"` // ForceSendFields is a list of field names (e.g. "ConfidenceScores") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ConfidenceScores") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1GroundingSupport: Grounding support.
func (GoogleCloudAiplatformV1beta1GroundingSupport) MarshalJSON ¶ added in v0.186.0
func (s GoogleCloudAiplatformV1beta1GroundingSupport) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1GroundingSupport) UnmarshalJSON ¶ added in v0.186.0
func (s *GoogleCloudAiplatformV1beta1GroundingSupport) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1LogprobsResult ¶ added in v0.198.0
type GoogleCloudAiplatformV1beta1LogprobsResult struct { // ChosenCandidates: Length = total number of decoding steps. The chosen // candidates may or may not be in top_candidates. ChosenCandidates []*GoogleCloudAiplatformV1beta1LogprobsResultCandidate `json:"chosenCandidates,omitempty"` // TopCandidates: Length = total number of decoding steps. TopCandidates []*GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates `json:"topCandidates,omitempty"` // ForceSendFields is a list of field names (e.g. "ChosenCandidates") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "ChosenCandidates") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1LogprobsResult: Logprobs Result
func (GoogleCloudAiplatformV1beta1LogprobsResult) MarshalJSON ¶ added in v0.198.0
func (s GoogleCloudAiplatformV1beta1LogprobsResult) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1LogprobsResultCandidate ¶ added in v0.198.0
type GoogleCloudAiplatformV1beta1LogprobsResultCandidate struct { // LogProbability: The candidate's log probability. LogProbability float64 `json:"logProbability,omitempty"` // Token: The candidate's token string value. Token string `json:"token,omitempty"` // TokenId: The candidate's token id value. TokenId int64 `json:"tokenId,omitempty"` // ForceSendFields is a list of field names (e.g. "LogProbability") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "LogProbability") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1LogprobsResultCandidate: Candidate for the logprobs token and score.
func (GoogleCloudAiplatformV1beta1LogprobsResultCandidate) MarshalJSON ¶ added in v0.198.0
func (s GoogleCloudAiplatformV1beta1LogprobsResultCandidate) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1LogprobsResultCandidate) UnmarshalJSON ¶ added in v0.198.0
func (s *GoogleCloudAiplatformV1beta1LogprobsResultCandidate) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates ¶ added in v0.198.0
type GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates struct { // Candidates: Sorted by log probability in descending order. Candidates []*GoogleCloudAiplatformV1beta1LogprobsResultCandidate `json:"candidates,omitempty"` // ForceSendFields is a list of field names (e.g. "Candidates") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Candidates") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates: Candidates with top log probabilities at each decoding step.
func (GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates) MarshalJSON ¶ added in v0.198.0
func (s GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Part ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Part struct { // CodeExecutionResult: Optional. Result of executing the [ExecutableCode]. CodeExecutionResult *GoogleCloudAiplatformV1beta1CodeExecutionResult `json:"codeExecutionResult,omitempty"` // ExecutableCode: Optional. Code generated by the model that is meant to be // executed. ExecutableCode *GoogleCloudAiplatformV1beta1ExecutableCode `json:"executableCode,omitempty"` // FileData: Optional. URI based data. FileData *GoogleCloudAiplatformV1beta1FileData `json:"fileData,omitempty"` // FunctionCall: Optional. A predicted [FunctionCall] returned from the model // that contains a string representing the [FunctionDeclaration.name] with the // parameters and their values. FunctionCall *GoogleCloudAiplatformV1beta1FunctionCall `json:"functionCall,omitempty"` // FunctionResponse: Optional. The result output of a [FunctionCall] that // contains a string representing the [FunctionDeclaration.name] and a // structured JSON object containing any output from the function call. It is // used as context to the model. FunctionResponse *GoogleCloudAiplatformV1beta1FunctionResponse `json:"functionResponse,omitempty"` // InlineData: Optional. Inlined bytes data. InlineData *GoogleCloudAiplatformV1beta1Blob `json:"inlineData,omitempty"` // Text: Optional. Text part (can be code). Text string `json:"text,omitempty"` // VideoMetadata: Optional. Video metadata. The metadata should only be // specified while the video data is presented in inline_data or file_data. VideoMetadata *GoogleCloudAiplatformV1beta1VideoMetadata `json:"videoMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CodeExecutionResult") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CodeExecutionResult") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Part: A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
func (GoogleCloudAiplatformV1beta1Part) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Part) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Retrieval ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Retrieval struct { // DisableAttribution: Optional. Deprecated. This option is no longer // supported. DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. VertexAiSearch *GoogleCloudAiplatformV1beta1VertexAISearch `json:"vertexAiSearch,omitempty"` // VertexRagStore: Set to use data source powered by Vertex RAG store. User // data is uploaded via the VertexRagDataService. VertexRagStore *GoogleCloudAiplatformV1beta1VertexRagStore `json:"vertexRagStore,omitempty"` // ForceSendFields is a list of field names (e.g. "DisableAttribution") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DisableAttribution") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Retrieval: Defines a retrieval tool that model can call to access external knowledge.
func (GoogleCloudAiplatformV1beta1Retrieval) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Retrieval) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1RetrievalMetadata ¶ added in v0.200.0
type GoogleCloudAiplatformV1beta1RetrievalMetadata struct { // GoogleSearchDynamicRetrievalScore: Optional. Score indicating how likely // information from Google Search could help answer the prompt. The score is in // the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. // This score is only populated when Google Search grounding and dynamic // retrieval is enabled. It will be compared to the threshold to determine // whether to trigger Google Search. GoogleSearchDynamicRetrievalScore float64 `json:"googleSearchDynamicRetrievalScore,omitempty"` // ForceSendFields is a list of field names (e.g. // "GoogleSearchDynamicRetrievalScore") to unconditionally include in API // requests. By default, fields with empty or default values are omitted from // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. // "GoogleSearchDynamicRetrievalScore") to include in API requests with the // JSON null value. By default, fields with empty values are omitted from API // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for // more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1RetrievalMetadata: Metadata related to retrieval in the grounding flow.
func (GoogleCloudAiplatformV1beta1RetrievalMetadata) MarshalJSON ¶ added in v0.200.0
func (s GoogleCloudAiplatformV1beta1RetrievalMetadata) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1RetrievalMetadata) UnmarshalJSON ¶ added in v0.200.0
func (s *GoogleCloudAiplatformV1beta1RetrievalMetadata) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1SafetyRating ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1SafetyRating struct { // Blocked: Output only. Indicates whether the content was filtered out because // of this rating. Blocked bool `json:"blocked,omitempty"` // Category: Output only. Harm category. // // Possible values: // "HARM_CATEGORY_UNSPECIFIED" - The harm category is unspecified. // "HARM_CATEGORY_HATE_SPEECH" - The harm category is hate speech. // "HARM_CATEGORY_DANGEROUS_CONTENT" - The harm category is dangerous // content. // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Probability: Output only. Harm probability levels in the content. // // Possible values: // "HARM_PROBABILITY_UNSPECIFIED" - Harm probability unspecified. // "NEGLIGIBLE" - Negligible level of harm. // "LOW" - Low level of harm. // "MEDIUM" - Medium level of harm. // "HIGH" - High level of harm. Probability string `json:"probability,omitempty"` // ProbabilityScore: Output only. Harm probability score. ProbabilityScore float64 `json:"probabilityScore,omitempty"` // Severity: Output only. Harm severity levels in the content. // // Possible values: // "HARM_SEVERITY_UNSPECIFIED" - Harm severity unspecified. // "HARM_SEVERITY_NEGLIGIBLE" - Negligible level of harm severity. // "HARM_SEVERITY_LOW" - Low level of harm severity. // "HARM_SEVERITY_MEDIUM" - Medium level of harm severity. // "HARM_SEVERITY_HIGH" - High level of harm severity. Severity string `json:"severity,omitempty"` // SeverityScore: Output only. Harm severity score. SeverityScore float64 `json:"severityScore,omitempty"` // ForceSendFields is a list of field names (e.g. "Blocked") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Blocked") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1SafetyRating: Safety rating corresponding to the generated content.
func (GoogleCloudAiplatformV1beta1SafetyRating) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1SafetyRating) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1SafetyRating) UnmarshalJSON ¶ added in v0.185.0
func (s *GoogleCloudAiplatformV1beta1SafetyRating) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1SafetySetting ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1SafetySetting struct { // Category: Required. Harm category. // // Possible values: // "HARM_CATEGORY_UNSPECIFIED" - The harm category is unspecified. // "HARM_CATEGORY_HATE_SPEECH" - The harm category is hate speech. // "HARM_CATEGORY_DANGEROUS_CONTENT" - The harm category is dangerous // content. // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Method: Optional. Specify if the threshold is used for probability or // severity score. If not specified, the threshold is used for probability // score. // // Possible values: // "HARM_BLOCK_METHOD_UNSPECIFIED" - The harm block method is unspecified. // "SEVERITY" - The harm block method uses both probability and severity // scores. // "PROBABILITY" - The harm block method uses the probability score. Method string `json:"method,omitempty"` // Threshold: Required. The harm block threshold. // // Possible values: // "HARM_BLOCK_THRESHOLD_UNSPECIFIED" - Unspecified harm block threshold. // "BLOCK_LOW_AND_ABOVE" - Block low threshold and above (i.e. block more). // "BLOCK_MEDIUM_AND_ABOVE" - Block medium threshold and above. // "BLOCK_ONLY_HIGH" - Block only high threshold (i.e. block less). // "BLOCK_NONE" - Block none. // "OFF" - Turn off the safety filter. Threshold string `json:"threshold,omitempty"` // ForceSendFields is a list of field names (e.g. "Category") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Category") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1SafetySetting: Safety settings.
func (GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Schema ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Schema struct { // AnyOf: Optional. The value should be validated against any (one or more) of // the subschemas in the list. AnyOf []*GoogleCloudAiplatformV1beta1Schema `json:"anyOf,omitempty"` // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` // Description: Optional. The description of the data. Description string `json:"description,omitempty"` // Enum: Optional. Possible values of the element of primitive type with enum // format. Examples: 1. We can define direction as : {type:STRING, format:enum, // enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as // : {type:INTEGER, format:enum, enum:["101", "201", "301"]} Enum []string `json:"enum,omitempty"` // Example: Optional. Example of the object. Will only populated when the // object is the root. Example interface{} `json:"example,omitempty"` // Format: Optional. The format of the data. Supported formats: for NUMBER // type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: // "email", "byte", etc Format string `json:"format,omitempty"` // Items: Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of // Type.ARRAY. Items *GoogleCloudAiplatformV1beta1Schema `json:"items,omitempty"` // MaxItems: Optional. Maximum number of the elements for Type.ARRAY. MaxItems int64 `json:"maxItems,omitempty,string"` // MaxLength: Optional. Maximum length of the Type.STRING MaxLength int64 `json:"maxLength,omitempty,string"` // MaxProperties: Optional. Maximum number of the properties for Type.OBJECT. MaxProperties int64 `json:"maxProperties,omitempty,string"` // Maximum: Optional. Maximum value of the Type.INTEGER and Type.NUMBER Maximum float64 `json:"maximum,omitempty"` // MinItems: Optional. Minimum number of the elements for Type.ARRAY. MinItems int64 `json:"minItems,omitempty,string"` // MinLength: Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the // Type.STRING MinLength int64 `json:"minLength,omitempty,string"` // MinProperties: Optional. Minimum number of the properties for Type.OBJECT. MinProperties int64 `json:"minProperties,omitempty,string"` // Minimum: Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value // of the Type.INTEGER and Type.NUMBER Minimum float64 `json:"minimum,omitempty"` // Nullable: Optional. Indicates if the value may be null. Nullable bool `json:"nullable,omitempty"` // Pattern: Optional. Pattern of the Type.STRING to restrict a string to a // regular expression. Pattern string `json:"pattern,omitempty"` // Properties: Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of // Type.OBJECT. Properties map[string]GoogleCloudAiplatformV1beta1Schema `json:"properties,omitempty"` // PropertyOrdering: Optional. The order of the properties. Not a standard // field in open api spec. Only used to support the order of the properties. PropertyOrdering []string `json:"propertyOrdering,omitempty"` // Required: Optional. Required properties of Type.OBJECT. Required []string `json:"required,omitempty"` // Title: Optional. The title of the Schema. Title string `json:"title,omitempty"` // Type: Optional. The type of the data. // // Possible values: // "TYPE_UNSPECIFIED" - Not specified, should not be used. // "STRING" - OpenAPI string type // "NUMBER" - OpenAPI number type // "INTEGER" - OpenAPI integer type // "BOOLEAN" - OpenAPI boolean type // "ARRAY" - OpenAPI array type // "OBJECT" - OpenAPI object type Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "AnyOf") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "AnyOf") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Schema: Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.
func (GoogleCloudAiplatformV1beta1Schema) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Schema) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1Schema) UnmarshalJSON ¶ added in v0.185.0
func (s *GoogleCloudAiplatformV1beta1Schema) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1SearchEntryPoint ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1SearchEntryPoint struct { // RenderedContent: Optional. Web content snippet that can be embedded in a web // page or an app webview. RenderedContent string `json:"renderedContent,omitempty"` // SdkBlob: Optional. Base64 encoded JSON representing array of tuple. SdkBlob string `json:"sdkBlob,omitempty"` // ForceSendFields is a list of field names (e.g. "RenderedContent") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "RenderedContent") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1SearchEntryPoint: Google search entry point.
func (GoogleCloudAiplatformV1beta1SearchEntryPoint) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1SearchEntryPoint) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Segment ¶ added in v0.186.0
type GoogleCloudAiplatformV1beta1Segment struct { // EndIndex: Output only. End index in the given Part, measured in bytes. // Offset from the start of the Part, exclusive, starting at zero. EndIndex int64 `json:"endIndex,omitempty"` // PartIndex: Output only. The index of a Part object within its parent Content // object. PartIndex int64 `json:"partIndex,omitempty"` // StartIndex: Output only. Start index in the given Part, measured in bytes. // Offset from the start of the Part, inclusive, starting at zero. StartIndex int64 `json:"startIndex,omitempty"` // Text: Output only. The text corresponding to the segment from the response. Text string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "EndIndex") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Segment: Segment of the content.
func (GoogleCloudAiplatformV1beta1Segment) MarshalJSON ¶ added in v0.186.0
func (s GoogleCloudAiplatformV1beta1Segment) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1Tool ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1Tool struct { // CodeExecution: Optional. CodeExecution tool type. Enables the model to // execute code as part of generation. This field is only used by the Gemini // Developer API services. CodeExecution *GoogleCloudAiplatformV1beta1ToolCodeExecution `json:"codeExecution,omitempty"` // FunctionDeclarations: Optional. Function tool type. One or more function // declarations to be passed to the model along with the current user query. // Model may decide to call a subset of these functions by populating // FunctionCall in the response. User should provide a FunctionResponse for // each function call in the next turn. Based on the function responses, Model // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` // Retrieval: Optional. Retrieval tool type. System will always execute the // provided retrieval tool(s) to get external knowledge to answer the prompt. // Retrieval results are presented to the model for generation. Retrieval *GoogleCloudAiplatformV1beta1Retrieval `json:"retrieval,omitempty"` // ForceSendFields is a list of field names (e.g. "CodeExecution") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CodeExecution") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1Tool: Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
func (GoogleCloudAiplatformV1beta1Tool) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1Tool) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1ToolCodeExecution ¶ added in v0.201.0
type GoogleCloudAiplatformV1beta1ToolCodeExecution struct { }
GoogleCloudAiplatformV1beta1ToolCodeExecution: Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool.
type GoogleCloudAiplatformV1beta1ToolConfig ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1ToolConfig struct { // FunctionCallingConfig: Optional. Function calling config. FunctionCallingConfig *GoogleCloudAiplatformV1beta1FunctionCallingConfig `json:"functionCallingConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "FunctionCallingConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "FunctionCallingConfig") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1ToolConfig: Tool config. This config is shared for all tools provided in the request.
func (GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1VertexAISearch ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1VertexAISearch struct { // Datastore: Required. Fully-qualified Vertex AI Search data store resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ // {dataStore}` Datastore string `json:"datastore,omitempty"` // ForceSendFields is a list of field names (e.g. "Datastore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Datastore") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder
func (GoogleCloudAiplatformV1beta1VertexAISearch) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1VertexAISearch) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1VertexRagStore ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1VertexRagStore struct { // RagCorpora: Optional. Deprecated. Please use rag_resources instead. RagCorpora []string `json:"ragCorpora,omitempty"` // RagResources: Optional. The representation of the rag source. It can be used // to specify corpus only or ragfiles. Currently only support one corpus or // multiple files from one corpus. In the future we may open up multiple // corpora support. RagResources []*GoogleCloudAiplatformV1beta1VertexRagStoreRagResource `json:"ragResources,omitempty"` // SimilarityTopK: Optional. Number of top k results to return from the // selected corpora. SimilarityTopK int64 `json:"similarityTopK,omitempty"` // VectorDistanceThreshold: Optional. Only return results with vector distance // smaller than the threshold. VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` // ForceSendFields is a list of field names (e.g. "RagCorpora") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "RagCorpora") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1VertexRagStore: Retrieve from Vertex RAG Store for grounding.
func (GoogleCloudAiplatformV1beta1VertexRagStore) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1VertexRagStore) MarshalJSON() ([]byte, error)
func (*GoogleCloudAiplatformV1beta1VertexRagStore) UnmarshalJSON ¶ added in v0.185.0
func (s *GoogleCloudAiplatformV1beta1VertexRagStore) UnmarshalJSON(data []byte) error
type GoogleCloudAiplatformV1beta1VertexRagStoreRagResource ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1VertexRagStoreRagResource struct { // RagCorpus: Optional. RagCorpora resource name. Format: // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` RagCorpus string `json:"ragCorpus,omitempty"` // RagFileIds: Optional. rag_file_id. The files should be in the same // rag_corpus set in rag_corpus field. RagFileIds []string `json:"ragFileIds,omitempty"` // ForceSendFields is a list of field names (e.g. "RagCorpus") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "RagCorpus") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1VertexRagStoreRagResource: The definition of the Rag resource.
func (GoogleCloudAiplatformV1beta1VertexRagStoreRagResource) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1VertexRagStoreRagResource) MarshalJSON() ([]byte, error)
type GoogleCloudAiplatformV1beta1VideoMetadata ¶ added in v0.185.0
type GoogleCloudAiplatformV1beta1VideoMetadata struct { // EndOffset: Optional. The end offset of the video. EndOffset string `json:"endOffset,omitempty"` // StartOffset: Optional. The start offset of the video. StartOffset string `json:"startOffset,omitempty"` // ForceSendFields is a list of field names (e.g. "EndOffset") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "EndOffset") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
GoogleCloudAiplatformV1beta1VideoMetadata: Metadata describes the input video content.
func (GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON ¶ added in v0.185.0
func (s GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error)
type ModelOperationMetadata ¶
type ModelOperationMetadata struct { // Possible values: // "BASIC_OPERATION_STATUS_UNSPECIFIED" - The status is unspecified // "BASIC_OPERATION_STATUS_UPLOADING" - The model file is being uploaded // "BASIC_OPERATION_STATUS_VERIFYING" - The model file is being verified BasicOperationStatus string `json:"basicOperationStatus,omitempty"` // Name: The name of the model we are creating/updating The name must have the // form `projects/{project_id}/models/{model_id}` Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "BasicOperationStatus") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "BasicOperationStatus") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` }
ModelOperationMetadata: This is returned in the longrunning operations for create/update.
func (ModelOperationMetadata) MarshalJSON ¶
func (s ModelOperationMetadata) MarshalJSON() ([]byte, error)
type ProjectsLocationsPublishersModelsCountTokensCall ¶
type ProjectsLocationsPublishersModelsCountTokensCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsPublishersModelsCountTokensCall) Context ¶
func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsPublishersModelsCountTokensCall) Do ¶
func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, error)
Do executes the "firebaseml.projects.locations.publishers.models.countTokens" call. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAiplatformV1beta1CountTokensResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsPublishersModelsCountTokensCall) Fields ¶
func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsPublishersModelsCountTokensCall) Header ¶
func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type ProjectsLocationsPublishersModelsGenerateContentCall ¶
type ProjectsLocationsPublishersModelsGenerateContentCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsPublishersModelsGenerateContentCall) Context ¶
func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsGenerateContentCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsPublishersModelsGenerateContentCall) Do ¶
func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, error)
Do executes the "firebaseml.projects.locations.publishers.models.generateContent" call. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsPublishersModelsGenerateContentCall) Fields ¶
func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsGenerateContentCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsPublishersModelsGenerateContentCall) Header ¶
func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type ProjectsLocationsPublishersModelsService ¶
type ProjectsLocationsPublishersModelsService struct {
// contains filtered or unexported fields
}
func NewProjectsLocationsPublishersModelsService ¶
func NewProjectsLocationsPublishersModelsService(s *Service) *ProjectsLocationsPublishersModelsService
func (*ProjectsLocationsPublishersModelsService) CountTokens ¶
func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall
CountTokens: Perform a token counting.
- endpoint: The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
func (*ProjectsLocationsPublishersModelsService) GenerateContent ¶
func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall
GenerateContent: Generate content with multimodal inputs.
- model: The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
func (*ProjectsLocationsPublishersModelsService) StreamGenerateContent ¶
func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall
StreamGenerateContent: Generate content with multimodal inputs with streaming support.
- model: The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
type ProjectsLocationsPublishersModelsStreamGenerateContentCall ¶
type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context ¶
func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall
Context sets the context to be used in this call's Do method.
func (*ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do ¶
func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, error)
Do executes the "firebaseml.projects.locations.publishers.models.streamGenerateContent" call. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields ¶
func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (*ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header ¶
func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
type ProjectsLocationsPublishersService ¶
type ProjectsLocationsPublishersService struct { Models *ProjectsLocationsPublishersModelsService // contains filtered or unexported fields }
func NewProjectsLocationsPublishersService ¶
func NewProjectsLocationsPublishersService(s *Service) *ProjectsLocationsPublishersService
type ProjectsLocationsService ¶
type ProjectsLocationsService struct { Publishers *ProjectsLocationsPublishersService // contains filtered or unexported fields }
func NewProjectsLocationsService ¶
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
type ProjectsService ¶
type ProjectsService struct { Locations *ProjectsLocationsService // contains filtered or unexported fields }
func NewProjectsService ¶
func NewProjectsService(s *Service) *ProjectsService
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Projects *ProjectsService // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.