jiriOndrusek-agent commented on code in PR #580:
URL: 
https://github.com/apache/camel-quarkus-examples/pull/580#discussion_r4093025279


##########
langchain4j-ingest-rag/src/main/java/org/acme/langchain4j/ingest/rag/EmbeddingModelProducer.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.acme.langchain4j.ingest.rag;
+
+import dev.langchain4j.model.embedding.EmbeddingModel;
+import 
dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Produces;
+import jakarta.inject.Singleton;
+
+@ApplicationScoped
+public class EmbeddingModelProducer {

Review Comment:
   Confirmed and removed. Quarkus LangChain4j's `InProcessEmbeddingProcessor` 
registers the in-process model as the default `EmbeddingModel` bean and the RAG 
bridge census counts it; JVM and native tests pass without the producer.
   
   _Claude Code on behalf of Jiří Ondrušek_



##########
langchain4j-ingest-rag/src/main/java/org/acme/langchain4j/ingest/rag/SearchResource.java:
##########
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.acme.langchain4j.ingest.rag;
+
+import java.util.List;
+import java.util.Map;
+
+import dev.langchain4j.data.segment.TextSegment;
+import dev.langchain4j.model.embedding.EmbeddingModel;
+import dev.langchain4j.store.embedding.EmbeddingSearchRequest;
+import dev.langchain4j.store.embedding.EmbeddingStore;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.MediaType;
+
+@Path("/search")
+public class SearchResource {
+
+    /** Written on every segment by the pipeline: the file the segment came 
from. */
+    private static final String DOCUMENT_ID_METADATA = 
"camel_ingest_document_id";

Review Comment:
   Done, `SearchResource` now references `IngestService.METADATA_DOCUMENT_ID`.
   
   _Claude Code on behalf of Jiří Ondrušek_



##########
langchain4j-ingest-rag/pom.xml:
##########
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>camel-quarkus-examples-langchain4j-ingest-rag</artifactId>
+    <groupId>org.apache.camel.quarkus.examples</groupId>
+    <version>3.40.0-SNAPSHOT</version>
+
+    <name>Camel Quarkus :: Examples :: LangChain4j Ingest RAG</name>
+    <description>Camel Quarkus Example :: RAG document Q&amp;A over a folder 
ingested by the langchain4j-ingest extension</description>
+
+    <properties>
+        <quarkus.platform.version>3.40.0.CR1</quarkus.platform.version>

Review Comment:
   Rebased on #581 and set `quarkus.platform.version` to 3.40.0. 
apache/camel-quarkus#9229 is merged and the published 3.40.0-SNAPSHOT already 
contains it, so CI should pass now.
   
   _Claude Code on behalf of Jiří Ondrušek_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to