technology.semi.weaviate.client.v1.contextionary.api.ConceptsGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client Show documentation
Show all versions of client Show documentation
A java client for Weaviate Vector Search Engine
package technology.semi.weaviate.client.v1.contextionary.api;
import technology.semi.weaviate.client.Config;
import technology.semi.weaviate.client.base.BaseClient;
import technology.semi.weaviate.client.base.ClientResult;
import technology.semi.weaviate.client.base.Response;
import technology.semi.weaviate.client.base.Result;
import technology.semi.weaviate.client.v1.contextionary.model.C11yWordsResponse;
public class ConceptsGetter extends BaseClient implements ClientResult {
private String concept;
public ConceptsGetter(Config config) {
super(config);
}
public ConceptsGetter withConcept(String concept) {
this.concept = concept;
return this;
}
@Override
public Result run() {
String path = String.format("/modules/text2vec-contextionary/concepts/%s", concept);
Response resp = sendGetRequest(path, C11yWordsResponse.class);
return new Result<>(resp);
}
}