Skip to content

GoogleVertexAuth

Namespace: Vercel.AI.Google

public static class GoogleVertexAuth

Header construction for Vertex. Live Application Default Credentials are not contacted.

Inheritance: object

View source

Bearer(string, IReadOnlyDictionary<string, string?>?)

Section titled “Bearer(string, IReadOnlyDictionary<string, string?>?)”
public static IReadOnlyDictionary<string, string?> Bearer(string accessToken, IReadOnlyDictionary<string, string?>? headers = null)

Bearer header for an access token that the caller already obtained.

Parameters

Name Type Description
accessToken string
headers IReadOnlyDictionary<string, string>

Returns: IReadOnlyDictionary<string, string>

View source

Express(string, IReadOnlyDictionary<string, string?>?)

Section titled “Express(string, IReadOnlyDictionary<string, string?>?)”
public static IReadOnlyDictionary<string, string?> Express(string apiKey, IReadOnlyDictionary<string, string?>? headers = null)

Express Mode sends the API key and does not add a bearer token.

Parameters

Name Type Description
apiKey string
headers IReadOnlyDictionary<string, string>

Returns: IReadOnlyDictionary<string, string>

View source

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