PageSourceSearch

https://docs.swmansion.com/react-native-executorch/assets/js/eff797a1.0265d477.js

js swmansion.com collected 2026-10-02 02:53:22 UTC 6,269 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[5949],{45482(e,n,r){r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>l});const c=JSON.parse('{"id":"api-reference/functions/useLLM","title":"Function: useLLM()","description":"Call Signature","source":"@site/versioned_docs/version-0.8.x/06-api-reference/functions/useLLM.md","sourceDirName":"06-api-reference/functions","slug":"/api-reference/functions/useLLM","permalink":"/react-native-executorch/docs/0.8.x/api-reference/functions/useLLM","draft":false,"unlisted":false,"editUrl":"https://github.com/software-mansion/react-native-executorch/edit/main/docs/versioned_docs/version-0.8.x/06-api-reference/functions/useLLM.md","tags":[],"version":"0.8.x","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Function: useInstanceSegmentation()","permalink":"/react-native-executorch/docs/0.8.x/api-reference/functions/useInstanceSegmentation"},"next":{"title":"Function: useOCR()","permalink":"/react-native-executorch/docs/0.8.x/api-reference/functions/useOCR"}}');var s=r(74848),i=r(28453);const t={},a="Function: useLLM()",o={},l=[{value:"Call Signature",id:"call-signature",level:2},{value:"Type Parameters",id:"type-parameters",level:3},{value:"C",id:"c",level:4},{value:"Parameters",id:"parameters",level:3},{value:"props",id:"props",level:4},{value:"Returns",id:"returns",level:3},{value:"Call Signature",id:"call-signature-1",level:2},{value:"Parameters",id:"parameters-1",level:3},{value:"props",id:"props-1",level:4},{value:"Returns",id:"returns-1",level:3}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"function-usellm",children:"Function: useLLM()"})}),"\n",(0,s.jsx)(n.h2,{id:"call-signature",children:"Call Signature"}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"useLLM"}),"<",(0,s.jsx)(n.code,{children:"C"}),">(",(0,s.jsx)(n.code,{children:"props"}),"): ",(0,s.jsx)(n.a,{href:"/react-native-executorch/docs/0.8.x/api-reference/interfaces/LLMTypeMultimodal",children:(0,s.jsx)(n.code,{children:"LLMTypeMultimodal"})}),"<",(0,s.jsx)(n.code,{children:"C"}),">"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Defined in: ",(0,s.jsx)(n.a,{href:"https://github.com/software-mansion/react-native-executorch/blob/d0d3e5b7a1d42b2e7bcd89806efcaf0b961974c9/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts#L20",children:"hooks/natural_language_processing/useLLM.ts:20"})]}),"\n",(0,s.jsx)(n.p,{children:"React hook for managing a Large Language Model (LLM) instance."}),"\n",(0,s.jsx)(n.h3,{id:"type-parameters",children:"Type Parameters"}),"\n",(0,s.jsx)(n.h4,{id:"c",children:"C"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"C"})," ",(0,s.jsx)(n.em,{children:"extends"})," readonly ",(0,s.jsx)(n.code,{children:'"vision"'}),"[]"]}),"\n",(0,s.jsx)(n.h3,{id:"parameters",children:"Parameters"}),"\n",(0,s.jsx)(n.h4,{id:"props",children:"props"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/react-native-executorch/docs/0.8.x/api-reference/interfaces/LLMProps",children:(0,s.jsx)(n.code,{children:"LLMProps"})})," & ",(0,s.jsx)(n.code,{children:"object"})]}),"\n",(0,s.jsx)(n.p,{children:"Object containing model, tokenizer, and tokenizer config sources."}),"\n",(0,s.jsx)(n.h3,{id:"returns",children:"Returns"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/react-native-executorch/docs/0.8.x/api-reference/interfaces/LLMTypeMultimodal",children:(0,s.jsx)(n.code,{children:"LLMTypeMultimodal"})}),"<",(0,s.jsx)(n.code,{children:"C"}),">"]}),"\n",(0,s.jsxs)(n.p,{children:["An object implementing the ",(0,s.jsx)(n.code,{children:"LLMTypeMultimodal"})," interface when ",(0,s.jsx)(n.code,{children:"model.capabilities"})," is provided, otherwise ",(0,s.jsx)(n.code,{children:"LLMType"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"call-signature-1",children:"Call Signature"}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"useLLM"}),"(",(0,s.jsx)(n.code,{children:"props"}),"): ",(0,s.jsx)(n.a,{href:"/react-native-executorch/docs/0.8.x/api-reference/interfaces/LLMType",children:(0,s.jsx)(n.code,{children:"LLMType"})})]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Defined in: ",(0,s.jsx)(n.a,{href:"https://github.com/software-mansion/react-native-executorch/blob/d0d3e5b7a1d42b2e7bcd89806efcaf0b961974c9/packages/react-native-executorch/src/hooks/natural_language_processing/useLLM.ts#L23",children:"hooks/natural_language_processing/useLLM.ts:23"})]}),"\n",(0,s.jsx)(n.p,{children:"React hook for managing a Large Language Model (LLM) instance."}),"\n",(0,s.jsx)(n.h3,{id:"parameters-1",children:"Parameters"}),"\n",(0,s.jsx)(n.h4,{id:"props-1",children:"props"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"/react-native-executorch/docs/0.8.x/api-reference/interfaces/LLMProps",children:(0,s.jsx)(n.code,{children:"LLMProps"})})}),"\n",(0,s.jsx)(n.p,{children:"Object containing model, tokenizer, and tokenizer config sources."}),"\n",(0,s.jsx)(n.h3,{id:"returns-1",children:"Returns"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"/react-native-executorch/docs/0.8.x/api-reference/interfaces/LLMType",children:(0,s.jsx)(n.code,{children:"LLMType"})})}),"\n",(0,s.jsxs)(n.p,{children:["An object implementing the ",(0,s.jsx)(n.code,{children:"LLMTypeMultimodal"})," interface when ",(0,s.jsx)(n.code,{children:"model.capabilities"})," is provided, otherwise ",(0,s.jsx)(n.code,{children:"LLMType"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453(e,n,r){r.d(n,{R:()=>t,x:()=>a});var c=r(96540);const s={},i=c.createContext(s);function t(e){const n=c.useContext(i);return c.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),c.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.