mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
(improvement)(Chat) add extend config for agent (#1010)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LLMConfig {
|
||||
|
||||
private String provider;
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
private String apiKey;
|
||||
|
||||
private String modelName;
|
||||
|
||||
private Double temperature;
|
||||
|
||||
private Long timeOut;
|
||||
|
||||
public LLMConfig(String provider, String baseUrl, String apiKey, String modelName) {
|
||||
this.provider = provider;
|
||||
this.baseUrl = baseUrl;
|
||||
this.apiKey = apiKey;
|
||||
this.modelName = modelName;
|
||||
this.temperature = 0.0d;
|
||||
this.timeOut = 60L;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.tencent.supersonic.headless.api.pojo.request;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.common.pojo.enums.Text2SQLType;
|
||||
import com.tencent.supersonic.headless.api.pojo.LLMConfig;
|
||||
import com.tencent.supersonic.headless.api.pojo.QueryDataType;
|
||||
import com.tencent.supersonic.headless.api.pojo.SchemaMapInfo;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.MapModeEnum;
|
||||
@@ -22,4 +23,5 @@ public class QueryReq {
|
||||
private MapModeEnum mapModeEnum = MapModeEnum.STRICT;
|
||||
private SchemaMapInfo mapInfo = new SchemaMapInfo();
|
||||
private QueryDataType queryDataType = QueryDataType.ALL;
|
||||
private LLMConfig llmConfig;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.response;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.headless.api.pojo.SchemaElementMatch;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
@@ -11,8 +12,8 @@ public class DataSetMapInfo {
|
||||
|
||||
private String description;
|
||||
|
||||
private List<SchemaElementMatch> mapFields;
|
||||
private List<SchemaElementMatch> mapFields = Lists.newArrayList();
|
||||
|
||||
private List<SchemaElementMatch> topFields;
|
||||
private List<SchemaElementMatch> topFields = Lists.newArrayList();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user