Skip to content

GoogleVertexEndpoints

Namespace: Vercel.AI.Google

public static class GoogleVertexEndpoints

Vertex host and URL construction. Locations are single DNS labels so they cannot rewrite the host.

Inheritance: object

View source

public const string ExpressModeBaseUrl = "https://aiplatform.googleapis.com/v1/publishers/google"

Express Mode origin used when an API key is supplied.

Value: string

View source

AnthropicBaseUrl(string?, string?, string?)

Section titled “AnthropicBaseUrl(string?, string?, string?)”
public static string AnthropicBaseUrl(string? project, string? location, string? baseUrl)

Anthropic on Vertex publisher URL.

Parameters

Name Type Description
project string
location string
baseUrl string

Returns: string

View source

GeminiBaseUrl(string, string, string?, bool, bool)

Section titled “GeminiBaseUrl(string, string, string?, bool, bool)”
public static string GeminiBaseUrl(string project, string location, string? baseUrl, bool expressMode, bool endpointModel)

Publisher base URL for Gemini on Vertex. Tuned endpoints/ ids omit /publishers/google.

Parameters

Name Type Description
project string
location string
baseUrl string
expressMode bool
endpointModel bool

Returns: string

View source

public static string Host(string location)

Returns the Vertex AI host for <code class=“paramref”>location</code>. global uses the unprefixed host. eu and us use the multi-region REP host.

Parameters

Name Type Description
location string

Returns: string

View source

public static bool IsEndpointModel(string modelId)

True when the model id addresses a deployed endpoint.

Parameters

Name Type Description
modelId string

Returns: bool

View source

public static string MaasBaseUrl(string project, string? location, string? baseUrl)

OpenAI-compatible MaaS URL. An empty base URL is rebuilt from the project and location.

Parameters

Name Type Description
project string
location string
baseUrl string

Returns: string

View source

public static string RecognizeUrl(string project, string location)

Cloud Speech-to-Text recognize URL.

Parameters

Name Type Description
project string
location string

Returns: string

View source

public static string RequireLabel(string location, string name)

Rejects a location that is not one DNS label.

Parameters

Name Type Description
location string
name string

Returns: string

View source

public static string SpeechHost(string location)

Speech-to-Text host. global is speech.googleapis.com.

Parameters

Name Type Description
location string

Returns: string

View source

public static string XaiBaseUrl(string project, string? location, string? baseUrl)

xAI on Vertex always uses the global AI Platform host.

Parameters

Name Type Description
project string
location string
baseUrl string

Returns: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product