@workers-community/workers-types 4.20250406.0 → 4.20250408.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/index.d.ts +277 -0
- package/index.ts +277 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3874,6 +3874,282 @@ declare abstract class Base_Ai_Cf_Baai_Bge_Reranker_Base {
|
|
|
3874
3874
|
inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input;
|
|
3875
3875
|
postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output;
|
|
3876
3876
|
}
|
|
3877
|
+
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
|
|
3878
|
+
| Ai_Cf_Meta_Llama_4_Prompt
|
|
3879
|
+
| Ai_Cf_Meta_Llama_4_Messages;
|
|
3880
|
+
interface Ai_Cf_Meta_Llama_4_Prompt {
|
|
3881
|
+
/**
|
|
3882
|
+
* The input text prompt for the model to generate a response.
|
|
3883
|
+
*/
|
|
3884
|
+
prompt: string;
|
|
3885
|
+
/**
|
|
3886
|
+
* JSON schema that should be fulfilled for the response.
|
|
3887
|
+
*/
|
|
3888
|
+
guided_json?: object;
|
|
3889
|
+
/**
|
|
3890
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
3891
|
+
*/
|
|
3892
|
+
raw?: boolean;
|
|
3893
|
+
/**
|
|
3894
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
3895
|
+
*/
|
|
3896
|
+
stream?: boolean;
|
|
3897
|
+
/**
|
|
3898
|
+
* The maximum number of tokens to generate in the response.
|
|
3899
|
+
*/
|
|
3900
|
+
max_tokens?: number;
|
|
3901
|
+
/**
|
|
3902
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
3903
|
+
*/
|
|
3904
|
+
temperature?: number;
|
|
3905
|
+
/**
|
|
3906
|
+
* 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.
|
|
3907
|
+
*/
|
|
3908
|
+
top_p?: number;
|
|
3909
|
+
/**
|
|
3910
|
+
* 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.
|
|
3911
|
+
*/
|
|
3912
|
+
top_k?: number;
|
|
3913
|
+
/**
|
|
3914
|
+
* Random seed for reproducibility of the generation.
|
|
3915
|
+
*/
|
|
3916
|
+
seed?: number;
|
|
3917
|
+
/**
|
|
3918
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
3919
|
+
*/
|
|
3920
|
+
repetition_penalty?: number;
|
|
3921
|
+
/**
|
|
3922
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
3923
|
+
*/
|
|
3924
|
+
frequency_penalty?: number;
|
|
3925
|
+
/**
|
|
3926
|
+
* Increases the likelihood of the model introducing new topics.
|
|
3927
|
+
*/
|
|
3928
|
+
presence_penalty?: number;
|
|
3929
|
+
}
|
|
3930
|
+
interface Ai_Cf_Meta_Llama_4_Messages {
|
|
3931
|
+
/**
|
|
3932
|
+
* An array of message objects representing the conversation history.
|
|
3933
|
+
*/
|
|
3934
|
+
messages: {
|
|
3935
|
+
/**
|
|
3936
|
+
* The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
|
|
3937
|
+
*/
|
|
3938
|
+
role?: string;
|
|
3939
|
+
/**
|
|
3940
|
+
* The tool call id. Must be supplied for tool calls for Mistral-3. If you don't know what to put here you can fall back to 000000001
|
|
3941
|
+
*/
|
|
3942
|
+
tool_call_id?: string;
|
|
3943
|
+
content?:
|
|
3944
|
+
| string
|
|
3945
|
+
| {
|
|
3946
|
+
/**
|
|
3947
|
+
* Type of the content provided
|
|
3948
|
+
*/
|
|
3949
|
+
type?: string;
|
|
3950
|
+
text?: string;
|
|
3951
|
+
image_url?: {
|
|
3952
|
+
/**
|
|
3953
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
3954
|
+
*/
|
|
3955
|
+
url?: string;
|
|
3956
|
+
};
|
|
3957
|
+
}[]
|
|
3958
|
+
| {
|
|
3959
|
+
/**
|
|
3960
|
+
* Type of the content provided
|
|
3961
|
+
*/
|
|
3962
|
+
type?: string;
|
|
3963
|
+
text?: string;
|
|
3964
|
+
image_url?: {
|
|
3965
|
+
/**
|
|
3966
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
3967
|
+
*/
|
|
3968
|
+
url?: string;
|
|
3969
|
+
};
|
|
3970
|
+
};
|
|
3971
|
+
}[];
|
|
3972
|
+
functions?: {
|
|
3973
|
+
name: string;
|
|
3974
|
+
code: string;
|
|
3975
|
+
}[];
|
|
3976
|
+
/**
|
|
3977
|
+
* A list of tools available for the assistant to use.
|
|
3978
|
+
*/
|
|
3979
|
+
tools?: (
|
|
3980
|
+
| {
|
|
3981
|
+
/**
|
|
3982
|
+
* The name of the tool. More descriptive the better.
|
|
3983
|
+
*/
|
|
3984
|
+
name: string;
|
|
3985
|
+
/**
|
|
3986
|
+
* A brief description of what the tool does.
|
|
3987
|
+
*/
|
|
3988
|
+
description: string;
|
|
3989
|
+
/**
|
|
3990
|
+
* Schema defining the parameters accepted by the tool.
|
|
3991
|
+
*/
|
|
3992
|
+
parameters: {
|
|
3993
|
+
/**
|
|
3994
|
+
* The type of the parameters object (usually 'object').
|
|
3995
|
+
*/
|
|
3996
|
+
type: string;
|
|
3997
|
+
/**
|
|
3998
|
+
* List of required parameter names.
|
|
3999
|
+
*/
|
|
4000
|
+
required?: string[];
|
|
4001
|
+
/**
|
|
4002
|
+
* Definitions of each parameter.
|
|
4003
|
+
*/
|
|
4004
|
+
properties: {
|
|
4005
|
+
[k: string]: {
|
|
4006
|
+
/**
|
|
4007
|
+
* The data type of the parameter.
|
|
4008
|
+
*/
|
|
4009
|
+
type: string;
|
|
4010
|
+
/**
|
|
4011
|
+
* A description of the expected parameter.
|
|
4012
|
+
*/
|
|
4013
|
+
description: string;
|
|
4014
|
+
};
|
|
4015
|
+
};
|
|
4016
|
+
};
|
|
4017
|
+
}
|
|
4018
|
+
| {
|
|
4019
|
+
/**
|
|
4020
|
+
* Specifies the type of tool (e.g., 'function').
|
|
4021
|
+
*/
|
|
4022
|
+
type: string;
|
|
4023
|
+
/**
|
|
4024
|
+
* Details of the function tool.
|
|
4025
|
+
*/
|
|
4026
|
+
function: {
|
|
4027
|
+
/**
|
|
4028
|
+
* The name of the function.
|
|
4029
|
+
*/
|
|
4030
|
+
name: string;
|
|
4031
|
+
/**
|
|
4032
|
+
* A brief description of what the function does.
|
|
4033
|
+
*/
|
|
4034
|
+
description: string;
|
|
4035
|
+
/**
|
|
4036
|
+
* Schema defining the parameters accepted by the function.
|
|
4037
|
+
*/
|
|
4038
|
+
parameters: {
|
|
4039
|
+
/**
|
|
4040
|
+
* The type of the parameters object (usually 'object').
|
|
4041
|
+
*/
|
|
4042
|
+
type: string;
|
|
4043
|
+
/**
|
|
4044
|
+
* List of required parameter names.
|
|
4045
|
+
*/
|
|
4046
|
+
required?: string[];
|
|
4047
|
+
/**
|
|
4048
|
+
* Definitions of each parameter.
|
|
4049
|
+
*/
|
|
4050
|
+
properties: {
|
|
4051
|
+
[k: string]: {
|
|
4052
|
+
/**
|
|
4053
|
+
* The data type of the parameter.
|
|
4054
|
+
*/
|
|
4055
|
+
type: string;
|
|
4056
|
+
/**
|
|
4057
|
+
* A description of the expected parameter.
|
|
4058
|
+
*/
|
|
4059
|
+
description: string;
|
|
4060
|
+
};
|
|
4061
|
+
};
|
|
4062
|
+
};
|
|
4063
|
+
};
|
|
4064
|
+
}
|
|
4065
|
+
)[];
|
|
4066
|
+
/**
|
|
4067
|
+
* JSON schema that should be fufilled for the response.
|
|
4068
|
+
*/
|
|
4069
|
+
guided_json?: object;
|
|
4070
|
+
/**
|
|
4071
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
4072
|
+
*/
|
|
4073
|
+
raw?: boolean;
|
|
4074
|
+
/**
|
|
4075
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
4076
|
+
*/
|
|
4077
|
+
stream?: boolean;
|
|
4078
|
+
/**
|
|
4079
|
+
* The maximum number of tokens to generate in the response.
|
|
4080
|
+
*/
|
|
4081
|
+
max_tokens?: number;
|
|
4082
|
+
/**
|
|
4083
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
4084
|
+
*/
|
|
4085
|
+
temperature?: number;
|
|
4086
|
+
/**
|
|
4087
|
+
* 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.
|
|
4088
|
+
*/
|
|
4089
|
+
top_p?: number;
|
|
4090
|
+
/**
|
|
4091
|
+
* 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.
|
|
4092
|
+
*/
|
|
4093
|
+
top_k?: number;
|
|
4094
|
+
/**
|
|
4095
|
+
* Random seed for reproducibility of the generation.
|
|
4096
|
+
*/
|
|
4097
|
+
seed?: number;
|
|
4098
|
+
/**
|
|
4099
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
4100
|
+
*/
|
|
4101
|
+
repetition_penalty?: number;
|
|
4102
|
+
/**
|
|
4103
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
4104
|
+
*/
|
|
4105
|
+
frequency_penalty?: number;
|
|
4106
|
+
/**
|
|
4107
|
+
* Increases the likelihood of the model introducing new topics.
|
|
4108
|
+
*/
|
|
4109
|
+
presence_penalty?: number;
|
|
4110
|
+
}
|
|
4111
|
+
type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output =
|
|
4112
|
+
| {
|
|
4113
|
+
/**
|
|
4114
|
+
* The generated text response from the model
|
|
4115
|
+
*/
|
|
4116
|
+
response: string;
|
|
4117
|
+
/**
|
|
4118
|
+
* Usage statistics for the inference request
|
|
4119
|
+
*/
|
|
4120
|
+
usage?: {
|
|
4121
|
+
/**
|
|
4122
|
+
* Total number of tokens in input
|
|
4123
|
+
*/
|
|
4124
|
+
prompt_tokens?: number;
|
|
4125
|
+
/**
|
|
4126
|
+
* Total number of tokens in output
|
|
4127
|
+
*/
|
|
4128
|
+
completion_tokens?: number;
|
|
4129
|
+
/**
|
|
4130
|
+
* Total number of input and output tokens
|
|
4131
|
+
*/
|
|
4132
|
+
total_tokens?: number;
|
|
4133
|
+
};
|
|
4134
|
+
/**
|
|
4135
|
+
* An array of tool calls requests made during the response generation
|
|
4136
|
+
*/
|
|
4137
|
+
tool_calls?: {
|
|
4138
|
+
/**
|
|
4139
|
+
* The arguments passed to be passed to the tool call request
|
|
4140
|
+
*/
|
|
4141
|
+
arguments?: object;
|
|
4142
|
+
/**
|
|
4143
|
+
* The name of the tool to be called
|
|
4144
|
+
*/
|
|
4145
|
+
name?: string;
|
|
4146
|
+
}[];
|
|
4147
|
+
}
|
|
4148
|
+
| string;
|
|
4149
|
+
declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
|
|
4150
|
+
inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
|
|
4151
|
+
postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
|
|
4152
|
+
}
|
|
3877
4153
|
interface AiModels {
|
|
3878
4154
|
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
3879
4155
|
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
@@ -3940,6 +4216,7 @@ interface AiModels {
|
|
|
3940
4216
|
"@cf/meta/llama-3.2-11b-vision-instruct": Base_Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct;
|
|
3941
4217
|
"@cf/meta/llama-guard-3-8b": Base_Ai_Cf_Meta_Llama_Guard_3_8B;
|
|
3942
4218
|
"@cf/baai/bge-reranker-base": Base_Ai_Cf_Baai_Bge_Reranker_Base;
|
|
4219
|
+
"@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
|
|
3943
4220
|
}
|
|
3944
4221
|
type AiOptions = {
|
|
3945
4222
|
gateway?: GatewayOptions;
|
package/index.ts
CHANGED
|
@@ -3888,6 +3888,282 @@ export declare abstract class Base_Ai_Cf_Baai_Bge_Reranker_Base {
|
|
|
3888
3888
|
inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input;
|
|
3889
3889
|
postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output;
|
|
3890
3890
|
}
|
|
3891
|
+
export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input =
|
|
3892
|
+
| Ai_Cf_Meta_Llama_4_Prompt
|
|
3893
|
+
| Ai_Cf_Meta_Llama_4_Messages;
|
|
3894
|
+
export interface Ai_Cf_Meta_Llama_4_Prompt {
|
|
3895
|
+
/**
|
|
3896
|
+
* The input text prompt for the model to generate a response.
|
|
3897
|
+
*/
|
|
3898
|
+
prompt: string;
|
|
3899
|
+
/**
|
|
3900
|
+
* JSON schema that should be fulfilled for the response.
|
|
3901
|
+
*/
|
|
3902
|
+
guided_json?: object;
|
|
3903
|
+
/**
|
|
3904
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
3905
|
+
*/
|
|
3906
|
+
raw?: boolean;
|
|
3907
|
+
/**
|
|
3908
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
3909
|
+
*/
|
|
3910
|
+
stream?: boolean;
|
|
3911
|
+
/**
|
|
3912
|
+
* The maximum number of tokens to generate in the response.
|
|
3913
|
+
*/
|
|
3914
|
+
max_tokens?: number;
|
|
3915
|
+
/**
|
|
3916
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
3917
|
+
*/
|
|
3918
|
+
temperature?: number;
|
|
3919
|
+
/**
|
|
3920
|
+
* 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.
|
|
3921
|
+
*/
|
|
3922
|
+
top_p?: number;
|
|
3923
|
+
/**
|
|
3924
|
+
* 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.
|
|
3925
|
+
*/
|
|
3926
|
+
top_k?: number;
|
|
3927
|
+
/**
|
|
3928
|
+
* Random seed for reproducibility of the generation.
|
|
3929
|
+
*/
|
|
3930
|
+
seed?: number;
|
|
3931
|
+
/**
|
|
3932
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
3933
|
+
*/
|
|
3934
|
+
repetition_penalty?: number;
|
|
3935
|
+
/**
|
|
3936
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
3937
|
+
*/
|
|
3938
|
+
frequency_penalty?: number;
|
|
3939
|
+
/**
|
|
3940
|
+
* Increases the likelihood of the model introducing new topics.
|
|
3941
|
+
*/
|
|
3942
|
+
presence_penalty?: number;
|
|
3943
|
+
}
|
|
3944
|
+
export interface Ai_Cf_Meta_Llama_4_Messages {
|
|
3945
|
+
/**
|
|
3946
|
+
* An array of message objects representing the conversation history.
|
|
3947
|
+
*/
|
|
3948
|
+
messages: {
|
|
3949
|
+
/**
|
|
3950
|
+
* The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
|
|
3951
|
+
*/
|
|
3952
|
+
role?: string;
|
|
3953
|
+
/**
|
|
3954
|
+
* The tool call id. Must be supplied for tool calls for Mistral-3. If you don't know what to put here you can fall back to 000000001
|
|
3955
|
+
*/
|
|
3956
|
+
tool_call_id?: string;
|
|
3957
|
+
content?:
|
|
3958
|
+
| string
|
|
3959
|
+
| {
|
|
3960
|
+
/**
|
|
3961
|
+
* Type of the content provided
|
|
3962
|
+
*/
|
|
3963
|
+
type?: string;
|
|
3964
|
+
text?: string;
|
|
3965
|
+
image_url?: {
|
|
3966
|
+
/**
|
|
3967
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
3968
|
+
*/
|
|
3969
|
+
url?: string;
|
|
3970
|
+
};
|
|
3971
|
+
}[]
|
|
3972
|
+
| {
|
|
3973
|
+
/**
|
|
3974
|
+
* Type of the content provided
|
|
3975
|
+
*/
|
|
3976
|
+
type?: string;
|
|
3977
|
+
text?: string;
|
|
3978
|
+
image_url?: {
|
|
3979
|
+
/**
|
|
3980
|
+
* image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
|
|
3981
|
+
*/
|
|
3982
|
+
url?: string;
|
|
3983
|
+
};
|
|
3984
|
+
};
|
|
3985
|
+
}[];
|
|
3986
|
+
functions?: {
|
|
3987
|
+
name: string;
|
|
3988
|
+
code: string;
|
|
3989
|
+
}[];
|
|
3990
|
+
/**
|
|
3991
|
+
* A list of tools available for the assistant to use.
|
|
3992
|
+
*/
|
|
3993
|
+
tools?: (
|
|
3994
|
+
| {
|
|
3995
|
+
/**
|
|
3996
|
+
* The name of the tool. More descriptive the better.
|
|
3997
|
+
*/
|
|
3998
|
+
name: string;
|
|
3999
|
+
/**
|
|
4000
|
+
* A brief description of what the tool does.
|
|
4001
|
+
*/
|
|
4002
|
+
description: string;
|
|
4003
|
+
/**
|
|
4004
|
+
* Schema defining the parameters accepted by the tool.
|
|
4005
|
+
*/
|
|
4006
|
+
parameters: {
|
|
4007
|
+
/**
|
|
4008
|
+
* The type of the parameters object (usually 'object').
|
|
4009
|
+
*/
|
|
4010
|
+
type: string;
|
|
4011
|
+
/**
|
|
4012
|
+
* List of required parameter names.
|
|
4013
|
+
*/
|
|
4014
|
+
required?: string[];
|
|
4015
|
+
/**
|
|
4016
|
+
* Definitions of each parameter.
|
|
4017
|
+
*/
|
|
4018
|
+
properties: {
|
|
4019
|
+
[k: string]: {
|
|
4020
|
+
/**
|
|
4021
|
+
* The data type of the parameter.
|
|
4022
|
+
*/
|
|
4023
|
+
type: string;
|
|
4024
|
+
/**
|
|
4025
|
+
* A description of the expected parameter.
|
|
4026
|
+
*/
|
|
4027
|
+
description: string;
|
|
4028
|
+
};
|
|
4029
|
+
};
|
|
4030
|
+
};
|
|
4031
|
+
}
|
|
4032
|
+
| {
|
|
4033
|
+
/**
|
|
4034
|
+
* Specifies the type of tool (e.g., 'function').
|
|
4035
|
+
*/
|
|
4036
|
+
type: string;
|
|
4037
|
+
/**
|
|
4038
|
+
* Details of the function tool.
|
|
4039
|
+
*/
|
|
4040
|
+
function: {
|
|
4041
|
+
/**
|
|
4042
|
+
* The name of the function.
|
|
4043
|
+
*/
|
|
4044
|
+
name: string;
|
|
4045
|
+
/**
|
|
4046
|
+
* A brief description of what the function does.
|
|
4047
|
+
*/
|
|
4048
|
+
description: string;
|
|
4049
|
+
/**
|
|
4050
|
+
* Schema defining the parameters accepted by the function.
|
|
4051
|
+
*/
|
|
4052
|
+
parameters: {
|
|
4053
|
+
/**
|
|
4054
|
+
* The type of the parameters object (usually 'object').
|
|
4055
|
+
*/
|
|
4056
|
+
type: string;
|
|
4057
|
+
/**
|
|
4058
|
+
* List of required parameter names.
|
|
4059
|
+
*/
|
|
4060
|
+
required?: string[];
|
|
4061
|
+
/**
|
|
4062
|
+
* Definitions of each parameter.
|
|
4063
|
+
*/
|
|
4064
|
+
properties: {
|
|
4065
|
+
[k: string]: {
|
|
4066
|
+
/**
|
|
4067
|
+
* The data type of the parameter.
|
|
4068
|
+
*/
|
|
4069
|
+
type: string;
|
|
4070
|
+
/**
|
|
4071
|
+
* A description of the expected parameter.
|
|
4072
|
+
*/
|
|
4073
|
+
description: string;
|
|
4074
|
+
};
|
|
4075
|
+
};
|
|
4076
|
+
};
|
|
4077
|
+
};
|
|
4078
|
+
}
|
|
4079
|
+
)[];
|
|
4080
|
+
/**
|
|
4081
|
+
* JSON schema that should be fufilled for the response.
|
|
4082
|
+
*/
|
|
4083
|
+
guided_json?: object;
|
|
4084
|
+
/**
|
|
4085
|
+
* If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
|
|
4086
|
+
*/
|
|
4087
|
+
raw?: boolean;
|
|
4088
|
+
/**
|
|
4089
|
+
* If true, the response will be streamed back incrementally using SSE, Server Sent Events.
|
|
4090
|
+
*/
|
|
4091
|
+
stream?: boolean;
|
|
4092
|
+
/**
|
|
4093
|
+
* The maximum number of tokens to generate in the response.
|
|
4094
|
+
*/
|
|
4095
|
+
max_tokens?: number;
|
|
4096
|
+
/**
|
|
4097
|
+
* Controls the randomness of the output; higher values produce more random results.
|
|
4098
|
+
*/
|
|
4099
|
+
temperature?: number;
|
|
4100
|
+
/**
|
|
4101
|
+
* 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.
|
|
4102
|
+
*/
|
|
4103
|
+
top_p?: number;
|
|
4104
|
+
/**
|
|
4105
|
+
* 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.
|
|
4106
|
+
*/
|
|
4107
|
+
top_k?: number;
|
|
4108
|
+
/**
|
|
4109
|
+
* Random seed for reproducibility of the generation.
|
|
4110
|
+
*/
|
|
4111
|
+
seed?: number;
|
|
4112
|
+
/**
|
|
4113
|
+
* Penalty for repeated tokens; higher values discourage repetition.
|
|
4114
|
+
*/
|
|
4115
|
+
repetition_penalty?: number;
|
|
4116
|
+
/**
|
|
4117
|
+
* Decreases the likelihood of the model repeating the same lines verbatim.
|
|
4118
|
+
*/
|
|
4119
|
+
frequency_penalty?: number;
|
|
4120
|
+
/**
|
|
4121
|
+
* Increases the likelihood of the model introducing new topics.
|
|
4122
|
+
*/
|
|
4123
|
+
presence_penalty?: number;
|
|
4124
|
+
}
|
|
4125
|
+
export type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output =
|
|
4126
|
+
| {
|
|
4127
|
+
/**
|
|
4128
|
+
* The generated text response from the model
|
|
4129
|
+
*/
|
|
4130
|
+
response: string;
|
|
4131
|
+
/**
|
|
4132
|
+
* Usage statistics for the inference request
|
|
4133
|
+
*/
|
|
4134
|
+
usage?: {
|
|
4135
|
+
/**
|
|
4136
|
+
* Total number of tokens in input
|
|
4137
|
+
*/
|
|
4138
|
+
prompt_tokens?: number;
|
|
4139
|
+
/**
|
|
4140
|
+
* Total number of tokens in output
|
|
4141
|
+
*/
|
|
4142
|
+
completion_tokens?: number;
|
|
4143
|
+
/**
|
|
4144
|
+
* Total number of input and output tokens
|
|
4145
|
+
*/
|
|
4146
|
+
total_tokens?: number;
|
|
4147
|
+
};
|
|
4148
|
+
/**
|
|
4149
|
+
* An array of tool calls requests made during the response generation
|
|
4150
|
+
*/
|
|
4151
|
+
tool_calls?: {
|
|
4152
|
+
/**
|
|
4153
|
+
* The arguments passed to be passed to the tool call request
|
|
4154
|
+
*/
|
|
4155
|
+
arguments?: object;
|
|
4156
|
+
/**
|
|
4157
|
+
* The name of the tool to be called
|
|
4158
|
+
*/
|
|
4159
|
+
name?: string;
|
|
4160
|
+
}[];
|
|
4161
|
+
}
|
|
4162
|
+
| string;
|
|
4163
|
+
export declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct {
|
|
4164
|
+
inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
|
|
4165
|
+
postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
|
|
4166
|
+
}
|
|
3891
4167
|
export interface AiModels {
|
|
3892
4168
|
"@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
|
|
3893
4169
|
"@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
|
|
@@ -3954,6 +4230,7 @@ export interface AiModels {
|
|
|
3954
4230
|
"@cf/meta/llama-3.2-11b-vision-instruct": Base_Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct;
|
|
3955
4231
|
"@cf/meta/llama-guard-3-8b": Base_Ai_Cf_Meta_Llama_Guard_3_8B;
|
|
3956
4232
|
"@cf/baai/bge-reranker-base": Base_Ai_Cf_Baai_Bge_Reranker_Base;
|
|
4233
|
+
"@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
|
|
3957
4234
|
}
|
|
3958
4235
|
export type AiOptions = {
|
|
3959
4236
|
gateway?: GatewayOptions;
|