You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/03/19 10:28:13 UTC

(camel) branch langchain-embeddings-milvus created (now 06ab0c8379d)

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

acosentino pushed a change to branch langchain-embeddings-milvus
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 06ab0c8379d Camel-Milvus Test Infra: Align langchain embeddings component to new usage

This branch includes the following new commits:

     new 06ab0c8379d Camel-Milvus Test Infra: Align langchain embeddings component to new usage

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/01: Camel-Milvus Test Infra: Align langchain embeddings component to new usage

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch langchain-embeddings-milvus
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 06ab0c8379d4c945fed730b3a123cf4c06c39936
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 19 11:24:59 2024 +0100

    Camel-Milvus Test Infra: Align langchain embeddings component to new usage
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../embeddings/LangchainEmbeddingsComponentMilvusTargetIT.java      | 6 ++----
 ...onentIT.java => LangchainEmbeddingsComponentQdrantTargetIT.java} | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentMilvusTargetIT.java b/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentMilvusTargetIT.java
index 728914d789e..3ad16173bbe 100644
--- a/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentMilvusTargetIT.java
+++ b/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentMilvusTargetIT.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.langchain.embeddings;
 
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
@@ -65,9 +64,8 @@ public class LangchainEmbeddingsComponentMilvusTargetIT extends CamelTestSupport
         CamelContext context = super.createCamelContext();
 
         var milvus = context.getComponent(Milvus.SCHEME, MilvusComponent.class);
-        URL url = new URL(MILVUS.getMilvusEndpointUrl());
-        milvus.getConfiguration().setHost(url.getHost());
-        milvus.getConfiguration().setPort(url.getPort());
+        milvus.getConfiguration().setHost(MILVUS.getMilvusHost());
+        milvus.getConfiguration().setPort(MILVUS.getMilvusPort());
 
         context.getRegistry().bind("embedding-model", new AllMiniLmL6V2EmbeddingModel());
 
diff --git a/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentIT.java b/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentQdrantTargetIT.java
similarity index 98%
rename from components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentIT.java
rename to components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentQdrantTargetIT.java
index 75e3180cbe9..03bc3640836 100644
--- a/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentIT.java
+++ b/components/camel-ai/camel-langchain-embeddings/src/test/java/org/apache/camel/component/langchain/embeddings/LangchainEmbeddingsComponentQdrantTargetIT.java
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 @TestMethodOrder(MethodOrderer.OrderAnnotation.class)
-public class LangchainEmbeddingsComponentIT extends CamelTestSupport {
+public class LangchainEmbeddingsComponentQdrantTargetIT extends CamelTestSupport {
     public static final long POINT_ID = 8;
     public static final String QDRANT_URI = "qdrant:embeddings";