langchain4j-tools/component.json

392 lines
17 KiB
JSON

{
"component": {
"kind": "component",
"name": "langchain4j-tools",
"title": "LangChain4j Tools",
"description": "LangChain4j Tools and Function Calling Features",
"deprecated": false,
"firstVersion": "3.15.0",
"label": "ai",
"javaType": "org.apache.camel.component.langchain4j.tools.LangChain4jToolsComponent",
"supportLevel": "Stable",
"nativeSupported": true,
"metadata": {
"quarkusVersion": "3.36.0",
"camelArtifact": "org.apache.camel:camel-langchain4j-tools",
"camelVersion": "4.20.0"
},
"groupId": "org.apache.camel.quarkus",
"artifactId": "camel-quarkus-langchain4j-tools",
"version": "4.20.0 (CEQ 3.36.0)",
"scheme": "langchain4j-tools",
"extendsScheme": "",
"syntax": "langchain4j-tools:toolId",
"async": false,
"api": false,
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false,
"browsable": false,
"remote": true
},
"componentProperties": {
"configuration": {
"index": 0,
"kind": "property",
"displayName": "Configuration",
"group": "common",
"label": "",
"required": false,
"type": "object",
"javaType": "org.apache.camel.component.langchain4j.tools.LangChain4jToolsConfiguration",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "The configuration."
},
"bridgeErrorHandler": {
"index": 1,
"kind": "property",
"displayName": "Bridge Error Handler",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"lazyStartProducer": {
"index": 2,
"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."
},
"autowiredEnabled": {
"index": 3,
"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."
},
"chatModel": {
"index": 4,
"kind": "property",
"displayName": "Chat Model",
"group": "advanced",
"label": "advanced",
"required": false,
"type": "object",
"javaType": "dev.langchain4j.model.chat.ChatModel",
"deprecated": false,
"deprecationNote": "",
"autowired": true,
"secret": false,
"configurationClass": "org.apache.camel.component.langchain4j.tools.LangChain4jToolsConfiguration",
"configurationField": "configuration",
"description": "Chat Model of type dev.langchain4j.model.chat.ChatModel"
}
},
"properties": {
"toolId": {
"index": 0,
"kind": "path",
"displayName": "Tool Id",
"group": "common",
"label": "",
"required": true,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The tool id"
},
"tags": {
"index": 1,
"kind": "parameter",
"displayName": "Tags",
"group": "common",
"label": "",
"required": true,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The tags for the tools"
},
"description": {
"index": 2,
"kind": "parameter",
"displayName": "Description",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Tool description"
},
"exposed": {
"index": 3,
"kind": "parameter",
"displayName": "Exposed",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"defaultValue": true,
"description": "Whether the tool is automatically exposed to the LLM. When false, the tool is added to a searchable list and can be discovered via the tool-search-tool"
},
"name": {
"index": 4,
"kind": "parameter",
"displayName": "Name",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Tool name"
},
"parameters": {
"index": 5,
"kind": "parameter",
"displayName": "Parameters",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "object",
"javaType": "java.util.Map<java.lang.String, java.lang.String>",
"prefix": "parameter.",
"multiValue": true,
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "List of Tool parameters with optional metadata. Format: parameter.=, parameter..description=, parameter..required=, parameter..enum=. Example: parameter.location=string, parameter.location.description=The city and state, parameter.location.required=true, parameter.unit.enum=celsius,fahrenheit. This is a multi-value option with prefix: parameter."
},
"bridgeErrorHandler": {
"index": 6,
"kind": "parameter",
"displayName": "Bridge Error Handler",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"camelToolParameter": {
"index": 7,
"kind": "parameter",
"displayName": "Camel Tool Parameter",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.component.langchain4j.tools.spec.CamelSimpleToolParameter",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Tool's Camel Parameters, programmatically define Tool description and parameters"
},
"exceptionHandler": {
"index": 8,
"kind": "parameter",
"displayName": "Exception Handler",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.spi.ExceptionHandler",
"optionalPrefix": "consumer.",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"exchangePattern": {
"index": 9,
"kind": "parameter",
"displayName": "Exchange Pattern",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "enum",
"javaType": "org.apache.camel.ExchangePattern",
"enum": [
"InOnly",
"InOut"
],
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Sets the exchange pattern when the consumer creates an exchange."
},
"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 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."
},
"chatModel": {
"index": 11,
"kind": "parameter",
"displayName": "Chat Model",
"group": "advanced",
"label": "advanced",
"required": false,
"type": "object",
"javaType": "dev.langchain4j.model.chat.ChatModel",
"deprecated": false,
"deprecationNote": "",
"autowired": true,
"secret": false,
"configurationClass": "org.apache.camel.component.langchain4j.tools.LangChain4jToolsConfiguration",
"configurationField": "configuration",
"description": "Chat Model of type dev.langchain4j.model.chat.ChatModel"
}
},
"propertiesSchema": {
"properties": {
"toolId": {
"title": "Tool Id",
"description": "The tool id",
"type": "string",
"$comment": "group:common"
},
"tags": {
"title": "Tags",
"description": "The tags for the tools",
"type": "string",
"$comment": "group:common"
},
"description": {
"title": "Description",
"description": "Tool description",
"type": "string",
"$comment": "group:consumer"
},
"exposed": {
"title": "Exposed",
"description": "Whether the tool is automatically exposed to the LLM. When false, the tool is added to a searchable list and can be discovered via the tool-search-tool",
"type": "boolean",
"$comment": "group:consumer",
"default": true
},
"name": {
"title": "Name",
"description": "Tool name",
"type": "string",
"$comment": "group:consumer"
},
"parameters": {
"title": "Parameters",
"description": "List of Tool parameters with optional metadata. Format: parameter.=, parameter..description=, parameter..required=, parameter..enum=. Example: parameter.location=string, parameter.location.description=The city and state, parameter.location.required=true, parameter.unit.enum=celsius,fahrenheit. This is a multi-value option with prefix: parameter.",
"type": "object",
"$comment": "group:consumer"
},
"bridgeErrorHandler": {
"title": "Bridge Error Handler",
"description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.",
"type": "boolean",
"$comment": "group:consumer (advanced)",
"default": false
},
"camelToolParameter": {
"title": "Camel Tool Parameter",
"description": "Tool's Camel Parameters, programmatically define Tool description and parameters",
"type": "string",
"$comment": "group:consumer (advanced)",
"format": "bean:org.apache.camel.component.langchain4j.tools.spec.CamelSimpleToolParameter"
},
"exceptionHandler": {
"title": "Exception Handler",
"description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.",
"type": "string",
"$comment": "group:consumer (advanced)",
"format": "bean:org.apache.camel.spi.ExceptionHandler"
},
"exchangePattern": {
"title": "Exchange Pattern",
"description": "Sets the exchange pattern when the consumer creates an exchange.",
"type": "string",
"enum": [
"InOnly",
"InOut"
],
"$comment": "group:consumer (advanced)"
},
"lazyStartProducer": {
"title": "Lazy Start Producer",
"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.",
"type": "boolean",
"$comment": "group:producer (advanced)",
"default": false
},
"chatModel": {
"title": "Chat Model",
"description": "Chat Model of type dev.langchain4j.model.chat.ChatModel",
"type": "string",
"$comment": "group:advanced",
"format": "bean:dev.langchain4j.model.chat.ChatModel"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"toolId",
"tags"
]
}
}