diff --git a/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java b/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java index 4105df264..648272058 100644 --- a/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java +++ b/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java @@ -26,6 +26,7 @@ public interface BeerMapper { @Mapping(source = "style", target = "category") @Mapping(source = "alcohol", target = "strength") + @Mapping(target = "kind", constant = "beer") Beverage toBeverage(Beer beer); } diff --git a/semantic-agent-routing/pom.xml b/semantic-agent-routing/pom.xml index 8b5200d64..bffd6c757 100644 --- a/semantic-agent-routing/pom.xml +++ b/semantic-agent-routing/pom.xml @@ -71,7 +71,7 @@ limitations under the License. org.apache.camel - camel-typesafe-ai + camel-semantic-typesafe-ai org.apache.camel diff --git a/semantic-agent-routing/src/main/resources/application.properties b/semantic-agent-routing/src/main/resources/application.properties index fbf2779d7..c6ecf54f7 100644 --- a/semantic-agent-routing/src/main/resources/application.properties +++ b/semantic-agent-routing/src/main/resources/application.properties @@ -14,6 +14,8 @@ # limitations under the License. camel.main.name=trip-{{role}} +# TypeSafe AI semantic expert - registered as 'decisions' bean for use in evaluations +camel.beans.decisions=#class:org.apache.camel.component.typesafeai.TypeSafeAiSemanticAdapter camel.main.shutdown-timeout=5 camel.server.enabled=true camel.server.host=127.0.0.1 diff --git a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml index 1811007b0..897bd2cd3 100644 --- a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml +++ b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml @@ -18,8 +18,9 @@ type: org.apache.camel.example.routing.TripSupport - semantic: - question: + evaluation: specialist: + expert: decisions type: choice instructions: Which car rental specialist should handle the customer's request? criteria: @@ -28,18 +29,22 @@ cost: Rental prices, total cost, budget, fees or price comparison general: Greetings, service information or other questions needsReservation: + expert: decisions type: boolean instructions: Does answering this customer request fully require input about booking details, reservation lookup, changes or cancellation? threshold: "{{routing.fan-out-threshold}}" needsWeather: + expert: decisions type: boolean instructions: Does answering this customer request fully require input about weather, rain, forecasts or driving conditions at the destination? threshold: "{{routing.fan-out-threshold}}" needsCost: + expert: decisions type: boolean instructions: Does answering this customer request fully require input about rental prices, total cost, budget or fees? threshold: "{{routing.fan-out-threshold}}" relevant: + expert: decisions type: boolean instructions: >- Does the drafted reply address every requested part within the named specialist's @@ -51,6 +56,7 @@ uncertainty: 0.1 uncertaintyPolicy: non-match complete: + expert: decisions type: boolean instructions: >- Does the final reply address every part of the customer's original request,