You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2025/02/27 07:23:58 UTC
(camel) 03/13: Add proxyHost, proxyPort, and tls options to camel-pinecone (#17284)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 51ad70ff90446175e760a6248bd15f2d9ff3c7ba
Author: Tom Cunningham <tc...@redhat.com>
AuthorDate: Wed Feb 26 14:29:31 2025 -0500
Add proxyHost, proxyPort, and tls options to camel-pinecone (#17284)
---
.../apache/camel/catalog/components/pinecone.json | 14 ++--
.../PineconeVectorDbComponentConfigurer.java | 15 +++++
.../PineconeVectorDbConfigurationConfigurer.java | 15 +++++
.../PineconeVectorDbEndpointConfigurer.java | 15 +++++
.../PineconeVectorDbEndpointUriFactory.java | 5 +-
.../apache/camel/component/pinecone/pinecone.json | 14 ++--
.../pinecone/PineconeVectorDbConfiguration.java | 42 ++++++++++++
.../pinecone/PineconeVectorDbEndpoint.java | 12 +++-
.../PineconeComponentConfigurationTest.java | 3 +
.../src/test/resources/pinecone_index.properties | 6 +-
.../dsl/PineconeComponentBuilderFactory.java | 51 +++++++++++++++
.../PineconeVectorDbEndpointBuilderFactory.java | 75 ++++++++++++++++++++++
12 files changed, 256 insertions(+), 11 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pinecone.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pinecone.json
index 3419caa1b63..bc2ea0bcd5b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pinecone.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pinecone.json
@@ -31,8 +31,11 @@
"configuration": { "index": 4, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "The configuration;" },
"indexName": { "index": 5, "kind": "property", "displayName": "Index Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the index name to use" },
"lazyStartProducer": { "index": 6, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 [...]
- "token": { "index": 7, "kind": "property", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
- "autowiredEnabled": { "index": 8, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "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 t [...]
+ "proxyHost": { "index": 7, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy host" },
+ "proxyPort": { "index": 8, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy port" },
+ "tls": { "index": 9, "kind": "property", "displayName": "Tls", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
+ "token": { "index": 10, "kind": "property", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "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 [...]
},
"headers": {
"CamelPineconeAction": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "enum": [ "CREATE_COLLECTION", "CREATE_INDEX", "UPSERT", "INSERT", "SEARCH", "DELETE", "UPDATE", "QUERY", "QUERY_BY_ID" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The action to be performed.", "constantName": "org.apache.camel.component.pinecone.PineconeVectorDb$Headers#ACTION" },
@@ -56,7 +59,10 @@
"collectionDimension": { "index": 3, "kind": "parameter", "displayName": "Collection Dimension", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the Collection Dimension to use (1-1536)" },
"collectionSimilarityMetric": { "index": 4, "kind": "parameter", "displayName": "Collection Similarity Metric", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the Collection Similarity Metric to use (cosine\/euclide [...]
"indexName": { "index": 5, "kind": "parameter", "displayName": "Index Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the index name to use" },
- "token": { "index": 6, "kind": "parameter", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
- "lazyStartProducer": { "index": 7, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 produc [...]
+ "proxyHost": { "index": 6, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy host" },
+ "proxyPort": { "index": 7, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy port" },
+ "tls": { "index": 8, "kind": "parameter", "displayName": "Tls", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
+ "token": { "index": 9, "kind": "parameter", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
+ "lazyStartProducer": { "index": 10, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 produ [...]
}
}
diff --git a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbComponentConfigurer.java b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbComponentConfigurer.java
index 410362fea3a..539cfee4b61 100644
--- a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbComponentConfigurer.java
+++ b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbComponentConfigurer.java
@@ -44,6 +44,11 @@ public class PineconeVectorDbComponentConfigurer extends PropertyConfigurerSuppo
case "indexName": getOrCreateConfiguration(target).setIndexName(property(camelContext, java.lang.String.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "tls": getOrCreateConfiguration(target).setTls(property(camelContext, boolean.class, value)); return true;
case "token": getOrCreateConfiguration(target).setToken(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
}
@@ -66,6 +71,11 @@ public class PineconeVectorDbComponentConfigurer extends PropertyConfigurerSuppo
case "indexName": return java.lang.String.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "tls": return boolean.class;
case "token": return java.lang.String.class;
default: return null;
}
@@ -89,6 +99,11 @@ public class PineconeVectorDbComponentConfigurer extends PropertyConfigurerSuppo
case "indexName": return getOrCreateConfiguration(target).getIndexName();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
+ case "proxyhost":
+ case "proxyHost": return getOrCreateConfiguration(target).getProxyHost();
+ case "proxyport":
+ case "proxyPort": return getOrCreateConfiguration(target).getProxyPort();
+ case "tls": return getOrCreateConfiguration(target).isTls();
case "token": return getOrCreateConfiguration(target).getToken();
default: return null;
}
diff --git a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbConfigurationConfigurer.java b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbConfigurationConfigurer.java
index 5192a73ec7c..aebba00cc55 100644
--- a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbConfigurationConfigurer.java
+++ b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbConfigurationConfigurer.java
@@ -33,6 +33,11 @@ public class PineconeVectorDbConfigurationConfigurer extends org.apache.camel.su
case "collectionSimilarityMetric": target.setCollectionSimilarityMetric(property(camelContext, java.lang.String.class, value)); return true;
case "indexname":
case "indexName": target.setIndexName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": target.setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": target.setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "tls": target.setTls(property(camelContext, boolean.class, value)); return true;
case "token": target.setToken(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
}
@@ -51,6 +56,11 @@ public class PineconeVectorDbConfigurationConfigurer extends org.apache.camel.su
case "collectionSimilarityMetric": return java.lang.String.class;
case "indexname":
case "indexName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "tls": return boolean.class;
case "token": return java.lang.String.class;
default: return null;
}
@@ -70,6 +80,11 @@ public class PineconeVectorDbConfigurationConfigurer extends org.apache.camel.su
case "collectionSimilarityMetric": return target.getCollectionSimilarityMetric();
case "indexname":
case "indexName": return target.getIndexName();
+ case "proxyhost":
+ case "proxyHost": return target.getProxyHost();
+ case "proxyport":
+ case "proxyPort": return target.getProxyPort();
+ case "tls": return target.isTls();
case "token": return target.getToken();
default: return null;
}
diff --git a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointConfigurer.java b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointConfigurer.java
index 109b265e4b3..353ccb4c45c 100644
--- a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointConfigurer.java
+++ b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointConfigurer.java
@@ -34,6 +34,11 @@ public class PineconeVectorDbEndpointConfigurer extends PropertyConfigurerSuppor
case "indexName": target.getConfiguration().setIndexName(property(camelContext, java.lang.String.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": target.getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "tls": target.getConfiguration().setTls(property(camelContext, boolean.class, value)); return true;
case "token": target.getConfiguration().setToken(property(camelContext, java.lang.String.class, value)); return true;
default: return false;
}
@@ -53,6 +58,11 @@ public class PineconeVectorDbEndpointConfigurer extends PropertyConfigurerSuppor
case "indexName": return java.lang.String.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "tls": return boolean.class;
case "token": return java.lang.String.class;
default: return null;
}
@@ -73,6 +83,11 @@ public class PineconeVectorDbEndpointConfigurer extends PropertyConfigurerSuppor
case "indexName": return target.getConfiguration().getIndexName();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
+ case "proxyhost":
+ case "proxyHost": return target.getConfiguration().getProxyHost();
+ case "proxyport":
+ case "proxyPort": return target.getConfiguration().getProxyPort();
+ case "tls": return target.getConfiguration().isTls();
case "token": return target.getConfiguration().getToken();
default: return null;
}
diff --git a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointUriFactory.java b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointUriFactory.java
index ce8e48b99d6..ea2b1e3323d 100644
--- a/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointUriFactory.java
+++ b/components/camel-ai/camel-pinecone/src/generated/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpointUriFactory.java
@@ -23,7 +23,7 @@ public class PineconeVectorDbEndpointUriFactory extends org.apache.camel.support
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(8);
+ Set<String> props = new HashSet<>(11);
props.add("cloud");
props.add("cloudRegion");
props.add("collection");
@@ -31,6 +31,9 @@ public class PineconeVectorDbEndpointUriFactory extends org.apache.camel.support
props.add("collectionSimilarityMetric");
props.add("indexName");
props.add("lazyStartProducer");
+ props.add("proxyHost");
+ props.add("proxyPort");
+ props.add("tls");
props.add("token");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
Set<String> secretProps = new HashSet<>(1);
diff --git a/components/camel-ai/camel-pinecone/src/generated/resources/META-INF/org/apache/camel/component/pinecone/pinecone.json b/components/camel-ai/camel-pinecone/src/generated/resources/META-INF/org/apache/camel/component/pinecone/pinecone.json
index 3419caa1b63..bc2ea0bcd5b 100644
--- a/components/camel-ai/camel-pinecone/src/generated/resources/META-INF/org/apache/camel/component/pinecone/pinecone.json
+++ b/components/camel-ai/camel-pinecone/src/generated/resources/META-INF/org/apache/camel/component/pinecone/pinecone.json
@@ -31,8 +31,11 @@
"configuration": { "index": 4, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "The configuration;" },
"indexName": { "index": 5, "kind": "property", "displayName": "Index Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the index name to use" },
"lazyStartProducer": { "index": 6, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 [...]
- "token": { "index": 7, "kind": "property", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
- "autowiredEnabled": { "index": 8, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "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 t [...]
+ "proxyHost": { "index": 7, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy host" },
+ "proxyPort": { "index": 8, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy port" },
+ "tls": { "index": 9, "kind": "property", "displayName": "Tls", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
+ "token": { "index": 10, "kind": "property", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "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 [...]
},
"headers": {
"CamelPineconeAction": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "enum": [ "CREATE_COLLECTION", "CREATE_INDEX", "UPSERT", "INSERT", "SEARCH", "DELETE", "UPDATE", "QUERY", "QUERY_BY_ID" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The action to be performed.", "constantName": "org.apache.camel.component.pinecone.PineconeVectorDb$Headers#ACTION" },
@@ -56,7 +59,10 @@
"collectionDimension": { "index": 3, "kind": "parameter", "displayName": "Collection Dimension", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the Collection Dimension to use (1-1536)" },
"collectionSimilarityMetric": { "index": 4, "kind": "parameter", "displayName": "Collection Similarity Metric", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the Collection Similarity Metric to use (cosine\/euclide [...]
"indexName": { "index": 5, "kind": "parameter", "displayName": "Index Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the index name to use" },
- "token": { "index": 6, "kind": "parameter", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
- "lazyStartProducer": { "index": 7, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 produc [...]
+ "proxyHost": { "index": 6, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy host" },
+ "proxyPort": { "index": 7, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Set the proxy port" },
+ "tls": { "index": 8, "kind": "parameter", "displayName": "Tls", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
+ "token": { "index": 9, "kind": "parameter", "displayName": "Token", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.pinecone.PineconeVectorDbConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
+ "lazyStartProducer": { "index": 10, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 produ [...]
}
}
diff --git a/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbConfiguration.java b/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbConfiguration.java
index df06a7076ab..675b9541ae1 100644
--- a/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbConfiguration.java
+++ b/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbConfiguration.java
@@ -49,6 +49,15 @@ public class PineconeVectorDbConfiguration implements Cloneable {
@UriParam(label = "producer")
private String cloudRegion;
+ @UriParam(label = "producer")
+ private String proxyHost;
+
+ @UriParam(label = "producer")
+ private Integer proxyPort;
+
+ @UriParam(defaultValue = "true", label = "producer")
+ private boolean tls;
+
public String getIndexName() {
return indexName;
}
@@ -104,6 +113,39 @@ public class PineconeVectorDbConfiguration implements Cloneable {
this.cloudRegion = cloudRegion;
}
+ public String getProxyHost() {
+ return proxyHost;
+ }
+
+ /**
+ * Set the proxy host
+ */
+ public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+ }
+
+ public Integer getProxyPort() {
+ return proxyPort;
+ }
+
+ /**
+ * Set the proxy port
+ */
+ public void setProxyPort(Integer proxyPort) {
+ this.proxyPort = proxyPort;
+ }
+
+ public boolean isTls() {
+ return tls;
+ }
+
+ /**
+ * Whether the client uses Transport Layer Security (TLS) to secure communications
+ */
+ public void setTls(boolean tls) {
+ this.tls = tls;
+ }
+
public String getToken() {
return token;
}
diff --git a/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpoint.java b/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpoint.java
index 00b663e7e45..cc158b55d24 100644
--- a/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpoint.java
+++ b/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDbEndpoint.java
@@ -110,7 +110,17 @@ public class PineconeVectorDbEndpoint extends DefaultEndpoint {
private Pinecone createClient() {
- Pinecone pinecone = new Pinecone.Builder(configuration.getToken()).build();
+ Pinecone pinecone;
+ boolean tls = configuration.isTls();
+
+ // Check to see if a proxyHost/proxyPort pair is configured
+ if ((getConfiguration().getProxyHost() != null) &&
+ (getConfiguration().getProxyPort() != null)) {
+ pinecone = new Pinecone.Builder(configuration.getToken()).withProxy(getConfiguration().getProxyHost(),
+ getConfiguration().getProxyPort().intValue()).withTlsEnabled(tls).build();
+ } else {
+ pinecone = new Pinecone.Builder(configuration.getToken()).withTlsEnabled(tls).build();
+ }
return pinecone;
}
diff --git a/components/camel-ai/camel-pinecone/src/test/java/org/apache/camel/component/pinecone/PineconeComponentConfigurationTest.java b/components/camel-ai/camel-pinecone/src/test/java/org/apache/camel/component/pinecone/PineconeComponentConfigurationTest.java
index 7095f941b0d..bf5cd889f69 100644
--- a/components/camel-ai/camel-pinecone/src/test/java/org/apache/camel/component/pinecone/PineconeComponentConfigurationTest.java
+++ b/components/camel-ai/camel-pinecone/src/test/java/org/apache/camel/component/pinecone/PineconeComponentConfigurationTest.java
@@ -60,6 +60,9 @@ public class PineconeComponentConfigurationTest extends CamelTestSupport {
assertEquals(3, endpoint.getConfiguration().getCollectionDimension());
assertEquals("aws", endpoint.getConfiguration().getCloud());
assertEquals("us-east-1", endpoint.getConfiguration().getCloudRegion());
+ assertEquals("localhost", endpoint.getConfiguration().getProxyHost());
+ assertEquals(9080, endpoint.getConfiguration().getProxyPort().intValue());
+ assertEquals(false, endpoint.getConfiguration().isTls());
}
}
diff --git a/components/camel-ai/camel-pinecone/src/test/resources/pinecone_index.properties b/components/camel-ai/camel-pinecone/src/test/resources/pinecone_index.properties
index 8c563a7821d..9672dd67b2f 100644
--- a/components/camel-ai/camel-pinecone/src/test/resources/pinecone_index.properties
+++ b/components/camel-ai/camel-pinecone/src/test/resources/pinecone_index.properties
@@ -18,4 +18,8 @@ indexName=test-serverless-index
collectionSimilarityMetric=cosine
collectionDimension=3
cloud=aws
-cloudRegion=us-east-1
\ No newline at end of file
+cloudRegion=us-east-1
+
+proxyHost=localhost
+proxyPort=9080
+tls=false
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PineconeComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PineconeComponentBuilderFactory.java
index 1adfdd0dfb4..1aff1b0c8f5 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PineconeComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/PineconeComponentBuilderFactory.java
@@ -167,6 +167,54 @@ public interface PineconeComponentBuilderFactory {
return this;
}
+ /**
+ * Set the proxy host.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default PineconeComponentBuilder proxyHost(java.lang.String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+
+ /**
+ * Set the proxy port.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: producer
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default PineconeComponentBuilder proxyPort(java.lang.Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+
+
+ /**
+ * Whether the client uses Transport Layer Security (TLS) to secure
+ * communications.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: producer
+ *
+ * @param tls the value to set
+ * @return the dsl builder
+ */
+ default PineconeComponentBuilder tls(boolean tls) {
+ doSetProperty("tls", tls);
+ return this;
+ }
+
/**
* Sets the API key to use for authentication.
*
@@ -231,6 +279,9 @@ public interface PineconeComponentBuilderFactory {
case "configuration": ((PineconeVectorDbComponent) component).setConfiguration((org.apache.camel.component.pinecone.PineconeVectorDbConfiguration) value); return true;
case "indexName": getOrCreateConfiguration((PineconeVectorDbComponent) component).setIndexName((java.lang.String) value); return true;
case "lazyStartProducer": ((PineconeVectorDbComponent) component).setLazyStartProducer((boolean) value); return true;
+ case "proxyHost": getOrCreateConfiguration((PineconeVectorDbComponent) component).setProxyHost((java.lang.String) value); return true;
+ case "proxyPort": getOrCreateConfiguration((PineconeVectorDbComponent) component).setProxyPort((java.lang.Integer) value); return true;
+ case "tls": getOrCreateConfiguration((PineconeVectorDbComponent) component).setTls((boolean) value); return true;
case "token": getOrCreateConfiguration((PineconeVectorDbComponent) component).setToken((java.lang.String) value); return true;
case "autowiredEnabled": ((PineconeVectorDbComponent) component).setAutowiredEnabled((boolean) value); return true;
default: return false;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PineconeVectorDbEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PineconeVectorDbEndpointBuilderFactory.java
index 3b92a950009..a31b50da267 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PineconeVectorDbEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PineconeVectorDbEndpointBuilderFactory.java
@@ -130,6 +130,81 @@ public interface PineconeVectorDbEndpointBuilderFactory {
doSetProperty("indexName", indexName);
return this;
}
+ /**
+ * Set the proxy host.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default PineconeVectorDbEndpointBuilder proxyHost(String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * Set the proxy port.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: producer
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default PineconeVectorDbEndpointBuilder proxyPort(Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * Set the proxy port.
+ *
+ * The option will be converted to a <code>java.lang.Integer</code>
+ * type.
+ *
+ * Group: producer
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default PineconeVectorDbEndpointBuilder proxyPort(String proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * Whether the client uses Transport Layer Security (TLS) to secure
+ * communications.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: producer
+ *
+ * @param tls the value to set
+ * @return the dsl builder
+ */
+ default PineconeVectorDbEndpointBuilder tls(boolean tls) {
+ doSetProperty("tls", tls);
+ return this;
+ }
+ /**
+ * Whether the client uses Transport Layer Security (TLS) to secure
+ * communications.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: producer
+ *
+ * @param tls the value to set
+ * @return the dsl builder
+ */
+ default PineconeVectorDbEndpointBuilder tls(String tls) {
+ doSetProperty("tls", tls);
+ return this;
+ }
/**
* Sets the API key to use for authentication.
*