From e486f8d0d58a2fcd6375970bb4855f8027de7202 Mon Sep 17 00:00:00 2001 From: zhaoyuhang <1045078399@qq.com> Date: Mon, 10 Jul 2023 23:17:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=B8=8A=E4=B8=8B=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/application-test.properties | 19 +++++++++---------- .../src/main/resources/application.yml | 9 +++------ .../chatai/properties/ChatGLM2Properties.java | 2 +- .../chatai/properties/ChatGPTProperties.java | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/mallchat-common/src/main/resources/application-test.properties b/mallchat-common/src/main/resources/application-test.properties index 6dca2e4..a4967ae 100644 --- a/mallchat-common/src/main/resources/application-test.properties +++ b/mallchat-common/src/main/resources/application-test.properties @@ -4,7 +4,7 @@ mallchat.mysql.ip=127.0.0.1 mallchat.mysql.port=3306 mallchat.mysql.db=mallchat mallchat.mysql.username=root -mallchat.mysql.password=root +mallchat.mysql.password=123456 ##################redis配置################## mallchat.redis.host=127.0.0.1 mallchat.redis.port=6379 @@ -12,9 +12,9 @@ mallchat.redis.password=123456 ##################jwt################## mallchat.jwt.secret=dsfsdfsdfsdfsd ##################微信公众号信息################## -mallchat.wx.callback=http://vastmiao.natapp1.cc -mallchat.wx.appId=wxcf8d045747fb2ae4 -mallchat.wx.secret=e484463d627787f50a8cc3a869cf82a8 +mallchat.wx.callback=http://127.0.0.1:8080 +mallchat.wx.appId=appid +mallchat.wx.secret=380bfc1c9147fdsf4sf07 # 接口配置里的Token值 mallchat.wx.token=sdfsf # 接口配置里的EncodingAESKey值 @@ -27,11 +27,10 @@ oss.access-key=BEZ213 oss.secret-key=Ii4vCMIXuFe241dsfEZ8e7RXI2342342kV oss.bucketName=default ##################gpt配置################## -mallchat.chatgpt.use=true -mallchat.chatgpt.uid=10451 -mallchat.chatgpt.modelName=gpt-3.5-turbo -mallchat.chatgpt.key=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 +mallchat.chatgpt.use=false +mallchat.chatgpt.uid=10001 +mallchat.chatgpt.key=sk-wvWM0xGcxFfsddfsgxixbXK5tHovM mallchat.chatgpt.proxyUrl=https://123.cc -mallchat.chatglm2.use=true +mallchat.chatglm2.use=false mallchat.chatglm2.url=http://v32134.cc -mallchat.chatglm2.uid=10452 \ No newline at end of file +mallchat.chatglm2.uid=10002 \ No newline at end of file diff --git a/mallchat-common/src/main/resources/application.yml b/mallchat-common/src/main/resources/application.yml index 656a1c6..2f2ab12 100644 --- a/mallchat-common/src/main/resources/application.yml +++ b/mallchat-common/src/main/resources/application.yml @@ -12,7 +12,7 @@ mybatis-plus: spring: profiles: #运行的环境 - active: test + active: my-prod application: name: mallchat datasource: @@ -38,7 +38,7 @@ spring: # 连接超时时间 timeout: 1800000 # 设置密码 -# password: ${mallchat.redis.password} + password: ${mallchat.redis.password} lettuce: pool: # 最大阻塞等待时间,负数表示没有限制 @@ -68,12 +68,9 @@ chatai: use: ${mallchat.chatgpt.use} AIUserId: ${mallchat.chatgpt.uid} key: ${mallchat.chatgpt.key} -# proxyUrl: ${mallchat.chatgpt.proxyUrl} - context: ${mallchat.chatgpt.context} - modelName: ${mallchat.chatgpt.modelName} + proxyUrl: ${mallchat.chatgpt.proxyUrl} chatglm2: use: ${mallchat.chatglm2.use} url: ${mallchat.chatglm2.url} minute: 3 # 每个用户每3分钟可以请求一次 AIUserId: ${mallchat.chatglm2.uid} - context: ${mallchat.chatglm2.context} diff --git a/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGLM2Properties.java b/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGLM2Properties.java index 7c050b4..f231643 100644 --- a/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGLM2Properties.java +++ b/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGLM2Properties.java @@ -18,7 +18,7 @@ public class ChatGLM2Properties { /** * 使用 */ - private boolean use; + private boolean use = false; /** * url diff --git a/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGPTProperties.java b/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGPTProperties.java index 4bb97ad..cfb6de7 100644 --- a/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGPTProperties.java +++ b/mallchat-custom-server/src/main/java/com/abin/mallchat/custom/chatai/properties/ChatGPTProperties.java @@ -13,7 +13,7 @@ public class ChatGPTProperties { /** * 是否使用openAI */ - private boolean use; + private boolean use = false; /** * 机器人 id */