cortico-world-forward-reader 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +3 -3
- package/src/config.js +3 -2
- package/src/vision.js +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,8 @@ Coopanion 自带的消息展开只摊开一层,转发里套着的转发看不
|
|
|
36
36
|
|
|
37
37
|
拆到图片时,可以让视觉端点在图后面补一句「这张图是什么」。
|
|
38
38
|
|
|
39
|
-
- 端点默认**跟着 QQ
|
|
39
|
+
- 端点默认**跟着 QQ 群聊插件走**:先在 QQ 群聊插件里把视觉端点、模型、key 配好,这里就自动认得到,不用再填一遍。
|
|
40
|
+
- 那边没配、或者想单独用别的模型,才在下面的「视觉端点 / 模型 / 密钥」里填。
|
|
40
41
|
- 一张图一次调用,会花钱,所以默认关;工具调用时也可以当场传 `captions: true`。
|
|
41
42
|
- 识图失败不会弄坏整份拆解,只会在那张图后面写一句失败原因。
|
|
42
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortico-world-forward-reader",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "转发拆解 World:把 QQ 的「合并转发」一层层拆到底,嵌套在里面的转发也展开,输出带缩进的人话。只读,不发消息。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"locales": {
|
|
42
42
|
"zh": {
|
|
43
43
|
"displayName": "转发拆解",
|
|
44
|
-
"description": "【需要先装 QQ 群聊插件】把 QQ 的「合并转发」一层层拆到底——嵌套在里面的转发也会展开,按人、按时间列成带缩进的文字。只读:借 QQ 群聊插件(qqbot)配好的本机 SnowLuma OneBot HTTP
|
|
44
|
+
"description": "【需要先装 QQ 群聊插件】把 QQ 的「合并转发」一层层拆到底——嵌套在里面的转发也会展开,按人、按时间列成带缩进的文字。只读:借 QQ 群聊插件(qqbot)配好的本机 SnowLuma OneBot HTTP 接口取消息,不发消息、不改任何东西。识图也借那边的视觉端点,用之前先在 QQ 群聊插件里配好端点/模型/key。"
|
|
45
45
|
},
|
|
46
46
|
"en": {
|
|
47
47
|
"displayName": "Forward Reader",
|
|
48
|
-
"description": "Requires the QQ chat (qqbot) plugin. Expands QQ merged-forward messages recursively, including forwards nested inside forwards, into an indented transcript. Read-only: it reuses the SnowLuma OneBot HTTP API
|
|
48
|
+
"description": "Requires the QQ chat (qqbot) plugin. Expands QQ merged-forward messages recursively, including forwards nested inside forwards, into an indented transcript. Read-only: it reuses the SnowLuma OneBot HTTP API that plugin already set up, and never sends or changes anything. Image captions reuse that plugin's vision endpoint too — configure it there first."
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"describe": "describe.json",
|
package/src/config.js
CHANGED
|
@@ -44,7 +44,7 @@ export const CONFIG_GROUP = {
|
|
|
44
44
|
title: '转发拆解',
|
|
45
45
|
description:
|
|
46
46
|
'【前置:先装 QQ 群聊插件】把 QQ 的「合并转发」一层层拆到底:借那个插件配好的 SnowLuma OneBot HTTP 接口递归调 get_forward_msg,' +
|
|
47
|
-
'
|
|
47
|
+
'嵌套在里面的转发也会展开;识图也借它的视觉端点(识图前先在 QQ 群聊插件里配好端点/模型/key)。只读,不发消息、不改 QQ 配置。',
|
|
48
48
|
properties: {
|
|
49
49
|
'worlds.forward-reader.snowlumaConfig': {
|
|
50
50
|
type: 'string',
|
|
@@ -121,7 +121,8 @@ export const CONFIG_GROUP = {
|
|
|
121
121
|
'worlds.forward-reader.visionEndpoint': {
|
|
122
122
|
type: 'string',
|
|
123
123
|
title: '视觉端点(可选)',
|
|
124
|
-
description:
|
|
124
|
+
description:
|
|
125
|
+
'留空就行:会用 QQ 群聊插件里配好的视觉端点(那边没配的话,在这里填端点/模型/key)。',
|
|
125
126
|
},
|
|
126
127
|
'worlds.forward-reader.visionModel': {
|
|
127
128
|
type: 'string',
|
package/src/vision.js
CHANGED
|
@@ -104,7 +104,7 @@ async function fetchImage(url, timeoutMs) {
|
|
|
104
104
|
export async function captionImage(vision, url, opts = {}) {
|
|
105
105
|
const timeoutMs = opts.timeoutMs ?? 30000;
|
|
106
106
|
const chars = opts.chars ?? 60;
|
|
107
|
-
if (!vision) return '
|
|
107
|
+
if (!vision) return '(没找到视觉端点:先在 QQ 群聊插件里配好,或在这里填端点/模型/key)';
|
|
108
108
|
let buf;
|
|
109
109
|
try {
|
|
110
110
|
buf = await fetchImage(url, timeoutMs);
|