Prompt
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4517
Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
optionalfrequency_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4558
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4522
optionallora:string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4566
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4534
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4562
Increases the likelihood of the model introducing new topics.
prompt
Section titled “prompt”prompt:
string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4521
The input text prompt for the model to generate a response.
optionalraw:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4526
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4554
Penalty for repeated tokens; higher values discourage repetition.
optionalseed:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4550
Random seed for reproducibility of the generation.
stream?
Section titled “stream?”
optionalstream:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4530
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4538
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4546
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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4542
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.