@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/experimental/index.d.ts
CHANGED
|
@@ -301,13 +301,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
301
301
|
FixedLengthStream: typeof FixedLengthStream;
|
|
302
302
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
303
303
|
HTMLRewriter: typeof HTMLRewriter;
|
|
304
|
-
Performance: typeof Performance;
|
|
305
|
-
PerformanceEntry: typeof PerformanceEntry;
|
|
306
|
-
PerformanceMark: typeof PerformanceMark;
|
|
307
|
-
PerformanceMeasure: typeof PerformanceMeasure;
|
|
308
|
-
PerformanceResourceTiming: typeof PerformanceResourceTiming;
|
|
309
|
-
PerformanceObserver: typeof PerformanceObserver;
|
|
310
|
-
PerformanceObserverEntryList: typeof PerformanceObserverEntryList;
|
|
311
304
|
}
|
|
312
305
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
313
306
|
type: Type,
|
|
@@ -485,6 +478,18 @@ declare abstract class Navigator {
|
|
|
485
478
|
readonly languages: string[];
|
|
486
479
|
readonly storage: StorageManager;
|
|
487
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
483
|
+
* as well as timing of subrequests and other operations.
|
|
484
|
+
*
|
|
485
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
486
|
+
*/
|
|
487
|
+
interface Performance {
|
|
488
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
489
|
+
readonly timeOrigin: number;
|
|
490
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
491
|
+
now(): number;
|
|
492
|
+
}
|
|
488
493
|
interface AlarmInvocationInfo {
|
|
489
494
|
readonly isRetry: boolean;
|
|
490
495
|
readonly retryCount: number;
|
|
@@ -3421,174 +3426,6 @@ interface WorkerLoaderWorkerCode {
|
|
|
3421
3426
|
tails?: Fetcher[];
|
|
3422
3427
|
streamingTails?: Fetcher[];
|
|
3423
3428
|
}
|
|
3424
|
-
/**
|
|
3425
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3426
|
-
* as well as timing of subrequests and other operations.
|
|
3427
|
-
*
|
|
3428
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3429
|
-
*/
|
|
3430
|
-
declare abstract class Performance extends EventTarget {
|
|
3431
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3432
|
-
get timeOrigin(): number;
|
|
3433
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3434
|
-
now(): number;
|
|
3435
|
-
get eventCounts(): EventCounts;
|
|
3436
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
|
|
3437
|
-
clearMarks(name?: string): void;
|
|
3438
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
|
|
3439
|
-
clearMeasures(name?: string): void;
|
|
3440
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
|
|
3441
|
-
clearResourceTimings(): void;
|
|
3442
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
|
|
3443
|
-
getEntries(): PerformanceEntry[];
|
|
3444
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
|
|
3445
|
-
getEntriesByName(name: string, type?: string): PerformanceEntry[];
|
|
3446
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
|
|
3447
|
-
getEntriesByType(type: string): PerformanceEntry[];
|
|
3448
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
|
|
3449
|
-
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3450
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
|
|
3451
|
-
measure(
|
|
3452
|
-
measureName: string,
|
|
3453
|
-
measureOptionsOrStartMark: PerformanceMeasureOptions | string,
|
|
3454
|
-
maybeEndMark?: string,
|
|
3455
|
-
): PerformanceMeasure;
|
|
3456
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
|
|
3457
|
-
setResourceTimingBufferSize(size: number): void;
|
|
3458
|
-
eventLoopUtilization(): void;
|
|
3459
|
-
markResourceTiming(): void;
|
|
3460
|
-
timerify(fn: () => void): () => void;
|
|
3461
|
-
}
|
|
3462
|
-
/**
|
|
3463
|
-
* PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline.
|
|
3464
|
-
*
|
|
3465
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3466
|
-
*/
|
|
3467
|
-
declare class PerformanceMark extends PerformanceEntry {
|
|
3468
|
-
constructor(name: string, maybeOptions?: PerformanceMarkOptions);
|
|
3469
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
|
|
3470
|
-
get detail(): any | undefined;
|
|
3471
|
-
toJSON(): any;
|
|
3472
|
-
}
|
|
3473
|
-
/**
|
|
3474
|
-
* PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.
|
|
3475
|
-
*
|
|
3476
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3477
|
-
*/
|
|
3478
|
-
declare abstract class PerformanceMeasure extends PerformanceEntry {
|
|
3479
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
|
|
3480
|
-
get detail(): any | undefined;
|
|
3481
|
-
toJSON(): any;
|
|
3482
|
-
}
|
|
3483
|
-
interface PerformanceMarkOptions {
|
|
3484
|
-
detail?: any;
|
|
3485
|
-
startTime?: number;
|
|
3486
|
-
}
|
|
3487
|
-
interface PerformanceMeasureOptions {
|
|
3488
|
-
detail?: any;
|
|
3489
|
-
start?: number;
|
|
3490
|
-
duration?: number;
|
|
3491
|
-
end?: number;
|
|
3492
|
-
}
|
|
3493
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList) */
|
|
3494
|
-
declare abstract class PerformanceObserverEntryList {
|
|
3495
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries) */
|
|
3496
|
-
getEntries(): PerformanceEntry[];
|
|
3497
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType) */
|
|
3498
|
-
getEntriesByType(type: string): PerformanceEntry[];
|
|
3499
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName) */
|
|
3500
|
-
getEntriesByName(name: string, type?: string): PerformanceEntry[];
|
|
3501
|
-
}
|
|
3502
|
-
/**
|
|
3503
|
-
* Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image).
|
|
3504
|
-
*
|
|
3505
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
3506
|
-
*/
|
|
3507
|
-
declare abstract class PerformanceEntry {
|
|
3508
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
|
|
3509
|
-
get name(): string;
|
|
3510
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
|
|
3511
|
-
get entryType(): string;
|
|
3512
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
|
|
3513
|
-
get startTime(): number;
|
|
3514
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
|
|
3515
|
-
get duration(): number;
|
|
3516
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
|
|
3517
|
-
toJSON(): any;
|
|
3518
|
-
}
|
|
3519
|
-
/**
|
|
3520
|
-
* Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script.
|
|
3521
|
-
*
|
|
3522
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
|
|
3523
|
-
*/
|
|
3524
|
-
declare abstract class PerformanceResourceTiming extends PerformanceEntry {
|
|
3525
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd) */
|
|
3526
|
-
get connectEnd(): number;
|
|
3527
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart) */
|
|
3528
|
-
get connectStart(): number;
|
|
3529
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize) */
|
|
3530
|
-
get decodedBodySize(): number;
|
|
3531
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd) */
|
|
3532
|
-
get domainLookupEnd(): number;
|
|
3533
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart) */
|
|
3534
|
-
get domainLookupStart(): number;
|
|
3535
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize) */
|
|
3536
|
-
get encodedBodySize(): number;
|
|
3537
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart) */
|
|
3538
|
-
get fetchStart(): number;
|
|
3539
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType) */
|
|
3540
|
-
get initiatorType(): string;
|
|
3541
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol) */
|
|
3542
|
-
get nextHopProtocol(): string;
|
|
3543
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd) */
|
|
3544
|
-
get redirectEnd(): number;
|
|
3545
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart) */
|
|
3546
|
-
get redirectStart(): number;
|
|
3547
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart) */
|
|
3548
|
-
get requestStart(): number;
|
|
3549
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd) */
|
|
3550
|
-
get responseEnd(): number;
|
|
3551
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */
|
|
3552
|
-
get responseStart(): number;
|
|
3553
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */
|
|
3554
|
-
get responseStatus(): number;
|
|
3555
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */
|
|
3556
|
-
get secureConnectionStart(): number | undefined;
|
|
3557
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */
|
|
3558
|
-
get transferSize(): number;
|
|
3559
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart) */
|
|
3560
|
-
get workerStart(): number;
|
|
3561
|
-
}
|
|
3562
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver) */
|
|
3563
|
-
declare class PerformanceObserver {
|
|
3564
|
-
constructor(callback: any);
|
|
3565
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect) */
|
|
3566
|
-
disconnect(): void;
|
|
3567
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe) */
|
|
3568
|
-
observe(options?: PerformanceObserverObserveOptions): void;
|
|
3569
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords) */
|
|
3570
|
-
takeRecords(): PerformanceEntry[];
|
|
3571
|
-
readonly supportedEntryTypes: string[];
|
|
3572
|
-
}
|
|
3573
|
-
interface PerformanceObserverObserveOptions {
|
|
3574
|
-
buffered?: boolean;
|
|
3575
|
-
durationThreshold?: number;
|
|
3576
|
-
entryTypes?: string[];
|
|
3577
|
-
type?: string;
|
|
3578
|
-
}
|
|
3579
|
-
interface EventCounts {
|
|
3580
|
-
get size(): number;
|
|
3581
|
-
get(eventType: string): number | undefined;
|
|
3582
|
-
has(eventType: string): boolean;
|
|
3583
|
-
entries(): IterableIterator<string[]>;
|
|
3584
|
-
keys(): IterableIterator<string>;
|
|
3585
|
-
values(): IterableIterator<number>;
|
|
3586
|
-
forEach(
|
|
3587
|
-
param1: (param0: number, param1: string, param2: EventCounts) => void,
|
|
3588
|
-
param2?: any,
|
|
3589
|
-
): void;
|
|
3590
|
-
[Symbol.iterator](): IterableIterator<string[]>;
|
|
3591
|
-
}
|
|
3592
3429
|
type AiImageClassificationInput = {
|
|
3593
3430
|
image: number[];
|
|
3594
3431
|
};
|
|
@@ -3643,6 +3480,18 @@ declare abstract class BaseAiImageTextToText {
|
|
|
3643
3480
|
inputs: AiImageTextToTextInput;
|
|
3644
3481
|
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3645
3482
|
}
|
|
3483
|
+
type AiMultimodalEmbeddingsInput = {
|
|
3484
|
+
image: string;
|
|
3485
|
+
text: string[];
|
|
3486
|
+
};
|
|
3487
|
+
type AiIMultimodalEmbeddingsOutput = {
|
|
3488
|
+
data: number[][];
|
|
3489
|
+
shape: number[];
|
|
3490
|
+
};
|
|
3491
|
+
declare abstract class BaseAiMultimodalEmbeddings {
|
|
3492
|
+
inputs: AiImageTextToTextInput;
|
|
3493
|
+
postProcessedOutputs: AiImageTextToTextOutput;
|
|
3494
|
+
}
|
|
3646
3495
|
type AiObjectDetectionInput = {
|
|
3647
3496
|
image: number[];
|
|
3648
3497
|
};
|
|
@@ -3781,12 +3630,28 @@ type AiTextGenerationInput = {
|
|
|
3781
3630
|
| (object & NonNullable<unknown>);
|
|
3782
3631
|
functions?: AiTextGenerationFunctionsInput[];
|
|
3783
3632
|
};
|
|
3633
|
+
type AiTextGenerationToolLegacyOutput = {
|
|
3634
|
+
name: string;
|
|
3635
|
+
arguments: unknown;
|
|
3636
|
+
};
|
|
3637
|
+
type AiTextGenerationToolOutput = {
|
|
3638
|
+
id: string;
|
|
3639
|
+
type: "function";
|
|
3640
|
+
function: {
|
|
3641
|
+
name: string;
|
|
3642
|
+
arguments: string;
|
|
3643
|
+
};
|
|
3644
|
+
};
|
|
3645
|
+
type UsageTags = {
|
|
3646
|
+
prompt_tokens: number;
|
|
3647
|
+
completion_tokens: number;
|
|
3648
|
+
total_tokens: number;
|
|
3649
|
+
};
|
|
3784
3650
|
type AiTextGenerationOutput = {
|
|
3785
3651
|
response?: string;
|
|
3786
|
-
tool_calls?:
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
}[];
|
|
3652
|
+
tool_calls?: AiTextGenerationToolLegacyOutput[] &
|
|
3653
|
+
AiTextGenerationToolOutput[];
|
|
3654
|
+
usage?: UsageTags;
|
|
3790
3655
|
};
|
|
3791
3656
|
declare abstract class BaseAiTextGeneration {
|
|
3792
3657
|
inputs: AiTextGenerationInput;
|
|
@@ -4875,6 +4740,7 @@ type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output =
|
|
|
4875
4740
|
name?: string;
|
|
4876
4741
|
}[];
|
|
4877
4742
|
}
|
|
4743
|
+
| string
|
|
4878
4744
|
| AsyncResponse;
|
|
4879
4745
|
declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
|
|
4880
4746
|
inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
|
|
@@ -4951,7 +4817,6 @@ interface Ai_Cf_Baai_Bge_Reranker_Base_Input {
|
|
|
4951
4817
|
/**
|
|
4952
4818
|
* A query you wish to perform against the provided contexts.
|
|
4953
4819
|
*/
|
|
4954
|
-
query: string;
|
|
4955
4820
|
/**
|
|
4956
4821
|
* Number of returned results starting with the best score.
|
|
4957
4822
|
*/
|
|
@@ -6044,7 +5909,8 @@ declare abstract class Base_Ai_Cf_Google_Gemma_3_12B_It {
|
|
|
6044
5909
|
}
|
|
6045
5910
|
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
|
|
6046
5911
|
| Ai_Cf_Meta_Llama_4_Prompt
|
|
6047
|
-
| Ai_Cf_Meta_Llama_4_Messages
|
|
5912
|
+
| Ai_Cf_Meta_Llama_4_Messages
|
|
5913
|
+
| Ai_Cf_Meta_Llama_4_Async_Batch;
|
|
6048
5914
|
interface Ai_Cf_Meta_Llama_4_Prompt {
|
|
6049
5915
|
/**
|
|
6050
5916
|
* The input text prompt for the model to generate a response.
|
|
@@ -6278,130 +6144,812 @@ interface Ai_Cf_Meta_Llama_4_Messages {
|
|
|
6278
6144
|
*/
|
|
6279
6145
|
presence_penalty?: number;
|
|
6280
6146
|
}
|
|
6281
|
-
|
|
6147
|
+
interface Ai_Cf_Meta_Llama_4_Async_Batch {
|
|
6148
|
+
requests: (
|
|
6149
|
+
| Ai_Cf_Meta_Llama_4_Prompt_Inner
|
|
6150
|
+
| Ai_Cf_Meta_Llama_4_Messages_Inner
|
|
6151
|
+
)[];
|
|
6152
|
+
}
|
|
6153
|
+
interface Ai_Cf_Meta_Llama_4_Prompt_Inner {
|
|
6282
6154
|
/**
|
|
6283
|
-
* The
|
|
6155
|
+
* The input text prompt for the model to generate a response.
|
|
6284
6156
|
*/
|
|
6285
|
-
|
|
6157
|
+
prompt: string;
|
|
6286
6158
|
/**
|
|
6287
|
-
*
|
|
6159
|
+
* JSON schema that should be fulfilled for the response.
|
|
6288
6160
|
*/
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
* Total number of tokens in input
|
|
6292
|
-
*/
|
|
6293
|
-
prompt_tokens?: number;
|
|
6294
|
-
/**
|
|
6295
|
-
* Total number of tokens in output
|
|
6296
|
-
*/
|
|
6297
|
-
completion_tokens?: number;
|
|
6298
|
-
/**
|
|
6299
|
-
* Total number of input and output tokens
|
|
6300
|
-
*/
|
|
6301
|
-
total_tokens?: number;
|
|
6302
|
-
};
|
|
6161
|
+
guided_json?: object;
|
|
6162
|
+
response_format?: JSONMode;
|
|
6303
6163
|
/**
|
|
6304
|
-
*
|
|
6164
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
6305
6165
|
*/
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6166
|
+
raw?: boolean;
|
|
6167
|
+
/**
|
|
6168
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
6169
|
+
*/
|
|
6170
|
+
stream?: boolean;
|
|
6171
|
+
/**
|
|
6172
|
+
* The maximum number of tokens to generate in the response.
|
|
6173
|
+
*/
|
|
6174
|
+
max_tokens?: number;
|
|
6175
|
+
/**
|
|
6176
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
6177
|
+
*/
|
|
6178
|
+
temperature?: number;
|
|
6179
|
+
/**
|
|
6180
|
+
* Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
|
|
6181
|
+
*/
|
|
6182
|
+
top_p?: number;
|
|
6183
|
+
/**
|
|
6184
|
+
* Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
|
|
6185
|
+
*/
|
|
6186
|
+
top_k?: number;
|
|
6187
|
+
/**
|
|
6188
|
+
* Random seed for reproducibility of the generation.
|
|
6189
|
+
*/
|
|
6190
|
+
seed?: number;
|
|
6191
|
+
/**
|
|
6192
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
6193
|
+
*/
|
|
6194
|
+
repetition_penalty?: number;
|
|
6195
|
+
/**
|
|
6196
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
6197
|
+
*/
|
|
6198
|
+
frequency_penalty?: number;
|
|
6199
|
+
/**
|
|
6200
|
+
* Increases the likelihood of the model introducing new topics.
|
|
6201
|
+
*/
|
|
6202
|
+
presence_penalty?: number;
|
|
6203
|
+
}
|
|
6204
|
+
interface Ai_Cf_Meta_Llama_4_Messages_Inner {
|
|
6205
|
+
/**
|
|
6206
|
+
* An array of message objects representing the conversation history.
|
|
6207
|
+
*/
|
|
6208
|
+
messages: {
|
|
6311
6209
|
/**
|
|
6312
|
-
*
|
|
6210
|
+
* The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
|
|
6313
6211
|
*/
|
|
6314
|
-
|
|
6212
|
+
role?: string;
|
|
6315
6213
|
/**
|
|
6316
|
-
*
|
|
6214
|
+
* The tool call id. If you don't know what to put here you can fall back to 000000001
|
|
6317
6215
|
*/
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6216
|
+
tool_call_id?: string;
|
|
6217
|
+
content?:
|
|
6218
|
+
| string
|
|
6219
|
+
| {
|
|
6220
|
+
/**
|
|
6221
|
+
* Type of the content provided
|
|
6222
|
+
*/
|
|
6223
|
+
type?: string;
|
|
6224
|
+
text?: string;
|
|
6225
|
+
image_url?: {
|
|
6226
|
+
/**
|
|
6227
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
6228
|
+
*/
|
|
6229
|
+
url?: string;
|
|
6230
|
+
};
|
|
6231
|
+
}[]
|
|
6232
|
+
| {
|
|
6233
|
+
/**
|
|
6234
|
+
* Type of the content provided
|
|
6235
|
+
*/
|
|
6236
|
+
type?: string;
|
|
6237
|
+
text?: string;
|
|
6238
|
+
image_url?: {
|
|
6239
|
+
/**
|
|
6240
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
6241
|
+
*/
|
|
6242
|
+
url?: string;
|
|
6243
|
+
};
|
|
6244
|
+
};
|
|
6328
6245
|
}[];
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6246
|
+
functions?: {
|
|
6247
|
+
name: string;
|
|
6248
|
+
code: string;
|
|
6249
|
+
}[];
|
|
6250
|
+
/**
|
|
6251
|
+
* A list of tools available for the assistant to use.
|
|
6252
|
+
*/
|
|
6253
|
+
tools?: (
|
|
6254
|
+
| {
|
|
6255
|
+
/**
|
|
6256
|
+
* The name of the tool. More descriptive the better.
|
|
6257
|
+
*/
|
|
6258
|
+
name: string;
|
|
6259
|
+
/**
|
|
6260
|
+
* A brief description of what the tool does.
|
|
6261
|
+
*/
|
|
6262
|
+
description: string;
|
|
6263
|
+
/**
|
|
6264
|
+
* Schema defining the parameters accepted by the tool.
|
|
6265
|
+
*/
|
|
6266
|
+
parameters: {
|
|
6267
|
+
/**
|
|
6268
|
+
* The type of the parameters object (usually 'object').
|
|
6269
|
+
*/
|
|
6270
|
+
type: string;
|
|
6271
|
+
/**
|
|
6272
|
+
* List of required parameter names.
|
|
6273
|
+
*/
|
|
6274
|
+
required?: string[];
|
|
6275
|
+
/**
|
|
6276
|
+
* Definitions of each parameter.
|
|
6277
|
+
*/
|
|
6278
|
+
properties: {
|
|
6279
|
+
[k: string]: {
|
|
6280
|
+
/**
|
|
6281
|
+
* The data type of the parameter.
|
|
6282
|
+
*/
|
|
6283
|
+
type: string;
|
|
6284
|
+
/**
|
|
6285
|
+
* A description of the expected parameter.
|
|
6286
|
+
*/
|
|
6287
|
+
description: string;
|
|
6288
|
+
};
|
|
6289
|
+
};
|
|
6290
|
+
};
|
|
6291
|
+
}
|
|
6292
|
+
| {
|
|
6293
|
+
/**
|
|
6294
|
+
* Specifies the type of tool (e.g., 'function').
|
|
6295
|
+
*/
|
|
6296
|
+
type: string;
|
|
6297
|
+
/**
|
|
6298
|
+
* Details of the function tool.
|
|
6299
|
+
*/
|
|
6300
|
+
function: {
|
|
6301
|
+
/**
|
|
6302
|
+
* The name of the function.
|
|
6303
|
+
*/
|
|
6304
|
+
name: string;
|
|
6305
|
+
/**
|
|
6306
|
+
* A brief description of what the function does.
|
|
6307
|
+
*/
|
|
6308
|
+
description: string;
|
|
6309
|
+
/**
|
|
6310
|
+
* Schema defining the parameters accepted by the function.
|
|
6311
|
+
*/
|
|
6312
|
+
parameters: {
|
|
6313
|
+
/**
|
|
6314
|
+
* The type of the parameters object (usually 'object').
|
|
6315
|
+
*/
|
|
6316
|
+
type: string;
|
|
6317
|
+
/**
|
|
6318
|
+
* List of required parameter names.
|
|
6319
|
+
*/
|
|
6320
|
+
required?: string[];
|
|
6321
|
+
/**
|
|
6322
|
+
* Definitions of each parameter.
|
|
6323
|
+
*/
|
|
6324
|
+
properties: {
|
|
6325
|
+
[k: string]: {
|
|
6326
|
+
/**
|
|
6327
|
+
* The data type of the parameter.
|
|
6328
|
+
*/
|
|
6329
|
+
type: string;
|
|
6330
|
+
/**
|
|
6331
|
+
* A description of the expected parameter.
|
|
6332
|
+
*/
|
|
6333
|
+
description: string;
|
|
6334
|
+
};
|
|
6335
|
+
};
|
|
6336
|
+
};
|
|
6337
|
+
};
|
|
6338
|
+
}
|
|
6339
|
+
)[];
|
|
6340
|
+
response_format?: JSONMode;
|
|
6341
|
+
/**
|
|
6342
|
+
* JSON schema that should be fufilled for the response.
|
|
6343
|
+
*/
|
|
6344
|
+
guided_json?: object;
|
|
6345
|
+
/**
|
|
6346
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
6347
|
+
*/
|
|
6348
|
+
raw?: boolean;
|
|
6349
|
+
/**
|
|
6350
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
6351
|
+
*/
|
|
6352
|
+
stream?: boolean;
|
|
6353
|
+
/**
|
|
6354
|
+
* The maximum number of tokens to generate in the response.
|
|
6355
|
+
*/
|
|
6356
|
+
max_tokens?: number;
|
|
6357
|
+
/**
|
|
6358
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
6359
|
+
*/
|
|
6360
|
+
temperature?: number;
|
|
6361
|
+
/**
|
|
6362
|
+
* Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
|
|
6363
|
+
*/
|
|
6364
|
+
top_p?: number;
|
|
6365
|
+
/**
|
|
6366
|
+
* Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
|
|
6367
|
+
*/
|
|
6368
|
+
top_k?: number;
|
|
6369
|
+
/**
|
|
6370
|
+
* Random seed for reproducibility of the generation.
|
|
6371
|
+
*/
|
|
6372
|
+
seed?: number;
|
|
6373
|
+
/**
|
|
6374
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
6375
|
+
*/
|
|
6376
|
+
repetition_penalty?: number;
|
|
6377
|
+
/**
|
|
6378
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
6379
|
+
*/
|
|
6380
|
+
frequency_penalty?: number;
|
|
6381
|
+
/**
|
|
6382
|
+
* Increases the likelihood of the model introducing new topics.
|
|
6383
|
+
*/
|
|
6384
|
+
presence_penalty?: number;
|
|
6385
|
+
}
|
|
6386
|
+
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = {
|
|
6387
|
+
/**
|
|
6388
|
+
* The generated text response from the model
|
|
6389
|
+
*/
|
|
6390
|
+
response: string;
|
|
6391
|
+
/**
|
|
6392
|
+
* Usage statistics for the inference request
|
|
6393
|
+
*/
|
|
6394
|
+
usage?: {
|
|
6395
|
+
/**
|
|
6396
|
+
* Total number of tokens in input
|
|
6397
|
+
*/
|
|
6398
|
+
prompt_tokens?: number;
|
|
6399
|
+
/**
|
|
6400
|
+
* Total number of tokens in output
|
|
6401
|
+
*/
|
|
6402
|
+
completion_tokens?: number;
|
|
6403
|
+
/**
|
|
6404
|
+
* Total number of input and output tokens
|
|
6405
|
+
*/
|
|
6406
|
+
total_tokens?: number;
|
|
6407
|
+
};
|
|
6408
|
+
/**
|
|
6409
|
+
* An array of tool calls requests made during the response generation
|
|
6410
|
+
*/
|
|
6411
|
+
tool_calls?: {
|
|
6412
|
+
/**
|
|
6413
|
+
* The tool call id.
|
|
6414
|
+
*/
|
|
6415
|
+
id?: string;
|
|
6416
|
+
/**
|
|
6417
|
+
* Specifies the type of tool (e.g., 'function').
|
|
6418
|
+
*/
|
|
6419
|
+
type?: string;
|
|
6420
|
+
/**
|
|
6421
|
+
* Details of the function tool.
|
|
6422
|
+
*/
|
|
6423
|
+
function?: {
|
|
6424
|
+
/**
|
|
6425
|
+
* The name of the tool to be called
|
|
6426
|
+
*/
|
|
6427
|
+
name?: string;
|
|
6428
|
+
/**
|
|
6429
|
+
* The arguments passed to be passed to the tool call request
|
|
6430
|
+
*/
|
|
6431
|
+
arguments?: object;
|
|
6432
|
+
};
|
|
6433
|
+
}[];
|
|
6434
|
+
};
|
|
6435
|
+
declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
|
|
6436
|
+
inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
|
|
6437
|
+
postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
|
|
6438
|
+
}
|
|
6439
|
+
interface Ai_Cf_Deepgram_Nova_3_Input {
|
|
6440
|
+
audio: {
|
|
6441
|
+
body: object;
|
|
6442
|
+
contentType: string;
|
|
6443
|
+
};
|
|
6444
|
+
/**
|
|
6445
|
+
* Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param.
|
|
6446
|
+
*/
|
|
6447
|
+
custom_topic_mode?: "extended" | "strict";
|
|
6448
|
+
/**
|
|
6449
|
+
* Custom topics you want the model to detect within your input audio or text if present Submit up to 100
|
|
6450
|
+
*/
|
|
6451
|
+
custom_topic?: string;
|
|
6452
|
+
/**
|
|
6453
|
+
* Sets how the model will interpret intents submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param
|
|
6454
|
+
*/
|
|
6455
|
+
custom_intent_mode?: "extended" | "strict";
|
|
6456
|
+
/**
|
|
6457
|
+
* Custom intents you want the model to detect within your input audio if present
|
|
6458
|
+
*/
|
|
6459
|
+
custom_intent?: string;
|
|
6460
|
+
/**
|
|
6461
|
+
* Identifies and extracts key entities from content in submitted audio
|
|
6462
|
+
*/
|
|
6463
|
+
detect_entities?: boolean;
|
|
6464
|
+
/**
|
|
6465
|
+
* Identifies the dominant language spoken in submitted audio
|
|
6466
|
+
*/
|
|
6467
|
+
detect_language?: boolean;
|
|
6468
|
+
/**
|
|
6469
|
+
* Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
|
|
6470
|
+
*/
|
|
6471
|
+
diarize?: boolean;
|
|
6472
|
+
/**
|
|
6473
|
+
* Identify and extract key entities from content in submitted audio
|
|
6474
|
+
*/
|
|
6475
|
+
dictation?: boolean;
|
|
6476
|
+
/**
|
|
6477
|
+
* Specify the expected encoding of your submitted audio
|
|
6478
|
+
*/
|
|
6479
|
+
encoding?:
|
|
6480
|
+
| "linear16"
|
|
6481
|
+
| "flac"
|
|
6482
|
+
| "mulaw"
|
|
6483
|
+
| "amr-nb"
|
|
6484
|
+
| "amr-wb"
|
|
6485
|
+
| "opus"
|
|
6486
|
+
| "speex"
|
|
6487
|
+
| "g729";
|
|
6488
|
+
/**
|
|
6489
|
+
* Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
|
|
6490
|
+
*/
|
|
6491
|
+
extra?: string;
|
|
6492
|
+
/**
|
|
6493
|
+
* Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
|
|
6494
|
+
*/
|
|
6495
|
+
filler_words?: boolean;
|
|
6496
|
+
/**
|
|
6497
|
+
* Key term prompting can boost or suppress specialized terminology and brands.
|
|
6498
|
+
*/
|
|
6499
|
+
keyterm?: string;
|
|
6500
|
+
/**
|
|
6501
|
+
* Keywords can boost or suppress specialized terminology and brands.
|
|
6502
|
+
*/
|
|
6503
|
+
keywords?: string;
|
|
6504
|
+
/**
|
|
6505
|
+
* The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available.
|
|
6506
|
+
*/
|
|
6507
|
+
language?: string;
|
|
6508
|
+
/**
|
|
6509
|
+
* Spoken measurements will be converted to their corresponding abbreviations.
|
|
6510
|
+
*/
|
|
6511
|
+
measurements?: boolean;
|
|
6512
|
+
/**
|
|
6513
|
+
* Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip.
|
|
6514
|
+
*/
|
|
6515
|
+
mip_opt_out?: boolean;
|
|
6516
|
+
/**
|
|
6517
|
+
* Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
|
|
6518
|
+
*/
|
|
6519
|
+
mode?: "general" | "medical" | "finance";
|
|
6520
|
+
/**
|
|
6521
|
+
* Transcribe each audio channel independently.
|
|
6522
|
+
*/
|
|
6523
|
+
multichannel?: boolean;
|
|
6524
|
+
/**
|
|
6525
|
+
* Numerals converts numbers from written format to numerical format.
|
|
6526
|
+
*/
|
|
6527
|
+
numerals?: boolean;
|
|
6528
|
+
/**
|
|
6529
|
+
* Splits audio into paragraphs to improve transcript readability.
|
|
6530
|
+
*/
|
|
6531
|
+
paragraphs?: boolean;
|
|
6532
|
+
/**
|
|
6533
|
+
* Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
|
|
6534
|
+
*/
|
|
6535
|
+
profanity_filter?: boolean;
|
|
6536
|
+
/**
|
|
6537
|
+
* Add punctuation and capitalization to the transcript.
|
|
6538
|
+
*/
|
|
6539
|
+
punctuate?: boolean;
|
|
6540
|
+
/**
|
|
6541
|
+
* Redaction removes sensitive information from your transcripts.
|
|
6542
|
+
*/
|
|
6543
|
+
redact?: string;
|
|
6544
|
+
/**
|
|
6545
|
+
* Search for terms or phrases in submitted audio and replaces them.
|
|
6546
|
+
*/
|
|
6547
|
+
replace?: string;
|
|
6548
|
+
/**
|
|
6549
|
+
* Search for terms or phrases in submitted audio.
|
|
6550
|
+
*/
|
|
6551
|
+
search?: string;
|
|
6552
|
+
/**
|
|
6553
|
+
* Recognizes the sentiment throughout a transcript or text.
|
|
6554
|
+
*/
|
|
6555
|
+
sentiment?: boolean;
|
|
6556
|
+
/**
|
|
6557
|
+
* Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
|
|
6558
|
+
*/
|
|
6559
|
+
smart_format?: boolean;
|
|
6560
|
+
/**
|
|
6561
|
+
* Detect topics throughout a transcript or text.
|
|
6562
|
+
*/
|
|
6563
|
+
topics?: boolean;
|
|
6564
|
+
/**
|
|
6565
|
+
* Segments speech into meaningful semantic units.
|
|
6566
|
+
*/
|
|
6567
|
+
utterances?: boolean;
|
|
6568
|
+
/**
|
|
6569
|
+
* Seconds to wait before detecting a pause between words in submitted audio.
|
|
6570
|
+
*/
|
|
6571
|
+
utt_split?: number;
|
|
6572
|
+
/**
|
|
6573
|
+
* The number of channels in the submitted audio
|
|
6574
|
+
*/
|
|
6575
|
+
channels?: number;
|
|
6576
|
+
/**
|
|
6577
|
+
* Specifies whether the streaming endpoint should provide ongoing transcription updates as more audio is received. When set to true, the endpoint sends continuous updates, meaning transcription results may evolve over time. Note: Supported only for webosockets.
|
|
6578
|
+
*/
|
|
6579
|
+
interim_results?: boolean;
|
|
6580
|
+
/**
|
|
6581
|
+
* Indicates how long model will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing
|
|
6582
|
+
*/
|
|
6583
|
+
endpointing?: string;
|
|
6584
|
+
/**
|
|
6585
|
+
* Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
|
|
6586
|
+
*/
|
|
6587
|
+
vad_events?: boolean;
|
|
6588
|
+
/**
|
|
6589
|
+
* Indicates how long model will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results. Note: Supported only for webosockets.
|
|
6590
|
+
*/
|
|
6591
|
+
utterance_end_ms?: boolean;
|
|
6592
|
+
}
|
|
6593
|
+
interface Ai_Cf_Deepgram_Nova_3_Output {
|
|
6594
|
+
results?: {
|
|
6595
|
+
channels?: {
|
|
6596
|
+
alternatives?: {
|
|
6597
|
+
confidence?: number;
|
|
6598
|
+
transcript?: string;
|
|
6599
|
+
words?: {
|
|
6600
|
+
confidence?: number;
|
|
6601
|
+
end?: number;
|
|
6602
|
+
start?: number;
|
|
6603
|
+
word?: string;
|
|
6604
|
+
}[];
|
|
6605
|
+
}[];
|
|
6606
|
+
}[];
|
|
6607
|
+
summary?: {
|
|
6608
|
+
result?: string;
|
|
6609
|
+
short?: string;
|
|
6610
|
+
};
|
|
6611
|
+
sentiments?: {
|
|
6612
|
+
segments?: {
|
|
6613
|
+
text?: string;
|
|
6614
|
+
start_word?: number;
|
|
6615
|
+
end_word?: number;
|
|
6616
|
+
sentiment?: string;
|
|
6617
|
+
sentiment_score?: number;
|
|
6618
|
+
}[];
|
|
6619
|
+
average?: {
|
|
6620
|
+
sentiment?: string;
|
|
6621
|
+
sentiment_score?: number;
|
|
6622
|
+
};
|
|
6623
|
+
};
|
|
6624
|
+
};
|
|
6625
|
+
}
|
|
6626
|
+
declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
|
|
6627
|
+
inputs: Ai_Cf_Deepgram_Nova_3_Input;
|
|
6628
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
|
|
6629
|
+
}
|
|
6630
|
+
type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input =
|
|
6631
|
+
| {
|
|
6632
|
+
/**
|
|
6633
|
+
* readable stream with audio data and content-type specified for that data
|
|
6634
|
+
*/
|
|
6635
|
+
audio: {
|
|
6636
|
+
body: object;
|
|
6637
|
+
contentType: string;
|
|
6638
|
+
};
|
|
6639
|
+
/**
|
|
6640
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6641
|
+
*/
|
|
6642
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6643
|
+
}
|
|
6644
|
+
| {
|
|
6645
|
+
/**
|
|
6646
|
+
* base64 encoded audio data
|
|
6647
|
+
*/
|
|
6648
|
+
audio: string;
|
|
6649
|
+
/**
|
|
6650
|
+
* type of data PCM data that's sent to the inference server as raw array
|
|
6651
|
+
*/
|
|
6652
|
+
dtype?: "uint8" | "float32" | "float64";
|
|
6653
|
+
};
|
|
6654
|
+
interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
|
|
6655
|
+
/**
|
|
6656
|
+
* if true, end-of-turn was detected
|
|
6657
|
+
*/
|
|
6658
|
+
is_complete?: boolean;
|
|
6659
|
+
/**
|
|
6660
|
+
* probability of the end-of-turn detection
|
|
6661
|
+
*/
|
|
6662
|
+
probability?: number;
|
|
6663
|
+
}
|
|
6664
|
+
declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
|
|
6665
|
+
inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
|
|
6666
|
+
postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
|
|
6667
|
+
}
|
|
6668
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Input =
|
|
6669
|
+
| GPT_OSS_120B_Responses
|
|
6670
|
+
| GPT_OSS_120B_Responses_Async;
|
|
6671
|
+
interface GPT_OSS_120B_Responses {
|
|
6672
|
+
/**
|
|
6673
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6674
|
+
*/
|
|
6675
|
+
input: string | unknown[];
|
|
6676
|
+
reasoning?: {
|
|
6677
|
+
/**
|
|
6678
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6679
|
+
*/
|
|
6680
|
+
effort?: "low" | "medium" | "high";
|
|
6681
|
+
/**
|
|
6682
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6683
|
+
*/
|
|
6684
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6685
|
+
};
|
|
6686
|
+
}
|
|
6687
|
+
interface GPT_OSS_120B_Responses_Async {
|
|
6688
|
+
requests: {
|
|
6689
|
+
/**
|
|
6690
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6691
|
+
*/
|
|
6692
|
+
input: string | unknown[];
|
|
6693
|
+
reasoning?: {
|
|
6694
|
+
/**
|
|
6695
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6696
|
+
*/
|
|
6697
|
+
effort?: "low" | "medium" | "high";
|
|
6698
|
+
/**
|
|
6699
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6700
|
+
*/
|
|
6701
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6702
|
+
};
|
|
6703
|
+
}[];
|
|
6704
|
+
}
|
|
6705
|
+
type Ai_Cf_Openai_Gpt_Oss_120B_Output = {} | (string & NonNullable<unknown>);
|
|
6706
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
|
|
6707
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_120B_Input;
|
|
6708
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_120B_Output;
|
|
6709
|
+
}
|
|
6710
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Input =
|
|
6711
|
+
| GPT_OSS_20B_Responses
|
|
6712
|
+
| GPT_OSS_20B_Responses_Async;
|
|
6713
|
+
interface GPT_OSS_20B_Responses {
|
|
6714
|
+
/**
|
|
6715
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6716
|
+
*/
|
|
6717
|
+
input: string | unknown[];
|
|
6718
|
+
reasoning?: {
|
|
6719
|
+
/**
|
|
6720
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6721
|
+
*/
|
|
6722
|
+
effort?: "low" | "medium" | "high";
|
|
6723
|
+
/**
|
|
6724
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6725
|
+
*/
|
|
6726
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6727
|
+
};
|
|
6728
|
+
}
|
|
6729
|
+
interface GPT_OSS_20B_Responses_Async {
|
|
6730
|
+
requests: {
|
|
6731
|
+
/**
|
|
6732
|
+
* Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types
|
|
6733
|
+
*/
|
|
6734
|
+
input: string | unknown[];
|
|
6735
|
+
reasoning?: {
|
|
6736
|
+
/**
|
|
6737
|
+
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
6738
|
+
*/
|
|
6739
|
+
effort?: "low" | "medium" | "high";
|
|
6740
|
+
/**
|
|
6741
|
+
* A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
|
|
6742
|
+
*/
|
|
6743
|
+
summary?: "auto" | "concise" | "detailed";
|
|
6744
|
+
};
|
|
6745
|
+
}[];
|
|
6746
|
+
}
|
|
6747
|
+
type Ai_Cf_Openai_Gpt_Oss_20B_Output = {} | (string & NonNullable<unknown>);
|
|
6748
|
+
declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
|
|
6749
|
+
inputs: Ai_Cf_Openai_Gpt_Oss_20B_Input;
|
|
6750
|
+
postProcessedOutputs: Ai_Cf_Openai_Gpt_Oss_20B_Output;
|
|
6751
|
+
}
|
|
6752
|
+
interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
|
|
6753
|
+
/**
|
|
6754
|
+
* A text description of the image you want to generate.
|
|
6755
|
+
*/
|
|
6756
|
+
prompt: string;
|
|
6757
|
+
/**
|
|
6758
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6759
|
+
*/
|
|
6760
|
+
guidance?: number;
|
|
6761
|
+
/**
|
|
6762
|
+
* Random seed for reproducibility of the image generation
|
|
6763
|
+
*/
|
|
6764
|
+
seed?: number;
|
|
6765
|
+
/**
|
|
6766
|
+
* The height of the generated image in pixels
|
|
6767
|
+
*/
|
|
6768
|
+
height?: number;
|
|
6769
|
+
/**
|
|
6770
|
+
* The width of the generated image in pixels
|
|
6771
|
+
*/
|
|
6772
|
+
width?: number;
|
|
6773
|
+
/**
|
|
6774
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6775
|
+
*/
|
|
6776
|
+
num_steps?: number;
|
|
6777
|
+
/**
|
|
6778
|
+
* Specify what to exclude from the generated images
|
|
6779
|
+
*/
|
|
6780
|
+
negative_prompt?: string;
|
|
6781
|
+
}
|
|
6782
|
+
/**
|
|
6783
|
+
* The generated image in JPEG format
|
|
6784
|
+
*/
|
|
6785
|
+
type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
|
|
6786
|
+
declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
|
|
6787
|
+
inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
|
|
6788
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
|
|
6789
|
+
}
|
|
6790
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Input {
|
|
6791
|
+
/**
|
|
6792
|
+
* A text description of the image you want to generate.
|
|
6793
|
+
*/
|
|
6794
|
+
prompt: string;
|
|
6795
|
+
/**
|
|
6796
|
+
* Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
|
|
6797
|
+
*/
|
|
6798
|
+
guidance?: number;
|
|
6799
|
+
/**
|
|
6800
|
+
* Random seed for reproducibility of the image generation
|
|
6801
|
+
*/
|
|
6802
|
+
seed?: number;
|
|
6803
|
+
/**
|
|
6804
|
+
* The height of the generated image in pixels
|
|
6805
|
+
*/
|
|
6806
|
+
height?: number;
|
|
6807
|
+
/**
|
|
6808
|
+
* The width of the generated image in pixels
|
|
6809
|
+
*/
|
|
6810
|
+
width?: number;
|
|
6811
|
+
/**
|
|
6812
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6813
|
+
*/
|
|
6814
|
+
num_steps?: number;
|
|
6815
|
+
/**
|
|
6816
|
+
* The number of diffusion steps; higher values can improve quality but take longer
|
|
6817
|
+
*/
|
|
6818
|
+
steps?: number;
|
|
6819
|
+
}
|
|
6820
|
+
interface Ai_Cf_Leonardo_Lucid_Origin_Output {
|
|
6821
|
+
/**
|
|
6822
|
+
* The generated image in Base64 format.
|
|
6823
|
+
*/
|
|
6824
|
+
image?: string;
|
|
6825
|
+
}
|
|
6826
|
+
declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
|
|
6827
|
+
inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
|
|
6828
|
+
postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
|
|
6829
|
+
}
|
|
6830
|
+
interface Ai_Cf_Deepgram_Aura_1_Input {
|
|
6831
|
+
/**
|
|
6832
|
+
* Speaker used to produce the audio.
|
|
6833
|
+
*/
|
|
6834
|
+
speaker?:
|
|
6835
|
+
| "angus"
|
|
6836
|
+
| "asteria"
|
|
6837
|
+
| "arcas"
|
|
6838
|
+
| "orion"
|
|
6839
|
+
| "orpheus"
|
|
6840
|
+
| "athena"
|
|
6841
|
+
| "luna"
|
|
6842
|
+
| "zeus"
|
|
6843
|
+
| "perseus"
|
|
6844
|
+
| "helios"
|
|
6845
|
+
| "hera"
|
|
6846
|
+
| "stella";
|
|
6847
|
+
/**
|
|
6848
|
+
* Encoding of the output audio.
|
|
6849
|
+
*/
|
|
6850
|
+
encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
|
|
6851
|
+
/**
|
|
6852
|
+
* Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
|
|
6853
|
+
*/
|
|
6854
|
+
container?: "none" | "wav" | "ogg";
|
|
6855
|
+
/**
|
|
6856
|
+
* The text content to be converted to speech
|
|
6857
|
+
*/
|
|
6858
|
+
text: string;
|
|
6859
|
+
/**
|
|
6860
|
+
* Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
|
|
6861
|
+
*/
|
|
6862
|
+
sample_rate?: number;
|
|
6863
|
+
/**
|
|
6864
|
+
* The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
|
|
6865
|
+
*/
|
|
6866
|
+
bit_rate?: number;
|
|
6867
|
+
}
|
|
6868
|
+
/**
|
|
6869
|
+
* The generated audio in MP3 format
|
|
6870
|
+
*/
|
|
6871
|
+
type Ai_Cf_Deepgram_Aura_1_Output = string;
|
|
6872
|
+
declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
|
|
6873
|
+
inputs: Ai_Cf_Deepgram_Aura_1_Input;
|
|
6874
|
+
postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
|
|
6875
|
+
}
|
|
6876
|
+
interface AiModels {
|
|
6877
|
+
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
6878
|
+
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
6879
|
+
"@cf/runwayml/stable-diffusion-v1-5-inpainting": BaseAiTextToImage;
|
|
6880
|
+
"@cf/runwayml/stable-diffusion-v1-5-img2img": BaseAiTextToImage;
|
|
6881
|
+
"@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
|
|
6882
|
+
"@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
|
|
6883
|
+
"@cf/myshell-ai/melotts": BaseAiTextToSpeech;
|
|
6884
|
+
"@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
|
|
6885
|
+
"@cf/microsoft/resnet-50": BaseAiImageClassification;
|
|
6886
|
+
"@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
|
|
6887
|
+
"@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
|
|
6888
|
+
"@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
|
|
6889
|
+
"@hf/thebloke/llama-2-13b-chat-awq": BaseAiTextGeneration;
|
|
6890
|
+
"@hf/thebloke/mistral-7b-instruct-v0.1-awq": BaseAiTextGeneration;
|
|
6891
|
+
"@hf/thebloke/zephyr-7b-beta-awq": BaseAiTextGeneration;
|
|
6892
|
+
"@hf/thebloke/openhermes-2.5-mistral-7b-awq": BaseAiTextGeneration;
|
|
6893
|
+
"@hf/thebloke/neural-chat-7b-v3-1-awq": BaseAiTextGeneration;
|
|
6894
|
+
"@hf/thebloke/llamaguard-7b-awq": BaseAiTextGeneration;
|
|
6895
|
+
"@hf/thebloke/deepseek-coder-6.7b-base-awq": BaseAiTextGeneration;
|
|
6896
|
+
"@hf/thebloke/deepseek-coder-6.7b-instruct-awq": BaseAiTextGeneration;
|
|
6897
|
+
"@cf/deepseek-ai/deepseek-math-7b-instruct": BaseAiTextGeneration;
|
|
6898
|
+
"@cf/defog/sqlcoder-7b-2": BaseAiTextGeneration;
|
|
6899
|
+
"@cf/openchat/openchat-3.5-0106": BaseAiTextGeneration;
|
|
6900
|
+
"@cf/tiiuae/falcon-7b-instruct": BaseAiTextGeneration;
|
|
6901
|
+
"@cf/thebloke/discolm-german-7b-v1-awq": BaseAiTextGeneration;
|
|
6902
|
+
"@cf/qwen/qwen1.5-0.5b-chat": BaseAiTextGeneration;
|
|
6903
|
+
"@cf/qwen/qwen1.5-7b-chat-awq": BaseAiTextGeneration;
|
|
6904
|
+
"@cf/qwen/qwen1.5-14b-chat-awq": BaseAiTextGeneration;
|
|
6905
|
+
"@cf/tinyllama/tinyllama-1.1b-chat-v1.0": BaseAiTextGeneration;
|
|
6906
|
+
"@cf/microsoft/phi-2": BaseAiTextGeneration;
|
|
6907
|
+
"@cf/qwen/qwen1.5-1.8b-chat": BaseAiTextGeneration;
|
|
6908
|
+
"@cf/mistral/mistral-7b-instruct-v0.2-lora": BaseAiTextGeneration;
|
|
6909
|
+
"@hf/nousresearch/hermes-2-pro-mistral-7b": BaseAiTextGeneration;
|
|
6910
|
+
"@hf/nexusflow/starling-lm-7b-beta": BaseAiTextGeneration;
|
|
6911
|
+
"@hf/google/gemma-7b-it": BaseAiTextGeneration;
|
|
6912
|
+
"@cf/meta-llama/llama-2-7b-chat-hf-lora": BaseAiTextGeneration;
|
|
6913
|
+
"@cf/google/gemma-2b-it-lora": BaseAiTextGeneration;
|
|
6914
|
+
"@cf/google/gemma-7b-it-lora": BaseAiTextGeneration;
|
|
6915
|
+
"@hf/mistral/mistral-7b-instruct-v0.2": BaseAiTextGeneration;
|
|
6916
|
+
"@cf/meta/llama-3-8b-instruct": BaseAiTextGeneration;
|
|
6917
|
+
"@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
|
|
6918
|
+
"@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
|
|
6919
|
+
"@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
|
|
6920
|
+
"@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
|
|
6921
|
+
"@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
|
|
6922
|
+
"@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
|
|
6923
|
+
"@cf/meta/llama-3.2-1b-instruct": BaseAiTextGeneration;
|
|
6924
|
+
"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": BaseAiTextGeneration;
|
|
6925
|
+
"@cf/facebook/bart-large-cnn": BaseAiSummarization;
|
|
6926
|
+
"@cf/llava-hf/llava-1.5-7b-hf": BaseAiImageToText;
|
|
6927
|
+
"@cf/baai/bge-base-en-v1.5": Base_Ai_Cf_Baai_Bge_Base_En_V1_5;
|
|
6928
|
+
"@cf/openai/whisper": Base_Ai_Cf_Openai_Whisper;
|
|
6929
|
+
"@cf/meta/m2m100-1.2b": Base_Ai_Cf_Meta_M2M100_1_2B;
|
|
6930
|
+
"@cf/baai/bge-small-en-v1.5": Base_Ai_Cf_Baai_Bge_Small_En_V1_5;
|
|
6931
|
+
"@cf/baai/bge-large-en-v1.5": Base_Ai_Cf_Baai_Bge_Large_En_V1_5;
|
|
6932
|
+
"@cf/unum/uform-gen2-qwen-500m": Base_Ai_Cf_Unum_Uform_Gen2_Qwen_500M;
|
|
6933
|
+
"@cf/openai/whisper-tiny-en": Base_Ai_Cf_Openai_Whisper_Tiny_En;
|
|
6934
|
+
"@cf/openai/whisper-large-v3-turbo": Base_Ai_Cf_Openai_Whisper_Large_V3_Turbo;
|
|
6935
|
+
"@cf/baai/bge-m3": Base_Ai_Cf_Baai_Bge_M3;
|
|
6936
|
+
"@cf/black-forest-labs/flux-1-schnell": Base_Ai_Cf_Black_Forest_Labs_Flux_1_Schnell;
|
|
6937
|
+
"@cf/meta/llama-3.2-11b-vision-instruct": Base_Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct;
|
|
6938
|
+
"@cf/meta/llama-3.3-70b-instruct-fp8-fast": Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast;
|
|
6939
|
+
"@cf/meta/llama-guard-3-8b": Base_Ai_Cf_Meta_Llama_Guard_3_8B;
|
|
6940
|
+
"@cf/baai/bge-reranker-base": Base_Ai_Cf_Baai_Bge_Reranker_Base;
|
|
6400
6941
|
"@cf/qwen/qwen2.5-coder-32b-instruct": Base_Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct;
|
|
6401
6942
|
"@cf/qwen/qwq-32b": Base_Ai_Cf_Qwen_Qwq_32B;
|
|
6402
6943
|
"@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
|
|
6403
6944
|
"@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
|
|
6404
6945
|
"@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
|
|
6946
|
+
"@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
|
|
6947
|
+
"@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
|
|
6948
|
+
"@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
|
|
6949
|
+
"@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
|
|
6950
|
+
"@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
|
|
6951
|
+
"@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
|
|
6952
|
+
"@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
|
|
6405
6953
|
}
|
|
6406
6954
|
type AiOptions = {
|
|
6407
6955
|
/**
|
|
@@ -6409,6 +6957,10 @@ type AiOptions = {
|
|
|
6409
6957
|
* https://developers.cloudflare.com/workers-ai/features/batch-api
|
|
6410
6958
|
*/
|
|
6411
6959
|
queueRequest?: boolean;
|
|
6960
|
+
/**
|
|
6961
|
+
* Establish websocket connections, only works for supported models
|
|
6962
|
+
*/
|
|
6963
|
+
websocket?: boolean;
|
|
6412
6964
|
gateway?: GatewayOptions;
|
|
6413
6965
|
returnRawResponse?: boolean;
|
|
6414
6966
|
prefix?: string;
|
|
@@ -6452,7 +7004,7 @@ type AiModelListType = Record<string, any>;
|
|
|
6452
7004
|
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
6453
7005
|
aiGatewayLogId: string | null;
|
|
6454
7006
|
gateway(gatewayId: string): AiGateway;
|
|
6455
|
-
autorag(autoragId
|
|
7007
|
+
autorag(autoragId: string): AutoRAG;
|
|
6456
7008
|
run<
|
|
6457
7009
|
Name extends keyof AiModelList,
|
|
6458
7010
|
Options extends AiOptions,
|
|
@@ -6462,9 +7014,13 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
|
|
|
6462
7014
|
inputs: InputOptions,
|
|
6463
7015
|
options?: Options,
|
|
6464
7016
|
): Promise<
|
|
6465
|
-
Options extends
|
|
6466
|
-
|
|
6467
|
-
|
|
7017
|
+
Options extends
|
|
7018
|
+
| {
|
|
7019
|
+
returnRawResponse: true;
|
|
7020
|
+
}
|
|
7021
|
+
| {
|
|
7022
|
+
websocket: true;
|
|
7023
|
+
}
|
|
6468
7024
|
? Response
|
|
6469
7025
|
: InputOptions extends {
|
|
6470
7026
|
stream: true;
|