From 4876c8ea433aec907536729ded8c10be72a7d65a Mon Sep 17 00:00:00 2001 From: DCloud__JSON Date: Tue, 13 Jun 2023 15:21:06 +0800 Subject: [PATCH] 1.1.4 --- changelog.md | 2 ++ package.json | 2 +- uniCloud-aliyun/cloudfunctions/uni-ai-chat/index.obj.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index eb8290c..27c32a2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,5 @@ +## 1.1.4(2023-06-13) +- 更新 当内容长度超过800再执行总结 ## 1.1.3(2023-06-12) - 修复 流式响应模式 响应包含`insufficientScore`时客户端未显示广告位的问题 ## 1.1.2(2023-06-12) diff --git a/package.json b/package.json index 0937ca4..878b65a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "id": "uni-ai-chat", "name": "uni-ai-chat", - "version": "1.1.3", + "version": "1.1.4", "description": "基于uni-ai的聊天示例项目,支持流式、支持前文总结,云端一体", "main": "main.js", "scripts": { diff --git a/uniCloud-aliyun/cloudfunctions/uni-ai-chat/index.obj.js b/uniCloud-aliyun/cloudfunctions/uni-ai-chat/index.obj.js index 551164d..10723cf 100644 --- a/uniCloud-aliyun/cloudfunctions/uni-ai-chat/index.obj.js +++ b/uniCloud-aliyun/cloudfunctions/uni-ai-chat/index.obj.js @@ -228,7 +228,7 @@ module.exports = { // 判断是否需要总结,如果需要就开始总结 // 计算消息总长度,判断是否需要总结 - let needSummarize = messages.map(i => i.content).join('').length > 50, + let needSummarize = messages.map(i => i.content).join('').length > 800, // 总结的内容默认为 false 表示没有内容或者暂未拿到 summarizeData = false, //成功拿到总结内容的回调函数列表 -- GitLab