@workers-community/workers-types 4.20250913.0 → 4.20250918.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/index.d.ts +743 -25
- package/index.ts +747 -25
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -294,7 +294,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
294
294
|
FixedLengthStream: typeof FixedLengthStream;
|
|
295
295
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
296
296
|
HTMLRewriter: typeof HTMLRewriter;
|
|
297
|
-
Performance: typeof Performance;
|
|
298
297
|
}
|
|
299
298
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
300
299
|
type: Type,
|
|
@@ -467,6 +466,18 @@ declare abstract class Navigator {
|
|
|
467
466
|
readonly userAgent: string;
|
|
468
467
|
readonly hardwareConcurrency: number;
|
|
469
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
471
|
+
* as well as timing of subrequests and other operations.
|
|
472
|
+
*
|
|
473
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
474
|
+
*/
|
|
475
|
+
interface Performance {
|
|
476
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
477
|
+
readonly timeOrigin: number;
|
|
478
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
479
|
+
now(): number;
|
|
480
|
+
}
|
|
470
481
|
interface AlarmInvocationInfo {
|
|
471
482
|
readonly isRetry: boolean;
|
|
472
483
|
readonly retryCount: number;
|
|
@@ -3155,18 +3166,6 @@ interface WorkerLoaderWorkerCode {
|
|
|
3155
3166
|
tails?: Fetcher[];
|
|
3156
3167
|
streamingTails?: Fetcher[];
|
|
3157
3168
|
}
|
|
3158
|
-
/**
|
|
3159
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3160
|
-
* as well as timing of subrequests and other operations.
|
|
3161
|
-
*
|
|
3162
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3163
|
-
*/
|
|
3164
|
-
declare abstract class Performance {
|
|
3165
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3166
|
-
get timeOrigin(): number;
|
|
3167
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3168
|
-
now(): number;
|
|
3169
|
-
}
|
|
3170
3169
|
type AiImageClassificationInput = {
|
|
3171
3170
|
image: number[];
|
|
3172
3171
|
};
|
|
@@ -3221,6 +3220,18 @@ declare abstract class BaseAiImageTextToText {
|
|
|
3221
3220
|
inputs: AiImageTextToTextInput;
|
|
3222
3221
|
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3223
3222
|
}
|
|
3223
|
+
type AiMultimodalEmbeddingsInput = {
|
|
3224
|
+
image: string;
|
|
3225
|
+
text: string[];
|
|
3226
|
+
};
|
|
3227
|
+
type AiIMultimodalEmbeddingsOutput = {
|
|
3228
|
+
data: number[][];
|
|
3229
|
+
shape: number[];
|
|
3230
|
+
};
|
|
3231
|
+
declare abstract class BaseAiMultimodalEmbeddings {
|
|
3232
|
+
inputs: AiImageTextToTextInput;
|
|
3233
|
+
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3234
|
+
}
|
|
3224
3235
|
type AiObjectDetectionInput = {
|
|
3225
3236
|
image: number[];
|
|
3226
3237
|
};
|
|
@@ -3359,12 +3370,28 @@ type AiTextGenerationInput = {
|
|
|
3359
3370
|
| (object & NonNullable<unknown>);
|
|
3360
3371
|
functions?: AiTextGenerationFunctionsInput[];
|
|
3361
3372
|
};
|
|
3373
|
+
type AiTextGenerationToolLegacyOutput = {
|
|
3374
|
+
name: string;
|
|
3375
|
+
arguments: unknown;
|
|
3376
|
+
};
|
|
3377
|
+
type AiTextGenerationToolOutput = {
|
|
3378
|
+
id: string;
|
|
3379
|
+
type: "function";
|
|
3380
|
+
function: {
|
|
3381
|
+
name: string;
|
|
3382
|
+
arguments: string;
|
|
3383
|
+
};
|
|
3384
|
+
};
|
|
3385
|
+
type UsageTags = {
|
|
3386
|
+
prompt_tokens: number;
|
|
3387
|
+
completion_tokens: number;
|
|
3388
|
+
total_tokens: number;
|
|
3389
|
+
};
|
|
3362
3390
|
type AiTextGenerationOutput = {
|
|
3363
3391
|
response?: string;
|
|
3364
|
-
tool_calls?:
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
}[];
|
|
3392
|
+
tool_calls?: AiTextGenerationToolLegacyOutput[] &
|
|
3393
|
+
AiTextGenerationToolOutput[];
|
|
3394
|
+
usage?: UsageTags;
|
|
3368
3395
|
};
|
|
3369
3396
|
declare abstract class BaseAiTextGeneration {
|
|
3370
3397
|
inputs: AiTextGenerationInput;
|
|
@@ -4453,6 +4480,7 @@ type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
|
|
|
4453
4480
|
name?: string;
|
|
4454
4481
|
}[];
|
|
4455
4482
|
}
|
|
4483
|
+
| string
|
|
4456
4484
|
| AsyncResponse;
|
|
4457
4485
|
declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
|
|
4458
4486
|
inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
|
|
@@ -4529,7 +4557,6 @@ interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
|
|
|
4529
4557
|
/**
|
|
4530
4558
|
* A query you wish to perform against the provided contexts.
|
|
4531
4559
|
*/
|
|
4532
|
-
query: string;
|
|
4533
4560
|
/**
|
|
4534
4561
|
* Number of returned results starting with the best score.
|
|
4535
4562
|
*/
|
|
@@ -5622,7 +5649,8 @@ declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
|
|
|
5622
5649
|
}
|
|
5623
5650
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
|
|
5624
5651
|
| Ai_Cf_Meta_Llama_4_Prompt
|
|
5625
|
-
| Ai_Cf_Meta_Llama_4_Messages
|
|
5652
|
+
| Ai_Cf_Meta_Llama_4_Messages
|
|
5653
|
+
| Ai_Cf_Meta_Llama_4_Async_Batch;
|
|
5626
5654
|
interface Ai_Cf_Meta_Llama_4_Prompt {
|
|
5627
5655
|
/**
|
|
5628
5656
|
* The input text prompt for the model to generate a response.
|
|
@@ -5856,6 +5884,245 @@ interface Ai_Cf_Meta_Llama_4_Messages {
|
|
|
5856
5884
|
*/
|
|
5857
5885
|
presence_penalty?: number;
|
|
5858
5886
|
}
|
|
5887
|
+
interface Ai_Cf_Meta_Llama_4_Async_Batch {
|
|
5888
|
+
requests: (
|
|
5889
|
+
| Ai_Cf_Meta_Llama_4_Prompt_Inner
|
|
5890
|
+
| Ai_Cf_Meta_Llama_4_Messages_Inner
|
|
5891
|
+
)[];
|
|
5892
|
+
}
|
|
5893
|
+
interface Ai_Cf_Meta_Llama_4_Prompt_Inner {
|
|
5894
|
+
/**
|
|
5895
|
+
* The input text prompt for the model to generate a response.
|
|
5896
|
+
*/
|
|
5897
|
+
prompt: string;
|
|
5898
|
+
/**
|
|
5899
|
+
* JSON schema that should be fulfilled for the response.
|
|
5900
|
+
*/
|
|
5901
|
+
guided_json?: object;
|
|
5902
|
+
response_format?: JSONMode;
|
|
5903
|
+
/**
|
|
5904
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
5905
|
+
*/
|
|
5906
|
+
raw?: boolean;
|
|
5907
|
+
/**
|
|
5908
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
5909
|
+
*/
|
|
5910
|
+
stream?: boolean;
|
|
5911
|
+
/**
|
|
5912
|
+
* The maximum number of tokens to generate in the response.
|
|
5913
|
+
*/
|
|
5914
|
+
max_tokens?: number;
|
|
5915
|
+
/**
|
|
5916
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
5917
|
+
*/
|
|
5918
|
+
temperature?: number;
|
|
5919
|
+
/**
|
|
5920
|
+
* Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
|
|
5921
|
+
*/
|
|
5922
|
+
top_p?: number;
|
|
5923
|
+
/**
|
|
5924
|
+
* Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
|
|
5925
|
+
*/
|
|
5926
|
+
top_k?: number;
|
|
5927
|
+
/**
|
|
5928
|
+
* Random seed for reproducibility of the generation.
|
|
5929
|
+
*/
|
|
5930
|
+
seed?: number;
|
|
5931
|
+
/**
|
|
5932
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
5933
|
+
*/
|
|
5934
|
+
repetition_penalty?: number;
|
|
5935
|
+
/**
|
|
5936
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
5937
|
+
*/
|
|
5938
|
+
frequency_penalty?: number;
|
|
5939
|
+
/**
|
|
5940
|
+
* Increases the likelihood of the model introducing new topics.
|
|
5941
|
+
*/
|
|
5942
|
+
presence_penalty?: number;
|
|
5943
|
+
}
|
|
5944
|
+
interface Ai_Cf_Meta_Llama_4_Messages_Inner {
|
|
5945
|
+
/**
|
|
5946
|
+
* An array of message objects representing the conversation history.
|
|
5947
|
+
*/
|
|
5948
|
+
messages: {
|
|
5949
|
+
/**
|
|
5950
|
+
* The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
|
|
5951
|
+
*/
|
|
5952
|
+
role?: string;
|
|
5953
|
+
/**
|
|
5954
|
+
* The tool call id. If you don't know what to put here you can fall back to 000000001
|
|
5955
|
+
*/
|
|
5956
|
+
tool_call_id?: string;
|
|
5957
|
+
content?:
|
|
5958
|
+
| string
|
|
5959
|
+
| {
|
|
5960
|
+
/**
|
|
5961
|
+
* Type of the content provided
|
|
5962
|
+
*/
|
|
5963
|
+
type?: string;
|
|
5964
|
+
text?: string;
|
|
5965
|
+
image_url?: {
|
|
5966
|
+
/**
|
|
5967
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
5968
|
+
*/
|
|
5969
|
+
url?: string;
|
|
5970
|
+
};
|
|
5971
|
+
}[]
|
|
5972
|
+
| {
|
|
5973
|
+
/**
|
|
5974
|
+
* Type of the content provided
|
|
5975
|
+
*/
|
|
5976
|
+
type?: string;
|
|
5977
|
+
text?: string;
|
|
5978
|
+
image_url?: {
|
|
5979
|
+
/**
|
|
5980
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
5981
|
+
*/
|
|
5982
|
+
url?: string;
|
|
5983
|
+
};
|
|
5984
|
+
};
|
|
5985
|
+
}[];
|
|
5986
|
+
functions?: {
|
|
5987
|
+
name: string;
|
|
5988
|
+
code: string;
|
|
5989
|
+
}[];
|
|
5990
|
+
/**
|
|
5991
|
+
* A list of tools available for the assistant to use.
|
|
5992
|
+
*/
|
|
5993
|
+
tools?: (
|
|
5994
|
+
| {
|
|
5995
|
+
/**
|
|
5996
|
+
* The name of the tool. More descriptive the better.
|
|
5997
|
+
*/
|
|
5998
|
+
name: string;
|
|
5999
|
+
/**
|
|
6000
|
+
* A brief description of what the tool does.
|
|
6001
|
+
*/
|
|
6002
|
+
description: string;
|
|
6003
|
+
/**
|
|
6004
|
+
* Schema defining the parameters accepted by the tool.
|
|
6005
|
+
*/
|
|
6006
|
+
parameters: {
|
|
6007
|
+
/**
|
|
6008
|
+
* The type of the parameters object (usually 'object').
|
|
6009
|
+
*/
|
|
6010
|
+
type: string;
|
|
6011
|
+
/**
|
|
6012
|
+
* List of required parameter names.
|
|
6013
|
+
*/
|
|
6014
|
+
required?: string[];
|
|
6015
|
+
/**
|
|
6016
|
+
* Definitions of each parameter.
|
|
6017
|
+
*/
|
|
6018
|
+
properties: {
|
|
6019
|
+
[k: string]: {
|
|
6020
|
+
/**
|
|
6021
|
+
* The data type of the parameter.
|
|
6022
|
+
*/
|
|
6023
|
+
type: string;
|
|
6024
|
+
/**
|
|
6025
|
+
* A description of the expected parameter.
|
|
6026
|
+
*/
|
|
6027
|
+
description: string;
|
|
6028
|
+
};
|
|
6029
|
+
};
|
|
6030
|
+
};
|
|
6031
|
+
}
|
|
6032
|
+
| {
|
|
6033
|
+
/**
|
|
6034
|
+
* Specifies the type of tool (e.g., 'function').
|
|
6035
|
+
*/
|
|
6036
|
+
type: string;
|
|
6037
|
+
/**
|
|
6038
|
+
* Details of the function tool.
|
|
6039
|
+
*/
|
|
6040
|
+
function: {
|
|
6041
|
+
/**
|
|
6042
|
+
* The name of the function.
|
|
6043
|
+
*/
|
|
6044
|
+
name: string;
|
|
6045
|
+
/**
|
|
6046
|
+
* A brief description of what the function does.
|
|
6047
|
+
*/
|
|
6048
|
+
description: string;
|
|
6049
|
+
/**
|
|
6050
|
+
* Schema defining the parameters accepted by the function.
|
|
6051
|
+
*/
|
|
6052
|
+
parameters: {
|
|
6053
|
+
/**
|
|
6054
|
+
* The type of the parameters object (usually 'object').
|
|
6055
|
+
*/
|
|
6056
|
+
type: string;
|
|
6057
|
+
/**
|
|
6058
|
+
* List of required parameter names.
|
|
6059
|
+
*/
|
|
6060
|
+
required?: string[];
|
|
6061
|
+
/**
|
|
6062
|
+
* Definitions of each parameter.
|
|
6063
|
+
*/
|
|
6064
|
+
properties: {
|
|
6065
|
+
[k: string]: {
|
|
6066
|
+
/**
|
|
6067
|
+
* The data type of the parameter.
|
|
6068
|
+
*/
|
|
6069
|
+
type: string;
|
|
6070
|
+
/**
|
|
6071
|
+
* A description of the expected parameter.
|
|
6072
|
+
*/
|
|
6073
|
+
description: string;
|
|
6074
|
+
};
|
|
6075
|
+
};
|
|
6076
|
+
};
|
|
6077
|
+
};
|
|
6078
|
+
}
|
|
6079
|
+
)[];
|
|
6080
|
+
response_format?: JSONMode;
|
|
6081
|
+
/**
|
|
6082
|
+
* JSON schema that should be fufilled for the response.
|
|
6083
|
+
*/
|
|
6084
|
+
guided_json?: object;
|
|
6085
|
+
/**
|
|
6086
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
6087
|
+
*/
|
|
6088
|
+
raw?: boolean;
|
|
6089
|
+
/**
|
|
6090
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
6091
|
+
*/
|
|
6092
|
+
stream?: boolean;
|
|
6093
|
+
/**
|
|
6094
|
+
* The maximum number of tokens to generate in the response.
|
|
6095
|
+
*/
|
|
6096
|
+
max_tokens?: number;
|
|
6097
|
+
/**
|
|
6098
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
6099
|
+
*/
|
|
6100
|
+
temperature?: number;
|
|
6101
|
+
/**
|
|
6102
|
+
* Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
|
|
6103
|
+
*/
|
|
6104
|
+
top_p?: number;
|
|
6105
|
+
/**
|
|
6106
|
+
* Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
|
|
6107
|
+
*/
|
|
6108
|
+
top_k?: number;
|
|
6109
|
+
/**
|
|
6110
|
+
* Random seed for reproducibility of the generation.
|
|
6111
|
+
*/
|
|
6112
|
+
seed?: number;
|
|
6113
|
+
/**
|
|
6114
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
6115
|
+
*/
|
|
6116
|
+
repetition_penalty?: number;
|
|
6117
|
+
/**
|
|
6118
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
6119
|
+
*/
|
|
6120
|
+
frequency_penalty?: number;
|
|
6121
|
+
/**
|
|
6122
|
+
* Increases the likelihood of the model introducing new topics.
|
|
6123
|
+
*/
|
|
6124
|
+
presence_penalty?: number;
|
|
6125
|
+
}
|
|
5859
6126
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
|
|
5860
6127
|
/**
|
|
5861
6128
|
* The generated text response from the model
|
|
@@ -5909,6 +6176,443 @@ declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
|
|
|
5909
6176
|
inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
|
|
5910
6177
|
postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
|
|
5911
6178
|
}
|
|
6179
|
+
interface Ai_Cf_Deepgram_Nova_3_Input {
|
|
6180
|
+
audio: {
|
|
6181
|
+
body: object;
|
|
6182
|
+
contentType: string;
|
|
6183
|
+
};
|
|
6184
|
+
/**
|
|
6185
|
+
* Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param.
|
|
6186
|
+
*/
|
|
6187
|
+
custom_topic_mode?: "extended" | "strict";
|
|
6188
|
+
/**
|
|
6189
|
+
* Custom topics you want the model to detect within your input audio or text if present Submit up to 100
|
|
6190
|
+
*/
|
|
6191
|
+
custom_topic?: string;
|
|
6192
|
+
/**
|
|
6193
|
+
* Sets how the model will interpret intents submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param
|
|
6194
|
+
*/
|
|
6195
|
+
custom_intent_mode?: "extended" | "strict";
|
|
6196
|
+
/**
|
|
6197
|
+
* Custom intents you want the model to detect within your input audio if present
|
|
6198
|
+
*/
|
|
6199
|
+
custom_intent?: string;
|
|
6200
|
+
/**
|
|
6201
|
+
* Identifies and extracts key entities from content in submitted audio
|
|
6202
|
+
*/
|
|
6203
|
+
detect_entities?: boolean;
|
|
6204
|
+
/**
|
|
6205
|
+
* Identifies the dominant language spoken in submitted audio
|
|
6206
|
+
*/
|
|
6207
|
+
detect_language?: boolean;
|
|
6208
|
+
/**
|
|
6209
|
+
* Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
|
|
6210
|
+
*/
|
|
6211
|
+
diarize?: boolean;
|
|
6212
|
+
/**
|
|
6213
|
+
* Identify and extract key entities from content in submitted audio
|
|
6214
|
+
*/
|
|
6215
|
+
dictation?: boolean;
|
|
6216
|
+
/**
|
|
6217
|
+
* Specify the expected encoding of your submitted audio
|
|
6218
|
+
*/
|
|
6219
|
+
encoding?:
|
|
6220
|
+
| "linear16"
|
|
6221
|
+
| "flac"
|
|
6222
|
+
| "mulaw"
|
|
6223
|
+
| "amr-nb"
|
|
6224
|
+
| "amr-wb"
|
|
6225
|
+
| "opus"
|
|
6226
|
+
| "speex"
|
|
6227
|
+
| "g729";
|
|
6228
|
+
/**
|
|
6229
|
+
* Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
|
|
6230
|
+
*/
|
|
6231
|
+
extra?: string;
|
|
6232
|
+
/**
|
|
6233
|
+
* Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
|
|
6234
|
+
*/
|
|
6235
|
+
filler_words?: boolean;
|
|
6236
|
+
/**
|
|
6237
|
+
* Key term prompting can boost or suppress specialized terminology and brands.
|
|
6238
|
+
*/
|
|
6239
|
+
keyterm?: string;
|
|
6240
|
+
/**
|
|
6241
|
+
* Keywords can boost or suppress specialized terminology and brands.
|
|
6242
|
+
*/
|
|
6243
|
+
keywords?: string;
|
|
6244
|
+
/**
|
|
6245
|
+
* The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available.
|
|
6246
|
+
*/
|
|
6247
|
+
language?: string;
|
|
6248
|
+
/**
|
|
6249
|
+
* Spoken measurements will be converted to their corresponding abbreviations.
|
|
6250
|
+
*/
|
|
6251
|
+
measurements?: boolean;
|
|
6252
|
+
/**
|
|
6253
|
+
* Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip.
|
|
6254
|
+
*/
|
|
6255
|
+
mip_opt_out?: boolean;
|
|
6256
|
+
/**
|
|
6257
|
+
* Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
|
|
6258
|
+
*/
|
|
6259
|
+
mode?: "general" | "medical" | "finance";
|
|
6260
|
+
/**
|
|
6261
|
+
* Transcribe each audio channel independently.
|
|
6262
|
+
*/
|
|
6263
|
+
multichannel?: boolean;
|
|
6264
|
+
/**
|
|
6265
|
+
* Numerals converts numbers from written format to numerical format.
|
|
6266
|
+
*/
|
|
6267
|
+
numerals?: boolean;
|
|
6268
|
+
/**
|
|
6269
|
+
* Splits audio into paragraphs to improve transcript readability.
|
|
6270
|
+
*/
|
|
6271
|
+
paragraphs?: boolean;
|
|
6272
|
+
/**
|
|
6273
|
+
* Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
|
|
6274
|
+
*/
|
|
6275
|
+
profanity_filter?: boolean;
|
|
6276
|
+
/**
|
|
6277
|
+
* Add punctuation and capitalization to the transcript.
|
|
6278
|
+
*/
|
|
6279
|
+
punctuate?: boolean;
|
|
6280
|
+
/**
|
|
6281
|
+
* Redaction removes sensitive information from your transcripts.
|
|
6282
|
+
*/
|
|
6283
|
+
redact?: string;
|
|
6284
|
+
/**
|
|
6285
|
+
* Search for terms or phrases in submitted audio and replaces them.
|
|
6286
|
+
*/
|
|
6287
|
+
replace?: string;
|
|
6288
|
+
/**
|
|
6289
|
+
* Search for terms or phrases in submitted audio.
|
|
6290
|
+
*/
|
|
6291
|
+
search?: string;
|
|
6292
|
+
/**
|
|
6293
|
+
* Recognizes the sentiment throughout a transcript or text.
|
|
6294
|
+
*/
|
|
6295
|
+
sentiment?: boolean;
|
|
6296
|
+
/**
|
|
6297
|
+
* Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
|
|
6298
|
+
*/
|
|
6299
|
+
smart_format?: boolean;
|
|
6300
|
+
/**
|
|
6301
|
+
* Detect topics throughout a transcript or text.
|
|
6302
|
+
*/
|
|
6303
|
+
topics?: boolean;
|
|
6304
|
+
/**
|
|
6305
|
+
* Segments speech into meaningful semantic units.
|
|
6306
|
+
*/
|
|
6307
|
+
utterances?: boolean;
|
|
6308
|
+
/**
|
|
6309
|
+
* Seconds to wait before detecting a pause between words in submitted audio.
|
|
6310
|
+
*/
|
|
6311
|
+
utt_split?: number;
|
|
6312
|
+
/**
|
|
6313
|
+
* The number of channels in the submitted audio
|
|
6314
|
+
*/
|
|
6315
|
+
channels?: number;
|
|
6316
|
+
/**
|
|
6317
|
+
* Specifies whether the streaming endpoint should provide ongoing transcription updates as more audio is received. When set to true, the endpoint sends continuous updates, meaning transcription results may evolve over time. Note: Supported only for webosockets.
|
|
6318
|
+
*/
|
|
6319
|
+
interim_results?: boolean;
|
|
6320
|
+
/**
|
|
6321
|
+
* Indicates how long model will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing
|
|
6322
|
+
*/
|
|
6323
|
+
endpointing?: string;
|
|
6324
|
+
/**
|
|
6325
|
+
* Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
|
|
6326
|
+
*/
|
|
6327
|
+
vad_events?: boolean;
|
|
6328
|
+
/**
|
|
6329
|
+
* Indicates how long model will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results. Note: Supported only for webosockets.
|
|
6330
|
+
*/
|
|
6331
|
+
utterance_end_ms?: boolean;
|
|
6332
|
+
}
|
|
6333
|
+
interface Ai_Cf_Deepgram_Nova_3_Output {
|
|
6334
|
+
results?: {
|
|
6335
|
+
channels?: {
|
|
6336
|
+
alternatives?: {
|
|
6337
|
+
confidence?: number;
|
|
6338
|
+
transcript?: string;
|
|
6339
|
+
words?: {
|
|
6340
|
+
confidence?: number;
|
|
6341
|
+
end?: number;
|
|
6342
|
+
start?: number;
|
|
6343
|
+
word?: string;
|
|
6344
|
+
}[];
|
|
6345
|
+
}[];
|
|
6346
|
+
}[];
|
|
6347
|
+
summary?: {
|
|
6348
|
+
result?: string;
|
|
6349
|
+
short?: string;
|
|
6350
|
+
};
|
|
6351
|
+
sentiments?: {
|
|
6352
|
+
segments?: {
|
|
6353
|
+
text?: string;
|
|
6354
|
+
start_word?: number;
|
|
6355
|
+
end_word?: number;
|
|
6356
|
+
sentiment?: string;
|
|
6357
|
+
sentiment_score?: number;
|
|
6358
|
+
}[];
|
|
6359
|
+
average?: {
|
|
6360
|
+
sentiment?: string;
|
|
6361
|
+
sentiment_score?: number;
|
|
6362
|
+
};
|
|
6363
|
+
};
|
|
6364
|
+
};
|
|
6365
|
+
}
|
|
6366
|
+
declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
|
|
6367
|
+
inputs: Ai_Cf_Deepgram_Nova_3_Input;
|
|
6368
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
|
|
6369
|
+
}
|
|
6370
|
+
type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
|
|
6371
|
+
| {
|
|
6372
|
+
/**
|
|
6373
|
+
* readable stream with audio data and content-type specified for that data
|
|
6374
|
+
*/
|
|
6375
|
+
audio: {
|
|
6376
|
+
body: object;
|
|
6377
|
+
contentType: string;
|
|
6378
|
+
};
|
|
6379
|
+
/**
|
|
6380
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6381
|
+
*/
|
|
6382
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6383
|
+
}
|
|
6384
|
+
| {
|
|
6385
|
+
/**
|
|
6386
|
+
* base64 encoded audio data
|
|
6387
|
+
*/
|
|
6388
|
+
audio: string;
|
|
6389
|
+
/**
|
|
6390
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6391
|
+
*/
|
|
6392
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6393
|
+
};
|
|
6394
|
+
interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
|
|
6395
|
+
/**
|
|
6396
|
+
* if true, end-of-turn was detected
|
|
6397
|
+
*/
|
|
6398
|
+
is_complete?: boolean;
|
|
6399
|
+
/**
|
|
6400
|
+
* probability of the end-of-turn detection
|
|
6401
|
+
*/
|
|
6402
|
+
probability?: number;
|
|
6403
|
+
}
|
|
6404
|
+
declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
6405
|
+
inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
|
|
6406
|
+
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
6407
|
+
}
|
|
6408
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Input =
|
|
6409
|
+
| GPT_OSS_120B_Responses
|
|
6410
|
+
| GPT_OSS_120B_Responses_Async;
|
|
6411
|
+
interface GPT_OSS_120B_Responses {
|
|
6412
|
+
/**
|
|
6413
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6414
|
+
*/
|
|
6415
|
+
input: string | unknown[];
|
|
6416
|
+
reasoning?: {
|
|
6417
|
+
/**
|
|
6418
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6419
|
+
*/
|
|
6420
|
+
effort?: "low" | "medium" | "high";
|
|
6421
|
+
/**
|
|
6422
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6423
|
+
*/
|
|
6424
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6425
|
+
};
|
|
6426
|
+
}
|
|
6427
|
+
interface GPT_OSS_120B_Responses_Async {
|
|
6428
|
+
requests: {
|
|
6429
|
+
/**
|
|
6430
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6431
|
+
*/
|
|
6432
|
+
input: string | unknown[];
|
|
6433
|
+
reasoning?: {
|
|
6434
|
+
/**
|
|
6435
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6436
|
+
*/
|
|
6437
|
+
effort?: "low" | "medium" | "high";
|
|
6438
|
+
/**
|
|
6439
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6440
|
+
*/
|
|
6441
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6442
|
+
};
|
|
6443
|
+
}[];
|
|
6444
|
+
}
|
|
6445
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Output = {} | (string & NonNullable<unknown>);
|
|
6446
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
6447
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_120B_Input;
|
|
6448
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_120B_Output;
|
|
6449
|
+
}
|
|
6450
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Input =
|
|
6451
|
+
| GPT_OSS_20B_Responses
|
|
6452
|
+
| GPT_OSS_20B_Responses_Async;
|
|
6453
|
+
interface GPT_OSS_20B_Responses {
|
|
6454
|
+
/**
|
|
6455
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6456
|
+
*/
|
|
6457
|
+
input: string | unknown[];
|
|
6458
|
+
reasoning?: {
|
|
6459
|
+
/**
|
|
6460
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6461
|
+
*/
|
|
6462
|
+
effort?: "low" | "medium" | "high";
|
|
6463
|
+
/**
|
|
6464
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6465
|
+
*/
|
|
6466
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6467
|
+
};
|
|
6468
|
+
}
|
|
6469
|
+
interface GPT_OSS_20B_Responses_Async {
|
|
6470
|
+
requests: {
|
|
6471
|
+
/**
|
|
6472
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6473
|
+
*/
|
|
6474
|
+
input: string | unknown[];
|
|
6475
|
+
reasoning?: {
|
|
6476
|
+
/**
|
|
6477
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6478
|
+
*/
|
|
6479
|
+
effort?: "low" | "medium" | "high";
|
|
6480
|
+
/**
|
|
6481
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6482
|
+
*/
|
|
6483
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6484
|
+
};
|
|
6485
|
+
}[];
|
|
6486
|
+
}
|
|
6487
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Output = {} | (string & NonNullable<unknown>);
|
|
6488
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
6489
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_20B_Input;
|
|
6490
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_20B_Output;
|
|
6491
|
+
}
|
|
6492
|
+
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
6493
|
+
/**
|
|
6494
|
+
* A text description of the image you want to generate.
|
|
6495
|
+
*/
|
|
6496
|
+
prompt: string;
|
|
6497
|
+
/**
|
|
6498
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6499
|
+
*/
|
|
6500
|
+
guidance?: number;
|
|
6501
|
+
/**
|
|
6502
|
+
* Random seed for reproducibility of the image generation
|
|
6503
|
+
*/
|
|
6504
|
+
seed?: number;
|
|
6505
|
+
/**
|
|
6506
|
+
* The height of the generated image in pixels
|
|
6507
|
+
*/
|
|
6508
|
+
height?: number;
|
|
6509
|
+
/**
|
|
6510
|
+
* The width of the generated image in pixels
|
|
6511
|
+
*/
|
|
6512
|
+
width?: number;
|
|
6513
|
+
/**
|
|
6514
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6515
|
+
*/
|
|
6516
|
+
num_steps?: number;
|
|
6517
|
+
/**
|
|
6518
|
+
* Specify what to exclude from the generated images
|
|
6519
|
+
*/
|
|
6520
|
+
negative_prompt?: string;
|
|
6521
|
+
}
|
|
6522
|
+
/**
|
|
6523
|
+
* The generated image in JPEG format
|
|
6524
|
+
*/
|
|
6525
|
+
type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
|
|
6526
|
+
declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
|
|
6527
|
+
inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
|
|
6528
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
|
|
6529
|
+
}
|
|
6530
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Input {
|
|
6531
|
+
/**
|
|
6532
|
+
* A text description of the image you want to generate.
|
|
6533
|
+
*/
|
|
6534
|
+
prompt: string;
|
|
6535
|
+
/**
|
|
6536
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6537
|
+
*/
|
|
6538
|
+
guidance?: number;
|
|
6539
|
+
/**
|
|
6540
|
+
* Random seed for reproducibility of the image generation
|
|
6541
|
+
*/
|
|
6542
|
+
seed?: number;
|
|
6543
|
+
/**
|
|
6544
|
+
* The height of the generated image in pixels
|
|
6545
|
+
*/
|
|
6546
|
+
height?: number;
|
|
6547
|
+
/**
|
|
6548
|
+
* The width of the generated image in pixels
|
|
6549
|
+
*/
|
|
6550
|
+
width?: number;
|
|
6551
|
+
/**
|
|
6552
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6553
|
+
*/
|
|
6554
|
+
num_steps?: number;
|
|
6555
|
+
/**
|
|
6556
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6557
|
+
*/
|
|
6558
|
+
steps?: number;
|
|
6559
|
+
}
|
|
6560
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Output {
|
|
6561
|
+
/**
|
|
6562
|
+
* The generated image in Base64 format.
|
|
6563
|
+
*/
|
|
6564
|
+
image?: string;
|
|
6565
|
+
}
|
|
6566
|
+
declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
|
|
6567
|
+
inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
|
|
6568
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
|
|
6569
|
+
}
|
|
6570
|
+
interface Ai_Cf_Deepgram_Aura_1_Input {
|
|
6571
|
+
/**
|
|
6572
|
+
* Speaker used to produce the audio.
|
|
6573
|
+
*/
|
|
6574
|
+
speaker?:
|
|
6575
|
+
| "angus"
|
|
6576
|
+
| "asteria"
|
|
6577
|
+
| "arcas"
|
|
6578
|
+
| "orion"
|
|
6579
|
+
| "orpheus"
|
|
6580
|
+
| "athena"
|
|
6581
|
+
| "luna"
|
|
6582
|
+
| "zeus"
|
|
6583
|
+
| "perseus"
|
|
6584
|
+
| "helios"
|
|
6585
|
+
| "hera"
|
|
6586
|
+
| "stella";
|
|
6587
|
+
/**
|
|
6588
|
+
* Encoding of the output audio.
|
|
6589
|
+
*/
|
|
6590
|
+
encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
|
|
6591
|
+
/**
|
|
6592
|
+
* Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
|
|
6593
|
+
*/
|
|
6594
|
+
container?: "none" | "wav" | "ogg";
|
|
6595
|
+
/**
|
|
6596
|
+
* The text content to be converted to speech
|
|
6597
|
+
*/
|
|
6598
|
+
text: string;
|
|
6599
|
+
/**
|
|
6600
|
+
* Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
|
|
6601
|
+
*/
|
|
6602
|
+
sample_rate?: number;
|
|
6603
|
+
/**
|
|
6604
|
+
* The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
|
|
6605
|
+
*/
|
|
6606
|
+
bit_rate?: number;
|
|
6607
|
+
}
|
|
6608
|
+
/**
|
|
6609
|
+
* The generated audio in MP3 format
|
|
6610
|
+
*/
|
|
6611
|
+
type Ai_Cf_Deepgram_Aura_1_Output = string;
|
|
6612
|
+
declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
|
|
6613
|
+
inputs: Ai_Cf_Deepgram_Aura_1_Input;
|
|
6614
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
|
|
6615
|
+
}
|
|
5912
6616
|
interface AiModels {
|
|
5913
6617
|
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
5914
6618
|
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
@@ -5917,8 +6621,8 @@ interface AiModels {
|
|
|
5917
6621
|
"@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
|
|
5918
6622
|
"@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
|
|
5919
6623
|
"@cf/myshell-ai/melotts": BaseAiTextToSpeech;
|
|
6624
|
+
"@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
|
|
5920
6625
|
"@cf/microsoft/resnet-50": BaseAiImageClassification;
|
|
5921
|
-
"@cf/facebook/detr-resnet-50": BaseAiObjectDetection;
|
|
5922
6626
|
"@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
|
|
5923
6627
|
"@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
|
|
5924
6628
|
"@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
|
|
@@ -5953,7 +6657,6 @@ interface AiModels {
|
|
|
5953
6657
|
"@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
|
|
5954
6658
|
"@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
|
|
5955
6659
|
"@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
|
|
5956
|
-
"@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration;
|
|
5957
6660
|
"@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
|
|
5958
6661
|
"@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
|
|
5959
6662
|
"@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
|
|
@@ -5980,6 +6683,13 @@ interface AiModels {
|
|
|
5980
6683
|
"@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
|
|
5981
6684
|
"@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
|
|
5982
6685
|
"@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
|
|
6686
|
+
"@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
|
|
6687
|
+
"@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
|
|
6688
|
+
"@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
|
|
6689
|
+
"@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
|
|
6690
|
+
"@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
|
|
6691
|
+
"@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
|
|
6692
|
+
"@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
|
|
5983
6693
|
}
|
|
5984
6694
|
type AiOptions = {
|
|
5985
6695
|
/**
|
|
@@ -5987,6 +6697,10 @@ type AiOptions = {
|
|
|
5987
6697
|
* https://developers.cloudflare.com/workers-ai/features/batch-api
|
|
5988
6698
|
*/
|
|
5989
6699
|
queueRequest?: boolean;
|
|
6700
|
+
/**
|
|
6701
|
+
* Establish websocket connections, only works for supported models
|
|
6702
|
+
*/
|
|
6703
|
+
websocket?: boolean;
|
|
5990
6704
|
gateway?: GatewayOptions;
|
|
5991
6705
|
returnRawResponse?: boolean;
|
|
5992
6706
|
prefix?: string;
|
|
@@ -6030,7 +6744,7 @@ type AiModelListType = Record<string, any>;
|
|
|
6030
6744
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
6031
6745
|
aiGatewayLogId: string | null;
|
|
6032
6746
|
gateway(gatewayId: string): AiGateway;
|
|
6033
|
-
autorag(autoragId
|
|
6747
|
+
autorag(autoragId: string): AutoRAG;
|
|
6034
6748
|
run<
|
|
6035
6749
|
Name extends keyof AiModelList,
|
|
6036
6750
|
Options extends AiOptions,
|
|
@@ -6040,9 +6754,13 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
6040
6754
|
inputs: InputOptions,
|
|
6041
6755
|
options?: Options,
|
|
6042
6756
|
): Promise<
|
|
6043
|
-
Options extends
|
|
6044
|
-
|
|
6045
|
-
|
|
6757
|
+
Options extends
|
|
6758
|
+
| {
|
|
6759
|
+
returnRawResponse: true;
|
|
6760
|
+
}
|
|
6761
|
+
| {
|
|
6762
|
+
websocket: true;
|
|
6763
|
+
}
|
|
6046
6764
|
? Response
|
|
6047
6765
|
: InputOptions extends {
|
|
6048
6766
|
stream: true;
|