1"use strict";(self.webpackChunkinnovation_labs=self.webpackChunkinnovation_labs||[]).push([[1215],{33003:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>x,frontMatter:()=>o,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"asione/build/chat-completion","title":"Chat Completion (Text Generation)","description":"ASI:One\u2019s Chat Completion endpoint lets you turn plain instructions (a prompt) into rich text\u2014code, math, structured JSON, or natural-sounding prose. This page shows how to call the endpoint, explains every request field, and lists common errors.","source":"@site/docs/asione/build/chat-completion.md","sourceDirName":"asione/build","slug":"/asione/build/chat-completion","permalink":"/resources/docs/next/asione/build/chat-completion","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"chat-completion","title":"Chat Completion (Text Generation)","sidebar_label":"Chat Completion"},"sidebar":"tutorialSidebar","previous":{"title":"OpenAI Compatibility","permalink":"/resources/docs/next/asione/build/openai-compatibility"},"next":{"title":"Model Context Protocol (MCP) and uAgents Integration","permalink":"/resources/docs/next/mcp-integration/what-is-mcp"}}');var r=s(74848),i=s(28453),l=s(65537),d=s(79329);const o={id:"chat-completion",title:"Chat Completion (Text Generation)",sidebar_label:"Chat Completion"},c="Text Generation & Prompting",a={},h=[{value:"Endpoint",id:"endpoint",level:2},{value:"Required headers",id:"required-headers",level:3},{value:"Request body",id:"request-body",level:2},{value:"Quick start (choose your language)",id:"quick-start-choose-your-language",level:2},{value:"Response schema (200)",id:"response-schema-200",level:2},{value:"Field breakdown",id:"field-breakdown",level:3},{value:"Error codes",id:"error-codes",level:2},{value:"Prompt engineering basics",id:"prompt-engineering-basics",level:2}];function u(e){const n={code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"text-generation--prompting",children:"Text Generation & Prompting"})}),"\n",(0,r.jsxs)(n.p,{children:["ASI",":One","\u2019s Chat Completion endpoint lets you turn plain instructions (a ",(0,r.jsx)(n.em,{children:"prompt"}),") into rich text\u2014code, math, structured JSON, or natural-sounding prose. This page shows how to call the endpoint, explains every request field, and lists common errors."]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"endpoint",children:"Endpoint"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST https://api.asi1.ai/v1/chat/completions\n"})}),"\n",(0,r.jsx)(n.h3,{id:"required-headers",children:"Required headers"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Header"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Authorization"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Bearer YOUR_API_KEY"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"x-session-id"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsxs)(n.td,{children:["A ",(0,r.jsx)(n.strong,{children:"unique"})," session identifier used for rate-limiting & tracing"]})]})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"request-body",children:"Request body"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Required"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"agent_address"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsx)(n.td,{children:"Address of the calling agent (for rate-limits & audit)."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"model"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsxs)(n.td,{children:["E.g. ",(0,r.jsx)(n.code,{children:"asi1"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"messages"})}),(0,r.jsx)(n.td,{children:"array<object>"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsx)(n.td,{children:"Conversation history (see below)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"temperature"})}),(0,r.jsx)(n.td,{children:"number"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsxs)(n.td,{children:["0-2. Controls randomness. Default ",(0,r.jsx)(n.strong,{children:"1.0"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"max_tokens"})}),(0,r.jsx)(n.td,{children:"integer"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsx)(n.td,{children:"Max tokens to generate"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"stream"})}),(0,r.jsx)(n.td,{children:"boolean"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsxs)(n.td,{children:["If ",(0,r.jsx)(n.strong,{children:"true"})," the response is Server-Sent Events"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"tools"})}),(0,r.jsx)(n.td,{children:"array<object>"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsx)(n.td,{children:"For function calling"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"web_search"})}),(0,r.jsx)(n.td,{children:"boolean"}),(0,r.jsx)(n.td,{children:"optional"}),(0,r.jsx)(n.td,{children:"Enable/disable web search"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Message objects follow the OpenAI style:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "role": "user | assistant | system",\n "content": "\u2026"\n}\n'})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"quick-start-choose-your-language",children:"Qu
1ick start (choose your language)"}),"\n","\n",(0,r.jsxs)(l.A,{children:[(0,r.jsx)(d.A,{value:"curl",label:"curl",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST https://api.asi1.ai/v1/chat/completions \\\n -H "Authorization: Bearer $ASI_ONE_API_KEY" \\\n -H "x-session-id: $(uuidgen)" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "model": "asi1",\n "messages": [\n {"role": "user", "content": "Write a one-sentence bedtime story about a unicorn."}\n ]\n }\'\n'})})}),(0,r.jsx)(d.A,{value:"python",label:"Python",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'import os, requests\n\nurl = "https://api.asi1.ai/v1/chat/completions"\nheaders = {\n "Authorization": f"Bearer {os.getenv(\'ASI_ONE_API_KEY\')}",\n "x-session-id": "my-session-123",\n "Content-Type": "application/json"\n}\njson = {\n "model": "asi1",\n "messages": [{"role": "user", "content": "Write a one-sentence bedtime story about a unicorn."}]\n}\n\nresp = requests.post(url, headers=headers, json=json)\nprint(resp.json()["choices"][0]["message"]["content"])\n'})})}),(0,r.jsx)(d.A,{value:"javascript",label:"JavaScript",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:"import OpenAI from 'openai';\nconst apiKey = process.env.ASI_ONE_API_KEY;\nconst client = new OpenAI({\n apiKey: apiKey,\n baseURL: 'https://api.asi1.ai/v1',\n});\nconst response = await client.chat.completions.create({\n model: 'asi1',\n messages: [\n { role: 'user', content: 'Write a one-sentence bedtime story about a unicorn.' }\n ],\n extra_headers: {\n 'x-session-id': 'my-session-123'\n }\n});\nconsole.log(response.choices[0].message.content);\n"})})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"response-schema-200",children:"Response schema (200)"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": "083bd6ca857843c0911edf83799ca6c8",\n "choices": [{\n "finish_reason": "stop",\n "index": 0,\n "logprobs": null,\n "message": {\n "content": "A little unicorn with a silver mane pranced through clouds of cotton candy, then curled up in a meadow of starlight to sleep while her horn glowed softly like a night-light.",\n "refusal": null,\n "role": "assistant",\n "annotations": null,\n "audio": null,\n "function_call": null,\n "tool_calls": null,\n "reasoning_content": null\n },\n "matched_stop": 151336\n }],\n "created": 1768476062,\n "model": "asi1",\n "object": "chat.completion",\n "service_tier": null,\n "system_fingerprint": null,\n "usage": {\n "completion_tokens": 39,\n "prompt_tokens": 2107,\n "total_tokens": 2146,\n "completion_tokens_details": null,\n "prompt_tokens_details": null,\n "reasoning_tokens": 0\n },\n "metadata": {\n "weight_version": "default"\n }\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"field-breakdown",children:"Field breakdown"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"id"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"Unique identifier for the completion."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"model"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"Model that generated the response."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"choices"})}),(0,r.jsx)(n.td,{children:"array | null"}),(0,r.jsx)(n.td,{children:"List of generated choices/messages."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"executable_data"})}),(0,r.jsx)(n.td,{children:"array | null"}),(0,r.jsx)(n.td,{children:"Structured tool calls or agent manifests (agentic models)."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"intermediate_steps"})}),(0,r.jsx)(n.td,{children:"array | null"}),(0,r.jsx)(n.td,{children:"Internal reasoning breadcrumbs (streaming/extended)."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"conversation_id"})}),(0,r.jsx)(n.td,{children:"string | null"}),(0,r.jsx)(n.td,{children:"ID you can supply to continue a thread (optional)."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"thought"})}),(0,r.jsx)(n.td,{children:"array | null"}),(0,r.jsx)(n.td,{children:"Lightweight reasoning trace returned during streaming."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"usage"})}),(0,r.jsx)(n.td,{children:"object | null"}),(0,r.jsx)(n.td,{children:"Token-usage accounting."})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:(0,r.jsx)("b",{children:"choices[] object"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"index"})}),(0,r.jsx)(n.td,{children:"integer"}),(0,r.jsx)(n.td,{children:"Position in the choices array."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"finish_reason"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsxs)(n.td,{children:["Why generation stopped (",(0,r.jsx)(n.code,{children:"stop"}),", ",(0,r.jsx)(n.code,{children:"length"}),", etc.)."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"message"})}),(0,r.jsx)(n.td,{children:"object | null"}),(0,r.jsxs)(n.td,{children:["Assistant message when ",(0,r.jsx)("em",{children:"not"})," streaming."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"delta"})}),(0,r.jsx)(n.td,{children:"object | null"}),(0,r.jsxs)(n.td,{children:["Incremental message chunk when ",(0,r.jsx)(n.code,{children:"stream=true"}),"."]})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:(0,r.jsx)("b",{children:"message / delta object"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"role"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsxs)(n.td,{children:["Always ",(0,r.jsx)(n.code,{children:"assistant"})," for model output."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"content"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"Text produced so far (streaming) or full text (non-stream)."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:(0,r.jsx)("b",{children:"usage object"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"prompt_tokens"})}),(0,r.jsx)(n.td,{children:"integer"}),(0,r.jsx)(n.td,{children:"Number of tokens you sent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"completion_tokens"})}),(0,r.jsx)(n.td,{children:"integer"}),(0,r.jsx)(n.td,{children:"Tokens generated by the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"total_tokens"})}),(0,r.jsx)(n.td,{children:"integer"}),(0,r.jsx)(n.td,{children:"Sum of prompt + completion (used for billing/limits)."})]})]})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"error-codes",children:"Error codes"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Code"}),(0,r.jsx)(n.th,{children:"Meaning"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"400"})}),(0,r.jsx)(n.td,{children:"Bad request (invalid JSON, missing fields)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"404"})}),(0,r.jsx)(n.td,{children:"Not found (unknown endpoint)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"429"})}),(0,r.jsx)(n.td,{children:"Rate limit exceeded"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"500"})}),(0,r.jsx)(n.td,{children:"Internal server error"})]})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"prompt-engineering-basics",children:"Prompt engineering basics"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Use roles"})," \u2013 ",(0,r.jsx)(n.code,{children:"system"})," for global instructions, ",(0,r.jsx)(n.code,{children:"user"})," for questions."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Be explicit"})," \u2013 tell the model what format you expect."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Few-shot examples"})," \u2013 include 2-3 Q&A pairs to steer style."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Temperature"})," \u2013 lower (",(0,r.jsx)(n.code,{children:"0-0.3"}),") for deterministic, higher for creativity."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Pin versions"})," \u2013 specify model snapshot once versioning is exposed."]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},79329:(e,n,s)=>{s.d(n,{A:()=>l});s(96540);var t=s(34164);const r={tabItem:"tabItem_Ymn6"};var i=s(74848);function l({children:e,hidden:n,className:s}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,t.A)(r.tabItem,s),hidden:n,children:e})}},65537:(e,n,s)=>{s.d(n,{A:()=>w});var t=s(96540),r=s(34164),i=s(65627),l=s(56347),d=s(50372),o=s(30604),c=s(11861),a=s(78749);function h(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs>
1 child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:s}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return h(e).map((({props:{value:e,label:n,attributes:s,default:t}})=>({value:e,label:n,attributes:s,default:t})))}(s);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,s])}function x({value:e,tabValues:n}){return n.some((n=>n.value===e))}function j({queryString:e=!1,groupId:n}){const s=(0,l.W6)(),r=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,o.aZ)(r),(0,t.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(s.location.search);n.set(r,e),s.replace({...s.location,search:n.toString()})}),[r,s])]}function p(e){const{defaultValue:n,queryString:s=!1,groupId:r}=e,i=u(e),[l,o]=(0,t.useState)((()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!x({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const s=n.find((e=>e.default))??n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:i}))),[c,h]=j({queryString:s,groupId:r}),[p,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[s,r]=(0,a.Dv)(n);return[s,(0,t.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:r}),g=(()=>{const e=c??p;return x({value:e,tabValues:i})?e:null})();(0,d.A)((()=>{g&&o(g)}),[g]);return{selectedValue:l,selectValue:(0,t.useCallback)((e=>{if(!x({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),m(e)}),[h,m,i]),tabValues:i}}var m=s(9136);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=s(74848);function f({className:e,block:n,selectedValue:s,selectValue:t,tabValues:l}){const d=[],{blockElementScrollPositionUntilNextRender:o}=(0,i.a_)(),c=e=>{const n=e.currentTarget,r=d.indexOf(n),i=l[r].value;i!==s&&(o(n),t(i))},a=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const s=d.indexOf(e.currentTarget)+1;n=d[s]??d[0];break}case"ArrowLeft":{const s=d.indexOf(e.currentTarget)-1;n=d[s]??d[d.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},e),children:l.map((({value:e,label:n,attributes:t})=>(0,b.jsx)("li",{role:"tab",tabIndex:s===e?0:-1,"aria-selected":s===e,ref:e=>{d.push(e)},onKeyDown:a,onClick:c,...t,className:(0,r.A)("tabs__item",g.tabItem,t?.className,{"tabs__item--active":s===e}),children:n??e},e)))})}function y({lazy:e,children:n,selectedValue:s}){const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=i.find((e=>e.props.value===s));return e?(0,t.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function v(e){const n=p(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,b.jsx)(f,{...n,...e}),(0,b.jsx)(y,{...n,...e})]})}function w(e){const n=(0,m.A)();return(0,b.jsx)(v,{...e,children:h(e.children)},String(n))}},28453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>d});var t=s(96540);const r={},i=t.createContext(r);function l(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.