VertexAIConfig

org.llm4s.llmconnect.config.VertexAIConfig
See theVertexAIConfig companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(projectId: String, location: String, model: String, credentialFilePath: Option[String], contextWindow: Int, reserveCompletion: Int, timeouts: ProviderTimeouts, wellKnownCredentialPath: Option[String], googleSearch: Boolean): VertexAIConfig

Builds a config without validating it; fromValues validates. timeouts defaults to ProviderTimeouts.default, wellKnownCredentialPath to None and googleSearch to false.

Builds a config without validating it; fromValues validates. timeouts defaults to ProviderTimeouts.default, wellKnownCredentialPath to None and googleSearch to false.

Attributes

def apply(projectId: String, model: String): VertexAIConfig

The project and model, every other field at its default: the entry point for Java and Kotlin, which do not see Scala default arguments. The location is DEFAULT_LOCATION, there is no credential file (Application Default Credentials are used), Google Search grounding is off, and the context window is 1M tokens with an 8192-token completion reserve; set them, and the rest, with the with* setters, or use fromValues to consult the bundled model catalogue.

The project and model, every other field at its default: the entry point for Java and Kotlin, which do not see Scala default arguments. The location is DEFAULT_LOCATION, there is no credential file (Application Default Credentials are used), Google Search grounding is off, and the context window is 1M tokens with an 8192-token completion reserve; set them, and the rest, with the with* setters, or use fromValues to consult the bundled model catalogue.

Attributes

def fromValues(modelName: String, projectId: String, location: String, credentialFilePath: Option[String])(using resolver: ContextWindowResolver): Result[VertexAIConfig]

Constructs a VertexAIConfig, resolving contextWindow and reserveCompletion from the model registry if available.

Constructs a VertexAIConfig, resolving contextWindow and reserveCompletion from the model registry if available.

Value parameters

credentialFilePath

Optional path to a Google JSON credential file.

location

GCP region (defaults to "us-central1").

modelName

Model identifier, e.g. "gemini-2.0-flash".

projectId

GCP project ID.

Attributes

Concrete fields

val DEFAULT_LOCATION: String

The GCP region used when a named provider section sets no location.

The GCP region used when a named provider section sets no location.

DefaultConfig.DEFAULT_VERTEXAI_LOCATION duplicated this in llm4s-core until the provider moved to llm4s-gemini (#1132).

Attributes