modelfusion 0.110.0 → 0.111.0
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/CHANGELOG.md +15 -0
- package/core/api/ApiFacade.cjs +20 -0
- package/core/api/ApiFacade.d.ts +4 -0
- package/core/api/ApiFacade.js +4 -0
- package/core/api/BaseUrlApiConfiguration.cjs +47 -5
- package/core/api/BaseUrlApiConfiguration.d.ts +23 -6
- package/core/api/BaseUrlApiConfiguration.js +45 -4
- package/core/api/BaseUrlApiConfiguration.test.cjs +11 -0
- package/core/api/BaseUrlApiConfiguration.test.d.ts +1 -0
- package/core/api/BaseUrlApiConfiguration.test.js +9 -0
- package/core/api/callWithRetryAndThrottle.cjs +3 -3
- package/core/api/callWithRetryAndThrottle.js +3 -3
- package/core/api/index.cjs +15 -2
- package/core/api/index.d.ts +2 -2
- package/core/api/index.js +2 -2
- package/core/api/postToApi.cjs +28 -5
- package/core/api/postToApi.d.ts +5 -4
- package/core/api/postToApi.js +26 -4
- package/core/api/throttleOff.cjs +8 -0
- package/core/api/throttleOff.d.ts +5 -0
- package/core/api/throttleOff.js +4 -0
- package/internal/index.cjs +2 -8
- package/internal/index.d.ts +1 -1
- package/internal/index.js +1 -1
- package/model-function/generate-structure/generateStructure.d.ts +1 -1
- package/model-provider/anthropic/AnthropicApiConfiguration.cjs +14 -6
- package/model-provider/anthropic/AnthropicApiConfiguration.d.ts +7 -8
- package/model-provider/anthropic/AnthropicApiConfiguration.js +15 -7
- package/model-provider/anthropic/AnthropicError.cjs +7 -27
- package/model-provider/anthropic/AnthropicError.d.ts +21 -16
- package/model-provider/anthropic/AnthropicError.js +7 -25
- package/model-provider/anthropic/AnthropicFacade.cjs +10 -1
- package/model-provider/anthropic/AnthropicFacade.d.ts +9 -0
- package/model-provider/anthropic/AnthropicFacade.js +8 -0
- package/model-provider/anthropic/AnthropicTextGenerationModel.cjs +22 -24
- package/model-provider/anthropic/AnthropicTextGenerationModel.js +23 -25
- package/model-provider/anthropic/index.cjs +1 -4
- package/model-provider/anthropic/index.d.ts +1 -1
- package/model-provider/anthropic/index.js +0 -1
- package/model-provider/automatic1111/Automatic1111ApiConfiguration.cjs +12 -4
- package/model-provider/automatic1111/Automatic1111ApiConfiguration.d.ts +3 -3
- package/model-provider/automatic1111/Automatic1111ApiConfiguration.js +12 -4
- package/model-provider/automatic1111/Automatic1111Error.cjs +3 -3
- package/model-provider/automatic1111/Automatic1111Error.d.ts +13 -3
- package/model-provider/automatic1111/Automatic1111Error.js +4 -4
- package/model-provider/automatic1111/Automatic1111Facade.cjs +9 -9
- package/model-provider/automatic1111/Automatic1111Facade.d.ts +6 -6
- package/model-provider/automatic1111/Automatic1111Facade.js +7 -7
- package/model-provider/automatic1111/Automatic1111ImageGenerationModel.cjs +11 -7
- package/model-provider/automatic1111/Automatic1111ImageGenerationModel.js +11 -7
- package/model-provider/cohere/CohereApiConfiguration.cjs +14 -6
- package/model-provider/cohere/CohereApiConfiguration.d.ts +7 -8
- package/model-provider/cohere/CohereApiConfiguration.js +15 -7
- package/model-provider/cohere/CohereError.cjs +8 -43
- package/model-provider/cohere/CohereError.d.ts +9 -16
- package/model-provider/cohere/CohereError.js +8 -41
- package/model-provider/cohere/CohereFacade.cjs +12 -3
- package/model-provider/cohere/CohereFacade.d.ts +11 -2
- package/model-provider/cohere/CohereFacade.js +10 -2
- package/model-provider/cohere/CohereTextEmbeddingModel.cjs +18 -22
- package/model-provider/cohere/CohereTextEmbeddingModel.js +18 -22
- package/model-provider/cohere/CohereTextGenerationModel.cjs +31 -39
- package/model-provider/cohere/CohereTextGenerationModel.d.ts +110 -8
- package/model-provider/cohere/CohereTextGenerationModel.js +31 -39
- package/model-provider/cohere/CohereTokenizer.cjs +32 -41
- package/model-provider/cohere/CohereTokenizer.d.ts +2 -2
- package/model-provider/cohere/CohereTokenizer.js +32 -41
- package/model-provider/cohere/index.cjs +1 -3
- package/model-provider/cohere/index.d.ts +1 -1
- package/model-provider/cohere/index.js +0 -1
- package/model-provider/elevenlabs/ElevenLabsApiConfiguration.cjs +14 -6
- package/model-provider/elevenlabs/ElevenLabsApiConfiguration.d.ts +7 -8
- package/model-provider/elevenlabs/ElevenLabsApiConfiguration.js +15 -7
- package/model-provider/elevenlabs/ElevenLabsFacade.cjs +10 -1
- package/model-provider/elevenlabs/ElevenLabsFacade.d.ts +9 -0
- package/model-provider/elevenlabs/ElevenLabsFacade.js +8 -0
- package/model-provider/elevenlabs/ElevenLabsSpeechModel.cjs +42 -53
- package/model-provider/elevenlabs/ElevenLabsSpeechModel.js +44 -55
- package/model-provider/huggingface/HuggingFaceApiConfiguration.cjs +14 -6
- package/model-provider/huggingface/HuggingFaceApiConfiguration.d.ts +7 -8
- package/model-provider/huggingface/HuggingFaceApiConfiguration.js +15 -7
- package/model-provider/huggingface/HuggingFaceError.cjs +7 -29
- package/model-provider/huggingface/HuggingFaceError.d.ts +9 -16
- package/model-provider/huggingface/HuggingFaceError.js +7 -27
- package/model-provider/huggingface/HuggingFaceFacade.cjs +10 -1
- package/model-provider/huggingface/HuggingFaceFacade.d.ts +9 -0
- package/model-provider/huggingface/HuggingFaceFacade.js +8 -0
- package/model-provider/huggingface/HuggingFaceTextEmbeddingModel.cjs +17 -27
- package/model-provider/huggingface/HuggingFaceTextEmbeddingModel.js +17 -27
- package/model-provider/huggingface/HuggingFaceTextGenerationModel.cjs +22 -23
- package/model-provider/huggingface/HuggingFaceTextGenerationModel.js +22 -23
- package/model-provider/huggingface/index.cjs +1 -3
- package/model-provider/huggingface/index.d.ts +1 -1
- package/model-provider/huggingface/index.js +0 -1
- package/model-provider/llamacpp/LlamaCppApiConfiguration.cjs +13 -6
- package/model-provider/llamacpp/LlamaCppApiConfiguration.d.ts +7 -9
- package/model-provider/llamacpp/LlamaCppApiConfiguration.js +14 -7
- package/model-provider/llamacpp/LlamaCppCompletionModel.cjs +4 -4
- package/model-provider/llamacpp/LlamaCppCompletionModel.d.ts +173 -5
- package/model-provider/llamacpp/LlamaCppCompletionModel.js +4 -4
- package/model-provider/llamacpp/LlamaCppError.cjs +7 -27
- package/model-provider/llamacpp/LlamaCppError.d.ts +9 -16
- package/model-provider/llamacpp/LlamaCppError.js +7 -25
- package/model-provider/llamacpp/LlamaCppFacade.cjs +10 -2
- package/model-provider/llamacpp/LlamaCppFacade.d.ts +8 -1
- package/model-provider/llamacpp/LlamaCppFacade.js +8 -1
- package/model-provider/llamacpp/LlamaCppTextEmbeddingModel.cjs +10 -14
- package/model-provider/llamacpp/LlamaCppTextEmbeddingModel.js +10 -14
- package/model-provider/llamacpp/LlamaCppTokenizer.cjs +14 -18
- package/model-provider/llamacpp/LlamaCppTokenizer.js +14 -18
- package/model-provider/llamacpp/index.cjs +1 -3
- package/model-provider/llamacpp/index.d.ts +1 -1
- package/model-provider/llamacpp/index.js +0 -1
- package/model-provider/lmnt/LmntApiConfiguration.cjs +14 -6
- package/model-provider/lmnt/LmntApiConfiguration.d.ts +7 -8
- package/model-provider/lmnt/LmntApiConfiguration.js +15 -7
- package/model-provider/lmnt/LmntFacade.cjs +11 -2
- package/model-provider/lmnt/LmntFacade.d.ts +10 -1
- package/model-provider/lmnt/LmntFacade.js +9 -1
- package/model-provider/lmnt/LmntSpeechModel.cjs +53 -41
- package/model-provider/lmnt/LmntSpeechModel.d.ts +51 -3
- package/model-provider/lmnt/LmntSpeechModel.js +54 -42
- package/model-provider/mistral/MistralApiConfiguration.cjs +14 -6
- package/model-provider/mistral/MistralApiConfiguration.d.ts +9 -11
- package/model-provider/mistral/MistralApiConfiguration.js +15 -7
- package/model-provider/mistral/MistralChatModel.cjs +4 -4
- package/model-provider/mistral/MistralChatModel.d.ts +48 -3
- package/model-provider/mistral/MistralChatModel.js +5 -5
- package/model-provider/mistral/MistralError.cjs +3 -3
- package/model-provider/mistral/MistralError.d.ts +15 -3
- package/model-provider/mistral/MistralError.js +4 -4
- package/model-provider/mistral/MistralFacade.cjs +5 -1
- package/model-provider/mistral/MistralFacade.d.ts +10 -3
- package/model-provider/mistral/MistralFacade.js +6 -2
- package/model-provider/mistral/MistralTextEmbeddingModel.cjs +2 -1
- package/model-provider/mistral/MistralTextEmbeddingModel.js +2 -1
- package/model-provider/ollama/OllamaApiConfiguration.cjs +13 -6
- package/model-provider/ollama/OllamaApiConfiguration.d.ts +7 -10
- package/model-provider/ollama/OllamaApiConfiguration.js +14 -7
- package/model-provider/ollama/OllamaChatModel.cjs +4 -4
- package/model-provider/ollama/OllamaChatModel.d.ts +46 -5
- package/model-provider/ollama/OllamaChatModel.js +5 -5
- package/model-provider/ollama/OllamaCompletionModel.cjs +4 -4
- package/model-provider/ollama/OllamaCompletionModel.d.ts +40 -5
- package/model-provider/ollama/OllamaCompletionModel.js +5 -5
- package/model-provider/ollama/OllamaError.cjs +3 -3
- package/model-provider/ollama/OllamaError.d.ts +7 -3
- package/model-provider/ollama/OllamaError.js +4 -4
- package/model-provider/ollama/OllamaFacade.cjs +6 -2
- package/model-provider/ollama/OllamaFacade.d.ts +8 -3
- package/model-provider/ollama/OllamaFacade.js +6 -2
- package/model-provider/ollama/OllamaTextEmbeddingModel.cjs +15 -16
- package/model-provider/ollama/OllamaTextEmbeddingModel.js +15 -16
- package/model-provider/openai/AbstractOpenAIChatModel.cjs +4 -4
- package/model-provider/openai/AbstractOpenAIChatModel.d.ts +148 -2
- package/model-provider/openai/AbstractOpenAIChatModel.js +4 -4
- package/model-provider/openai/AbstractOpenAICompletionModel.cjs +30 -32
- package/model-provider/openai/AbstractOpenAICompletionModel.js +30 -32
- package/model-provider/openai/AzureOpenAIApiConfiguration.d.ts +9 -8
- package/model-provider/openai/OpenAIApiConfiguration.cjs +14 -6
- package/model-provider/openai/OpenAIApiConfiguration.d.ts +7 -8
- package/model-provider/openai/OpenAIApiConfiguration.js +15 -7
- package/model-provider/openai/OpenAIError.cjs +8 -8
- package/model-provider/openai/OpenAIError.d.ts +27 -3
- package/model-provider/openai/OpenAIError.js +9 -9
- package/model-provider/openai/OpenAIFacade.cjs +23 -2
- package/model-provider/openai/OpenAIFacade.d.ts +20 -2
- package/model-provider/openai/OpenAIFacade.js +20 -1
- package/model-provider/openai/OpenAIImageGenerationModel.cjs +20 -21
- package/model-provider/openai/OpenAIImageGenerationModel.js +20 -21
- package/model-provider/openai/OpenAISpeechModel.cjs +17 -22
- package/model-provider/openai/OpenAISpeechModel.js +17 -22
- package/model-provider/openai/OpenAITextEmbeddingModel.cjs +18 -23
- package/model-provider/openai/OpenAITextEmbeddingModel.js +18 -23
- package/model-provider/openai/OpenAITranscriptionModel.cjs +42 -48
- package/model-provider/openai/OpenAITranscriptionModel.d.ts +14 -10
- package/model-provider/openai/OpenAITranscriptionModel.js +42 -48
- package/model-provider/openai-compatible/FireworksAIApiConfiguration.cjs +11 -7
- package/model-provider/openai-compatible/FireworksAIApiConfiguration.d.ts +4 -9
- package/model-provider/openai-compatible/FireworksAIApiConfiguration.js +12 -8
- package/model-provider/openai-compatible/OpenAICompatibleFacade.cjs +25 -1
- package/model-provider/openai-compatible/OpenAICompatibleFacade.d.ts +23 -0
- package/model-provider/openai-compatible/OpenAICompatibleFacade.js +22 -0
- package/model-provider/openai-compatible/TogetherAIApiConfiguration.cjs +11 -7
- package/model-provider/openai-compatible/TogetherAIApiConfiguration.d.ts +4 -9
- package/model-provider/openai-compatible/TogetherAIApiConfiguration.js +12 -8
- package/model-provider/stability/StabilityApiConfiguration.cjs +13 -12
- package/model-provider/stability/StabilityApiConfiguration.d.ts +4 -4
- package/model-provider/stability/StabilityApiConfiguration.js +13 -12
- package/model-provider/stability/StabilityError.cjs +3 -3
- package/model-provider/stability/StabilityError.d.ts +7 -3
- package/model-provider/stability/StabilityError.js +4 -4
- package/model-provider/stability/StabilityFacade.cjs +9 -9
- package/model-provider/stability/StabilityFacade.d.ts +8 -8
- package/model-provider/stability/StabilityFacade.js +7 -7
- package/model-provider/stability/StabilityImageGenerationModel.cjs +2 -1
- package/model-provider/stability/StabilityImageGenerationModel.js +2 -1
- package/model-provider/whispercpp/WhisperCppApiConfiguration.cjs +13 -6
- package/model-provider/whispercpp/WhisperCppApiConfiguration.d.ts +7 -10
- package/model-provider/whispercpp/WhisperCppApiConfiguration.js +14 -7
- package/model-provider/whispercpp/WhisperCppFacade.cjs +9 -5
- package/model-provider/whispercpp/WhisperCppFacade.d.ts +7 -2
- package/model-provider/whispercpp/WhisperCppFacade.js +8 -4
- package/model-provider/whispercpp/WhisperCppTranscriptionModel.cjs +5 -2
- package/model-provider/whispercpp/WhisperCppTranscriptionModel.js +6 -3
- package/package.json +1 -1
- package/tool/WebSearchTool.cjs +2 -2
- package/tool/WebSearchTool.d.ts +1 -2
- package/tool/WebSearchTool.js +3 -3
- package/vector-index/memory/MemoryVectorIndex.cjs +2 -2
- package/vector-index/memory/MemoryVectorIndex.js +3 -3
- package/core/api/BaseUrlPartsApiConfiguration.cjs +0 -53
- package/core/api/BaseUrlPartsApiConfiguration.d.ts +0 -26
- package/core/api/BaseUrlPartsApiConfiguration.js +0 -49
- package/core/api/throttleUnlimitedConcurrency.cjs +0 -8
- package/core/api/throttleUnlimitedConcurrency.d.ts +0 -5
- package/core/api/throttleUnlimitedConcurrency.js +0 -4
- package/model-provider/elevenlabs/ElevenLabsError.cjs +0 -30
- package/model-provider/elevenlabs/ElevenLabsError.d.ts +0 -3
- package/model-provider/elevenlabs/ElevenLabsError.js +0 -26
- package/model-provider/lmnt/LmntError.cjs +0 -30
- package/model-provider/lmnt/LmntError.d.ts +0 -3
- package/model-provider/lmnt/LmntError.js +0 -26
@@ -36,6 +36,10 @@ export interface OpenAITranscriptionModelSettings extends TranscriptionModelSett
|
|
36
36
|
* increase the temperature until certain thresholds are hit.
|
37
37
|
*/
|
38
38
|
temperature?: number;
|
39
|
+
/**
|
40
|
+
* An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
|
41
|
+
*/
|
42
|
+
prompt?: string;
|
39
43
|
}
|
40
44
|
export type OpenAITranscriptionInput = {
|
41
45
|
type: "flac" | "m4a" | "mp3" | "mp4" | "mpeg" | "mpga" | "ogg" | "wav" | "webm";
|
@@ -64,16 +68,16 @@ export declare class OpenAITranscriptionModel extends AbstractModel<OpenAITransc
|
|
64
68
|
doTranscribe(data: OpenAITranscriptionInput, options?: FunctionOptions): Promise<{
|
65
69
|
response: {
|
66
70
|
text: string;
|
71
|
+
duration: number;
|
67
72
|
task: "transcribe";
|
68
73
|
language: string;
|
69
|
-
duration: number;
|
70
74
|
segments: {
|
71
75
|
text: string;
|
72
76
|
id: number;
|
73
77
|
temperature: number;
|
74
78
|
tokens: number[];
|
75
|
-
seek: number;
|
76
79
|
start: number;
|
80
|
+
seek: number;
|
77
81
|
end: number;
|
78
82
|
avg_logprob: number;
|
79
83
|
compression_ratio: number;
|
@@ -118,8 +122,8 @@ declare const openAITranscriptionVerboseJsonSchema: z.ZodObject<{
|
|
118
122
|
id: number;
|
119
123
|
temperature: number;
|
120
124
|
tokens: number[];
|
121
|
-
seek: number;
|
122
125
|
start: number;
|
126
|
+
seek: number;
|
123
127
|
end: number;
|
124
128
|
avg_logprob: number;
|
125
129
|
compression_ratio: number;
|
@@ -130,8 +134,8 @@ declare const openAITranscriptionVerboseJsonSchema: z.ZodObject<{
|
|
130
134
|
id: number;
|
131
135
|
temperature: number;
|
132
136
|
tokens: number[];
|
133
|
-
seek: number;
|
134
137
|
start: number;
|
138
|
+
seek: number;
|
135
139
|
end: number;
|
136
140
|
avg_logprob: number;
|
137
141
|
compression_ratio: number;
|
@@ -141,16 +145,16 @@ declare const openAITranscriptionVerboseJsonSchema: z.ZodObject<{
|
|
141
145
|
text: z.ZodString;
|
142
146
|
}, "strip", z.ZodTypeAny, {
|
143
147
|
text: string;
|
148
|
+
duration: number;
|
144
149
|
task: "transcribe";
|
145
150
|
language: string;
|
146
|
-
duration: number;
|
147
151
|
segments: {
|
148
152
|
text: string;
|
149
153
|
id: number;
|
150
154
|
temperature: number;
|
151
155
|
tokens: number[];
|
152
|
-
seek: number;
|
153
156
|
start: number;
|
157
|
+
seek: number;
|
154
158
|
end: number;
|
155
159
|
avg_logprob: number;
|
156
160
|
compression_ratio: number;
|
@@ -159,16 +163,16 @@ declare const openAITranscriptionVerboseJsonSchema: z.ZodObject<{
|
|
159
163
|
}[];
|
160
164
|
}, {
|
161
165
|
text: string;
|
166
|
+
duration: number;
|
162
167
|
task: "transcribe";
|
163
168
|
language: string;
|
164
|
-
duration: number;
|
165
169
|
segments: {
|
166
170
|
text: string;
|
167
171
|
id: number;
|
168
172
|
temperature: number;
|
169
173
|
tokens: number[];
|
170
|
-
seek: number;
|
171
174
|
start: number;
|
175
|
+
seek: number;
|
172
176
|
end: number;
|
173
177
|
avg_logprob: number;
|
174
178
|
compression_ratio: number;
|
@@ -192,16 +196,16 @@ export declare const OpenAITranscriptionResponseFormat: {
|
|
192
196
|
type: "verbose_json";
|
193
197
|
handler: ResponseHandler<{
|
194
198
|
text: string;
|
199
|
+
duration: number;
|
195
200
|
task: "transcribe";
|
196
201
|
language: string;
|
197
|
-
duration: number;
|
198
202
|
segments: {
|
199
203
|
text: string;
|
200
204
|
id: number;
|
201
205
|
temperature: number;
|
202
206
|
tokens: number[];
|
203
|
-
seek: number;
|
204
207
|
start: number;
|
208
|
+
seek: number;
|
205
209
|
end: number;
|
206
210
|
avg_logprob: number;
|
207
211
|
compression_ratio: number;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { z } from "zod";
|
2
2
|
import { callWithRetryAndThrottle } from "../../core/api/callWithRetryAndThrottle.js";
|
3
3
|
import { createJsonResponseHandler, createTextResponseHandler, postToApi, } from "../../core/api/postToApi.js";
|
4
|
+
import { zodSchema } from "../../core/schema/ZodSchema.js";
|
4
5
|
import { AbstractModel } from "../../model-function/AbstractModel.js";
|
5
6
|
import { OpenAIApiConfiguration } from "./OpenAIApiConfiguration.js";
|
6
7
|
import { failedOpenAICallResponseHandler } from "./OpenAIError.js";
|
@@ -61,19 +62,46 @@ export class OpenAITranscriptionModel extends AbstractModel {
|
|
61
62
|
};
|
62
63
|
}
|
63
64
|
async callAPI(data, options) {
|
65
|
+
const api = this.settings.api ?? new OpenAIApiConfiguration();
|
66
|
+
const abortSignal = options?.run?.abortSignal;
|
64
67
|
return callWithRetryAndThrottle({
|
65
|
-
retry:
|
66
|
-
throttle:
|
67
|
-
call: async () =>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
}
|
75
|
-
|
76
|
-
|
68
|
+
retry: api.retry,
|
69
|
+
throttle: api.throttle,
|
70
|
+
call: async () => {
|
71
|
+
const fileName = `audio.${data.type}`;
|
72
|
+
const formData = new FormData();
|
73
|
+
formData.append("file", new Blob([data.data]), fileName);
|
74
|
+
formData.append("model", this.settings.model);
|
75
|
+
if (this.settings.prompt != null) {
|
76
|
+
formData.append("prompt", this.settings.prompt);
|
77
|
+
}
|
78
|
+
if (options.responseFormat != null) {
|
79
|
+
formData.append("response_format", options.responseFormat.type);
|
80
|
+
}
|
81
|
+
if (this.settings.temperature != null) {
|
82
|
+
formData.append("temperature", this.settings.temperature.toString());
|
83
|
+
}
|
84
|
+
if (this.settings.language != null) {
|
85
|
+
formData.append("language", this.settings.language);
|
86
|
+
}
|
87
|
+
return postToApi({
|
88
|
+
url: api.assembleUrl("/audio/transcriptions"),
|
89
|
+
headers: api.headers,
|
90
|
+
body: {
|
91
|
+
content: formData,
|
92
|
+
values: {
|
93
|
+
model: this.settings.model,
|
94
|
+
prompt: this.settings.prompt,
|
95
|
+
response_format: options.responseFormat,
|
96
|
+
temperature: this.settings.temperature,
|
97
|
+
language: this.settings.language,
|
98
|
+
},
|
99
|
+
},
|
100
|
+
failedResponseHandler: failedOpenAICallResponseHandler,
|
101
|
+
successfulResponseHandler: options.responseFormat.handler,
|
102
|
+
abortSignal,
|
103
|
+
});
|
104
|
+
},
|
77
105
|
});
|
78
106
|
}
|
79
107
|
get settingsForEvent() {
|
@@ -86,40 +114,6 @@ export class OpenAITranscriptionModel extends AbstractModel {
|
|
86
114
|
return new OpenAITranscriptionModel(Object.assign({}, this.settings, additionalSettings));
|
87
115
|
}
|
88
116
|
}
|
89
|
-
async function callOpenAITranscriptionAPI({ api = new OpenAIApiConfiguration(), abortSignal, model, file, prompt, responseFormat, temperature, language, }) {
|
90
|
-
const formData = new FormData();
|
91
|
-
formData.append("file", new Blob([file.data]), file.name);
|
92
|
-
formData.append("model", model);
|
93
|
-
if (prompt) {
|
94
|
-
formData.append("prompt", prompt);
|
95
|
-
}
|
96
|
-
if (responseFormat) {
|
97
|
-
formData.append("response_format", responseFormat.type);
|
98
|
-
}
|
99
|
-
if (temperature) {
|
100
|
-
formData.append("temperature", temperature.toString());
|
101
|
-
}
|
102
|
-
if (language) {
|
103
|
-
formData.append("language", language);
|
104
|
-
}
|
105
|
-
return postToApi({
|
106
|
-
url: api.assembleUrl("/audio/transcriptions"),
|
107
|
-
headers: api.headers,
|
108
|
-
body: {
|
109
|
-
content: formData,
|
110
|
-
values: {
|
111
|
-
model,
|
112
|
-
prompt,
|
113
|
-
response_format: responseFormat,
|
114
|
-
temperature,
|
115
|
-
language,
|
116
|
-
},
|
117
|
-
},
|
118
|
-
failedResponseHandler: failedOpenAICallResponseHandler,
|
119
|
-
successfulResponseHandler: responseFormat.handler,
|
120
|
-
abortSignal,
|
121
|
-
});
|
122
|
-
}
|
123
117
|
const openAITranscriptionJsonSchema = z.object({
|
124
118
|
text: z.string(),
|
125
119
|
});
|
@@ -145,11 +139,11 @@ const openAITranscriptionVerboseJsonSchema = z.object({
|
|
145
139
|
export const OpenAITranscriptionResponseFormat = {
|
146
140
|
json: {
|
147
141
|
type: "json",
|
148
|
-
handler: createJsonResponseHandler(openAITranscriptionJsonSchema),
|
142
|
+
handler: createJsonResponseHandler(zodSchema(openAITranscriptionJsonSchema)),
|
149
143
|
},
|
150
144
|
verboseJson: {
|
151
145
|
type: "verbose_json",
|
152
|
-
handler: createJsonResponseHandler(openAITranscriptionVerboseJsonSchema),
|
146
|
+
handler: createJsonResponseHandler(zodSchema(openAITranscriptionVerboseJsonSchema)),
|
153
147
|
},
|
154
148
|
text: {
|
155
149
|
type: "text",
|
@@ -6,23 +6,27 @@ const loadApiKey_js_1 = require("../../core/api/loadApiKey.cjs");
|
|
6
6
|
/**
|
7
7
|
* Configuration for the Fireworks.ai API.
|
8
8
|
*
|
9
|
-
* It uses the `FIREWORKS_API_KEY` api key environment variable.
|
9
|
+
* It calls the API at https://api.fireworks.ai/inference/v1 and uses the `FIREWORKS_API_KEY` api key environment variable.
|
10
10
|
*
|
11
11
|
* @see https://readme.fireworks.ai/docs/openai-compatibility
|
12
12
|
*/
|
13
|
-
class FireworksAIApiConfiguration extends BaseUrlApiConfiguration_js_1.
|
14
|
-
constructor(
|
13
|
+
class FireworksAIApiConfiguration extends BaseUrlApiConfiguration_js_1.BaseUrlApiConfigurationWithDefaults {
|
14
|
+
constructor(settings = {}) {
|
15
15
|
super({
|
16
|
-
|
16
|
+
...settings,
|
17
17
|
headers: {
|
18
18
|
Authorization: `Bearer ${(0, loadApiKey_js_1.loadApiKey)({
|
19
|
-
apiKey,
|
19
|
+
apiKey: settings.apiKey,
|
20
20
|
environmentVariableName: "FIREWORKS_API_KEY",
|
21
21
|
description: "Fireworks AI",
|
22
22
|
})}`,
|
23
23
|
},
|
24
|
-
|
25
|
-
|
24
|
+
baseUrlDefaults: {
|
25
|
+
protocol: "https",
|
26
|
+
host: "api.fireworks.ai",
|
27
|
+
port: "443",
|
28
|
+
path: "/inference/v1",
|
29
|
+
},
|
26
30
|
});
|
27
31
|
}
|
28
32
|
}
|
@@ -1,18 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import { RetryFunction } from "../../core/api/RetryFunction.js";
|
3
|
-
import { ThrottleFunction } from "../../core/api/ThrottleFunction.js";
|
1
|
+
import { BaseUrlApiConfigurationWithDefaults, PartialBaseUrlPartsApiConfigurationOptions } from "../../core/api/BaseUrlApiConfiguration.js";
|
4
2
|
/**
|
5
3
|
* Configuration for the Fireworks.ai API.
|
6
4
|
*
|
7
|
-
* It uses the `FIREWORKS_API_KEY` api key environment variable.
|
5
|
+
* It calls the API at https://api.fireworks.ai/inference/v1 and uses the `FIREWORKS_API_KEY` api key environment variable.
|
8
6
|
*
|
9
7
|
* @see https://readme.fireworks.ai/docs/openai-compatibility
|
10
8
|
*/
|
11
|
-
export declare class FireworksAIApiConfiguration extends
|
12
|
-
constructor(
|
13
|
-
baseUrl?: string;
|
9
|
+
export declare class FireworksAIApiConfiguration extends BaseUrlApiConfigurationWithDefaults {
|
10
|
+
constructor(settings?: PartialBaseUrlPartsApiConfigurationOptions & {
|
14
11
|
apiKey?: string;
|
15
|
-
retry?: RetryFunction;
|
16
|
-
throttle?: ThrottleFunction;
|
17
12
|
});
|
18
13
|
}
|
@@ -1,25 +1,29 @@
|
|
1
|
-
import {
|
1
|
+
import { BaseUrlApiConfigurationWithDefaults, } from "../../core/api/BaseUrlApiConfiguration.js";
|
2
2
|
import { loadApiKey } from "../../core/api/loadApiKey.js";
|
3
3
|
/**
|
4
4
|
* Configuration for the Fireworks.ai API.
|
5
5
|
*
|
6
|
-
* It uses the `FIREWORKS_API_KEY` api key environment variable.
|
6
|
+
* It calls the API at https://api.fireworks.ai/inference/v1 and uses the `FIREWORKS_API_KEY` api key environment variable.
|
7
7
|
*
|
8
8
|
* @see https://readme.fireworks.ai/docs/openai-compatibility
|
9
9
|
*/
|
10
|
-
export class FireworksAIApiConfiguration extends
|
11
|
-
constructor(
|
10
|
+
export class FireworksAIApiConfiguration extends BaseUrlApiConfigurationWithDefaults {
|
11
|
+
constructor(settings = {}) {
|
12
12
|
super({
|
13
|
-
|
13
|
+
...settings,
|
14
14
|
headers: {
|
15
15
|
Authorization: `Bearer ${loadApiKey({
|
16
|
-
apiKey,
|
16
|
+
apiKey: settings.apiKey,
|
17
17
|
environmentVariableName: "FIREWORKS_API_KEY",
|
18
18
|
description: "Fireworks AI",
|
19
19
|
})}`,
|
20
20
|
},
|
21
|
-
|
22
|
-
|
21
|
+
baseUrlDefaults: {
|
22
|
+
protocol: "https",
|
23
|
+
host: "api.fireworks.ai",
|
24
|
+
port: "443",
|
25
|
+
path: "/inference/v1",
|
26
|
+
},
|
23
27
|
});
|
24
28
|
}
|
25
29
|
}
|
@@ -1,8 +1,32 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ChatTextGenerator = exports.CompletionTextGenerator = void 0;
|
3
|
+
exports.ChatTextGenerator = exports.CompletionTextGenerator = exports.TogetherAIApi = exports.FireworksAIApi = void 0;
|
4
|
+
const FireworksAIApiConfiguration_js_1 = require("./FireworksAIApiConfiguration.cjs");
|
4
5
|
const OpenAICompatibleChatModel_js_1 = require("./OpenAICompatibleChatModel.cjs");
|
5
6
|
const OpenAICompatibleCompletionModel_js_1 = require("./OpenAICompatibleCompletionModel.cjs");
|
7
|
+
const TogetherAIApiConfiguration_js_1 = require("./TogetherAIApiConfiguration.cjs");
|
8
|
+
/**
|
9
|
+
* Configuration for the Fireworks.ai API.
|
10
|
+
*
|
11
|
+
* It calls the API at https://api.fireworks.ai/inference/v1 and uses the `FIREWORKS_API_KEY` api key environment variable.
|
12
|
+
*
|
13
|
+
* @see https://readme.fireworks.ai/docs/openai-compatibility
|
14
|
+
*/
|
15
|
+
function FireworksAIApi(settings = {}) {
|
16
|
+
return new FireworksAIApiConfiguration_js_1.FireworksAIApiConfiguration(settings);
|
17
|
+
}
|
18
|
+
exports.FireworksAIApi = FireworksAIApi;
|
19
|
+
/**
|
20
|
+
* Configuration for the Together.ai API.
|
21
|
+
*
|
22
|
+
* It calls the API at https://api.together.xyz/v1 and uses the `TOGETHER_API_KEY` api key environment variable.
|
23
|
+
*
|
24
|
+
* @see https://docs.together.ai/docs/openai-api-compatibility
|
25
|
+
*/
|
26
|
+
function TogetherAIApi(settings = {}) {
|
27
|
+
return new TogetherAIApiConfiguration_js_1.TogetherAIApiConfiguration(settings);
|
28
|
+
}
|
29
|
+
exports.TogetherAIApi = TogetherAIApi;
|
6
30
|
/**
|
7
31
|
* Create a text generation model that calls an API that is compatible with OpenAI's completion API.
|
8
32
|
*
|
@@ -1,5 +1,28 @@
|
|
1
|
+
import { PartialBaseUrlPartsApiConfigurationOptions } from "../../core/api/BaseUrlApiConfiguration.js";
|
2
|
+
import { FireworksAIApiConfiguration } from "./FireworksAIApiConfiguration.js";
|
1
3
|
import { OpenAICompatibleChatModel, OpenAICompatibleChatSettings } from "./OpenAICompatibleChatModel.js";
|
2
4
|
import { OpenAICompatibleCompletionModel } from "./OpenAICompatibleCompletionModel.js";
|
5
|
+
import { TogetherAIApiConfiguration } from "./TogetherAIApiConfiguration.js";
|
6
|
+
/**
|
7
|
+
* Configuration for the Fireworks.ai API.
|
8
|
+
*
|
9
|
+
* It calls the API at https://api.fireworks.ai/inference/v1 and uses the `FIREWORKS_API_KEY` api key environment variable.
|
10
|
+
*
|
11
|
+
* @see https://readme.fireworks.ai/docs/openai-compatibility
|
12
|
+
*/
|
13
|
+
export declare function FireworksAIApi(settings?: PartialBaseUrlPartsApiConfigurationOptions & {
|
14
|
+
apiKey?: string;
|
15
|
+
}): FireworksAIApiConfiguration;
|
16
|
+
/**
|
17
|
+
* Configuration for the Together.ai API.
|
18
|
+
*
|
19
|
+
* It calls the API at https://api.together.xyz/v1 and uses the `TOGETHER_API_KEY` api key environment variable.
|
20
|
+
*
|
21
|
+
* @see https://docs.together.ai/docs/openai-api-compatibility
|
22
|
+
*/
|
23
|
+
export declare function TogetherAIApi(settings?: PartialBaseUrlPartsApiConfigurationOptions & {
|
24
|
+
apiKey?: string;
|
25
|
+
}): TogetherAIApiConfiguration;
|
3
26
|
/**
|
4
27
|
* Create a text generation model that calls an API that is compatible with OpenAI's completion API.
|
5
28
|
*
|
@@ -1,5 +1,27 @@
|
|
1
|
+
import { FireworksAIApiConfiguration } from "./FireworksAIApiConfiguration.js";
|
1
2
|
import { OpenAICompatibleChatModel, } from "./OpenAICompatibleChatModel.js";
|
2
3
|
import { OpenAICompatibleCompletionModel } from "./OpenAICompatibleCompletionModel.js";
|
4
|
+
import { TogetherAIApiConfiguration } from "./TogetherAIApiConfiguration.js";
|
5
|
+
/**
|
6
|
+
* Configuration for the Fireworks.ai API.
|
7
|
+
*
|
8
|
+
* It calls the API at https://api.fireworks.ai/inference/v1 and uses the `FIREWORKS_API_KEY` api key environment variable.
|
9
|
+
*
|
10
|
+
* @see https://readme.fireworks.ai/docs/openai-compatibility
|
11
|
+
*/
|
12
|
+
export function FireworksAIApi(settings = {}) {
|
13
|
+
return new FireworksAIApiConfiguration(settings);
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* Configuration for the Together.ai API.
|
17
|
+
*
|
18
|
+
* It calls the API at https://api.together.xyz/v1 and uses the `TOGETHER_API_KEY` api key environment variable.
|
19
|
+
*
|
20
|
+
* @see https://docs.together.ai/docs/openai-api-compatibility
|
21
|
+
*/
|
22
|
+
export function TogetherAIApi(settings = {}) {
|
23
|
+
return new TogetherAIApiConfiguration(settings);
|
24
|
+
}
|
3
25
|
/**
|
4
26
|
* Create a text generation model that calls an API that is compatible with OpenAI's completion API.
|
5
27
|
*
|
@@ -6,23 +6,27 @@ const loadApiKey_js_1 = require("../../core/api/loadApiKey.cjs");
|
|
6
6
|
/**
|
7
7
|
* Configuration for the Together.ai API.
|
8
8
|
*
|
9
|
-
* It uses the `TOGETHER_API_KEY` api key environment variable.
|
9
|
+
* It calls the API at https://api.together.xyz/v1 and uses the `TOGETHER_API_KEY` api key environment variable.
|
10
10
|
*
|
11
11
|
* @see https://docs.together.ai/docs/openai-api-compatibility
|
12
12
|
*/
|
13
|
-
class TogetherAIApiConfiguration extends BaseUrlApiConfiguration_js_1.
|
14
|
-
constructor(
|
13
|
+
class TogetherAIApiConfiguration extends BaseUrlApiConfiguration_js_1.BaseUrlApiConfigurationWithDefaults {
|
14
|
+
constructor(settings = {}) {
|
15
15
|
super({
|
16
|
-
|
16
|
+
...settings,
|
17
17
|
headers: {
|
18
18
|
Authorization: `Bearer ${(0, loadApiKey_js_1.loadApiKey)({
|
19
|
-
apiKey,
|
19
|
+
apiKey: settings.apiKey,
|
20
20
|
environmentVariableName: "TOGETHER_API_KEY",
|
21
21
|
description: "Together AI",
|
22
22
|
})}`,
|
23
23
|
},
|
24
|
-
|
25
|
-
|
24
|
+
baseUrlDefaults: {
|
25
|
+
protocol: "https",
|
26
|
+
host: "api.together.xyz",
|
27
|
+
port: "443",
|
28
|
+
path: "/v1",
|
29
|
+
},
|
26
30
|
});
|
27
31
|
}
|
28
32
|
}
|
@@ -1,18 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import { RetryFunction } from "../../core/api/RetryFunction.js";
|
3
|
-
import { ThrottleFunction } from "../../core/api/ThrottleFunction.js";
|
1
|
+
import { BaseUrlApiConfigurationWithDefaults, PartialBaseUrlPartsApiConfigurationOptions } from "../../core/api/BaseUrlApiConfiguration.js";
|
4
2
|
/**
|
5
3
|
* Configuration for the Together.ai API.
|
6
4
|
*
|
7
|
-
* It uses the `TOGETHER_API_KEY` api key environment variable.
|
5
|
+
* It calls the API at https://api.together.xyz/v1 and uses the `TOGETHER_API_KEY` api key environment variable.
|
8
6
|
*
|
9
7
|
* @see https://docs.together.ai/docs/openai-api-compatibility
|
10
8
|
*/
|
11
|
-
export declare class TogetherAIApiConfiguration extends
|
12
|
-
constructor(
|
13
|
-
baseUrl?: string;
|
9
|
+
export declare class TogetherAIApiConfiguration extends BaseUrlApiConfigurationWithDefaults {
|
10
|
+
constructor(settings?: PartialBaseUrlPartsApiConfigurationOptions & {
|
14
11
|
apiKey?: string;
|
15
|
-
retry?: RetryFunction;
|
16
|
-
throttle?: ThrottleFunction;
|
17
12
|
});
|
18
13
|
}
|
@@ -1,25 +1,29 @@
|
|
1
|
-
import {
|
1
|
+
import { BaseUrlApiConfigurationWithDefaults, } from "../../core/api/BaseUrlApiConfiguration.js";
|
2
2
|
import { loadApiKey } from "../../core/api/loadApiKey.js";
|
3
3
|
/**
|
4
4
|
* Configuration for the Together.ai API.
|
5
5
|
*
|
6
|
-
* It uses the `TOGETHER_API_KEY` api key environment variable.
|
6
|
+
* It calls the API at https://api.together.xyz/v1 and uses the `TOGETHER_API_KEY` api key environment variable.
|
7
7
|
*
|
8
8
|
* @see https://docs.together.ai/docs/openai-api-compatibility
|
9
9
|
*/
|
10
|
-
export class TogetherAIApiConfiguration extends
|
11
|
-
constructor(
|
10
|
+
export class TogetherAIApiConfiguration extends BaseUrlApiConfigurationWithDefaults {
|
11
|
+
constructor(settings = {}) {
|
12
12
|
super({
|
13
|
-
|
13
|
+
...settings,
|
14
14
|
headers: {
|
15
15
|
Authorization: `Bearer ${loadApiKey({
|
16
|
-
apiKey,
|
16
|
+
apiKey: settings.apiKey,
|
17
17
|
environmentVariableName: "TOGETHER_API_KEY",
|
18
18
|
description: "Together AI",
|
19
19
|
})}`,
|
20
20
|
},
|
21
|
-
|
22
|
-
|
21
|
+
baseUrlDefaults: {
|
22
|
+
protocol: "https",
|
23
|
+
host: "api.together.xyz",
|
24
|
+
port: "443",
|
25
|
+
path: "/v1",
|
26
|
+
},
|
23
27
|
});
|
24
28
|
}
|
25
29
|
}
|
@@ -1,28 +1,29 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.StabilityApiConfiguration = void 0;
|
4
|
-
const
|
4
|
+
const BaseUrlApiConfiguration_js_1 = require("../../core/api/BaseUrlApiConfiguration.cjs");
|
5
5
|
const loadApiKey_js_1 = require("../../core/api/loadApiKey.cjs");
|
6
6
|
/**
|
7
7
|
* Creates an API configuration for the Stability AI API.
|
8
|
-
* It calls the API at https://api.stability.ai/v1 by default.
|
8
|
+
* It calls the API at https://api.stability.ai/v1 by default and uses the `STABILITY_API_KEY` environment variable.
|
9
9
|
*/
|
10
|
-
class StabilityApiConfiguration extends
|
11
|
-
constructor(
|
10
|
+
class StabilityApiConfiguration extends BaseUrlApiConfiguration_js_1.BaseUrlApiConfigurationWithDefaults {
|
11
|
+
constructor(settings = {}) {
|
12
12
|
super({
|
13
|
-
|
14
|
-
|
15
|
-
port,
|
16
|
-
path,
|
17
|
-
headers: headers ?? {
|
13
|
+
...settings,
|
14
|
+
headers: settings.headers ?? {
|
18
15
|
Authorization: `Bearer ${(0, loadApiKey_js_1.loadApiKey)({
|
19
|
-
apiKey,
|
16
|
+
apiKey: settings.apiKey,
|
20
17
|
environmentVariableName: "STABILITY_API_KEY",
|
21
18
|
description: "Stability",
|
22
19
|
})}`,
|
23
20
|
},
|
24
|
-
|
25
|
-
|
21
|
+
baseUrlDefaults: {
|
22
|
+
protocol: "https",
|
23
|
+
host: "api.stability.ai",
|
24
|
+
port: "443",
|
25
|
+
path: "/v1",
|
26
|
+
},
|
26
27
|
});
|
27
28
|
}
|
28
29
|
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { BaseUrlApiConfigurationWithDefaults, PartialBaseUrlPartsApiConfigurationOptions } from "../../core/api/BaseUrlApiConfiguration.js";
|
2
2
|
/**
|
3
3
|
* Creates an API configuration for the Stability AI API.
|
4
|
-
* It calls the API at https://api.stability.ai/v1 by default.
|
4
|
+
* It calls the API at https://api.stability.ai/v1 by default and uses the `STABILITY_API_KEY` environment variable.
|
5
5
|
*/
|
6
|
-
export declare class StabilityApiConfiguration extends
|
7
|
-
constructor(
|
6
|
+
export declare class StabilityApiConfiguration extends BaseUrlApiConfigurationWithDefaults {
|
7
|
+
constructor(settings?: PartialBaseUrlPartsApiConfigurationOptions & {
|
8
8
|
apiKey?: string;
|
9
9
|
});
|
10
10
|
}
|
@@ -1,25 +1,26 @@
|
|
1
|
-
import {
|
1
|
+
import { BaseUrlApiConfigurationWithDefaults, } from "../../core/api/BaseUrlApiConfiguration.js";
|
2
2
|
import { loadApiKey } from "../../core/api/loadApiKey.js";
|
3
3
|
/**
|
4
4
|
* Creates an API configuration for the Stability AI API.
|
5
|
-
* It calls the API at https://api.stability.ai/v1 by default.
|
5
|
+
* It calls the API at https://api.stability.ai/v1 by default and uses the `STABILITY_API_KEY` environment variable.
|
6
6
|
*/
|
7
|
-
export class StabilityApiConfiguration extends
|
8
|
-
constructor(
|
7
|
+
export class StabilityApiConfiguration extends BaseUrlApiConfigurationWithDefaults {
|
8
|
+
constructor(settings = {}) {
|
9
9
|
super({
|
10
|
-
|
11
|
-
|
12
|
-
port,
|
13
|
-
path,
|
14
|
-
headers: headers ?? {
|
10
|
+
...settings,
|
11
|
+
headers: settings.headers ?? {
|
15
12
|
Authorization: `Bearer ${loadApiKey({
|
16
|
-
apiKey,
|
13
|
+
apiKey: settings.apiKey,
|
17
14
|
environmentVariableName: "STABILITY_API_KEY",
|
18
15
|
description: "Stability",
|
19
16
|
})}`,
|
20
17
|
},
|
21
|
-
|
22
|
-
|
18
|
+
baseUrlDefaults: {
|
19
|
+
protocol: "https",
|
20
|
+
host: "api.stability.ai",
|
21
|
+
port: "443",
|
22
|
+
path: "/v1",
|
23
|
+
},
|
23
24
|
});
|
24
25
|
}
|
25
26
|
}
|
@@ -4,10 +4,10 @@ exports.failedStabilityCallResponseHandler = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const postToApi_js_1 = require("../../core/api/postToApi.cjs");
|
6
6
|
const ZodSchema_js_1 = require("../../core/schema/ZodSchema.cjs");
|
7
|
-
const stabilityErrorDataSchema =
|
7
|
+
const stabilityErrorDataSchema = zod_1.z.object({
|
8
8
|
message: zod_1.z.string(),
|
9
|
-
})
|
9
|
+
});
|
10
10
|
exports.failedStabilityCallResponseHandler = (0, postToApi_js_1.createJsonErrorResponseHandler)({
|
11
|
-
errorSchema: stabilityErrorDataSchema,
|
11
|
+
errorSchema: (0, ZodSchema_js_1.zodSchema)(stabilityErrorDataSchema),
|
12
12
|
errorToMessage: (error) => error.message,
|
13
13
|
});
|
@@ -1,9 +1,13 @@
|
|
1
|
+
import { z } from "zod";
|
1
2
|
import { ApiCallError } from "../../core/api/ApiCallError.js";
|
2
3
|
import { ResponseHandler } from "../../core/api/postToApi.js";
|
3
|
-
|
4
|
-
|
4
|
+
declare const stabilityErrorDataSchema: z.ZodObject<{
|
5
|
+
message: z.ZodString;
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
7
|
+
message: string;
|
8
|
+
}, {
|
5
9
|
message: string;
|
6
10
|
}>;
|
7
|
-
export type StabilityErrorData =
|
11
|
+
export type StabilityErrorData = z.infer<typeof stabilityErrorDataSchema>;
|
8
12
|
export declare const failedStabilityCallResponseHandler: ResponseHandler<ApiCallError>;
|
9
13
|
export {};
|