textList = responseVO.payload.choices.text;
- // TODO Test
+ // Test
System.out.println("textList.size(): " + textList.size());
// TODO 3. 拼接形成完整回答串 每个Response的test里面只有一个元素
for (Choices.Text temp : textList) {
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 9b29692..ccc0b0e 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -3,3 +3,44 @@ server:
tomcat:
uri-encoding: UTF-8
max-http-header-size: 8192
+
+spring:
+ datasource:
+ url: jdbc:mysql://localhost:3306/chitchat?serverTimezone=Asia/Shanghai&characterEncoding=utf-8
+ username: root
+ password: 7890-=
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ data:
+ redis:
+ database: 0
+ host: localhost
+ port: 6379
+ # password:
+ #配置jedis客户端,这里也可以jedis替换为lettuce客户端,下级配置都一样
+ jedis:
+ pool:
+ # 连接池中的最大空闲连接 默认8
+ max-idle: 8
+ # 连接池中的最小空闲连接 默认0
+ min-idle: 0
+ # 连接池最大连接数 默认8 ,负数表示没有限制
+ max-active: 8
+ # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认-1
+ max-wait: -1
+ timeout: 3000
+ cache:
+ type: redis # 指定使用的缓存类型
+ # redis: 当自定义CacheManager时,这里的配置不起作用
+ # use-key-prefix: true
+ # key-prefix: "demo:"
+ # time-to-live: 60000 #缓存超时时间 单位:ms
+ # cache-null-values: false #是否缓存空值
+ cache-names: user
+
+# 公共配置,与profiles选择无关
+mybatis:
+ type-aliases-package: qiwu.xfllmdemo.pojo
+ mapper-locations: classpath:mapper/*.xml
+ # 开启MyBatis的二级缓存
+ configuration:
+ cache-enabled: true
\ No newline at end of file
diff --git a/src/main/resources/mapper/DBMapper.xml b/src/main/resources/mapper/DBMapper.xml
new file mode 100644
index 0000000..dd9c803
--- /dev/null
+++ b/src/main/resources/mapper/DBMapper.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+ INSERT INTO intention (user_words, intention_id)
+ VALUES
+
+ (#{user_words, jdbcType=VARCHAR}, #{intention_id, jdbcType=INTEGER})
+
+
+
+
+ INSERT INTO opt (intention_id, reply, audit_status)
+ VALUES
+
+ (#{intention_id, jdbcType=INTEGER}, #{reply, jdbcType=VARCHAR}, #{audit_status, jdbcType=TINYINT})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/mybatis-config.xml b/src/main/resources/mybatis-config.xml
new file mode 100644
index 0000000..52ef0aa
--- /dev/null
+++ b/src/main/resources/mybatis-config.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/static/pre-generate.html b/src/main/resources/static/pre-generate.html
index ab4ddeb..d7eb446 100644
--- a/src/main/resources/static/pre-generate.html
+++ b/src/main/resources/static/pre-generate.html
@@ -5,16 +5,25 @@
预生成回答
+
+
- 在此处上传预设用户话语txt
+ 在此处上传预设用户话语txt(接受txt和csv格式)
-
+
+ ------------------------------
+
+
+
+ ------------------------------
+
+
+
+
-
-