Skip to content

Commit

Permalink
simplify SolrEmbeddingModel.getInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoerschke committed Nov 7, 2024
1 parent 4653837 commit 62a134e
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public class SolrEmbeddingModel implements Accountable {
private static final long BASE_RAM_BYTES =
RamUsageEstimator.shallowSizeOfInstance(SolrEmbeddingModel.class);
public static final String TIMEOUT_PARAM = "timeout";
public static final String LOG_REQUESTS_PARAM = "logRequests";
public static final String LOG_RESPONSES_PARAM = "logResponses";
public static final String MAX_SEGMENTS_PER_BATCH_PARAM = "maxSegmentsPerBatch";
public static final String MAX_RETRIES_PARAM = "maxRetries";

Expand All @@ -55,18 +53,6 @@ public static SolrEmbeddingModel getInstance(
Duration timeOut = Duration.ofSeconds((Long) params.get(paramName));
builder.getClass().getMethod(paramName, Duration.class).invoke(builder, timeOut);
break;
case LOG_REQUESTS_PARAM:
builder
.getClass()
.getMethod(paramName, Boolean.class)
.invoke(builder, params.get(paramName));
break;
case LOG_RESPONSES_PARAM:
builder
.getClass()
.getMethod(paramName, Boolean.class)
.invoke(builder, params.get(paramName));
break;
case MAX_SEGMENTS_PER_BATCH_PARAM:
builder
.getClass()
Expand Down

0 comments on commit 62a134e

Please sign in to comment.