TypeSafe AI
Evaluate text and structured state with the TypeSafe AI decision API.
What’s inside
-
TypeSafe AI component, URI syntax:
typesafe-ai:name
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-typesafe-ai-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 20 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.typesafe-ai.api-key | The API key used for Bearer authentication. | String | |
camel.component.typesafe-ai.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.typesafe-ai.base-url | The API base URL. The client appends /v1/systemone. Redirects are not followed. | String | |
camel.component.typesafe-ai.configuration | Default configuration shared by TypeSafe AI endpoints. The option is a org.apache.camel.component.typesafeai.TypeSafeAiConfiguration type. | TypeSafeAiConfiguration | |
camel.component.typesafe-ai.enabled | Whether to enable auto configuration of the typesafe-ai component. This is enabled by default. | Boolean | |
camel.component.typesafe-ai.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.typesafe-ai.max-concurrent-requests | Maximum concurrent evaluations per endpoint, shared by producers and predicates. Excess requests fail immediately with RejectedExecutionException without being queued or sent. Must be positive. | 64 | Integer |
camel.component.typesafe-ai.model | The model ID or alias. Use a versioned ID to pin decision behavior. | jev-latest | String |
camel.component.typesafe-ai.questions | A JSON object mapping question names to Noul, Choice or Score question objects. When set, producers evaluate the selected message state; otherwise the body must contain a complete request map. | String | |
camel.component.typesafe-ai.questions-resource | Camel resource URI for a UTF-8 JSON object mapping question names to Noul, Choice or Score questions. Loaded and validated when the endpoint starts. Cannot be combined with questions. | String | |
camel.component.typesafe-ai.request-timeout | The timeout in milliseconds for the complete HTTP request and response body. Must be positive. | 30000 | Long |
camel.component.typesafe-ai.result-property | Store the producer response in this exchange property, preserving the original message body. | String | |
camel.component.typesafe-ai.state | The Simple expression selecting state for configured producer questions and the TypeSafe AI language. If not set, the message body is used. | String | |
camel.component.typesafe-ai.threshold | Default inclusive probability threshold for the TypeSafe AI language. Must be within 0,1. | Double | |
camel.component.typesafe-ai.uncertainty | Default half-width of the inclusive uncertainty band for the TypeSafe AI language. Zero disables the band. | Double | |
camel.component.typesafe-ai.uncertainty-policy | Default action for the TypeSafe AI language within the uncertainty band: NonMatch or Fail. | nonmatch | TypeSafeAiLanguage$UncertaintyPolicy |
camel.language.typesafe-ai.enabled | Whether to enable auto configuration of the typesafe-ai language. This is enabled by default. | Boolean | |
camel.language.typesafe-ai.language | The name of the language to use. | String | |
camel.language.typesafe-ai.resolve-resource | Whether a result of the expression that is a String starting with resource: is loaded as a resource and its content becomes the result, e.g. a script that returns resource:file:order.json or resource:classpath:templates/order.json (a name without a scheme is a classpath resource). Off by default; the resource: prefix on the expression text itself is always resolved. Applies to the expression used as a value, not as a predicate. | false | Boolean |
camel.language.typesafe-ai.trim | Whether to trim the source code to remove leading and trailing whitespaces and line breaks. | true | Boolean |