Messages
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3844
Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
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.
functions?
Section titled “functions?”
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
image?
Section titled “image?”
optional
image:number
[] |string
&object
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:3886
max_tokens?
Section titled “max_tokens?”
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
Section titled “messages”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.
content?
Section titled “content?”
optional
content: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
[]
optional
role:string
The role of the message sender (e.g., ‘user’, ‘assistant’, ‘system’, ‘tool’).
tool_call_id?
Section titled “tool_call_id?”
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
presence_penalty?
Section titled “presence_penalty?”
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.
repetition_penalty?
Section titled “repetition_penalty?”
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.
stream?
Section titled “stream?”
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.
temperature?
Section titled “temperature?”
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.
tools?
Section titled “tools?”
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.
top_k?
Section titled “top_k?”
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.
top_p?
Section titled “top_p?”
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.