View Source GoogleApi.AIPlatform.V1.Api.Endpoints (google_api_ai_platform v0.15.0)
API calls for all endpoints tagged Endpoints
.
Summary
Functions
Return a list of tokens based on the input text.
Perform a token counting.
Generate content with multimodal inputs.
Generate content with multimodal inputs with streaming support.
Functions
Link to this function
aiplatform_endpoints_compute_tokens(connection, endpoint, optional_params \\ [], opts \\ [])
View Source@spec aiplatform_endpoints_compute_tokens( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ComputeTokensResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Return a list of tokens based on the input text.
Parameters
-
connection
(type:GoogleApi.AIPlatform.V1.Connection.t
) - Connection to server -
endpoint
(type:String.t
) - Required. The name of the Endpoint requested to get lists of tokens and token ids. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ComputeTokensRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ComputeTokensResponse{}}
on success -
{:error, info}
on failure
Link to this function
aiplatform_endpoints_count_tokens(connection, endpoint, optional_params \\ [], opts \\ [])
View Source@spec aiplatform_endpoints_count_tokens( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CountTokensResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Perform a token counting.
Parameters
-
connection
(type:GoogleApi.AIPlatform.V1.Connection.t
) - Connection to server -
endpoint
(type:String.t
) - Required. The name of the Endpoint requested to perform token counting. Format:projects/{project}/locations/{location}/endpoints/{endpoint}
-
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CountTokensRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CountTokensResponse{}}
on success -
{:error, info}
on failure
Link to this function
aiplatform_endpoints_generate_content(connection, model, optional_params \\ [], opts \\ [])
View Source@spec aiplatform_endpoints_generate_content( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Generate content with multimodal inputs.
Parameters
-
connection
(type:GoogleApi.AIPlatform.V1.Connection.t
) - Connection to server -
model
(type:String.t
) - Required. 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}
-
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponse{}}
on success -
{:error, info}
on failure
Link to this function
aiplatform_endpoints_stream_generate_content(connection, model, optional_params \\ [], opts \\ [])
View Source@spec aiplatform_endpoints_stream_generate_content( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Generate content with multimodal inputs with streaming support.
Parameters
-
connection
(type:GoogleApi.AIPlatform.V1.Connection.t
) - Connection to server -
model
(type:String.t
) - Required. 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}
-
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponse{}}
on success -
{:error, info}
on failure