You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2024/12/13 17:38:06 UTC

(camel-quarkus-examples) 01/02: data-extract-langchain4j: use the ai service resolution by interface

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git

commit 661b487f2cbf0ca005903de757fbe91b0da96f73
Author: aldettinger <al...@gmail.com>
AuthorDate: Fri Dec 13 16:26:43 2024 +0100

    data-extract-langchain4j: use the ai service resolution by interface
---
 .../src/main/java/org/acme/extraction/Routes.java                    | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/data-extract-langchain4j/src/main/java/org/acme/extraction/Routes.java b/data-extract-langchain4j/src/main/java/org/acme/extraction/Routes.java
index e3b48cc..a376aca 100644
--- a/data-extract-langchain4j/src/main/java/org/acme/extraction/Routes.java
+++ b/data-extract-langchain4j/src/main/java/org/acme/extraction/Routes.java
@@ -23,9 +23,6 @@ import org.apache.camel.builder.RouteBuilder;
 @ApplicationScoped
 public class Routes extends RouteBuilder {
 
-    @Inject
-    CustomPojoExtractionService customPojoExtractionService;
-
     @Inject
     CustomPojoStore customPojoStore;
 
@@ -37,7 +34,7 @@ public class Routes extends RouteBuilder {
                 .log("A document has been received by the camel-quarkus-file extension: ${body}")
                 .setHeader("expectedDateFormat", constant("YYYY-MM-DD"))
                 // The CustomPojoExtractionService transforms the conversation transcript into a CustomPojoExtractionService.CustomPojo
-                .bean(customPojoExtractionService)
+                .bean(CustomPojoExtractionService.class)
                 // Store extracted CustomPojoExtractionService.CustomPojos objects into the CustomPojoStore for later inspection
                 .bean(customPojoStore);