mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2026-03-13 21:53:41 +08:00
openAI
This commit is contained in:
@@ -36,6 +36,11 @@ public class RedisKey {
|
||||
*/
|
||||
public static final String USER_SUMMARY_STRING = "userSummary:uid_%d";
|
||||
|
||||
/**
|
||||
* 用户AI聊天次数
|
||||
*/
|
||||
public static final String USER_CHAT_NUM = "userAIChatNum:uid_%d";
|
||||
|
||||
public static String getKey(String key, Object... objects) {
|
||||
return BASE_KEY + String.format(key, objects);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.abin.mallchat.common.common.utils;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
public static Long getEndTimeByToday() {
|
||||
Calendar instance = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
instance.setTime(now);
|
||||
instance.set(Calendar.HOUR_OF_DAY, 23);
|
||||
instance.set(Calendar.MINUTE, 59);
|
||||
instance.set(Calendar.SECOND, 59);
|
||||
return instance.getTime().getTime() - now.getTime();
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ mybatis-plus:
|
||||
spring:
|
||||
profiles:
|
||||
#运行的环境
|
||||
active: my-prod
|
||||
active: test
|
||||
application:
|
||||
name: mallchat
|
||||
datasource:
|
||||
@@ -37,8 +37,8 @@ spring:
|
||||
database: 0
|
||||
# 连接超时时间
|
||||
timeout: 1800000
|
||||
# 设置密码
|
||||
password: ${mallchat.redis.password}
|
||||
# # 设置密码
|
||||
# password: ${mallchat.redis.password}
|
||||
lettuce:
|
||||
pool:
|
||||
# 最大阻塞等待时间,负数表示没有限制
|
||||
@@ -62,4 +62,9 @@ wx:
|
||||
- appId: ${mallchat.wx.appId} # 第一个公众号的appid
|
||||
secret: ${mallchat.wx.secret} # 公众号的appsecret
|
||||
token: ${mallchat.wx.token} # 接口配置里的Token值
|
||||
aesKey: ${mallchat.wx.aesKey} # 接口配置里的EncodingAESKey值
|
||||
aesKey: ${mallchat.wx.aesKey} # 接口配置里的EncodingAESKey值
|
||||
openai:
|
||||
use-openai: true
|
||||
ai-user-id: xxxxx
|
||||
key: xxxxxxx
|
||||
proxy-url: https://xxxxxxx
|
||||
Reference in New Issue
Block a user