@umituz/web-ai 1.0.2 → 1.0.3
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/{text-generation.service-CcYQM6Ch.d.ts → cancellation-error-CKcZRhFg.d.ts} +64 -1
- package/dist/{text-generation.service-BQO3Tvz2.d.cts → cancellation-error-DwHrDKBz.d.cts} +64 -1
- package/dist/content/index.cjs +798 -27
- package/dist/content/index.cjs.map +1 -1
- package/dist/content/index.js +798 -27
- package/dist/content/index.js.map +1 -1
- package/dist/hooks/index.cjs +922 -31
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +38 -2
- package/dist/hooks/index.d.ts +38 -2
- package/dist/hooks/index.js +919 -32
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +809 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +800 -28
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +809 -27
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.d.cts +43 -3
- package/dist/providers/index.d.ts +43 -3
- package/dist/providers/index.js +800 -28
- package/dist/providers/index.js.map +1 -1
- package/package.json +6 -1
|
@@ -63,4 +63,67 @@ declare class TextGenerationService implements IGroqChatService, ITextProvider {
|
|
|
63
63
|
private extractContent;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
type PrunaModelId = 'p-image' | 'p-image-edit' | 'p-video';
|
|
67
|
+
type PrunaAspectRatio = '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '3:2' | '2:3';
|
|
68
|
+
type PrunaResolution = '720p' | '1080p';
|
|
69
|
+
type GenerationStage = 'uploading' | 'predicting' | 'polling';
|
|
70
|
+
type PrunaJobStatus = 'succeeded' | 'completed' | 'failed' | 'processing' | 'starting';
|
|
71
|
+
interface GenerateOptions {
|
|
72
|
+
readonly signal?: AbortSignal;
|
|
73
|
+
readonly onProgress?: (stage: GenerationStage, attempt?: number) => void;
|
|
74
|
+
readonly useCache?: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface TextToImageInput {
|
|
77
|
+
readonly model: 'p-image';
|
|
78
|
+
readonly prompt: string;
|
|
79
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
80
|
+
readonly seed?: number;
|
|
81
|
+
}
|
|
82
|
+
interface ImageToImageInput {
|
|
83
|
+
readonly model: 'p-image-edit';
|
|
84
|
+
readonly prompt: string;
|
|
85
|
+
readonly image: string;
|
|
86
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
87
|
+
readonly seed?: number;
|
|
88
|
+
}
|
|
89
|
+
interface ImageToVideoInput {
|
|
90
|
+
readonly model: 'p-video';
|
|
91
|
+
readonly prompt: string;
|
|
92
|
+
readonly image: string;
|
|
93
|
+
readonly duration?: number;
|
|
94
|
+
readonly resolution?: PrunaResolution;
|
|
95
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
96
|
+
readonly draft?: boolean;
|
|
97
|
+
}
|
|
98
|
+
type PrunaInput = TextToImageInput | ImageToImageInput | ImageToVideoInput;
|
|
99
|
+
interface TextToVideoInput {
|
|
100
|
+
readonly prompt: string;
|
|
101
|
+
readonly duration?: number;
|
|
102
|
+
readonly resolution?: PrunaResolution;
|
|
103
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
104
|
+
readonly draft?: boolean;
|
|
105
|
+
}
|
|
106
|
+
interface PrunaResult {
|
|
107
|
+
readonly url: string;
|
|
108
|
+
readonly model: PrunaModelId;
|
|
109
|
+
}
|
|
110
|
+
interface PrunaUrlOutput {
|
|
111
|
+
readonly url: string;
|
|
112
|
+
}
|
|
113
|
+
type PrunaOutput = string | PrunaUrlOutput | readonly string[];
|
|
114
|
+
interface PrunaPredictionResponse {
|
|
115
|
+
readonly generation_url?: string;
|
|
116
|
+
readonly output?: PrunaOutput;
|
|
117
|
+
readonly data?: string;
|
|
118
|
+
readonly video_url?: string;
|
|
119
|
+
readonly get_url?: string;
|
|
120
|
+
readonly status_url?: string;
|
|
121
|
+
readonly status?: PrunaJobStatus;
|
|
122
|
+
readonly error?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class CancellationError extends Error {
|
|
126
|
+
constructor(message?: string);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { CancellationError as C, type GenerateOptions as G, type IGroqChatService as I, type PrunaAspectRatio as P, type StreamingCallbacks as S, type TextGenerationOptions as T, type GenerationStage as a, type IGroqHttpClient as b, type ImageToImageInput as c, type ImageToVideoInput as d, type PrunaInput as e, type PrunaModelId as f, type PrunaOutput as g, type PrunaPredictionResponse as h, type PrunaResolution as i, type PrunaResult as j, type StructuredGenerationOptions as k, TextGenerationService as l, type TextToImageInput as m, type TextToVideoInput as n };
|
|
@@ -63,4 +63,67 @@ declare class TextGenerationService implements IGroqChatService, ITextProvider {
|
|
|
63
63
|
private extractContent;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
type PrunaModelId = 'p-image' | 'p-image-edit' | 'p-video';
|
|
67
|
+
type PrunaAspectRatio = '16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '3:2' | '2:3';
|
|
68
|
+
type PrunaResolution = '720p' | '1080p';
|
|
69
|
+
type GenerationStage = 'uploading' | 'predicting' | 'polling';
|
|
70
|
+
type PrunaJobStatus = 'succeeded' | 'completed' | 'failed' | 'processing' | 'starting';
|
|
71
|
+
interface GenerateOptions {
|
|
72
|
+
readonly signal?: AbortSignal;
|
|
73
|
+
readonly onProgress?: (stage: GenerationStage, attempt?: number) => void;
|
|
74
|
+
readonly useCache?: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface TextToImageInput {
|
|
77
|
+
readonly model: 'p-image';
|
|
78
|
+
readonly prompt: string;
|
|
79
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
80
|
+
readonly seed?: number;
|
|
81
|
+
}
|
|
82
|
+
interface ImageToImageInput {
|
|
83
|
+
readonly model: 'p-image-edit';
|
|
84
|
+
readonly prompt: string;
|
|
85
|
+
readonly image: string;
|
|
86
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
87
|
+
readonly seed?: number;
|
|
88
|
+
}
|
|
89
|
+
interface ImageToVideoInput {
|
|
90
|
+
readonly model: 'p-video';
|
|
91
|
+
readonly prompt: string;
|
|
92
|
+
readonly image: string;
|
|
93
|
+
readonly duration?: number;
|
|
94
|
+
readonly resolution?: PrunaResolution;
|
|
95
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
96
|
+
readonly draft?: boolean;
|
|
97
|
+
}
|
|
98
|
+
type PrunaInput = TextToImageInput | ImageToImageInput | ImageToVideoInput;
|
|
99
|
+
interface TextToVideoInput {
|
|
100
|
+
readonly prompt: string;
|
|
101
|
+
readonly duration?: number;
|
|
102
|
+
readonly resolution?: PrunaResolution;
|
|
103
|
+
readonly aspect_ratio?: PrunaAspectRatio;
|
|
104
|
+
readonly draft?: boolean;
|
|
105
|
+
}
|
|
106
|
+
interface PrunaResult {
|
|
107
|
+
readonly url: string;
|
|
108
|
+
readonly model: PrunaModelId;
|
|
109
|
+
}
|
|
110
|
+
interface PrunaUrlOutput {
|
|
111
|
+
readonly url: string;
|
|
112
|
+
}
|
|
113
|
+
type PrunaOutput = string | PrunaUrlOutput | readonly string[];
|
|
114
|
+
interface PrunaPredictionResponse {
|
|
115
|
+
readonly generation_url?: string;
|
|
116
|
+
readonly output?: PrunaOutput;
|
|
117
|
+
readonly data?: string;
|
|
118
|
+
readonly video_url?: string;
|
|
119
|
+
readonly get_url?: string;
|
|
120
|
+
readonly status_url?: string;
|
|
121
|
+
readonly status?: PrunaJobStatus;
|
|
122
|
+
readonly error?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class CancellationError extends Error {
|
|
126
|
+
constructor(message?: string);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { CancellationError as C, type GenerateOptions as G, type IGroqChatService as I, type PrunaAspectRatio as P, type StreamingCallbacks as S, type TextGenerationOptions as T, type GenerationStage as a, type IGroqHttpClient as b, type ImageToImageInput as c, type ImageToVideoInput as d, type PrunaInput as e, type PrunaModelId as f, type PrunaOutput as g, type PrunaPredictionResponse as h, type PrunaResolution as i, type PrunaResult as j, type StructuredGenerationOptions as k, TextGenerationService as l, type TextToImageInput as m, type TextToVideoInput as n };
|