Skip to content

Commit

Permalink
Adding some logging to the weaviate client
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaland committed Oct 22, 2024
1 parent c32ccdf commit 7ff1536
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.redhat.composer.config.retriever.contentRetriever;

import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.jboss.logging.Logger;

import com.redhat.composer.api.ChatBotAPI;
import com.redhat.composer.config.retriever.contentRetriever.custom.WeaviateEmbeddingStoreCustom;
import com.redhat.composer.model.request.RetrieverRequest;

Expand All @@ -13,6 +15,8 @@
@Singleton
public class WeaviateContentRetrieverClient extends BaseContentRetrieverClient {

Logger log = Logger.getLogger(WeaviateContentRetrieverClient.class);

@ConfigProperty( name = "weaviate.default.scheme")
private String weaviateScheme;

Expand All @@ -35,6 +39,9 @@ public ContentRetriever getContentRetriever(RetrieverRequest request) {
String index = request.getIndex() != null ? request.getIndex() : weaviateIndex;
String textKey = request.getTextKey() != null ? request.getTextKey() : weaviateTextKey;


log.info("Attempting to connect to Weaviate at " + scheme + "://" + host + " with index " + index);

WeaviateEmbeddingStoreCustom store = WeaviateEmbeddingStoreCustom.builder()
.scheme(scheme)
.host(host)
Expand Down

0 comments on commit 7ff1536

Please sign in to comment.