mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-17 05:43:39 +00:00
fix: 修复对话时无法上传文件
This commit is contained in:
@@ -67,7 +67,7 @@ public class CaptchaController {
|
|||||||
String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber;
|
String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber;
|
||||||
String code = RandomUtil.randomNumbers(4);
|
String code = RandomUtil.randomNumbers(4);
|
||||||
RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
|
RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
|
||||||
// 验证码模板id 自行处理 (查数据库或写死均可)
|
// 验证码模板id
|
||||||
String templateId = "";
|
String templateId = "";
|
||||||
Map<String, String> map = new HashMap<>(1);
|
Map<String, String> map = new HashMap<>(1);
|
||||||
map.put("code", code);
|
map.put("code", code);
|
||||||
|
|||||||
@@ -131,6 +131,8 @@ security:
|
|||||||
- /auth/reset/password
|
- /auth/reset/password
|
||||||
# 聊天接口
|
# 聊天接口
|
||||||
- /chat/send
|
- /chat/send
|
||||||
|
# 文件上传
|
||||||
|
- /chat/upload
|
||||||
# 静态资源
|
# 静态资源
|
||||||
- /*.html
|
- /*.html
|
||||||
- /**/*.html
|
- /**/*.html
|
||||||
@@ -293,26 +295,6 @@ websocket:
|
|||||||
# 设置访问源地址
|
# 设置访问源地址
|
||||||
allowedOrigins: '*'
|
allowedOrigins: '*'
|
||||||
|
|
||||||
# 微信小程序配置信息
|
|
||||||
wx:
|
|
||||||
miniapp:
|
|
||||||
configs:
|
|
||||||
- appid: # 你的appid
|
|
||||||
secret: # 你的secret
|
|
||||||
token: #微信小程序消息服务器配置的token
|
|
||||||
aesKey: #微信小程序消息服务器配置的EncodingAESKey
|
|
||||||
msgDataFormat: JSON
|
|
||||||
|
|
||||||
# 企业微信应用
|
|
||||||
wechat:
|
|
||||||
cp:
|
|
||||||
corpId:
|
|
||||||
appConfigs:
|
|
||||||
- agentId:
|
|
||||||
secret: ''
|
|
||||||
token: ''
|
|
||||||
aesKey: ''
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
ai:
|
ai:
|
||||||
openai:
|
openai:
|
||||||
|
|||||||
@@ -145,13 +145,15 @@ public class OpenAiStreamClient {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
okHttpClient = builder.okHttpClient;
|
okHttpClient = builder.okHttpClient;
|
||||||
|
if (apiHost.endsWith("/")) {
|
||||||
|
this.openAiApi = new Retrofit.Builder()
|
||||||
|
.baseUrl(apiHost)
|
||||||
|
.client(okHttpClient)
|
||||||
|
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
||||||
|
.addConverterFactory(JacksonConverterFactory.create())
|
||||||
|
.build().create(OpenAiApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
// this.openAiApi = new Retrofit.Builder()
|
|
||||||
// .baseUrl(apiHost)
|
|
||||||
// .client(okHttpClient)
|
|
||||||
// .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
|
||||||
// .addConverterFactory(JacksonConverterFactory.create())
|
|
||||||
// .build().create(OpenAiApi.class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,10 +25,8 @@ public class MailConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MailAccount mailAccount() {
|
public MailAccount mailAccount() {
|
||||||
if (account == null) {
|
account = new MailAccount();
|
||||||
account = new MailAccount();
|
updateMailAccount();
|
||||||
updateMailAccount();
|
|
||||||
}
|
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user