VertexAiRagMemoryService

constructor(project: String, location: String, ragCorpus: String, similarityTopK: Int? = null, vectorDistanceThreshold: Double = DEFAULT_VECTOR_DISTANCE_THRESHOLD, credentials: GoogleCredentials = GoogleApiClient.defaultCredentials(), httpClient: HttpClient = HttpClient(Java))

Creates a service for the given RAG corpus in project and location.

Parameters

project

The Google Cloud project. Required and read only from here, never the environment.

location

The Google Cloud location. Required and read only from here, never the environment. The special value "global" selects the global endpoint.

ragCorpus

The bare corpus id (e.g. my-corpus). It is expanded to projects/{project}/locations/{location}/ragCorpora/{id}; a full resource name is rejected.

similarityTopK

The number of contexts to retrieve.

vectorDistanceThreshold

Only return contexts with a vector distance below this threshold.

credentials

Credentials for the Vertex AI API; defaults to application-default credentials scoped for Google Cloud Platform.

httpClient

The underlying ktor HttpClient.