Prompt
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3793
Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
optional
frequency_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3834
Decreases the likelihood of the model repeating the same lines verbatim.
image?
Section titled “image?”
optional
image:number
[] |string
&object
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3798
optional
lora:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3842
Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
max_tokens?
Section titled “max_tokens?”
optional
max_tokens:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3810
The maximum number of tokens to generate in the response.
presence_penalty?
Section titled “presence_penalty?”
optional
presence_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3838
Increases the likelihood of the model introducing new topics.
prompt
Section titled “prompt”prompt:
string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3797
The input text prompt for the model to generate a response.
optional
raw:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3802
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?”
optional
repetition_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3830
Penalty for repeated tokens; higher values discourage repetition.
optional
seed:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3826
Random seed for reproducibility of the generation.
stream?
Section titled “stream?”
optional
stream:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3806
If true, the response will be streamed back incrementally using SSE, Server Sent Events.
temperature?
Section titled “temperature?”
optional
temperature:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3814
Controls the randomness of the output; higher values produce more random results.
top_k?
Section titled “top_k?”
optional
top_k:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3822
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?”
optional
top_p:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3818
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.