Messages
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3950
Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
optionalfrequency_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4118
Decreases the likelihood of the model repeating the same lines verbatim.
functions?
Section titled “functions?”
optionalfunctions:object[]
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3993
code:
string
name:
string
image?
Section titled “image?”
optionalimage:number[] |string&object
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3992
max_tokens?
Section titled “max_tokens?”
optionalmax_tokens:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4094
The maximum number of tokens to generate in the response.
messages
Section titled “messages”messages:
object[]
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:3954
An array of message objects representing the conversation history.
content?
Section titled “content?”
optionalcontent:string| {image_url?: {url?:string; };text?:string;type?:string; } |object[]
Type Declaration
Section titled “Type Declaration”string
{ image_url?: { url?: string; }; text?: string; type?: string; }
object[]
optionalrole:string
The role of the message sender (e.g., ‘user’, ‘assistant’, ‘system’, ‘tool’).
tool_call_id?
Section titled “tool_call_id?”
optionaltool_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
presence_penalty?
Section titled “presence_penalty?”
optionalpresence_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4122
Increases the likelihood of the model introducing new topics.
repetition_penalty?
Section titled “repetition_penalty?”
optionalrepetition_penalty:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4114
Penalty for repeated tokens; higher values discourage repetition.
optionalseed:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4110
Random seed for reproducibility of the generation.
stream?
Section titled “stream?”
optionalstream:boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4090
If true, the response will be streamed back incrementally.
temperature?
Section titled “temperature?”
optionaltemperature:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4098
Controls the randomness of the output; higher values produce more random results.
tools?
Section titled “tools?”
optionaltools: ({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.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4000
A list of tools available for the assistant to use.
top_k?
Section titled “top_k?”
optionaltop_k:number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4106
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.20250923.0/node_modules/@cloudflare/workers-types/index.ts:4102
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.