@cloudflare/workers-types 4.20250917.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/2021-11-03/index.d.ts +731 -12
- package/2021-11-03/index.ts +735 -12
- package/2022-01-31/index.d.ts +731 -12
- package/2022-01-31/index.ts +735 -12
- package/2022-03-21/index.d.ts +731 -12
- package/2022-03-21/index.ts +735 -12
- package/2022-08-04/index.d.ts +731 -12
- package/2022-08-04/index.ts +735 -12
- package/2022-10-31/index.d.ts +731 -12
- package/2022-10-31/index.ts +735 -12
- package/2022-11-30/index.d.ts +731 -12
- package/2022-11-30/index.ts +735 -12
- package/2023-03-01/index.d.ts +731 -12
- package/2023-03-01/index.ts +735 -12
- package/2023-07-01/index.d.ts +731 -12
- package/2023-07-01/index.ts +735 -12
- package/experimental/index.d.ts +731 -12
- package/experimental/index.ts +735 -12
- package/index.d.ts +731 -12
- package/index.ts +735 -12
- package/latest/index.d.ts +731 -12
- package/latest/index.ts +735 -12
- package/oldest/index.d.ts +731 -12
- package/oldest/index.ts +735 -12
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -3480,6 +3480,18 @@ declare abstract class BaseAiImageTextToText {
|
|
|
3480
3480
|
inputs: AiImageTextToTextInput;
|
|
3481
3481
|
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3482
3482
|
}
|
|
3483
|
+
type AiMultimodalEmbeddingsInput = {
|
|
3484
|
+
image: string;
|
|
3485
|
+
text: string[];
|
|
3486
|
+
};
|
|
3487
|
+
type AiIMultimodalEmbeddingsOutput = {
|
|
3488
|
+
data: number[][];
|
|
3489
|
+
shape: number[];
|
|
3490
|
+
};
|
|
3491
|
+
declare abstract class BaseAiMultimodalEmbeddings {
|
|
3492
|
+
inputs: AiImageTextToTextInput;
|
|
3493
|
+
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3494
|
+
}
|
|
3483
3495
|
type AiObjectDetectionInput = {
|
|
3484
3496
|
image: number[];
|
|
3485
3497
|
};
|
|
@@ -3618,12 +3630,28 @@ type AiTextGenerationInput = {
|
|
|
3618
3630
|
| (object & NonNullable<unknown>);
|
|
3619
3631
|
functions?: AiTextGenerationFunctionsInput[];
|
|
3620
3632
|
};
|
|
3633
|
+
type AiTextGenerationToolLegacyOutput = {
|
|
3634
|
+
name: string;
|
|
3635
|
+
arguments: unknown;
|
|
3636
|
+
};
|
|
3637
|
+
type AiTextGenerationToolOutput = {
|
|
3638
|
+
id: string;
|
|
3639
|
+
type: "function";
|
|
3640
|
+
function: {
|
|
3641
|
+
name: string;
|
|
3642
|
+
arguments: string;
|
|
3643
|
+
};
|
|
3644
|
+
};
|
|
3645
|
+
type UsageTags = {
|
|
3646
|
+
prompt_tokens: number;
|
|
3647
|
+
completion_tokens: number;
|
|
3648
|
+
total_tokens: number;
|
|
3649
|
+
};
|
|
3621
3650
|
type AiTextGenerationOutput = {
|
|
3622
3651
|
response?: string;
|
|
3623
|
-
tool_calls?:
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
}[];
|
|
3652
|
+
tool_calls?: AiTextGenerationToolLegacyOutput[] &
|
|
3653
|
+
AiTextGenerationToolOutput[];
|
|
3654
|
+
usage?: UsageTags;
|
|
3627
3655
|
};
|
|
3628
3656
|
declare abstract class BaseAiTextGeneration {
|
|
3629
3657
|
inputs: AiTextGenerationInput;
|
|
@@ -4712,6 +4740,7 @@ type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
|
|
|
4712
4740
|
name?: string;
|
|
4713
4741
|
}[];
|
|
4714
4742
|
}
|
|
4743
|
+
| string
|
|
4715
4744
|
| AsyncResponse;
|
|
4716
4745
|
declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
|
|
4717
4746
|
inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
|
|
@@ -4788,7 +4817,6 @@ interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
|
|
|
4788
4817
|
/**
|
|
4789
4818
|
* A query you wish to perform against the provided contexts.
|
|
4790
4819
|
*/
|
|
4791
|
-
query: string;
|
|
4792
4820
|
/**
|
|
4793
4821
|
* Number of returned results starting with the best score.
|
|
4794
4822
|
*/
|
|
@@ -5881,7 +5909,8 @@ declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
|
|
|
5881
5909
|
}
|
|
5882
5910
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
|
|
5883
5911
|
| Ai_Cf_Meta_Llama_4_Prompt
|
|
5884
|
-
| Ai_Cf_Meta_Llama_4_Messages
|
|
5912
|
+
| Ai_Cf_Meta_Llama_4_Messages
|
|
5913
|
+
| Ai_Cf_Meta_Llama_4_Async_Batch;
|
|
5885
5914
|
interface Ai_Cf_Meta_Llama_4_Prompt {
|
|
5886
5915
|
/**
|
|
5887
5916
|
* The input text prompt for the model to generate a response.
|
|
@@ -6115,6 +6144,245 @@ interface Ai_Cf_Meta_Llama_4_Messages {
|
|
|
6115
6144
|
*/
|
|
6116
6145
|
presence_penalty?: number;
|
|
6117
6146
|
}
|
|
6147
|
+
interface Ai_Cf_Meta_Llama_4_Async_Batch {
|
|
6148
|
+
requests: (
|
|
6149
|
+
| Ai_Cf_Meta_Llama_4_Prompt_Inner
|
|
6150
|
+
| Ai_Cf_Meta_Llama_4_Messages_Inner
|
|
6151
|
+
)[];
|
|
6152
|
+
}
|
|
6153
|
+
interface Ai_Cf_Meta_Llama_4_Prompt_Inner {
|
|
6154
|
+
/**
|
|
6155
|
+
* The input text prompt for the model to generate a response.
|
|
6156
|
+
*/
|
|
6157
|
+
prompt: string;
|
|
6158
|
+
/**
|
|
6159
|
+
* JSON schema that should be fulfilled for the response.
|
|
6160
|
+
*/
|
|
6161
|
+
guided_json?: object;
|
|
6162
|
+
response_format?: JSONMode;
|
|
6163
|
+
/**
|
|
6164
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
6165
|
+
*/
|
|
6166
|
+
raw?: boolean;
|
|
6167
|
+
/**
|
|
6168
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
6169
|
+
*/
|
|
6170
|
+
stream?: boolean;
|
|
6171
|
+
/**
|
|
6172
|
+
* The maximum number of tokens to generate in the response.
|
|
6173
|
+
*/
|
|
6174
|
+
max_tokens?: number;
|
|
6175
|
+
/**
|
|
6176
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
6177
|
+
*/
|
|
6178
|
+
temperature?: number;
|
|
6179
|
+
/**
|
|
6180
|
+
* 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.
|
|
6181
|
+
*/
|
|
6182
|
+
top_p?: number;
|
|
6183
|
+
/**
|
|
6184
|
+
* 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.
|
|
6185
|
+
*/
|
|
6186
|
+
top_k?: number;
|
|
6187
|
+
/**
|
|
6188
|
+
* Random seed for reproducibility of the generation.
|
|
6189
|
+
*/
|
|
6190
|
+
seed?: number;
|
|
6191
|
+
/**
|
|
6192
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
6193
|
+
*/
|
|
6194
|
+
repetition_penalty?: number;
|
|
6195
|
+
/**
|
|
6196
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
6197
|
+
*/
|
|
6198
|
+
frequency_penalty?: number;
|
|
6199
|
+
/**
|
|
6200
|
+
* Increases the likelihood of the model introducing new topics.
|
|
6201
|
+
*/
|
|
6202
|
+
presence_penalty?: number;
|
|
6203
|
+
}
|
|
6204
|
+
interface Ai_Cf_Meta_Llama_4_Messages_Inner {
|
|
6205
|
+
/**
|
|
6206
|
+
* An array of message objects representing the conversation history.
|
|
6207
|
+
*/
|
|
6208
|
+
messages: {
|
|
6209
|
+
/**
|
|
6210
|
+
* The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
|
|
6211
|
+
*/
|
|
6212
|
+
role?: string;
|
|
6213
|
+
/**
|
|
6214
|
+
* The tool call id. If you don't know what to put here you can fall back to 000000001
|
|
6215
|
+
*/
|
|
6216
|
+
tool_call_id?: string;
|
|
6217
|
+
content?:
|
|
6218
|
+
| string
|
|
6219
|
+
| {
|
|
6220
|
+
/**
|
|
6221
|
+
* Type of the content provided
|
|
6222
|
+
*/
|
|
6223
|
+
type?: string;
|
|
6224
|
+
text?: string;
|
|
6225
|
+
image_url?: {
|
|
6226
|
+
/**
|
|
6227
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
6228
|
+
*/
|
|
6229
|
+
url?: string;
|
|
6230
|
+
};
|
|
6231
|
+
}[]
|
|
6232
|
+
| {
|
|
6233
|
+
/**
|
|
6234
|
+
* Type of the content provided
|
|
6235
|
+
*/
|
|
6236
|
+
type?: string;
|
|
6237
|
+
text?: string;
|
|
6238
|
+
image_url?: {
|
|
6239
|
+
/**
|
|
6240
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
6241
|
+
*/
|
|
6242
|
+
url?: string;
|
|
6243
|
+
};
|
|
6244
|
+
};
|
|
6245
|
+
}[];
|
|
6246
|
+
functions?: {
|
|
6247
|
+
name: string;
|
|
6248
|
+
code: string;
|
|
6249
|
+
}[];
|
|
6250
|
+
/**
|
|
6251
|
+
* A list of tools available for the assistant to use.
|
|
6252
|
+
*/
|
|
6253
|
+
tools?: (
|
|
6254
|
+
| {
|
|
6255
|
+
/**
|
|
6256
|
+
* The name of the tool. More descriptive the better.
|
|
6257
|
+
*/
|
|
6258
|
+
name: string;
|
|
6259
|
+
/**
|
|
6260
|
+
* A brief description of what the tool does.
|
|
6261
|
+
*/
|
|
6262
|
+
description: string;
|
|
6263
|
+
/**
|
|
6264
|
+
* Schema defining the parameters accepted by the tool.
|
|
6265
|
+
*/
|
|
6266
|
+
parameters: {
|
|
6267
|
+
/**
|
|
6268
|
+
* The type of the parameters object (usually 'object').
|
|
6269
|
+
*/
|
|
6270
|
+
type: string;
|
|
6271
|
+
/**
|
|
6272
|
+
* List of required parameter names.
|
|
6273
|
+
*/
|
|
6274
|
+
required?: string[];
|
|
6275
|
+
/**
|
|
6276
|
+
* Definitions of each parameter.
|
|
6277
|
+
*/
|
|
6278
|
+
properties: {
|
|
6279
|
+
[k: string]: {
|
|
6280
|
+
/**
|
|
6281
|
+
* The data type of the parameter.
|
|
6282
|
+
*/
|
|
6283
|
+
type: string;
|
|
6284
|
+
/**
|
|
6285
|
+
* A description of the expected parameter.
|
|
6286
|
+
*/
|
|
6287
|
+
description: string;
|
|
6288
|
+
};
|
|
6289
|
+
};
|
|
6290
|
+
};
|
|
6291
|
+
}
|
|
6292
|
+
| {
|
|
6293
|
+
/**
|
|
6294
|
+
* Specifies the type of tool (e.g., 'function').
|
|
6295
|
+
*/
|
|
6296
|
+
type: string;
|
|
6297
|
+
/**
|
|
6298
|
+
* Details of the function tool.
|
|
6299
|
+
*/
|
|
6300
|
+
function: {
|
|
6301
|
+
/**
|
|
6302
|
+
* The name of the function.
|
|
6303
|
+
*/
|
|
6304
|
+
name: string;
|
|
6305
|
+
/**
|
|
6306
|
+
* A brief description of what the function does.
|
|
6307
|
+
*/
|
|
6308
|
+
description: string;
|
|
6309
|
+
/**
|
|
6310
|
+
* Schema defining the parameters accepted by the function.
|
|
6311
|
+
*/
|
|
6312
|
+
parameters: {
|
|
6313
|
+
/**
|
|
6314
|
+
* The type of the parameters object (usually 'object').
|
|
6315
|
+
*/
|
|
6316
|
+
type: string;
|
|
6317
|
+
/**
|
|
6318
|
+
* List of required parameter names.
|
|
6319
|
+
*/
|
|
6320
|
+
required?: string[];
|
|
6321
|
+
/**
|
|
6322
|
+
* Definitions of each parameter.
|
|
6323
|
+
*/
|
|
6324
|
+
properties: {
|
|
6325
|
+
[k: string]: {
|
|
6326
|
+
/**
|
|
6327
|
+
* The data type of the parameter.
|
|
6328
|
+
*/
|
|
6329
|
+
type: string;
|
|
6330
|
+
/**
|
|
6331
|
+
* A description of the expected parameter.
|
|
6332
|
+
*/
|
|
6333
|
+
description: string;
|
|
6334
|
+
};
|
|
6335
|
+
};
|
|
6336
|
+
};
|
|
6337
|
+
};
|
|
6338
|
+
}
|
|
6339
|
+
)[];
|
|
6340
|
+
response_format?: JSONMode;
|
|
6341
|
+
/**
|
|
6342
|
+
* JSON schema that should be fufilled for the response.
|
|
6343
|
+
*/
|
|
6344
|
+
guided_json?: object;
|
|
6345
|
+
/**
|
|
6346
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
6347
|
+
*/
|
|
6348
|
+
raw?: boolean;
|
|
6349
|
+
/**
|
|
6350
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
6351
|
+
*/
|
|
6352
|
+
stream?: boolean;
|
|
6353
|
+
/**
|
|
6354
|
+
* The maximum number of tokens to generate in the response.
|
|
6355
|
+
*/
|
|
6356
|
+
max_tokens?: number;
|
|
6357
|
+
/**
|
|
6358
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
6359
|
+
*/
|
|
6360
|
+
temperature?: number;
|
|
6361
|
+
/**
|
|
6362
|
+
* 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.
|
|
6363
|
+
*/
|
|
6364
|
+
top_p?: number;
|
|
6365
|
+
/**
|
|
6366
|
+
* 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.
|
|
6367
|
+
*/
|
|
6368
|
+
top_k?: number;
|
|
6369
|
+
/**
|
|
6370
|
+
* Random seed for reproducibility of the generation.
|
|
6371
|
+
*/
|
|
6372
|
+
seed?: number;
|
|
6373
|
+
/**
|
|
6374
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
6375
|
+
*/
|
|
6376
|
+
repetition_penalty?: number;
|
|
6377
|
+
/**
|
|
6378
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
6379
|
+
*/
|
|
6380
|
+
frequency_penalty?: number;
|
|
6381
|
+
/**
|
|
6382
|
+
* Increases the likelihood of the model introducing new topics.
|
|
6383
|
+
*/
|
|
6384
|
+
presence_penalty?: number;
|
|
6385
|
+
}
|
|
6118
6386
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
|
|
6119
6387
|
/**
|
|
6120
6388
|
* The generated text response from the model
|
|
@@ -6168,6 +6436,443 @@ declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
|
|
|
6168
6436
|
inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
|
|
6169
6437
|
postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
|
|
6170
6438
|
}
|
|
6439
|
+
interface Ai_Cf_Deepgram_Nova_3_Input {
|
|
6440
|
+
audio: {
|
|
6441
|
+
body: object;
|
|
6442
|
+
contentType: string;
|
|
6443
|
+
};
|
|
6444
|
+
/**
|
|
6445
|
+
* 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.
|
|
6446
|
+
*/
|
|
6447
|
+
custom_topic_mode?: "extended" | "strict";
|
|
6448
|
+
/**
|
|
6449
|
+
* Custom topics you want the model to detect within your input audio or text if present Submit up to 100
|
|
6450
|
+
*/
|
|
6451
|
+
custom_topic?: string;
|
|
6452
|
+
/**
|
|
6453
|
+
* 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
|
|
6454
|
+
*/
|
|
6455
|
+
custom_intent_mode?: "extended" | "strict";
|
|
6456
|
+
/**
|
|
6457
|
+
* Custom intents you want the model to detect within your input audio if present
|
|
6458
|
+
*/
|
|
6459
|
+
custom_intent?: string;
|
|
6460
|
+
/**
|
|
6461
|
+
* Identifies and extracts key entities from content in submitted audio
|
|
6462
|
+
*/
|
|
6463
|
+
detect_entities?: boolean;
|
|
6464
|
+
/**
|
|
6465
|
+
* Identifies the dominant language spoken in submitted audio
|
|
6466
|
+
*/
|
|
6467
|
+
detect_language?: boolean;
|
|
6468
|
+
/**
|
|
6469
|
+
* Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
|
|
6470
|
+
*/
|
|
6471
|
+
diarize?: boolean;
|
|
6472
|
+
/**
|
|
6473
|
+
* Identify and extract key entities from content in submitted audio
|
|
6474
|
+
*/
|
|
6475
|
+
dictation?: boolean;
|
|
6476
|
+
/**
|
|
6477
|
+
* Specify the expected encoding of your submitted audio
|
|
6478
|
+
*/
|
|
6479
|
+
encoding?:
|
|
6480
|
+
| "linear16"
|
|
6481
|
+
| "flac"
|
|
6482
|
+
| "mulaw"
|
|
6483
|
+
| "amr-nb"
|
|
6484
|
+
| "amr-wb"
|
|
6485
|
+
| "opus"
|
|
6486
|
+
| "speex"
|
|
6487
|
+
| "g729";
|
|
6488
|
+
/**
|
|
6489
|
+
* Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
|
|
6490
|
+
*/
|
|
6491
|
+
extra?: string;
|
|
6492
|
+
/**
|
|
6493
|
+
* Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
|
|
6494
|
+
*/
|
|
6495
|
+
filler_words?: boolean;
|
|
6496
|
+
/**
|
|
6497
|
+
* Key term prompting can boost or suppress specialized terminology and brands.
|
|
6498
|
+
*/
|
|
6499
|
+
keyterm?: string;
|
|
6500
|
+
/**
|
|
6501
|
+
* Keywords can boost or suppress specialized terminology and brands.
|
|
6502
|
+
*/
|
|
6503
|
+
keywords?: string;
|
|
6504
|
+
/**
|
|
6505
|
+
* 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.
|
|
6506
|
+
*/
|
|
6507
|
+
language?: string;
|
|
6508
|
+
/**
|
|
6509
|
+
* Spoken measurements will be converted to their corresponding abbreviations.
|
|
6510
|
+
*/
|
|
6511
|
+
measurements?: boolean;
|
|
6512
|
+
/**
|
|
6513
|
+
* 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.
|
|
6514
|
+
*/
|
|
6515
|
+
mip_opt_out?: boolean;
|
|
6516
|
+
/**
|
|
6517
|
+
* Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
|
|
6518
|
+
*/
|
|
6519
|
+
mode?: "general" | "medical" | "finance";
|
|
6520
|
+
/**
|
|
6521
|
+
* Transcribe each audio channel independently.
|
|
6522
|
+
*/
|
|
6523
|
+
multichannel?: boolean;
|
|
6524
|
+
/**
|
|
6525
|
+
* Numerals converts numbers from written format to numerical format.
|
|
6526
|
+
*/
|
|
6527
|
+
numerals?: boolean;
|
|
6528
|
+
/**
|
|
6529
|
+
* Splits audio into paragraphs to improve transcript readability.
|
|
6530
|
+
*/
|
|
6531
|
+
paragraphs?: boolean;
|
|
6532
|
+
/**
|
|
6533
|
+
* Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
|
|
6534
|
+
*/
|
|
6535
|
+
profanity_filter?: boolean;
|
|
6536
|
+
/**
|
|
6537
|
+
* Add punctuation and capitalization to the transcript.
|
|
6538
|
+
*/
|
|
6539
|
+
punctuate?: boolean;
|
|
6540
|
+
/**
|
|
6541
|
+
* Redaction removes sensitive information from your transcripts.
|
|
6542
|
+
*/
|
|
6543
|
+
redact?: string;
|
|
6544
|
+
/**
|
|
6545
|
+
* Search for terms or phrases in submitted audio and replaces them.
|
|
6546
|
+
*/
|
|
6547
|
+
replace?: string;
|
|
6548
|
+
/**
|
|
6549
|
+
* Search for terms or phrases in submitted audio.
|
|
6550
|
+
*/
|
|
6551
|
+
search?: string;
|
|
6552
|
+
/**
|
|
6553
|
+
* Recognizes the sentiment throughout a transcript or text.
|
|
6554
|
+
*/
|
|
6555
|
+
sentiment?: boolean;
|
|
6556
|
+
/**
|
|
6557
|
+
* Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
|
|
6558
|
+
*/
|
|
6559
|
+
smart_format?: boolean;
|
|
6560
|
+
/**
|
|
6561
|
+
* Detect topics throughout a transcript or text.
|
|
6562
|
+
*/
|
|
6563
|
+
topics?: boolean;
|
|
6564
|
+
/**
|
|
6565
|
+
* Segments speech into meaningful semantic units.
|
|
6566
|
+
*/
|
|
6567
|
+
utterances?: boolean;
|
|
6568
|
+
/**
|
|
6569
|
+
* Seconds to wait before detecting a pause between words in submitted audio.
|
|
6570
|
+
*/
|
|
6571
|
+
utt_split?: number;
|
|
6572
|
+
/**
|
|
6573
|
+
* The number of channels in the submitted audio
|
|
6574
|
+
*/
|
|
6575
|
+
channels?: number;
|
|
6576
|
+
/**
|
|
6577
|
+
* 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.
|
|
6578
|
+
*/
|
|
6579
|
+
interim_results?: boolean;
|
|
6580
|
+
/**
|
|
6581
|
+
* 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
|
|
6582
|
+
*/
|
|
6583
|
+
endpointing?: string;
|
|
6584
|
+
/**
|
|
6585
|
+
* Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
|
|
6586
|
+
*/
|
|
6587
|
+
vad_events?: boolean;
|
|
6588
|
+
/**
|
|
6589
|
+
* 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.
|
|
6590
|
+
*/
|
|
6591
|
+
utterance_end_ms?: boolean;
|
|
6592
|
+
}
|
|
6593
|
+
interface Ai_Cf_Deepgram_Nova_3_Output {
|
|
6594
|
+
results?: {
|
|
6595
|
+
channels?: {
|
|
6596
|
+
alternatives?: {
|
|
6597
|
+
confidence?: number;
|
|
6598
|
+
transcript?: string;
|
|
6599
|
+
words?: {
|
|
6600
|
+
confidence?: number;
|
|
6601
|
+
end?: number;
|
|
6602
|
+
start?: number;
|
|
6603
|
+
word?: string;
|
|
6604
|
+
}[];
|
|
6605
|
+
}[];
|
|
6606
|
+
}[];
|
|
6607
|
+
summary?: {
|
|
6608
|
+
result?: string;
|
|
6609
|
+
short?: string;
|
|
6610
|
+
};
|
|
6611
|
+
sentiments?: {
|
|
6612
|
+
segments?: {
|
|
6613
|
+
text?: string;
|
|
6614
|
+
start_word?: number;
|
|
6615
|
+
end_word?: number;
|
|
6616
|
+
sentiment?: string;
|
|
6617
|
+
sentiment_score?: number;
|
|
6618
|
+
}[];
|
|
6619
|
+
average?: {
|
|
6620
|
+
sentiment?: string;
|
|
6621
|
+
sentiment_score?: number;
|
|
6622
|
+
};
|
|
6623
|
+
};
|
|
6624
|
+
};
|
|
6625
|
+
}
|
|
6626
|
+
declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
|
|
6627
|
+
inputs: Ai_Cf_Deepgram_Nova_3_Input;
|
|
6628
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
|
|
6629
|
+
}
|
|
6630
|
+
type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
|
|
6631
|
+
| {
|
|
6632
|
+
/**
|
|
6633
|
+
* readable stream with audio data and content-type specified for that data
|
|
6634
|
+
*/
|
|
6635
|
+
audio: {
|
|
6636
|
+
body: object;
|
|
6637
|
+
contentType: string;
|
|
6638
|
+
};
|
|
6639
|
+
/**
|
|
6640
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6641
|
+
*/
|
|
6642
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6643
|
+
}
|
|
6644
|
+
| {
|
|
6645
|
+
/**
|
|
6646
|
+
* base64 encoded audio data
|
|
6647
|
+
*/
|
|
6648
|
+
audio: string;
|
|
6649
|
+
/**
|
|
6650
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6651
|
+
*/
|
|
6652
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6653
|
+
};
|
|
6654
|
+
interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
|
|
6655
|
+
/**
|
|
6656
|
+
* if true, end-of-turn was detected
|
|
6657
|
+
*/
|
|
6658
|
+
is_complete?: boolean;
|
|
6659
|
+
/**
|
|
6660
|
+
* probability of the end-of-turn detection
|
|
6661
|
+
*/
|
|
6662
|
+
probability?: number;
|
|
6663
|
+
}
|
|
6664
|
+
declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
6665
|
+
inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
|
|
6666
|
+
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
6667
|
+
}
|
|
6668
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Input =
|
|
6669
|
+
| GPT_OSS_120B_Responses
|
|
6670
|
+
| GPT_OSS_120B_Responses_Async;
|
|
6671
|
+
interface GPT_OSS_120B_Responses {
|
|
6672
|
+
/**
|
|
6673
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6674
|
+
*/
|
|
6675
|
+
input: string | unknown[];
|
|
6676
|
+
reasoning?: {
|
|
6677
|
+
/**
|
|
6678
|
+
* 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.
|
|
6679
|
+
*/
|
|
6680
|
+
effort?: "low" | "medium" | "high";
|
|
6681
|
+
/**
|
|
6682
|
+
* 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.
|
|
6683
|
+
*/
|
|
6684
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6685
|
+
};
|
|
6686
|
+
}
|
|
6687
|
+
interface GPT_OSS_120B_Responses_Async {
|
|
6688
|
+
requests: {
|
|
6689
|
+
/**
|
|
6690
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6691
|
+
*/
|
|
6692
|
+
input: string | unknown[];
|
|
6693
|
+
reasoning?: {
|
|
6694
|
+
/**
|
|
6695
|
+
* 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.
|
|
6696
|
+
*/
|
|
6697
|
+
effort?: "low" | "medium" | "high";
|
|
6698
|
+
/**
|
|
6699
|
+
* 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.
|
|
6700
|
+
*/
|
|
6701
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6702
|
+
};
|
|
6703
|
+
}[];
|
|
6704
|
+
}
|
|
6705
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Output = {} | (string & NonNullable<unknown>);
|
|
6706
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
6707
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_120B_Input;
|
|
6708
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_120B_Output;
|
|
6709
|
+
}
|
|
6710
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Input =
|
|
6711
|
+
| GPT_OSS_20B_Responses
|
|
6712
|
+
| GPT_OSS_20B_Responses_Async;
|
|
6713
|
+
interface GPT_OSS_20B_Responses {
|
|
6714
|
+
/**
|
|
6715
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6716
|
+
*/
|
|
6717
|
+
input: string | unknown[];
|
|
6718
|
+
reasoning?: {
|
|
6719
|
+
/**
|
|
6720
|
+
* 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.
|
|
6721
|
+
*/
|
|
6722
|
+
effort?: "low" | "medium" | "high";
|
|
6723
|
+
/**
|
|
6724
|
+
* 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.
|
|
6725
|
+
*/
|
|
6726
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6727
|
+
};
|
|
6728
|
+
}
|
|
6729
|
+
interface GPT_OSS_20B_Responses_Async {
|
|
6730
|
+
requests: {
|
|
6731
|
+
/**
|
|
6732
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6733
|
+
*/
|
|
6734
|
+
input: string | unknown[];
|
|
6735
|
+
reasoning?: {
|
|
6736
|
+
/**
|
|
6737
|
+
* 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.
|
|
6738
|
+
*/
|
|
6739
|
+
effort?: "low" | "medium" | "high";
|
|
6740
|
+
/**
|
|
6741
|
+
* 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.
|
|
6742
|
+
*/
|
|
6743
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6744
|
+
};
|
|
6745
|
+
}[];
|
|
6746
|
+
}
|
|
6747
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Output = {} | (string & NonNullable<unknown>);
|
|
6748
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
6749
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_20B_Input;
|
|
6750
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_20B_Output;
|
|
6751
|
+
}
|
|
6752
|
+
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
6753
|
+
/**
|
|
6754
|
+
* A text description of the image you want to generate.
|
|
6755
|
+
*/
|
|
6756
|
+
prompt: string;
|
|
6757
|
+
/**
|
|
6758
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6759
|
+
*/
|
|
6760
|
+
guidance?: number;
|
|
6761
|
+
/**
|
|
6762
|
+
* Random seed for reproducibility of the image generation
|
|
6763
|
+
*/
|
|
6764
|
+
seed?: number;
|
|
6765
|
+
/**
|
|
6766
|
+
* The height of the generated image in pixels
|
|
6767
|
+
*/
|
|
6768
|
+
height?: number;
|
|
6769
|
+
/**
|
|
6770
|
+
* The width of the generated image in pixels
|
|
6771
|
+
*/
|
|
6772
|
+
width?: number;
|
|
6773
|
+
/**
|
|
6774
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6775
|
+
*/
|
|
6776
|
+
num_steps?: number;
|
|
6777
|
+
/**
|
|
6778
|
+
* Specify what to exclude from the generated images
|
|
6779
|
+
*/
|
|
6780
|
+
negative_prompt?: string;
|
|
6781
|
+
}
|
|
6782
|
+
/**
|
|
6783
|
+
* The generated image in JPEG format
|
|
6784
|
+
*/
|
|
6785
|
+
type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
|
|
6786
|
+
declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
|
|
6787
|
+
inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
|
|
6788
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
|
|
6789
|
+
}
|
|
6790
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Input {
|
|
6791
|
+
/**
|
|
6792
|
+
* A text description of the image you want to generate.
|
|
6793
|
+
*/
|
|
6794
|
+
prompt: string;
|
|
6795
|
+
/**
|
|
6796
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6797
|
+
*/
|
|
6798
|
+
guidance?: number;
|
|
6799
|
+
/**
|
|
6800
|
+
* Random seed for reproducibility of the image generation
|
|
6801
|
+
*/
|
|
6802
|
+
seed?: number;
|
|
6803
|
+
/**
|
|
6804
|
+
* The height of the generated image in pixels
|
|
6805
|
+
*/
|
|
6806
|
+
height?: number;
|
|
6807
|
+
/**
|
|
6808
|
+
* The width of the generated image in pixels
|
|
6809
|
+
*/
|
|
6810
|
+
width?: number;
|
|
6811
|
+
/**
|
|
6812
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6813
|
+
*/
|
|
6814
|
+
num_steps?: number;
|
|
6815
|
+
/**
|
|
6816
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6817
|
+
*/
|
|
6818
|
+
steps?: number;
|
|
6819
|
+
}
|
|
6820
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Output {
|
|
6821
|
+
/**
|
|
6822
|
+
* The generated image in Base64 format.
|
|
6823
|
+
*/
|
|
6824
|
+
image?: string;
|
|
6825
|
+
}
|
|
6826
|
+
declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
|
|
6827
|
+
inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
|
|
6828
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
|
|
6829
|
+
}
|
|
6830
|
+
interface Ai_Cf_Deepgram_Aura_1_Input {
|
|
6831
|
+
/**
|
|
6832
|
+
* Speaker used to produce the audio.
|
|
6833
|
+
*/
|
|
6834
|
+
speaker?:
|
|
6835
|
+
| "angus"
|
|
6836
|
+
| "asteria"
|
|
6837
|
+
| "arcas"
|
|
6838
|
+
| "orion"
|
|
6839
|
+
| "orpheus"
|
|
6840
|
+
| "athena"
|
|
6841
|
+
| "luna"
|
|
6842
|
+
| "zeus"
|
|
6843
|
+
| "perseus"
|
|
6844
|
+
| "helios"
|
|
6845
|
+
| "hera"
|
|
6846
|
+
| "stella";
|
|
6847
|
+
/**
|
|
6848
|
+
* Encoding of the output audio.
|
|
6849
|
+
*/
|
|
6850
|
+
encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
|
|
6851
|
+
/**
|
|
6852
|
+
* Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
|
|
6853
|
+
*/
|
|
6854
|
+
container?: "none" | "wav" | "ogg";
|
|
6855
|
+
/**
|
|
6856
|
+
* The text content to be converted to speech
|
|
6857
|
+
*/
|
|
6858
|
+
text: string;
|
|
6859
|
+
/**
|
|
6860
|
+
* 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
|
|
6861
|
+
*/
|
|
6862
|
+
sample_rate?: number;
|
|
6863
|
+
/**
|
|
6864
|
+
* The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
|
|
6865
|
+
*/
|
|
6866
|
+
bit_rate?: number;
|
|
6867
|
+
}
|
|
6868
|
+
/**
|
|
6869
|
+
* The generated audio in MP3 format
|
|
6870
|
+
*/
|
|
6871
|
+
type Ai_Cf_Deepgram_Aura_1_Output = string;
|
|
6872
|
+
declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
|
|
6873
|
+
inputs: Ai_Cf_Deepgram_Aura_1_Input;
|
|
6874
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
|
|
6875
|
+
}
|
|
6171
6876
|
interface AiModels {
|
|
6172
6877
|
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
6173
6878
|
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
@@ -6176,8 +6881,8 @@ interface AiModels {
|
|
|
6176
6881
|
"@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
|
|
6177
6882
|
"@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
|
|
6178
6883
|
"@cf/myshell-ai/melotts": BaseAiTextToSpeech;
|
|
6884
|
+
"@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
|
|
6179
6885
|
"@cf/microsoft/resnet-50": BaseAiImageClassification;
|
|
6180
|
-
"@cf/facebook/detr-resnet-50": BaseAiObjectDetection;
|
|
6181
6886
|
"@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
|
|
6182
6887
|
"@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
|
|
6183
6888
|
"@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
|
|
@@ -6212,7 +6917,6 @@ interface AiModels {
|
|
|
6212
6917
|
"@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
|
|
6213
6918
|
"@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
|
|
6214
6919
|
"@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
|
|
6215
|
-
"@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration;
|
|
6216
6920
|
"@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
|
|
6217
6921
|
"@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
|
|
6218
6922
|
"@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
|
|
@@ -6239,6 +6943,13 @@ interface AiModels {
|
|
|
6239
6943
|
"@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
|
|
6240
6944
|
"@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
|
|
6241
6945
|
"@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
|
|
6946
|
+
"@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
|
|
6947
|
+
"@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
|
|
6948
|
+
"@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
|
|
6949
|
+
"@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
|
|
6950
|
+
"@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
|
|
6951
|
+
"@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
|
|
6952
|
+
"@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
|
|
6242
6953
|
}
|
|
6243
6954
|
type AiOptions = {
|
|
6244
6955
|
/**
|
|
@@ -6246,6 +6957,10 @@ type AiOptions = {
|
|
|
6246
6957
|
* https://developers.cloudflare.com/workers-ai/features/batch-api
|
|
6247
6958
|
*/
|
|
6248
6959
|
queueRequest?: boolean;
|
|
6960
|
+
/**
|
|
6961
|
+
* Establish websocket connections, only works for supported models
|
|
6962
|
+
*/
|
|
6963
|
+
websocket?: boolean;
|
|
6249
6964
|
gateway?: GatewayOptions;
|
|
6250
6965
|
returnRawResponse?: boolean;
|
|
6251
6966
|
prefix?: string;
|
|
@@ -6289,7 +7004,7 @@ type AiModelListType = Record<string, any>;
|
|
|
6289
7004
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
6290
7005
|
aiGatewayLogId: string | null;
|
|
6291
7006
|
gateway(gatewayId: string): AiGateway;
|
|
6292
|
-
autorag(autoragId
|
|
7007
|
+
autorag(autoragId: string): AutoRAG;
|
|
6293
7008
|
run<
|
|
6294
7009
|
Name extends keyof AiModelList,
|
|
6295
7010
|
Options extends AiOptions,
|
|
@@ -6299,9 +7014,13 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
6299
7014
|
inputs: InputOptions,
|
|
6300
7015
|
options?: Options,
|
|
6301
7016
|
): Promise<
|
|
6302
|
-
Options extends
|
|
6303
|
-
|
|
6304
|
-
|
|
7017
|
+
Options extends
|
|
7018
|
+
| {
|
|
7019
|
+
returnRawResponse: true;
|
|
7020
|
+
}
|
|
7021
|
+
| {
|
|
7022
|
+
websocket: true;
|
|
7023
|
+
}
|
|
6305
7024
|
? Response
|
|
6306
7025
|
: InputOptions extends {
|
|
6307
7026
|
stream: true;
|