diff --git a/404.html b/404.html index 24e4baa1a..dd7a49767 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Rivet - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/images/extract-json-node-daae5a3dc6f25249a298b5db7455225d.png b/assets/images/extract-json-node-daae5a3dc6f25249a298b5db7455225d.png new file mode 100644 index 000000000..13f1d58e3 Binary files /dev/null and b/assets/images/extract-json-node-daae5a3dc6f25249a298b5db7455225d.png differ diff --git a/assets/images/extract-json-node-example-01-084bcf9aa769af0151e1308d7c407bb9.png b/assets/images/extract-json-node-example-01-084bcf9aa769af0151e1308d7c407bb9.png new file mode 100644 index 000000000..62eabbeed Binary files /dev/null and b/assets/images/extract-json-node-example-01-084bcf9aa769af0151e1308d7c407bb9.png differ diff --git a/assets/images/extract-object-path-node-40111747e5b19fb79062787ff5bc668e.png b/assets/images/extract-object-path-node-40111747e5b19fb79062787ff5bc668e.png new file mode 100644 index 000000000..ede08836e Binary files /dev/null and b/assets/images/extract-object-path-node-40111747e5b19fb79062787ff5bc668e.png differ diff --git a/assets/images/extract-object-path-node-example-01-8a1b6697a483e13d6a4e11cf1a23d770.png b/assets/images/extract-object-path-node-example-01-8a1b6697a483e13d6a4e11cf1a23d770.png new file mode 100644 index 000000000..d0950284c Binary files /dev/null and b/assets/images/extract-object-path-node-example-01-8a1b6697a483e13d6a4e11cf1a23d770.png differ diff --git a/assets/images/extract-object-path-node-example-02-352553ce1bbedfe076cb30e3a7a4570b.png b/assets/images/extract-object-path-node-example-02-352553ce1bbedfe076cb30e3a7a4570b.png new file mode 100644 index 000000000..958e21ab1 Binary files /dev/null and b/assets/images/extract-object-path-node-example-02-352553ce1bbedfe076cb30e3a7a4570b.png differ diff --git a/assets/images/extract-object-path-node-example-03-2684e3b454cbdfb716399dc014cef39c.png b/assets/images/extract-object-path-node-example-03-2684e3b454cbdfb716399dc014cef39c.png new file mode 100644 index 000000000..d09965776 Binary files /dev/null and b/assets/images/extract-object-path-node-example-03-2684e3b454cbdfb716399dc014cef39c.png differ diff --git a/assets/images/extract-with-regex-node-ed6b317ad6e2df504d3023145cd7bf0f.png b/assets/images/extract-with-regex-node-ed6b317ad6e2df504d3023145cd7bf0f.png new file mode 100644 index 000000000..dd83b603a Binary files /dev/null and b/assets/images/extract-with-regex-node-ed6b317ad6e2df504d3023145cd7bf0f.png differ diff --git a/assets/images/extract-with-regex-node-example-01-e607bc5e46c68dbaad10f3cdbbe5a8a3.png b/assets/images/extract-with-regex-node-example-01-e607bc5e46c68dbaad10f3cdbbe5a8a3.png new file mode 100644 index 000000000..fb2d43b32 Binary files /dev/null and b/assets/images/extract-with-regex-node-example-01-e607bc5e46c68dbaad10f3cdbbe5a8a3.png differ diff --git a/assets/js/12f5fcad.d37c5e9d.js b/assets/js/12f5fcad.d37c5e9d.js new file mode 100644 index 000000000..621d1f034 --- /dev/null +++ b/assets/js/12f5fcad.d37c5e9d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6828],{6593:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(1644);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=a.createContext({}),u=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(i.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=u(n),d=o,h=m["".concat(i,".").concat(d)]||m[d]||c[d]||r;return n?a.createElement(h,l(l({ref:t},p),{},{components:n})):a.createElement(h,l({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[m]="string"==typeof e?e:o,l[1]=s;for(var u=2;u{n.d(t,{Z:()=>m});var a=n(1644),o=n(156),r=n(3840),l=n(7600);const s={admonition:"admonition_sz1_",admonitionHeading:"admonitionHeading_xwjo",admonitionIcon:"admonitionIcon_pI1Y",admonitionContent:"admonitionContent_PUiD"};const i={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(l.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(l.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(l.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(l.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(l.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},u={secondary:"note",important:"info",success:"tip",warning:"danger"};function p(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:o}}(e.children);return{...e,title:e.title??t,children:n}}function m(e){const{children:t,type:n,title:l,icon:m}=p(e),c=function(e){const t=u[e]??e,n=i[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),i.info)}(n),d=l??c.label,{iconComponent:h}=c,f=m??a.createElement(h,null);return a.createElement("div",{className:(0,o.Z)(r.k.common.admonition,r.k.common.admonitionType(e.type),"alert",`alert--${c.infimaClassName}`,s.admonition)},a.createElement("div",{className:s.admonitionHeading},a.createElement("span",{className:s.admonitionIcon},f),d),a.createElement("div",{className:s.admonitionContent},t))}},7026:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(1644),o=n(156);const r={tabItem:"tabItem_hFhF"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,o.Z)(r.tabItem,l),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(373),o=n(1644),r=n(156),l=n(1476),s=n(2824),i=n(9643),u=n(7190),p=n(6985);function m(e){return function(e){return o.Children.map(e,(e=>{if(!e||(0,o.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:o}}=e;return{value:t,label:n,attributes:a,default:o}}))}function c(e){const{values:t,children:n}=e;return(0,o.useMemo)((()=>{const e=t??m(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,s.k6)(),r=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,i._X)(r),(0,o.useCallback)((e=>{if(!r)return;const t=new URLSearchParams(a.location.search);t.set(r,e),a.replace({...a.location,search:t.toString()})}),[r,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,r=c(e),[l,s]=(0,o.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:r}))),[i,u]=h({queryString:n,groupId:a}),[m,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,r]=(0,p.Nk)(n);return[a,(0,o.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:a}),g=(()=>{const e=i??m;return d({value:e,tabValues:r})?e:null})();(0,o.useLayoutEffect)((()=>{g&&s(g)}),[g]);return{selectedValue:l,selectValue:(0,o.useCallback)((e=>{if(!d({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,r]),tabValues:r}}var g=n(8810);const b={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function v(e){let{className:t,block:n,selectedValue:s,selectValue:i,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:m}=(0,l.o5)(),c=e=>{const t=e.currentTarget,n=p.indexOf(t),a=u[n].value;a!==s&&(m(t),i(a))},d=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>p.push(e),onKeyDown:d,onClick:c},l,{className:(0,r.Z)("tabs__item",b.tabItem,l?.className,{"tabs__item--active":s===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:a}=e;const r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=r.find((e=>e.props.value===a));return e?(0,o.cloneElement)(e,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},r.map(((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=f(e);return o.createElement("div",{className:(0,r.Z)("tabs-container",b.tabList)},o.createElement(v,(0,a.Z)({},e,t)),o.createElement(k,(0,a.Z)({},e,t)))}function N(e){const t=(0,g.Z)();return o.createElement(y,(0,a.Z)({key:String(t)},e))}},6425:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>u,toc:()=>m});var a=n(373),o=(n(1644),n(6593)),r=n(6663),l=n(7026);n(4198);const s={id:"assemble-prompt",title:"Assemble Prompt Node",sidebar_label:"Assemble Prompt"},i=void 0,u={unversionedId:"node-reference/assemble-prompt",id:"node-reference/assemble-prompt",title:"Assemble Prompt Node",description:"Overview",source:"@site/docs/node-reference/assemble-prompt.mdx",sourceDirName:"node-reference",slug:"/node-reference/assemble-prompt",permalink:"/docs/node-reference/assemble-prompt",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/assemble-prompt.mdx",tags:[],version:"current",frontMatter:{id:"assemble-prompt",title:"Assemble Prompt Node",sidebar_label:"Assemble Prompt"},sidebar:"nodeReference",previous:{title:"To JSON",permalink:"/docs/node-reference/to-json"},next:{title:"Chat",permalink:"/docs/node-reference/chat"}},p={},m=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example: Assembling Multiple Chat Messages",id:"example-assembling-multiple-chat-messages",level:3},{value:"Example: Appending Chat Messages in a Loop",id:"example-appending-chat-messages-in-a-loop",level:3},{value:"Handling Missing Inputs",id:"handling-missing-inputs",level:3},{value:"Error Handling",id:"error-handling",level:2},{value:"See Also",id:"see-also",level:2}],c={toc:m},d="wrapper";function h(e){let{components:t,...s}=e;return(0,o.kt)(d,(0,a.Z)({},c,s,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"overview"},"Overview"),(0,o.kt)("p",null,"A ",(0,o.kt)("a",{parentName:"p",href:"./chat"},"Chat Node")," takes in a single Prompt input which can be a single message, or an array of messages that forms the message chain. The Assemble Prompt Node is used to assemble multiple chat messages into a single prompt. It takes multiple chat messages or strings as inputs and outputs a single prompt containing all the messages."),(0,o.kt)("p",null,"If a string is connected to any of the inputs, it will be converted to a User type chat message with the string as the message."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Assemble Prompt Node Screenshot",src:n(4131).Z,width:"684",height:"636"})),(0,o.kt)(r.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"inputs",mdxType:"TabItem"},(0,o.kt)("h2",{id:"inputs"},"Inputs"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Title"),(0,o.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"),(0,o.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,o.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Message ","[i]"),(0,o.kt)("td",{parentName:"tr",align:null},"chat-message, chat-message[]"),(0,o.kt)("td",{parentName:"tr",align:null},"The ith chat message input to be assembled"),(0,o.kt)("td",{parentName:"tr",align:null},"N/A"),(0,o.kt)("td",{parentName:"tr",align:null},"Dynamic number of inputs based on how many connections there are"))))),(0,o.kt)(l.Z,{value:"outputs",mdxType:"TabItem"},(0,o.kt)("h2",{id:"outputs"},"Outputs"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Title"),(0,o.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"),(0,o.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Prompt"),(0,o.kt)("td",{parentName:"tr",align:null},"chat-message[]"),(0,o.kt)("td",{parentName:"tr",align:null},"The assembled chat messages"),(0,o.kt)("td",{parentName:"tr",align:null},"The output will be a single prompt resulting from assembling all valid chat messages"))))),(0,o.kt)(l.Z,{value:"settings",mdxType:"TabItem"},(0,o.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,o.kt)("p",null,"This node does not have any specific settings."))),(0,o.kt)("h3",{id:"example-assembling-multiple-chat-messages"},"Example: Assembling Multiple Chat Messages"),(0,o.kt)("p",null,"Let's say you have two ",(0,o.kt)("a",{parentName:"p",href:"./prompt"},"Prompt nodes"),': one with the the AI\'s text "How can I assist you today?" and the user\'s response "Hello". If you want to assemble these two messages into a single prompt to feed into a Chat Node, you can do the following:'),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Add an Assemble Prompt Node to your graph."),(0,o.kt)("li",{parentName:"ol"},"Connect the output of the first Prompt node (AI's message) to ",(0,o.kt)("inlineCode",{parentName:"li"},"Message 1")," of the Assemble Prompt Node."),(0,o.kt)("li",{parentName:"ol"},"Connect the output of the second Prompt node (user's response) to ",(0,o.kt)("inlineCode",{parentName:"li"},"Message 2")," of the Assemble Prompt Node."),(0,o.kt)("li",{parentName:"ol"},"Connect the output of the Assemble Prompt Node to the ",(0,o.kt)("inlineCode",{parentName:"li"},"Prompt")," input of a Chat Node.")),(0,o.kt)("h3",{id:"example-appending-chat-messages-in-a-loop"},"Example: Appending Chat Messages in a Loop"),(0,o.kt)("p",null,"A common use case for the Assemble Prompt Node is to append chat messages in a loop. This can be achieved by using a Loop Controller Node in conjunction with the Assemble Prompt Node."),(0,o.kt)("p",null,"Here's how you can set this up:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Add a Loop Controller Node to your graph."),(0,o.kt)("li",{parentName:"ol"},"Add an Assemble Prompt Node to your graph."),(0,o.kt)("li",{parentName:"ol"},"Connect the ",(0,o.kt)("inlineCode",{parentName:"li"},"Output 1")," of the Loop Controller Node to ",(0,o.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Assemble Prompt Node. This will feed the output of the loop back into the Assemble Prompt Node."),(0,o.kt)("li",{parentName:"ol"},"Connect the ",(0,o.kt)("inlineCode",{parentName:"li"},"Output 1")," of the Assemble Prompt Node to ",(0,o.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Loop Controller Node. This will effectively create a feedback loop where the Assemble Prompt Node feeds back into itself."),(0,o.kt)("li",{parentName:"ol"},"Connect your first message to ",(0,o.kt)("inlineCode",{parentName:"li"},"Input 1 Default")," of the Loop Controller Node. This will be the initial message that starts the loop."),(0,o.kt)("li",{parentName:"ol"},"Any additional messages that you want to append during each loop iteration can be connected to ",(0,o.kt)("inlineCode",{parentName:"li"},"Input 2"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"Input 3"),", etc of the Assemble Prompt Node.")),(0,o.kt)("p",null,"The Assemble Prompt Node will flatten the output, resulting in a list of the current messages. During each loop iteration, the Assemble Prompt Node will append any additional messages connected to its inputs."),(0,o.kt)("p",null,"This setup allows you to dynamically append chat messages in a loop, which can be useful in various scenarios such as creating a chatbot that can carry on a conversation with a user."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Note:")," If you want to control the number of loop iterations, you can do so by setting the ",(0,o.kt)("inlineCode",{parentName:"p"},"Max Iterations")," property of the Loop Controller Node."),(0,o.kt)("p",null,"Here's a diagram to help visualize the setup:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Loop Controller with Assemble Prompt Node",src:n(5568).Z,width:"2098",height:"874"})),(0,o.kt)("p",null,"This example demonstrates the power and flexibility of Rivet's node-based system, allowing you to create complex behaviors with just a few nodes."),(0,o.kt)("h3",{id:"handling-missing-inputs"},"Handling Missing Inputs"),(0,o.kt)("p",null,"If an input is missing or not a chat message, the Assemble Prompt Node will simply ignore it during the assembling process. This can be useful when dealing with optional inputs that may not always be present."),(0,o.kt)("h2",{id:"error-handling"},"Error Handling"),(0,o.kt)("p",null,"If no valid chat message inputs are provided, the output will be an empty array."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Q: What happens if I connect a non-chat message to the Assemble Prompt Node?")),(0,o.kt)("p",null,"A: The Assemble Prompt Node is designed to work with chat message inputs. If a non-chat message input is connected, the node will attempt to convert it to a chat message. In most cases, this will be a User type message with message being the data converted to a string. If this conversion isn't possible, the input will be ignored during the assembling process."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Q: Can I connect an Array Node to the Assemble Prompt Node?")),(0,o.kt)("p",null,"A: Yes, you can connect an Array Node to the Assemble Prompt Node. Each element of the array will be treated as a separate chat message to be assembled (flattens the array)."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Q: How does the Assemble Prompt Node handle empty strings or null values?")),(0,o.kt)("p",null,"A: The Assemble Prompt Node will ignore any inputs that are null or not a chat message. Empty chat messages, however, will be included in the assembling operation."),(0,o.kt)("h2",{id:"see-also"},"See Also"))}h.isMDXComponent=!0},5568:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/assemble-prompt-node-example-02-58281e375e9beb27853612bdc6383d78.png"},4131:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/assemble-prompt-node-5c657f5eaed8b0847daaf9835178e1c7.png"}}]); \ No newline at end of file diff --git a/assets/js/14e11cc2.67257fc4.js b/assets/js/14e11cc2.67257fc4.js new file mode 100644 index 000000000..5b0cacf98 --- /dev/null +++ b/assets/js/14e11cc2.67257fc4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4656],{6593:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=s(n),m=r,h=c["".concat(u,".").concat(m)]||c[m]||d[m]||l;return n?a.createElement(h,o(o({ref:t},p),{},{components:n})):a.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[c]="string"==typeof e?e:r,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(373),r=n(1644),l=n(156),o=n(1476),i=n(2824),u=n(9643),s=n(7190),p=n(6985);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,s]=h({queryString:n,groupId:a}),[c,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),g=(()=>{const e=u??c;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{g&&i(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var g=n(8810);const k={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function b(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=p.indexOf(t),a=s[n].value;a!==i&&(c(t),u(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",k.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(b,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function y(e){const t=(0,g.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},3361:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=n(373),r=(n(1644),n(6593)),l=n(6663),o=n(7026);const i={id:"external-call",title:"External Call Node",sidebar_label:"External Call"},u=void 0,s={unversionedId:"node-reference/external-call",id:"node-reference/external-call",title:"External Call Node",description:"External Call Node Screenshot",source:"@site/docs/node-reference/external-call.mdx",sourceDirName:"node-reference",slug:"/node-reference/external-call",permalink:"/docs/node-reference/external-call",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/external-call.mdx",tags:[],version:"current",frontMatter:{id:"external-call",title:"External Call Node",sidebar_label:"External Call"},sidebar:"nodeReference",previous:{title:"Context",permalink:"/docs/node-reference/context"},next:{title:"Get Global",permalink:"/docs/node-reference/get-global"}},p={},c=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Make a database call from a graph",id:"example-1-make-a-database-call-from-a-graph",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],d={toc:c},m="wrapper";function h(e){let{components:t,...i}=e;return(0,r.kt)(m,(0,a.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"External Call Node Screenshot",src:n(6140).Z,width:"321",height:"155"})),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"When Rivet is running from a host application running ",(0,r.kt)("inlineCode",{parentName:"p"},"@ironclad/rivet-core")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"@ironclad/rivet-node"),', then you can attach "External Functions" when running graphs or creating a GraphProcessor. The following external function ',(0,r.kt)("inlineCode",{parentName:"p"},"sum")," will sum all of its arguments:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { runGraphInFile } from '@ironclad/rivet-node';\n\nawait runGraphInFile({\n ...etc,\n externalFunctions: {\n sum: (...args) => {\n return {\n type: 'number',\n value: args.reduce((acc, curr) => acc + curr, 0);\n }\n }\n }\n})\n")),(0,r.kt)("p",null,"You can then call these external functions from within a graph using the ",(0,r.kt)("inlineCode",{parentName:"p"},"External Call")," node. The function to call is configured in the editor for the External Call node, and must match the name of the function you passed to ",(0,r.kt)("inlineCode",{parentName:"p"},"externalFunctions")," when running the graph."),(0,r.kt)("p",null,"External functions are useful for many use-cases, they can do things like:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Get data from your database"),(0,r.kt)("li",{parentName:"ul"},"Call web APIs"),(0,r.kt)("li",{parentName:"ul"},"Get user informatino about who is running the graph"),(0,r.kt)("li",{parentName:"ul"},"Anything else you can think of!")),(0,r.kt)("p",null,"External functions are extremely powerful. They can only be used when running Rivet from a host application, and are not available when running Rivet in the Rivet applicaton. The external function nodes will error when running in the Rivet application. Use ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/remote-debugging"},"Remote Debugging")," to run External Call nodes in the Rivet application."),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Arguments"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"any")," or ",(0,r.kt)("inlineCode",{parentName:"td"},"any[]")),(0,r.kt)("td",{parentName:"tr",align:null},"The arguments to pass into the external call."),(0,r.kt)("td",{parentName:"tr",align:null},"(empty array)"),(0,r.kt)("td",{parentName:"tr",align:null},"To pass in multiple arguments, they must be an array. You can use an ",(0,r.kt)("a",{parentName:"td",href:"/docs/node-reference/array"},"Array Node")," to create an array of any data."))))),(0,r.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Result"),(0,r.kt)("td",{parentName:"tr",align:null},"(any)"),(0,r.kt)("td",{parentName:"tr",align:null},"The value returned from the external call."),(0,r.kt)("td",{parentName:"tr",align:null},"Can be any data type, make sure you're returning what you expect!")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Error"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"If the external call errors, will be populated with the error message."),(0,r.kt)("td",{parentName:"tr",align:null},"Only enabled if ",(0,r.kt)("inlineCode",{parentName:"td"},"Use Error Output")," is turned on. If ",(0,r.kt)("inlineCode",{parentName:"td"},"Use Error Output")," is turned off, the node will error instead."))))),(0,r.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Function Name"),(0,r.kt)("td",{parentName:"tr",align:null},"The name of the external function as defined in ",(0,r.kt)("inlineCode",{parentName:"td"},"externalFunctions"),". Must match the function name defined in your code."),(0,r.kt)("td",{parentName:"tr",align:null},"(empty string)"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Use Error Output"),(0,r.kt)("td",{parentName:"tr",align:null},"If enabled, then the External Call node will not fail, but instead any error will appear in the ",(0,r.kt)("inlineCode",{parentName:"td"},"Error")," output port of the node. If disabled, the entire External Call node will error if the call errors."),(0,r.kt)("td",{parentName:"tr",align:null},"False"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")))))),(0,r.kt)("h2",{id:"example-1-make-a-database-call-from-a-graph"},"Example 1: Make a database call from a graph"),(0,r.kt)("p",null,"In this example, we'll create a graph that makes a database call to get metadata about a single user. First, we'll define the external function that will make the database call:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { runGraphInFile } from '@ironclad/rivet-node';\n\nconst db = {\n async getUser(id: string) {\n return {\n name: 'test user',\n };\n },\n};\n\nawait runGraphInFile({\n ...etc,\n externalFunctions: {\n getUser: async (userId: string) => {\n const user = await db.getUser(userId);\n return {\n type: 'object',\n value: user,\n };\n },\n },\n});\n")),(0,r.kt)("p",null,"Then, in your graph, create an External Call Node, and set the ",(0,r.kt)("inlineCode",{parentName:"p"},"Function Name")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"getUser"),". Create a ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/text"},"Text Node")," and set the text to the user's ID. Connect the Text Node to the External Call Node. The graph should look like this:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"External Call Node Example 1",src:n(1430).Z,width:"569",height:"176"})),(0,r.kt)("p",null,"Run your application, and connect the ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/remote-debugging"},"Remote Debugger")," to it. Then, run the graph. You should see the object returned from the database call in the External Call node."),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"If the external function errors, then the External Call node will error. If you want to handle errors in the graph, then you can enable the ",(0,r.kt)("inlineCode",{parentName:"p"},"Use Error Output")," setting. This will cause the External Call node to not error, but instead pass the error message to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Error")," output port. If the ",(0,r.kt)("inlineCode",{parentName:"p"},"Error")," port is populated, then the ",(0,r.kt)("inlineCode",{parentName:"p"},"Result")," port will not be ran. You can use an ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/if"},"If Node")," to check if the ",(0,r.kt)("inlineCode",{parentName:"p"},"Error")," port is populated, and handle the error accordingly."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use external functions when running Rivet in the Rivet application?")),(0,r.kt)("p",null,"No, external functions are only available when running Rivet from a host application. Connect the ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/remote-debugging"},"Remote Debugger")," to your host application to run external functions in the Rivet application."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What do I return from an external function?")),(0,r.kt)("p",null,"You must return a valid ",(0,r.kt)("a",{parentName:"p",href:"/docs/api-reference/core/DataValue"},"Data Value")," with a valid ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/data-types"},"Data Type"),", for example to return a string:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"{\n type: 'string',\n value: 'hello world',\n}\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I return a Promise from an external function?")),(0,r.kt)("p",null,"Yes, you can return a Promise from an external function. The External Call node will wait for the Promise to resolve before continuing."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: How are external functions different from raising events?")),(0,r.kt)("p",null,"External functions are synchronous, and can return data. Raising events are asynchronous, and cannot return data. The Raise Event node will not wait for the event to be handled before continuing, while the External Call node will wait for the external function to return before continuing."),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/user-guide/remote-debugging"},"Remote Debugging")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/context"},"Context Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/raise-event"},"Raise Event Node"))))}h.isMDXComponent=!0},1430:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/external-call-node-example-01-634b4e4072712ae319c1fe08b5a5ed7a.png"},6140:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/external-call-node-f3d90c1d10a6cb464d963e40f6c7a078.png"}}]); \ No newline at end of file diff --git a/assets/js/1b6e407e.e549a6c5.js b/assets/js/1b6e407e.e549a6c5.js new file mode 100644 index 000000000..ed26b4bb8 --- /dev/null +++ b/assets/js/1b6e407e.e549a6c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1695],{6593:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var d=n.createContext({}),l=function(e){var t=n.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(d.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,d=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),p=l(r),u=o,m=p["".concat(d,".").concat(u)]||p[u]||f[u]||a;return r?n.createElement(m,c(c({ref:t},s),{},{components:r})):n.createElement(m,c({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=u;var i={};for(var d in t)hasOwnProperty.call(t,d)&&(i[d]=t[d]);i.originalType=e,i[p]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(373),o=(r(1644),r(6593));const a={title:"Load Dataset"},c="Load Dataset Node",i={unversionedId:"node-reference/load-dataset",id:"node-reference/load-dataset",title:"Load Dataset",description:"",source:"@site/docs/node-reference/load-dataset.mdx",sourceDirName:"node-reference",slug:"/node-reference/load-dataset",permalink:"/docs/node-reference/load-dataset",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/load-dataset.mdx",tags:[],version:"current",frontMatter:{title:"Load Dataset"},sidebar:"nodeReference",previous:{title:"KNN Dataset",permalink:"/docs/node-reference/knn-dataset"},next:{title:"Read Directory",permalink:"/docs/node-reference/read-directory"}},d={},l=[],s={toc:l},p="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(p,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"load-dataset-node"},"Load Dataset Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1c8789be.40e1dcbf.js b/assets/js/1c8789be.40e1dcbf.js new file mode 100644 index 000000000..06bc65efa --- /dev/null +++ b/assets/js/1c8789be.40e1dcbf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5494],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),m=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(l.Provider,{value:t},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=m(r),u=o,d=f["".concat(l,".").concat(u)]||f[u]||s[u]||c;return r?n.createElement(d,a(a({ref:t},p),{},{components:r})):n.createElement(d,a({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var m=2;m{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>s,frontMatter:()=>c,metadata:()=>i,toc:()=>m});var n=r(373),o=(r(1644),r(6593));const c={title:"Comment"},a="Comment Node",i={unversionedId:"node-reference/comment",id:"node-reference/comment",title:"Comment",description:"",source:"@site/docs/node-reference/comment.mdx",sourceDirName:"node-reference",slug:"/node-reference/comment",permalink:"/docs/node-reference/comment",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/comment.mdx",tags:[],version:"current",frontMatter:{title:"Comment"},sidebar:"nodeReference",previous:{title:"Code",permalink:"/docs/node-reference/code"},next:{title:"Context",permalink:"/docs/node-reference/context"}},l={},m=[],p={toc:m},f="wrapper";function s(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"comment-node"},"Comment Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1f541d16.ce370164.js b/assets/js/1f541d16.ce370164.js new file mode 100644 index 000000000..60ff10dbe --- /dev/null +++ b/assets/js/1f541d16.ce370164.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8078],{6593:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),s=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=s(n),m=r,h=p["".concat(i,".").concat(m)]||p[m]||d[m]||l;return n?a.createElement(h,o(o({ref:t},c),{},{components:n})):a.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[p]="string"==typeof e?e:r,o[1]=u;for(var s=2;s{n.d(t,{Z:()=>o});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(373),r=n(1644),l=n(156),o=n(1476),u=n(2824),i=n(9643),s=n(7190),c=n(6985);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,u.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,i._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,u]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[i,s]=h({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),g=(()=>{const e=i??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{g&&u(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var g=n(8810);const b={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function v(e){let{className:t,block:n,selectedValue:u,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),a=s[n].value;a!==u&&(p(t),i(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":u===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(k,(0,a.Z)({},e,t)))}function N(e){const t=(0,g.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},2843:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>u,metadata:()=>s,toc:()=>p});var a=n(373),r=(n(1644),n(6593)),l=n(6663),o=n(7026);const u={id:"context",title:"Context Node",sidebar_label:"Context"},i=void 0,s={unversionedId:"node-reference/context",id:"node-reference/context",title:"Context Node",description:"Context Node Screenshot",source:"@site/docs/node-reference/context.mdx",sourceDirName:"node-reference",slug:"/node-reference/context",permalink:"/docs/node-reference/context",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/context.mdx",tags:[],version:"current",frontMatter:{id:"context",title:"Context Node",sidebar_label:"Context"},sidebar:"nodeReference",previous:{title:"Comment",permalink:"/docs/node-reference/comment"},next:{title:"External Call",permalink:"/docs/node-reference/external-call"}},c={},p=[{value:"Overview",id:"overview",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Access a string context value",id:"example-1-access-a-string-context-value",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],d={toc:p},m="wrapper";function h(e){let{components:t,...u}=e;return(0,r.kt)(m,(0,a.Z)({},d,u,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Context Node Screenshot",src:n(2004).Z,width:"252",height:"174"})),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,'The "Context" in Rivet is a set of shared inputs that are accessible in any graph, no matter if they are the entry-point graph, or a subgraph called by another graph. The Context node is used to access these inputs.'),(0,r.kt)("p",null,'The Context Node allows you to access these values in your graph. It is useful for "global values" that every graph can access, without having to pipe the values in as graph inputs. Use the Context Node and ',(0,r.kt)("inlineCode",{parentName:"p"},"contextValues"),' to pass in "global context" to your projects, such as the current date.'),(0,r.kt)("p",null,"Context can currently only be set when Rivet is embedded in a host application. It is passed in using the ",(0,r.kt)("inlineCode",{parentName:"p"},"contextValues")," parameter to ",(0,r.kt)("inlineCode",{parentName:"p"},"runGraphInFile")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"createProcessor"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import * as Rivet from '@ironclad/rivet-node';\n\nconst contextValues = {\n stringContext: 'str',\n numberContext: 1,\n booleanContext: true,\n};\n\nconst processor = Rivet.createProcessor({\n ...etc,\n contextValues,\n});\n")),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("p",null,"The context node has no inputs besides optional ones from the Editor Settings page.")),(0,r.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"(Context ID)"),(0,r.kt)("td",{parentName:"tr",align:null},"(Configured in editor)"),(0,r.kt)("td",{parentName:"tr",align:null},"The value of the context value."),(0,r.kt)("td",{parentName:"tr",align:null},"The ID and data type are configured in the Editor Settings page of the Context node. If the context value is not set, then the default value configured in the editor settings, or via the input port, will be used."))))),(0,r.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ID"),(0,r.kt)("td",{parentName:"tr",align:null},"The ID of the context that you are pulling in. Must match exactly to the ID passed in to ",(0,r.kt)("inlineCode",{parentName:"td"},"contextValues")," in the parent application."),(0,r.kt)("td",{parentName:"tr",align:null},"(required)"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("td",{parentName:"tr",align:null},"The data type of the value passed in to ",(0,r.kt)("inlineCode",{parentName:"td"},"contextValues"),". The value will be coerced to this data type if it does not match."),(0,r.kt)("td",{parentName:"tr",align:null},"String"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("td",{parentName:"tr",align:null},"The default value, if the context value is not set."),(0,r.kt)("td",{parentName:"tr",align:null},"(empty)"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},"Same data type as the configured ",(0,r.kt)("inlineCode",{parentName:"td"},"Data Type")," above. Will be coerced into the data type configured.")))))),(0,r.kt)("h2",{id:"example-1-access-a-string-context-value"},"Example 1: Access a string context value"),(0,r.kt)("p",null,"In your parent application, pass a string value into ",(0,r.kt)("inlineCode",{parentName:"p"},"contextValues"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import * as Rivet from '@ironclad/rivet-node';\n\nconst contextValues = {\n stringContext: 'str',\n};\n\nconst processor = Rivet.createProcessor({\n ...etc,\n contextValues,\n});\n")),(0,r.kt)("p",null,"In your graph, add a Context node. Set the ",(0,r.kt)("inlineCode",{parentName:"p"},"ID")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"stringContext"),", and the ",(0,r.kt)("inlineCode",{parentName:"p"},"Data Type")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"String"),". Leave the ",(0,r.kt)("inlineCode",{parentName:"p"},"Default Value")," empty."),(0,r.kt)("p",null,"Run your graph while the ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/remote-debugging"},"Remote Debugger")," is attached. The output of the Context node should be ",(0,r.kt)("inlineCode",{parentName:"p"},"str"),"."),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"The context node cannot error in normal circumstances. If the context is not set via ",(0,r.kt)("inlineCode",{parentName:"p"},"contextValues"),", then the default value will be used."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use the Context node to pass in the current date and time?")),(0,r.kt)("p",null,"A: Yes, you can pass in the current date as a context value:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"const processor = Rivet.createProcessor({\n ...etc,\n contextValues: {\n currentDate: new Date(),\n },\n});\n")),(0,r.kt)("p",null,"Then, in your graph, add a Context node. Set the ",(0,r.kt)("inlineCode",{parentName:"p"},"ID")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"currentDate"),", and the ",(0,r.kt)("inlineCode",{parentName:"p"},"Data Type")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"Date"),". Leave the ",(0,r.kt)("inlineCode",{parentName:"p"},"Default Value")," empty."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use the Context node to pass in a function?")),(0,r.kt)("p",null,"A: No, you cannot pass in a function as a context value. You can only pass in ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/data-types"},"Data Values")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use the Context node to pass in a custom data type?")),(0,r.kt)("p",null,"A: No, you cannot pass in a custom data type as a context value. You can only pass in ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/data-types"},"Data Values")),(0,r.kt)("h2",{id:"see-also"},"See Also"))}h.isMDXComponent=!0},2004:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/context-node-e6d7d75f09ac1f9e1c8c4deb10d0483d.png"}}]); \ No newline at end of file diff --git a/assets/js/2015b416.e741b99a.js b/assets/js/2015b416.e741b99a.js new file mode 100644 index 000000000..fceb4bc58 --- /dev/null +++ b/assets/js/2015b416.e741b99a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5842],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=n.createContext({}),s=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(r),d=o,b=u["".concat(i,".").concat(d)]||u[d]||f[d]||a;return r?n.createElement(b,c(c({ref:t},p),{},{components:r})):n.createElement(b,c({ref:t},p))}));function b(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[u]="string"==typeof e?e:o,c[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(373),o=(r(1644),r(6593));const a={title:"Set Global"},c="Set Global Node",l={unversionedId:"node-reference/set-global",id:"node-reference/set-global",title:"Set Global",description:"",source:"@site/docs/node-reference/set-global.mdx",sourceDirName:"node-reference",slug:"/node-reference/set-global",permalink:"/docs/node-reference/set-global",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/set-global.mdx",tags:[],version:"current",frontMatter:{title:"Set Global"},sidebar:"nodeReference",previous:{title:"Raise Event",permalink:"/docs/node-reference/raise-event"},next:{title:"Subgraph",permalink:"/docs/node-reference/subgraph"}},i={},s=[],p={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"set-global-node"},"Set Global Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/20ceafbc.6e3016fb.js b/assets/js/20ceafbc.6e3016fb.js new file mode 100644 index 000000000..430777e06 --- /dev/null +++ b/assets/js/20ceafbc.6e3016fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6062],{6593:(e,r,t)=>{t.d(r,{Zo:()=>u,kt:()=>h});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),p=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},u=function(e){var r=p(e.components);return n.createElement(i.Provider,{value:r},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),l=p(t),d=o,h=l["".concat(i,".").concat(d)]||l[d]||f[d]||c;return t?n.createElement(h,a(a({ref:r},u),{},{components:t})):n.createElement(h,a({ref:r},u))}));function h(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=d;var s={};for(var i in r)hasOwnProperty.call(r,i)&&(s[i]=r[i]);s.originalType=e,s[l]="string"==typeof e?e:o,a[1]=s;for(var p=2;p{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>f,frontMatter:()=>c,metadata:()=>s,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const c={title:"Passthrough"},a="Passthrough Node",s={unversionedId:"node-reference/passthrough",id:"node-reference/passthrough",title:"Passthrough",description:"",source:"@site/docs/node-reference/passthrough.mdx",sourceDirName:"node-reference",slug:"/node-reference/passthrough",permalink:"/docs/node-reference/passthrough",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/passthrough.mdx",tags:[],version:"current",frontMatter:{title:"Passthrough"},sidebar:"nodeReference",previous:{title:"Match",permalink:"/docs/node-reference/match"},next:{title:"Race Inputs",permalink:"/docs/node-reference/race-inputs"}},i={},p=[],u={toc:p},l="wrapper";function f(e){let{components:r,...t}=e;return(0,o.kt)(l,(0,n.Z)({},u,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"passthrough-node"},"Passthrough Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2215b464.11365f63.js b/assets/js/2215b464.11365f63.js new file mode 100644 index 000000000..a432ea367 --- /dev/null +++ b/assets/js/2215b464.11365f63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6032],{6593:(e,t,r)=>{r.d(t,{Zo:()=>f,kt:()=>b});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},f=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,f=i(e,["components","mdxType","originalType","parentName"]),s=p(r),d=o,b=s["".concat(l,".").concat(d)]||s[d]||u[d]||c;return r?n.createElement(b,a(a({ref:t},f),{},{components:r})):n.createElement(b,a({ref:t},f))}));function b(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[s]="string"==typeof e?e:o,a[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const c={title:"Object"},a="Object Node",i={unversionedId:"node-reference/object",id:"node-reference/object",title:"Object",description:"",source:"@site/docs/node-reference/object.mdx",sourceDirName:"node-reference",slug:"/node-reference/object",permalink:"/docs/node-reference/object",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/object.mdx",tags:[],version:"current",frontMatter:{title:"Object"},sidebar:"nodeReference",previous:{title:"Extract YAML",permalink:"/docs/node-reference/extract-yaml"},next:{title:"Abort Graph",permalink:"/docs/node-reference/abort-graph"}},l={},p=[],f={toc:p},s="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"object-node"},"Object Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3109fa04.01731409.js b/assets/js/3109fa04.01731409.js new file mode 100644 index 000000000..b09d58472 --- /dev/null +++ b/assets/js/3109fa04.01731409.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2118],{6593:(e,r,t)=>{t.d(r,{Zo:()=>u,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),p=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},u=function(e){var r=p(e.components);return n.createElement(l.Provider,{value:r},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),f=p(t),d=o,m=f["".concat(l,".").concat(d)]||f[d]||s[d]||c;return t?n.createElement(m,a(a({ref:r},u),{},{components:t})):n.createElement(m,a({ref:r},u))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=d;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var p=2;p{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>a,default:()=>s,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const c={title:"RNG"},a="RNG Node",i={unversionedId:"node-reference/rng",id:"node-reference/rng",title:"RNG",description:"",source:"@site/docs/node-reference/rng.mdx",sourceDirName:"node-reference",slug:"/node-reference/rng",permalink:"/docs/node-reference/rng",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/rng.mdx",tags:[],version:"current",frontMatter:{title:"RNG"},sidebar:"nodeReference",previous:{title:"Number",permalink:"/docs/node-reference/number"},next:{title:"Extract JSON",permalink:"/docs/node-reference/extract-json"}},l={},p=[],u={toc:p},f="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},u,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"rng-node"},"RNG Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/363646a7.1d07d51d.js b/assets/js/363646a7.1d07d51d.js new file mode 100644 index 000000000..b7783a816 --- /dev/null +++ b/assets/js/363646a7.1d07d51d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1330],{6593:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>m});var r=n(1644);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},f=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,c=e.originalType,p=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),l=u(n),s=o,m=l["".concat(p,".").concat(s)]||l[s]||d[s]||c;return n?r.createElement(m,i(i({ref:t},f),{},{components:n})):r.createElement(m,i({ref:t},f))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=n.length,i=new Array(c);i[0]=s;var a={};for(var p in t)hasOwnProperty.call(t,p)&&(a[p]=t[p]);a.originalType=e,a[l]="string"==typeof e?e:o,i[1]=a;for(var u=2;u{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>d,frontMatter:()=>c,metadata:()=>a,toc:()=>u});var r=n(373),o=(n(1644),n(6593));const c={title:"GPT Function"},i="GPT Function Node",a={unversionedId:"node-reference/gpt-function",id:"node-reference/gpt-function",title:"GPT Function",description:"",source:"@site/docs/node-reference/gpt-function.mdx",sourceDirName:"node-reference",slug:"/node-reference/gpt-function",permalink:"/docs/node-reference/gpt-function",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/gpt-function.mdx",tags:[],version:"current",frontMatter:{title:"GPT Function"},sidebar:"nodeReference",previous:{title:"Chat",permalink:"/docs/node-reference/chat"},next:{title:"Get Embedding",permalink:"/docs/node-reference/get-embedding"}},p={},u=[],f={toc:u},l="wrapper";function d(e){let{components:t,...n}=e;return(0,o.kt)(l,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"gpt-function-node"},"GPT Function Node"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37aab7a1.7fcb25b2.js b/assets/js/37aab7a1.7fcb25b2.js new file mode 100644 index 000000000..5563fc3e5 --- /dev/null +++ b/assets/js/37aab7a1.7fcb25b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6530],{6593:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),p=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},f=function(e){var r=p(e.components);return n.createElement(i.Provider,{value:r},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),s=p(t),d=o,m=s["".concat(i,".").concat(d)]||s[d]||u[d]||c;return t?n.createElement(m,l(l({ref:r},f),{},{components:t})):n.createElement(m,l({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,l=new Array(c);l[0]=d;var a={};for(var i in r)hasOwnProperty.call(r,i)&&(a[i]=r[i]);a.originalType=e,a[s]="string"==typeof e?e:o,l[1]=a;for(var p=2;p{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>l,default:()=>u,frontMatter:()=>c,metadata:()=>a,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const c={title:"Loop Controller"},l="Loop Controller Node",a={unversionedId:"node-reference/loop-controller",id:"node-reference/loop-controller",title:"Loop Controller",description:"",source:"@site/docs/node-reference/loop-controller.mdx",sourceDirName:"node-reference",slug:"/node-reference/loop-controller",permalink:"/docs/node-reference/loop-controller",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/loop-controller.mdx",tags:[],version:"current",frontMatter:{title:"Loop Controller"},sidebar:"nodeReference",previous:{title:"If/Else",permalink:"/docs/node-reference/if-else"},next:{title:"Match",permalink:"/docs/node-reference/match"}},i={},p=[],f={toc:p},s="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(s,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"loop-controller-node"},"Loop Controller Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3cdfd61d.11565d7e.js b/assets/js/3cdfd61d.11565d7e.js new file mode 100644 index 000000000..729d11133 --- /dev/null +++ b/assets/js/3cdfd61d.11565d7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5092],{6593:(e,r,t)=>{t.d(r,{Zo:()=>d,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),s=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},d=function(e){var r=s(e.components);return n.createElement(i.Provider,{value:r},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},u=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,d=a(e,["components","mdxType","originalType","parentName"]),p=s(t),u=o,m=p["".concat(i,".").concat(u)]||p[u]||f[u]||c;return t?n.createElement(m,l(l({ref:r},d),{},{components:t})):n.createElement(m,l({ref:r},d))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,l=new Array(c);l[0]=u;var a={};for(var i in r)hasOwnProperty.call(r,i)&&(a[i]=r[i]);a.originalType=e,a[p]="string"==typeof e?e:o,l[1]=a;for(var s=2;s{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>l,default:()=>f,frontMatter:()=>c,metadata:()=>a,toc:()=>s});var n=t(373),o=(t(1644),t(6593));const c={title:"All Nodes"},l="All Nodes",a={unversionedId:"node-reference/all-nodes",id:"node-reference/all-nodes",title:"All Nodes",description:"",source:"@site/docs/node-reference/all-nodes.mdx",sourceDirName:"node-reference",slug:"/node-reference/all-nodes",permalink:"/docs/node-reference/all-nodes",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/all-nodes.mdx",tags:[],version:"current",frontMatter:{title:"All Nodes"},sidebar:"nodeReference",previous:{title:"Rivet Node Reference",permalink:"/docs/node-reference"},next:{title:"Chunk",permalink:"/docs/node-reference/chunk"}},i={},s=[],d={toc:s},p="wrapper";function f(e){let{components:r,...t}=e;return(0,o.kt)(p,(0,n.Z)({},d,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"all-nodes"},"All Nodes"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/433c2729.d715ceee.js b/assets/js/433c2729.d715ceee.js new file mode 100644 index 000000000..47dadb15b --- /dev/null +++ b/assets/js/433c2729.d715ceee.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3025],{6593:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(1644);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),i=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):u(u({},t),e)),n},c=function(e){var t=i(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=i(n),m=a,f=p["".concat(s,".").concat(m)]||p[m]||d[m]||l;return n?r.createElement(f,u(u({ref:t},c),{},{components:n})):r.createElement(f,u({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,u=new Array(l);u[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:a,u[1]=o;for(var i=2;i{n.d(t,{Z:()=>u});var r=n(1644),a=n(156);const l={tabItem:"tabItem_hFhF"};function u(e){let{children:t,hidden:n,className:u}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,u),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(373),a=n(1644),l=n(156),u=n(1476),o=n(2824),s=n(9643),i=n(7190),c=n(6985);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,s._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=d(e),[u,o]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[s,i]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),h=(()=>{const e=s??p;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{h&&o(h)}),[h]);return{selectedValue:u,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),i(e),b(e)}),[i,b,l]),tabValues:l}}var h=n(8810);const v={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function g(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,u.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=i[n].value;r!==o&&(p(t),s(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},i.map((e=>{let{value:t,label:n,attributes:u}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},u,{className:(0,l.Z)("tabs__item",v.tabItem,u?.className,{"tabs__item--active":o===t})}),n??t)})))}function y(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},a.createElement(g,(0,r.Z)({},e,t)),a.createElement(y,(0,r.Z)({},e,t)))}function w(e){const t=(0,h.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},3089:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(373),a=(n(1644),n(6593)),l=n(6663),u=n(7026);const o={id:"race-inputs",title:"Race Inputs Node",sidebar_label:"Race Inputs"},s=void 0,i={unversionedId:"node-reference/race-inputs",id:"node-reference/race-inputs",title:"Race Inputs Node",description:"Overview",source:"@site/docs/node-reference/race-inputs.mdx",sourceDirName:"node-reference",slug:"/node-reference/race-inputs",permalink:"/docs/node-reference/race-inputs",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/race-inputs.mdx",tags:[],version:"current",frontMatter:{id:"race-inputs",title:"Race Inputs Node",sidebar_label:"Race Inputs"},sidebar:"nodeReference",previous:{title:"Passthrough",permalink:"/docs/node-reference/passthrough"},next:{title:"Append to Dataset",permalink:"/docs/node-reference/append-to-dataset"}},c={},p=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Fastest Story Wins",id:"example-1-fastest-story-wins",level:3},{value:"See Also",id:"see-also",level:2}],d={toc:p},m="wrapper";function f(e){let{components:t,...o}=e;return(0,a.kt)(m,(0,r.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"overview"},"Overview"),(0,a.kt)("p",null,"The race inputs node takes two"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Race Inputs Node Screenshot",src:n(6399).Z,width:"495",height:"229"})),(0,a.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"inputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"inputs"},"Inputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,a.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Input N"),(0,a.kt)("td",{parentName:"tr",align:null},"any"),(0,a.kt)("td",{parentName:"tr",align:null},"One of the inputs to race."),(0,a.kt)("td",{parentName:"tr",align:null},"N/A"),(0,a.kt)("td",{parentName:"tr",align:null},"The number of inputs is dynamic, and is always 1 more than the number of connected wires."))))),(0,a.kt)(u.Z,{value:"outputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"outputs"},"Outputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Output"),(0,a.kt)("td",{parentName:"tr",align:null},"The same as the winner of the race"),(0,a.kt)("td",{parentName:"tr",align:null},"The value of the winner of the race"),(0,a.kt)("td",{parentName:"tr",align:null}))))),(0,a.kt)(u.Z,{value:"settings",mdxType:"TabItem"},(0,a.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,a.kt)("p",null,"The race inputs node has no settings."))),(0,a.kt)("h3",{id:"example-1-fastest-story-wins"},"Example 1: Fastest Story Wins"),(0,a.kt)("p",null,"The following is a simple example of the Race Inputs Node - two Chat nodes are given the task to write a very short story. Once one of them passes its\nstory to race inputs, then the other branch will be canceled."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Race inputs example",src:n(3855).Z,width:"1555",height:"640"})),(0,a.kt)("h2",{id:"see-also"},"See Also"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/coalesce"},"Coalesce"))))}f.isMDXComponent=!0},3855:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/race-inputs-example-c71d355b3debba9c56e354444fbe0d54.png"},6399:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/race-inputs-node-3816fa9af2ed225a14ca3f29c70c8c08.png"}}]); \ No newline at end of file diff --git a/assets/js/48e33d57.4551de33.js b/assets/js/48e33d57.4551de33.js new file mode 100644 index 000000000..dcd79b739 --- /dev/null +++ b/assets/js/48e33d57.4551de33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6083],{6593:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),l=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):p(p({},r),e)),t},f=function(e){var r=l(e.components);return n.createElement(i.Provider,{value:r},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),s=l(t),d=o,m=s["".concat(i,".").concat(d)]||s[d]||u[d]||c;return t?n.createElement(m,p(p({ref:r},f),{},{components:t})):n.createElement(m,p({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,p=new Array(c);p[0]=d;var a={};for(var i in r)hasOwnProperty.call(r,i)&&(a[i]=r[i]);a.originalType=e,a[s]="string"==typeof e?e:o,p[1]=a;for(var l=2;l{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>p,default:()=>u,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={title:"Prompt"},p="Prompt Node",a={unversionedId:"node-reference/prompt",id:"node-reference/prompt",title:"Prompt",description:"",source:"@site/docs/node-reference/prompt.mdx",sourceDirName:"node-reference",slug:"/node-reference/prompt",permalink:"/docs/node-reference/prompt",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/prompt.mdx",tags:[],version:"current",frontMatter:{title:"Prompt"},sidebar:"nodeReference",previous:{title:"Join",permalink:"/docs/node-reference/join"},next:{title:"Split Text",permalink:"/docs/node-reference/split-text"}},i={},l=[],f={toc:l},s="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(s,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"prompt-node"},"Prompt Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/52dab8a8.840f0c71.js b/assets/js/52dab8a8.840f0c71.js new file mode 100644 index 000000000..c71c2750e --- /dev/null +++ b/assets/js/52dab8a8.840f0c71.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8896],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),s=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},p=function(e){var r=s(e.components);return n.createElement(l.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=s(t),d=o,m=f["".concat(l,".").concat(d)]||f[d]||u[d]||a;return t?n.createElement(m,c(c({ref:r},p),{},{components:t})):n.createElement(m,c({ref:r},p))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=d;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[f]="string"==typeof e?e:o,c[1]=i;for(var s=2;s{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>s});var n=t(373),o=(t(1644),t(6593));const a={title:"Raise Event"},c="Raise Event Node",i={unversionedId:"node-reference/raise-event",id:"node-reference/raise-event",title:"Raise Event",description:"",source:"@site/docs/node-reference/raise-event.mdx",sourceDirName:"node-reference",slug:"/node-reference/raise-event",permalink:"/docs/node-reference/raise-event",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/raise-event.mdx",tags:[],version:"current",frontMatter:{title:"Raise Event"},sidebar:"nodeReference",previous:{title:"HTTP Call",permalink:"/docs/node-reference/http-call"},next:{title:"Set Global",permalink:"/docs/node-reference/set-global"}},l={},s=[],p={toc:s},f="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"raise-event-node"},"Raise Event Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5616506a.437ce1fb.js b/assets/js/5616506a.437ce1fb.js new file mode 100644 index 000000000..12f9e09b5 --- /dev/null +++ b/assets/js/5616506a.437ce1fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5529],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),s=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},p=function(e){var r=s(e.components);return n.createElement(l.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),f=s(t),d=o,m=f["".concat(l,".").concat(d)]||f[d]||u[d]||c;return t?n.createElement(m,i(i({ref:r},p),{},{components:t})):n.createElement(m,i({ref:r},p))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,i=new Array(c);i[0]=d;var a={};for(var l in r)hasOwnProperty.call(r,l)&&(a[l]=r[l]);a.originalType=e,a[f]="string"==typeof e?e:o,i[1]=a;for(var s=2;s{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>c,metadata:()=>a,toc:()=>s});var n=t(373),o=(t(1644),t(6593));const c={title:"Slice"},i="Slice Node",a={unversionedId:"node-reference/slice",id:"node-reference/slice",title:"Slice",description:"",source:"@site/docs/node-reference/slice.mdx",sourceDirName:"node-reference",slug:"/node-reference/slice",permalink:"/docs/node-reference/slice",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/slice.mdx",tags:[],version:"current",frontMatter:{title:"Slice"},sidebar:"nodeReference",previous:{title:"Shuffle",permalink:"/docs/node-reference/shuffle"},next:{title:"Number",permalink:"/docs/node-reference/number"}},l={},s=[],p={toc:s},f="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"slice-node"},"Slice Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/58eb6e39.7fca5a4f.js b/assets/js/58eb6e39.7fca5a4f.js new file mode 100644 index 000000000..ff5a799f7 --- /dev/null +++ b/assets/js/58eb6e39.7fca5a4f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7628],{6593:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var f=n.createContext({}),p=function(e){var r=n.useContext(f),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},l=function(e){var r=p(e.components);return n.createElement(f.Provider,{value:r},e.children)},u="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,f=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=p(t),d=o,m=u["".concat(f,".").concat(d)]||u[d]||s[d]||a;return t?n.createElement(m,c(c({ref:r},l),{},{components:t})):n.createElement(m,c({ref:r},l))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=d;var i={};for(var f in r)hasOwnProperty.call(r,f)&&(i[f]=r[f]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var p=2;p{t.r(r),t.d(r,{assets:()=>f,contentTitle:()=>c,default:()=>s,frontMatter:()=>a,metadata:()=>i,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const a={title:"Wait For Event"},c="Wait For Event Node",i={unversionedId:"node-reference/wait-for-event",id:"node-reference/wait-for-event",title:"Wait For Event",description:"",source:"@site/docs/node-reference/wait-for-event.mdx",sourceDirName:"node-reference",slug:"/node-reference/wait-for-event",permalink:"/docs/node-reference/wait-for-event",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/wait-for-event.mdx",tags:[],version:"current",frontMatter:{title:"Wait For Event"},sidebar:"nodeReference",previous:{title:"Subgraph",permalink:"/docs/node-reference/subgraph"}},f={},p=[],l={toc:p},u="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(u,(0,n.Z)({},l,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"wait-for-event-node"},"Wait For Event Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5fd0304e.9fd23823.js b/assets/js/5fd0304e.9fd23823.js new file mode 100644 index 000000000..525fdb86b --- /dev/null +++ b/assets/js/5fd0304e.9fd23823.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[830],{6593:(e,t,r)=>{r.d(t,{Zo:()=>f,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},f=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,f=i(e,["components","mdxType","originalType","parentName"]),s=p(r),d=o,m=s["".concat(l,".").concat(d)]||s[d]||u[d]||c;return r?n.createElement(m,a(a({ref:t},f),{},{components:r})):n.createElement(m,a({ref:t},f))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[s]="string"==typeof e?e:o,a[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const c={title:"Extract YAML"},a="Extract YAML Node",i={unversionedId:"node-reference/extract-yaml",id:"node-reference/extract-yaml",title:"Extract YAML",description:"",source:"@site/docs/node-reference/extract-yaml.mdx",sourceDirName:"node-reference",slug:"/node-reference/extract-yaml",permalink:"/docs/node-reference/extract-yaml",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/extract-yaml.mdx",tags:[],version:"current",frontMatter:{title:"Extract YAML"},sidebar:"nodeReference",previous:{title:"Extract Object Path",permalink:"/docs/node-reference/extract-object-path"},next:{title:"Object",permalink:"/docs/node-reference/object"}},l={},p=[],f={toc:p},s="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"extract-yaml-node"},"Extract YAML Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6929207c.df551396.js b/assets/js/6929207c.df551396.js new file mode 100644 index 000000000..e8fd5c0d9 --- /dev/null +++ b/assets/js/6929207c.df551396.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4056],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=n.createContext({}),l=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},p=function(e){var r=l(e.components);return n.createElement(s.Provider,{value:r},e.children)},f="mdxType",d={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},u=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=l(t),u=o,m=f["".concat(s,".").concat(u)]||f[u]||d[u]||c;return t?n.createElement(m,a(a({ref:r},p),{},{components:t})):n.createElement(m,a({ref:r},p))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=u;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var l=2;l{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>a,default:()=>d,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={sidebar_label:"To JSON"},a="To JSON Node",i={unversionedId:"node-reference/to-json",id:"node-reference/to-json",title:"To JSON Node",description:"",source:"@site/docs/node-reference/to-json.mdx",sourceDirName:"node-reference",slug:"/node-reference/to-json",permalink:"/docs/node-reference/to-json",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/to-json.mdx",tags:[],version:"current",frontMatter:{sidebar_label:"To JSON"},sidebar:"nodeReference",previous:{title:"To YAML",permalink:"/docs/node-reference/to-yaml"},next:{title:"Assemble Prompt",permalink:"/docs/node-reference/assemble-prompt"}},s={},l=[],p={toc:l},f="wrapper";function d(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"to-json-node"},"To JSON Node"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/69b97305.f804cea6.js b/assets/js/69b97305.f804cea6.js new file mode 100644 index 000000000..0fb385167 --- /dev/null +++ b/assets/js/69b97305.f804cea6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6403],{6593:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),p=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},f=function(e){var r=p(e.components);return n.createElement(l.Provider,{value:r},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),s=p(t),d=o,m=s["".concat(l,".").concat(d)]||s[d]||u[d]||c;return t?n.createElement(m,i(i({ref:r},f),{},{components:t})):n.createElement(m,i({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,i=new Array(c);i[0]=d;var a={};for(var l in r)hasOwnProperty.call(r,l)&&(a[l]=r[l]);a.originalType=e,a[s]="string"==typeof e?e:o,i[1]=a;for(var p=2;p{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>c,metadata:()=>a,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const c={title:"Filter"},i="Filter Node",a={unversionedId:"node-reference/filter",id:"node-reference/filter",title:"Filter",description:"",source:"@site/docs/node-reference/filter.mdx",sourceDirName:"node-reference",slug:"/node-reference/filter",permalink:"/docs/node-reference/filter",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/filter.mdx",tags:[],version:"current",frontMatter:{title:"Filter"},sidebar:"nodeReference",previous:{title:"Array",permalink:"/docs/node-reference/array"},next:{title:"Pop",permalink:"/docs/node-reference/pop"}},l={},p=[],f={toc:p},s="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(s,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"filter-node"},"Filter Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6a925ead.1aa0bbf5.js b/assets/js/6a925ead.1aa0bbf5.js new file mode 100644 index 000000000..53ef9bb4b --- /dev/null +++ b/assets/js/6a925ead.1aa0bbf5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4049],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var u=n.createContext({}),l=function(e){var r=n.useContext(u),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},p=function(e){var r=l(e.components);return n.createElement(u.Provider,{value:r},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,u=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=l(t),d=o,m=f["".concat(u,".").concat(d)]||f[d]||s[d]||c;return t?n.createElement(m,a(a({ref:r},p),{},{components:t})):n.createElement(m,a({ref:r},p))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=d;var i={};for(var u in r)hasOwnProperty.call(r,u)&&(i[u]=r[u]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var l=2;l{t.r(r),t.d(r,{assets:()=>u,contentTitle:()=>a,default:()=>s,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={title:"Number"},a="Number Node",i={unversionedId:"node-reference/number",id:"node-reference/number",title:"Number",description:"",source:"@site/docs/node-reference/number.mdx",sourceDirName:"node-reference",slug:"/node-reference/number",permalink:"/docs/node-reference/number",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/number.mdx",tags:[],version:"current",frontMatter:{title:"Number"},sidebar:"nodeReference",previous:{title:"Slice",permalink:"/docs/node-reference/slice"},next:{title:"RNG",permalink:"/docs/node-reference/rng"}},u={},l=[],p={toc:l},f="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"number-node"},"Number Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6d65ed57.b763dd5d.js b/assets/js/6d65ed57.b763dd5d.js new file mode 100644 index 000000000..7d921f6de --- /dev/null +++ b/assets/js/6d65ed57.b763dd5d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6635],{6593:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),i=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},l=function(e){var t=i(e.components);return n.createElement(u.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,u=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=i(r),d=o,m=s["".concat(u,".").concat(d)]||s[d]||f[d]||a;return r?n.createElement(m,c(c({ref:t},l),{},{components:r})):n.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=d;var p={};for(var u in t)hasOwnProperty.call(t,u)&&(p[u]=t[u]);p.originalType=e,p[s]="string"==typeof e?e:o,c[1]=p;for(var i=2;i{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>p,toc:()=>i});var n=r(373),o=(r(1644),r(6593));const a={title:"Graph Output"},c="Graph Output Node",p={unversionedId:"node-reference/graph-output",id:"node-reference/graph-output",title:"Graph Output",description:"",source:"@site/docs/node-reference/graph-output.mdx",sourceDirName:"node-reference",slug:"/node-reference/graph-output",permalink:"/docs/node-reference/graph-output",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/graph-output.mdx",tags:[],version:"current",frontMatter:{title:"Graph Output"},sidebar:"nodeReference",previous:{title:"Get Dataset Row",permalink:"/docs/node-reference/get-dataset-row"},next:{title:"Graph Input",permalink:"/docs/node-reference/graph-input"}},u={},i=[],l={toc:i},s="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"graph-output-node"},"Graph Output Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7b9cf692.ab35bd87.js b/assets/js/7b9cf692.ab35bd87.js new file mode 100644 index 000000000..8653fb6cf --- /dev/null +++ b/assets/js/7b9cf692.ab35bd87.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2525],{6593:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(1644);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},d=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),p=i(r),u=a,m=p["".concat(s,".").concat(u)]||p[u]||f[u]||o;return r?n.createElement(m,c(c({ref:t},d),{},{components:r})):n.createElement(m,c({ref:t},d))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,c[1]=l;for(var i=2;i{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>i});var n=r(373),a=(r(1644),r(6593));const o={title:"Get All Dataset"},c="Get All Dataset Node",l={unversionedId:"node-reference/get-all-datasets",id:"node-reference/get-all-datasets",title:"Get All Dataset",description:"",source:"@site/docs/node-reference/get-all-datasets.mdx",sourceDirName:"node-reference",slug:"/node-reference/get-all-datasets",permalink:"/docs/node-reference/get-all-datasets",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/get-all-datasets.mdx",tags:[],version:"current",frontMatter:{title:"Get All Dataset"},sidebar:"nodeReference",previous:{title:"Create Dataset",permalink:"/docs/node-reference/create-dataset"},next:{title:"Get Dataset Row",permalink:"/docs/node-reference/get-dataset-row"}},s={},i=[],d={toc:i},p="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"get-all-dataset-node"},"Get All Dataset Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7fa4d008.31e369bf.js b/assets/js/7fa4d008.31e369bf.js new file mode 100644 index 000000000..aee7dda78 --- /dev/null +++ b/assets/js/7fa4d008.31e369bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4021],{6593:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>b});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var p=n.createContext({}),u=function(e){var r=n.useContext(p),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},l=function(e){var r=u(e.components);return n.createElement(p.Provider,{value:r},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),s=u(t),d=o,b=s["".concat(p,".").concat(d)]||s[d]||f[d]||a;return t?n.createElement(b,c(c({ref:r},l),{},{components:t})):n.createElement(b,c({ref:r},l))}));function b(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=d;var i={};for(var p in r)hasOwnProperty.call(r,p)&&(i[p]=r[p]);i.originalType=e,i[s]="string"==typeof e?e:o,c[1]=i;for(var u=2;u{t.r(r),t.d(r,{assets:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>i,toc:()=>u});var n=t(373),o=(t(1644),t(6593));const a={title:"Subgraph"},c="Subgraph Node",i={unversionedId:"node-reference/subgraph",id:"node-reference/subgraph",title:"Subgraph",description:"",source:"@site/docs/node-reference/subgraph.mdx",sourceDirName:"node-reference",slug:"/node-reference/subgraph",permalink:"/docs/node-reference/subgraph",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/subgraph.mdx",tags:[],version:"current",frontMatter:{title:"Subgraph"},sidebar:"nodeReference",previous:{title:"Set Global",permalink:"/docs/node-reference/set-global"},next:{title:"Wait For Event",permalink:"/docs/node-reference/wait-for-event"}},p={},u=[],l={toc:u},s="wrapper";function f(e){let{components:r,...t}=e;return(0,o.kt)(s,(0,n.Z)({},l,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"subgraph-node"},"Subgraph Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/85b0010d.7e59c6f4.js b/assets/js/85b0010d.7e59c6f4.js new file mode 100644 index 000000000..24939d4ca --- /dev/null +++ b/assets/js/85b0010d.7e59c6f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4380],{6593:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>h});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),p=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return a.createElement(u.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,u=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),d=p(n),m=r,h=d["".concat(u,".").concat(m)]||d[m]||c[m]||o;return n?a.createElement(h,l(l({ref:t},s),{},{components:n})):a.createElement(h,l({ref:t},s))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[d]="string"==typeof e?e:r,l[1]=i;for(var p=2;p{n.d(t,{Z:()=>l});var a=n(1644),r=n(156);const o={tabItem:"tabItem_hFhF"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,l),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(373),r=n(1644),o=n(156),l=n(1476),i=n(2824),u=n(9643),p=n(7190),s=n(6985);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function c(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,u._X)(o),(0,r.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,o=c(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[u,p]=h({queryString:n,groupId:a}),[d,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,s.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:a}),f=(()=>{const e=u??d;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),p(e),k(e)}),[p,k,o]),tabValues:o}}var f=n(8810);const g={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function N(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:p}=e;const s=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),c=e=>{const t=e.currentTarget,n=s.indexOf(t),a=p[n].value;a!==i&&(d(t),u(a))},m=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=s.indexOf(e.currentTarget)+1;t=s[n]??s[0];break}case"ArrowLeft":{const n=s.indexOf(e.currentTarget)-1;t=s[n]??s[s.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>s.push(e),onKeyDown:m,onClick:c},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=k(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},r.createElement(N,(0,a.Z)({},e,t)),r.createElement(b,(0,a.Z)({},e,t)))}function y(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},476:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>u,default:()=>h,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var a=n(373),r=(n(1644),n(6593)),o=n(6663),l=n(7026);const i={id:"code",title:"Code Node",sidebar_label:"Code"},u=void 0,p={unversionedId:"node-reference/code",id:"node-reference/code",title:"Code Node",description:"Code Node Screenshot",source:"@site/docs/node-reference/code.mdx",sourceDirName:"node-reference",slug:"/node-reference/code",permalink:"/docs/node-reference/code",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/code.mdx",tags:[],version:"current",frontMatter:{id:"code",title:"Code Node",sidebar_label:"Code"},sidebar:"nodeReference",previous:{title:"Vector Nearest Neighbors",permalink:"/docs/node-reference/vector-knn"},next:{title:"Comment",permalink:"/docs/node-reference/comment"}},s={},d=[{value:"Overview",id:"overview",level:2},{value:"Code Inputs",id:"code-inputs",level:3},{value:"Code Outputs",id:"code-outputs",level:3},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Use .slice to get a substring",id:"example-1-use-slice-to-get-a-substring",level:2},{value:"Example 2: Concatenate two strings, and output the length and the string.",id:"example-2-concatenate-two-strings-and-output-the-length-and-the-string",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],c={toc:d},m="wrapper";function h(e){let{components:t,...i}=e;return(0,r.kt)(m,(0,a.Z)({},c,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Code Node Screenshot",src:n(6842).Z,width:"284",height:"223"})),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Code Node allows you to run arbitrary JavaScript code during your graph's execution. This can be useful for a variety of purposes, such as:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Performing complex calculations"),(0,r.kt)("li",{parentName:"ul"},"Custom, domain-specific logic that is complex to represent in Rivet nodes alone"),(0,r.kt)("li",{parentName:"ul"},"Using JavaScript functions that are not available in other nodes")),(0,r.kt)("h3",{id:"code-inputs"},"Code Inputs"),(0,r.kt)("p",null,"The inputs to the code node are accessible in the special variable ",(0,r.kt)("inlineCode",{parentName:"p"},"inputs"),". To access the input named ",(0,r.kt)("inlineCode",{parentName:"p"},"foo"),", it is accessible on ",(0,r.kt)("inlineCode",{parentName:"p"},"inputs.foo"),"."),(0,r.kt)("p",null,"All inputs have the following structure:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"{\n type: string;\n value: any;\n}\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"type")," of each input corresponds to a ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/data-types"},"Data Type"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"value")," is the actual value of the input."),(0,r.kt)("p",null,"For example, if you have an input named ",(0,r.kt)("inlineCode",{parentName:"p"},"myNumber")," that is a number, you can access it in the code node like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"const foo = inputs.myNumber.value; // inputs.myNumber.type === 'number'\n")),(0,r.kt)("h3",{id:"code-outputs"},"Code Outputs"),(0,r.kt)("p",null,"The code node ",(0,r.kt)("strong",{parentName:"p"},"must")," ",(0,r.kt)("inlineCode",{parentName:"p"},"return")," an object containing the output values. Each property of the output object must correspond to one of the configured output names in the editor."),(0,r.kt)("p",null,"Each of the values of the properties must be an object with the ",(0,r.kt)("inlineCode",{parentName:"p"},"{type: DataType; value: any}")," structure described above."),(0,r.kt)("p",null,"For example, if you have an output named ",(0,r.kt)("inlineCode",{parentName:"p"},"myNumber")," that is a number, you can return it like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"return {\n myNumber: {\n type: 'number',\n value: 123,\n },\n};\n")),(0,r.kt)(o.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"(custom names)"),(0,r.kt)("td",{parentName:"tr",align:null},"Any"),(0,r.kt)("td",{parentName:"tr",align:null},"The input values passed into the code function. Dynamic based on the inputs configured in the editor."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"undefined")),(0,r.kt)("td",{parentName:"tr",align:null},"Always accepts any data type."))))),(0,r.kt)(l.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"(custom names)"),(0,r.kt)("td",{parentName:"tr",align:null},"Any"),(0,r.kt)("td",{parentName:"tr",align:null},"The outputs from the execution of the code node. Dynamic based on the"),(0,r.kt)("td",{parentName:"tr",align:null},"NOTES"))))),(0,r.kt)(l.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Inputs"),(0,r.kt)("td",{parentName:"tr",align:null},"The names of the inputs that can be accessible inside the code node. The names of the inputs configured here correspond with the properties of the provided ",(0,r.kt)("inlineCode",{parentName:"td"},"inputs")," variable. Each input creates a corresponding input port on the node."),(0,r.kt)("td",{parentName:"tr",align:null},"A single input named ",(0,r.kt)("inlineCode",{parentName:"td"},"input")),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Outputs"),(0,r.kt)("td",{parentName:"tr",align:null},"The names of the outputs that the code node will return. The names of the outputs configured here must correspond with the properties of the object returned by the Code node. Each output creates a corresponding output port on the node."),(0,r.kt)("td",{parentName:"tr",align:null},"A single output named ",(0,r.kt)("inlineCode",{parentName:"td"},"output")),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")))))),(0,r.kt)("h2",{id:"example-1-use-slice-to-get-a-substring"},"Example 1: Use ",(0,r.kt)("inlineCode",{parentName:"h2"},".slice")," to get a substring"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create a Code Node with the following code:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre",className:"language-js"},"return {\n output: {\n type: 'string',\n value: inputs.input.value.slice(0, 5),\n },\n};\n"))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create a Text node, give it the value ",(0,r.kt)("inlineCode",{parentName:"p"},"Hello World"),", and connect it to the Code Node's ",(0,r.kt)("inlineCode",{parentName:"p"},"input")," port.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Run the graph. Note that the Code Node's output is ",(0,r.kt)("inlineCode",{parentName:"p"},"Hello"),"."))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Code Node Example 1",src:n(2620).Z,width:"713",height:"276"})),(0,r.kt)("h2",{id:"example-2-concatenate-two-strings-and-output-the-length-and-the-string"},"Example 2: Concatenate two strings, and output the length and the string."),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create a Code Node with the following code:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre",className:"language-js"},"const concatenated = inputs.input1.value + inputs.input2.value;\nreturn {\n length: {\n type: 'number',\n value: concatenated.length,\n },\n output: {\n type: 'string',\n value: concatenated,\n },\n};\n"))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Rename the existing input of the Code node to ",(0,r.kt)("inlineCode",{parentName:"p"},"input1"),", and add a 2nd input to ",(0,r.kt)("inlineCode",{parentName:"p"},"input2"),". Add a 2nd output named ",(0,r.kt)("inlineCode",{parentName:"p"},"length"),".")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create two Text nodes, give them the values ",(0,r.kt)("inlineCode",{parentName:"p"},"Hello")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"World"),", and connect them to the Code Node's ",(0,r.kt)("inlineCode",{parentName:"p"},"input1")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"input2")," ports, respectively.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Run the graph. Note that the Code Node outputs ",(0,r.kt)("inlineCode",{parentName:"p"},"HelloWorld")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"10"),"."))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Code Node Example 2",src:n(1610).Z,width:"722",height:"467"})),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"If any error happens during the execution of the Code Node, then the node will error."),(0,r.kt)("p",null,"If you are unsure of the type of value passed into the code node, for example when reusing it in multiple places, you can and should check the ",(0,r.kt)("inlineCode",{parentName:"p"},"type")," of the input before using it. For example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"if (inputs.input.type === 'string') {\n // Do something with inputs.input.value\n}\n")),(0,r.kt)("p",null,"If you throw an ",(0,r.kt)("inlineCode",{parentName:"p"},"Error")," in the code node, then it will error."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: How is the code node implemented?")),(0,r.kt)("p",null,"A: The Code Node is implemented using a ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/Function"},"Function constructor")," with, as of right now, only one argument passed in to it - ",(0,r.kt)("inlineCode",{parentName:"p"},"inputs"),". This is the same as if you were to write the following code:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"function codeNode(inputs) {\n // Code here\n}\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use ",(0,r.kt)("inlineCode",{parentName:"strong"},"require")," or ",(0,r.kt)("inlineCode",{parentName:"strong"},"import")," in the code node?")),(0,r.kt)("p",null,"A: No. The code node is executed in a sandboxed environment, and does not have access to the ",(0,r.kt)("inlineCode",{parentName:"p"},"require")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"import")," functions. If you need to ",(0,r.kt)("inlineCode",{parentName:"p"},"require")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"import"),", ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/external-call"},"use an External Call Node")," instead, or ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/plugins/creating-plugins"},"create a Rivet plugin"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use ",(0,r.kt)("inlineCode",{parentName:"strong"},"async"),"/",(0,r.kt)("inlineCode",{parentName:"strong"},"await")," in the code node?")),(0,r.kt)("p",null,"A: No. The code node is executed synchronously, and does not support ",(0,r.kt)("inlineCode",{parentName:"p"},"async"),"/",(0,r.kt)("inlineCode",{parentName:"p"},"await"),". As you cannot use external libraries in a Code node, there is no need for ",(0,r.kt)("inlineCode",{parentName:"p"},"async"),"/",(0,r.kt)("inlineCode",{parentName:"p"},"await")," support anyway. Use an ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/external-call"},"External Call Node")," instead."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use external libraries in the code node?")),(0,r.kt)("p",null,"A: No. The code node is executed in a sandboxed environment, and does not have access to external libraries. Use an ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/external-call"},"External Call Node")," instead."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use ",(0,r.kt)("inlineCode",{parentName:"strong"},"console.log")," in the code node?")),(0,r.kt)("p",null,"A: No, the ",(0,r.kt)("inlineCode",{parentName:"p"},"console")," variable is not available in a code node."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can the code node function like an ",(0,r.kt)("a",{parentName:"strong",href:"/docs/node-reference/if"},"If Node"),"?")),(0,r.kt)("p",null,"A: Yes. If you return the special value ",(0,r.kt)("inlineCode",{parentName:"p"},"{ type: 'control-flow-excluded', value: undefined }")," from the Code node, then the nodes after the Code node will be excluded from the graph's execution. This is useful if you want to conditionally execute a portion of the graph."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Is there any timeout? What if I create an infinite loop?")),(0,r.kt)("p",null,"A: There is no timeout. If you create an infinite loop, then the graph will hang indefinitely."),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/external-call"},"External Call Node"))))}h.isMDXComponent=!0},2620:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/code-node-example-01-f536bd61a987a67b15df6726c76d97e0.png"},1610:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/code-node-example-02-1669f3d0b92afe2840de45067e1139d3.png"},6842:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/code-node-80b3f477341e5d11c7524f83c8e5857a.png"}}]); \ No newline at end of file diff --git a/assets/js/863dcfce.99285c4e.js b/assets/js/863dcfce.99285c4e.js new file mode 100644 index 000000000..ecce2e07f --- /dev/null +++ b/assets/js/863dcfce.99285c4e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7594],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var d=n.createContext({}),l=function(e){var t=n.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(d.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,d=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),s=l(r),u=o,m=s["".concat(d,".").concat(u)]||s[u]||f[u]||c;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,i=new Array(c);i[0]=u;var a={};for(var d in t)hasOwnProperty.call(t,d)&&(a[d]=t[d]);a.originalType=e,a[s]="string"==typeof e?e:o,i[1]=a;for(var l=2;l{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>f,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=r(373),o=(r(1644),r(6593));const c={title:"Get Embedding"},i="Get Embedding Node",a={unversionedId:"node-reference/get-embedding",id:"node-reference/get-embedding",title:"Get Embedding",description:"",source:"@site/docs/node-reference/get-embedding.mdx",sourceDirName:"node-reference",slug:"/node-reference/get-embedding",permalink:"/docs/node-reference/get-embedding",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/get-embedding.mdx",tags:[],version:"current",frontMatter:{title:"Get Embedding"},sidebar:"nodeReference",previous:{title:"GPT Function",permalink:"/docs/node-reference/gpt-function"},next:{title:"Trim Chat Messages",permalink:"/docs/node-reference/trim-chat-messages"}},d={},l=[],p={toc:l},s="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"get-embedding-node"},"Get Embedding Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/872df9f4.b75438cd.js b/assets/js/872df9f4.b75438cd.js new file mode 100644 index 000000000..6cadbe3da --- /dev/null +++ b/assets/js/872df9f4.b75438cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1422],{6593:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),p=s(n),m=r,h=p["".concat(u,".").concat(m)]||p[m]||c[m]||l;return n?a.createElement(h,i(i({ref:t},d),{},{components:n})):a.createElement(h,i({ref:t},d))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{n.d(t,{Z:()=>p});var a=n(1644),r=n(156),l=n(3840),i=n(7600);const o={admonition:"admonition_sz1_",admonitionHeading:"admonitionHeading_xwjo",admonitionIcon:"admonitionIcon_pI1Y",admonitionContent:"admonitionContent_PUiD"};const u={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(i.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(i.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(i.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(i.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(i.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},s={secondary:"note",important:"info",success:"tip",warning:"danger"};function d(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),r=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:r}}(e.children);return{...e,title:e.title??t,children:n}}function p(e){const{children:t,type:n,title:i,icon:p}=d(e),c=function(e){const t=s[e]??e,n=u[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),u.info)}(n),m=i??c.label,{iconComponent:h}=c,f=p??a.createElement(h,null);return a.createElement("div",{className:(0,r.Z)(l.k.common.admonition,l.k.common.admonitionType(e.type),"alert",`alert--${c.infimaClassName}`,o.admonition)},a.createElement("div",{className:o.admonitionHeading},a.createElement("span",{className:o.admonitionIcon},f),m),a.createElement("div",{className:o.admonitionContent},t))}},7026:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(373),r=n(1644),l=n(156),i=n(1476),o=n(2824),u=n(9643),s=n(7190),d=n(6985);function p(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function c(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=c(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,s]=h({queryString:n,groupId:a}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,d.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),y=(()=>{const e=u??p;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{y&&o(y)}),[y]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var y=n(8810);const g={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function k(e){let{className:t,block:n,selectedValue:o,selectValue:u,tabValues:s}=e;const d=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),c=e=>{const t=e.currentTarget,n=d.indexOf(t),a=s[n].value;a!==o&&(p(t),u(a))},m=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=d.indexOf(e.currentTarget)+1;t=d[n]??d[0];break}case"ArrowLeft":{const n=d.indexOf(e.currentTarget)-1;t=d[n]??d[d.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>d.push(e),onKeyDown:m,onClick:c},i,{className:(0,l.Z)("tabs__item",g.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function b(e){const t=f(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",g.tabList)},r.createElement(k,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function v(e){const t=(0,y.Z)();return r.createElement(b,(0,a.Z)({key:String(t)},e))}},1407:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>u,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var a=n(373),r=(n(1644),n(6593)),l=n(6663),i=n(7026);n(4198);const o={id:"array",title:"Array Node",sidebar_label:"Array"},u=void 0,s={unversionedId:"node-reference/array",id:"node-reference/array",title:"Array Node",description:"Overview",source:"@site/docs/node-reference/array.mdx",sourceDirName:"node-reference",slug:"/node-reference/array",permalink:"/docs/node-reference/array",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/array.mdx",tags:[],version:"current",frontMatter:{id:"array",title:"Array Node",sidebar_label:"Array"},sidebar:"nodeReference",previous:{title:"Trim Chat Messages",permalink:"/docs/node-reference/trim-chat-messages"},next:{title:"Filter",permalink:"/docs/node-reference/filter"}},d={},p=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Creating an Array from Multiple Inputs",id:"example-1-creating-an-array-from-multiple-inputs",level:3},{value:"Example 2: Creating an Array from Array Inputs",id:"example-2-creating-an-array-from-array-inputs",level:3},{value:"Example 3: Creating an Array without Flattening",id:"example-3-creating-an-array-without-flattening",level:3},{value:"Example 4: Using the Indices Output",id:"example-4-using-the-indices-output",level:3},{value:"Flattening Arrays",id:"flattening-arrays",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"See Also",id:"see-also",level:2}],c={toc:p},m="wrapper";function h(e){let{components:t,...o}=e;return(0,r.kt)(m,(0,a.Z)({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Array Node is used to construct an array from one or more inputs of any type. It can also be used to merge multiple arrays into a single array using the ",(0,r.kt)("inlineCode",{parentName:"p"},"Flatten")," setting."),(0,r.kt)("p",null,"By default, inputs will be flattened, so if any of the inputs are arrays themselves, they will be merged into the output array. This behavior can be disabled by unchecking the ",(0,r.kt)("inlineCode",{parentName:"p"},"Flatten")," setting."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Array Node Screenshot",src:n(4586).Z,width:"776",height:"894"})),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Input ","[i]"),(0,r.kt)("td",{parentName:"tr",align:null},"any"),(0,r.kt)("td",{parentName:"tr",align:null},"The ith input to be added to the array"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A"),(0,r.kt)("td",{parentName:"tr",align:null},"Dynamic number of inputs based on how many connections there are"))))),(0,r.kt)(i.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Output"),(0,r.kt)("td",{parentName:"tr",align:null},"any[]"),(0,r.kt)("td",{parentName:"tr",align:null},"The array created from the inputs"),(0,r.kt)("td",{parentName:"tr",align:null},"The output will be a single array containing all valid inputs")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Indices"),(0,r.kt)("td",{parentName:"tr",align:null},"number[]"),(0,r.kt)("td",{parentName:"tr",align:null},"The indices of the elements in the array"),(0,r.kt)("td",{parentName:"tr",align:null},"The output will be an array of numbers representing the array indices"))))),(0,r.kt)(i.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Flatten"),(0,r.kt)("td",{parentName:"tr",align:null},"If enabled, array inputs will be flattened before joining"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"No")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Deep"),(0,r.kt)("td",{parentName:"tr",align:null},"If enabled, array inputs will be flattened recursively"),(0,r.kt)("td",{parentName:"tr",align:null},"false"),(0,r.kt)("td",{parentName:"tr",align:null},"No")))))),(0,r.kt)("h3",{id:"example-1-creating-an-array-from-multiple-inputs"},"Example 1: Creating an Array from Multiple Inputs"),(0,r.kt)("p",null,"Let's say you have three Text nodes: one with the value ",(0,r.kt)("inlineCode",{parentName:"p"},'"Hello"'),", another with the value ",(0,r.kt)("inlineCode",{parentName:"p"},'"World"'),", and the last one with the value ",(0,r.kt)("inlineCode",{parentName:"p"},'"!"'),". If you want to create an array from these three strings, you can do the following:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Add an Array Node to your graph."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the first Text node to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Array Node."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the second Text node to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input 2")," of the Array Node."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the third Text node to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input 3")," of the Array Node.")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Output")," of the Array Node will now be ",(0,r.kt)("inlineCode",{parentName:"p"},'["Hello", "World", "!"]'),"."),(0,r.kt)("h3",{id:"example-2-creating-an-array-from-array-inputs"},"Example 2: Creating an Array from Array Inputs"),(0,r.kt)("p",null,"Imagine you have two Array nodes: one with the value ",(0,r.kt)("inlineCode",{parentName:"p"},'["One", "Two"]')," and the other with the value ",(0,r.kt)("inlineCode",{parentName:"p"},'["Three", "Four"]'),". If you want to create a new array from these two arrays, you can do the following:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Add an Array Node to your graph."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the first Array node to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Array Node."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the second Array node to ",(0,r.kt)("inlineCode",{parentName:"li"},"Input 2")," of the Array Node."),(0,r.kt)("li",{parentName:"ol"},"Enable the ",(0,r.kt)("inlineCode",{parentName:"li"},"Flatten")," setting.")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Output")," of the Array Node will now be ",(0,r.kt)("inlineCode",{parentName:"p"},'["One", "Two", "Three", "Four"]'),"."),(0,r.kt)("h3",{id:"example-3-creating-an-array-without-flattening"},"Example 3: Creating an Array without Flattening"),(0,r.kt)("p",null,"If you want to create an array from arrays without flattening them, you can do the same steps as in Example 2, but leave the ",(0,r.kt)("inlineCode",{parentName:"p"},"Flatten")," setting disabled. The ",(0,r.kt)("inlineCode",{parentName:"p"},"Output")," of the Array Node will then be ",(0,r.kt)("inlineCode",{parentName:"p"},'[["One", "Two"], ["Three", "Four"]]'),"."),(0,r.kt)("h3",{id:"example-4-using-the-indices-output"},"Example 4: Using the Indices Output"),(0,r.kt)("p",null,"Let's say you have an Array Node with the value ",(0,r.kt)("inlineCode",{parentName:"p"},'["Apple", "Banana", "Cherry"]'),". If you want to create a new array where each element is a string that includes the index and the corresponding fruit name from the original array, you can do the following:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Add a Text Node to your graph with the text ",(0,r.kt)("inlineCode",{parentName:"li"},'"[{{index}}] - {{fruit}}"'),"."),(0,r.kt)("li",{parentName:"ol"},"Connect the ",(0,r.kt)("inlineCode",{parentName:"li"},"Output")," of the Array Node to the ",(0,r.kt)("inlineCode",{parentName:"li"},"Fruit")," input of the Text Node."),(0,r.kt)("li",{parentName:"ol"},"Connect the ",(0,r.kt)("inlineCode",{parentName:"li"},"Indices")," output of the Array Node to the ",(0,r.kt)("inlineCode",{parentName:"li"},"Index")," input of the Text Node."),(0,r.kt)("li",{parentName:"ol"},"Enable the ",(0,r.kt)("inlineCode",{parentName:"li"},"Split")," setting on the Text Node.")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Output")," of the Text Node will now be ",(0,r.kt)("inlineCode",{parentName:"p"},'["[0] - Apple", "[1] - Banana", "[2] - Cherry"]'),"."),(0,r.kt)("p",null,"In this example, the ",(0,r.kt)("inlineCode",{parentName:"p"},"Indices")," output of the Array Node gives us an array of indices that corresponds to the elements of the original array. We then use these indices along with the original array elements to create a new array of formatted strings. The ",(0,r.kt)("inlineCode",{parentName:"p"},"Split")," setting ensures that the Text Node generates a separate output for each element of the input arrays."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Array Node Example 4",src:n(8061).Z,width:"1420",height:"954"})),(0,r.kt)("h2",{id:"flattening-arrays"},"Flattening Arrays"),(0,r.kt)("p",null,"The Array Node has a ",(0,r.kt)("inlineCode",{parentName:"p"},"Flatten")," setting. When enabled, this setting treats each element of an array input as a separate element to be added to the main array. This is particularly useful when you're dealing with array inputs and want to merge all elements of these arrays into a single array."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Note that with flatten disabled you can get arrays of arrays. These are not well supported in Rivet and you may have to use a ",(0,r.kt)("a",{parentName:"p",href:"./code"},"Code Node")," to work with them.")),(0,r.kt)("p",null,"If the ",(0,r.kt)("inlineCode",{parentName:"p"},"Deep")," setting is enabled, the Array Node will recursively flatten all array inputs. This means that if an array input contains another array, the Array Node will flatten the inner array as well. You can\nuse the Array Node as a Flatten node this way."),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"If an input is missing or null, the Array Node will simply ignore it during the array creation process. This can be useful when dealing with optional inputs that may not always be present."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What happens if I connect a non-array node to the Array Node?")),(0,r.kt)("p",null,"A: The Array Node is designed to work with any type of inputs. If a non-array input is connected, the node will treat it as a single element to be added to the array."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I connect an Array Node to another Array Node?")),(0,r.kt)("p",null,"A: Yes, you can connect an Array Node to another Array Node. If the ",(0,r.kt)("inlineCode",{parentName:"p"},"Flatten")," setting is enabled, each element of the input array will be treated as a separate element to be added to the main array. If ",(0,r.kt)("inlineCode",{parentName:"p"},"Flatten")," is disabled, the input array will be added as a single element to the main array."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What happens if an input is missing or null?")),(0,r.kt)("p",null,"A: If an input is missing or null, the Array Node will simply ignore it during the array creation process. This can be useful when dealing with optional inputs that may not always be present."),(0,r.kt)("h2",{id:"see-also"},"See Also"))}h.isMDXComponent=!0},8061:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/array-node-example-04-95a5d9a94e944282c085234416f5ae1a.png"},4586:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/array-node-99e6a62f120414de323471c7f92b56af.png"}}]); \ No newline at end of file diff --git a/assets/js/88d215e8.c2516d1f.js b/assets/js/88d215e8.c2516d1f.js new file mode 100644 index 000000000..3ce890f9b --- /dev/null +++ b/assets/js/88d215e8.c2516d1f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[58],{6593:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=n.createContext({}),p=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(r),d=o,m=f["".concat(i,".").concat(d)]||f[d]||u[d]||c;return r?n.createElement(m,a(a({ref:t},s),{},{components:r})):n.createElement(m,a({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[f]="string"==typeof e?e:o,a[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>l,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const c={title:"HTTP Call"},a="HTTP Call Node",l={unversionedId:"node-reference/http-call",id:"node-reference/http-call",title:"HTTP Call",description:"",source:"@site/docs/node-reference/http-call.mdx",sourceDirName:"node-reference",slug:"/node-reference/http-call",permalink:"/docs/node-reference/http-call",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/http-call.mdx",tags:[],version:"current",frontMatter:{title:"HTTP Call"},sidebar:"nodeReference",previous:{title:"Get Global",permalink:"/docs/node-reference/get-global"},next:{title:"Raise Event",permalink:"/docs/node-reference/raise-event"}},i={},p=[],s={toc:p},f="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"http-call-node"},"HTTP Call Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8c232049.39aff0b1.js b/assets/js/8c232049.39aff0b1.js new file mode 100644 index 000000000..1c8c82bce --- /dev/null +++ b/assets/js/8c232049.39aff0b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6069],{6593:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>b});var n=r(1644);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),s=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),d=s(r),m=a,b=d["".concat(i,".").concat(m)]||d[m]||p[m]||l;return r?n.createElement(b,o(o({ref:t},c),{},{components:r})):n.createElement(b,o({ref:t},c))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,o=new Array(l);o[0]=m;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[d]="string"==typeof e?e:a,o[1]=u;for(var s=2;s{r.d(t,{Z:()=>o});var n=r(1644),a=r(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:r,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:r},t)}},6663:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(373),a=r(1644),l=r(156),o=r(1476),u=r(2824),i=r(9643),s=r(7190),c=r(6985);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function p(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??d(r);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:r}=e;const n=(0,u.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The 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 r??null}({queryString:t,groupId:r});return[(0,i._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function f(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,l=p(e),[o,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[i,s]=b({queryString:r,groupId:n}),[d,f]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:n}),h=(()=>{const e=i??d;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{h&&u(h)}),[h]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),f(e)}),[s,f,l]),tabValues:l}}var h=r(8810);const v={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function g(e){let{className:t,block:r,selectedValue:u,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,r=c.indexOf(t),n=s[r].value;n!==u&&(d(t),i(n))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},s.map((e=>{let{value:t,label:r,attributes:o}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,l.Z)("tabs__item",v.tabItem,o?.className,{"tabs__item--active":u===t})}),r??t)})))}function k(e){let{lazy:t,children:r,selectedValue:n}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=f(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",v.tabList)},a.createElement(g,(0,n.Z)({},e,t)),a.createElement(k,(0,n.Z)({},e,t)))}function N(e){const t=(0,h.Z)();return a.createElement(y,(0,n.Z)({key:String(t)},e))}},5056:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>b,frontMatter:()=>u,metadata:()=>s,toc:()=>d});var n=r(373),a=(r(1644),r(6593)),l=r(6663),o=r(7026);const u={title:"Vector Nearest Neighbors"},i="Vector Nearest Neighbors Node",s={unversionedId:"node-reference/vector-knn",id:"node-reference/vector-knn",title:"Vector Nearest Neighbors",description:"Overview",source:"@site/docs/node-reference/vector-knn.mdx",sourceDirName:"node-reference",slug:"/node-reference/vector-knn",permalink:"/docs/node-reference/vector-knn",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/vector-knn.mdx",tags:[],version:"current",frontMatter:{title:"Vector Nearest Neighbors"},sidebar:"nodeReference",previous:{title:"Vector Store",permalink:"/docs/node-reference/vector-store"},next:{title:"Code",permalink:"/docs/node-reference/code"}},c={},d=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"See Also",id:"see-also",level:2}],p={toc:d},m="wrapper";function b(e){let{components:t,...u}=e;return(0,a.kt)(m,(0,n.Z)({},p,u,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"vector-nearest-neighbors-node"},"Vector Nearest Neighbors Node"),(0,a.kt)("h2",{id:"overview"},"Overview"),(0,a.kt)("p",null,"The Vector KNN Node takes a vector embedding and searches for K similar vectors."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Chat Node Screenshot",src:r(8354).Z,width:"486",height:"201"})),(0,a.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,a.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"inputs"},"Inputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Required"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Vector"),(0,a.kt)("td",{parentName:"tr",align:null},"vector"),(0,a.kt)("td",{parentName:"tr",align:null},"The vector you would like to search for nearest neighbors."),(0,a.kt)("td",{parentName:"tr",align:null},"True"))))),(0,a.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"outputs"},"Outputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Results"),(0,a.kt)("td",{parentName:"tr",align:null},"any[]"),(0,a.kt)("td",{parentName:"tr",align:null},"Array of nearest K neighbors."))))),(0,a.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,a.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Setting"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Integration"),(0,a.kt)("td",{parentName:"tr",align:null},"Which integrated store to use.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"K"),(0,a.kt)("td",{parentName:"tr",align:null},"Number of nearest neighbors to return.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Collection Id"),(0,a.kt)("td",{parentName:"tr",align:null},"Which collection to store the vector.")))))),(0,a.kt)("h2",{id:"see-also"},"See Also"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/user-guide/plugins/built-in/pinecone"},"Pinecone"))))}b.isMDXComponent=!0},8354:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/vector-knn-node-437f96dd077ad95db04c08fb38c87db1.png"}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.3798b8ff.js b/assets/js/935f2afb.3798b8ff.js new file mode 100644 index 000000000..b54d59b4d --- /dev/null +++ b/assets/js/935f2afb.3798b8ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[53],{1109:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"userGuide":[{"type":"link","label":"Introduction to Rivet","href":"/docs/","docId":"introduction"},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Installation","href":"/docs/getting-started/installation","docId":"getting-started/installation"},{"type":"link","label":"Setup","href":"/docs/getting-started/setup","docId":"getting-started/setup"},{"type":"link","label":"First AI Agent","href":"/docs/getting-started/first-ai-agent","docId":"getting-started/first-ai-agent"}]},{"type":"category","label":"Working with Rivet","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Overview of the Interface","href":"/docs/user-guide/overview-of-interface","docId":"user-guide/overview-of-interface"},{"type":"link","label":"Working with Nodes","href":"/docs/user-guide/adding-connecting-nodes","docId":"user-guide/adding-connecting-nodes"},{"type":"link","label":"Working with Graphs","href":"/docs/user-guide/working-with-graphs","docId":"user-guide/working-with-graphs"},{"type":"link","label":"Working with Projects","href":"/docs/user-guide/working-with-projects","docId":"user-guide/working-with-projects"},{"type":"link","label":"Executing AI Chains","href":"/docs/user-guide/executing-ai-chains","docId":"user-guide/executing-ai-chains"},{"type":"link","label":"Splitting","href":"/docs/user-guide/splitting","docId":"user-guide/splitting"},{"type":"link","label":"Subgraphs","href":"/docs/user-guide/subgraphs","docId":"user-guide/subgraphs"},{"type":"link","label":"Executors","href":"/docs/user-guide/executors","docId":"user-guide/executors"},{"type":"link","label":"Recordings","href":"/docs/user-guide/recordings","docId":"user-guide/recordings"}]},{"type":"category","label":"Features","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Prompt Designer","href":"/docs/user-guide/features/prompt-designer","docId":"user-guide/features/prompt-designer"},{"type":"link","label":"Trivet Tests","href":"/docs/user-guide/features/trivet-tests","docId":"user-guide/features/trivet-tests"},{"type":"link","label":"Chat Viewer","href":"/docs/user-guide/features/chat-viewer","docId":"user-guide/features/chat-viewer"},{"type":"link","label":"Data Studio","href":"/docs/user-guide/features/data-studio","docId":"user-guide/features/data-studio"}]},{"type":"category","label":"Plugins","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Plugins","href":"/docs/user-guide/plugins","docId":"user-guide/plugins"},{"type":"link","label":"Creating a Plugin","href":"/docs/user-guide/plugins/creating-plugins","docId":"user-guide/plugins/creating-plugins"}]},{"type":"category","label":"Built-In Plugins","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"All Built-In Plugins","href":"/docs/user-guide/plugins/built-in/all","docId":"user-guide/plugins/built-in/all"},{"type":"link","label":"Anthropic","href":"/docs/user-guide/plugins/built-in/anthropic","docId":"user-guide/plugins/built-in/anthropic"},{"type":"link","label":"AssemblyAI","href":"/docs/user-guide/plugins/built-in/assemblyai","docId":"user-guide/plugins/built-in/assemblyai"},{"type":"link","label":"Autoevals","href":"/docs/user-guide/plugins/built-in/autoevals","docId":"user-guide/plugins/built-in/autoevals"},{"type":"link","label":"Gentrace","href":"/docs/user-guide/plugins/built-in/gentrace","docId":"user-guide/plugins/built-in/gentrace"},{"type":"link","label":"Hugging Face","href":"/docs/user-guide/plugins/built-in/huggingface","docId":"user-guide/plugins/built-in/huggingface"},{"type":"link","label":"Pinecone","href":"/docs/user-guide/plugins/built-in/pinecone","docId":"user-guide/plugins/built-in/pinecone"}]},{"type":"category","label":"Debugging","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Live Debugging","href":"/docs/user-guide/live-debugging","docId":"user-guide/live-debugging"},{"type":"link","label":"Remote Debugging","href":"/docs/user-guide/remote-debugging","docId":"user-guide/remote-debugging"}]},{"type":"category","label":"Testing","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Trivet","href":"/docs/trivet","docId":"trivet"},{"type":"link","label":"Getting Started","href":"/docs/user-guide/trivet-getting-started","docId":"user-guide/trivet-getting-started"},{"type":"link","label":"Validation Graphs","href":"/docs/user-guide/trivet-validation-graphs","docId":"user-guide/trivet-validation-graphs"},{"type":"link","label":"Tutorial","href":"/docs/user-guide/trivet-tutorial","docId":"user-guide/trivet-tutorial"},{"type":"link","label":"Trivet Library","href":"/docs/user-guide/trivet-library","docId":"user-guide/trivet-library"}]},{"type":"category","label":"Advanced","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Data Types","href":"/docs/user-guide/data-types","docId":"user-guide/data-types"},{"type":"link","label":"Control Flow","href":"/docs/user-guide/control-flow","docId":"user-guide/control-flow"},{"type":"link","label":"Loops","href":"/docs/user-guide/loops","docId":"user-guide/loops"}]}],"tutorial":[{"type":"link","label":"Rivet Tutorial","href":"/docs/tutorial","docId":"tutorial"},{"type":"link","label":"00 - Installing & Overview","href":"/docs/tutorial/installing-getting-started","docId":"tutorial/installing-getting-started"},{"type":"link","label":"01 - Simple Graph","href":"/docs/tutorial/simple-graph","docId":"tutorial/simple-graph"},{"type":"link","label":"02 - Interpolation & More Node Types","href":"/docs/tutorial/interpolation-more-node-types","docId":"tutorial/interpolation-more-node-types"},{"type":"link","label":"03 - Matching & Conditionals","href":"/docs/tutorial/matching-conditionals","docId":"tutorial/matching-conditionals"},{"type":"link","label":"04 - YAML","href":"/docs/tutorial/yaml","docId":"tutorial/yaml"},{"type":"link","label":"05 - Subgraphs","href":"/docs/tutorial/subgraphs","docId":"tutorial/subgraphs"},{"type":"link","label":"06 - Splitting","href":"/docs/tutorial/splitting","docId":"tutorial/splitting"},{"type":"link","label":"07 - Loops","href":"/docs/tutorial/loops","docId":"tutorial/loops"}],"apiReference":[{"type":"link","label":"Rivet API Reference","href":"/docs/api-reference","docId":"api-reference"},{"type":"link","label":"Rivet Integration Getting Started","href":"/docs/api-reference/getting-started-integration","docId":"api-reference/getting-started-integration"},{"type":"link","label":"Remote Debugging with Rivet","href":"/docs/api-reference/remote-debugging","docId":"api-reference/remote-debugging"},{"type":"category","label":"@rivet/node","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"API Overview","href":"/docs/api-reference/node/overview","docId":"api-reference/node/overview"},{"type":"link","label":"createProcessor","href":"/docs/api-reference/node/createProcessor","docId":"api-reference/node/createProcessor"},{"type":"link","label":"loadProjectFromFile","href":"/docs/api-reference/node/loadProjectFromFile","docId":"api-reference/node/loadProjectFromFile"},{"type":"link","label":"loadProjectFromString","href":"/docs/api-reference/node/loadProjectFromString","docId":"api-reference/node/loadProjectFromString"},{"type":"link","label":"runGraph","href":"/docs/api-reference/node/runGraph","docId":"api-reference/node/runGraph"},{"type":"link","label":"runGraphInFile","href":"/docs/api-reference/node/runGraphInFile","docId":"api-reference/node/runGraphInFile"},{"type":"link","label":"startDebuggerServer","href":"/docs/api-reference/node/startDebuggerServer","docId":"api-reference/node/startDebuggerServer"},{"type":"category","label":"Types","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"DebuggerEvents","href":"/docs/api-reference/node/DebuggerEvents","docId":"api-reference/node/DebuggerEvents"},{"type":"link","label":"LooseDataValue","href":"/docs/api-reference/node/LooseDataValue","docId":"api-reference/node/LooseDataValue"},{"type":"link","label":"RivetDebuggerServer","href":"/docs/api-reference/node/RivetDebuggerServer","docId":"api-reference/node/RivetDebuggerServer"},{"type":"link","label":"RunGraphOptions","href":"/docs/api-reference/node/RunGraphOptions","docId":"api-reference/node/RunGraphOptions"}]}]},{"type":"category","label":"@rivet/core","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"API Overview","href":"/docs/api-reference/core/overview","docId":"api-reference/core/overview"},{"type":"link","label":"DataValue","href":"/docs/api-reference/core/DataValue","docId":"api-reference/core/DataValue"},{"type":"link","label":"GraphProcessor","href":"/docs/api-reference/core/GraphProcessor","docId":"api-reference/core/GraphProcessor"},{"type":"category","label":"Types","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"DataValue","href":"/docs/api-reference/core/DataValue","docId":"api-reference/core/DataValue"},{"type":"link","label":"NodeGraph","href":"/docs/api-reference/core/NodeGraph","docId":"api-reference/core/NodeGraph"},{"type":"link","label":"Project","href":"/docs/api-reference/core/Project","docId":"api-reference/core/Project"},{"type":"link","label":"Settings","href":"/docs/api-reference/core/Settings","docId":"api-reference/core/Settings"}]}]}],"nodeReference":[{"type":"link","label":"Rivet Node Reference","href":"/docs/node-reference","docId":"node-reference"},{"type":"link","label":"All Nodes","href":"/docs/node-reference/all-nodes","docId":"node-reference/all-nodes"},{"type":"category","label":"Text","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Chunk","href":"/docs/node-reference/chunk","docId":"node-reference/chunk"},{"type":"link","label":"Extract with Regex","href":"/docs/node-reference/extract-with-regex","docId":"node-reference/extract-with-regex"},{"type":"link","label":"Join","href":"/docs/node-reference/join","docId":"node-reference/join"},{"type":"link","label":"Prompt","href":"/docs/node-reference/prompt","docId":"node-reference/prompt"},{"type":"link","label":"Split Text","href":"/docs/node-reference/split-text","docId":"node-reference/split-text"},{"type":"link","label":"Text","href":"/docs/node-reference/text","docId":"node-reference/text"},{"type":"link","label":"To YAML","href":"/docs/node-reference/to-yaml","docId":"node-reference/to-yaml"},{"type":"link","label":"To JSON","href":"/docs/node-reference/to-json","docId":"node-reference/to-json"}]},{"type":"category","label":"AI","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Assemble Prompt","href":"/docs/node-reference/assemble-prompt","docId":"node-reference/assemble-prompt"},{"type":"link","label":"Chat","href":"/docs/node-reference/chat","docId":"node-reference/chat"},{"type":"link","label":"GPT Function","href":"/docs/node-reference/gpt-function","docId":"node-reference/gpt-function"},{"type":"link","label":"Get Embedding","href":"/docs/node-reference/get-embedding","docId":"node-reference/get-embedding"},{"type":"link","label":"Trim Chat Messages","href":"/docs/node-reference/trim-chat-messages","docId":"node-reference/trim-chat-messages"}]},{"type":"category","label":"Lists","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Array","href":"/docs/node-reference/array","docId":"node-reference/array"},{"type":"link","label":"Filter","href":"/docs/node-reference/filter","docId":"node-reference/filter"},{"type":"link","label":"Pop","href":"/docs/node-reference/pop","docId":"node-reference/pop"},{"type":"link","label":"Shuffle","href":"/docs/node-reference/shuffle","docId":"node-reference/shuffle"},{"type":"link","label":"Slice","href":"/docs/node-reference/slice","docId":"node-reference/slice"}]},{"type":"category","label":"Numbers","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Number","href":"/docs/node-reference/number","docId":"node-reference/number"},{"type":"link","label":"RNG","href":"/docs/node-reference/rng","docId":"node-reference/rng"}]},{"type":"category","label":"Objects","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Extract JSON","href":"/docs/node-reference/extract-json","docId":"node-reference/extract-json"},{"type":"link","label":"Extract Object Path","href":"/docs/node-reference/extract-object-path","docId":"node-reference/extract-object-path"},{"type":"link","label":"Extract YAML","href":"/docs/node-reference/extract-yaml","docId":"node-reference/extract-yaml"},{"type":"link","label":"Object","href":"/docs/node-reference/object","docId":"node-reference/object"}]},{"type":"category","label":"Logic","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Abort Graph","href":"/docs/node-reference/abort-graph","docId":"node-reference/abort-graph"},{"type":"link","label":"Coalesce","href":"/docs/node-reference/coalesce","docId":"node-reference/coalesce"},{"type":"link","label":"Compare","href":"/docs/node-reference/compare","docId":"node-reference/compare"},{"type":"link","label":"Delay","href":"/docs/node-reference/delay","docId":"node-reference/delay"},{"type":"link","label":"Match","href":"/docs/node-reference/match","docId":"node-reference/match"},{"type":"link","label":"Evaluate","href":"/docs/node-reference/evaluate","docId":"node-reference/evaluate"},{"type":"link","label":"If","href":"/docs/node-reference/if","docId":"node-reference/if"},{"type":"link","label":"If/Else","href":"/docs/node-reference/if-else","docId":"node-reference/if-else"},{"type":"link","label":"Loop Controller","href":"/docs/node-reference/loop-controller","docId":"node-reference/loop-controller"},{"type":"link","label":"Match","href":"/docs/node-reference/match","docId":"node-reference/match"},{"type":"link","label":"Passthrough","href":"/docs/node-reference/passthrough","docId":"node-reference/passthrough"},{"type":"link","label":"Race Inputs","href":"/docs/node-reference/race-inputs","docId":"node-reference/race-inputs"}]},{"type":"category","label":"Input/Output","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Append to Dataset","href":"/docs/node-reference/append-to-dataset","docId":"node-reference/append-to-dataset"},{"type":"link","label":"Create Dataset","href":"/docs/node-reference/create-dataset","docId":"node-reference/create-dataset"},{"type":"link","label":"Get All Dataset","href":"/docs/node-reference/get-all-datasets","docId":"node-reference/get-all-datasets"},{"type":"link","label":"Get Dataset Row","href":"/docs/node-reference/get-dataset-row","docId":"node-reference/get-dataset-row"},{"type":"link","label":"Graph Output","href":"/docs/node-reference/graph-output","docId":"node-reference/graph-output"},{"type":"link","label":"Graph Input","href":"/docs/node-reference/graph-input","docId":"node-reference/graph-input"},{"type":"link","label":"KNN Dataset","href":"/docs/node-reference/knn-dataset","docId":"node-reference/knn-dataset"},{"type":"link","label":"Load Dataset","href":"/docs/node-reference/load-dataset","docId":"node-reference/load-dataset"},{"type":"link","label":"Read Directory","href":"/docs/node-reference/read-directory","docId":"node-reference/read-directory"},{"type":"link","label":"Read File","href":"/docs/node-reference/read-file","docId":"node-reference/read-file"},{"type":"link","label":"User Input","href":"/docs/node-reference/user-input","docId":"node-reference/user-input"},{"type":"link","label":"Vector Store","href":"/docs/node-reference/vector-store","docId":"node-reference/vector-store"},{"type":"link","label":"Vector Nearest Neighbors","href":"/docs/node-reference/vector-knn","docId":"node-reference/vector-knn"}]},{"type":"category","label":"Advanced","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Code","href":"/docs/node-reference/code","docId":"node-reference/code"},{"type":"link","label":"Comment","href":"/docs/node-reference/comment","docId":"node-reference/comment"},{"type":"link","label":"Context","href":"/docs/node-reference/context","docId":"node-reference/context"},{"type":"link","label":"External Call","href":"/docs/node-reference/external-call","docId":"node-reference/external-call"},{"type":"link","label":"Get Global","href":"/docs/node-reference/get-global","docId":"node-reference/get-global"},{"type":"link","label":"HTTP Call","href":"/docs/node-reference/http-call","docId":"node-reference/http-call"},{"type":"link","label":"Raise Event","href":"/docs/node-reference/raise-event","docId":"node-reference/raise-event"},{"type":"link","label":"Set Global","href":"/docs/node-reference/set-global","docId":"node-reference/set-global"},{"type":"link","label":"Subgraph","href":"/docs/node-reference/subgraph","docId":"node-reference/subgraph"},{"type":"link","label":"Wait For Event","href":"/docs/node-reference/wait-for-event","docId":"node-reference/wait-for-event"}]}]},"docs":{"api-reference":{"id":"api-reference","title":"Rivet API Reference","description":"This section of the Rivet documentation goes over the TypeScript APIs for @ironclad/rivet-core and @ironclad/rivet-node.","sidebar":"apiReference"},"api-reference/core/DataValue":{"id":"api-reference/core/DataValue","title":"DataValue","description":"","sidebar":"apiReference"},"api-reference/core/GraphProcessor":{"id":"api-reference/core/GraphProcessor","title":"GraphProcessor","description":"","sidebar":"apiReference"},"api-reference/core/NodeGraph":{"id":"api-reference/core/NodeGraph","title":"NodeGraph","description":"","sidebar":"apiReference"},"api-reference/core/overview":{"id":"api-reference/core/overview","title":"API Overview","description":"","sidebar":"apiReference"},"api-reference/core/Project":{"id":"api-reference/core/Project","title":"Project","description":"","sidebar":"apiReference"},"api-reference/core/Settings":{"id":"api-reference/core/Settings","title":"Settings","description":"Description","sidebar":"apiReference"},"api-reference/getting-started-integration":{"id":"api-reference/getting-started-integration","title":"Rivet Integration Getting Started","description":"Welcome to the starting guide for integrating Rivet into your application! Currently, we only support integration via Node.js using the @ironclad/rivet-node package.","sidebar":"apiReference"},"api-reference/node/createProcessor":{"id":"api-reference/node/createProcessor","title":"createProcessor","description":"","sidebar":"apiReference"},"api-reference/node/DebuggerEvents":{"id":"api-reference/node/DebuggerEvents","title":"DebuggerEvents","description":"","sidebar":"apiReference"},"api-reference/node/loadProjectFromFile":{"id":"api-reference/node/loadProjectFromFile","title":"loadProjectFromFile","description":"Description","sidebar":"apiReference"},"api-reference/node/loadProjectFromString":{"id":"api-reference/node/loadProjectFromString","title":"loadProjectFromString","description":"Description","sidebar":"apiReference"},"api-reference/node/LooseDataValue":{"id":"api-reference/node/LooseDataValue","title":"LooseDataValue","description":"Description","sidebar":"apiReference"},"api-reference/node/overview":{"id":"api-reference/node/overview","title":"API Overview","description":"This is the API overview for the @ironclad/rivet-node Node.js library. Each of the exports in the api.ts file is documented in its own page, as linked below:","sidebar":"apiReference"},"api-reference/node/RivetDebuggerServer":{"id":"api-reference/node/RivetDebuggerServer","title":"RivetDebuggerServer","description":"","sidebar":"apiReference"},"api-reference/node/runGraph":{"id":"api-reference/node/runGraph","title":"runGraph","description":"Description","sidebar":"apiReference"},"api-reference/node/runGraphInFile":{"id":"api-reference/node/runGraphInFile","title":"runGraphInFile","description":"Description","sidebar":"apiReference"},"api-reference/node/RunGraphOptions":{"id":"api-reference/node/RunGraphOptions","title":"RunGraphOptions","description":"Description","sidebar":"apiReference"},"api-reference/node/startDebuggerServer":{"id":"api-reference/node/startDebuggerServer","title":"startDebuggerServer","description":"Description","sidebar":"apiReference"},"api-reference/recording":{"id":"api-reference/recording","title":"Recording","description":"Enabling recording of your rivet graph executions is simple and straightforward."},"api-reference/remote-debugging":{"id":"api-reference/remote-debugging","title":"Remote Debugging with Rivet","description":"Introduction","sidebar":"apiReference"},"getting-started/first-ai-agent":{"id":"getting-started/first-ai-agent","title":"First AI Agent","description":"When you first open Rivet you are presented with a blank canvas. This is where you can create your first AI agent.","sidebar":"userGuide"},"getting-started/installation":{"id":"getting-started/installation","title":"Installation","description":"System Requirements","sidebar":"userGuide"},"getting-started/setup":{"id":"getting-started/setup","title":"Setup","description":"Settings","sidebar":"userGuide"},"introduction":{"id":"introduction","title":"Introduction to Rivet","description":"Welcome to the Rivet User Guide! Rivet is a powerful Integrated Development Environment (IDE) and library designed for creating AI agents using a visual, graph-based interface. This guide will provide you with an overview of Rivet\'s capabilities and walk you through its various features and functionalities.","sidebar":"userGuide"},"node-reference":{"id":"node-reference","title":"Rivet Node Reference","description":"","sidebar":"nodeReference"},"node-reference/abort-graph":{"id":"node-reference/abort-graph","title":"Abort Graph","description":"","sidebar":"nodeReference"},"node-reference/all-nodes":{"id":"node-reference/all-nodes","title":"All Nodes","description":"","sidebar":"nodeReference"},"node-reference/append-to-dataset":{"id":"node-reference/append-to-dataset","title":"Append to Dataset","description":"","sidebar":"nodeReference"},"node-reference/array":{"id":"node-reference/array","title":"Array Node","description":"Overview","sidebar":"nodeReference"},"node-reference/assemble-prompt":{"id":"node-reference/assemble-prompt","title":"Assemble Prompt Node","description":"Overview","sidebar":"nodeReference"},"node-reference/chat":{"id":"node-reference/chat","title":"Chat Node","description":"Overview","sidebar":"nodeReference"},"node-reference/chunk":{"id":"node-reference/chunk","title":"Chunk Node","description":"Overview","sidebar":"nodeReference"},"node-reference/coalesce":{"id":"node-reference/coalesce","title":"Coalesce Node","description":"Overview","sidebar":"nodeReference"},"node-reference/code":{"id":"node-reference/code","title":"Code Node","description":"Code Node Screenshot","sidebar":"nodeReference"},"node-reference/comment":{"id":"node-reference/comment","title":"Comment","description":"","sidebar":"nodeReference"},"node-reference/compare":{"id":"node-reference/compare","title":"Compare","description":"","sidebar":"nodeReference"},"node-reference/context":{"id":"node-reference/context","title":"Context Node","description":"Context Node Screenshot","sidebar":"nodeReference"},"node-reference/create-dataset":{"id":"node-reference/create-dataset","title":"Create Dataset","description":"","sidebar":"nodeReference"},"node-reference/delay":{"id":"node-reference/delay","title":"Delay","description":"","sidebar":"nodeReference"},"node-reference/evaluate":{"id":"node-reference/evaluate","title":"Evaluate","description":"","sidebar":"nodeReference"},"node-reference/external-call":{"id":"node-reference/external-call","title":"External Call Node","description":"External Call Node Screenshot","sidebar":"nodeReference"},"node-reference/extract-json":{"id":"node-reference/extract-json","title":"Extract JSON Node","description":"Extract JSON Node Screenshot","sidebar":"nodeReference"},"node-reference/extract-object-path":{"id":"node-reference/extract-object-path","title":"Extract Object Path Node","description":"Extract Object Path Node Screenshot","sidebar":"nodeReference"},"node-reference/extract-with-regex":{"id":"node-reference/extract-with-regex","title":"Extract with Regex Node","description":"Extract with Regex Node Screenshot","sidebar":"nodeReference"},"node-reference/extract-yaml":{"id":"node-reference/extract-yaml","title":"Extract YAML","description":"","sidebar":"nodeReference"},"node-reference/filter":{"id":"node-reference/filter","title":"Filter","description":"","sidebar":"nodeReference"},"node-reference/get-all-datasets":{"id":"node-reference/get-all-datasets","title":"Get All Dataset","description":"","sidebar":"nodeReference"},"node-reference/get-dataset-row":{"id":"node-reference/get-dataset-row","title":"Get Dataset Row","description":"","sidebar":"nodeReference"},"node-reference/get-embedding":{"id":"node-reference/get-embedding","title":"Get Embedding","description":"","sidebar":"nodeReference"},"node-reference/get-global":{"id":"node-reference/get-global","title":"Get Global","description":"","sidebar":"nodeReference"},"node-reference/gpt-function":{"id":"node-reference/gpt-function","title":"GPT Function","description":"","sidebar":"nodeReference"},"node-reference/graph-input":{"id":"node-reference/graph-input","title":"Graph Input","description":"","sidebar":"nodeReference"},"node-reference/graph-output":{"id":"node-reference/graph-output","title":"Graph Output","description":"","sidebar":"nodeReference"},"node-reference/hash":{"id":"node-reference/hash","title":"Hash","description":""},"node-reference/http-call":{"id":"node-reference/http-call","title":"HTTP Call","description":"","sidebar":"nodeReference"},"node-reference/if":{"id":"node-reference/if","title":"If Node","description":"Overview","sidebar":"nodeReference"},"node-reference/if-else":{"id":"node-reference/if-else","title":"If/Else","description":"","sidebar":"nodeReference"},"node-reference/join":{"id":"node-reference/join","title":"Join Node","description":"Overview","sidebar":"nodeReference"},"node-reference/knn-dataset":{"id":"node-reference/knn-dataset","title":"KNN Dataset","description":"","sidebar":"nodeReference"},"node-reference/load-dataset":{"id":"node-reference/load-dataset","title":"Load Dataset","description":"","sidebar":"nodeReference"},"node-reference/loop-controller":{"id":"node-reference/loop-controller","title":"Loop Controller","description":"","sidebar":"nodeReference"},"node-reference/match":{"id":"node-reference/match","title":"Match","description":"","sidebar":"nodeReference"},"node-reference/number":{"id":"node-reference/number","title":"Number","description":"","sidebar":"nodeReference"},"node-reference/object":{"id":"node-reference/object","title":"Object","description":"","sidebar":"nodeReference"},"node-reference/passthrough":{"id":"node-reference/passthrough","title":"Passthrough","description":"","sidebar":"nodeReference"},"node-reference/pop":{"id":"node-reference/pop","title":"Pop","description":"","sidebar":"nodeReference"},"node-reference/prompt":{"id":"node-reference/prompt","title":"Prompt","description":"","sidebar":"nodeReference"},"node-reference/race-inputs":{"id":"node-reference/race-inputs","title":"Race Inputs Node","description":"Overview","sidebar":"nodeReference"},"node-reference/raise-event":{"id":"node-reference/raise-event","title":"Raise Event","description":"","sidebar":"nodeReference"},"node-reference/read-directory":{"id":"node-reference/read-directory","title":"Read Directory","description":"","sidebar":"nodeReference"},"node-reference/read-file":{"id":"node-reference/read-file","title":"Read File","description":"","sidebar":"nodeReference"},"node-reference/rng":{"id":"node-reference/rng","title":"RNG","description":"","sidebar":"nodeReference"},"node-reference/set-global":{"id":"node-reference/set-global","title":"Set Global","description":"","sidebar":"nodeReference"},"node-reference/shuffle":{"id":"node-reference/shuffle","title":"Shuffle","description":"","sidebar":"nodeReference"},"node-reference/slice":{"id":"node-reference/slice","title":"Slice","description":"","sidebar":"nodeReference"},"node-reference/split-text":{"id":"node-reference/split-text","title":"Split Text","description":"","sidebar":"nodeReference"},"node-reference/subgraph":{"id":"node-reference/subgraph","title":"Subgraph","description":"","sidebar":"nodeReference"},"node-reference/text":{"id":"node-reference/text","title":"Text","description":"Text nodes are string constants used to pass data to other nodes.","sidebar":"nodeReference"},"node-reference/to-json":{"id":"node-reference/to-json","title":"To JSON Node","description":"","sidebar":"nodeReference"},"node-reference/to-yaml":{"id":"node-reference/to-yaml","title":"To YAML","description":"","sidebar":"nodeReference"},"node-reference/trim-chat-messages":{"id":"node-reference/trim-chat-messages","title":"Trim Chat Messages","description":"","sidebar":"nodeReference"},"node-reference/user-input":{"id":"node-reference/user-input","title":"User Input","description":"","sidebar":"nodeReference"},"node-reference/vector-knn":{"id":"node-reference/vector-knn","title":"Vector Nearest Neighbors","description":"Overview","sidebar":"nodeReference"},"node-reference/vector-store":{"id":"node-reference/vector-store","title":"Vector Store","description":"Overview","sidebar":"nodeReference"},"node-reference/wait-for-event":{"id":"node-reference/wait-for-event","title":"Wait For Event","description":"","sidebar":"nodeReference"},"trivet":{"id":"trivet","title":"Trivet","description":"Trivet is a library for running Rivet tests, and an integrated test runner in the Rivet application.","sidebar":"userGuide"},"tutorial":{"id":"tutorial","title":"Rivet Tutorial","description":"The tutorial series in the sidebar will walk you through the process of creating graphs and using different node","sidebar":"tutorial"},"tutorial/installing-getting-started":{"id":"tutorial/installing-getting-started","title":"Installing & Overview","description":"This Tutorial will walk you through the basic building blocks of Rivet.","sidebar":"tutorial"},"tutorial/interpolation-more-node-types":{"id":"tutorial/interpolation-more-node-types","title":"Interpolation & More Node Types","description":"In the sidebar you should see the graphs tab with a list of numbered folders with graphs. These are the graphs that are included in the tutorial project.","sidebar":"tutorial"},"tutorial/loops":{"id":"tutorial/loops","title":"07 - Loops","description":"","sidebar":"tutorial"},"tutorial/matching-conditionals":{"id":"tutorial/matching-conditionals","title":"Matching & Conditionals","description":"In the sidebar you should see the graphs tab with a list of numbered folders with graphs. These are the graphs that are included in the tutorial project.","sidebar":"tutorial"},"tutorial/simple-graph":{"id":"tutorial/simple-graph","title":"Simple Graph","description":"In the sidebar you should see the graphs tab with a list of numbered folders with graphs. These are the graphs that are included in the tutorial project.","sidebar":"tutorial"},"tutorial/splitting":{"id":"tutorial/splitting","title":"06 - Splitting","description":"","sidebar":"tutorial"},"tutorial/subgraphs":{"id":"tutorial/subgraphs","title":"05 - Subgraphs","description":"","sidebar":"tutorial"},"tutorial/testing-graphs":{"id":"tutorial/testing-graphs","title":"08 - Testing Graphs","description":"As your graphs get more complicated, it becomes important to test whether they improving without regressing previous functionality."},"tutorial/yaml":{"id":"tutorial/yaml","title":"04 - YAML","description":"","sidebar":"tutorial"},"user-guide/adding-connecting-nodes":{"id":"user-guide/adding-connecting-nodes","title":"Working with Nodes","description":"Adding Nodes","sidebar":"userGuide"},"user-guide/control-flow":{"id":"user-guide/control-flow","title":"Control Flow","description":"The flow of data in Rivet (and the control of that flow) is handled in two passes on the graph of nodes.","sidebar":"userGuide"},"user-guide/data-types":{"id":"user-guide/data-types","title":"Data Types","description":"Internally, the data the passes through Rivet is marked as a number of data types. When integrating Rivet with your own application, you will need to know what these data types are and how to handle them.","sidebar":"userGuide"},"user-guide/executing-ai-chains":{"id":"user-guide/executing-ai-chains","title":"Executing AI Chains","description":"Data Flow","sidebar":"userGuide"},"user-guide/executors":{"id":"user-guide/executors","title":"Executors","description":"Executors are responsible for running the graphs in Rivet. The executor can be chosen using the dropdown in the menu bar of the application.","sidebar":"userGuide"},"user-guide/features/chat-viewer":{"id":"user-guide/features/chat-viewer","title":"Chat Viewer","description":"The Chat Viewer gives you a live view of all Chat nodes that are running in your Rivet graphs. It is accessible by clicking the \\"Chat Viewer\\" tab at the top of Rivet.","sidebar":"userGuide"},"user-guide/features/data-studio":{"id":"user-guide/features/data-studio","title":"Data Studio","description":"The Data Studio in Rivet is your scratch pad for working with data and graphs. It is accessible by clicking the \\"Data Studio\\" tab at the top of Rivet.","sidebar":"userGuide"},"user-guide/features/prompt-designer":{"id":"user-guide/features/prompt-designer","title":"Prompt Designer","description":"The Prompt Designer gives you a UI to tweak and design your prompts that you pass into your Chat nodes.","sidebar":"userGuide"},"user-guide/features/trivet-tests":{"id":"user-guide/features/trivet-tests","title":"Trivet Tests","description":"See Trivet for more information.","sidebar":"userGuide"},"user-guide/live-debugging":{"id":"user-guide/live-debugging","title":"Live Debugging","description":"Currently Executing Nodes","sidebar":"userGuide"},"user-guide/loops":{"id":"user-guide/loops","title":"Loops","description":"Loops and the loop controller are the most difficult concept in Rivet. They are also incredibly powerful and necessary for many use cases.","sidebar":"userGuide"},"user-guide/overview-of-interface":{"id":"user-guide/overview-of-interface","title":"Overview of the Interface","description":"Sidebar","sidebar":"userGuide"},"user-guide/plugins":{"id":"user-guide/plugins","title":"Plugins","description":"Plugins allow authors to extend the functionality of Rivet, such as adding new nodes that","sidebar":"userGuide"},"user-guide/plugins/built-in/all":{"id":"user-guide/plugins/built-in/all","title":"All Built-In Plugins","description":"The available built-in plugins are:","sidebar":"userGuide"},"user-guide/plugins/built-in/anthropic":{"id":"user-guide/plugins/built-in/anthropic","title":"Anthropic Plugin","description":"The Anthropic plugin provides access to Claude and Claude Instant using the","sidebar":"userGuide"},"user-guide/plugins/built-in/assemblyai":{"id":"user-guide/plugins/built-in/assemblyai","title":"AssemblyAI Plugin","description":"At the moment you must use the node executor to use the AssemblyAI plugin in the Rivet UI. You may also use the plugin when embedding Rivet in your own application.","sidebar":"userGuide"},"user-guide/plugins/built-in/autoevals":{"id":"user-guide/plugins/built-in/autoevals","title":"Autoevals Plugin","description":"The Autoevals plugin provides a node that can automatically evaluate the performance of an LLM response using a battle-tested set of prompts.","sidebar":"userGuide"},"user-guide/plugins/built-in/gentrace":{"id":"user-guide/plugins/built-in/gentrace","title":"Gentrace Plugin","description":"Gentrace is\xa0an evaluation and observability product that helps improve the quality, safety, and compliance of your AI features.","sidebar":"userGuide"},"user-guide/plugins/built-in/huggingface":{"id":"user-guide/plugins/built-in/huggingface","title":"Hugging Face Plugin","description":"","sidebar":"userGuide"},"user-guide/plugins/built-in/pinecone":{"id":"user-guide/plugins/built-in/pinecone","title":"Pinecone Plugin","description":"","sidebar":"userGuide"},"user-guide/plugins/creating-plugins":{"id":"user-guide/plugins/creating-plugins","title":"Creating a Plugin","description":"","sidebar":"userGuide"},"user-guide/prompt-designer":{"id":"user-guide/prompt-designer","title":"Prompt Designer","description":"TODO"},"user-guide/recordings":{"id":"user-guide/recordings","title":"Recordings","description":"Using the ExecutionRecorder class in your code, you can generate .rivet-recording files that contain","sidebar":"userGuide"},"user-guide/remote-debugging":{"id":"user-guide/remote-debugging","title":"Remote Debugging","description":"Remote debugging allows you to integrate the Rivet Core or Rivet Node libraries in another application, run your graphs in that other application, but see the live graph execution in the Rivet application! This is useful for debugging graphs that are running in a production environment, or for debugging graphs that are running in a different environment than the Rivet application. This is very useful when using the External Call Node, as the default executor cannot call into your own application\'s code.","sidebar":"userGuide"},"user-guide/splitting":{"id":"user-guide/splitting","title":"Splitting","description":"Splitting a node is a powerful tool for parallelizing execution. Change a node to a Split node by toggling on Split on any node:","sidebar":"userGuide"},"user-guide/subgraphs":{"id":"user-guide/subgraphs","title":"Subgraphs","description":"Subgraphs are a powerful tool for composing graphs together. They allow you to create a graph that can be used as a node in another graph. This allows you to create reusable components, and to create graphs that are easier to understand.","sidebar":"userGuide"},"user-guide/trivet-getting-started":{"id":"user-guide/trivet-getting-started","title":"Trivet - Getting Started","description":"To get started with Trivet, select the Trivet Tests tab at the top of the Rivet application.","sidebar":"userGuide"},"user-guide/trivet-library":{"id":"user-guide/trivet-library","title":"Trivet Library","description":"The Trivet Library is a powerful tool for running tests on your Rivet projects programmatically. It provides a way to validate and test the functionality of your Rivet graphs. All code examples in this documentation are written in TypeScript.","sidebar":"userGuide"},"user-guide/trivet-tutorial":{"id":"user-guide/trivet-tutorial","title":"Trivet - Tutorial","description":"Suppose that we want to test a simple graph that executes a call against GPT-3.5, but that names the assistant:","sidebar":"userGuide"},"user-guide/trivet-validation-graphs":{"id":"user-guide/trivet-validation-graphs","title":"Trivet - Validator Graphs","description":"Instead of using baked-in validations, Trivet uses Rivet graphs to perform validation on your test graph. This allows you the ultimate flexibility in how you want to validate your graph. It is common to make LLM calls to validate your graph - a great pattern is asking an LLM to respond with YES or NO after asking it a question, and then using a Match node to find either the YES or NO.","sidebar":"userGuide"},"user-guide/working-with-graphs":{"id":"user-guide/working-with-graphs","title":"Working with Graphs","description":"A Rivet project contains a set of named graphs. Each of these graphs contains a set of nodes connected together, forming the graph.","sidebar":"userGuide"},"user-guide/working-with-projects":{"id":"user-guide/working-with-projects","title":"Working with Projects","description":"A Rivet project contains a set of graphs. These graphs can call each other by using a Subgraph Node. Any graph can call any other graph in the project (including itself).","sidebar":"userGuide"}}}')}}]); \ No newline at end of file diff --git a/assets/js/9b78301a.df3fa572.js b/assets/js/9b78301a.df3fa572.js new file mode 100644 index 000000000..d7448c634 --- /dev/null +++ b/assets/js/9b78301a.df3fa572.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3456],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>y});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var d=n.createContext({}),l=function(e){var r=n.useContext(d),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},p=function(e){var r=l(e.components);return n.createElement(d.Provider,{value:r},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},u=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,d=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=l(t),u=o,y=f["".concat(d,".").concat(u)]||f[u]||s[u]||c;return t?n.createElement(y,a(a({ref:r},p),{},{components:t})):n.createElement(y,a({ref:r},p))}));function y(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=u;var i={};for(var d in r)hasOwnProperty.call(r,d)&&(i[d]=r[d]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var l=2;l{t.r(r),t.d(r,{assets:()=>d,contentTitle:()=>a,default:()=>s,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={title:"Read Directory"},a="Read Directory Node",i={unversionedId:"node-reference/read-directory",id:"node-reference/read-directory",title:"Read Directory",description:"",source:"@site/docs/node-reference/read-directory.mdx",sourceDirName:"node-reference",slug:"/node-reference/read-directory",permalink:"/docs/node-reference/read-directory",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/read-directory.mdx",tags:[],version:"current",frontMatter:{title:"Read Directory"},sidebar:"nodeReference",previous:{title:"Load Dataset",permalink:"/docs/node-reference/load-dataset"},next:{title:"Read File",permalink:"/docs/node-reference/read-file"}},d={},l=[],p={toc:l},f="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"read-directory-node"},"Read Directory Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9d910af5.3d830c68.js b/assets/js/9d910af5.3d830c68.js new file mode 100644 index 000000000..e7d385a59 --- /dev/null +++ b/assets/js/9d910af5.3d830c68.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2147],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>u});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),l=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},p=function(e){var r=l(e.components);return n.createElement(i.Provider,{value:r},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=l(t),f=o,u=m["".concat(i,".").concat(f)]||m[f]||d[f]||a;return t?n.createElement(u,c(c({ref:r},p),{},{components:t})):n.createElement(u,c({ref:r},p))}));function u(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=f;var s={};for(var i in r)hasOwnProperty.call(r,i)&&(s[i]=r[i]);s.originalType=e,s[m]="string"==typeof e?e:o,c[1]=s;for(var l=2;l{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const a={title:"Trim Chat Messages"},c="Trim Chat Messages Node",s={unversionedId:"node-reference/trim-chat-messages",id:"node-reference/trim-chat-messages",title:"Trim Chat Messages",description:"",source:"@site/docs/node-reference/trim-chat-messages.mdx",sourceDirName:"node-reference",slug:"/node-reference/trim-chat-messages",permalink:"/docs/node-reference/trim-chat-messages",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/trim-chat-messages.mdx",tags:[],version:"current",frontMatter:{title:"Trim Chat Messages"},sidebar:"nodeReference",previous:{title:"Get Embedding",permalink:"/docs/node-reference/get-embedding"},next:{title:"Array",permalink:"/docs/node-reference/array"}},i={},l=[],p={toc:l},m="wrapper";function d(e){let{components:r,...t}=e;return(0,o.kt)(m,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"trim-chat-messages-node"},"Trim Chat Messages Node"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a21a37d7.683f8217.js b/assets/js/a21a37d7.683f8217.js new file mode 100644 index 000000000..db16ec568 --- /dev/null +++ b/assets/js/a21a37d7.683f8217.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7243],{6593:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=s(n),h=r,f=d["".concat(u,".").concat(h)]||d[h]||p[h]||l;return n?a.createElement(f,o(o({ref:t},c),{},{components:n})):a.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=h;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[d]="string"==typeof e?e:r,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(373),r=n(1644),l=n(156),o=n(1476),i=n(2824),u=n(9643),s=n(7190),c=n(6985);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function h(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function m(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=p(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,s]=f({queryString:n,groupId:a}),[d,m]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),k=(()=>{const e=u??d;return h({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),m(e)}),[s,m,l]),tabValues:l}}var k=n(8810);const b={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function g(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),a=s[n].value;a!==i&&(d(t),u(a))},h=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:h,onClick:p},o,{className:(0,l.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function N(e){const t=m(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},r.createElement(g,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function y(e){const t=(0,k.Z)();return r.createElement(N,(0,a.Z)({key:String(t)},e))}},1743:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>u,default:()=>f,frontMatter:()=>i,metadata:()=>s,toc:()=>d});var a=n(373),r=(n(1644),n(6593)),l=n(6663),o=n(7026);const i={id:"coalesce",title:"Coalesce Node",sidebar_label:"Coalesce"},u=void 0,s={unversionedId:"node-reference/coalesce",id:"node-reference/coalesce",title:"Coalesce Node",description:"Overview",source:"@site/docs/node-reference/coalesce.mdx",sourceDirName:"node-reference",slug:"/node-reference/coalesce",permalink:"/docs/node-reference/coalesce",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/coalesce.mdx",tags:[],version:"current",frontMatter:{id:"coalesce",title:"Coalesce Node",sidebar_label:"Coalesce"},sidebar:"nodeReference",previous:{title:"Abort Graph",permalink:"/docs/node-reference/abort-graph"},next:{title:"Compare",permalink:"/docs/node-reference/compare"}},c={},d=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Default Values / Null Checks",id:"example-1-default-values--null-checks",level:2},{value:"Example 2: Getting a single value from a Match node",id:"example-2-getting-a-single-value-from-a-match-node",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],p={toc:d},h="wrapper";function f(e){let{components:t,...i}=e;return(0,r.kt)(h,(0,a.Z)({},p,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Coalesce Node works like the ",(0,r.kt)("inlineCode",{parentName:"p"},"COALESCE")," function in SQL - it returns the first non-null value from a list of inputs."),(0,r.kt)("p",null,'In Rivet, "null" includes values that show as "Not Ran" in the UI - nodes that have been excluded from the run due to control flow processing.\nThe Coalesce node excels at taking a set of nodes, one of which will be run, and returning the output of the first one that actually runs. See\nthe examples section for more information on using this with a ',(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/match"},"Match Node"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Coalesce Node Screenshot",src:n(349).Z,width:"371",height:"273"})),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Conditional"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"If connected, this can be used so that the coalesce node itself is only run conditionally."),(0,r.kt)("td",{parentName:"tr",align:null},"N/A"),(0,r.kt)("td",{parentName:"tr",align:null},"Otherwise, the input is treated as any of the other inputs, so if you want to run the coalesce node conditionally, you must connect to this specific port with e.g. an ",(0,r.kt)("a",{parentName:"td",href:"/docs/node-reference/if"},"If Node"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Input X"),(0,r.kt)("td",{parentName:"tr",align:null},"Any"),(0,r.kt)("td",{parentName:"tr",align:null},"One of the inputs to check for nullness. The first one of these inputs that is non-null will be passed through to the output port."),(0,r.kt)("td",{parentName:"tr",align:null},"N/A"),(0,r.kt)("td",{parentName:"tr",align:null},"Dynamic number of inputs based on how many are connected."))))),(0,r.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Output"),(0,r.kt)("td",{parentName:"tr",align:null},"Any"),(0,r.kt)("td",{parentName:"tr",align:null},"The value of the first non-null input."),(0,r.kt)("td",{parentName:"tr",align:null},"If no inputs are null, then the output will not be ran."))))),(0,r.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("p",null,"This node has no configurable editor settings."))),(0,r.kt)("h2",{id:"example-1-default-values--null-checks"},"Example 1: Default Values / Null Checks"),(0,r.kt)("p",null,"You can use a Coalesce Node in order to do null checks and set default values for a parameter."),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create an If node but do not connect to the input, so that it wil not be ran."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the If node to the Coalesce node."),(0,r.kt)("li",{parentName:"ol"},"Connect a Text node with a hardcoded value to the 2nd input of the Coalesce node."),(0,r.kt)("li",{parentName:"ol"},"Run the graph. Note that the output of the Coalesce node will be the value of the Text node, since the If node was not ran.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Coalesce Node Example 1 Screenshot",src:n(8152).Z,width:"808",height:"426"})),(0,r.kt)("h2",{id:"example-2-getting-a-single-value-from-a-match-node"},"Example 2: Getting a single value from a Match node"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create a ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/match"},"Match Node")," with a few different cases, say ",(0,r.kt)("inlineCode",{parentName:"li"},"1"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"2"),", and ",(0,r.kt)("inlineCode",{parentName:"li"},"3"),"."),(0,r.kt)("li",{parentName:"ol"},"For each of the cases, use an ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/if"},"If Node")," to transform each of the cases into a unique value, say ",(0,r.kt)("inlineCode",{parentName:"li"},"A"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"B"),", and ",(0,r.kt)("inlineCode",{parentName:"li"},"C"),". You can use a ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/text"},"Text Node")," connected to the ",(0,r.kt)("inlineCode",{parentName:"li"},"value")," port of the If Nodes to set the value passed through for each of the cases."),(0,r.kt)("li",{parentName:"ol"},"Connect the outputs of each of the If nodes to one of the inputs on a Coalesce node."),(0,r.kt)("li",{parentName:"ol"},"Connect an input to the Match node so that only one of the cases will be ran."),(0,r.kt)("li",{parentName:"ol"},"Run the graph. Note that the output of the Coalesce node will be the value of the If node that was ran.")),(0,r.kt)("p",null,"The above is a common pattern for working with a Match node - you can get a unique value for each case using an If node, which is not dependent on the value passed into the Match node itself."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Coalesce Node Example 2 Screenshot",src:n(3718).Z,width:"1328",height:"737"})),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"The coalesce node cannot error in normal operation."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Will an empty string be passed over?")),(0,r.kt)("p",null,"A: No, an empty string is not considered nullable for the Coalesce Node. If you would like to skip over empty strings, you can use an If Node to check for empty strings and return null if the string is empty."),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/match"},"Match Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/if"},"If Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/if-else"},"If/Else Node"))))}f.isMDXComponent=!0},8152:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/coalesce-node-example-01-fac9f8b2475bcceaab37879d1007cd34.png"},3718:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/coalesce-node-example-02-577e5338844f92f739a5a73e15075246.png"},349:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/coalesce-node-dd9602753c87036fa6644d78d1317f4b.png"}}]); \ No newline at end of file diff --git a/assets/js/a362e43a.7f2fe7e2.js b/assets/js/a362e43a.7f2fe7e2.js new file mode 100644 index 000000000..5829b2843 --- /dev/null +++ b/assets/js/a362e43a.7f2fe7e2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9721],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(1644);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(r),u=a,m=d["".concat(s,".").concat(u)]||d[u]||f[u]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=u;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:a,c[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var n=r(373),a=(r(1644),r(6593));const o={title:"Create Dataset"},c="Create Dataset Node",i={unversionedId:"node-reference/create-dataset",id:"node-reference/create-dataset",title:"Create Dataset",description:"",source:"@site/docs/node-reference/create-dataset.mdx",sourceDirName:"node-reference",slug:"/node-reference/create-dataset",permalink:"/docs/node-reference/create-dataset",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/create-dataset.mdx",tags:[],version:"current",frontMatter:{title:"Create Dataset"},sidebar:"nodeReference",previous:{title:"Append to Dataset",permalink:"/docs/node-reference/append-to-dataset"},next:{title:"Get All Dataset",permalink:"/docs/node-reference/get-all-datasets"}},s={},l=[],p={toc:l},d="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"create-dataset-node"},"Create Dataset Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a6838e53.8399bc77.js b/assets/js/a6838e53.8399bc77.js new file mode 100644 index 000000000..c25cbb7e4 --- /dev/null +++ b/assets/js/a6838e53.8399bc77.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3887],{6593:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var u=n.createContext({}),p=function(e){var r=n.useContext(u),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},s=function(e){var r=p(e.components);return n.createElement(u.Provider,{value:r},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),l=p(t),d=o,m=l["".concat(u,".").concat(d)]||l[d]||f[d]||c;return t?n.createElement(m,i(i({ref:r},s),{},{components:t})):n.createElement(m,i({ref:r},s))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,i=new Array(c);i[0]=d;var a={};for(var u in r)hasOwnProperty.call(r,u)&&(a[u]=r[u]);a.originalType=e,a[l]="string"==typeof e?e:o,i[1]=a;for(var p=2;p{t.r(r),t.d(r,{assets:()=>u,contentTitle:()=>i,default:()=>f,frontMatter:()=>c,metadata:()=>a,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const c={title:"User Input"},i="User Input Node",a={unversionedId:"node-reference/user-input",id:"node-reference/user-input",title:"User Input",description:"",source:"@site/docs/node-reference/user-input.mdx",sourceDirName:"node-reference",slug:"/node-reference/user-input",permalink:"/docs/node-reference/user-input",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/user-input.mdx",tags:[],version:"current",frontMatter:{title:"User Input"},sidebar:"nodeReference",previous:{title:"Read File",permalink:"/docs/node-reference/read-file"},next:{title:"Vector Store",permalink:"/docs/node-reference/vector-store"}},u={},p=[],s={toc:p},l="wrapper";function f(e){let{components:r,...t}=e;return(0,o.kt)(l,(0,n.Z)({},s,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"user-input-node"},"User Input Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a7f4a72c.2cbef085.js b/assets/js/a7f4a72c.2cbef085.js new file mode 100644 index 000000000..2c3402c0d --- /dev/null +++ b/assets/js/a7f4a72c.2cbef085.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4170],{6593:(e,r,t)=>{t.d(r,{Zo:()=>u,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),l=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):f(f({},r),e)),t},u=function(e){var r=l(e.components);return n.createElement(i.Provider,{value:r},e.children)},p="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),p=l(t),d=o,m=p["".concat(i,".").concat(d)]||p[d]||s[d]||c;return t?n.createElement(m,f(f({ref:r},u),{},{components:t})):n.createElement(m,f({ref:r},u))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,f=new Array(c);f[0]=d;var a={};for(var i in r)hasOwnProperty.call(r,i)&&(a[i]=r[i]);a.originalType=e,a[p]="string"==typeof e?e:o,f[1]=a;for(var l=2;l{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>f,default:()=>s,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={title:"Shuffle"},f="Shuffle Node",a={unversionedId:"node-reference/shuffle",id:"node-reference/shuffle",title:"Shuffle",description:"",source:"@site/docs/node-reference/shuffle.mdx",sourceDirName:"node-reference",slug:"/node-reference/shuffle",permalink:"/docs/node-reference/shuffle",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/shuffle.mdx",tags:[],version:"current",frontMatter:{title:"Shuffle"},sidebar:"nodeReference",previous:{title:"Pop",permalink:"/docs/node-reference/pop"},next:{title:"Slice",permalink:"/docs/node-reference/slice"}},i={},l=[],u={toc:l},p="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(p,(0,n.Z)({},u,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"shuffle-node"},"Shuffle Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a813a620.0c3265b5.js b/assets/js/a813a620.0c3265b5.js new file mode 100644 index 000000000..f19e76d45 --- /dev/null +++ b/assets/js/a813a620.0c3265b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5179],{6593:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=s(n),m=r,f=c["".concat(u,".").concat(m)]||c[m]||d[m]||l;return n?a.createElement(f,o(o({ref:t},p),{},{components:n})):a.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[c]="string"==typeof e?e:r,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>N});var a=n(373),r=n(1644),l=n(156),o=n(1476),i=n(2824),u=n(9643),s=n(7190),p=n(6985);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function h(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,s]=f({queryString:n,groupId:a}),[c,h]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),b=(()=>{const e=u??c;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),h(e)}),[s,h,l]),tabValues:l}}var b=n(8810);const k={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function g(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=p.indexOf(t),a=s[n].value;a!==i&&(c(t),u(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",k.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=h(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(g,(0,a.Z)({},e,t)),r.createElement(v,(0,a.Z)({},e,t)))}function N(e){const t=(0,b.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},9069:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>f,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=n(373),r=(n(1644),n(6593)),l=n(6663),o=n(7026);const i={id:"if",title:"If Node",sidebar_label:"If"},u=void 0,s={unversionedId:"node-reference/if",id:"node-reference/if",title:"If Node",description:"Overview",source:"@site/docs/node-reference/if.mdx",sourceDirName:"node-reference",slug:"/node-reference/if",permalink:"/docs/node-reference/if",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/if.mdx",tags:[],version:"current",frontMatter:{id:"if",title:"If Node",sidebar_label:"If"},sidebar:"nodeReference",previous:{title:"Evaluate",permalink:"/docs/node-reference/evaluate"},next:{title:"If/Else",permalink:"/docs/node-reference/if-else"}},p={},c=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Simple string comparison",id:"example-1-simple-string-comparison",level:3}],d={toc:c},m="wrapper";function f(e){let{components:t,...i}=e;return(0,r.kt)(m,(0,a.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"Takes in a condition and a value. If the condition is truthy, the value is passed through the True port, and the False port is not ran.\nIf the condition is falsy, the value is passed through the False port, and the True port is not ran."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"If node screenshot",src:n(7684).Z,width:"570",height:"426"})),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Required"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"If"),(0,r.kt)("td",{parentName:"tr",align:null},"conditional"),(0,r.kt)("td",{parentName:"tr",align:null},"The condition you would like to check."),(0,r.kt)("td",{parentName:"tr",align:null},"True")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Value"),(0,r.kt)("td",{parentName:"tr",align:null},"any"),(0,r.kt)("td",{parentName:"tr",align:null},"The value passed through either True or False ports."),(0,r.kt)("td",{parentName:"tr",align:null},"True"))))),(0,r.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"True"),(0,r.kt)("td",{parentName:"tr",align:null},"type of ",(0,r.kt)("inlineCode",{parentName:"td"},"Value")),(0,r.kt)("td",{parentName:"tr",align:null},"Returns the Value if the condition is True.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"False"),(0,r.kt)("td",{parentName:"tr",align:null},"type of ",(0,r.kt)("inlineCode",{parentName:"td"},"Value")),(0,r.kt)("td",{parentName:"tr",align:null},"Returns the Value if the condition is False."))))),(0,r.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("p",null,"This node does not have any specific settings."))),(0,r.kt)("h3",{id:"example-1-simple-string-comparison"},"Example 1: Simple ",(0,r.kt)("inlineCode",{parentName:"h3"},"string")," comparison"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Let's say we're trying to build a simple string comparison. The code for which in Typscript would look something like below:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"if('Hello, World!' === 'Not Hello, World!')\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Similarly in Rivet we can make the following graph to perform a similar comparison. ")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"if-node-example-1",src:n(8771).Z,width:"1834",height:"755"})),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create the following nodes in your graph:",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"An ",(0,r.kt)("inlineCode",{parentName:"li"},"If")," node "),(0,r.kt)("li",{parentName:"ul"},"A ",(0,r.kt)("inlineCode",{parentName:"li"},"Compare")," node"),(0,r.kt)("li",{parentName:"ul"},"Two ",(0,r.kt)("inlineCode",{parentName:"li"},"Input Text")," nodes: System Text and Input Text"),(0,r.kt)("li",{parentName:"ul"},"Two ",(0,r.kt)("inlineCode",{parentName:"li"},"Graph Output")," nodes: True Output and False Output"))),(0,r.kt)("li",{parentName:"ol"},"Connect the following nodes:",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"System Text ",(0,r.kt)("inlineCode",{parentName:"li"},"Output")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"A")," of the Compare node and ",(0,r.kt)("inlineCode",{parentName:"li"},"Value")," of the If node"),(0,r.kt)("li",{parentName:"ul"},"Input Text ",(0,r.kt)("inlineCode",{parentName:"li"},"Output")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"B")," of the Compare node",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Make sure the Compare condition is set at ",(0,r.kt)("inlineCode",{parentName:"li"},"==")))),(0,r.kt)("li",{parentName:"ul"},"If Node ",(0,r.kt)("inlineCode",{parentName:"li"},"True")," to True Output"),(0,r.kt)("li",{parentName:"ul"},"If Node ",(0,r.kt)("inlineCode",{parentName:"li"},"False")," to False Output"))),(0,r.kt)("li",{parentName:"ol"},"You are ready to run the graph"),(0,r.kt)("li",{parentName:"ol"},"Results: You'll see that based on the Input Text, and the comparison we've supplied to the If node, the graph output execution changes.\nIf the If condition supplied to the node is true, the true port receives the value but if its false, the false port receives the values.")))}f.isMDXComponent=!0},8771:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/if-node-example-1cba1b336a06d366ac88195b33b99e2e.png"},7684:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/if-node-beb7832baa0f1133460436b93289c574.png"}}]); \ No newline at end of file diff --git a/assets/js/aca96930.7b453abd.js b/assets/js/aca96930.7b453abd.js new file mode 100644 index 000000000..61a762693 --- /dev/null +++ b/assets/js/aca96930.7b453abd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5797],{6593:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),l=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):p(p({},r),e)),t},f=function(e){var r=l(e.components);return n.createElement(i.Provider,{value:r},e.children)},u="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,i=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),u=l(t),d=o,m=u["".concat(i,".").concat(d)]||u[d]||s[d]||c;return t?n.createElement(m,p(p({ref:r},f),{},{components:t})):n.createElement(m,p({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,p=new Array(c);p[0]=d;var a={};for(var i in r)hasOwnProperty.call(r,i)&&(a[i]=r[i]);a.originalType=e,a[u]="string"==typeof e?e:o,p[1]=a;for(var l=2;l{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>p,default:()=>s,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={title:"Pop"},p="Pop Node",a={unversionedId:"node-reference/pop",id:"node-reference/pop",title:"Pop",description:"",source:"@site/docs/node-reference/pop.mdx",sourceDirName:"node-reference",slug:"/node-reference/pop",permalink:"/docs/node-reference/pop",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/pop.mdx",tags:[],version:"current",frontMatter:{title:"Pop"},sidebar:"nodeReference",previous:{title:"Filter",permalink:"/docs/node-reference/filter"},next:{title:"Shuffle",permalink:"/docs/node-reference/shuffle"}},i={},l=[],f={toc:l},u="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(u,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"pop-node"},"Pop Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/acacfcbf.506d0156.js b/assets/js/acacfcbf.506d0156.js new file mode 100644 index 000000000..a8fb3c9b0 --- /dev/null +++ b/assets/js/acacfcbf.506d0156.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7703],{6593:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>b});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var p=n.createContext({}),l=function(e){var r=n.useContext(p),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},s=function(e){var r=l(e.components);return n.createElement(p.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),f=l(t),d=o,b=f["".concat(p,".").concat(d)]||f[d]||u[d]||a;return t?n.createElement(b,c(c({ref:r},s),{},{components:t})):n.createElement(b,c({ref:r},s))}));function b(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=d;var i={};for(var p in r)hasOwnProperty.call(r,p)&&(i[p]=r[p]);i.originalType=e,i[f]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{t.r(r),t.d(r,{assets:()=>p,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const a={title:"Abort Graph"},c="Abort Graph Node",i={unversionedId:"node-reference/abort-graph",id:"node-reference/abort-graph",title:"Abort Graph",description:"",source:"@site/docs/node-reference/abort-graph.mdx",sourceDirName:"node-reference",slug:"/node-reference/abort-graph",permalink:"/docs/node-reference/abort-graph",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/abort-graph.mdx",tags:[],version:"current",frontMatter:{title:"Abort Graph"},sidebar:"nodeReference",previous:{title:"Object",permalink:"/docs/node-reference/object"},next:{title:"Coalesce",permalink:"/docs/node-reference/coalesce"}},p={},l=[],s={toc:l},f="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},s,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"abort-graph-node"},"Abort Graph Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b2051425.e8df9563.js b/assets/js/b2051425.e8df9563.js new file mode 100644 index 000000000..872d251fb --- /dev/null +++ b/assets/js/b2051425.e8df9563.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[336],{6593:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),s=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(u.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=s(n),c=r,h=d["".concat(u,".").concat(c)]||d[c]||m[c]||l;return n?a.createElement(h,o(o({ref:t},p),{},{components:n})):a.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=c;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[d]="string"==typeof e?e:r,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(373),r=n(1644),l=n(156),o=n(1476),i=n(2824),u=n(9643),s=n(7190),p=n(6985);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function m(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function c(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=m(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!c({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,s]=h({queryString:n,groupId:a}),[d,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),k=(()=>{const e=u??d;return c({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!c({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),g(e)}),[s,g,l]),tabValues:l}}var k=n(8810);const f={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function N(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),m=e=>{const t=e.currentTarget,n=p.indexOf(t),a=s[n].value;a!==i&&(d(t),u(a))},c=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>p.push(e),onKeyDown:c,onClick:m},o,{className:(0,l.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=g(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},r.createElement(N,(0,a.Z)({},e,t)),r.createElement(b,(0,a.Z)({},e,t)))}function v(e){const t=(0,k.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},304:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>d});var a=n(373),r=(n(1644),n(6593)),l=n(6663),o=n(7026);const i={id:"chat",title:"Chat Node",sidebar_label:"Chat"},u=void 0,s={unversionedId:"node-reference/chat",id:"node-reference/chat",title:"Chat Node",description:"Overview",source:"@site/docs/node-reference/chat.mdx",sourceDirName:"node-reference",slug:"/node-reference/chat",permalink:"/docs/node-reference/chat",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/chat.mdx",tags:[],version:"current",frontMatter:{id:"chat",title:"Chat Node",sidebar_label:"Chat"},sidebar:"nodeReference",previous:{title:"Assemble Prompt",permalink:"/docs/node-reference/assemble-prompt"},next:{title:"GPT Function",permalink:"/docs/node-reference/gpt-function"}},p={},d=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Simple Response",id:"example-1-simple-response",level:3},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],m={toc:d},c="wrapper";function h(e){let{components:t,...i}=e;return(0,r.kt)(c,(0,a.Z)({},m,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Chat node send one or more messages to OpenAI's GPT and returns the response from the language model."),(0,r.kt)("p",null,"If you are looking for other language models, see the Plugins page for a list of available plugins that implement other language model nodes."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"The Chat node may be renamed and/or deprecated and moved into an OpenAI plugin in the future.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Chat Node Screenshot",src:n(3111).Z,width:"472",height:"436"})),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"System Prompt"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")," or ",(0,r.kt)("inlineCode",{parentName:"td"},"chat-message")),(0,r.kt)("td",{parentName:"tr",align:null},"A convenience input that allows a system prompt to be prepended to the main prompt message/messages."),(0,r.kt)("td",{parentName:"tr",align:null},"(None)"),(0,r.kt)("td",{parentName:"tr",align:null},"If not connected, then no system prompt will be prepended. You can always include a system prompt in the main prompt input instead, if you like instead, using an ",(0,r.kt)("a",{parentName:"td",href:"/docs/node-reference/assemble-prompt"},"Assemble Prompt")," node.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Prompt"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")," / ",(0,r.kt)("inlineCode",{parentName:"td"},"string[]")," / ",(0,r.kt)("inlineCode",{parentName:"td"},"chat-message")," / ",(0,r.kt)("inlineCode",{parentName:"td"},"chat-message[]")),(0,r.kt)("td",{parentName:"tr",align:null},"The main prompt to send to the language model. Can be one or more strings or chat-messages."),(0,r.kt)("td",{parentName:"tr",align:null},"(Empty list)"),(0,r.kt)("td",{parentName:"tr",align:null},"Strings will be converted into chat messages of type ",(0,r.kt)("inlineCode",{parentName:"td"},"user"),", with no name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Functions"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"gpt-function")," or ",(0,r.kt)("inlineCode",{parentName:"td"},"gpt-function[]")),(0,r.kt)("td",{parentName:"tr",align:null},"Defines the available functions that GPT is allowed to call during its response."),(0,r.kt)("td",{parentName:"tr",align:null},"(Required)"),(0,r.kt)("td",{parentName:"tr",align:null},"Only enabled if the ",(0,r.kt)("inlineCode",{parentName:"td"},"Enable Function Use")," setting is enabled."))))),(0,r.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Response"),(0,r.kt)("td",{parentName:"tr",align:null},"string"),(0,r.kt)("td",{parentName:"tr",align:null},"The response from GPT."),(0,r.kt)("td",{parentName:"tr",align:null},"The response will be streamed in, but subsequent nodes will not be executed until the response is finished."))))),(0,r.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Model"),(0,r.kt)("td",{parentName:"tr",align:null},"The GPT model to use for the request."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"gpt-3.5-turbo")),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Temperature"),(0,r.kt)("td",{parentName:"tr",align:null},'The sampling temperature to use. Lower values are more deterministic. Higher values are more "creative".'),(0,r.kt)("td",{parentName:"tr",align:null},"0.5"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Top P"),(0,r.kt)("td",{parentName:"tr",align:null},"Alternate sampling mode using the top X% of values. 0.1 corresponds to the top 10%."),(0,r.kt)("td",{parentName:"tr",align:null},"1"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Use Top P"),(0,r.kt)("td",{parentName:"tr",align:null},"Whether to use the Top P sampling mode."),(0,r.kt)("td",{parentName:"tr",align:null},"false"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Max Tokens"),(0,r.kt)("td",{parentName:"tr",align:null},"The maximum number of tokens that GPT is allowed to return. When hitting the max tokens, the response will be cut off."),(0,r.kt)("td",{parentName:"tr",align:null},"1024"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Stop"),(0,r.kt)("td",{parentName:"tr",align:null},"Comma separated list of stop tokens. If any stop token is encountered, the response will end immediately."),(0,r.kt)("td",{parentName:"tr",align:null},"(None)"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string[]"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Presence Penalty"),(0,r.kt)("td",{parentName:"tr",align:null},"Applies a penalty or bonus for tokens that have already been used. See the OpenAI documentation for more info."),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Frequency Penalty"),(0,r.kt)("td",{parentName:"tr",align:null},"Applies a penalty or bonus for tokens based on how much they have been used. See the OpenAI documentation for more info."),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"User"),(0,r.kt)("td",{parentName:"tr",align:null},"Attaches a user field, for monitoring and detecting abuse. See the OpenAI documentation for more info."),(0,r.kt)("td",{parentName:"tr",align:null},"(Empty)"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Number of Choices"),(0,r.kt)("td",{parentName:"tr",align:null},"Allows the Chat Node to output a list of responses simultaneously if the value is greater than 1. Each response will have a unique set of text (assuming the temperature is more than 0)"),(0,r.kt)("td",{parentName:"tr",align:null},"1"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Enable Function Use"),(0,r.kt)("td",{parentName:"tr",align:null},"Allows the use of functions in the prompt. Enables the ",(0,r.kt)("inlineCode",{parentName:"td"},"Functions")," input."),(0,r.kt)("td",{parentName:"tr",align:null},"false"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Cache"),(0,r.kt)("td",{parentName:"tr",align:null},"Caches the response locally in Rivet. If the chat node gets the exact same prompt again, it will return the cached response instead of making a new request to OpenAI."),(0,r.kt)("td",{parentName:"tr",align:null},"false"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Use for subgraph partial output"),(0,r.kt)("td",{parentName:"tr",align:null},"If enabled, the Chat Node will be used to generate partial output for subgraphs. This is only visual - the chat node's partial output will appear as the subgraph's partial output. Only enable if the chat node will be running exclusively from other chat nodes at the same time, to avoid problems."),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")))),(0,r.kt)("p",null,"For all settings, see the ",(0,r.kt)("a",{parentName:"p",href:"https://platform.openai.com/docs/api-reference/chat/create"},"OpenAI API documentation")," for more information."))),(0,r.kt)("h3",{id:"example-1-simple-response"},"Example 1: Simple Response"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Add a Chat node to your graph."),(0,r.kt)("li",{parentName:"ol"},"Add a text node and place your message to GPT inside the text node by opening its editor and replacing ",(0,r.kt)("inlineCode",{parentName:"li"},"{{input}}")," with your message."),(0,r.kt)("li",{parentName:"ol"},"Connect the output of the text node to the ",(0,r.kt)("inlineCode",{parentName:"li"},"Prompt")," input of the Chat node."),(0,r.kt)("li",{parentName:"ol"},"Run your graph. You will see the output of the Chat node at the bottom of the node.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Simple Response Example",src:n(7775).Z,width:"1196",height:"980"})),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"If nothing is connected to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Prompt")," input, the Chat node will error."),(0,r.kt)("p",null,"If the request to OpenAI fails due to rate-limiting, the Chat node will retry the request using a jittered exponential backoff algorithm. This retry will\nhappen for up to 5 minutes. If the request still fails after 5 minutes, the Chat node will error."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Be careful ",(0,r.kt)("a",{parentName:"p",href:"/docs/user-guide/splitting"},"splitting")," a Chat node too much that you run into rate limiting issues.")),(0,r.kt)("p",null,"If OpenAI returns a 500-level error (due to being overloaded or downtime, etc), the Chat node will retry in a similar manner."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What if I connect a different data type to the prompt or system prompt input?")),(0,r.kt)("p",null,"A: The value will be attempted to be converted into a string, which will turn into a ",(0,r.kt)("inlineCode",{parentName:"p"},"user"),' type chat messages. So for example a number 5 will turn into a user message "5".\nIf the value cannot be converted to a string, then it will be ignored for the list of prompt messages.'),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What if an input is toggled on, but not connected?")),(0,r.kt)("p",null,"A: The value configured in the UI will be used instead."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What if the system prompt is connected, but the prompt is not?")),(0,r.kt)("p",null,"A: The Chat Node will error. The prompt input is required. To send only a system prompt, you can use a ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/prompt"},"Prompt")," node to create a system-type prompt, and connect it to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Prompt")," input."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: What if the system prompt is connected, and the prompt also contains a system prompt?")),(0,r.kt)("p",null,"A: Both system prompts will be sent. System prompts that are not the first message in a chain are undefined behavior in GPT. It may work, or it may act strangely. It may follow one or both of the system prompts."),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/assemble-prompt"},"Assemble Prompt Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/prompt"},"Prompt Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/text"},"Text Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://platform.openai.com/docs/api-reference/chat/create"},"OpenAI API Documentation"))))}h.isMDXComponent=!0},7775:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/chat-node-example-01-d02666baca10ab4097e383cda0b7f82c.png"},3111:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/chat-node-11b598a8541cf7764743cb4264102d30.png"}}]); \ No newline at end of file diff --git a/assets/js/b4f0f202.319673bb.js b/assets/js/b4f0f202.319673bb.js new file mode 100644 index 000000000..8d806e2f8 --- /dev/null +++ b/assets/js/b4f0f202.319673bb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1415],{6593:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>h});var n=a(1644);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),c=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),s=c(a),m=r,h=s["".concat(p,".").concat(m)]||s[m]||d[m]||l;return a?n.createElement(h,o(o({ref:t},u),{},{components:a})):n.createElement(h,o({ref:t},u))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,o=new Array(l);o[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{a.d(t,{Z:()=>o});var n=a(1644),r=a(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:a},t)}},6663:(e,t,a)=>{a.d(t,{Z:()=>x});var n=a(373),r=a(1644),l=a(156),o=a(1476),i=a(2824),p=a(9643),c=a(7190),u=a(6985);function s(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??s(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The 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 a??null}({queryString:t,groupId:a});return[(0,p._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[p,c]=h({queryString:a,groupId:n}),[s,b]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,u.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),k=(()=>{const e=p??s;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),b(e)}),[c,b,l]),tabValues:l}}var k=a(8810);const f={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function N(e){let{className:t,block:a,selectedValue:i,selectValue:p,tabValues:c}=e;const u=[],{blockElementScrollPositionUntilNextRender:s}=(0,o.o5)(),d=e=>{const t=e.currentTarget,a=u.indexOf(t),n=c[a].value;n!==i&&(s(t),p(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=u.indexOf(e.currentTarget)+1;t=u[a]??u[0];break}case"ArrowLeft":{const a=u.indexOf(e.currentTarget)-1;t=u[a]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",f.tabItem,o?.className,{"tabs__item--active":i===t})}),a??t)})))}function g(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},r.createElement(N,(0,n.Z)({},e,t)),r.createElement(g,(0,n.Z)({},e,t)))}function x(e){const t=(0,k.Z)();return r.createElement(y,(0,n.Z)({key:String(t)},e))}},1168:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var n=a(373),r=(a(1644),a(6593)),l=a(6663),o=a(7026);const i={id:"extract-object-path",title:"Extract Object Path Node",sidebar_label:"Extract Object Path"},p=void 0,c={unversionedId:"node-reference/extract-object-path",id:"node-reference/extract-object-path",title:"Extract Object Path Node",description:"Extract Object Path Node Screenshot",source:"@site/docs/node-reference/extract-object-path.mdx",sourceDirName:"node-reference",slug:"/node-reference/extract-object-path",permalink:"/docs/node-reference/extract-object-path",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/extract-object-path.mdx",tags:[],version:"current",frontMatter:{id:"extract-object-path",title:"Extract Object Path Node",sidebar_label:"Extract Object Path"},sidebar:"nodeReference",previous:{title:"Extract JSON",permalink:"/docs/node-reference/extract-json"},next:{title:"Extract YAML",permalink:"/docs/node-reference/extract-yaml"}},u={},s=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Extract a property from an object",id:"example-1-extract-a-property-from-an-object",level:2},{value:"Example 2: Extract properties from an array of objects",id:"example-2-extract-properties-from-an-array-of-objects",level:2},{value:"Example 3: Extract a dynamic property from an object",id:"example-3-extract-a-dynamic-property-from-an-object",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQs",id:"faqs",level:2},{value:"See Also",id:"see-also",level:2}],d={toc:s},m="wrapper";function h(e){let{components:t,...i}=e;return(0,r.kt)(m,(0,n.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Extract Object Path Node Screenshot",src:a(1077).Z,width:"350",height:"184"})),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Extract Object Path Node allows you to run ",(0,r.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/jsonpath-plus"},"jsonpath")," queries on an object. This is useful for extracting data from a JSON object or array. Some use-cases include:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Extracting data from a JSON object returned by an API"),(0,r.kt)("li",{parentName:"ul"},"Extracting properties from the result of an ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-json"},"Extract JSON")," node or ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-yaml"},"Extract YAML")," node"),(0,r.kt)("li",{parentName:"ul"},"Accessing individual elements of an array"),(0,r.kt)("li",{parentName:"ul"},"Complex queries such as ",(0,r.kt)("inlineCode",{parentName:"li"},"$.store.book[?(@.price < 10)]")," to perform filtering")),(0,r.kt)("p",null,"Any valid ",(0,r.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/jsonpath-plus"},(0,r.kt)("inlineCode",{parentName:"a"},"jsonpath-plus"))," query can be used, but just be careful about complex queries."),(0,r.kt)("p",null,"The input to Extract Object path must be either an object, or an array of any data type. You can also query properties of non-object data types, such as strings, such as ",(0,r.kt)("inlineCode",{parentName:"p"},"$.length")," to get the length of a string."),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Object"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"object")," or ",(0,r.kt)("inlineCode",{parentName:"td"},"any[]")," or ",(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The object to query using the path."),(0,r.kt)("td",{parentName:"tr",align:null},"(required)"),(0,r.kt)("td",{parentName:"tr",align:null}))))),(0,r.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Match"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"any")),(0,r.kt)("td",{parentName:"tr",align:null},"If the value is found in the object, the value matched."),(0,r.kt)("td",{parentName:"tr",align:null},"If the value is not found, this port is not ran.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"All Matches"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"any[]")),(0,r.kt)("td",{parentName:"tr",align:null},"When using a path that can match multiple times, such as ",(0,r.kt)("inlineCode",{parentName:"td"},"$.someArray[*]"),", represents all paths of the object that match."),(0,r.kt)("td",{parentName:"tr",align:null},"If the value is not found, this port will run with an empty array."))))),(0,r.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Path"),(0,r.kt)("td",{parentName:"tr",align:null},"The jsonpath path to use to extract properties from the input object."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"$")),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))))),(0,r.kt)("h2",{id:"example-1-extract-a-property-from-an-object"},"Example 1: Extract a property from an object"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create an ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/object"},"Object Node")," and set the value to the following:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "name": "John Doe",\n "age": 30\n}\n'))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create an Extract Object Path Node and connect the Object Node to it. Set the ",(0,r.kt)("inlineCode",{parentName:"p"},"Path")," of the Extract Object Path Node to:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre"},"$.name\n"))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Run the graph. The Extract Object Path Node should output the value ",(0,r.kt)("inlineCode",{parentName:"p"},"John Doe"),"."))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Extract Object Path Node Example 1",src:a(2331).Z,width:"690",height:"328"})),(0,r.kt)("h2",{id:"example-2-extract-properties-from-an-array-of-objects"},"Example 2: Extract properties from an array of objects"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create an ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/object"},"Object Node")," and set the value to the following:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "name": "John Doe",\n "age": 30\n },\n {\n "name": "Jane Doe",\n "age": 25\n }\n]\n'))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create an Extract Object Path Node and connect the Object Node to it. Set the ",(0,r.kt)("inlineCode",{parentName:"p"},"Path")," of the Extract Object Path Node to:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre"}," $[*].name\n"))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Run the graph. The Extract Object Path Node's ",(0,r.kt)("inlineCode",{parentName:"p"},"all_matches")," output should have the value ",(0,r.kt)("inlineCode",{parentName:"p"},"John Doe")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"Jane Doe"),". The ",(0,r.kt)("inlineCode",{parentName:"p"},"match")," output contains the first match, which is ",(0,r.kt)("inlineCode",{parentName:"p"},"John Doe"),"."))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Extract Object Path Node Example 2",src:a(1438).Z,width:"705",height:"377"})),(0,r.kt)("h2",{id:"example-3-extract-a-dynamic-property-from-an-object"},"Example 3: Extract a dynamic property from an object"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create an ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/object"},"Object Node")," and set the value to the following:"),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "name": "John Doe",\n "age": 30\n}\n'))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create a Text node and set the value to ",(0,r.kt)("inlineCode",{parentName:"p"},"age"),".")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create another Text node and set the value to ",(0,r.kt)("inlineCode",{parentName:"p"},"$.{{input}}"),". Connect the first Text node to the second Text node.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Create an Extract Object Path node and enable the input port for the ",(0,r.kt)("inlineCode",{parentName:"p"},"Path")," setting. Connect the second Text node to the Extract Object Path node's ",(0,r.kt)("inlineCode",{parentName:"p"},"Path")," input port. Connect the Object Node to the Extract Object Path node.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Run the graph. Note that the path is constructed dynamicalled, and the ",(0,r.kt)("inlineCode",{parentName:"p"},"age")," is extracted from the object."))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Extract Object Path Node Example 3",src:a(1167).Z,width:"983",height:"482"})),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"If the path is invalid, the Extract Object Path Node will throw an error. If the path is valid, but the value is not found, the ",(0,r.kt)("inlineCode",{parentName:"p"},"match")," output will not run, and the ",(0,r.kt)("inlineCode",{parentName:"p"},"all_matches")," output will run with an empty array."),(0,r.kt)("h2",{id:"faqs"},"FAQs"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Does the Extract Object Path Node only work with objects?")),(0,r.kt)("p",null,"A: No, it can also work with arrays and other JavaScript values that have properties, such as strings. For example, you can use ",(0,r.kt)("inlineCode",{parentName:"p"},"$.length")," to get the length of a string."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I split the Extract Object Path Node in order to execute a command on an array of objects?")),(0,r.kt)("p",null,"A: It is recommended to simply use the ",(0,r.kt)("inlineCode",{parentName:"p"},"*")," operator and the ",(0,r.kt)("inlineCode",{parentName:"p"},"All Matches")," output, but there can be cases where splitting the node is appropriate. For example with an array of objects that themselves contain arrays, and you want to extract all sub-arrays, you can either to ",(0,r.kt)("inlineCode",{parentName:"p"},"$[*].someArray")," or split the node and use ",(0,r.kt)("inlineCode",{parentName:"p"},"$.someArray")," on the split node."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: Can I use the Extract Object Path Node to extract data from a JSON object returned by an API?")),(0,r.kt)("p",null,"A: Yes, you can use the ",(0,r.kt)("a",{parentName:"p",href:"/docs/node-reference/http-call"},"HTTP Call Node")," to make an API request, and then use the Extract Object Path Node to extract data from the response."),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/code"},"Code Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-json"},"Extract JSON Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-yaml"},"Extract YAML Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/object"},"Object Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/array"},"Array Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-with-regex"},"Extract with Regex Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/user-guide/data-types"},"Data Types"))))}h.isMDXComponent=!0},2331:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/extract-object-path-node-example-01-8a1b6697a483e13d6a4e11cf1a23d770.png"},1438:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/extract-object-path-node-example-02-352553ce1bbedfe076cb30e3a7a4570b.png"},1167:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/extract-object-path-node-example-03-2684e3b454cbdfb716399dc014cef39c.png"},1077:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/extract-object-path-node-40111747e5b19fb79062787ff5bc668e.png"}}]); \ No newline at end of file diff --git a/assets/js/b6afd583.15640163.js b/assets/js/b6afd583.15640163.js new file mode 100644 index 000000000..0b157807b --- /dev/null +++ b/assets/js/b6afd583.15640163.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[754],{6593:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=n.createContext({}),l=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},p=function(e){var r=l(e.components);return n.createElement(s.Provider,{value:r},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=l(t),d=o,m=u["".concat(s,".").concat(d)]||u[d]||f[d]||a;return t?n.createElement(m,c(c({ref:r},p),{},{components:t})):n.createElement(m,c({ref:r},p))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=d;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const a={title:"Hash"},c="Hash Node",i={unversionedId:"node-reference/hash",id:"node-reference/hash",title:"Hash",description:"",source:"@site/docs/node-reference/hash.mdx",sourceDirName:"node-reference",slug:"/node-reference/hash",permalink:"/docs/node-reference/hash",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/hash.mdx",tags:[],version:"current",frontMatter:{title:"Hash"}},s={},l=[],p={toc:l},u="wrapper";function f(e){let{components:r,...t}=e;return(0,o.kt)(u,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"hash-node"},"Hash Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b94eb337.81af15ed.js b/assets/js/b94eb337.81af15ed.js new file mode 100644 index 000000000..5d55d3548 --- /dev/null +++ b/assets/js/b94eb337.81af15ed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2690],{6593:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(1644);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,h=d["".concat(o,".").concat(m)]||d[m]||p[m]||l;return n?a.createElement(h,i(i({ref:t},c),{},{components:n})):a.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var u={};for(var o in t)hasOwnProperty.call(t,o)&&(u[o]=t[o]);u.originalType=e,u[d]="string"==typeof e?e:r,i[1]=u;for(var s=2;s{n.d(t,{Z:()=>i});var a=n(1644),r=n(156);const l={tabItem:"tabItem_hFhF"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(373),r=n(1644),l=n(156),i=n(1476),u=n(2824),o=n(9643),s=n(7190),c=n(6985);function d(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,u.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,o._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=p(e),[i,u]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[o,s]=h({queryString:n,groupId:a}),[d,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),g=(()=>{const e=o??d;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{g&&u(g)}),[g]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),k(e)}),[s,k,l]),tabValues:l}}var g=n(8810);const f={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function b(e){let{className:t,block:n,selectedValue:u,selectValue:o,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),a=s[n].value;a!==u&&(d(t),o(a))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},i,{className:(0,l.Z)("tabs__item",f.tabItem,i?.className,{"tabs__item--active":u===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",f.tabList)},r.createElement(b,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function y(e){const t=(0,g.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},9881:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>u,metadata:()=>s,toc:()=>d});var a=n(373),r=(n(1644),n(6593)),l=n(6663),i=n(7026);const u={id:"chunk",title:"Chunk Node",sidebar_label:"Chunk"},o=void 0,s={unversionedId:"node-reference/chunk",id:"node-reference/chunk",title:"Chunk Node",description:"Overview",source:"@site/docs/node-reference/chunk.mdx",sourceDirName:"node-reference",slug:"/node-reference/chunk",permalink:"/docs/node-reference/chunk",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/chunk.mdx",tags:[],version:"current",frontMatter:{id:"chunk",title:"Chunk Node",sidebar_label:"Chunk"},sidebar:"nodeReference",previous:{title:"All Nodes",permalink:"/docs/node-reference/all-nodes"},next:{title:"Extract with Regex",permalink:"/docs/node-reference/extract-with-regex"}},c={},d=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Chunk a string into multiple chunks",id:"example-1-chunk-a-string-into-multiple-chunks",level:3},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],p={toc:d},m="wrapper";function h(e){let{components:t,...u}=e;return(0,r.kt)(m,(0,a.Z)({},p,u,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Chunk node is used to split a string into an array of strings based on a token count."),(0,r.kt)("p",null,"Chunking a string is useful to avoid hitting token count limited in LLMs. You can split a string into multiple chunks and then feed each chunk into a separate Chat node, then combine the outputs of the chat nodes back together to effectively answer questions\nabout strings of text longer than the LLM can handle."),(0,r.kt)("p",null,"The Chunk node can also be used to truncate a string to a certain token count, from the beginning or the end, by using the ",(0,r.kt)("inlineCode",{parentName:"p"},"first")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"last")," outputs."),(0,r.kt)("p",null,"If an overlap percentage is specified, then the chunks will overlap by the specified percentage (relative to the max token count). For example, if the max token count is 100 and the overlap is 50%, then the chunks will overlap by 50 tokens. This can be useful so that context is not lost between chunks, but it may result in more total chunks."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Chunk Node Screenshot",src:n(8151).Z,width:"560",height:"512"})),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Input"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The string that should be chunked."),(0,r.kt)("td",{parentName:"tr",align:null},"(Required)"),(0,r.kt)("td",{parentName:"tr",align:null},"None"))))),(0,r.kt)(i.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Chunks"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string[]")),(0,r.kt)("td",{parentName:"tr",align:null},"The array of string chunks after splitting the string by the configured amount of tokens."),(0,r.kt)("td",{parentName:"tr",align:null},"May be an array of length 1 if the string did not need to be split.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"First"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The first chunk in the chunks array."),(0,r.kt)("td",{parentName:"tr",align:null},"Useful for truncating a string to a specified token count.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Last"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The last chunk in the chunks array."),(0,r.kt)("td",{parentName:"tr",align:null},"Useful for truncating a string from the start to a specified token count.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Indexes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number[]")),(0,r.kt)("td",{parentName:"tr",align:null},"A list of the indexes of the chunks."),(0,r.kt)("td",{parentName:"tr",align:null},"Useful when filtering or zipping the chunks array, and other more complex tasks.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Count"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number")),(0,r.kt)("td",{parentName:"tr",align:null},"The number of chunks in the chunks array."),(0,r.kt)("td",{parentName:"tr",align:null},"Has many uses for more complex tasks."))))),(0,r.kt)(i.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Model"),(0,r.kt)("td",{parentName:"tr",align:null},"The model to use for tokenizing. Different LLMs use different tokenizers."),(0,r.kt)("td",{parentName:"tr",align:null},"gpt-3.5-turbo"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Max Tokens"),(0,r.kt)("td",{parentName:"tr",align:null},"The maximum number of tokens in the chunk."),(0,r.kt)("td",{parentName:"tr",align:null},"1024"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Overlap"),(0,r.kt)("td",{parentName:"tr",align:null},"The amount of overlap (0-100% as 0-1) between chunks, as a factor of the max token count."),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number"))))))),(0,r.kt)("h3",{id:"example-1-chunk-a-string-into-multiple-chunks"},"Example 1: Chunk a string into multiple chunks"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create a text node with some long data, such as lorem ipsum."),(0,r.kt)("li",{parentName:"ol"},"Create a Chunk node and connect the text node to the input. Set the max tokens to something small like 100."),(0,r.kt)("li",{parentName:"ol"},"Run the graph. Note how the output of the chunk node has split the text (visually as new lines) into multiple chunks.")),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"The chunk node has no notable error handling behavior. If the input is not a string, then it will be coerced into a string."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/user-guide/splitting"},"Splitting")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/chat"},"Chat Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/text"},"Text Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/trim-chat-messages"},"Trim Chat Messages Node"))))}h.isMDXComponent=!0},8151:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/chunk-node-10dc3985b02ce6f5938cd2f042533620.png"}}]); \ No newline at end of file diff --git a/assets/js/ba6db9dc.65ad32f2.js b/assets/js/ba6db9dc.65ad32f2.js new file mode 100644 index 000000000..dd759a275 --- /dev/null +++ b/assets/js/ba6db9dc.65ad32f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7501],{6593:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var n=a(1644);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var u=n.createContext({}),s=function(e){var t=n.useContext(u),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(a),m=r,h=c["".concat(u,".").concat(m)]||c[m]||d[m]||l;return a?n.createElement(h,i(i({ref:t},p),{},{components:a})):n.createElement(h,i({ref:t},p))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=m;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[c]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{a.d(t,{Z:()=>i});var n=a(1644),r=a(156);const l={tabItem:"tabItem_hFhF"};function i(e){let{children:t,hidden:a,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:a},t)}},6663:(e,t,a)=>{a.d(t,{Z:()=>v});var n=a(373),r=a(1644),l=a(156),i=a(1476),o=a(2824),u=a(9643),s=a(7190),p=a(6985);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function d(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??c(a);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function m(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The 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 a??null}({queryString:t,groupId:a});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function g(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[u,s]=h({queryString:a,groupId:n}),[c,g]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,p.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),f=(()=>{const e=u??c;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),g(e)}),[s,g,l]),tabValues:l}}var f=a(8810);const k={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function b(e){let{className:t,block:a,selectedValue:o,selectValue:u,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,a=p.indexOf(t),n=s[a].value;n!==o&&(c(t),u(n))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=p.indexOf(e.currentTarget)+1;t=p[a]??p[0];break}case"ArrowLeft":{const a=p.indexOf(e.currentTarget)-1;t=p[a]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},s.map((e=>{let{value:t,label:a,attributes:i}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",k.tabItem,i?.className,{"tabs__item--active":o===t})}),a??t)})))}function N(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function x(e){const t=g(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},r.createElement(b,(0,n.Z)({},e,t)),r.createElement(N,(0,n.Z)({},e,t)))}function v(e){const t=(0,f.Z)();return r.createElement(x,(0,n.Z)({key:String(t)},e))}},69:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>u,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var n=a(373),r=(a(1644),a(6593)),l=a(6663),i=a(7026);const o={id:"extract-with-regex",title:"Extract with Regex Node",sidebar_label:"Extract with Regex"},u=void 0,s={unversionedId:"node-reference/extract-with-regex",id:"node-reference/extract-with-regex",title:"Extract with Regex Node",description:"Extract with Regex Node Screenshot",source:"@site/docs/node-reference/extract-with-regex.mdx",sourceDirName:"node-reference",slug:"/node-reference/extract-with-regex",permalink:"/docs/node-reference/extract-with-regex",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/extract-with-regex.mdx",tags:[],version:"current",frontMatter:{id:"extract-with-regex",title:"Extract with Regex Node",sidebar_label:"Extract with Regex"},sidebar:"nodeReference",previous:{title:"Chunk",permalink:"/docs/node-reference/chunk"},next:{title:"Join",permalink:"/docs/node-reference/join"}},p={},c=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Extract a command from an LLM response",id:"example-1-extract-a-command-from-an-llm-response",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],d={toc:c},m="wrapper";function h(e){let{components:t,...o}=e;return(0,r.kt)(m,(0,n.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Extract with Regex Node Screenshot",src:a(3487).Z,width:"347",height:"228"})),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"The Extract With Regex (or Extract Regex) node allows you to extract one or more strings from a string using a regular expression."),(0,r.kt)("p",null,"Each capture group in the regular expression will correspond to an output port on the node, so the number of outputs will be equal to the number of capture groups in the regular expression."),(0,r.kt)("p",null,"The Extract With Regex node can be used for many cases such as parsing a response from an LLM to extract specific values, or parsing a string from a file to extract specific values."),(0,r.kt)("p",null,"If you do not have any capture groups in your regex, you can still use the ",(0,r.kt)("inlineCode",{parentName:"p"},"Matches"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Succeeded"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"Failed")," outputs of the node to determine if the regex matched the input string."),(0,r.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"inputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"inputs"},"Inputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Input"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The string to match the regex against."),(0,r.kt)("td",{parentName:"tr",align:null},"(required)"),(0,r.kt)("td",{parentName:"tr",align:null},"If the value is not a string, it will be coerced into a string before matching."))))),(0,r.kt)(i.Z,{value:"outputs",mdxType:"TabItem"},(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Title"),(0,r.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Output N"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Output ports are created, one per capture group in the regular expression path. The value is the contents of the capture group."),(0,r.kt)("td",{parentName:"tr",align:null},"Dynamic count based on the number of capture groups.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Matches"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string[]")),(0,r.kt)("td",{parentName:"tr",align:null},"All matches of the regular expression on the string, as an array."),(0,r.kt)("td",{parentName:"tr",align:null},"Contains all matched strings, ignoring capture groups.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Succeeded"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"Outputs true if the regex was matched on the input string. Outputs false if it was node."),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Failed"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"Outputs true if the regex did not match the input string. Outputs false if it was matched."),(0,r.kt)("td",{parentName:"tr",align:null}))))),(0,r.kt)(i.Z,{value:"settings",mdxType:"TabItem"},(0,r.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Setting"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"),(0,r.kt)("th",{parentName:"tr",align:null},"Input Data Type"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Error on failed"),(0,r.kt)("td",{parentName:"tr",align:null},"If true, the Extract With Regex node will error entirely if the input string was not found. This is useful for required matches."),(0,r.kt)("td",{parentName:"tr",align:null},"False"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Multiline Mode"),(0,r.kt)("td",{parentName:"tr",align:null},"If true, the ",(0,r.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline"},"multiline flag")," is set on the regular expression, causing ",(0,r.kt)("inlineCode",{parentName:"td"},"^")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"$")," to match the beginning and ends of lines within the string."),(0,r.kt)("td",{parentName:"tr",align:null},"False"),(0,r.kt)("td",{parentName:"tr",align:null},"No"),(0,r.kt)("td",{parentName:"tr",align:null},"N/A")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Regex"),(0,r.kt)("td",{parentName:"tr",align:null},"The regular expression to use for matching against the input string."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"([a-zA-Z]+)")," (a string of alphabetic characters)"),(0,r.kt)("td",{parentName:"tr",align:null},"Yes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string"))))))),(0,r.kt)("h2",{id:"example-1-extract-a-command-from-an-llm-response"},"Example 1: Extract a command from an LLM response"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create a ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/chat"},"Chat Node")," and pass a ",(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/text"},"Prompt Node")," set to ",(0,r.kt)("inlineCode",{parentName:"li"},"System")," into its ",(0,r.kt)("inlineCode",{parentName:"li"},"prompt")," input, with something like the following:",(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre"},'Your reply can initiate commands, for example `!hello` will cause "Hello world" to appear for the user. Try it out now!\n'))),(0,r.kt)("li",{parentName:"ol"},"Feed the output of the Chat node into an Extract With Regex node with the following regular expression:",(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre"},"!([a-zA-Z]+)\n"))),(0,r.kt)("li",{parentName:"ol"},"Feed the output of the ",(0,r.kt)("inlineCode",{parentName:"li"},"Output 1")," port into another Text node to get the matched command. The output of the Text node should be ",(0,r.kt)("inlineCode",{parentName:"li"},"hello"),".")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Extract with Regex Example 1",src:a(2594).Z,width:"1054",height:"750"})),(0,r.kt)("h2",{id:"error-handling"},"Error Handling"),(0,r.kt)("p",null,"If the input string is not provided, the node will error. If the input is not a string, it will be coerced into a string before matching."),(0,r.kt)("p",null,"If the regular expression is invalid, the node will error."),(0,r.kt)("p",null,"If the ",(0,r.kt)("inlineCode",{parentName:"p"},"Error on failed")," setting is enabled, the node will error if the regular expression did not match the input string."),(0,r.kt)("h2",{id:"faq"},"FAQ"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Q: How do I match a string that contains a special character?")),(0,r.kt)("p",null,"Special characters such as a newline cannot be escaped in the regular expression editor, however you can put literal newlines in the regular expression in the editor, and they will be preserved. So to match a new line, put a new line in the regular expression editor."),(0,r.kt)("h2",{id:"see-also"},"See Also"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-object-path"},"Extract Object Path Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-json"},"Extract JSON Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-yaml"},"Extract YAML Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-object-path"},"Extract Object Path Node")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/docs/node-reference/match"},"Match Node"))))}h.isMDXComponent=!0},2594:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/extract-with-regex-node-example-01-e607bc5e46c68dbaad10f3cdbbe5a8a3.png"},3487:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/extract-with-regex-node-ed6b317ad6e2df504d3023145cd7bf0f.png"}}]); \ No newline at end of file diff --git a/assets/js/bcfb61bc.9eeb3b8b.js b/assets/js/bcfb61bc.9eeb3b8b.js new file mode 100644 index 000000000..2540f1a19 --- /dev/null +++ b/assets/js/bcfb61bc.9eeb3b8b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4651],{6593:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),d=p(r),f=o,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||a;return r?n.createElement(m,c(c({ref:t},l),{},{components:r})):n.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:o,c[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const a={title:"KNN Dataset"},c="KNN Dataset Node",i={unversionedId:"node-reference/knn-dataset",id:"node-reference/knn-dataset",title:"KNN Dataset",description:"",source:"@site/docs/node-reference/knn-dataset.mdx",sourceDirName:"node-reference",slug:"/node-reference/knn-dataset",permalink:"/docs/node-reference/knn-dataset",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/knn-dataset.mdx",tags:[],version:"current",frontMatter:{title:"KNN Dataset"},sidebar:"nodeReference",previous:{title:"Graph Input",permalink:"/docs/node-reference/graph-input"},next:{title:"Load Dataset",permalink:"/docs/node-reference/load-dataset"}},s={},p=[],l={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"knn-dataset-node"},"KNN Dataset Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c1d447ec.04690904.js b/assets/js/c1d447ec.04690904.js new file mode 100644 index 000000000..b1e8d52d1 --- /dev/null +++ b/assets/js/c1d447ec.04690904.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3294],{6593:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),d=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},f=function(e){var r=d(e.components);return n.createElement(l.Provider,{value:r},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},s=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,f=i(e,["components","mdxType","originalType","parentName"]),p=d(t),s=o,m=p["".concat(l,".").concat(s)]||p[s]||u[s]||c;return t?n.createElement(m,a(a({ref:r},f),{},{components:t})):n.createElement(m,a({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=s;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[p]="string"==typeof e?e:o,a[1]=i;for(var d=2;d{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var n=t(373),o=(t(1644),t(6593));const c={title:"Read File"},a="Read File Node",i={unversionedId:"node-reference/read-file",id:"node-reference/read-file",title:"Read File",description:"",source:"@site/docs/node-reference/read-file.mdx",sourceDirName:"node-reference",slug:"/node-reference/read-file",permalink:"/docs/node-reference/read-file",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/read-file.mdx",tags:[],version:"current",frontMatter:{title:"Read File"},sidebar:"nodeReference",previous:{title:"Read Directory",permalink:"/docs/node-reference/read-directory"},next:{title:"User Input",permalink:"/docs/node-reference/user-input"}},l={},d=[],f={toc:d},p="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(p,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"read-file-node"},"Read File Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c3b8082c.55b0e4bf.js b/assets/js/c3b8082c.55b0e4bf.js new file mode 100644 index 000000000..ebab57444 --- /dev/null +++ b/assets/js/c3b8082c.55b0e4bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5913],{6593:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(1644);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),d=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=d(n),m=i,h=p["".concat(s,".").concat(m)]||p[m]||c[m]||o;return n?a.createElement(h,r(r({ref:t},u),{},{components:n})):a.createElement(h,r({ref:t},u))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:i,r[1]=l;for(var d=2;d{n.d(t,{Z:()=>p});var a=n(1644),i=n(156),o=n(3840),r=n(7600);const l={admonition:"admonition_sz1_",admonitionHeading:"admonitionHeading_xwjo",admonitionIcon:"admonitionIcon_pI1Y",admonitionContent:"admonitionContent_PUiD"};const s={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(r.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(r.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(r.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(r.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(r.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},d={secondary:"note",important:"info",success:"tip",warning:"danger"};function u(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),i=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:i}}(e.children);return{...e,title:e.title??t,children:n}}function p(e){const{children:t,type:n,title:r,icon:p}=u(e),c=function(e){const t=d[e]??e,n=s[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),s.info)}(n),m=r??c.label,{iconComponent:h}=c,g=p??a.createElement(h,null);return a.createElement("div",{className:(0,i.Z)(o.k.common.admonition,o.k.common.admonitionType(e.type),"alert",`alert--${c.infimaClassName}`,l.admonition)},a.createElement("div",{className:l.admonitionHeading},a.createElement("span",{className:l.admonitionIcon},g),m),a.createElement("div",{className:l.admonitionContent},t))}},7026:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(1644),i=n(156);const o={tabItem:"tabItem_hFhF"};function r(e){let{children:t,hidden:n,className:r}=e;return a.createElement("div",{role:"tabpanel",className:(0,i.Z)(o.tabItem,r),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(373),i=n(1644),o=n(156),r=n(1476),l=n(2824),s=n(9643),d=n(7190),u=n(6985);function p(e){return function(e){return i.Children.map(e,(e=>{if(!e||(0,i.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:i}}=e;return{value:t,label:n,attributes:a,default:i}}))}function c(e){const{values:t,children:n}=e;return(0,i.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,d.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,s._X)(o),(0,i.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,o=c(e),[r,l]=(0,i.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,d]=h({queryString:n,groupId:a}),[p,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,u.Nk)(n);return[a,(0,i.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:a}),f=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,i.useLayoutEffect)((()=>{f&&l(f)}),[f]);return{selectedValue:r,selectValue:(0,i.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),g(e)}),[d,g,o]),tabValues:o}}var f=n(8810);const k={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function N(e){let{className:t,block:n,selectedValue:l,selectValue:s,tabValues:d}=e;const u=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.o5)(),c=e=>{const t=e.currentTarget,n=u.indexOf(t),a=d[n].value;a!==l&&(p(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return i.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},d.map((e=>{let{value:t,label:n,attributes:r}=e;return i.createElement("li",(0,a.Z)({role:"tab",tabIndex:l===t?0:-1,"aria-selected":l===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:c},r,{className:(0,o.Z)("tabs__item",k.tabItem,r?.className,{"tabs__item--active":l===t})}),n??t)})))}function b(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,i.cloneElement)(e,{className:"margin-top--md"}):null}return i.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,i.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=g(e);return i.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},i.createElement(N,(0,a.Z)({},e,t)),i.createElement(b,(0,a.Z)({},e,t)))}function y(e){const t=(0,f.Z)();return i.createElement(v,(0,a.Z)({key:String(t)},e))}},7785:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>p});var a=n(373),i=(n(1644),n(6593)),o=n(6663),r=n(7026);n(4198);const l={id:"join",title:"Join Node",sidebar_label:"Join"},s=void 0,d={unversionedId:"node-reference/join",id:"node-reference/join",title:"Join Node",description:"Overview",source:"@site/docs/node-reference/join.mdx",sourceDirName:"node-reference",slug:"/node-reference/join",permalink:"/docs/node-reference/join",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/join.mdx",tags:[],version:"current",frontMatter:{id:"join",title:"Join Node",sidebar_label:"Join"},sidebar:"nodeReference",previous:{title:"Extract with Regex",permalink:"/docs/node-reference/extract-with-regex"},next:{title:"Prompt",permalink:"/docs/node-reference/prompt"}},u={},p=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Joining Two Text Nodes",id:"example-1-joining-two-text-nodes",level:3},{value:"Example 2: Joining an Array with a Custom Delimiter",id:"example-2-joining-an-array-with-a-custom-delimiter",level:3},{value:"Example 3: Connecting a Split Node to a Join Node",id:"example-3-connecting-a-split-node-to-a-join-node",level:3},{value:"Flattening Arrays",id:"flattening-arrays",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"See Also",id:"see-also",level:2}],c={toc:p},m="wrapper";function h(e){let{components:t,...l}=e;return(0,i.kt)(m,(0,a.Z)({},c,l,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h2",{id:"overview"},"Overview"),(0,i.kt)("p",null,"The Join Node is used to concatenate multiple strings using a specified delimiter. The delimiter can be set directly in the node or provided as an input."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Join Node Screenshot",src:n(1350).Z,width:"662",height:"556"})),(0,i.kt)(o.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,i.kt)(r.Z,{value:"inputs",mdxType:"TabItem"},(0,i.kt)("h2",{id:"inputs"},"Inputs"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Title"),(0,i.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,i.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Join String (optional)"),(0,i.kt)("td",{parentName:"tr",align:null},"string"),(0,i.kt)("td",{parentName:"tr",align:null},"The string to be used as a delimiter when ",(0,i.kt)("inlineCode",{parentName:"td"},"Use Join String Input")," is enabled"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"\\n")),(0,i.kt)("td",{parentName:"tr",align:null},"Only appears if the ",(0,i.kt)("inlineCode",{parentName:"td"},"Use Join String Input")," setting is enabled")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Input ","[i]"),(0,i.kt)("td",{parentName:"tr",align:null},"string"),(0,i.kt)("td",{parentName:"tr",align:null},"The ith string input to be joined"),(0,i.kt)("td",{parentName:"tr",align:null},"N/A"),(0,i.kt)("td",{parentName:"tr",align:null},"Dynamic number of inputs based on how many connections there are"))))),(0,i.kt)(r.Z,{value:"outputs",mdxType:"TabItem"},(0,i.kt)("h2",{id:"outputs"},"Outputs"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Title"),(0,i.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Joined"),(0,i.kt)("td",{parentName:"tr",align:null},"string"),(0,i.kt)("td",{parentName:"tr",align:null},"The concatenated string"),(0,i.kt)("td",{parentName:"tr",align:null},"The output will be a single string resulting from joining all valid string inputs"))))),(0,i.kt)(r.Z,{value:"settings",mdxType:"TabItem"},(0,i.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Setting"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"),(0,i.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,i.kt)("th",{parentName:"tr",align:null},"Use Input Toggle"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Flatten"),(0,i.kt)("td",{parentName:"tr",align:null},"If enabled, array inputs will be flattened before joining"),(0,i.kt)("td",{parentName:"tr",align:null},"true"),(0,i.kt)("td",{parentName:"tr",align:null},"No")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Join String"),(0,i.kt)("td",{parentName:"tr",align:null},"The string to be used as a delimiter when joining inputs"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"\\n")),(0,i.kt)("td",{parentName:"tr",align:null},"Yes")))))),(0,i.kt)("h3",{id:"example-1-joining-two-text-nodes"},"Example 1: Joining Two Text Nodes"),(0,i.kt)("p",null,"Let's say you have two Text nodes: one with the value ",(0,i.kt)("inlineCode",{parentName:"p"},'"Hello"')," and the other with the value ",(0,i.kt)("inlineCode",{parentName:"p"},'"World"'),". If you want to concatenate these two strings with a newline in between, you can do the following:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Add a Join Node to your graph."),(0,i.kt)("li",{parentName:"ol"},"Connect the output of the first Text node to ",(0,i.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Join Node."),(0,i.kt)("li",{parentName:"ol"},"Connect the output of the second Text node to ",(0,i.kt)("inlineCode",{parentName:"li"},"Input 2")," of the Join Node."),(0,i.kt)("li",{parentName:"ol"},"Leave the ",(0,i.kt)("inlineCode",{parentName:"li"},"Join String")," setting as the default value (",(0,i.kt)("inlineCode",{parentName:"li"},"\\n"),").")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"Joined")," output of the Join Node will now be ",(0,i.kt)("inlineCode",{parentName:"p"},'"Hello\\nWorld"'),"."),(0,i.kt)("h3",{id:"example-2-joining-an-array-with-a-custom-delimiter"},"Example 2: Joining an Array with a Custom Delimiter"),(0,i.kt)("p",null,"Imagine you have an Array node with the value ",(0,i.kt)("inlineCode",{parentName:"p"},'["One", "Two", "Three"]')," and you want to join these values with a ",(0,i.kt)("inlineCode",{parentName:"p"},"/")," delimiter. Here's how to do it:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Add a Join Node to your graph."),(0,i.kt)("li",{parentName:"ol"},"Connect the output of the Array node to ",(0,i.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Join Node."),(0,i.kt)("li",{parentName:"ol"},"Change the ",(0,i.kt)("inlineCode",{parentName:"li"},"Join String")," setting to ",(0,i.kt)("inlineCode",{parentName:"li"},'"/"'),".")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"Joined")," output of the Join Node will now be ",(0,i.kt)("inlineCode",{parentName:"p"},'"One/Two/Three"'),"."),(0,i.kt)("h3",{id:"example-3-connecting-a-split-node-to-a-join-node"},"Example 3: Connecting a Split Node to a Join Node"),(0,i.kt)("p",null,"Suppose you have a node with ",(0,i.kt)("inlineCode",{parentName:"p"},"Split")," enabled, which runs N times in parallel and outputs an array of results. If you want to join these results into a single string, you can do the following:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Add a Join Node to your graph."),(0,i.kt)("li",{parentName:"ol"},"Connect the output of the node with ",(0,i.kt)("inlineCode",{parentName:"li"},"Split")," enabled to ",(0,i.kt)("inlineCode",{parentName:"li"},"Input 1")," of the Join Node."),(0,i.kt)("li",{parentName:"ol"},"Set the ",(0,i.kt)("inlineCode",{parentName:"li"},"Join String")," setting to the delimiter you want to use.")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"Joined")," output of the Join Node will now be a string that joins all the results from the Split node. For instance, if the Split node outputs ",(0,i.kt)("inlineCode",{parentName:"p"},'["Hello", "World"]')," and the ",(0,i.kt)("inlineCode",{parentName:"p"},"Join String")," is ",(0,i.kt)("inlineCode",{parentName:"p"},'" "'),", the ",(0,i.kt)("inlineCode",{parentName:"p"},"Joined")," output will be ",(0,i.kt)("inlineCode",{parentName:"p"},'"Hello World"'),"."),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Dynamic Join String:")," The Join Node allows for dynamic join strings. If you have a node that generates a delimiter string dynamically, you can use this as your join string by enabling the ",(0,i.kt)("inlineCode",{parentName:"p"},"Use Join String Input")," setting and connecting the output of that node to the ",(0,i.kt)("inlineCode",{parentName:"p"},"Join String")," input of the Join Node.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Multiple Inputs:")," The Join Node can handle any number of inputs. If you have several nodes generating strings and you want to join all of them, you can simply connect all of them to the Join Node. The Join Node will automatically adjust the number of ",(0,i.kt)("inlineCode",{parentName:"p"},"Input [i]")," inputs based on the number of connections.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Handling Missing Inputs:")," If an input is missing or not a string, the Join Node will simply ignore it during the joining process. This can be useful when dealing with optional inputs that may not always be present.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Special Characters as Delimiters:")," You can use special characters as delimiters. This includes newline (",(0,i.kt)("inlineCode",{parentName:"p"},"\\n"),"), tab (",(0,i.kt)("inlineCode",{parentName:"p"},"\\t"),"), and space (",(0,i.kt)("inlineCode",{parentName:"p"}," "),")."))),(0,i.kt)("h2",{id:"flattening-arrays"},"Flattening Arrays"),(0,i.kt)("p",null,"The Join Node has a ",(0,i.kt)("inlineCode",{parentName:"p"},"Flatten")," setting. When enabled, this setting treats each element of an array input as a separate string to be joined. This is particularly useful when you're dealing with array inputs and want to concatenate all elements of an array into a single string."),(0,i.kt)("p",null,"Flattening in the Join Node works similarly to the ",(0,i.kt)("a",{parentName:"p",href:"./array"},"Array Node"),". For more information on how flattening works, refer to the documentation for the Array Node."),(0,i.kt)("h2",{id:"error-handling"},"Error Handling"),(0,i.kt)("p",null,"If ",(0,i.kt)("inlineCode",{parentName:"p"},"Use Join String Input")," is enabled but no valid ",(0,i.kt)("inlineCode",{parentName:"p"},"Join String")," input is provided, the Join Node will default to the ",(0,i.kt)("inlineCode",{parentName:"p"},"Join String")," specified in the node data. If no valid string inputs are provided, the output will be an empty string."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Q: What happens if I connect a non-string node to the Join Node?")),(0,i.kt)("p",null,"A: The Join Node is designed to work with string inputs. If a non-string input is connected, the node will attempt to convert it to a string. If this conversion isn't possible, the input will be ignored during the joining process."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Q: Can I connect an Array Node to the Join Node?")),(0,i.kt)("p",null,"A: Yes, you can connect an Array Node to the Join Node. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"Flatten")," setting is enabled, each element of the array will be treated as a separate string to be joined. If ",(0,i.kt)("inlineCode",{parentName:"p"},"Flatten")," is disabled, the array will be converted to a string representation and then joined."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Q: What happens if I use a dynamic join string but the input is missing or not a string?")),(0,i.kt)("p",null,"A: If the ",(0,i.kt)("inlineCode",{parentName:"p"},"Use Join String Input")," setting is enabled but no valid ",(0,i.kt)("inlineCode",{parentName:"p"},"Join String")," input is provided, the Join Node will default to the ",(0,i.kt)("inlineCode",{parentName:"p"},"Join String")," specified in the node data."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Q: How does the Join Node handle empty strings or null values?")),(0,i.kt)("p",null,"A: The Join Node will ignore any inputs that are null or not a string. Empty strings, however, will be included in the join operation. For example, if your inputs are ",(0,i.kt)("inlineCode",{parentName:"p"},'"Hello"'),", ",(0,i.kt)("inlineCode",{parentName:"p"},'""'),", and ",(0,i.kt)("inlineCode",{parentName:"p"},'"World"'),", and your join string is ",(0,i.kt)("inlineCode",{parentName:"p"},'" "'),", the output will be ",(0,i.kt)("inlineCode",{parentName:"p"},'"Hello World"'),' (note the extra space between "Hello" and "World").'),(0,i.kt)("h2",{id:"see-also"},"See Also"))}h.isMDXComponent=!0},1350:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/join-node-1d6f0a6eecfb4046dbf63b38756d1dd3.png"}}]); \ No newline at end of file diff --git a/assets/js/c7de5a81.affc6afd.js b/assets/js/c7de5a81.affc6afd.js new file mode 100644 index 000000000..b3fbec1b1 --- /dev/null +++ b/assets/js/c7de5a81.affc6afd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7777],{6593:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(1644);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),s=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),d=s(r),m=a,f=d["".concat(i,".").concat(m)]||d[m]||p[m]||l;return r?n.createElement(f,o(o({ref:t},c),{},{components:r})):n.createElement(f,o({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,o=new Array(l);o[0]=m;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[d]="string"==typeof e?e:a,o[1]=u;for(var s=2;s{r.d(t,{Z:()=>o});var n=r(1644),a=r(156);const l={tabItem:"tabItem_hFhF"};function o(e){let{children:t,hidden:r,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:r},t)}},6663:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(373),a=r(1644),l=r(156),o=r(1476),u=r(2824),i=r(9643),s=r(7190),c=r(6985);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function p(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??d(r);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function m(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,u.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The 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 r??null}({queryString:t,groupId:r});return[(0,i._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,l=p(e),[o,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[i,s]=f({queryString:r,groupId:n}),[d,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,c.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:n}),v=(()=>{const e=i??d;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{v&&u(v)}),[v]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),b(e)}),[s,b,l]),tabValues:l}}var v=r(8810);const h={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function g(e){let{className:t,block:r,selectedValue:u,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,r=c.indexOf(t),n=s[r].value;n!==u&&(d(t),i(n))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},s.map((e=>{let{value:t,label:r,attributes:o}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":u===t})}),r??t)})))}function k(e){let{lazy:t,children:r,selectedValue:n}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},a.createElement(g,(0,n.Z)({},e,t)),a.createElement(k,(0,n.Z)({},e,t)))}function N(e){const t=(0,v.Z)();return a.createElement(y,(0,n.Z)({key:String(t)},e))}},1117:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>f,frontMatter:()=>u,metadata:()=>s,toc:()=>d});var n=r(373),a=(r(1644),r(6593)),l=r(6663),o=r(7026);const u={title:"Vector Store"},i="Vector Store Node",s={unversionedId:"node-reference/vector-store",id:"node-reference/vector-store",title:"Vector Store",description:"Overview",source:"@site/docs/node-reference/vector-store.mdx",sourceDirName:"node-reference",slug:"/node-reference/vector-store",permalink:"/docs/node-reference/vector-store",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/vector-store.mdx",tags:[],version:"current",frontMatter:{title:"Vector Store"},sidebar:"nodeReference",previous:{title:"User Input",permalink:"/docs/node-reference/user-input"},next:{title:"Vector Nearest Neighbors",permalink:"/docs/node-reference/vector-knn"}},c={},d=[{value:"Overview",id:"overview",level:2},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"See Also",id:"see-also",level:2}],p={toc:d},m="wrapper";function f(e){let{components:t,...u}=e;return(0,a.kt)(m,(0,n.Z)({},p,u,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"vector-store-node"},"Vector Store Node"),(0,a.kt)("h2",{id:"overview"},"Overview"),(0,a.kt)("p",null,"The Vector Store Node takes a vector embedding and stores it in a vector store. The vector store can then be used to perform similarity searches."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Chat Node Screenshot",src:r(3787).Z,width:"390",height:"216"})),(0,a.kt)(l.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,a.kt)(o.Z,{value:"inputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"inputs"},"Inputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Required"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Vector"),(0,a.kt)("td",{parentName:"tr",align:null},"vector"),(0,a.kt)("td",{parentName:"tr",align:null},"The vector you would like to store."),(0,a.kt)("td",{parentName:"tr",align:null},"True")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Data"),(0,a.kt)("td",{parentName:"tr",align:null},"any"),(0,a.kt)("td",{parentName:"tr",align:null},"Metadata you would like to store with the vector."),(0,a.kt)("td",{parentName:"tr",align:null},"True")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Id"),(0,a.kt)("td",{parentName:"tr",align:null},"string"),(0,a.kt)("td",{parentName:"tr",align:null},"The vectors unique id."),(0,a.kt)("td",{parentName:"tr",align:null},"True"))))),(0,a.kt)(o.Z,{value:"outputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"outputs"},"Outputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Complete"),(0,a.kt)("td",{parentName:"tr",align:null},"boolean"),(0,a.kt)("td",{parentName:"tr",align:null},"Returns True if the store completes successfully."))))),(0,a.kt)(o.Z,{value:"settings",mdxType:"TabItem"},(0,a.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Setting"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Integration"),(0,a.kt)("td",{parentName:"tr",align:null},"Which integrated store to use.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Collection Id"),(0,a.kt)("td",{parentName:"tr",align:null},"Which collection to store the vector.")))))),(0,a.kt)("h2",{id:"see-also"},"See Also"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/user-guide/plugins/built-in/pinecone"},"Pinecone"))))}f.isMDXComponent=!0},3787:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/vector-store-node-cbfd895243f8288c1d5e1e25bfda2f32.png"}}]); \ No newline at end of file diff --git a/assets/js/d003ba4d.6c5aabb3.js b/assets/js/d003ba4d.6c5aabb3.js new file mode 100644 index 000000000..c0a51c6d5 --- /dev/null +++ b/assets/js/d003ba4d.6c5aabb3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8245],{6593:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=n.createContext({}),d=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},s=function(e){var t=d(e.components);return n.createElement(i.Provider,{value:t},e.children)},l="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),l=d(r),f=o,m=l["".concat(i,".").concat(f)]||l[f]||u[f]||a;return r?n.createElement(m,c(c({ref:t},s),{},{components:r})):n.createElement(m,c({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p[l]="string"==typeof e?e:o,c[1]=p;for(var d=2;d{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>p,toc:()=>d});var n=r(373),o=(r(1644),r(6593));const a={title:"Append to Dataset"},c="Append to Dataset Node",p={unversionedId:"node-reference/append-to-dataset",id:"node-reference/append-to-dataset",title:"Append to Dataset",description:"",source:"@site/docs/node-reference/append-to-dataset.mdx",sourceDirName:"node-reference",slug:"/node-reference/append-to-dataset",permalink:"/docs/node-reference/append-to-dataset",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/append-to-dataset.mdx",tags:[],version:"current",frontMatter:{title:"Append to Dataset"},sidebar:"nodeReference",previous:{title:"Race Inputs",permalink:"/docs/node-reference/race-inputs"},next:{title:"Create Dataset",permalink:"/docs/node-reference/create-dataset"}},i={},d=[],s={toc:d},l="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(l,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"append-to-dataset-node"},"Append to Dataset Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/da4d435d.71dc1a88.js b/assets/js/da4d435d.71dc1a88.js new file mode 100644 index 000000000..69100a3bf --- /dev/null +++ b/assets/js/da4d435d.71dc1a88.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1588],{6593:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),f=p(r),d=o,m=f["".concat(l,".").concat(d)]||f[d]||s[d]||c;return r?n.createElement(m,a(a({ref:t},u),{},{components:r})):n.createElement(m,a({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>s,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const c={title:"Match"},a="Match Node",i={unversionedId:"node-reference/match",id:"node-reference/match",title:"Match",description:"",source:"@site/docs/node-reference/match.mdx",sourceDirName:"node-reference",slug:"/node-reference/match",permalink:"/docs/node-reference/match",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/match.mdx",tags:[],version:"current",frontMatter:{title:"Match"},sidebar:"nodeReference",previous:{title:"Delay",permalink:"/docs/node-reference/delay"},next:{title:"Evaluate",permalink:"/docs/node-reference/evaluate"}},l={},p=[],u={toc:p},f="wrapper";function s(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"match-node"},"Match Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/dc3b85c0.fd45260d.js b/assets/js/dc3b85c0.fd45260d.js new file mode 100644 index 000000000..90bf451ab --- /dev/null +++ b/assets/js/dc3b85c0.fd45260d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5280],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=u(r),d=o,m=f["".concat(l,".").concat(d)]||f[d]||s[d]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[f]="string"==typeof e?e:o,c[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>s,frontMatter:()=>a,metadata:()=>i,toc:()=>u});var n=r(373),o=(r(1644),r(6593));const a={title:"Evaluate"},c="Evaluate Node",i={unversionedId:"node-reference/evaluate",id:"node-reference/evaluate",title:"Evaluate",description:"",source:"@site/docs/node-reference/evaluate.mdx",sourceDirName:"node-reference",slug:"/node-reference/evaluate",permalink:"/docs/node-reference/evaluate",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/evaluate.mdx",tags:[],version:"current",frontMatter:{title:"Evaluate"},sidebar:"nodeReference",previous:{title:"Match",permalink:"/docs/node-reference/match"},next:{title:"If",permalink:"/docs/node-reference/if"}},l={},u=[],p={toc:u},f="wrapper";function s(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"evaluate-node"},"Evaluate Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/df424e68.53f06d2d.js b/assets/js/df424e68.53f06d2d.js new file mode 100644 index 000000000..9ccf43d05 --- /dev/null +++ b/assets/js/df424e68.53f06d2d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3771],{6593:(e,t,r)=>{r.d(t,{Zo:()=>f,kt:()=>b});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=n.createContext({}),p=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},f=function(e){var t=p(e.components);return n.createElement(i.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,f=c(e,["components","mdxType","originalType","parentName"]),s=p(r),d=o,b=s["".concat(i,".").concat(d)]||s[d]||u[d]||a;return r?n.createElement(b,l(l({ref:t},f),{},{components:r})):n.createElement(b,l({ref:t},f))}));function b(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=d;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[s]="string"==typeof e?e:o,l[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const a={title:"Get Global"},l="Get Global Node",c={unversionedId:"node-reference/get-global",id:"node-reference/get-global",title:"Get Global",description:"",source:"@site/docs/node-reference/get-global.mdx",sourceDirName:"node-reference",slug:"/node-reference/get-global",permalink:"/docs/node-reference/get-global",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/get-global.mdx",tags:[],version:"current",frontMatter:{title:"Get Global"},sidebar:"nodeReference",previous:{title:"External Call",permalink:"/docs/node-reference/external-call"},next:{title:"HTTP Call",permalink:"/docs/node-reference/http-call"}},i={},p=[],f={toc:p},s="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"get-global-node"},"Get Global Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e1bbbaad.efe432d7.js b/assets/js/e1bbbaad.efe432d7.js new file mode 100644 index 000000000..2baabeacf --- /dev/null +++ b/assets/js/e1bbbaad.efe432d7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7433],{6593:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var p=n.createContext({}),l=function(e){var r=n.useContext(p),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},s=function(e){var r=l(e.components);return n.createElement(p.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,p=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),f=l(t),d=o,m=f["".concat(p,".").concat(d)]||f[d]||u[d]||c;return t?n.createElement(m,a(a({ref:r},s),{},{components:t})):n.createElement(m,a({ref:r},s))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,a=new Array(c);a[0]=d;var i={};for(var p in r)hasOwnProperty.call(r,p)&&(i[p]=r[p]);i.originalType=e,i[f]="string"==typeof e?e:o,a[1]=i;for(var l=2;l{t.r(r),t.d(r,{assets:()=>p,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=t(373),o=(t(1644),t(6593));const c={title:"Compare"},a="Compare Node",i={unversionedId:"node-reference/compare",id:"node-reference/compare",title:"Compare",description:"",source:"@site/docs/node-reference/compare.mdx",sourceDirName:"node-reference",slug:"/node-reference/compare",permalink:"/docs/node-reference/compare",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/compare.mdx",tags:[],version:"current",frontMatter:{title:"Compare"},sidebar:"nodeReference",previous:{title:"Coalesce",permalink:"/docs/node-reference/coalesce"},next:{title:"Delay",permalink:"/docs/node-reference/delay"}},p={},l=[],s={toc:l},f="wrapper";function u(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},s,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"compare-node"},"Compare Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e44794b9.79441c33.js b/assets/js/e44794b9.79441c33.js new file mode 100644 index 000000000..9c5fd1d1c --- /dev/null +++ b/assets/js/e44794b9.79441c33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7843],{6593:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(1644);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),m=a,h=p["".concat(s,".").concat(m)]||p[m]||d[m]||o;return n?r.createElement(h,l(l({ref:t},c),{},{components:n})):r.createElement(h,l({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(1644),a=n(156);const o={tabItem:"tabItem_hFhF"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},6663:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(373),a=n(1644),o=n(156),l=n(1476),i=n(2824),s=n(9643),u=n(7190),c=n(6985);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The 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:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=d(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" 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 t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=h({queryString:n,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),b=(()=>{const e=s??p;return m({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,o]),tabValues:o}}var b=n(8810);const g={tabList:"tabList_A6Ol",tabItem:"tabItem_djxK"};function N(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=f(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(N,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function y(e){const t=(0,b.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},7698:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>u,toc:()=>p});var r=n(373),a=(n(1644),n(6593)),o=n(6663),l=n(7026);const i={id:"extract-json",title:"Extract JSON Node",sidebar_label:"Extract JSON"},s=void 0,u={unversionedId:"node-reference/extract-json",id:"node-reference/extract-json",title:"Extract JSON Node",description:"Extract JSON Node Screenshot",source:"@site/docs/node-reference/extract-json.mdx",sourceDirName:"node-reference",slug:"/node-reference/extract-json",permalink:"/docs/node-reference/extract-json",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/extract-json.mdx",tags:[],version:"current",frontMatter:{id:"extract-json",title:"Extract JSON Node",sidebar_label:"Extract JSON"},sidebar:"nodeReference",previous:{title:"RNG",permalink:"/docs/node-reference/rng"},next:{title:"Extract Object Path",permalink:"/docs/node-reference/extract-object-path"}},c={},p=[{value:"Overview",id:"overview",level:2},{value:"Algorithm",id:"algorithm",level:3},{value:"Inputs",id:"inputs",level:2},{value:"Outputs",id:"outputs",level:2},{value:"Editor Settings",id:"editor-settings",level:2},{value:"Example 1: Extract a JSON object from an LLM response",id:"example-1-extract-a-json-object-from-an-llm-response",level:2},{value:"Error Handling",id:"error-handling",level:2},{value:"FAQ",id:"faq",level:2},{value:"See Also",id:"see-also",level:2}],d={toc:p},m="wrapper";function h(e){let{components:t,...i}=e;return(0,a.kt)(m,(0,r.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Extract JSON Node Screenshot",src:n(7885).Z,width:"412",height:"211"})),(0,a.kt)("h2",{id:"overview"},"Overview"),(0,a.kt)("p",null,"The Extract JSON node lets you extract an object from a string containing a JSON object or array. Data outside of the JSON object or array will be ignored."),(0,a.kt)("p",null,"Extract JSON is very useful to extract structured data from LLM responses. Ask the LLM to reply with a JSON object, and then use Extract JSON to extract that data from its response, ignoring any text around the JSON object."),(0,a.kt)("h3",{id:"algorithm"},"Algorithm"),(0,a.kt)("p",null,"The node finds the first instance of ",(0,a.kt)("inlineCode",{parentName:"p"},"{")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"["),", and the last instance of ",(0,a.kt)("inlineCode",{parentName:"p"},"}")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"]")," in the string. It then extracts the substring between those two points, and attempts to parse it as JSON."),(0,a.kt)("p",null,"This process is not iterative at the moment, so if the parsing fails because the text contains, for example, two JSON objects, with text in between, the node will error. Use this node when you are sure that the string contains only one JSON object or array."),(0,a.kt)(o.Z,{defaultValue:"inputs",values:[{label:"Inputs",value:"inputs"},{label:"Outputs",value:"outputs"},{label:"Editor Settings",value:"settings"}],mdxType:"Tabs"},(0,a.kt)(l.Z,{value:"inputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"inputs"},"Inputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,a.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Input"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"The string that a JSON object or array will be extracted from."),(0,a.kt)("td",{parentName:"tr",align:null},"(required)"),(0,a.kt)("td",{parentName:"tr",align:null},"The input will be coerced into a string if it is not a string."))))),(0,a.kt)(l.Z,{value:"outputs",mdxType:"TabItem"},(0,a.kt)("h2",{id:"outputs"},"Outputs"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Title"),(0,a.kt)("th",{parentName:"tr",align:null},"Data Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Notes"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Output"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"object")),(0,a.kt)("td",{parentName:"tr",align:null},"The string or array that was extracted from the string."),(0,a.kt)("td",{parentName:"tr",align:null},"If there was no string or array found in the input string, then this port will not be ran.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"No Match"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"If there was no string or object found in the input text, then this port will run, with the full contents of the input string."),(0,a.kt)("td",{parentName:"tr",align:null},"If there was a string or array found in the input string, this port will not be ran."))))),(0,a.kt)(l.Z,{value:"settings",mdxType:"TabItem"},(0,a.kt)("h2",{id:"editor-settings"},"Editor Settings"),(0,a.kt)("p",null,"This node has no configurable editor settings."))),(0,a.kt)("h2",{id:"example-1-extract-a-json-object-from-an-llm-response"},"Example 1: Extract a JSON object from an LLM response"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Create a ",(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/text"},"Text Node"),", and ask the LLM to reply with JSON:",(0,a.kt)("pre",{parentName:"li"},(0,a.kt)("code",{parentName:"pre"},"Please reply to this message with a JSON object.\n"))),(0,a.kt)("li",{parentName:"ol"},"Create a ",(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/chat"},"Chat Node"),", and connect the Text node to its ",(0,a.kt)("inlineCode",{parentName:"li"},"Prompt")," input."),(0,a.kt)("li",{parentName:"ol"},"Create an Extract JSON node, and connect the Chat node to its ",(0,a.kt)("inlineCode",{parentName:"li"},"Input")," input."),(0,a.kt)("li",{parentName:"ol"},"Run the graph, and note that you see the JSON object that you replied with in the Extract JSON node's output. The ",(0,a.kt)("inlineCode",{parentName:"li"},"No Match")," output is not ran, because there was a match.")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Extract JSON Example 1",src:n(9014).Z,width:"1089",height:"548"})),(0,a.kt)("h2",{id:"error-handling"},"Error Handling"),(0,a.kt)("p",null,"This node cannot error under normal circumstances. If the input fails to extract JSON, then the ",(0,a.kt)("inlineCode",{parentName:"p"},"No Match")," output will be executed instead of the ",(0,a.kt)("inlineCode",{parentName:"p"},"Result")," output."),(0,a.kt)("h2",{id:"faq"},"FAQ"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Q: What if the string contains more than one JSON object?")),(0,a.kt)("p",null,"A: The node will error. Use this node when you are sure that the string contains only one JSON object or array. For more complex use-cases, you may want to use a ",(0,a.kt)("a",{parentName:"p",href:"/docs/node-reference/code"},"Code Node")," to parse the string in a custom way."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Q: What if I just want to call ",(0,a.kt)("inlineCode",{parentName:"strong"},"JSON.parse()"),"?")),(0,a.kt)("p",null,"A: You can use a ",(0,a.kt)("a",{parentName:"p",href:"/docs/node-reference/code"},"Code Node")," that simply calls JSON.parse() on the input string."),(0,a.kt)("h2",{id:"see-also"},"See Also"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-yaml"},"Extract YAML Node")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-object-path"},"Extract Object Path Node")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/to-json"},"To JSON Node")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/docs/node-reference/extract-with-regex"},"Extract with Regex Node"))))}h.isMDXComponent=!0},9014:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/extract-json-node-example-01-084bcf9aa769af0151e1308d7c407bb9.png"},7885:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/extract-json-node-daae5a3dc6f25249a298b5db7455225d.png"}}]); \ No newline at end of file diff --git a/assets/js/eae5179a.f35362db.js b/assets/js/eae5179a.f35362db.js new file mode 100644 index 000000000..37a4ec348 --- /dev/null +++ b/assets/js/eae5179a.f35362db.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3980],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(r),f=o,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(373),o=(r(1644),r(6593));const a={title:"Get Dataset Row"},c="Get Dataset Row Node",i={unversionedId:"node-reference/get-dataset-row",id:"node-reference/get-dataset-row",title:"Get Dataset Row",description:"",source:"@site/docs/node-reference/get-dataset-row.mdx",sourceDirName:"node-reference",slug:"/node-reference/get-dataset-row",permalink:"/docs/node-reference/get-dataset-row",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/get-dataset-row.mdx",tags:[],version:"current",frontMatter:{title:"Get Dataset Row"},sidebar:"nodeReference",previous:{title:"Get All Dataset",permalink:"/docs/node-reference/get-all-datasets"},next:{title:"Graph Output",permalink:"/docs/node-reference/graph-output"}},s={},l=[],p={toc:l},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"get-dataset-row-node"},"Get Dataset Row Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ec8a29ae.5d42182b.js b/assets/js/ec8a29ae.5d42182b.js new file mode 100644 index 000000000..9c2006049 --- /dev/null +++ b/assets/js/ec8a29ae.5d42182b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7410],{6593:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,p=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(r),d=o,m=f["".concat(p,".").concat(d)]||f[d]||u[d]||c;return r?n.createElement(m,i(i({ref:t},s),{},{components:r})):n.createElement(m,i({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,i=new Array(c);i[0]=d;var a={};for(var p in t)hasOwnProperty.call(t,p)&&(a[p]=t[p]);a.originalType=e,a[f]="string"==typeof e?e:o,i[1]=a;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>u,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=r(373),o=(r(1644),r(6593));const c={title:"Split Text"},i="Split Text Node",a={unversionedId:"node-reference/split-text",id:"node-reference/split-text",title:"Split Text",description:"",source:"@site/docs/node-reference/split-text.mdx",sourceDirName:"node-reference",slug:"/node-reference/split-text",permalink:"/docs/node-reference/split-text",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/split-text.mdx",tags:[],version:"current",frontMatter:{title:"Split Text"},sidebar:"nodeReference",previous:{title:"Prompt",permalink:"/docs/node-reference/prompt"},next:{title:"Text",permalink:"/docs/node-reference/text"}},p={},l=[],s={toc:l},f="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"split-text-node"},"Split Text Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f1c10c23.3d9c8fa0.js b/assets/js/f1c10c23.3d9c8fa0.js new file mode 100644 index 000000000..03879d18d --- /dev/null +++ b/assets/js/f1c10c23.3d9c8fa0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3300],{6593:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=s(r),f=o,m=u["".concat(l,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>s});var n=r(373),o=(r(1644),r(6593));const a={title:"Text"},c="Text Node",i={unversionedId:"node-reference/text",id:"node-reference/text",title:"Text",description:"Text nodes are string constants used to pass data to other nodes.",source:"@site/docs/node-reference/text.mdx",sourceDirName:"node-reference",slug:"/node-reference/text",permalink:"/docs/node-reference/text",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/text.mdx",tags:[],version:"current",frontMatter:{title:"Text"},sidebar:"nodeReference",previous:{title:"Split Text",permalink:"/docs/node-reference/split-text"},next:{title:"To YAML",permalink:"/docs/node-reference/to-yaml"}},l={},s=[{value:"Config Data",id:"config-data",level:2},{value:"Ports",id:"ports",level:2}],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"text-node"},"Text Node"),(0,o.kt)("p",null,"Text nodes are string constants used to pass data to other nodes."),(0,o.kt)("h2",{id:"config-data"},"Config Data"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"text - The text to pass to other nodes.")),(0,o.kt)("h2",{id:"ports"},"Ports"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"output - Outputs the text to other nodes.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f2480b45.494028ba.js b/assets/js/f2480b45.494028ba.js new file mode 100644 index 000000000..3d7ec3ec1 --- /dev/null +++ b/assets/js/f2480b45.494028ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5653],{6593:(e,r,t)=>{t.d(r,{Zo:()=>d,kt:()=>y});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),p=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},d=function(e){var r=p(e.components);return n.createElement(l.Provider,{value:r},e.children)},f="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},u=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),f=p(t),u=o,y=f["".concat(l,".").concat(u)]||f[u]||s[u]||a;return t?n.createElement(y,c(c({ref:r},d),{},{components:t})):n.createElement(y,c({ref:r},d))}));function y(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=u;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[f]="string"==typeof e?e:o,c[1]=i;for(var p=2;p{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>s,frontMatter:()=>a,metadata:()=>i,toc:()=>p});var n=t(373),o=(t(1644),t(6593));const a={title:"Delay"},c="Delay Node",i={unversionedId:"node-reference/delay",id:"node-reference/delay",title:"Delay",description:"",source:"@site/docs/node-reference/delay.mdx",sourceDirName:"node-reference",slug:"/node-reference/delay",permalink:"/docs/node-reference/delay",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/delay.mdx",tags:[],version:"current",frontMatter:{title:"Delay"},sidebar:"nodeReference",previous:{title:"Compare",permalink:"/docs/node-reference/compare"},next:{title:"Match",permalink:"/docs/node-reference/match"}},l={},p=[],d={toc:p},f="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(f,(0,n.Z)({},d,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"delay-node"},"Delay Node"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f78d6e65.b64ec3bf.js b/assets/js/f78d6e65.b64ec3bf.js new file mode 100644 index 000000000..08b702b28 --- /dev/null +++ b/assets/js/f78d6e65.b64ec3bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2542],{6593:(e,t,r)=>{r.d(t,{Zo:()=>f,kt:()=>m});var n=r(1644);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},f=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,f=i(e,["components","mdxType","originalType","parentName"]),s=p(r),d=o,m=s["".concat(l,".").concat(d)]||s[d]||u[d]||c;return r?n.createElement(m,a(a({ref:t},f),{},{components:r})):n.createElement(m,a({ref:t},f))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[s]="string"==typeof e?e:o,a[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=r(373),o=(r(1644),r(6593));const c={title:"To YAML"},a="To YAML Node",i={unversionedId:"node-reference/to-yaml",id:"node-reference/to-yaml",title:"To YAML",description:"",source:"@site/docs/node-reference/to-yaml.mdx",sourceDirName:"node-reference",slug:"/node-reference/to-yaml",permalink:"/docs/node-reference/to-yaml",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/to-yaml.mdx",tags:[],version:"current",frontMatter:{title:"To YAML"},sidebar:"nodeReference",previous:{title:"Text",permalink:"/docs/node-reference/text"},next:{title:"To JSON",permalink:"/docs/node-reference/to-json"}},l={},p=[],f={toc:p},s="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"to-yaml-node"},"To YAML Node"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f7d5c2fe.7a68da29.js b/assets/js/f7d5c2fe.7a68da29.js new file mode 100644 index 000000000..235d0a20b --- /dev/null +++ b/assets/js/f7d5c2fe.7a68da29.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[774],{4045:(e,a,t)=>{t.r(a),t.d(a,{default:()=>l});var n=t(1644),s=t(9114);const c={wrapper:"wrapper_Kf57",card:"card_oYsz",content:"content_L7HG",lines:"lines_f2sP",logo:"logo_hlc7",tagLine:"tagLine_yCuE"};function l(){return n.createElement("main",{className:s.Z.main},n.createElement("div",{className:c.wrapper},n.createElement("div",{className:c.card},n.createElement("div",{className:c.lines}),n.createElement("div",{className:c.content},n.createElement("div",{className:c.logo},n.createElement("img",{width:"350",height:"350",src:"img/logo.svg",alt:"Rivet App Logo"}),n.createElement("span",{className:c.rivetText},"Rivet")),n.createElement("span",{className:c.tagLine},"Open-Source Visual AI Programming Environment")))))}},9114:(e,a,t)=>{t.d(a,{Z:()=>n});const n={main:"main_MeqP",lines:"lines_TTF_"}}}]); \ No newline at end of file diff --git a/assets/js/f8728646.050a8734.js b/assets/js/f8728646.050a8734.js new file mode 100644 index 000000000..e65663de8 --- /dev/null +++ b/assets/js/f8728646.050a8734.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2617],{6593:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>m});var n=t(1644);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=n.createContext({}),u=function(e){var r=n.useContext(i),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},l=function(e){var r=u(e.components);return n.createElement(i.Provider,{value:r},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),s=u(t),d=o,m=s["".concat(i,".").concat(d)]||s[d]||f[d]||a;return t?n.createElement(m,c(c({ref:r},l),{},{components:t})):n.createElement(m,c({ref:r},l))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,c=new Array(a);c[0]=d;var p={};for(var i in r)hasOwnProperty.call(r,i)&&(p[i]=r[i]);p.originalType=e,p[s]="string"==typeof e?e:o,c[1]=p;for(var u=2;u{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>p,toc:()=>u});var n=t(373),o=(t(1644),t(6593));const a={title:"Graph Input"},c="Graph Input Node",p={unversionedId:"node-reference/graph-input",id:"node-reference/graph-input",title:"Graph Input",description:"",source:"@site/docs/node-reference/graph-input.mdx",sourceDirName:"node-reference",slug:"/node-reference/graph-input",permalink:"/docs/node-reference/graph-input",draft:!1,editUrl:"https://github.com/ironclad/rivet/tree/main/packages/docs/docs/node-reference/graph-input.mdx",tags:[],version:"current",frontMatter:{title:"Graph Input"},sidebar:"nodeReference",previous:{title:"Graph Output",permalink:"/docs/node-reference/graph-output"},next:{title:"KNN Dataset",permalink:"/docs/node-reference/knn-dataset"}},i={},u=[],l={toc:u},s="wrapper";function f(e){let{components:r,...t}=e;return(0,o.kt)(s,(0,n.Z)({},l,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"graph-input-node"},"Graph Input Node"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.1e17ede7.js b/assets/js/main.1e17ede7.js new file mode 100644 index 000000000..dafda5692 --- /dev/null +++ b/assets/js/main.1e17ede7.js @@ -0,0 +1,2 @@ +/*! For license information please see main.1e17ede7.js.LICENSE.txt */ +(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[179],{464:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>o});var r=n(1644);const a=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),r.createElement(a.Provider,{value:n},t)}},1473:(e,t,n)=>{"use strict";var r=n(1644),a=n(5003),o=n(1710),i=n(65),l=n(6072);const s=[n(338),n(2481),n(7921),n(7610)];var c=n(4478),u=n(2824),d=n(5545);function f(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var p=n(373),m=n(9380),g=n(611),h=n(8343),b=n(1371),v=n(2102),y=n(4367),w=n(9969),k=n(1315),E=n(9502);function S(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,g.Z)(),n=(0,y.l)();return r.createElement(m.Z,null,Object.entries(t).map((e=>{let[t,{htmlLang:a}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:a})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function x(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.Z)(),a=function(){const{siteConfig:{url:e}}=(0,g.Z)(),{pathname:t}=(0,u.TH)();return e+(0,h.Z)(t)}(),o=t?`${n}${t}`:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function _(){const{i18n:{currentLocale:e}}=(0,g.Z)(),{metadata:t,image:n}=(0,b.L)();return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),n&&r.createElement(v.d,{image:n}),r.createElement(x,null),r.createElement(S,null),r.createElement(E.Z,{tag:k.HX,locale:e}),r.createElement(m.Z,null,t.map(((e,t)=>r.createElement("meta",(0,p.Z)({key:t},e))))))}const C=new Map;function T(e){if(C.has(e.pathname))return{...e,pathname:C.get(e.pathname)};if((0,d.f)(c.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return C.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),{...e,pathname:t}}var R=n(464),L=n(5916);function A(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const P=function(e){let{children:t,location:n,previousLocation:a}=e;return(0,r.useLayoutEffect)((()=>{a!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:a}),A("onRouteDidUpdate",{previousLocation:a,location:n}))}),[a,n]),t};function N(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(c.Z,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class O extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.Z.canUseDOM?A("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=A("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),N(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return r.createElement(P,{previousLocation:this.previousLocation,location:t},r.createElement(u.AW,{location:t,render:()=>e}))}}const D=O,I="__docusaurus-base-url-issue-banner-container",M="__docusaurus-base-url-issue-banner",F="__docusaurus-base-url-issue-banner-suggestion-container",j="__DOCUSAURUS_INSERT_BASEURL_BANNER";function B(e){return`\nwindow['${j}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${j}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${I}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{window[j]=!1}),[]),r.createElement(r.Fragment,null,!l.Z.canUseDOM&&r.createElement(m.Z,null,r.createElement("script",null,B(e))),r.createElement("div",{id:I}))}function G(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,g.Z)(),{pathname:n}=(0,u.TH)();return t&&n===e?r.createElement(z,null):null}function $(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:a,localeConfigs:o}}=(0,g.Z)(),i=(0,h.Z)(e),{htmlLang:l,direction:s}=o[a];return r.createElement(m.Z,null,r.createElement("html",{lang:l,dir:s}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),r.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&r.createElement("meta",{name:"robots",content:"noindex, nofollow"}),e&&r.createElement("link",{rel:"icon",href:i}))}var U=n(2238);function H(){const e=(0,d.H)(c.Z),t=(0,u.TH)();return r.createElement(U.Z,null,r.createElement(L.M,null,r.createElement(R.t,null,r.createElement(f,null,r.createElement($,null),r.createElement(_,null),r.createElement(G,null),r.createElement(D,{location:T(t)},e)))))}var q=n(6887);const Z=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var V=n(410);const W=new Set,Q=new Set,Y=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,K={prefetch(e){if(!(e=>!Y()&&!Q.has(e)&&!W.has(e))(e))return!1;W.add(e);const t=(0,d.f)(c.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(q).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,V.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Z(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!Y()&&!Q.has(e))(e)&&(Q.add(e),N(e))},X=Object.freeze(K);if(l.Z.canUseDOM){window.docusaurus=X;const e=a.hydrate;N(window.location.pathname).then((()=>{e(r.createElement(i.B6,null,r.createElement(o.VK,null,r.createElement(H,null))),document.getElementById("__docusaurus"))}))}},5916:(e,t,n)=>{"use strict";n.d(t,{_:()=>u,M:()=>d});var r=n(1644),a=n(6809);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs/","mainDocId":"introduction","docs":[{"id":"api-reference","path":"/docs/api-reference","sidebar":"apiReference"},{"id":"api-reference/core/DataValue","path":"/docs/api-reference/core/DataValue","sidebar":"apiReference"},{"id":"api-reference/core/GraphProcessor","path":"/docs/api-reference/core/GraphProcessor","sidebar":"apiReference"},{"id":"api-reference/core/NodeGraph","path":"/docs/api-reference/core/NodeGraph","sidebar":"apiReference"},{"id":"api-reference/core/overview","path":"/docs/api-reference/core/overview","sidebar":"apiReference"},{"id":"api-reference/core/Project","path":"/docs/api-reference/core/Project","sidebar":"apiReference"},{"id":"api-reference/core/Settings","path":"/docs/api-reference/core/Settings","sidebar":"apiReference"},{"id":"api-reference/getting-started-integration","path":"/docs/api-reference/getting-started-integration","sidebar":"apiReference"},{"id":"api-reference/node/createProcessor","path":"/docs/api-reference/node/createProcessor","sidebar":"apiReference"},{"id":"api-reference/node/DebuggerEvents","path":"/docs/api-reference/node/DebuggerEvents","sidebar":"apiReference"},{"id":"api-reference/node/loadProjectFromFile","path":"/docs/api-reference/node/loadProjectFromFile","sidebar":"apiReference"},{"id":"api-reference/node/loadProjectFromString","path":"/docs/api-reference/node/loadProjectFromString","sidebar":"apiReference"},{"id":"api-reference/node/LooseDataValue","path":"/docs/api-reference/node/LooseDataValue","sidebar":"apiReference"},{"id":"api-reference/node/overview","path":"/docs/api-reference/node/overview","sidebar":"apiReference"},{"id":"api-reference/node/RivetDebuggerServer","path":"/docs/api-reference/node/RivetDebuggerServer","sidebar":"apiReference"},{"id":"api-reference/node/runGraph","path":"/docs/api-reference/node/runGraph","sidebar":"apiReference"},{"id":"api-reference/node/runGraphInFile","path":"/docs/api-reference/node/runGraphInFile","sidebar":"apiReference"},{"id":"api-reference/node/RunGraphOptions","path":"/docs/api-reference/node/RunGraphOptions","sidebar":"apiReference"},{"id":"api-reference/node/startDebuggerServer","path":"/docs/api-reference/node/startDebuggerServer","sidebar":"apiReference"},{"id":"api-reference/recording","path":"/docs/api-reference/recording"},{"id":"api-reference/remote-debugging","path":"/docs/api-reference/remote-debugging","sidebar":"apiReference"},{"id":"getting-started/first-ai-agent","path":"/docs/getting-started/first-ai-agent","sidebar":"userGuide"},{"id":"getting-started/installation","path":"/docs/getting-started/installation","sidebar":"userGuide"},{"id":"getting-started/setup","path":"/docs/getting-started/setup","sidebar":"userGuide"},{"id":"introduction","path":"/docs/","sidebar":"userGuide"},{"id":"node-reference","path":"/docs/node-reference","sidebar":"nodeReference"},{"id":"node-reference/abort-graph","path":"/docs/node-reference/abort-graph","sidebar":"nodeReference"},{"id":"node-reference/all-nodes","path":"/docs/node-reference/all-nodes","sidebar":"nodeReference"},{"id":"node-reference/append-to-dataset","path":"/docs/node-reference/append-to-dataset","sidebar":"nodeReference"},{"id":"node-reference/array","path":"/docs/node-reference/array","sidebar":"nodeReference"},{"id":"node-reference/assemble-prompt","path":"/docs/node-reference/assemble-prompt","sidebar":"nodeReference"},{"id":"node-reference/chat","path":"/docs/node-reference/chat","sidebar":"nodeReference"},{"id":"node-reference/chunk","path":"/docs/node-reference/chunk","sidebar":"nodeReference"},{"id":"node-reference/coalesce","path":"/docs/node-reference/coalesce","sidebar":"nodeReference"},{"id":"node-reference/code","path":"/docs/node-reference/code","sidebar":"nodeReference"},{"id":"node-reference/comment","path":"/docs/node-reference/comment","sidebar":"nodeReference"},{"id":"node-reference/compare","path":"/docs/node-reference/compare","sidebar":"nodeReference"},{"id":"node-reference/context","path":"/docs/node-reference/context","sidebar":"nodeReference"},{"id":"node-reference/create-dataset","path":"/docs/node-reference/create-dataset","sidebar":"nodeReference"},{"id":"node-reference/delay","path":"/docs/node-reference/delay","sidebar":"nodeReference"},{"id":"node-reference/evaluate","path":"/docs/node-reference/evaluate","sidebar":"nodeReference"},{"id":"node-reference/external-call","path":"/docs/node-reference/external-call","sidebar":"nodeReference"},{"id":"node-reference/extract-json","path":"/docs/node-reference/extract-json","sidebar":"nodeReference"},{"id":"node-reference/extract-object-path","path":"/docs/node-reference/extract-object-path","sidebar":"nodeReference"},{"id":"node-reference/extract-with-regex","path":"/docs/node-reference/extract-with-regex","sidebar":"nodeReference"},{"id":"node-reference/extract-yaml","path":"/docs/node-reference/extract-yaml","sidebar":"nodeReference"},{"id":"node-reference/filter","path":"/docs/node-reference/filter","sidebar":"nodeReference"},{"id":"node-reference/get-all-datasets","path":"/docs/node-reference/get-all-datasets","sidebar":"nodeReference"},{"id":"node-reference/get-dataset-row","path":"/docs/node-reference/get-dataset-row","sidebar":"nodeReference"},{"id":"node-reference/get-embedding","path":"/docs/node-reference/get-embedding","sidebar":"nodeReference"},{"id":"node-reference/get-global","path":"/docs/node-reference/get-global","sidebar":"nodeReference"},{"id":"node-reference/gpt-function","path":"/docs/node-reference/gpt-function","sidebar":"nodeReference"},{"id":"node-reference/graph-input","path":"/docs/node-reference/graph-input","sidebar":"nodeReference"},{"id":"node-reference/graph-output","path":"/docs/node-reference/graph-output","sidebar":"nodeReference"},{"id":"node-reference/hash","path":"/docs/node-reference/hash"},{"id":"node-reference/http-call","path":"/docs/node-reference/http-call","sidebar":"nodeReference"},{"id":"node-reference/if","path":"/docs/node-reference/if","sidebar":"nodeReference"},{"id":"node-reference/if-else","path":"/docs/node-reference/if-else","sidebar":"nodeReference"},{"id":"node-reference/join","path":"/docs/node-reference/join","sidebar":"nodeReference"},{"id":"node-reference/knn-dataset","path":"/docs/node-reference/knn-dataset","sidebar":"nodeReference"},{"id":"node-reference/load-dataset","path":"/docs/node-reference/load-dataset","sidebar":"nodeReference"},{"id":"node-reference/loop-controller","path":"/docs/node-reference/loop-controller","sidebar":"nodeReference"},{"id":"node-reference/match","path":"/docs/node-reference/match","sidebar":"nodeReference"},{"id":"node-reference/number","path":"/docs/node-reference/number","sidebar":"nodeReference"},{"id":"node-reference/object","path":"/docs/node-reference/object","sidebar":"nodeReference"},{"id":"node-reference/passthrough","path":"/docs/node-reference/passthrough","sidebar":"nodeReference"},{"id":"node-reference/pop","path":"/docs/node-reference/pop","sidebar":"nodeReference"},{"id":"node-reference/prompt","path":"/docs/node-reference/prompt","sidebar":"nodeReference"},{"id":"node-reference/race-inputs","path":"/docs/node-reference/race-inputs","sidebar":"nodeReference"},{"id":"node-reference/raise-event","path":"/docs/node-reference/raise-event","sidebar":"nodeReference"},{"id":"node-reference/read-directory","path":"/docs/node-reference/read-directory","sidebar":"nodeReference"},{"id":"node-reference/read-file","path":"/docs/node-reference/read-file","sidebar":"nodeReference"},{"id":"node-reference/rng","path":"/docs/node-reference/rng","sidebar":"nodeReference"},{"id":"node-reference/set-global","path":"/docs/node-reference/set-global","sidebar":"nodeReference"},{"id":"node-reference/shuffle","path":"/docs/node-reference/shuffle","sidebar":"nodeReference"},{"id":"node-reference/slice","path":"/docs/node-reference/slice","sidebar":"nodeReference"},{"id":"node-reference/split-text","path":"/docs/node-reference/split-text","sidebar":"nodeReference"},{"id":"node-reference/subgraph","path":"/docs/node-reference/subgraph","sidebar":"nodeReference"},{"id":"node-reference/text","path":"/docs/node-reference/text","sidebar":"nodeReference"},{"id":"node-reference/to-json","path":"/docs/node-reference/to-json","sidebar":"nodeReference"},{"id":"node-reference/to-yaml","path":"/docs/node-reference/to-yaml","sidebar":"nodeReference"},{"id":"node-reference/trim-chat-messages","path":"/docs/node-reference/trim-chat-messages","sidebar":"nodeReference"},{"id":"node-reference/user-input","path":"/docs/node-reference/user-input","sidebar":"nodeReference"},{"id":"node-reference/vector-knn","path":"/docs/node-reference/vector-knn","sidebar":"nodeReference"},{"id":"node-reference/vector-store","path":"/docs/node-reference/vector-store","sidebar":"nodeReference"},{"id":"node-reference/wait-for-event","path":"/docs/node-reference/wait-for-event","sidebar":"nodeReference"},{"id":"trivet","path":"/docs/trivet","sidebar":"userGuide"},{"id":"tutorial","path":"/docs/tutorial","sidebar":"tutorial"},{"id":"tutorial/installing-getting-started","path":"/docs/tutorial/installing-getting-started","sidebar":"tutorial"},{"id":"tutorial/interpolation-more-node-types","path":"/docs/tutorial/interpolation-more-node-types","sidebar":"tutorial"},{"id":"tutorial/loops","path":"/docs/tutorial/loops","sidebar":"tutorial"},{"id":"tutorial/matching-conditionals","path":"/docs/tutorial/matching-conditionals","sidebar":"tutorial"},{"id":"tutorial/simple-graph","path":"/docs/tutorial/simple-graph","sidebar":"tutorial"},{"id":"tutorial/splitting","path":"/docs/tutorial/splitting","sidebar":"tutorial"},{"id":"tutorial/subgraphs","path":"/docs/tutorial/subgraphs","sidebar":"tutorial"},{"id":"tutorial/testing-graphs","path":"/docs/tutorial/testing-graphs"},{"id":"tutorial/yaml","path":"/docs/tutorial/yaml","sidebar":"tutorial"},{"id":"user-guide/adding-connecting-nodes","path":"/docs/user-guide/adding-connecting-nodes","sidebar":"userGuide"},{"id":"user-guide/control-flow","path":"/docs/user-guide/control-flow","sidebar":"userGuide"},{"id":"user-guide/data-types","path":"/docs/user-guide/data-types","sidebar":"userGuide"},{"id":"user-guide/executing-ai-chains","path":"/docs/user-guide/executing-ai-chains","sidebar":"userGuide"},{"id":"user-guide/executors","path":"/docs/user-guide/executors","sidebar":"userGuide"},{"id":"user-guide/features/chat-viewer","path":"/docs/user-guide/features/chat-viewer","sidebar":"userGuide"},{"id":"user-guide/features/data-studio","path":"/docs/user-guide/features/data-studio","sidebar":"userGuide"},{"id":"user-guide/features/prompt-designer","path":"/docs/user-guide/features/prompt-designer","sidebar":"userGuide"},{"id":"user-guide/features/trivet-tests","path":"/docs/user-guide/features/trivet-tests","sidebar":"userGuide"},{"id":"user-guide/live-debugging","path":"/docs/user-guide/live-debugging","sidebar":"userGuide"},{"id":"user-guide/loops","path":"/docs/user-guide/loops","sidebar":"userGuide"},{"id":"user-guide/overview-of-interface","path":"/docs/user-guide/overview-of-interface","sidebar":"userGuide"},{"id":"user-guide/plugins","path":"/docs/user-guide/plugins","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/all","path":"/docs/user-guide/plugins/built-in/all","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/anthropic","path":"/docs/user-guide/plugins/built-in/anthropic","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/assemblyai","path":"/docs/user-guide/plugins/built-in/assemblyai","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/autoevals","path":"/docs/user-guide/plugins/built-in/autoevals","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/gentrace","path":"/docs/user-guide/plugins/built-in/gentrace","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/huggingface","path":"/docs/user-guide/plugins/built-in/huggingface","sidebar":"userGuide"},{"id":"user-guide/plugins/built-in/pinecone","path":"/docs/user-guide/plugins/built-in/pinecone","sidebar":"userGuide"},{"id":"user-guide/plugins/creating-plugins","path":"/docs/user-guide/plugins/creating-plugins","sidebar":"userGuide"},{"id":"user-guide/prompt-designer","path":"/docs/user-guide/prompt-designer"},{"id":"user-guide/recordings","path":"/docs/user-guide/recordings","sidebar":"userGuide"},{"id":"user-guide/remote-debugging","path":"/docs/user-guide/remote-debugging","sidebar":"userGuide"},{"id":"user-guide/splitting","path":"/docs/user-guide/splitting","sidebar":"userGuide"},{"id":"user-guide/subgraphs","path":"/docs/user-guide/subgraphs","sidebar":"userGuide"},{"id":"user-guide/trivet-getting-started","path":"/docs/user-guide/trivet-getting-started","sidebar":"userGuide"},{"id":"user-guide/trivet-library","path":"/docs/user-guide/trivet-library","sidebar":"userGuide"},{"id":"user-guide/trivet-tutorial","path":"/docs/user-guide/trivet-tutorial","sidebar":"userGuide"},{"id":"user-guide/trivet-validation-graphs","path":"/docs/user-guide/trivet-validation-graphs","sidebar":"userGuide"},{"id":"user-guide/working-with-graphs","path":"/docs/user-guide/working-with-graphs","sidebar":"userGuide"},{"id":"user-guide/working-with-projects","path":"/docs/user-guide/working-with-projects","sidebar":"userGuide"}],"draftIds":[],"sidebars":{"userGuide":{"link":{"path":"/docs/","label":"introduction"}},"tutorial":{"link":{"path":"/docs/tutorial","label":"tutorial"}},"apiReference":{"link":{"path":"/docs/api-reference","label":"api-reference"}},"nodeReference":{"link":{"path":"/docs/node-reference","label":"node-reference"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(7529);const s=JSON.parse('{"docusaurusVersion":"2.4.1","siteVersion":"1.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.4.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.4.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.4.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.4.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.4.1"}}}'),c={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},u=r.createContext(c);function d(e){let{children:t}=e;return r.createElement(u.Provider,{value:c},t)}},2238:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(1644),a=n(6072),o=n(9380),i=n(5834),l=n(7239);function s(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"}},r.createElement("h1",{style:{fontSize:"3rem"}},"This page crashed"),r.createElement("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"}},"Try again"),r.createElement(c,{error:t}))}function c(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return r.createElement("p",{style:{whiteSpace:"pre-wrap"}},n)}function u(e){let{error:t,tryAgain:n}=e;return r.createElement(f,{fallback:()=>r.createElement(s,{error:t,tryAgain:n})},r.createElement(o.Z,null,r.createElement("title",null,"Page Error")),r.createElement(l.Z,null,r.createElement(s,{error:t,tryAgain:n})))}const d=e=>r.createElement(u,e);class f extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??d)(e)}return e??null}}},6072:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},9380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1644),a=n(65);function o(e){return r.createElement(a.ql,e)}},6658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(373),a=n(1644),o=n(1710),i=n(5834),l=n(611),s=n(2022),c=n(6072);const u=a.createContext({collectLink:()=>{}});var d=n(8343);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:b=!0,...v}=e;const{siteConfig:{trailingSlash:y,baseUrl:w}}=(0,l.Z)(),{withBaseUrl:k}=(0,d.C)(),E=(0,a.useContext)(u),S=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>S.current));const x=f||p;const _=(0,s.Z)(x),C=x?.replace("pathname://","");let T=void 0!==C?(R=C,b&&(e=>e.startsWith("/"))(R)?k(R):R):void 0;var R;T&&_&&(T=(0,i.applyTrailingSlash)(T,{trailingSlash:y,baseUrl:w}));const L=(0,a.useRef)(!1),A=n?o.OL:o.rU,P=c.Z.canUseIntersectionObserver,N=(0,a.useRef)(),O=()=>{L.current||null==T||(window.docusaurus.preload(T),L.current=!0)};(0,a.useEffect)((()=>(!P&&_&&null!=T&&window.docusaurus.prefetch(T),()=>{P&&N.current&&N.current.disconnect()})),[N,T,P,_]);const D=T?.startsWith("#")??!1,I=!T||!_||D;return I||h||E.collectLink(T),I?a.createElement("a",(0,r.Z)({ref:S,href:T},x&&!_&&{target:"_blank",rel:"noopener noreferrer"},v)):a.createElement(A,(0,r.Z)({},v,{onMouseEnter:O,onTouchStart:O,innerRef:e=>{S.current=e,P&&e&&_&&(N.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(N.current.unobserve(e),N.current.disconnect(),null!=T&&window.docusaurus.prefetch(T))}))})),N.current.observe(e))},to:T},n&&{isActive:g,activeClassName:m}))}const p=a.forwardRef(f)},4533:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=()=>null},7600:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,I:()=>l});var r=n(1644);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(7529);function i(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return o[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(i({message:n,id:r}),t)}function s(e){let{children:t,id:n,values:o}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const l=i({message:t,id:n});return r.createElement(r.Fragment,null,a(l,o))}},7505:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},2022:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},8343:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>l});var r=n(1644),a=n(611),o=n(2022);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.Z)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},611:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1644),a=n(5916);function o(){return(0,r.useContext)(a._)}},7959:(e,t,n)=>{"use strict";n.d(t,{OD:()=>o,eZ:()=>i});var r=n(611),a=n(7505);function o(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}function i(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});const r=o(e),i=r?.[t];if(!i&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return i}},8810:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1644),a=n(464);function o(){return(0,r.useContext)(a._)}},410:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const l=a?`${a}.${o}`:o;r(i)?e(i,l):t[l]=i}))}(e),t}},3699:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>o});var r=n(1644);const a=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return r.createElement(a.Provider,{value:i},t)}},2561:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>f,gA:()=>u,_r:()=>s,zh:()=>c,yW:()=>d});var r=n(2824),a=n(7959);const o=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=function(e,t){const n=o(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),a=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const l={},s=()=>(0,a.OD)("docusaurus-plugin-content-docs")??l,c=e=>(0,a.eZ)("docusaurus-plugin-content-docs",e,{failfast:!0});function u(e){void 0===e&&(e={});const t=s(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function d(e){const t=c(e);return o(t)}function f(e){const t=c(e),{pathname:n}=(0,r.TH)();return i(t,n)}},2587:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>f,gA:()=>u,Jo:()=>p,gB:()=>d});var r=n(2824),a=n(7959);const o=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=function(e,t){const n=o(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),a=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const l={},s=()=>(0,a.OD)("docusaurus-plugin-content-docs")??l,c=e=>(0,a.eZ)("docusaurus-plugin-content-docs",e,{failfast:!0});function u(e){void 0===e&&(e={});const t=s(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function d(e){return c(e).versions}function f(e){const t=c(e),{pathname:n}=(0,r.TH)();return i(t,n)}function p(e){const t=c(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=o(e);return{latestDocSuggestion:i(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},7104:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(8277),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},2481:(e,t,n)=>{"use strict";n.r(t);var r=n(9355),a=n(6809);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(3177)(`./prism-${e}`)})),delete globalThis.Prism}(r.Z)},6815:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1644);const a={iconExternalLink:"iconExternalLink_lhjM"};function o(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:a.iconExternalLink},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},7239:(e,t,n)=>{"use strict";n.d(t,{Z:()=>dt});var r=n(1644),a=n(156),o=n(2238),i=n(2102),l=n(373),s=n(2824),c=n(7600),u=n(137);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,s.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,u.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const m=(0,c.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const t=e.children??m,{containerRef:n,onClick:a}=p();return r.createElement("div",{ref:n,role:"region","aria-label":m},r.createElement("a",(0,l.Z)({},e,{href:`#${d}`,onClick:a}),t))}var h=n(3840),b=n(9969);const v={skipToContent:"skipToContent_d0RQ"};function y(){return r.createElement(g,{className:v.skipToContent})}var w=n(1371),k=n(6890);function E(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...s}=e;return r.createElement("svg",(0,l.Z)({viewBox:"0 0 15 15",width:t,height:n},s),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const S={closeButton:"closeButton_TvJa"};function x(e){return r.createElement("button",(0,l.Z)({type:"button","aria-label":(0,c.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.Z)("clean-btn close",S.closeButton,e.className)}),r.createElement(E,{width:14,height:14,strokeWidth:3.1}))}const _={content:"content_oN_p"};function C(e){const{announcementBar:t}=(0,w.L)(),{content:n}=t;return r.createElement("div",(0,l.Z)({},e,{className:(0,a.Z)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}}))}const T={announcementBar:"announcementBar_v0zZ",announcementBarPlaceholder:"announcementBarPlaceholder_BPTB",announcementBarClose:"announcementBarClose_CTa_",announcementBarContent:"announcementBarContent_AZnJ"};function R(){const{announcementBar:e}=(0,w.L)(),{isActive:t,close:n}=(0,k.nT)();if(!t)return null;const{backgroundColor:a,textColor:o,isCloseable:i}=e;return r.createElement("div",{className:T.announcementBar,style:{backgroundColor:a,color:o},role:"banner"},i&&r.createElement("div",{className:T.announcementBarPlaceholder}),r.createElement(C,{className:T.announcementBarContent}),i&&r.createElement(x,{onClick:n,className:T.announcementBarClose}))}var L=n(3434),A=n(1476);var P=n(9385),N=n(2645);const O=r.createContext(null);function D(e){let{children:t}=e;const n=function(){const e=(0,L.e)(),t=(0,N.HY)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,P.D9)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return r.createElement(O.Provider,{value:n},t)}function I(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function M(){const e=(0,r.useContext)(O);if(!e)throw new P.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,N.HY)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:I(o)})),[a,o,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:o}=e;const{shown:i}=M();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var j=n(4840),B=n(8810);function z(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function G(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const $={toggle:"toggle_AkH9",toggleButton:"toggleButton_le2m",darkToggleIcon:"darkToggleIcon_vwGc",lightToggleIcon:"lightToggleIcon_RbNS",toggleButtonDisabled:"toggleButtonDisabled_Mhje"};function U(e){let{className:t,buttonClassName:n,value:o,onChange:i}=e;const l=(0,B.Z)(),s=(0,c.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===o?(0,c.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)($.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",$.toggleButton,!l&&$.toggleButtonDisabled,n),type:"button",onClick:()=>i("dark"===o?"light":"dark"),disabled:!l,title:s,"aria-label":s,"aria-live":"polite"},r.createElement(z,{className:(0,a.Z)($.toggleIcon,$.lightToggleIcon)}),r.createElement(G,{className:(0,a.Z)($.toggleIcon,$.darkToggleIcon)})))}const H=r.memo(U),q={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_sPbO"};function Z(e){let{className:t}=e;const n=(0,w.L)().navbar.style,a=(0,w.L)().colorMode.disableSwitch,{colorMode:o,setColorMode:i}=(0,j.I)();return a?null:r.createElement(H,{className:t,buttonClassName:"dark"===n?q.darkNavbarColorModeToggle:void 0,value:o,onChange:i})}var V=n(9241);function W(){return r.createElement(V.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,L.e)();return r.createElement("button",{type:"button","aria-label":(0,c.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle()},r.createElement(E,{color:"var(--ifm-color-emphasis-600)"}))}function Y(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(W,null),r.createElement(Z,{className:"margin-right--md"}),r.createElement(Q,null))}var K=n(6658),X=n(8343),J=n(2022);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(6815);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:a,href:o,label:i,html:s,isDropdownLink:c,prependBaseUrlToHref:u,...d}=e;const f=(0,X.Z)(a),p=(0,X.Z)(t),m=(0,X.Z)(o,{forcePrependBaseUrl:!0}),g=i&&o&&!(0,J.Z)(o),h=s?{dangerouslySetInnerHTML:{__html:s}}:{children:r.createElement(r.Fragment,null,i,g&&r.createElement(te.Z,c&&{width:12,height:12}))};return o?r.createElement(K.Z,(0,l.Z)({href:u?m:o},d,h)):r.createElement(K.Z,(0,l.Z)({to:f,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(p)},d,h))}function re(e){let{className:t,isDropdownItem:n=!1,...o}=e;const i=r.createElement(ne,(0,l.Z)({className:(0,a.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},o));return n?r.createElement("li",null,i):i}function ae(e){let{className:t,isDropdownItem:n,...o}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(ne,(0,l.Z)({className:(0,a.Z)("menu__link",t)},o)))}function oe(e){let{mobile:t=!1,position:n,...a}=e;const o=t?ae:re;return r.createElement(o,(0,l.Z)({},a,{activeClassName:a.activeClassName??(t?"menu__link--active":"navbar__link--active")}))}var ie=n(3322),le=n(5232),se=n(611);function ce(e,t){return e.some((e=>function(e,t){return!!(0,le.Mg)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function ue(e){let{items:t,position:n,className:o,onClick:i,...s}=e;const c=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{c.current&&!c.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[c]),r.createElement("div",{ref:c,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u})},r.createElement(ne,(0,l.Z)({"aria-haspopup":"true","aria-expanded":u,role:"button",href:s.to?void 0:"#",className:(0,a.Z)("navbar__link",o)},s,{onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))}}),s.children??s.label),r.createElement("ul",{className:"dropdown__menu"},t.map(((e,t)=>r.createElement(xe,(0,l.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))))))}function de(e){let{items:t,className:n,position:o,onClick:i,...c}=e;const u=function(){const{siteConfig:{baseUrl:e}}=(0,se.Z)(),{pathname:t}=(0,s.TH)();return t.replace(e,"/")}(),d=ce(t,u),{collapsed:f,toggleCollapsed:p,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[u,d,m]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":f})},r.createElement(ne,(0,l.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",n)},c,{onClick:e=>{e.preventDefault(),p()}}),c.children??c.label),r.createElement(ie.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:f},t.map(((e,t)=>r.createElement(xe,(0,l.Z)({mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active"},e,{key:t}))))))}function fe(e){let{mobile:t=!1,...n}=e;const a=t?de:ue;return r.createElement(a,n)}var pe=n(4367);function me(e){let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const ge="iconLanguage_pz2L";var he=n(4533);const be={searchBox:"searchBox_Xr32"};function ve(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,a.Z)(n,be.searchBox)},t)}var ye=n(2587),we=n(7271);var ke=n(1107);const Ee=e=>e.docs.find((t=>t.id===e.mainDocId));const Se={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...o}=e;const{i18n:{currentLocale:i,locales:u,localeConfigs:d}}=(0,se.Z)(),f=(0,pe.l)(),{search:p,hash:m}=(0,s.TH)(),g=[...n,...u.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${m}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...a],h=t?(0,c.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return r.createElement(fe,(0,l.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(me,{className:ge}),h),items:g}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(ve,{className:n},r.createElement(he.Z,null))},dropdown:fe,html:function(e){let{value:t,className:n,mobile:o=!1,isDropdownItem:i=!1}=e;const l=i?"li":"div";return r.createElement(l,{className:(0,a.Z)({navbar__item:!o&&!i,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,ye.Iw)(a),s=(0,we.vY)(t,a);return null===s?null:r.createElement(oe,(0,l.Z)({exact:!0},o,{isActive:()=>i?.path===s.path||!!i?.sidebar&&i.sidebar===s.sidebar,label:n??s.id,to:s.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,ye.Iw)(a),s=(0,we.oz)(t,a).link;if(!s)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return r.createElement(oe,(0,l.Z)({exact:!0},o,{isActive:()=>i?.sidebar===t,label:n??s.label,to:s.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:a,...o}=e;const i=(0,we.lO)(a)[0],s=t??i.label,c=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return r.createElement(oe,(0,l.Z)({},o,{label:s,to:c}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:a,dropdownItemsBefore:o,dropdownItemsAfter:i,...u}=e;const{search:d,hash:f}=(0,s.TH)(),p=(0,ye.Iw)(n),m=(0,ye.gB)(n),{savePreferredVersionName:g}=(0,ke.J)(n),h=[...o,...m.map((e=>{const t=p.alternateDocVersions[e.name]??Ee(e);return{label:e.label,to:`${t.path}${d}${f}`,isActive:()=>e===p.activeVersion,onClick:()=>g(e.name)}})),...i],b=(0,we.lO)(n)[0],v=t&&h.length>1?(0,c.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):b.label,y=t&&h.length>1?void 0:Ee(b).path;return h.length<=1?r.createElement(oe,(0,l.Z)({},u,{mobile:t,label:v,to:y,isActive:a?()=>!1:void 0})):r.createElement(fe,(0,l.Z)({},u,{mobile:t,label:v,to:y,items:h,isActive:a?()=>!1:void 0}))}};function xe(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Se[a];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return r.createElement(o,n)}function _e(){const e=(0,L.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(xe,(0,l.Z)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function Ce(e){return r.createElement("button",(0,l.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(c.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function Te(){const e=0===(0,w.L)().navbar.items.length,t=M();return r.createElement(r.Fragment,null,!e&&r.createElement(Ce,{onClick:()=>t.hide()}),t.content)}function Re(){const e=(0,L.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(F,{header:r.createElement(Y,null),primaryMenu:r.createElement(_e,null),secondaryMenu:r.createElement(Te,null)}):null}const Le={navbarHideable:"navbarHideable_VSuP",navbarHidden:"navbarHidden_u8Ju"};function Ae(e){return r.createElement("div",(0,l.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function Pe(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.L)(),i=(0,L.e)(),{navbarRef:l,isNavbarVisible:s}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,A.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:l,"aria-label":(0,c.I)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.Z)("navbar","navbar--fixed-top",n&&[Le.navbarHideable,!s&&Le.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown})},t,r.createElement(Ae,{onClick:i.toggle}),r.createElement(Re,null))}var Ne=n(5834);const Oe={errorBoundaryError:"errorBoundaryError_pdej"};function De(e){return r.createElement("button",(0,l.Z)({type:"button"},e),r.createElement(c.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error"},"Try again"))}function Ie(e){let{error:t}=e;const n=(0,Ne.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return r.createElement("p",{className:Oe.errorBoundaryError},n)}class Me extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Fe="right";function je(e){let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,l.Z)({className:a,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},o),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function Be(){const{toggle:e,shown:t}=(0,L.e)();return r.createElement("button",{onClick:e,"aria-label":(0,c.I)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button"},r.createElement(je,null))}const ze={colorModeToggle:"colorModeToggle_IO4n"};function Ge(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(Me,{key:t,onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t})},r.createElement(xe,e)))))}function $e(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function Ue(){const e=(0,L.e)(),t=(0,w.L)().navbar.items,[n,a]=function(e){function t(e){return"left"===(e.position??Fe)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return r.createElement($e,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(Be,null),r.createElement(W,null),r.createElement(Ge,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(Ge,{items:a}),r.createElement(Z,{className:ze.colorModeToggle}),!o&&r.createElement(ve,null,r.createElement(he.Z,null)))})}function He(){return r.createElement(Pe,null,r.createElement(Ue,null))}function qe(e){let{item:t}=e;const{to:n,href:a,label:o,prependBaseUrlToHref:i,...s}=t,c=(0,X.Z)(n),u=(0,X.Z)(a,{forcePrependBaseUrl:!0});return r.createElement(K.Z,(0,l.Z)({className:"footer__link-item"},a?{href:i?u:a}:{to:c},s),o,a&&!(0,J.Z)(a)&&r.createElement(te.Z,null))}function Ze(e){let{item:t}=e;return t.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement("li",{key:t.href??t.to,className:"footer__item"},r.createElement(qe,{item:t}))}function Ve(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(Ze,{key:t,item:e})))))}function We(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement(Ve,{key:t,column:e}))))}function Qe(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function Ye(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement(qe,{item:t})}function Ke(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(Ye,{item:e}),t.length!==n+1&&r.createElement(Qe,null))))))}function Xe(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(We,{columns:t}):r.createElement(Ke,{links:t})}var Je=n(6384);const et={footerLogoLink:"footerLogoLink_rWnu"};function tt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.C)(),o={light:n(t.src),dark:n(t.srcDark??t.src)};return r.createElement(Je.Z,{className:(0,a.Z)("footer__logo",t.className),alt:t.alt,sources:o,width:t.width,height:t.height,style:t.style})}function nt(e){let{logo:t}=e;return t.href?r.createElement(K.Z,{href:t.href,className:et.footerLogoLink,target:t.target},r.createElement(tt,{logo:t})):r.createElement(tt,{logo:t})}function rt(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function at(e){let{style:t,links:n,logo:o,copyright:i}=e;return r.createElement("footer",{className:(0,a.Z)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(o||i)&&r.createElement("div",{className:"footer__bottom text--center"},o&&r.createElement("div",{className:"margin-bottom--sm"},o),i)))}function ot(){const{footer:e}=(0,w.L)();if(!e)return null;const{copyright:t,links:n,logo:a,style:o}=e;return r.createElement(at,{style:o,links:n&&n.length>0&&r.createElement(Xe,{links:n}),logo:a&&r.createElement(nt,{logo:a}),copyright:t&&r.createElement(rt,{copyright:t})})}const it=r.memo(ot),lt=(0,P.Qc)([j.S,k.pl,A.OC,ke.L5,i.VC,function(e){let{children:t}=e;return r.createElement(N.n2,null,r.createElement(L.M,null,r.createElement(D,null,t)))}]);function st(e){let{children:t}=e;return r.createElement(lt,null,t)}function ct(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(c.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(De,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(Ie,{error:t})))))}const ut={mainWrapper:"mainWrapper_lx3j"};function dt(e){const{children:t,noFooter:n,wrapperClassName:l,title:s,description:c}=e;return(0,b.t)(),r.createElement(st,null,r.createElement(i.d,{title:s,description:c}),r.createElement(y,null),r.createElement(R,null),r.createElement(He,null),r.createElement("div",{id:d,className:(0,a.Z)(h.k.wrapper.main,ut.mainWrapper,l)},r.createElement(o.Z,{fallback:e=>r.createElement(ct,e)},t)),!n&&r.createElement(it,null))}},9241:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(373),a=n(1644),o=n(6658),i=n(8343),l=n(611),s=n(1371),c=n(6384);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,i.Z)(t.src),dark:(0,i.Z)(t.srcDark||t.src)},l=a.createElement(c.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},l):l}function d(e){const{siteConfig:{title:t}}=(0,l.Z)(),{navbar:{title:n,logo:c}}=(0,s.L)(),{imageClassName:d,titleClassName:f,...p}=e,m=(0,i.Z)(c?.href||"/"),g=n?"":t,h=c?.alt??g;return a.createElement(o.Z,(0,r.Z)({to:m},p,c?.target&&{target:c.target}),c&&a.createElement(u,{logo:c,alt:h,imageClassName:d}),null!=n&&a.createElement("b",{className:f},n))}},9502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(1644),a=n(9380);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},6384:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(373),a=n(1644),o=n(156),i=n(8810),l=n(4840);const s={themedImage:"themedImage_wDKV","themedImage--light":"themedImage--light_dRwl","themedImage--dark":"themedImage--dark_tuVI"};function c(e){const t=(0,i.Z)(),{colorMode:n}=(0,l.I)(),{sources:c,className:u,alt:d,...f}=e,p=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,p.map((e=>a.createElement("img",(0,r.Z)({key:e,src:c[e],alt:d,className:(0,o.Z)(s.themedImage,s[`themedImage--${e}`],u)},f)))))}},3322:(e,t,n)=>{"use strict";n.d(t,{u:()=>s,z:()=>h});var r=n(373),a=n(1644),o=n(6072),i=n(6861);const l="ease-in-out";function s(e){let{initialState:t}=e;const[n,r]=(0,a.useState)(t??!1),o=(0,a.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:o}}const c={display:"none",overflow:"hidden",height:"0px"},u={display:"block",overflow:"visible",height:"auto"};function d(e,t){const n=t?c:u;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const o=(0,a.useRef)(!1);(0,a.useEffect)((()=>{const e=t.current;function a(){const t=e.scrollHeight,n=r?.duration??function(e){if((0,i.n)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${r?.easing??l}`,height:`${t}px`}}function s(){const t=a();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return d(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=c.height,e.style.overflow=c.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function p(e){if(!o.Z.canUseDOM)return e?c:u}function m(e){let{as:t="div",collapsed:n,children:r,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:s}=e;const c=(0,a.useRef)(null);return f({collapsibleRef:c,collapsed:n,animation:o}),a.createElement(t,{ref:c,style:s?void 0:p(n),onTransitionEnd:e=>{"height"===e.propertyName&&(d(c.current,n),i?.(n))},className:l},r)}function g(e){let{collapsed:t,...n}=e;const[o,i]=(0,a.useState)(!t),[l,s]=(0,a.useState)(t);return(0,a.useLayoutEffect)((()=>{t||i(!0)}),[t]),(0,a.useLayoutEffect)((()=>{o&&s(t)}),[o,t]),o?a.createElement(m,(0,r.Z)({},n,{collapsed:l})):null}function h(e){let{lazy:t,...n}=e;const r=t?g:m;return a.createElement(r,n)}},6890:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>p});var r=n(1644),a=n(8810),o=n(6985),i=n(9385),l=n(1371);const s=(0,o.WA)("docusaurus.announcement.dismiss"),c=(0,o.WA)("docusaurus.announcement.id"),u=()=>"true"===s.get(),d=e=>s.set(String(e)),f=r.createContext(null);function p(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.L)(),t=(0,a.Z)(),[n,o]=(0,r.useState)((()=>!!t&&u()));(0,r.useEffect)((()=>{o(u())}),[]);const i=(0,r.useCallback)((()=>{d(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&d(!1),!r&&u()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return r.createElement(f.Provider,{value:n},t)}function m(){const e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},4840:(e,t,n)=>{"use strict";n.d(t,{I:()=>h,S:()=>g});var r=n(1644),a=n(6072),o=n(9385),i=n(6985),l=n(1371);const s=r.createContext(void 0),c="theme",u=(0,i.WA)(c),d={light:"light",dark:"dark"},f=e=>e===d.dark?d.dark:d.light,p=e=>a.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),m=e=>{u.set(f(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.L)(),[a,o]=(0,r.useState)(p(e));(0,r.useEffect)((()=>{t&&u.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&m(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:e),u.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=u.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===d.dark},setLightTheme(){i(d.light)},setDarkTheme(){i(d.dark)}})),[a,i])}();return r.createElement(s.Provider,{value:n},t)}function h(){const e=(0,r.useContext)(s);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},1107:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,L5:()=>h});var r=n(1644),a=n(2561),o=n(7505),i=n(1371),l=n(7271),s=n(9385),c=n(6985);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,c.WA)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.WA)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.WA)(u(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const p=r.createContext(null);function m(){const e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,l]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=m();return r.createElement(p.Provider,{value:n},t)}function h(e){let{children:t}=e;return l.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function b(){const e=(0,r.useContext)(p);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.m);const t=(0,a.zh)(e),[n,i]=b(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},571:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,b:()=>l});var r=n(1644),a=n(9385);const o=Symbol("EmptyContext"),i=r.createContext(o);function l(e){let{children:t,name:n,items:a}=e;const o=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return r.createElement(i.Provider,{value:o},t)}function s(){const e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},3434:(e,t,n)=>{"use strict";n.d(t,{M:()=>d,e:()=>f});var r=n(1644),a=n(2645),o=n(8227),i=n(9643),l=n(1371),s=n(9385);const c=r.createContext(void 0);function u(){const e=function(){const e=(0,a.HY)(),{items:t}=(0,l.L)().navbar;return 0===t.length&&!e.component}(),t=(0,o.i)(),n=!e&&"mobile"===t,[s,c]=(0,r.useState)(!1);(0,i.Rb)((()=>{if(s)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:s})),[e,n,u,s])}function d(e){let{children:t}=e;const n=u();return r.createElement(c.Provider,{value:n},t)}function f(){const e=r.useContext(c);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},2645:(e,t,n)=>{"use strict";n.d(t,{HY:()=>l,Zo:()=>s,n2:()=>i});var r=n(1644),a=n(9385);const o=r.createContext(null);function i(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function l(){const e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");const[,l]=i,s=(0,a.Ql)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},9969:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(1644);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},8227:(e,t,n)=>{"use strict";n.d(t,{i:()=>c});var r=n(1644),a=n(6072);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return a.Z.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}const s=!1;function c(){const[e,t]=(0,r.useState)((()=>s?"ssr":l()));return(0,r.useEffect)((()=>{function e(){t(l())}const n=s?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(n)}}),[]),e}},3840:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},6861:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},7271:(e,t,n)=>{"use strict";n.d(t,{Wl:()=>f,_F:()=>g,cE:()=>d,hI:()=>k,lO:()=>v,oz:()=>y,s1:()=>b,vY:()=>w});var r=n(1644),a=n(2824),o=n(5545),i=n(2561),l=n(1107),s=n(571),c=n(7190),u=n(5232);const d=!!i._r;function f(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=f(t);if(e)return e}}}const p=(e,t)=>void 0!==e&&(0,u.Mg)(e,t),m=(e,t)=>e.some((e=>g(e,t)));function g(e,t){return"link"===e.type?p(e.href,t):"category"===e.type&&(p(e.href,t)||m(e.items,t))}function h(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,u.Mg)(o.href,n)||e(o.items))||"link"===o.type&&(0,u.Mg)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function b(){const e=(0,s.V)(),{pathname:t}=(0,a.TH)(),n=(0,i.gA)()?.pluginData.breadcrumbs;return!1!==n&&e?h({sidebarItems:e.items,pathname:t}):null}function v(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,l.J)(e),a=(0,i.yW)(e);return(0,r.useMemo)((()=>(0,c.j)([t,n,a].filter(Boolean))),[t,n,a])}function y(e,t){const n=v(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function w(e,t){const n=v(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,c.j)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function k(e){let{route:t,versionMetadata:n}=e;const r=(0,a.TH)(),i=t.routes,l=i.find((e=>(0,a.LX)(r.pathname,e)));if(!l)return null;const s=l.sidebar,c=s?n.docsSidebars[s]:void 0;return{docElement:(0,o.H)(i),sidebarName:s,sidebarItems:c}}},9643:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>l,_X:()=>s});var r=n(1644),a=n(2824),o=n(2574),i=n(9385);function l(e){!function(e){const t=(0,a.k6)(),n=(0,i.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){return function(e){const t=(0,a.k6)();return(0,o.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},7190:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function a(e){return Array.from(new Set(e))}n.d(t,{j:()=>a,l:()=>r})},2102:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>u,VC:()=>p});var r=n(1644),a=n(156),o=n(9380),i=n(3699);function l(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(8343),c=n(611);function u(e){let{title:t,description:n,keywords:a,image:i,children:l}=e;const u=function(e){const{siteConfig:t}=(0,c.Z)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,s.C)(),f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}const d=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(d),l=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(o.Z,null,r.createElement("html",{className:l})),n)}function p(e){let{children:t}=e;const n=l(),o=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const i=`plugin-id-${n.plugin.id}`;return r.createElement(f,{className:(0,a.Z)(o,i)},t)}},9385:(e,t,n)=>{"use strict";n.d(t,{D9:()=>i,Qc:()=>c,Ql:()=>s,i6:()=>l,zX:()=>o});var r=n(1644);const a=n(6072).Z.canUseDOM?r.useLayoutEffect:r.useEffect;function o(e){const t=(0,r.useRef)(e);return a((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function i(e){const t=(0,r.useRef)();return a((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function s(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function c(e){return t=>{let{children:n}=t;return r.createElement(r.Fragment,null,e.reduceRight(((e,t)=>r.createElement(t,null,e)),n))}}},5232:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>l});var r=n(1644),a=n(4478),o=n(611);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,o.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.Z,baseUrl:e})),[e])}},1476:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>p,OC:()=>s,RF:()=>d,o5:()=>f});var r=n(1644),a=n(6072),o=n(8810),i=n(9385);const l=r.createContext(void 0);function s(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(l.Provider,{value:n},t)}function c(){const e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}const u=()=>a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=c(),a=(0,r.useRef)(u()),o=(0,i.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=u();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function f(){const e=c(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),a=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,r.useLayoutEffect)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:a}}function p(){const e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},1315:(e,t,n)=>{"use strict";n.d(t,{HX:()=>r,os:()=>a});n(611);const r="default";function a(e,t){return`docs-${e}-${t}`}},6985:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>d,WA:()=>u});var r=n(1644),a=n(2574);const o="localStorage";function i(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function l(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,s||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),s=!0),null}var t}let s=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=l(t?.persistence);return null===n?c:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),i({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),i({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?c:u(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,a.useSyncExternalStore)(o,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},4367:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(611),a=n(2824);function o(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:o}}=(0,r.Z)(),{pathname:i}=(0,a.TH)(),l=o===n?e:e.replace(`/${o}/`,"/"),s=i.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return`${a?t:""}${function(e){return e===n?`${l}`:`${l}${e}/`}(r)}${s}`}}}},137:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(1644),a=n(2824),o=n(9385);function i(e){const t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},1371:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(611);function a(){return(0,r.Z)().siteConfig.themeConfig}},125:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},6507:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},5834:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(125);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(6507);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},4478:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(1644),a=n(373),o=n(7104),i=n.n(o),l=n(6887);const s={"03f59d18":[()=>n.e(6955).then(n.bind(n,8053)),"@site/docs/user-guide/features/data-studio.md",8053],"05893210":[()=>n.e(8798).then(n.bind(n,4341)),"@site/docs/tutorial/07-loops.md",4341],"12f5fcad":[()=>Promise.all([n.e(532),n.e(6828)]).then(n.bind(n,6425)),"@site/docs/node-reference/assemble-prompt.mdx",6425],"14e11cc2":[()=>Promise.all([n.e(532),n.e(4656)]).then(n.bind(n,3361)),"@site/docs/node-reference/external-call.mdx",3361],"170a3935":[()=>n.e(8167).then(n.bind(n,5372)),"@site/docs/user-guide/executing-ai-chains.md",5372],17896441:[()=>Promise.all([n.e(532),n.e(7918)]).then(n.bind(n,7255)),"@theme/DocItem",7255],"1817ea38":[()=>n.e(1905).then(n.bind(n,2418)),"@site/docs/user-guide/features/prompt-designer.md",2418],"1b6e407e":[()=>n.e(1695).then(n.bind(n,2867)),"@site/docs/node-reference/load-dataset.mdx",2867],"1be78505":[()=>Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,3801)),"@theme/DocPage",3801],"1c33c3df":[()=>n.e(2290).then(n.bind(n,2442)),"@site/docs/api-reference/core/Project.mdx",2442],"1c8789be":[()=>n.e(5494).then(n.bind(n,1871)),"@site/docs/node-reference/comment.mdx",1871],"1df93b7f":[()=>Promise.all([n.e(532),n.e(3237)]).then(n.bind(n,5753)),"@site/src/pages/index.tsx",5753],"1f541d16":[()=>Promise.all([n.e(532),n.e(8078)]).then(n.bind(n,2843)),"@site/docs/node-reference/context.mdx",2843],"2015b416":[()=>n.e(5842).then(n.bind(n,9841)),"@site/docs/node-reference/set-global.mdx",9841],"20469b49":[()=>n.e(4422).then(n.bind(n,8772)),"@site/docs/tutorial/08-testing-graphs.md",8772],"20ceafbc":[()=>n.e(6062).then(n.bind(n,2642)),"@site/docs/node-reference/passthrough.mdx",2642],"2215b464":[()=>n.e(6032).then(n.bind(n,5530)),"@site/docs/node-reference/object.mdx",5530],"28b38b6e":[()=>n.e(133).then(n.bind(n,5609)),"@site/docs/api-reference/node/loadProjectFromFile.mdx",5609],"2f317ae1":[()=>n.e(51).then(n.bind(n,9510)),"@site/docs/tutorial/04-yaml.md",9510],"2fc58f8a":[()=>n.e(6071).then(n.bind(n,160)),"@site/docs/user-guide/trivet-validation-graphs.md",160],"3089753f":[()=>n.e(8669).then(n.bind(n,8416)),"@site/docs/tutorial/05-subgraphs.md",8416],"3109fa04":[()=>n.e(2118).then(n.bind(n,7158)),"@site/docs/node-reference/rng.mdx",7158],"363646a7":[()=>n.e(1330).then(n.bind(n,6874)),"@site/docs/node-reference/gpt-function.mdx",6874],"37aab7a1":[()=>n.e(6530).then(n.bind(n,9706)),"@site/docs/node-reference/loop-controller.mdx",9706],"3cdfd61d":[()=>n.e(5092).then(n.bind(n,5114)),"@site/docs/node-reference/all-nodes.mdx",5114],"3d25049f":[()=>n.e(3528).then(n.bind(n,5664)),"@site/docs/node-reference.md",5664],"3e549f20":[()=>n.e(8706).then(n.bind(n,7163)),"@site/docs/user-guide/working-with-graphs.md",7163],"40c61cd8":[()=>n.e(4810).then(n.bind(n,6825)),"@site/docs/api-reference/recording.md",6825],"415655db":[()=>n.e(9751).then(n.bind(n,815)),"@site/docs/api-reference/core/Settings.mdx",815],"4183f1d2":[()=>n.e(8319).then(n.bind(n,5177)),"@site/docs/user-guide/plugins/built-in/anthropic.md",5177],"42734f45":[()=>n.e(412).then(n.bind(n,8006)),"@site/docs/user-guide/subgraphs.md",8006],"433c2729":[()=>Promise.all([n.e(532),n.e(3025)]).then(n.bind(n,3089)),"@site/docs/node-reference/race-inputs.mdx",3089],"4593fdd5":[()=>n.e(2331).then(n.bind(n,9291)),"@site/docs/trivet.md",9291],"4662cf78":[()=>n.e(5741).then(n.bind(n,2097)),"@site/docs/tutorial/00-installing-getting-started.md",2097],"4696d85b":[()=>n.e(6447).then(n.bind(n,9711)),"@site/docs/user-guide/recordings.md",9711],"48e33d57":[()=>n.e(6083).then(n.bind(n,1273)),"@site/docs/node-reference/prompt.mdx",1273],"4de0f396":[()=>n.e(2483).then(n.bind(n,2503)),"@site/docs/api-reference/node/LooseDataValue.mdx",2503],"4f1d1e2c":[()=>n.e(5472).then(n.bind(n,4866)),"@site/docs/api-reference/node/createProcessor.mdx",4866],"4f4008be":[()=>n.e(6252).then(n.bind(n,632)),"@site/docs/node-reference/if-else.mdx",632],"50db6c44":[()=>n.e(1860).then(n.bind(n,9232)),"@site/docs/user-guide/trivet-tutorial.md",9232],"5134fa22":[()=>n.e(3758).then(n.bind(n,8172)),"@site/docs/tutorial/03-matching-conditionals.md",8172],"52dab8a8":[()=>n.e(8896).then(n.bind(n,3345)),"@site/docs/node-reference/raise-event.mdx",3345],"530ea7a0":[()=>n.e(459).then(n.bind(n,1817)),"@site/docs/getting-started/setup.md",1817],"533412c1":[()=>n.e(202).then(n.bind(n,7383)),"@site/docs/user-guide/trivet-getting-started.md",7383],"54f44165":[()=>n.e(152).then(n.bind(n,1012)),"@site/docs/getting-started/installation.md",1012],"5616506a":[()=>n.e(5529).then(n.bind(n,9861)),"@site/docs/node-reference/slice.mdx",9861],"58eb6e39":[()=>n.e(7628).then(n.bind(n,9978)),"@site/docs/node-reference/wait-for-event.mdx",9978],"5be6eeed":[()=>n.e(2201).then(n.bind(n,8822)),"@site/docs/user-guide/overview-of-interface.md",8822],"5e139446":[()=>n.e(5628).then(n.bind(n,4962)),"@site/docs/tutorial/02-interpolation-more-node-types.md",4962],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,6809)),"@generated/docusaurus.config",6809],"5fd0304e":[()=>n.e(830).then(n.bind(n,57)),"@site/docs/node-reference/extract-yaml.mdx",57],"60875e34":[()=>n.e(4554).then(n.bind(n,5771)),"@site/docs/tutorial.md",5771],"6682fd99":[()=>n.e(1256).then(n.bind(n,3045)),"@site/docs/user-guide/plugins/built-in/huggingface.md",3045],"67fdae2e":[()=>n.e(3806).then(n.bind(n,6234)),"@site/docs/user-guide/plugins/creating-plugins.md",6234],"6929207c":[()=>n.e(4056).then(n.bind(n,1383)),"@site/docs/node-reference/to-json.mdx",1383],"69b97305":[()=>n.e(6403).then(n.bind(n,2546)),"@site/docs/node-reference/filter.mdx",2546],"6a925ead":[()=>n.e(4049).then(n.bind(n,4931)),"@site/docs/node-reference/number.mdx",4931],"6d65ed57":[()=>n.e(6635).then(n.bind(n,3552)),"@site/docs/node-reference/graph-output.mdx",3552],"6db4be41":[()=>n.e(4477).then(n.bind(n,2712)),"@site/docs/user-guide/plugins/built-in/autoevals.md",2712],"6ef8b9cf":[()=>n.e(2229).then(n.bind(n,2130)),"@site/docs/api-reference/node/runGraph.mdx",2130],"6f4f46aa":[()=>n.e(1478).then(n.bind(n,6964)),"@site/docs/user-guide/adding-connecting-nodes.md",6964],"700b9798":[()=>n.e(5225).then(n.bind(n,5758)),"@site/docs/api-reference/core/NodeGraph.mdx",5758],"72cbe275":[()=>n.e(4008).then(n.bind(n,7942)),"@site/docs/user-guide/splitting.md",7942],"78d5b433":[()=>n.e(8205).then(n.t.bind(n,5745,19)),"/Users/Shared/ironclad/rivet/packages/docs/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],"79dc2faa":[()=>n.e(4333).then(n.bind(n,4764)),"@site/docs/api-reference/node/DebuggerEvents.mdx",4764],"7a41925f":[()=>n.e(8650).then(n.bind(n,3631)),"@site/docs/api-reference/node/overview.mdx",3631],"7b9cf692":[()=>n.e(2525).then(n.bind(n,8928)),"@site/docs/node-reference/get-all-datasets.mdx",8928],"7fa4d008":[()=>n.e(4021).then(n.bind(n,7902)),"@site/docs/node-reference/subgraph.mdx",7902],"85b0010d":[()=>Promise.all([n.e(532),n.e(4380)]).then(n.bind(n,476)),"@site/docs/node-reference/code.mdx",476],"863dcfce":[()=>n.e(7594).then(n.bind(n,1139)),"@site/docs/node-reference/get-embedding.mdx",1139],"872df9f4":[()=>Promise.all([n.e(532),n.e(1422)]).then(n.bind(n,1407)),"@site/docs/node-reference/array.mdx",1407],"88d215e8":[()=>n.e(58).then(n.bind(n,4942)),"@site/docs/node-reference/http-call.mdx",4942],"8c232049":[()=>Promise.all([n.e(532),n.e(6069)]).then(n.bind(n,5056)),"@site/docs/node-reference/vector-knn.mdx",5056],"8d6d9d22":[()=>n.e(6604).then(n.bind(n,7506)),"@site/docs/api-reference/core/DataValue.mdx",7506],"8dd4158d":[()=>n.e(3577).then(n.bind(n,9988)),"@site/docs/user-guide/plugins/built-in/all.md",9988],"91facf36":[()=>n.e(321).then(n.bind(n,2573)),"@site/docs/tutorial/06-splitting.md",2573],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],"95fece5a":[()=>n.e(7991).then(n.bind(n,6518)),"@site/docs/user-guide/features/trivet-tests.md",6518],"964ae018":[()=>n.e(8491).then(n.bind(n,8099)),"@site/docs/api-reference.md",8099],"98eb9da5":[()=>n.e(7705).then(n.bind(n,5862)),"@site/docs/user-guide/plugins/built-in/assemblyai.md",5862],"9b78301a":[()=>n.e(3456).then(n.bind(n,3217)),"@site/docs/node-reference/read-directory.mdx",3217],"9d910af5":[()=>n.e(2147).then(n.bind(n,62)),"@site/docs/node-reference/trim-chat-messages.mdx",62],a09c2993:[()=>n.e(4128).then(n.bind(n,9979)),"@site/docs/introduction.md",9979],a21a37d7:[()=>Promise.all([n.e(532),n.e(7243)]).then(n.bind(n,1743)),"@site/docs/node-reference/coalesce.mdx",1743],a362e43a:[()=>n.e(9721).then(n.bind(n,9457)),"@site/docs/node-reference/create-dataset.mdx",9457],a6819d35:[()=>n.e(4479).then(n.bind(n,3795)),"@site/docs/user-guide/features/chat-viewer.md",3795],a6838e53:[()=>n.e(3887).then(n.bind(n,1443)),"@site/docs/node-reference/user-input.mdx",1443],a7f4a72c:[()=>n.e(4170).then(n.bind(n,2280)),"@site/docs/node-reference/shuffle.mdx",2280],a813a620:[()=>Promise.all([n.e(532),n.e(5179)]).then(n.bind(n,9069)),"@site/docs/node-reference/if.mdx",9069],a89c46e1:[()=>n.e(7241).then(n.bind(n,6610)),"@site/docs/user-guide/control-flow.md",6610],aa600924:[()=>n.e(4368).then(n.bind(n,7261)),"@site/docs/tutorial/01-simple-graph.md",7261],ab17d5dc:[()=>n.e(8401).then(n.bind(n,6175)),"@site/docs/api-reference/remote-debugging.md",6175],aca96930:[()=>n.e(5797).then(n.bind(n,8984)),"@site/docs/node-reference/pop.mdx",8984],acacfcbf:[()=>n.e(7703).then(n.bind(n,2746)),"@site/docs/node-reference/abort-graph.mdx",2746],b2051425:[()=>Promise.all([n.e(532),n.e(336)]).then(n.bind(n,304)),"@site/docs/node-reference/chat.mdx",304],b48e6d03:[()=>n.e(2495).then(n.bind(n,8122)),"@site/docs/user-guide/prompt-designer.md",8122],b4f0f202:[()=>Promise.all([n.e(532),n.e(1415)]).then(n.bind(n,1168)),"@site/docs/node-reference/extract-object-path.mdx",1168],b6afd583:[()=>n.e(754).then(n.bind(n,1417)),"@site/docs/node-reference/hash.mdx",1417],b94eb337:[()=>Promise.all([n.e(532),n.e(2690)]).then(n.bind(n,9881)),"@site/docs/node-reference/chunk.mdx",9881],ba6db9dc:[()=>Promise.all([n.e(532),n.e(7501)]).then(n.bind(n,69)),"@site/docs/node-reference/extract-with-regex.mdx",69],bcfb61bc:[()=>n.e(4651).then(n.bind(n,664)),"@site/docs/node-reference/knn-dataset.mdx",664],bff5d10d:[()=>n.e(7987).then(n.bind(n,7169)),"@site/docs/api-reference/core/GraphProcessor.md",7169],c1d447ec:[()=>n.e(3294).then(n.bind(n,5968)),"@site/docs/node-reference/read-file.mdx",5968],c3b8082c:[()=>Promise.all([n.e(532),n.e(5913)]).then(n.bind(n,7785)),"@site/docs/node-reference/join.mdx",7785],c7de5a81:[()=>Promise.all([n.e(532),n.e(7777)]).then(n.bind(n,1117)),"@site/docs/node-reference/vector-store.mdx",1117],ca0ef5dd:[()=>n.e(270).then(n.bind(n,7945)),"@site/docs/user-guide/executors.md",7945],cc838d56:[()=>n.e(8858).then(n.bind(n,2085)),"@site/docs/user-guide/live-debugging.md",2085],ce3bb901:[()=>n.e(6437).then(n.bind(n,5859)),"@site/docs/api-reference/node/loadProjectFromString.mdx",5859],ce6dae4c:[()=>n.e(7047).then(n.bind(n,4112)),"@site/docs/user-guide/loops.md",4112],d003ba4d:[()=>n.e(8245).then(n.bind(n,9820)),"@site/docs/node-reference/append-to-dataset.mdx",9820],d4c976d4:[()=>n.e(2743).then(n.bind(n,233)),"@site/docs/getting-started/first-ai-agent.md",233],d96d9220:[()=>n.e(1089).then(n.bind(n,1705)),"@site/docs/user-guide/trivet-library.md",1705],da1d9a3b:[()=>n.e(8899).then(n.bind(n,1573)),"@site/docs/api-reference/node/RunGraphOptions.mdx",1573],da4d435d:[()=>n.e(1588).then(n.bind(n,3190)),"@site/docs/node-reference/match.mdx",3190],db43bf8f:[()=>n.e(8224).then(n.bind(n,5030)),"@site/docs/user-guide/remote-debugging.md",5030],dc3b85c0:[()=>n.e(5280).then(n.bind(n,4283)),"@site/docs/node-reference/evaluate.mdx",4283],dde8420f:[()=>n.e(4748).then(n.bind(n,3171)),"@site/docs/api-reference/node/startDebuggerServer.mdx",3171],df424e68:[()=>n.e(3771).then(n.bind(n,4601)),"@site/docs/node-reference/get-global.mdx",4601],e1bbbaad:[()=>n.e(7433).then(n.bind(n,3972)),"@site/docs/node-reference/compare.mdx",3972],e250005b:[()=>n.e(3287).then(n.t.bind(n,3769,19)),"/Users/Shared/ironclad/rivet/packages/docs/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],e2d72022:[()=>n.e(881).then(n.bind(n,8711)),"@site/docs/api-reference/node/RivetDebuggerServer.mdx",8711],e44794b9:[()=>Promise.all([n.e(532),n.e(7843)]).then(n.bind(n,7698)),"@site/docs/node-reference/extract-json.mdx",7698],eae5179a:[()=>n.e(3980).then(n.bind(n,4425)),"@site/docs/node-reference/get-dataset-row.mdx",4425],ec8a29ae:[()=>n.e(7410).then(n.bind(n,4151)),"@site/docs/node-reference/split-text.mdx",4151],f1c10c23:[()=>n.e(3300).then(n.bind(n,6967)),"@site/docs/node-reference/text.mdx",6967],f2480b45:[()=>n.e(5653).then(n.bind(n,7608)),"@site/docs/node-reference/delay.mdx",7608],f5262abe:[()=>n.e(7915).then(n.bind(n,1064)),"@site/docs/api-reference/node/runGraphInFile.mdx",1064],f5c7df53:[()=>n.e(3888).then(n.bind(n,341)),"@site/docs/user-guide/working-with-projects.md",341],f78d6e65:[()=>n.e(2542).then(n.bind(n,7015)),"@site/docs/node-reference/to-yaml.mdx",7015],f7d5c2fe:[()=>Promise.all([n.e(532),n.e(774)]).then(n.bind(n,4045)),"@site/src/pages/social-card.tsx",4045],f7f13176:[()=>n.e(4363).then(n.bind(n,9088)),"@site/docs/user-guide/plugins.md",9088],f8728646:[()=>n.e(2617).then(n.bind(n,1138)),"@site/docs/node-reference/graph-input.mdx",1138],f88f89ea:[()=>n.e(7638).then(n.bind(n,2512)),"@site/docs/user-guide/data-types.md",2512],f891ad32:[()=>Promise.all([n.e(532),n.e(4823)]).then(n.bind(n,9331)),"@site/docs/api-reference/getting-started-integration.mdx",9331],f9960f4d:[()=>n.e(1747).then(n.bind(n,3911)),"@site/docs/api-reference/core/overview.mdx",3911],f99e2ae4:[()=>Promise.all([n.e(532),n.e(5799)]).then(n.bind(n,7394)),"@site/src/pages/logo-banner.tsx",7394],f9a8793e:[()=>n.e(5856).then(n.bind(n,35)),"@site/docs/user-guide/plugins/built-in/pinecone.md",35],fc83dfb0:[()=>n.e(6503).then(n.bind(n,5599)),"@site/docs/user-guide/plugins/built-in/gentrace.md",5599]};function c(e){let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var u=n(410),d=n(3699);function f(e,t){if("*"===e)return i()({loading:c,loader:()=>n.e(1929).then(n.bind(n,1929)),modules:["@theme/NotFound"],webpack:()=>[1929],render(e,t){const n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const o=l[`${e}-${t}`],f={},p=[],m=[],g=(0,u.Z)(o);return Object.entries(g).forEach((e=>{let[t,n]=e;const r=s[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:c,loader:f,modules:p,webpack:()=>m,render(t,n){const i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let o=i;const l=n.split(".");l.slice(0,-1).forEach((e=>{o=o[e]})),o[l[l.length-1]]=a}));const l=i.__comp;delete i.__comp;const s=i.__context;return delete i.__context,r.createElement(d.z,{value:s},r.createElement(l,(0,a.Z)({},i,n)))}})}const p=[{path:"/logo-banner",component:f("/logo-banner","fe2"),exact:!0},{path:"/social-card",component:f("/social-card","044"),exact:!0},{path:"/docs",component:f("/docs","03d"),routes:[{path:"/docs",component:f("/docs","c64"),exact:!0,sidebar:"userGuide"},{path:"/docs/api-reference",component:f("/docs/api-reference","965"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/core/DataValue",component:f("/docs/api-reference/core/DataValue","97d"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/core/GraphProcessor",component:f("/docs/api-reference/core/GraphProcessor","14b"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/core/NodeGraph",component:f("/docs/api-reference/core/NodeGraph","d6a"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/core/overview",component:f("/docs/api-reference/core/overview","602"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/core/Project",component:f("/docs/api-reference/core/Project","424"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/core/Settings",component:f("/docs/api-reference/core/Settings","066"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/getting-started-integration",component:f("/docs/api-reference/getting-started-integration","cdc"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/createProcessor",component:f("/docs/api-reference/node/createProcessor","28b"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/DebuggerEvents",component:f("/docs/api-reference/node/DebuggerEvents","8f9"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/loadProjectFromFile",component:f("/docs/api-reference/node/loadProjectFromFile","abb"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/loadProjectFromString",component:f("/docs/api-reference/node/loadProjectFromString","e94"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/LooseDataValue",component:f("/docs/api-reference/node/LooseDataValue","cc7"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/overview",component:f("/docs/api-reference/node/overview","718"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/RivetDebuggerServer",component:f("/docs/api-reference/node/RivetDebuggerServer","812"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/runGraph",component:f("/docs/api-reference/node/runGraph","dfe"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/runGraphInFile",component:f("/docs/api-reference/node/runGraphInFile","cbd"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/RunGraphOptions",component:f("/docs/api-reference/node/RunGraphOptions","33d"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/node/startDebuggerServer",component:f("/docs/api-reference/node/startDebuggerServer","b0d"),exact:!0,sidebar:"apiReference"},{path:"/docs/api-reference/recording",component:f("/docs/api-reference/recording","528"),exact:!0},{path:"/docs/api-reference/remote-debugging",component:f("/docs/api-reference/remote-debugging","78e"),exact:!0,sidebar:"apiReference"},{path:"/docs/getting-started/first-ai-agent",component:f("/docs/getting-started/first-ai-agent","569"),exact:!0,sidebar:"userGuide"},{path:"/docs/getting-started/installation",component:f("/docs/getting-started/installation","ac6"),exact:!0,sidebar:"userGuide"},{path:"/docs/getting-started/setup",component:f("/docs/getting-started/setup","b83"),exact:!0,sidebar:"userGuide"},{path:"/docs/node-reference",component:f("/docs/node-reference","c46"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/abort-graph",component:f("/docs/node-reference/abort-graph","94f"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/all-nodes",component:f("/docs/node-reference/all-nodes","b65"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/append-to-dataset",component:f("/docs/node-reference/append-to-dataset","636"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/array",component:f("/docs/node-reference/array","198"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/assemble-prompt",component:f("/docs/node-reference/assemble-prompt","7f0"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/chat",component:f("/docs/node-reference/chat","ea2"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/chunk",component:f("/docs/node-reference/chunk","686"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/coalesce",component:f("/docs/node-reference/coalesce","a2e"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/code",component:f("/docs/node-reference/code","c2d"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/comment",component:f("/docs/node-reference/comment","60c"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/compare",component:f("/docs/node-reference/compare","1a3"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/context",component:f("/docs/node-reference/context","b3b"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/create-dataset",component:f("/docs/node-reference/create-dataset","77d"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/delay",component:f("/docs/node-reference/delay","998"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/evaluate",component:f("/docs/node-reference/evaluate","565"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/external-call",component:f("/docs/node-reference/external-call","95b"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/extract-json",component:f("/docs/node-reference/extract-json","dcd"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/extract-object-path",component:f("/docs/node-reference/extract-object-path","780"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/extract-with-regex",component:f("/docs/node-reference/extract-with-regex","664"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/extract-yaml",component:f("/docs/node-reference/extract-yaml","651"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/filter",component:f("/docs/node-reference/filter","edf"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/get-all-datasets",component:f("/docs/node-reference/get-all-datasets","a15"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/get-dataset-row",component:f("/docs/node-reference/get-dataset-row","bae"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/get-embedding",component:f("/docs/node-reference/get-embedding","056"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/get-global",component:f("/docs/node-reference/get-global","8d7"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/gpt-function",component:f("/docs/node-reference/gpt-function","098"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/graph-input",component:f("/docs/node-reference/graph-input","44f"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/graph-output",component:f("/docs/node-reference/graph-output","e88"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/hash",component:f("/docs/node-reference/hash","98d"),exact:!0},{path:"/docs/node-reference/http-call",component:f("/docs/node-reference/http-call","e03"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/if",component:f("/docs/node-reference/if","989"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/if-else",component:f("/docs/node-reference/if-else","94b"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/join",component:f("/docs/node-reference/join","405"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/knn-dataset",component:f("/docs/node-reference/knn-dataset","5e2"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/load-dataset",component:f("/docs/node-reference/load-dataset","1dc"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/loop-controller",component:f("/docs/node-reference/loop-controller","4ea"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/match",component:f("/docs/node-reference/match","5ab"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/number",component:f("/docs/node-reference/number","453"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/object",component:f("/docs/node-reference/object","04d"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/passthrough",component:f("/docs/node-reference/passthrough","d0a"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/pop",component:f("/docs/node-reference/pop","2e4"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/prompt",component:f("/docs/node-reference/prompt","e21"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/race-inputs",component:f("/docs/node-reference/race-inputs","661"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/raise-event",component:f("/docs/node-reference/raise-event","c8e"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/read-directory",component:f("/docs/node-reference/read-directory","b52"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/read-file",component:f("/docs/node-reference/read-file","af5"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/rng",component:f("/docs/node-reference/rng","e7f"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/set-global",component:f("/docs/node-reference/set-global","bf2"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/shuffle",component:f("/docs/node-reference/shuffle","6d8"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/slice",component:f("/docs/node-reference/slice","a04"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/split-text",component:f("/docs/node-reference/split-text","ba8"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/subgraph",component:f("/docs/node-reference/subgraph","8bb"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/text",component:f("/docs/node-reference/text","ca8"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/to-json",component:f("/docs/node-reference/to-json","68e"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/to-yaml",component:f("/docs/node-reference/to-yaml","758"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/trim-chat-messages",component:f("/docs/node-reference/trim-chat-messages","2a3"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/user-input",component:f("/docs/node-reference/user-input","a86"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/vector-knn",component:f("/docs/node-reference/vector-knn","ebc"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/vector-store",component:f("/docs/node-reference/vector-store","2ac"),exact:!0,sidebar:"nodeReference"},{path:"/docs/node-reference/wait-for-event",component:f("/docs/node-reference/wait-for-event","443"),exact:!0,sidebar:"nodeReference"},{path:"/docs/trivet",component:f("/docs/trivet","ef4"),exact:!0,sidebar:"userGuide"},{path:"/docs/tutorial",component:f("/docs/tutorial","f9f"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/installing-getting-started",component:f("/docs/tutorial/installing-getting-started","f4e"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/interpolation-more-node-types",component:f("/docs/tutorial/interpolation-more-node-types","2da"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/loops",component:f("/docs/tutorial/loops","6b0"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/matching-conditionals",component:f("/docs/tutorial/matching-conditionals","d82"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/simple-graph",component:f("/docs/tutorial/simple-graph","894"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/splitting",component:f("/docs/tutorial/splitting","264"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/subgraphs",component:f("/docs/tutorial/subgraphs","35e"),exact:!0,sidebar:"tutorial"},{path:"/docs/tutorial/testing-graphs",component:f("/docs/tutorial/testing-graphs","7d3"),exact:!0},{path:"/docs/tutorial/yaml",component:f("/docs/tutorial/yaml","6e6"),exact:!0,sidebar:"tutorial"},{path:"/docs/user-guide/adding-connecting-nodes",component:f("/docs/user-guide/adding-connecting-nodes","852"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/control-flow",component:f("/docs/user-guide/control-flow","5b8"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/data-types",component:f("/docs/user-guide/data-types","e1d"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/executing-ai-chains",component:f("/docs/user-guide/executing-ai-chains","add"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/executors",component:f("/docs/user-guide/executors","acb"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/features/chat-viewer",component:f("/docs/user-guide/features/chat-viewer","55d"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/features/data-studio",component:f("/docs/user-guide/features/data-studio","77c"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/features/prompt-designer",component:f("/docs/user-guide/features/prompt-designer","eb2"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/features/trivet-tests",component:f("/docs/user-guide/features/trivet-tests","b24"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/live-debugging",component:f("/docs/user-guide/live-debugging","958"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/loops",component:f("/docs/user-guide/loops","4fb"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/overview-of-interface",component:f("/docs/user-guide/overview-of-interface","e25"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins",component:f("/docs/user-guide/plugins","418"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/all",component:f("/docs/user-guide/plugins/built-in/all","973"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/anthropic",component:f("/docs/user-guide/plugins/built-in/anthropic","d33"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/assemblyai",component:f("/docs/user-guide/plugins/built-in/assemblyai","620"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/autoevals",component:f("/docs/user-guide/plugins/built-in/autoevals","34c"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/gentrace",component:f("/docs/user-guide/plugins/built-in/gentrace","b20"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/huggingface",component:f("/docs/user-guide/plugins/built-in/huggingface","11b"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/built-in/pinecone",component:f("/docs/user-guide/plugins/built-in/pinecone","bfd"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/plugins/creating-plugins",component:f("/docs/user-guide/plugins/creating-plugins","553"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/prompt-designer",component:f("/docs/user-guide/prompt-designer","119"),exact:!0},{path:"/docs/user-guide/recordings",component:f("/docs/user-guide/recordings","6cc"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/remote-debugging",component:f("/docs/user-guide/remote-debugging","22a"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/splitting",component:f("/docs/user-guide/splitting","220"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/subgraphs",component:f("/docs/user-guide/subgraphs","4ad"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/trivet-getting-started",component:f("/docs/user-guide/trivet-getting-started","c6a"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/trivet-library",component:f("/docs/user-guide/trivet-library","d37"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/trivet-tutorial",component:f("/docs/user-guide/trivet-tutorial","ed9"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/trivet-validation-graphs",component:f("/docs/user-guide/trivet-validation-graphs","5c0"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/working-with-graphs",component:f("/docs/user-guide/working-with-graphs","660"),exact:!0,sidebar:"userGuide"},{path:"/docs/user-guide/working-with-projects",component:f("/docs/user-guide/working-with-projects","59b"),exact:!0,sidebar:"userGuide"}]},{path:"/",component:f("/","5bf"),exact:!0},{path:"*",component:f("*")}]},338:(e,t,n)=>{"use strict";n.r(t)},7610:(e,t,n)=>{"use strict";n.r(t)},9355:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var _,C=1;if(v){if(!(_=o(k,S,e,b))||_.index>=e.length)break;var T=_.index,R=_.index+_[0].length,L=S;for(L+=E.value.length;T>=L;)L+=(E=E.next).value.length;if(S=L-=E.value.length,E.value instanceof a)continue;for(var A=E;A!==t.tail&&(Ld.reach&&(d.reach=D);var I=E.prev;if(N&&(I=s(t,I,N),S+=N.length),c(t,I,C),E=s(t,I,new a(f,h?r.tokenize(P,h):P,y,P)),O&&s(t,E,O),C>1){var M={cause:f+","+m,reach:D};i(e,t,n,E.prev,S,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&p(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function c(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,s(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function u(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,u={},d=s(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return u[n]=a,n})).join(""),n,r),f=Object.keys(u);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var s=o.substring(0,l),d=c(u[a]),p=o.substring(l+a.length),m=[];if(s&&m.push(s),m.push(d),p){var g=[p];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),v=[];g&&v.push.apply(v,i([g])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof c?l.splice.apply(l,[s,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},5035:(e,t,n)=>{"use strict";var r=n(1644),a=n(4802);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n