Ai_Cf_Meta_Llama_4_Messages
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6280
Properties
Section titled “Properties”frequency_penalty?
Section titled “frequency_penalty?”
optionalfrequency_penalty:number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6456
Decreases the likelihood of the model repeating the same lines verbatim.
functions?
Section titled “functions?”
optionalfunctions:object[]
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6322
code:
string
name:
string
guided_json?
Section titled “guided_json?”
optionalguided_json:object
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6420
JSON schema that should be fufilled for the response.
max_tokens?
Section titled “max_tokens?”
optionalmax_tokens:number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6432
The maximum number of tokens to generate in the response.
messages
Section titled “messages”messages:
object[]
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6284
An array of message objects representing the conversation history.
content?
Section titled “content?”
optionalcontent:string|object[] | {image_url?: {url?:string; };text?:string;type?:string; }
Type Declaration
Section titled “Type Declaration”string
object[]
{ image_url?: { url?: string; }; text?: string; type?: string; }
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. 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: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6460
Increases the likelihood of the model introducing new topics.
optionalraw:boolean
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6424
If true, a chat template is not applied and you must adhere to the specific model’s expected formatting.
repetition_penalty?
Section titled “repetition_penalty?”
optionalrepetition_penalty:number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6452
Penalty for repeated tokens; higher values discourage repetition.
response_format?
Section titled “response_format?”
optionalresponse_format:JSONMode
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6416
optionalseed:number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6448
Random seed for reproducibility of the generation.
stream?
Section titled “stream?”
optionalstream:boolean
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6428
If true, the response will be streamed back incrementally using SSE, Server Sent Events.
temperature?
Section titled “temperature?”
optionaltemperature:number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6436
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: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6329
A list of tools available for the assistant to use.
top_k?
Section titled “top_k?”
optionaltop_k:number
Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6444
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: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:6440
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.