Skip to content

Prompt

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3793

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.


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.


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.


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: 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.


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.


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.


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.


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.


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.