Skip to content

Messages

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4568

optional frequency_penalty: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4736

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


optional functions: object[]

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4611

code: string

name: string


optional image: number[] | string & object

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4610


optional max_tokens: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4712

The maximum number of tokens to generate in the response.


messages: object[]

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4572

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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4740

Increases the likelihood of the model introducing new topics.


optional repetition_penalty: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4732

Penalty for repeated tokens; higher values discourage repetition.


optional seed: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4728

Random seed for reproducibility of the generation.


optional stream: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4708

If true, the response will be streamed back incrementally.


optional temperature: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4716

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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4618

A list of tools available for the assistant to use.


optional top_k: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4724

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.20251118.0/node_modules/@cloudflare/workers-types/index.ts:4720

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.