fix: remove unused imports (#209)
This commit is contained in:
parent
0f09f4ff98
commit
d0399d023b
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue