调用本地大模型
This commit is contained in:
30
src/main/java/com/rj/dto/AiQaCustomerAskRequestDto.java
Normal file
30
src/main/java/com/rj/dto/AiQaCustomerAskRequestDto.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.rj.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* AI 问答:客户向大模型提问的请求参数
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "AI 问答客户提问请求")
|
||||
public class AiQaCustomerAskRequestDto {
|
||||
|
||||
@Schema(description = "主表ID(ai_qa_main.id)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "客户问题类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String questionType;
|
||||
|
||||
@Schema(description = "客户问题内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String questionContent;
|
||||
|
||||
@Schema(description = "模型名,默认取配置 ai.qa.local.default-model(如 Qwen2.5-7B-Instruct)")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "可选系统提示词,不传则使用默认助手设定")
|
||||
private String systemPrompt;
|
||||
|
||||
@Schema(description = "max_tokens,不传则使用配置 ai.qa.local.max-tokens(默认 512)")
|
||||
private Integer maxTokens;
|
||||
}
|
||||
33
src/main/java/com/rj/dto/AiQaCustomerAskResponseDto.java
Normal file
33
src/main/java/com/rj/dto/AiQaCustomerAskResponseDto.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.rj.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* AI 问答:大模型回答结果(回传前端)
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "AI 问答大模型回答")
|
||||
public class AiQaCustomerAskResponseDto {
|
||||
|
||||
@Schema(description = "主表ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "客户问题类型")
|
||||
private String questionType;
|
||||
|
||||
@Schema(description = "客户问题内容")
|
||||
private String questionContent;
|
||||
|
||||
@Schema(description = "大模型回答正文")
|
||||
private String answer;
|
||||
|
||||
@Schema(description = "实际使用的模型名")
|
||||
private String model;
|
||||
}
|
||||
Reference in New Issue
Block a user