Skip to content

Commit

Permalink
Merge pull request #156 from jmartisk/milvus-official-grpc
Browse files Browse the repository at this point in the history
Milvus embedding store + Dev services
  • Loading branch information
geoand authored Dec 14, 2023
2 parents 3362655 + 1fd164f commit ec6d4f8
Show file tree
Hide file tree
Showing 12 changed files with 1,199 additions and 0 deletions.
72 changes: 72 additions & 0 deletions milvus/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-milvus-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>quarkus-langchain4j-milvus-deployment</artifactId>
<name>Quarkus Langchain4j - Milvus embedding store - Deployment</name>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-core-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-milvus</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-milvus</artifactId>
<version>${langchain4j.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-devservices-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-all-minilm-l6-v2-q</artifactId>
<version>${langchain4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package io.quarkiverse.langchain4j.milvus;

import static io.quarkus.runtime.annotations.ConfigPhase.BUILD_TIME;

import java.util.OptionalInt;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;

@ConfigRoot(phase = BUILD_TIME)
@ConfigMapping(prefix = "quarkus.langchain4j.milvus")
public interface MilvusBuildConfig {

/**
* Configuration for DevServices. DevServices allows Quarkus to automatically start a database in dev and test mode.
*/
MilvusDevServicesBuildTimeConfig devservices();

@ConfigGroup
interface MilvusDevServicesBuildTimeConfig {

/**
* Whether Dev Services for Milvus are enabled or not.
*/
@WithDefault("true")
boolean enabled();

/**
* Container image for Milvus.
*/
@WithDefault("docker.io/milvusdb/milvus:v2.3.3")
String milvusImageName();

/**
* Container image for etcd.
*/
@WithDefault("quay.io/coreos/etcd:v3.5.5")
String etcdImageName();

/**
* Container image for minio.
*/
@WithDefault("docker.io/minio/minio:RELEASE.2023-12-13T23-28-55Z")
String minioImageName();

/**
* Optional fixed port the Milvus dev service will listen to.
* If not defined, the port will be chosen randomly.
*/
OptionalInt port();

/**
* Indicates if the Dev Service containers managed by Quarkus for Milvus are shared.
*/
@WithDefault("true")
boolean shared();

/**
* Service label to apply to created Dev Services containers.
*/
@WithDefault("milvus")
String serviceName();

}
}
Loading

0 comments on commit ec6d4f8

Please sign in to comment.