Skip to content

Commit

Permalink
Regen
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Jan 8, 2025
1 parent 2a7ce3b commit 1ee2a9e
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"configuration": { "index": 1, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.qdrant.QdrantConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "The configuration;" },
"host": { "index": 2, "kind": "property", "displayName": "Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "localhost", "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "The host to connect to." },
"lazyStartProducer": { "index": 3, "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 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." },
"port": { "index": 4, "kind": "property", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 6334, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "The port to connect to." },
"timeout": { "index": 5, "kind": "property", "displayName": "Timeout", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Sets a default timeout for all requests" },
"tls": { "index": 6, "kind": "property", "displayName": "Tls", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
"autowiredEnabled": { "index": 7, "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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }
"maxResults": { "index": 4, "kind": "property", "displayName": "Max Results", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Max results for similarity search" },
"port": { "index": 5, "kind": "property", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 6334, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "The port to connect to." },
"timeout": { "index": 6, "kind": "property", "displayName": "Timeout", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Sets a default timeout for all requests" },
"tls": { "index": 7, "kind": "property", "displayName": "Tls", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
"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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
"filter": { "index": 9, "kind": "property", "displayName": "Filter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.qdrant.client.grpc.Points.Filter", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Filter of type io.qdrant.client.grpc.Points.Points.Filter for similarity search. This is for advanced usage." }
},
"headers": {
"CamelQdrantAction": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "enum": [ "CREATE_COLLECTION", "DELETE_COLLECTION", "UPSERT", "RETRIEVE", "DELETE", "COLLECTION_INFO" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The action to be performed.", "constantName": "org.apache.camel.component.qdrant.Qdrant$Headers#ACTION" },
Expand All @@ -49,9 +51,11 @@
"collection": { "index": 0, "kind": "path", "displayName": "Collection", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The collection Name" },
"apiKey": { "index": 1, "kind": "parameter", "displayName": "Api Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Sets the API key to use for authentication" },
"host": { "index": 2, "kind": "parameter", "displayName": "Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "localhost", "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "The host to connect to." },
"port": { "index": 3, "kind": "parameter", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 6334, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "The port to connect to." },
"timeout": { "index": 4, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Sets a default timeout for all requests" },
"tls": { "index": 5, "kind": "parameter", "displayName": "Tls", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
"lazyStartProducer": { "index": 6, "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 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." }
"maxResults": { "index": 3, "kind": "parameter", "displayName": "Max Results", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Max results for similarity search" },
"port": { "index": 4, "kind": "parameter", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": 6334, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "The port to connect to." },
"timeout": { "index": 5, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Sets a default timeout for all requests" },
"tls": { "index": 6, "kind": "parameter", "displayName": "Tls", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Whether the client uses Transport Layer Security (TLS) to secure communications" },
"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 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." },
"filter": { "index": 8, "kind": "parameter", "displayName": "Filter", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.qdrant.client.grpc.Points.Filter", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.qdrant.QdrantConfiguration", "configurationField": "configuration", "description": "Filter of type io.qdrant.client.grpc.Points.Points.Filter for similarity search. This is for advanced usage." }
}
}
13 changes: 13 additions & 0 deletions components-starter/camel-qdrant-starter/src/main/docs/qdrant.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
"description": "Whether to enable auto configuration of the qdrant component. This is enabled by default.",
"sourceType": "org.apache.camel.component.qdrant.springboot.QdrantComponentConfiguration"
},
{
"name": "camel.component.qdrant.filter",
"type": "io.qdrant.client.grpc.Points$Filter",
"description": "Filter of type io.qdrant.client.grpc.Points.Points.Filter for similarity search. This is for advanced usage. The option is a io.qdrant.client.grpc.Points.Filter type.",
"sourceType": "org.apache.camel.component.qdrant.springboot.QdrantComponentConfiguration"
},
{
"name": "camel.component.qdrant.host",
"type": "java.lang.String",
Expand All @@ -57,6 +63,13 @@
"sourceType": "org.apache.camel.component.qdrant.springboot.QdrantComponentConfiguration",
"defaultValue": false
},
{
"name": "camel.component.qdrant.max-results",
"type": "java.lang.Integer",
"description": "Max results for similarity search",
"sourceType": "org.apache.camel.component.qdrant.springboot.QdrantComponentConfiguration",
"defaultValue": 3
},
{
"name": "camel.component.qdrant.port",
"type": "java.lang.Integer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.apache.camel.component.qdrant.springboot;

import java.time.Duration;
import io.qdrant.client.grpc.Points.Filter;
import org.apache.camel.component.qdrant.QdrantConfiguration;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;
Expand Down Expand Up @@ -60,6 +61,10 @@ public class QdrantComponentConfiguration
* and prolong the total processing time of the processing.
*/
private Boolean lazyStartProducer = false;
/**
* Max results for similarity search
*/
private Integer maxResults = 3;
/**
* The port to connect to.
*/
Expand All @@ -82,6 +87,12 @@ public class QdrantComponentConfiguration
* etc.
*/
private Boolean autowiredEnabled = true;
/**
* Filter of type io.qdrant.client.grpc.Points.Points.Filter for similarity
* search. This is for advanced usage. The option is a
* io.qdrant.client.grpc.Points.Filter type.
*/
private Filter filter;

public String getApiKey() {
return apiKey;
Expand Down Expand Up @@ -115,6 +126,14 @@ public void setLazyStartProducer(Boolean lazyStartProducer) {
this.lazyStartProducer = lazyStartProducer;
}

public Integer getMaxResults() {
return maxResults;
}

public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}

public Integer getPort() {
return port;
}
Expand Down Expand Up @@ -146,4 +165,12 @@ public Boolean getAutowiredEnabled() {
public void setAutowiredEnabled(Boolean autowiredEnabled) {
this.autowiredEnabled = autowiredEnabled;
}

public Filter getFilter() {
return filter;
}

public void setFilter(Filter filter) {
this.filter = filter;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class QdrantComponentConverter implements GenericConverter {
public Set<ConvertiblePair> getConvertibleTypes() {
Set<ConvertiblePair> answer = new LinkedHashSet<>();
answer.add(new ConvertiblePair(String.class, org.apache.camel.component.qdrant.QdrantConfiguration.class));
answer.add(new ConvertiblePair(String.class, io.qdrant.client.grpc.Points.Filter.class));
return answer;
}

Expand All @@ -57,6 +58,7 @@ public Object convert(
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
case "org.apache.camel.component.qdrant.QdrantConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.qdrant.QdrantConfiguration.class);
case "io.qdrant.client.grpc.Points.Filter": return applicationContext.getBean(ref, io.qdrant.client.grpc.Points.Filter.class);
}
return null;
}
Expand Down

0 comments on commit 1ee2a9e

Please sign in to comment.