fix: remove unused imports (#209)

This commit is contained in:
Simon Verhoeven 2023-10-09 09:48:00 +02:00 committed by GitHub
parent 0f09f4ff98
commit d0399d023b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 5 additions and 16 deletions

View File

@ -17,7 +17,6 @@ import lombok.NonNull;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import static dev.langchain4j.internal.ValidationUtils.ensureBetween;
import static dev.langchain4j.internal.ValidationUtils.ensureGreaterThanZero;

View File

@ -3,7 +3,6 @@ package dev.langchain4j.model.dashscope;
import com.alibaba.dashscope.aigc.generation.GenerationOutput;
import com.alibaba.dashscope.aigc.generation.GenerationOutput.Choice;
import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.aigc.generation.GenerationUsage;
import com.alibaba.dashscope.common.Message;
import dev.langchain4j.data.message.AiMessage;
import dev.langchain4j.data.message.ChatMessage;
@ -14,11 +13,9 @@ import dev.langchain4j.model.output.TokenUsage;
import java.util.List;
import java.util.Optional;
import static com.alibaba.dashscope.common.Role.ASSISTANT;
import static com.alibaba.dashscope.common.Role.SYSTEM;
import static com.alibaba.dashscope.common.Role.USER;
import static dev.langchain4j.model.output.FinishReason.*;
import static dev.langchain4j.model.output.FinishReason.CONTENT_FILTER;
import static com.alibaba.dashscope.common.Role.*;
import static dev.langchain4j.model.output.FinishReason.LENGTH;
import static dev.langchain4j.model.output.FinishReason.STOP;
import static java.util.stream.Collectors.toList;
class QwenHelper {

View File

@ -10,12 +10,10 @@ import dev.langchain4j.data.message.AiMessage;
import dev.langchain4j.data.message.ChatMessage;
import dev.langchain4j.model.StreamingResponseHandler;
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import dev.langchain4j.model.output.Response;
import java.util.List;
import static com.alibaba.dashscope.aigc.generation.models.QwenParam.ResultFormat.MESSAGE;
import static dev.langchain4j.model.dashscope.QwenHelper.answerFrom;
import static dev.langchain4j.model.dashscope.QwenHelper.toQwenMessages;
public class QwenStreamingChatModel extends QwenChatModel implements StreamingChatLanguageModel {

View File

@ -11,7 +11,6 @@ import dev.langchain4j.model.language.StreamingLanguageModel;
import dev.langchain4j.model.output.Response;
import static com.alibaba.dashscope.aigc.generation.models.QwenParam.ResultFormat.MESSAGE;
import static dev.langchain4j.model.dashscope.QwenHelper.answerFrom;
public class QwenStreamingLanguageModel extends QwenLanguageModel implements StreamingLanguageModel {

View File

@ -2,15 +2,13 @@ package dev.langchain4j.model.dashscope;
import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.aigc.generation.GenerationUsage;
import dev.langchain4j.agent.tool.ToolExecutionRequest;
import dev.langchain4j.data.message.AiMessage;
import dev.langchain4j.model.output.FinishReason;
import dev.langchain4j.model.output.Response;
import dev.langchain4j.model.output.TokenUsage;
import java.util.List;
import static dev.langchain4j.model.dashscope.QwenHelper.*;
import static dev.langchain4j.model.dashscope.QwenHelper.answerFrom;
import static dev.langchain4j.model.dashscope.QwenHelper.finishReasonFrom;
public class QwenStreamingResponseBuilder {
private String generatedContent = "";

View File

@ -1,6 +1,5 @@
package dev.langchain4j.model.dashscope;
import dev.langchain4j.data.message.AiMessage;
import dev.langchain4j.internal.Utils;
import dev.langchain4j.model.language.LanguageModel;
import dev.langchain4j.model.output.Response;

View File

@ -1,6 +1,5 @@
package dev.langchain4j.model.dashscope;
import dev.langchain4j.data.message.AiMessage;
import dev.langchain4j.internal.Utils;
import dev.langchain4j.model.StreamingResponseHandler;
import dev.langchain4j.model.language.StreamingLanguageModel;