VertexAIPreview

VertexAIPreview

The preview namespace for VertexAI. Users invoke the getGenerativeModel method to start using generative AI features that are in preview.

Constructor

new VertexAIPreview(project, location, googleAuth, apiEndpoint)

Parameters:
Name Type Description
project

The Google Cloud project to use for the request

location

location The Google Cloud project location to use for the request

googleAuth

The GoogleAuthen class instance from google-auth-library. Complete list of authentication options is documented in the GoogleAuthOptions interface: https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts

apiEndpoint

[apiEndpoint] The base Vertex AI endpoint to use for the request. If not provided, the default regionalized endpoint (i.e. us-central1-aiplatform.googleapis.com) will be used.

Methods

getGenerativeModel(modelParams)

Parameters:
Name Type Description
modelParams

ModelParams Parameters to specify the generative model.

Returns:
Type Description

Instance of the GenerativeModelPreview class.