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