@howone/sdk 0.3.19 → 0.3.21
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/index.d.mts +49 -84
- package/dist/index.d.ts +49 -84
- package/dist/index.js +1 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -49
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -80,7 +80,7 @@ var init_config = __esm({
|
|
|
80
80
|
prodEnv = {
|
|
81
81
|
AUTH_ROOT_VALUE: "https://howone.ai",
|
|
82
82
|
baseUrl: "https://api.howone.ai/api",
|
|
83
|
-
aiBaseUrl: "https://
|
|
83
|
+
aiBaseUrl: "https://eax.services"
|
|
84
84
|
};
|
|
85
85
|
envs = {
|
|
86
86
|
local: localEnv,
|
|
@@ -2563,39 +2563,6 @@ function createUploadClient(req, projectId) {
|
|
|
2563
2563
|
};
|
|
2564
2564
|
}
|
|
2565
2565
|
|
|
2566
|
-
// src/services/ai-client.ts
|
|
2567
|
-
function createAIClient(req, projectId) {
|
|
2568
|
-
const generateImageUrl = projectId ? `/entities/apps/${projectId}/generate-image` : "/generate-image";
|
|
2569
|
-
return {
|
|
2570
|
-
/**
|
|
2571
|
-
* 生成/修改图片
|
|
2572
|
-
*
|
|
2573
|
-
* @example
|
|
2574
|
-
* ```typescript
|
|
2575
|
-
* const result = await client.ai.generateImage({
|
|
2576
|
-
* imageUrl: 'https://example.com/image.jpg',
|
|
2577
|
-
* description: '把天空改成蓝色'
|
|
2578
|
-
* })
|
|
2579
|
-
* console.log('新图片:', result.imageUrl)
|
|
2580
|
-
* ```
|
|
2581
|
-
*/
|
|
2582
|
-
async generateImage(options) {
|
|
2583
|
-
const { imageUrl, description, signal } = options;
|
|
2584
|
-
const response = await req.post({
|
|
2585
|
-
url: generateImageUrl,
|
|
2586
|
-
data: {
|
|
2587
|
-
imageUrl,
|
|
2588
|
-
description
|
|
2589
|
-
},
|
|
2590
|
-
signal
|
|
2591
|
-
});
|
|
2592
|
-
return {
|
|
2593
|
-
imageUrl: response.data.result.imageUrl
|
|
2594
|
-
};
|
|
2595
|
-
}
|
|
2596
|
-
};
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
2566
|
// src/services/sse-executor.ts
|
|
2600
2567
|
init_config();
|
|
2601
2568
|
async function executeSSEWorkflow(request, options = {}) {
|
|
@@ -3699,20 +3666,6 @@ function createClient(opts) {
|
|
|
3699
3666
|
* ```
|
|
3700
3667
|
*/
|
|
3701
3668
|
upload: createUploadClient(bizWrapped, opts?.projectId),
|
|
3702
|
-
/**
|
|
3703
|
-
* AI 功能模块
|
|
3704
|
-
*
|
|
3705
|
-
* @example
|
|
3706
|
-
* ```typescript
|
|
3707
|
-
* // 图片生成/修改
|
|
3708
|
-
* const result = await client.ai.generateImage({
|
|
3709
|
-
* imageUrl: 'https://example.com/image.jpg',
|
|
3710
|
-
* description: '把天空改成蓝色'
|
|
3711
|
-
* })
|
|
3712
|
-
* console.log('新图片:', result.imageUrl)
|
|
3713
|
-
* ```
|
|
3714
|
-
*/
|
|
3715
|
-
ai: createAIClient(bizWrapped, opts?.projectId),
|
|
3716
3669
|
me: async () => {
|
|
3717
3670
|
try {
|
|
3718
3671
|
let availableToken = getCachedOrGlobalToken();
|
|
@@ -4216,7 +4169,6 @@ export {
|
|
|
4216
4169
|
ThemeToggle,
|
|
4217
4170
|
aiWorkflow,
|
|
4218
4171
|
canAccessArtifact,
|
|
4219
|
-
createAIClient,
|
|
4220
4172
|
createAIWorkflowClient,
|
|
4221
4173
|
createAIWorkflowClientAxios,
|
|
4222
4174
|
createArtifactsClient,
|