@cloudflare/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/2021-11-03/index.d.ts +743 -25
- package/2021-11-03/index.ts +747 -25
- package/2022-01-31/index.d.ts +743 -25
- package/2022-01-31/index.ts +747 -25
- package/2022-03-21/index.d.ts +743 -25
- package/2022-03-21/index.ts +747 -25
- package/2022-08-04/index.d.ts +743 -25
- package/2022-08-04/index.ts +747 -25
- package/2022-10-31/index.d.ts +743 -25
- package/2022-10-31/index.ts +747 -25
- package/2022-11-30/index.d.ts +743 -25
- package/2022-11-30/index.ts +747 -25
- package/2023-03-01/index.d.ts +743 -25
- package/2023-03-01/index.ts +747 -25
- package/2023-07-01/index.d.ts +743 -25
- package/2023-07-01/index.ts +747 -25
- package/experimental/index.d.ts +849 -293
- package/experimental/index.ts +853 -293
- package/index.d.ts +743 -25
- package/index.ts +747 -25
- package/latest/index.d.ts +850 -291
- package/latest/index.ts +854 -291
- package/oldest/index.d.ts +743 -25
- package/oldest/index.ts +747 -25
- package/package.json +1 -1
package/2022-08-04/index.d.ts
CHANGED
|
@@ -289,7 +289,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
289
289
|
FixedLengthStream: typeof FixedLengthStream;
|
|
290
290
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
291
291
|
HTMLRewriter: typeof HTMLRewriter;
|
|
292
|
-
Performance: typeof Performance;
|
|
293
292
|
}
|
|
294
293
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
295
294
|
type: Type,
|
|
@@ -462,6 +461,18 @@ declare abstract class Navigator {
|
|
|
462
461
|
readonly userAgent: string;
|
|
463
462
|
readonly hardwareConcurrency: number;
|
|
464
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
466
|
+
* as well as timing of subrequests and other operations.
|
|
467
|
+
*
|
|
468
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
469
|
+
*/
|
|
470
|
+
interface Performance {
|
|
471
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
472
|
+
readonly timeOrigin: number;
|
|
473
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
474
|
+
now(): number;
|
|
475
|
+
}
|
|
465
476
|
interface AlarmInvocationInfo {
|
|
466
477
|
readonly isRetry: boolean;
|
|
467
478
|
readonly retryCount: number;
|
|
@@ -3144,18 +3155,6 @@ interface WorkerLoaderWorkerCode {
|
|
|
3144
3155
|
tails?: Fetcher[];
|
|
3145
3156
|
streamingTails?: Fetcher[];
|
|
3146
3157
|
}
|
|
3147
|
-
/**
|
|
3148
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3149
|
-
* as well as timing of subrequests and other operations.
|
|
3150
|
-
*
|
|
3151
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3152
|
-
*/
|
|
3153
|
-
declare abstract class Performance {
|
|
3154
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3155
|
-
get timeOrigin(): number;
|
|
3156
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3157
|
-
now(): number;
|
|
3158
|
-
}
|
|
3159
3158
|
type AiImageClassificationInput = {
|
|
3160
3159
|
image: number[];
|
|
3161
3160
|
};
|
|
@@ -3210,6 +3209,18 @@ declare abstract class BaseAiImageTextToText {
|
|
|
3210
3209
|
inputs: AiImageTextToTextInput;
|
|
3211
3210
|
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3212
3211
|
}
|
|
3212
|
+
type AiMultimodalEmbeddingsInput = {
|
|
3213
|
+
image: string;
|
|
3214
|
+
text: string[];
|
|
3215
|
+
};
|
|
3216
|
+
type AiIMultimodalEmbeddingsOutput = {
|
|
3217
|
+
data: number[][];
|
|
3218
|
+
shape: number[];
|
|
3219
|
+
};
|
|
3220
|
+
declare abstract class BaseAiMultimodalEmbeddings {
|
|
3221
|
+
inputs: AiImageTextToTextInput;
|
|
3222
|
+
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3223
|
+
}
|
|
3213
3224
|
type AiObjectDetectionInput = {
|
|
3214
3225
|
image: number[];
|
|
3215
3226
|
};
|
|
@@ -3348,12 +3359,28 @@ type AiTextGenerationInput = {
|
|
|
3348
3359
|
| (object & NonNullable<unknown>);
|
|
3349
3360
|
functions?: AiTextGenerationFunctionsInput[];
|
|
3350
3361
|
};
|
|
3362
|
+
type AiTextGenerationToolLegacyOutput = {
|
|
3363
|
+
name: string;
|
|
3364
|
+
arguments: unknown;
|
|
3365
|
+
};
|
|
3366
|
+
type AiTextGenerationToolOutput = {
|
|
3367
|
+
id: string;
|
|
3368
|
+
type: "function";
|
|
3369
|
+
function: {
|
|
3370
|
+
name: string;
|
|
3371
|
+
arguments: string;
|
|
3372
|
+
};
|
|
3373
|
+
};
|
|
3374
|
+
type UsageTags = {
|
|
3375
|
+
prompt_tokens: number;
|
|
3376
|
+
completion_tokens: number;
|
|
3377
|
+
total_tokens: number;
|
|
3378
|
+
};
|
|
3351
3379
|
type AiTextGenerationOutput = {
|
|
3352
3380
|
response?: string;
|
|
3353
|
-
tool_calls?:
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
}[];
|
|
3381
|
+
tool_calls?: AiTextGenerationToolLegacyOutput[] &
|
|
3382
|
+
AiTextGenerationToolOutput[];
|
|
3383
|
+
usage?: UsageTags;
|
|
3357
3384
|
};
|
|
3358
3385
|
declare abstract class BaseAiTextGeneration {
|
|
3359
3386
|
inputs: AiTextGenerationInput;
|
|
@@ -4442,6 +4469,7 @@ type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
|
|
|
4442
4469
|
name?: string;
|
|
4443
4470
|
}[];
|
|
4444
4471
|
}
|
|
4472
|
+
| string
|
|
4445
4473
|
| AsyncResponse;
|
|
4446
4474
|
declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
|
|
4447
4475
|
inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
|
|
@@ -4518,7 +4546,6 @@ interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
|
|
|
4518
4546
|
/**
|
|
4519
4547
|
* A query you wish to perform against the provided contexts.
|
|
4520
4548
|
*/
|
|
4521
|
-
query: string;
|
|
4522
4549
|
/**
|
|
4523
4550
|
* Number of returned results starting with the best score.
|
|
4524
4551
|
*/
|
|
@@ -5611,7 +5638,8 @@ declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
|
|
|
5611
5638
|
}
|
|
5612
5639
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
|
|
5613
5640
|
| Ai_Cf_Meta_Llama_4_Prompt
|
|
5614
|
-
| Ai_Cf_Meta_Llama_4_Messages
|
|
5641
|
+
| Ai_Cf_Meta_Llama_4_Messages
|
|
5642
|
+
| Ai_Cf_Meta_Llama_4_Async_Batch;
|
|
5615
5643
|
interface Ai_Cf_Meta_Llama_4_Prompt {
|
|
5616
5644
|
/**
|
|
5617
5645
|
* The input text prompt for the model to generate a response.
|
|
@@ -5845,6 +5873,245 @@ interface Ai_Cf_Meta_Llama_4_Messages {
|
|
|
5845
5873
|
*/
|
|
5846
5874
|
presence_penalty?: number;
|
|
5847
5875
|
}
|
|
5876
|
+
interface Ai_Cf_Meta_Llama_4_Async_Batch {
|
|
5877
|
+
requests: (
|
|
5878
|
+
| Ai_Cf_Meta_Llama_4_Prompt_Inner
|
|
5879
|
+
| Ai_Cf_Meta_Llama_4_Messages_Inner
|
|
5880
|
+
)[];
|
|
5881
|
+
}
|
|
5882
|
+
interface Ai_Cf_Meta_Llama_4_Prompt_Inner {
|
|
5883
|
+
/**
|
|
5884
|
+
* The input text prompt for the model to generate a response.
|
|
5885
|
+
*/
|
|
5886
|
+
prompt: string;
|
|
5887
|
+
/**
|
|
5888
|
+
* JSON schema that should be fulfilled for the response.
|
|
5889
|
+
*/
|
|
5890
|
+
guided_json?: object;
|
|
5891
|
+
response_format?: JSONMode;
|
|
5892
|
+
/**
|
|
5893
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
5894
|
+
*/
|
|
5895
|
+
raw?: boolean;
|
|
5896
|
+
/**
|
|
5897
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
5898
|
+
*/
|
|
5899
|
+
stream?: boolean;
|
|
5900
|
+
/**
|
|
5901
|
+
* The maximum number of tokens to generate in the response.
|
|
5902
|
+
*/
|
|
5903
|
+
max_tokens?: number;
|
|
5904
|
+
/**
|
|
5905
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
5906
|
+
*/
|
|
5907
|
+
temperature?: number;
|
|
5908
|
+
/**
|
|
5909
|
+
* 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.
|
|
5910
|
+
*/
|
|
5911
|
+
top_p?: number;
|
|
5912
|
+
/**
|
|
5913
|
+
* 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.
|
|
5914
|
+
*/
|
|
5915
|
+
top_k?: number;
|
|
5916
|
+
/**
|
|
5917
|
+
* Random seed for reproducibility of the generation.
|
|
5918
|
+
*/
|
|
5919
|
+
seed?: number;
|
|
5920
|
+
/**
|
|
5921
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
5922
|
+
*/
|
|
5923
|
+
repetition_penalty?: number;
|
|
5924
|
+
/**
|
|
5925
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
5926
|
+
*/
|
|
5927
|
+
frequency_penalty?: number;
|
|
5928
|
+
/**
|
|
5929
|
+
* Increases the likelihood of the model introducing new topics.
|
|
5930
|
+
*/
|
|
5931
|
+
presence_penalty?: number;
|
|
5932
|
+
}
|
|
5933
|
+
interface Ai_Cf_Meta_Llama_4_Messages_Inner {
|
|
5934
|
+
/**
|
|
5935
|
+
* An array of message objects representing the conversation history.
|
|
5936
|
+
*/
|
|
5937
|
+
messages: {
|
|
5938
|
+
/**
|
|
5939
|
+
* The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
|
|
5940
|
+
*/
|
|
5941
|
+
role?: string;
|
|
5942
|
+
/**
|
|
5943
|
+
* The tool call id. If you don't know what to put here you can fall back to 000000001
|
|
5944
|
+
*/
|
|
5945
|
+
tool_call_id?: string;
|
|
5946
|
+
content?:
|
|
5947
|
+
| string
|
|
5948
|
+
| {
|
|
5949
|
+
/**
|
|
5950
|
+
* Type of the content provided
|
|
5951
|
+
*/
|
|
5952
|
+
type?: string;
|
|
5953
|
+
text?: string;
|
|
5954
|
+
image_url?: {
|
|
5955
|
+
/**
|
|
5956
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
5957
|
+
*/
|
|
5958
|
+
url?: string;
|
|
5959
|
+
};
|
|
5960
|
+
}[]
|
|
5961
|
+
| {
|
|
5962
|
+
/**
|
|
5963
|
+
* Type of the content provided
|
|
5964
|
+
*/
|
|
5965
|
+
type?: string;
|
|
5966
|
+
text?: string;
|
|
5967
|
+
image_url?: {
|
|
5968
|
+
/**
|
|
5969
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
5970
|
+
*/
|
|
5971
|
+
url?: string;
|
|
5972
|
+
};
|
|
5973
|
+
};
|
|
5974
|
+
}[];
|
|
5975
|
+
functions?: {
|
|
5976
|
+
name: string;
|
|
5977
|
+
code: string;
|
|
5978
|
+
}[];
|
|
5979
|
+
/**
|
|
5980
|
+
* A list of tools available for the assistant to use.
|
|
5981
|
+
*/
|
|
5982
|
+
tools?: (
|
|
5983
|
+
| {
|
|
5984
|
+
/**
|
|
5985
|
+
* The name of the tool. More descriptive the better.
|
|
5986
|
+
*/
|
|
5987
|
+
name: string;
|
|
5988
|
+
/**
|
|
5989
|
+
* A brief description of what the tool does.
|
|
5990
|
+
*/
|
|
5991
|
+
description: string;
|
|
5992
|
+
/**
|
|
5993
|
+
* Schema defining the parameters accepted by the tool.
|
|
5994
|
+
*/
|
|
5995
|
+
parameters: {
|
|
5996
|
+
/**
|
|
5997
|
+
* The type of the parameters object (usually 'object').
|
|
5998
|
+
*/
|
|
5999
|
+
type: string;
|
|
6000
|
+
/**
|
|
6001
|
+
* List of required parameter names.
|
|
6002
|
+
*/
|
|
6003
|
+
required?: string[];
|
|
6004
|
+
/**
|
|
6005
|
+
* Definitions of each parameter.
|
|
6006
|
+
*/
|
|
6007
|
+
properties: {
|
|
6008
|
+
[k: string]: {
|
|
6009
|
+
/**
|
|
6010
|
+
* The data type of the parameter.
|
|
6011
|
+
*/
|
|
6012
|
+
type: string;
|
|
6013
|
+
/**
|
|
6014
|
+
* A description of the expected parameter.
|
|
6015
|
+
*/
|
|
6016
|
+
description: string;
|
|
6017
|
+
};
|
|
6018
|
+
};
|
|
6019
|
+
};
|
|
6020
|
+
}
|
|
6021
|
+
| {
|
|
6022
|
+
/**
|
|
6023
|
+
* Specifies the type of tool (e.g., 'function').
|
|
6024
|
+
*/
|
|
6025
|
+
type: string;
|
|
6026
|
+
/**
|
|
6027
|
+
* Details of the function tool.
|
|
6028
|
+
*/
|
|
6029
|
+
function: {
|
|
6030
|
+
/**
|
|
6031
|
+
* The name of the function.
|
|
6032
|
+
*/
|
|
6033
|
+
name: string;
|
|
6034
|
+
/**
|
|
6035
|
+
* A brief description of what the function does.
|
|
6036
|
+
*/
|
|
6037
|
+
description: string;
|
|
6038
|
+
/**
|
|
6039
|
+
* Schema defining the parameters accepted by the function.
|
|
6040
|
+
*/
|
|
6041
|
+
parameters: {
|
|
6042
|
+
/**
|
|
6043
|
+
* The type of the parameters object (usually 'object').
|
|
6044
|
+
*/
|
|
6045
|
+
type: string;
|
|
6046
|
+
/**
|
|
6047
|
+
* List of required parameter names.
|
|
6048
|
+
*/
|
|
6049
|
+
required?: string[];
|
|
6050
|
+
/**
|
|
6051
|
+
* Definitions of each parameter.
|
|
6052
|
+
*/
|
|
6053
|
+
properties: {
|
|
6054
|
+
[k: string]: {
|
|
6055
|
+
/**
|
|
6056
|
+
* The data type of the parameter.
|
|
6057
|
+
*/
|
|
6058
|
+
type: string;
|
|
6059
|
+
/**
|
|
6060
|
+
* A description of the expected parameter.
|
|
6061
|
+
*/
|
|
6062
|
+
description: string;
|
|
6063
|
+
};
|
|
6064
|
+
};
|
|
6065
|
+
};
|
|
6066
|
+
};
|
|
6067
|
+
}
|
|
6068
|
+
)[];
|
|
6069
|
+
response_format?: JSONMode;
|
|
6070
|
+
/**
|
|
6071
|
+
* JSON schema that should be fufilled for the response.
|
|
6072
|
+
*/
|
|
6073
|
+
guided_json?: object;
|
|
6074
|
+
/**
|
|
6075
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
6076
|
+
*/
|
|
6077
|
+
raw?: boolean;
|
|
6078
|
+
/**
|
|
6079
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
6080
|
+
*/
|
|
6081
|
+
stream?: boolean;
|
|
6082
|
+
/**
|
|
6083
|
+
* The maximum number of tokens to generate in the response.
|
|
6084
|
+
*/
|
|
6085
|
+
max_tokens?: number;
|
|
6086
|
+
/**
|
|
6087
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
6088
|
+
*/
|
|
6089
|
+
temperature?: number;
|
|
6090
|
+
/**
|
|
6091
|
+
* 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.
|
|
6092
|
+
*/
|
|
6093
|
+
top_p?: number;
|
|
6094
|
+
/**
|
|
6095
|
+
* 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.
|
|
6096
|
+
*/
|
|
6097
|
+
top_k?: number;
|
|
6098
|
+
/**
|
|
6099
|
+
* Random seed for reproducibility of the generation.
|
|
6100
|
+
*/
|
|
6101
|
+
seed?: number;
|
|
6102
|
+
/**
|
|
6103
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
6104
|
+
*/
|
|
6105
|
+
repetition_penalty?: number;
|
|
6106
|
+
/**
|
|
6107
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
6108
|
+
*/
|
|
6109
|
+
frequency_penalty?: number;
|
|
6110
|
+
/**
|
|
6111
|
+
* Increases the likelihood of the model introducing new topics.
|
|
6112
|
+
*/
|
|
6113
|
+
presence_penalty?: number;
|
|
6114
|
+
}
|
|
5848
6115
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
|
|
5849
6116
|
/**
|
|
5850
6117
|
* The generated text response from the model
|
|
@@ -5898,6 +6165,443 @@ declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
|
|
|
5898
6165
|
inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
|
|
5899
6166
|
postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
|
|
5900
6167
|
}
|
|
6168
|
+
interface Ai_Cf_Deepgram_Nova_3_Input {
|
|
6169
|
+
audio: {
|
|
6170
|
+
body: object;
|
|
6171
|
+
contentType: string;
|
|
6172
|
+
};
|
|
6173
|
+
/**
|
|
6174
|
+
* 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.
|
|
6175
|
+
*/
|
|
6176
|
+
custom_topic_mode?: "extended" | "strict";
|
|
6177
|
+
/**
|
|
6178
|
+
* Custom topics you want the model to detect within your input audio or text if present Submit up to 100
|
|
6179
|
+
*/
|
|
6180
|
+
custom_topic?: string;
|
|
6181
|
+
/**
|
|
6182
|
+
* 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
|
|
6183
|
+
*/
|
|
6184
|
+
custom_intent_mode?: "extended" | "strict";
|
|
6185
|
+
/**
|
|
6186
|
+
* Custom intents you want the model to detect within your input audio if present
|
|
6187
|
+
*/
|
|
6188
|
+
custom_intent?: string;
|
|
6189
|
+
/**
|
|
6190
|
+
* Identifies and extracts key entities from content in submitted audio
|
|
6191
|
+
*/
|
|
6192
|
+
detect_entities?: boolean;
|
|
6193
|
+
/**
|
|
6194
|
+
* Identifies the dominant language spoken in submitted audio
|
|
6195
|
+
*/
|
|
6196
|
+
detect_language?: boolean;
|
|
6197
|
+
/**
|
|
6198
|
+
* Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
|
|
6199
|
+
*/
|
|
6200
|
+
diarize?: boolean;
|
|
6201
|
+
/**
|
|
6202
|
+
* Identify and extract key entities from content in submitted audio
|
|
6203
|
+
*/
|
|
6204
|
+
dictation?: boolean;
|
|
6205
|
+
/**
|
|
6206
|
+
* Specify the expected encoding of your submitted audio
|
|
6207
|
+
*/
|
|
6208
|
+
encoding?:
|
|
6209
|
+
| "linear16"
|
|
6210
|
+
| "flac"
|
|
6211
|
+
| "mulaw"
|
|
6212
|
+
| "amr-nb"
|
|
6213
|
+
| "amr-wb"
|
|
6214
|
+
| "opus"
|
|
6215
|
+
| "speex"
|
|
6216
|
+
| "g729";
|
|
6217
|
+
/**
|
|
6218
|
+
* Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
|
|
6219
|
+
*/
|
|
6220
|
+
extra?: string;
|
|
6221
|
+
/**
|
|
6222
|
+
* Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
|
|
6223
|
+
*/
|
|
6224
|
+
filler_words?: boolean;
|
|
6225
|
+
/**
|
|
6226
|
+
* Key term prompting can boost or suppress specialized terminology and brands.
|
|
6227
|
+
*/
|
|
6228
|
+
keyterm?: string;
|
|
6229
|
+
/**
|
|
6230
|
+
* Keywords can boost or suppress specialized terminology and brands.
|
|
6231
|
+
*/
|
|
6232
|
+
keywords?: string;
|
|
6233
|
+
/**
|
|
6234
|
+
* 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.
|
|
6235
|
+
*/
|
|
6236
|
+
language?: string;
|
|
6237
|
+
/**
|
|
6238
|
+
* Spoken measurements will be converted to their corresponding abbreviations.
|
|
6239
|
+
*/
|
|
6240
|
+
measurements?: boolean;
|
|
6241
|
+
/**
|
|
6242
|
+
* 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.
|
|
6243
|
+
*/
|
|
6244
|
+
mip_opt_out?: boolean;
|
|
6245
|
+
/**
|
|
6246
|
+
* Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
|
|
6247
|
+
*/
|
|
6248
|
+
mode?: "general" | "medical" | "finance";
|
|
6249
|
+
/**
|
|
6250
|
+
* Transcribe each audio channel independently.
|
|
6251
|
+
*/
|
|
6252
|
+
multichannel?: boolean;
|
|
6253
|
+
/**
|
|
6254
|
+
* Numerals converts numbers from written format to numerical format.
|
|
6255
|
+
*/
|
|
6256
|
+
numerals?: boolean;
|
|
6257
|
+
/**
|
|
6258
|
+
* Splits audio into paragraphs to improve transcript readability.
|
|
6259
|
+
*/
|
|
6260
|
+
paragraphs?: boolean;
|
|
6261
|
+
/**
|
|
6262
|
+
* Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
|
|
6263
|
+
*/
|
|
6264
|
+
profanity_filter?: boolean;
|
|
6265
|
+
/**
|
|
6266
|
+
* Add punctuation and capitalization to the transcript.
|
|
6267
|
+
*/
|
|
6268
|
+
punctuate?: boolean;
|
|
6269
|
+
/**
|
|
6270
|
+
* Redaction removes sensitive information from your transcripts.
|
|
6271
|
+
*/
|
|
6272
|
+
redact?: string;
|
|
6273
|
+
/**
|
|
6274
|
+
* Search for terms or phrases in submitted audio and replaces them.
|
|
6275
|
+
*/
|
|
6276
|
+
replace?: string;
|
|
6277
|
+
/**
|
|
6278
|
+
* Search for terms or phrases in submitted audio.
|
|
6279
|
+
*/
|
|
6280
|
+
search?: string;
|
|
6281
|
+
/**
|
|
6282
|
+
* Recognizes the sentiment throughout a transcript or text.
|
|
6283
|
+
*/
|
|
6284
|
+
sentiment?: boolean;
|
|
6285
|
+
/**
|
|
6286
|
+
* Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
|
|
6287
|
+
*/
|
|
6288
|
+
smart_format?: boolean;
|
|
6289
|
+
/**
|
|
6290
|
+
* Detect topics throughout a transcript or text.
|
|
6291
|
+
*/
|
|
6292
|
+
topics?: boolean;
|
|
6293
|
+
/**
|
|
6294
|
+
* Segments speech into meaningful semantic units.
|
|
6295
|
+
*/
|
|
6296
|
+
utterances?: boolean;
|
|
6297
|
+
/**
|
|
6298
|
+
* Seconds to wait before detecting a pause between words in submitted audio.
|
|
6299
|
+
*/
|
|
6300
|
+
utt_split?: number;
|
|
6301
|
+
/**
|
|
6302
|
+
* The number of channels in the submitted audio
|
|
6303
|
+
*/
|
|
6304
|
+
channels?: number;
|
|
6305
|
+
/**
|
|
6306
|
+
* 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.
|
|
6307
|
+
*/
|
|
6308
|
+
interim_results?: boolean;
|
|
6309
|
+
/**
|
|
6310
|
+
* 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
|
|
6311
|
+
*/
|
|
6312
|
+
endpointing?: string;
|
|
6313
|
+
/**
|
|
6314
|
+
* Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
|
|
6315
|
+
*/
|
|
6316
|
+
vad_events?: boolean;
|
|
6317
|
+
/**
|
|
6318
|
+
* 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.
|
|
6319
|
+
*/
|
|
6320
|
+
utterance_end_ms?: boolean;
|
|
6321
|
+
}
|
|
6322
|
+
interface Ai_Cf_Deepgram_Nova_3_Output {
|
|
6323
|
+
results?: {
|
|
6324
|
+
channels?: {
|
|
6325
|
+
alternatives?: {
|
|
6326
|
+
confidence?: number;
|
|
6327
|
+
transcript?: string;
|
|
6328
|
+
words?: {
|
|
6329
|
+
confidence?: number;
|
|
6330
|
+
end?: number;
|
|
6331
|
+
start?: number;
|
|
6332
|
+
word?: string;
|
|
6333
|
+
}[];
|
|
6334
|
+
}[];
|
|
6335
|
+
}[];
|
|
6336
|
+
summary?: {
|
|
6337
|
+
result?: string;
|
|
6338
|
+
short?: string;
|
|
6339
|
+
};
|
|
6340
|
+
sentiments?: {
|
|
6341
|
+
segments?: {
|
|
6342
|
+
text?: string;
|
|
6343
|
+
start_word?: number;
|
|
6344
|
+
end_word?: number;
|
|
6345
|
+
sentiment?: string;
|
|
6346
|
+
sentiment_score?: number;
|
|
6347
|
+
}[];
|
|
6348
|
+
average?: {
|
|
6349
|
+
sentiment?: string;
|
|
6350
|
+
sentiment_score?: number;
|
|
6351
|
+
};
|
|
6352
|
+
};
|
|
6353
|
+
};
|
|
6354
|
+
}
|
|
6355
|
+
declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
|
|
6356
|
+
inputs: Ai_Cf_Deepgram_Nova_3_Input;
|
|
6357
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
|
|
6358
|
+
}
|
|
6359
|
+
type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
|
|
6360
|
+
| {
|
|
6361
|
+
/**
|
|
6362
|
+
* readable stream with audio data and content-type specified for that data
|
|
6363
|
+
*/
|
|
6364
|
+
audio: {
|
|
6365
|
+
body: object;
|
|
6366
|
+
contentType: string;
|
|
6367
|
+
};
|
|
6368
|
+
/**
|
|
6369
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6370
|
+
*/
|
|
6371
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6372
|
+
}
|
|
6373
|
+
| {
|
|
6374
|
+
/**
|
|
6375
|
+
* base64 encoded audio data
|
|
6376
|
+
*/
|
|
6377
|
+
audio: string;
|
|
6378
|
+
/**
|
|
6379
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6380
|
+
*/
|
|
6381
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6382
|
+
};
|
|
6383
|
+
interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
|
|
6384
|
+
/**
|
|
6385
|
+
* if true, end-of-turn was detected
|
|
6386
|
+
*/
|
|
6387
|
+
is_complete?: boolean;
|
|
6388
|
+
/**
|
|
6389
|
+
* probability of the end-of-turn detection
|
|
6390
|
+
*/
|
|
6391
|
+
probability?: number;
|
|
6392
|
+
}
|
|
6393
|
+
declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
6394
|
+
inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
|
|
6395
|
+
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
6396
|
+
}
|
|
6397
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Input =
|
|
6398
|
+
| GPT_OSS_120B_Responses
|
|
6399
|
+
| GPT_OSS_120B_Responses_Async;
|
|
6400
|
+
interface GPT_OSS_120B_Responses {
|
|
6401
|
+
/**
|
|
6402
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6403
|
+
*/
|
|
6404
|
+
input: string | unknown[];
|
|
6405
|
+
reasoning?: {
|
|
6406
|
+
/**
|
|
6407
|
+
* 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.
|
|
6408
|
+
*/
|
|
6409
|
+
effort?: "low" | "medium" | "high";
|
|
6410
|
+
/**
|
|
6411
|
+
* 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.
|
|
6412
|
+
*/
|
|
6413
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6414
|
+
};
|
|
6415
|
+
}
|
|
6416
|
+
interface GPT_OSS_120B_Responses_Async {
|
|
6417
|
+
requests: {
|
|
6418
|
+
/**
|
|
6419
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6420
|
+
*/
|
|
6421
|
+
input: string | unknown[];
|
|
6422
|
+
reasoning?: {
|
|
6423
|
+
/**
|
|
6424
|
+
* 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.
|
|
6425
|
+
*/
|
|
6426
|
+
effort?: "low" | "medium" | "high";
|
|
6427
|
+
/**
|
|
6428
|
+
* 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.
|
|
6429
|
+
*/
|
|
6430
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6431
|
+
};
|
|
6432
|
+
}[];
|
|
6433
|
+
}
|
|
6434
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Output = {} | (string & NonNullable<unknown>);
|
|
6435
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
6436
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_120B_Input;
|
|
6437
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_120B_Output;
|
|
6438
|
+
}
|
|
6439
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Input =
|
|
6440
|
+
| GPT_OSS_20B_Responses
|
|
6441
|
+
| GPT_OSS_20B_Responses_Async;
|
|
6442
|
+
interface GPT_OSS_20B_Responses {
|
|
6443
|
+
/**
|
|
6444
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6445
|
+
*/
|
|
6446
|
+
input: string | unknown[];
|
|
6447
|
+
reasoning?: {
|
|
6448
|
+
/**
|
|
6449
|
+
* 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.
|
|
6450
|
+
*/
|
|
6451
|
+
effort?: "low" | "medium" | "high";
|
|
6452
|
+
/**
|
|
6453
|
+
* 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.
|
|
6454
|
+
*/
|
|
6455
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6456
|
+
};
|
|
6457
|
+
}
|
|
6458
|
+
interface GPT_OSS_20B_Responses_Async {
|
|
6459
|
+
requests: {
|
|
6460
|
+
/**
|
|
6461
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6462
|
+
*/
|
|
6463
|
+
input: string | unknown[];
|
|
6464
|
+
reasoning?: {
|
|
6465
|
+
/**
|
|
6466
|
+
* 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.
|
|
6467
|
+
*/
|
|
6468
|
+
effort?: "low" | "medium" | "high";
|
|
6469
|
+
/**
|
|
6470
|
+
* 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.
|
|
6471
|
+
*/
|
|
6472
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6473
|
+
};
|
|
6474
|
+
}[];
|
|
6475
|
+
}
|
|
6476
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Output = {} | (string & NonNullable<unknown>);
|
|
6477
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
6478
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_20B_Input;
|
|
6479
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_20B_Output;
|
|
6480
|
+
}
|
|
6481
|
+
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
6482
|
+
/**
|
|
6483
|
+
* A text description of the image you want to generate.
|
|
6484
|
+
*/
|
|
6485
|
+
prompt: string;
|
|
6486
|
+
/**
|
|
6487
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6488
|
+
*/
|
|
6489
|
+
guidance?: number;
|
|
6490
|
+
/**
|
|
6491
|
+
* Random seed for reproducibility of the image generation
|
|
6492
|
+
*/
|
|
6493
|
+
seed?: number;
|
|
6494
|
+
/**
|
|
6495
|
+
* The height of the generated image in pixels
|
|
6496
|
+
*/
|
|
6497
|
+
height?: number;
|
|
6498
|
+
/**
|
|
6499
|
+
* The width of the generated image in pixels
|
|
6500
|
+
*/
|
|
6501
|
+
width?: number;
|
|
6502
|
+
/**
|
|
6503
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6504
|
+
*/
|
|
6505
|
+
num_steps?: number;
|
|
6506
|
+
/**
|
|
6507
|
+
* Specify what to exclude from the generated images
|
|
6508
|
+
*/
|
|
6509
|
+
negative_prompt?: string;
|
|
6510
|
+
}
|
|
6511
|
+
/**
|
|
6512
|
+
* The generated image in JPEG format
|
|
6513
|
+
*/
|
|
6514
|
+
type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
|
|
6515
|
+
declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
|
|
6516
|
+
inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
|
|
6517
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
|
|
6518
|
+
}
|
|
6519
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Input {
|
|
6520
|
+
/**
|
|
6521
|
+
* A text description of the image you want to generate.
|
|
6522
|
+
*/
|
|
6523
|
+
prompt: string;
|
|
6524
|
+
/**
|
|
6525
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6526
|
+
*/
|
|
6527
|
+
guidance?: number;
|
|
6528
|
+
/**
|
|
6529
|
+
* Random seed for reproducibility of the image generation
|
|
6530
|
+
*/
|
|
6531
|
+
seed?: number;
|
|
6532
|
+
/**
|
|
6533
|
+
* The height of the generated image in pixels
|
|
6534
|
+
*/
|
|
6535
|
+
height?: number;
|
|
6536
|
+
/**
|
|
6537
|
+
* The width of the generated image in pixels
|
|
6538
|
+
*/
|
|
6539
|
+
width?: number;
|
|
6540
|
+
/**
|
|
6541
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6542
|
+
*/
|
|
6543
|
+
num_steps?: number;
|
|
6544
|
+
/**
|
|
6545
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6546
|
+
*/
|
|
6547
|
+
steps?: number;
|
|
6548
|
+
}
|
|
6549
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Output {
|
|
6550
|
+
/**
|
|
6551
|
+
* The generated image in Base64 format.
|
|
6552
|
+
*/
|
|
6553
|
+
image?: string;
|
|
6554
|
+
}
|
|
6555
|
+
declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
|
|
6556
|
+
inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
|
|
6557
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
|
|
6558
|
+
}
|
|
6559
|
+
interface Ai_Cf_Deepgram_Aura_1_Input {
|
|
6560
|
+
/**
|
|
6561
|
+
* Speaker used to produce the audio.
|
|
6562
|
+
*/
|
|
6563
|
+
speaker?:
|
|
6564
|
+
| "angus"
|
|
6565
|
+
| "asteria"
|
|
6566
|
+
| "arcas"
|
|
6567
|
+
| "orion"
|
|
6568
|
+
| "orpheus"
|
|
6569
|
+
| "athena"
|
|
6570
|
+
| "luna"
|
|
6571
|
+
| "zeus"
|
|
6572
|
+
| "perseus"
|
|
6573
|
+
| "helios"
|
|
6574
|
+
| "hera"
|
|
6575
|
+
| "stella";
|
|
6576
|
+
/**
|
|
6577
|
+
* Encoding of the output audio.
|
|
6578
|
+
*/
|
|
6579
|
+
encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
|
|
6580
|
+
/**
|
|
6581
|
+
* Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
|
|
6582
|
+
*/
|
|
6583
|
+
container?: "none" | "wav" | "ogg";
|
|
6584
|
+
/**
|
|
6585
|
+
* The text content to be converted to speech
|
|
6586
|
+
*/
|
|
6587
|
+
text: string;
|
|
6588
|
+
/**
|
|
6589
|
+
* 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
|
|
6590
|
+
*/
|
|
6591
|
+
sample_rate?: number;
|
|
6592
|
+
/**
|
|
6593
|
+
* The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
|
|
6594
|
+
*/
|
|
6595
|
+
bit_rate?: number;
|
|
6596
|
+
}
|
|
6597
|
+
/**
|
|
6598
|
+
* The generated audio in MP3 format
|
|
6599
|
+
*/
|
|
6600
|
+
type Ai_Cf_Deepgram_Aura_1_Output = string;
|
|
6601
|
+
declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
|
|
6602
|
+
inputs: Ai_Cf_Deepgram_Aura_1_Input;
|
|
6603
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
|
|
6604
|
+
}
|
|
5901
6605
|
interface AiModels {
|
|
5902
6606
|
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
5903
6607
|
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
@@ -5906,8 +6610,8 @@ interface AiModels {
|
|
|
5906
6610
|
"@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
|
|
5907
6611
|
"@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
|
|
5908
6612
|
"@cf/myshell-ai/melotts": BaseAiTextToSpeech;
|
|
6613
|
+
"@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
|
|
5909
6614
|
"@cf/microsoft/resnet-50": BaseAiImageClassification;
|
|
5910
|
-
"@cf/facebook/detr-resnet-50": BaseAiObjectDetection;
|
|
5911
6615
|
"@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
|
|
5912
6616
|
"@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
|
|
5913
6617
|
"@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
|
|
@@ -5942,7 +6646,6 @@ interface AiModels {
|
|
|
5942
6646
|
"@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
|
|
5943
6647
|
"@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
|
|
5944
6648
|
"@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
|
|
5945
|
-
"@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration;
|
|
5946
6649
|
"@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
|
|
5947
6650
|
"@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
|
|
5948
6651
|
"@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
|
|
@@ -5969,6 +6672,13 @@ interface AiModels {
|
|
|
5969
6672
|
"@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
|
|
5970
6673
|
"@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
|
|
5971
6674
|
"@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
|
|
6675
|
+
"@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
|
|
6676
|
+
"@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
|
|
6677
|
+
"@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
|
|
6678
|
+
"@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
|
|
6679
|
+
"@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
|
|
6680
|
+
"@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
|
|
6681
|
+
"@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
|
|
5972
6682
|
}
|
|
5973
6683
|
type AiOptions = {
|
|
5974
6684
|
/**
|
|
@@ -5976,6 +6686,10 @@ type AiOptions = {
|
|
|
5976
6686
|
* https://developers.cloudflare.com/workers-ai/features/batch-api
|
|
5977
6687
|
*/
|
|
5978
6688
|
queueRequest?: boolean;
|
|
6689
|
+
/**
|
|
6690
|
+
* Establish websocket connections, only works for supported models
|
|
6691
|
+
*/
|
|
6692
|
+
websocket?: boolean;
|
|
5979
6693
|
gateway?: GatewayOptions;
|
|
5980
6694
|
returnRawResponse?: boolean;
|
|
5981
6695
|
prefix?: string;
|
|
@@ -6019,7 +6733,7 @@ type AiModelListType = Record<string, any>;
|
|
|
6019
6733
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
6020
6734
|
aiGatewayLogId: string | null;
|
|
6021
6735
|
gateway(gatewayId: string): AiGateway;
|
|
6022
|
-
autorag(autoragId
|
|
6736
|
+
autorag(autoragId: string): AutoRAG;
|
|
6023
6737
|
run<
|
|
6024
6738
|
Name extends keyof AiModelList,
|
|
6025
6739
|
Options extends AiOptions,
|
|
@@ -6029,9 +6743,13 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
6029
6743
|
inputs: InputOptions,
|
|
6030
6744
|
options?: Options,
|
|
6031
6745
|
): Promise<
|
|
6032
|
-
Options extends
|
|
6033
|
-
|
|
6034
|
-
|
|
6746
|
+
Options extends
|
|
6747
|
+
| {
|
|
6748
|
+
returnRawResponse: true;
|
|
6749
|
+
}
|
|
6750
|
+
| {
|
|
6751
|
+
websocket: true;
|
|
6752
|
+
}
|
|
6035
6753
|
? Response
|
|
6036
6754
|
: InputOptions extends {
|
|
6037
6755
|
stream: true;
|