Prompt
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3899
Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
optionalfrequency_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3940
Decreases the likelihood of the model repeating the same lines verbatim.
image?
Section titled “image?”
optionalimage:number[] |string&object
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3904
optionallora:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3948
Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
max_tokens?
Section titled “max_tokens?”
optionalmax_tokens:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3916
The maximum number of tokens to generate in the response.
presence_penalty?
Section titled “presence_penalty?”
optionalpresence_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3944
Increases the likelihood of the model introducing new topics.
prompt
Section titled “prompt”prompt:
string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3903
The input text prompt for the model to generate a response.
optionalraw:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3908
If true, a chat template is not applied and you must adhere to the specific model’s expected formatting.
repetition_penalty?
Section titled “repetition_penalty?”
optionalrepetition_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3936
Penalty for repeated tokens; higher values discourage repetition.
optionalseed:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3932
Random seed for reproducibility of the generation.
stream?
Section titled “stream?”
optionalstream:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3912
If true, the response will be streamed back incrementally using SSE, Server Sent Events.
temperature?
Section titled “temperature?”
optionaltemperature:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3920
Controls the randomness of the output; higher values produce more random results.
top_k?
Section titled “top_k?”
optionaltop_k:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3928
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.
top_p?
Section titled “top_p?”
optionaltop_p:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3924
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.