Add component definition: torchserve

This commit is contained in:
gitea_admin 2026-03-11 14:33:49 +00:00
parent 5fd715d062
commit 79388f2981

503
component.json Normal file
View File

@ -0,0 +1,503 @@
{
"component": {
"kind": "component",
"name": "torchserve",
"title": "TorchServe",
"description": "Provide access to PyTorch TorchServe servers to run inference with PyTorch models remotely",
"deprecated": false,
"firstVersion": "4.9.0",
"label": "ai",
"javaType": "org.apache.camel.component.torchserve.TorchServeComponent",
"supportLevel": "Preview",
"groupId": "org.apache.camel",
"artifactId": "camel-torchserve",
"version": "4.10.2",
"scheme": "torchserve",
"extendsScheme": "",
"syntax": "torchserve:api/operation",
"async": false,
"api": false,
"consumerOnly": false,
"producerOnly": true,
"lenientProperties": false,
"browsable": false,
"remote": true
},
"headers": {
"CamelTorchServeModelName": {
"index": 0,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The name of model.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#MODEL_NAME"
},
"CamelTorchServeModelVersion": {
"index": 1,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The version of model.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#MODEL_VERSION"
},
"CamelTorchServeUrl": {
"index": 2,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Model archive download url, support local file or HTTP(s) protocol. For S3, consider using pre-signed url.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#URL"
},
"CamelTorchServeRegisterOptions": {
"index": 3,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "org.apache.camel.component.torchserve.client.model.RegisterOptions",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Additional options for the register operation.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#REGISTER_OPTIONS"
},
"CamelTorchServeScaleWorkerOptions": {
"index": 4,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "org.apache.camel.component.torchserve.client.model.ScaleWorkerOptions",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Additional options for the scale-worker operation.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#SCALE_WORKER_OPTIONS"
},
"CamelTorchServeUnrsegisterOptions": {
"index": 5,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "org.apache.camel.component.torchserve.client.model.UnregisterOptions",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Additional options for the unregister operation.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#UNREGISTER_OPTIONS"
},
"CamelTorchServeListLimit": {
"index": 6,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "Integer",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The maximum number of items to return for the list operation. When this value is present, TorchServe does not return more than the specified number of items, but it might return fewer. This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#LIST_LIMIT"
},
"CamelTorchServeListNextPageToken": {
"index": 7,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The token to retrieve the next set of results for the list operation. TorchServe provides the token when the response from a previous call has more results than the maximum page size.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#LIST_NEXT_PAGE_TOKEN"
},
"CamelTorchServeMetricsName": {
"index": 8,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "",
"required": false,
"javaType": "String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Names of metrics to filter.",
"constantName": "org.apache.camel.component.torchserve.TorchServeConstants#METRICS_NAME"
}
},
"properties": {
"api": {
"index": 0,
"kind": "path",
"displayName": "Api",
"group": "producer",
"label": "",
"required": true,
"type": "string",
"javaType": "java.lang.String",
"enum": [
"inference",
"management",
"metrics"
],
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The TorchServe API"
},
"operation": {
"index": 1,
"kind": "path",
"displayName": "Operation",
"group": "producer",
"label": "",
"required": true,
"type": "string",
"javaType": "java.lang.String",
"enum": [
"ping",
"predictions",
"explanations",
"register",
"scale-worker",
"describe",
"unregister",
"list",
"set-default",
"metrics"
],
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The API operation"
},
"modelName": {
"index": 2,
"kind": "parameter",
"displayName": "Model Name",
"group": "common",
"label": "common",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The name of model."
},
"modelVersion": {
"index": 3,
"kind": "parameter",
"displayName": "Model Version",
"group": "common",
"label": "common",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The version of model."
},
"lazyStartProducer": {
"index": 4,
"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."
},
"inferenceAddress": {
"index": 5,
"kind": "parameter",
"displayName": "Inference Address",
"group": "inference",
"label": "inference",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The address of the inference API endpoint."
},
"inferencePort": {
"index": 6,
"kind": "parameter",
"displayName": "Inference Port",
"group": "inference",
"label": "inference",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 8080,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The port of the inference API endpoint."
},
"listLimit": {
"index": 7,
"kind": "parameter",
"displayName": "List Limit",
"group": "management",
"label": "management",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 100,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The maximum number of items to return for the list operation. When this value is present, TorchServe does not return more than the specified number of items, but it might return fewer. This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100."
},
"listNextPageToken": {
"index": 8,
"kind": "parameter",
"displayName": "List Next Page Token",
"group": "management",
"label": "management",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The token to retrieve the next set of results for the list operation. TorchServe provides the token when the response from a previous call has more results than the maximum page size."
},
"managementAddress": {
"index": 9,
"kind": "parameter",
"displayName": "Management Address",
"group": "management",
"label": "management",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The address of the management API endpoint."
},
"managementPort": {
"index": 10,
"kind": "parameter",
"displayName": "Management Port",
"group": "management",
"label": "management",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 8081,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The port of the management API endpoint."
},
"registerOptions": {
"index": 11,
"kind": "parameter",
"displayName": "Register Options",
"group": "management",
"label": "management",
"required": false,
"type": "object",
"javaType": "org.apache.camel.component.torchserve.client.model.RegisterOptions",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "Additional options for the register operation."
},
"scaleWorkerOptions": {
"index": 12,
"kind": "parameter",
"displayName": "Scale Worker Options",
"group": "management",
"label": "management",
"required": false,
"type": "object",
"javaType": "org.apache.camel.component.torchserve.client.model.ScaleWorkerOptions",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "Additional options for the scale-worker operation."
},
"unregisterOptions": {
"index": 13,
"kind": "parameter",
"displayName": "Unregister Options",
"group": "management",
"label": "management",
"required": false,
"type": "object",
"javaType": "org.apache.camel.component.torchserve.client.model.UnregisterOptions",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "Additional options for the unregister operation."
},
"url": {
"index": 14,
"kind": "parameter",
"displayName": "Url",
"group": "management",
"label": "management",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "Model archive download url, support local file or HTTP(s) protocol. For S3, consider using pre-signed url."
},
"metricsAddress": {
"index": 15,
"kind": "parameter",
"displayName": "Metrics Address",
"group": "metrics",
"label": "metrics",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The address of the metrics API endpoint."
},
"metricsName": {
"index": 16,
"kind": "parameter",
"displayName": "Metrics Name",
"group": "metrics",
"label": "metrics",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "Names of metrics to filter."
},
"metricsPort": {
"index": 17,
"kind": "parameter",
"displayName": "Metrics Port",
"group": "metrics",
"label": "metrics",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 8082,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The port of the metrics API endpoint."
},
"inferenceKey": {
"index": 18,
"kind": "parameter",
"displayName": "Inference Key",
"group": "security",
"label": "inference,security",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The token authorization key for accessing the inference API."
},
"managementKey": {
"index": 19,
"kind": "parameter",
"displayName": "Management Key",
"group": "security",
"label": "management,security",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.torchserve.TorchServeConfiguration",
"configurationField": "configuration",
"description": "The token authorization key for accessing the management API."
}
}
}