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