io.quarkiverse.langchain4j.chroma.runtime.CreateCollectionRequest Maven / Gradle / Ivy
package io.quarkiverse.langchain4j.chroma.runtime;
import java.util.HashMap;
import java.util.Map;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
public class CreateCollectionRequest {
private final String name;
private final Map metadata;
/**
* Currently, cosine distance is always used as the distance method for chroma implementation
*/
public CreateCollectionRequest(String name) {
this.name = name;
HashMap metadata = new HashMap<>();
metadata.put("hnsw:space", "cosine");
this.metadata = metadata;
}
public String getName() {
return name;
}
public Map getMetadata() {
return metadata;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy