@wzyjs/utils 0.3.27 → 0.3.29

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.
@@ -1,5 +1,6 @@
1
1
  export * as ai302 from './302';
2
2
  export * as doubao from './doubao';
3
3
  export * as keling from './keling';
4
+ export * as openai from './openai';
4
5
  export * as xyq from './xyq';
5
6
  export * as text from './text';
@@ -1,4 +1,4 @@
1
- export { setCookie } from './utils';
1
+ export { setCookie, setApiAddress } from './utils';
2
2
  export declare const getVideoStatus: (taskId: string) => Promise<{
3
3
  status: any;
4
4
  url: any;
@@ -1,3 +1,6 @@
1
+ export declare const setApiAddress: (apiAddress?: string, uploadApiAddress?: string) => void;
2
+ export declare const buildApiUrl: (path: string) => string;
3
+ export declare const buildUploadApiUrl: (path: string) => string;
1
4
  export declare const uploadImage: (imageUrl: string) => Promise<any>;
2
5
  export declare const sbumit: (imageUrl: string, prompt?: string) => Promise<any>;
3
6
  export declare const calculateProgress: (taskData: any) => number;
@@ -0,0 +1,11 @@
1
+ export interface OpenAIImageGenerateParams {
2
+ apiAddress: string;
3
+ apiKey: string;
4
+ model: string;
5
+ prompt: string;
6
+ }
7
+ export interface OpenAIImageGenerateResult {
8
+ fileBase64: string;
9
+ format: string;
10
+ }
11
+ export declare const generateImage: (params: OpenAIImageGenerateParams) => Promise<OpenAIImageGenerateResult>;