1 {2 "capability": "chat",3 "channels": [4 {5 "channel": "text",6 "mime": "text/plain; charset=utf-8",7 "payload": "one UTF-8 fragment of the answer"8 },9 {10 "channel": "tokens",11 "mime": "application/cbor",12 "payload": "an array of {id: uint, text: bstr, logprob: float / null}"13 },14 {15 "channel": "decision",16 "mime": "application/json",17 "payload": "one tool call: {call_id, name, arguments}"18 },19 {20 "channel": "progress",21 "mime": "application/json",22 "payload": "{stage, pct} during prefill or a batch"23 }24 ],25 "meta": [26 {27 "key": "finish_reason",28 "meaning": "stop, length, tool_calls, or content_filter",29 "type": "string"30 },31 {32 "key": "model",33 "meaning": "the served name that ran the job",34 "type": "string"35 }36 ],37 "parameters": [38 {39 "default": "catalogue",40 "meaning": "the output limit",41 "name": "max_tokens",42 "type": "uint"43 },44 {45 "default": "catalogue",46 "meaning": "sampling temperature",47 "name": "temperature",48 "type": "float"49 },50 {51 "default": "catalogue",52 "meaning": "nucleus sampling",53 "name": "top_p",54 "type": "float"55 },56 {57 "default": "catalogue",58 "meaning": "top-k sampling. 0 disables it.",59 "name": "top_k",60 "type": "uint"61 },62 {63 "default": "catalogue",64 "meaning": "stop sequences",65 "name": "stop",66 "type": "string array"67 },68 {69 "default": "none",70 "meaning": "a fixed seed for a repeatable job",71 "name": "seed",72 "type": "uint"73 },74 {75 "default": "auto",76 "meaning": "auto, none, or the name of one tool",77 "name": "tool_choice",78 "type": "string"79 },80 {81 "default": "false",82 "meaning": "emit tokens events as well as text",83 "name": "logprobs",84 "type": "bool"85 }86 ],87 "parts": [88 {89 "kind": "text",90 "meaning": "the system instruction. At most one. Must come first.",91 "required": "no",92 "role": "system"93 },94 {95 "kind": "text",96 "meaning": "a user turn.",97 "required": "yes, one or more",98 "role": "user"99 },100 {101 "kind": "text",102 "meaning": "a previous assistant turn.",103 "required": "no",104 "role": "assistant"105 },106 {107 "kind": "text",108 "meaning": "a tool result. The role field of the text part names the tool call.",109 "required": "no",110 "role": "tool"111 },112 {113 "kind": "image",114 "meaning": "a visual input. The model must declare image in its parts.",115 "required": "no",116 "role": "user"117 },118 {119 "kind": "audio",120 "meaning": "a speech input. The model must declare audio in its parts.",121 "required": "no",122 "role": "user"123 },124 {125 "kind": "json",126 "meaning": "{\"tools\": [{\"name\", \"description\", \"parameters\"}]}.",127 "required": "no",128 "role": "tools"129 },130 {131 "kind": "json",132 "meaning": "{\"type\": \"text\"} or {\"type\": \"json_object\"}.",133 "required": "no",134 "role": "response_format"135 }136 ],137 "version": 1138 }