Skip to content

Messages

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

optional frequency_penalty: number

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

Decreases the likelihood of the model repeating the same lines verbatim.


optional functions: object[]

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

code: string

name: string


optional image: number[] | string & object

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


optional max_tokens: number

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

The maximum number of tokens to generate in the response.


messages: object[]

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

An array of message objects representing the conversation history.

optional content: string | { image_url?: { url?: string; }; text?: string; type?: string; } | object[]

string

{ image_url?: { url?: string; }; text?: string; type?: string; }

object[]

optional role: string

The role of the message sender (e.g., ‘user’, ‘assistant’, ‘system’, ‘tool’).

optional tool_call_id: string

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


optional presence_penalty: number

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

Increases the likelihood of the model introducing new topics.


optional repetition_penalty: number

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

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

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

If true, the response will be streamed back incrementally.


optional temperature: number

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

Controls the randomness of the output; higher values produce more random results.


optional tools: ({ description: string; name: string; parameters: { properties: {[k: string]: object; }; required?: string[]; type: string; }; } | { function: { description: string; name: string; parameters: { properties: {[k: string]: object; }; required?: string[]; type: string; }; }; type: string; })[]

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

A list of tools available for the assistant to use.


optional top_k: number

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

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

Controls the creativity of the AI’s responses by adjusting how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.