zyx 2 년 전
부모
커밋
56a6845153
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/main/java/com/sxtvs/api/chatgpt/dto/CompletionsParamsDto.java

+ 5 - 0
src/main/java/com/sxtvs/api/chatgpt/dto/CompletionsParamsDto.java

@@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.util.List;
+
 @NoArgsConstructor
 @Data
 public class CompletionsParamsDto {
@@ -19,6 +21,9 @@ public class CompletionsParamsDto {
     @JsonProperty("stream")
     private Boolean stream;
 
+    @JsonProperty("stop")
+    private List<String> stop = List.of("我:", "机器人:");
+
     public CompletionsParamsDto(String prompt) {
         this.prompt = prompt;
         this.model = "text-davinci-003";