Camel Spring Boot

Pinecone

Create and delete indexes and collections, and upsert, update, fetch, query and delete vectors in the Pinecone vector database.

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-pinecone-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 15 options, which are listed below.

Name Description Default Type

camel.component.pinecone.action

The action to perform. The CamelPineconeAction header, when set, wins over this option.

PineconeVectorDbAction

camel.component.pinecone.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.pinecone.cloud

The cloud provider that hosts the serverless index that CREATE_SERVERLESS_INDEX creates, which requires it. CREATE_POD_INDEX does not use it. The CamelPineconeCollectionCloud header, when set, wins over this option.

String

camel.component.pinecone.cloud-region

The region of the cloud provider that hosts the serverless index that CREATE_SERVERLESS_INDEX creates, such as us-east-1, which it requires. CREATE_POD_INDEX does not use it. The CamelPineconeCollectionCloudRegion header, when set, wins over this option.

String

camel.component.pinecone.collection-dimension

The number of dimensions of the vectors in the index that CREATE_SERVERLESS_INDEX and CREATE_POD_INDEX create, which must match the embedding model, and be at least 1. The CamelPineconeCollectionDimension header, when set, wins over this option.

1536

Integer

camel.component.pinecone.collection-similarity-metric

The similarity metric of the index that CREATE_SERVERLESS_INDEX and CREATE_POD_INDEX create: cosine, euclidean or dotproduct, in lower case. CREATE_SERVERLESS_INDEX requires it, CREATE_POD_INDEX uses cosine if not set. The CamelPineconeCollectionSimilarityMetric header, when set, wins over this option.

String

camel.component.pinecone.configuration

The configuration that the endpoints of this component start from: each endpoint gets a copy of it, and its own options override the copy. The option is a org.apache.camel.component.pinecone.PineconeVectorDbConfiguration type.

PineconeVectorDbConfiguration

camel.component.pinecone.enabled

Whether to enable auto configuration of the pinecone component. This is enabled by default.

Boolean

camel.component.pinecone.host

The base URL of the Pinecone control plane (REST), such as http://localhost:5080 for Pinecone Local. If not set, https://api.pinecone.io is used. The data plane (gRPC) connects to the host that Pinecone returns for the index, not to this one. Not used when a Pinecone client is set with PineconeVectorDbConfiguration.setClient().

String

camel.component.pinecone.index-name

The name of the index that the action works on, the index that CREATE_SERVERLESS_INDEX and CREATE_POD_INDEX create, or the source index of CREATE_COLLECTION. DELETE_COLLECTION does not use it. The CamelPineconeIndexName header, when set, wins over this option.

String

camel.component.pinecone.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.pinecone.proxy-host

The host name or IP address of an HTTP proxy that the control plane (REST) and data plane (gRPC) requests go through. Only used together with proxyPort. Not used when a Pinecone client is set with PineconeVectorDbConfiguration.setClient().

String

camel.component.pinecone.proxy-port

The port of the HTTP proxy that the control plane (REST) and data plane (gRPC) requests go through. Only used together with proxyHost. Not used when a Pinecone client is set with PineconeVectorDbConfiguration.setClient().

Integer

camel.component.pinecone.tls

Whether the data plane (gRPC) connection to the index uses TLS. Default false, unlike the Pinecone client, which enables TLS by default: with false, the vectors, and the API key in the api-key metadata, are sent in clear text. Set it to true for an index in the Pinecone cloud; false is for a local server such as Pinecone Local. The control plane (REST) uses the scheme of the host option instead. Not used when a Pinecone client is set with PineconeVectorDbConfiguration.setClient().

false

Boolean

camel.component.pinecone.token

The API key of the Pinecone project. The client sends it in the Api-Key header of the control plane (REST) requests and in the api-key metadata of the data plane (gRPC) requests. Required: without it, the producer fails to start. Not used when a Pinecone client is set with PineconeVectorDbConfiguration.setClient().

String