Google Vertex AI

Interact with Google Cloud Vertex AI generative models.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-google-vertexai-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 19 options, which are listed below.

Name Description Default Type

camel.component.google-vertexai.anthropic-version

Anthropic API version for Claude models. Required when publisher is 'anthropic'.

vertex-2023-10-16

String

camel.component.google-vertexai.autowired-enabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

Boolean

camel.component.google-vertexai.candidate-count

Number of candidate responses to generate

1

Integer

camel.component.google-vertexai.client

The Google GenAI client for Vertex AI. The option is a com.google.genai.Client type.

Client

camel.component.google-vertexai.configuration

The component configuration. The option is a org.apache.camel.component.google.vertexai.GoogleVertexAIConfiguration type.

GoogleVertexAIConfiguration

camel.component.google-vertexai.enabled

Whether to enable auto configuration of the google-vertexai component. This is enabled by default.

Boolean

camel.component.google-vertexai.health-check-consumer-enabled

Used for enabling or disabling all consumer based health checks from this component

true

Boolean

camel.component.google-vertexai.health-check-producer-enabled

Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true.

true

Boolean

camel.component.google-vertexai.json-mode

Whether to use JSON request/response format

false

Boolean

camel.component.google-vertexai.lazy-start-producer

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

Boolean

camel.component.google-vertexai.max-output-tokens

Maximum number of output tokens

1024

Integer

camel.component.google-vertexai.operation

Set the operation for the producer

GoogleVertexAIOperations

camel.component.google-vertexai.prediction-service-client

The Google Cloud AI Platform Prediction Service client for rawPredict operations. The option is a com.google.cloud.aiplatform.v1.PredictionServiceClient type.

PredictionServiceClient

camel.component.google-vertexai.publisher

Publisher name for partner models (e.g., anthropic, meta, mistralai). Required for rawPredict operations.

String

camel.component.google-vertexai.service-account-key

The Service account key that can be used as credentials for the Vertex AI client. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems.

String

camel.component.google-vertexai.stream-output-mode

Streaming output mode: complete (default) or chunks

complete

String

camel.component.google-vertexai.temperature

Temperature parameter for generation (0.0-1.0)

Float

camel.component.google-vertexai.top-k

Top-K parameter for generation

40

Integer

camel.component.google-vertexai.top-p

Top-P parameter for nucleus sampling

Float