@ynhcj/xiaoyi-channel 0.0.149-beta → 0.0.150-beta

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.
@@ -51,7 +51,7 @@ async function processImageInput(imageInput, uploadService) {
51
51
  * Call image understanding API with streaming response
52
52
  * Supports both single image and multiple images (imageUrls array)
53
53
  */
54
- async function callImageUnderstandingAPI(imageUrls, text, apiKey, uid, fileUploadUrl) {
54
+ async function callImageUnderstandingAPI(imageUrls, text, apiKey, uid, fileUploadUrl, sessionId) {
55
55
  const apiUrl = `${fileUploadUrl}/celia-claw/v1/sse-api/skill/execute`;
56
56
  const traceId = `${createHash("sha256").update(uid).digest("hex").slice(0, 32)}_${Date.now()}`;
57
57
  const headers = {
@@ -68,7 +68,7 @@ async function callImageUnderstandingAPI(imageUrls, text, apiKey, uid, fileUploa
68
68
  version: "1.0",
69
69
  session: {
70
70
  isNew: false,
71
- sessionId: "wangyu202410241921",
71
+ sessionId,
72
72
  interactionId: 0,
73
73
  },
74
74
  endpoint: {
@@ -166,7 +166,7 @@ async function callImageUnderstandingAPI(imageUrls, text, apiKey, uid, fileUploa
166
166
  * Supports both local file paths and remote URLs, up to 10 images at once.
167
167
  */
168
168
  export function createImageReadingTool(ctx) {
169
- const { config } = ctx;
169
+ const { config, sessionId } = ctx;
170
170
  return {
171
171
  name: "image_reading",
172
172
  label: "Image Reading",
@@ -210,7 +210,7 @@ export function createImageReadingTool(ctx) {
210
210
  allImageUrls.push(await processImageInput(imageInput, uploadService));
211
211
  }
212
212
  // Call image understanding API with all image URLs
213
- const caption = await callImageUnderstandingAPI(allImageUrls, prompt, config.apiKey, config.uid, config.fileUploadUrl);
213
+ const caption = await callImageUnderstandingAPI(allImageUrls, prompt, config.apiKey, config.uid, config.fileUploadUrl, sessionId);
214
214
  return {
215
215
  content: [
216
216
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.149-beta",
3
+ "version": "0.0.150-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",