Skip to content

Commit

Permalink
Fixing code smell warning
Browse files Browse the repository at this point in the history
  • Loading branch information
li2109 committed Jun 18, 2023
1 parent 36b65e3 commit 2a11eb0
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,8 @@

import ai.knowly.langtorch.llm.huggingface.schema.dto.CreateTextGenerationTaskRequest;
import ai.knowly.langtorch.llm.huggingface.schema.dto.CreateTextGenerationTaskResponse;
import ai.knowly.langtorch.llm.openai.schema.dto.completion.CompletionRequest;
import ai.knowly.langtorch.llm.openai.schema.dto.completion.CompletionResult;
import ai.knowly.langtorch.llm.openai.schema.dto.completion.chat.ChatCompletionRequest;
import ai.knowly.langtorch.llm.openai.schema.dto.completion.chat.ChatCompletionResult;
import ai.knowly.langtorch.llm.openai.schema.dto.edit.EditRequest;
import ai.knowly.langtorch.llm.openai.schema.dto.edit.EditResult;
import ai.knowly.langtorch.llm.openai.schema.dto.embedding.EmbeddingRequest;
import ai.knowly.langtorch.llm.openai.schema.dto.embedding.EmbeddingResult;
import ai.knowly.langtorch.llm.openai.schema.dto.image.CreateImageRequest;
import ai.knowly.langtorch.llm.openai.schema.dto.image.ImageResult;
import ai.knowly.langtorch.llm.openai.schema.dto.moderation.ModerationRequest;
import ai.knowly.langtorch.llm.openai.schema.dto.moderation.ModerationResult;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.List;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
public class HuggingFaceService {
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private static final String BASE_URL = "https://api-inference.huggingface.co/models/";
private static final ObjectMapper mapper = defaultObjectMapper();

private final HuggingFaceApi api;
private final FutureRetrier futureRetrier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.google.inject.AbstractModule;
import com.google.inject.Provides;

/** Provides the HuggingFace service configuration. */
public class HuggingFaceServiceConfigModule extends AbstractModule {
private final String modelId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

Expand All @@ -12,7 +11,6 @@
@AllArgsConstructor
@Data
@NoArgsConstructor
// @Builder(toBuilder = true, setterPrefix = "set")
public class CreateTextGenerationTaskResponse {
@JsonProperty("generated_text")
private String generatedText;
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions src/test/resources/test_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ test:
openai: false
minimax: false
cohere: false
huggingface: false
vector-store-service:
pinecone: false

0 comments on commit 2a11eb0

Please sign in to comment.