@ynhcj/xiaoyi-channel 0.0.36-next → 0.0.37-next
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/dist/src/push.d.ts
CHANGED
package/dist/src/push.js
CHANGED
|
@@ -7,7 +7,6 @@ import { randomUUID } from "crypto";
|
|
|
7
7
|
*/
|
|
8
8
|
export class XYPushService {
|
|
9
9
|
config;
|
|
10
|
-
DEFAULT_PUSH_URL = "https://hag.cloud.huawei.com/open-ability-agent/v1/agent-webhook";
|
|
11
10
|
REQUEST_FROM = "openclaw";
|
|
12
11
|
constructor(config) {
|
|
13
12
|
this.config = config;
|
|
@@ -29,7 +28,7 @@ export class XYPushService {
|
|
|
29
28
|
* @param pushId - Push ID to use (required)
|
|
30
29
|
*/
|
|
31
30
|
async sendPush(content, title, data, sessionId, pushDataId, pushId) {
|
|
32
|
-
const pushUrl = this.config.
|
|
31
|
+
const pushUrl = `${this.config.fileUploadUrl}/open-ability-agent/v1/agent-webhook`;
|
|
33
32
|
const traceId = this.generateTraceId();
|
|
34
33
|
// Use provided pushId or fall back to config pushId
|
|
35
34
|
const actualPushId = pushId || this.config.pushId;
|
|
@@ -87,8 +87,8 @@ async function processImageInput(imageInput, uploadService) {
|
|
|
87
87
|
/**
|
|
88
88
|
* Call image understanding API with streaming response
|
|
89
89
|
*/
|
|
90
|
-
async function callImageUnderstandingAPI(imageUrl, text, apiKey, uid) {
|
|
91
|
-
const apiUrl =
|
|
90
|
+
async function callImageUnderstandingAPI(imageUrl, text, apiKey, uid, fileUploadUrl) {
|
|
91
|
+
const apiUrl = `${fileUploadUrl}/celia-claw/v1/sse-api/skill/execute`;
|
|
92
92
|
const traceId = uuidv4();
|
|
93
93
|
const headers = {
|
|
94
94
|
"Content-Type": "application/json",
|
|
@@ -276,7 +276,7 @@ d. 返回图像理解的文本描述内容`,
|
|
|
276
276
|
downloadedFile = processedImage.localPath;
|
|
277
277
|
}
|
|
278
278
|
// Call image understanding API
|
|
279
|
-
const caption = await callImageUnderstandingAPI(processedImage.imageUrl, prompt, config.apiKey, config.uid);
|
|
279
|
+
const caption = await callImageUnderstandingAPI(processedImage.imageUrl, prompt, config.apiKey, config.uid, config.fileUploadUrl);
|
|
280
280
|
// Clean up downloaded file if any
|
|
281
281
|
if (downloadedFile) {
|
|
282
282
|
try {
|