PageSourceSearch

https://ai-sdk-preview-rag.vercel.app/

html ai-sdk-preview-rag.vercel.app collected 2026-10-03 06:12:53 UTC 26,661 bytes, 1 lines download raw bytes

1<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/509ea2d35243f394.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-16b7e338b060ca1a.js"/>
1<script src="/_next/static/chunks/e8b97aad-5bb45564cb304fc2.js" async=""></script>
1<script src="/_next/static/chunks/829-9ca8503467fd1765.js" async=""></script>
1<script src="/_next/static/chunks/main-app-e19efaee796e00b8.js" async=""></script>
1<script src="/_next/static/chunks/697-1566f468629aad85.js" async=""></script>
1<script src="/_next/static/chunks/app/(preview)/page-7ab4b482e07afd95.js" async=""></script>
1<script src="/_next/static/chunks/app/(preview)/layout-baead8f5690f366e.js" async=""></script>
1<title>Retrieval Augmented Generation Preview</title><meta name="description" content="Augment language model generations with vector based retrieval using the Vercel AI SDK"/><meta property="og:title" content="Retrieval Augmented Generation Preview"/><meta property="og:description" content="Augment language model generations with vector based retrieval using the Vercel AI SDK"/><meta property="og:image:type" content="image/png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="628"/><meta property="og:image" content="https://ai-sdk-preview-rag.vercel.app/opengraph-image-1h4j0e.png?5111cdacb3186580"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Retrieval Augmented Generation Preview"/><meta name="twitter:description" content="Augment language model generations with vector based retrieval using the Vercel AI SDK"/><meta name="twitter:image:type" content="image/png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="628"/><meta name="twitter:image" content="https://ai-sdk-preview-rag.vercel.app/opengraph-image-1h4j0e.png?5111cdacb3186580"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16"/>
1<script>(({protect:e})=>{function t(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`)){t();return}let r=document.createElement("script");r.src=e,r.async=!0,r.onload=()=>t(),r.onerror=e=>{console.error("Error loading script",e),n(e)},document.head.appendChild(r)})}var n=class e{#e;#t;#n=0;constructor(){let{promise:t,resolve:n}=e.#r();this.#e=t,this.#t=n,this.#i(),window.addEventListener("online",this.#o),window.addEventListener("visibilitychange",this.#o)}getChallenge=async()=>(await this.#a(),await this.#e.then(e=>"function"==typeof e?e():e));#o=()=>{if(document.hidden)return;let{promise:t,resolve:n}=e.#r();this.#e=t,this.#t=n,window.V_C=[],window.V_C.push=n;let r=document.querySelector('script[src*="c.js"]');r&&r.remove(),this.#n+=1};#i=()=>{if(window.V_C){let e=window.V_C.pop();e&&this.#t(e)}else window.V_C=[],window.V_C.push=this.#t};#a=()=>{let e=new URL("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js",window.location.origin);return e.searchParams.set("i",String(this.#n)),e.searchParams.set("v",String(3)),e.searchParams.set("h",window.location.host),t(e.pathname+e.search)};#s=()=>{window.V_C=void 0};static #r(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}},r=class e{#e=!1;#t;constructor(e){this.#t=e}get loaded(){return this.#e}load=async()=>{this.#e||await this.#o()};#n=()=>{if(typeof globalThis.window>"u")throw Error("KPSDK is not available in the server");if(!window.KPSDK)throw Error("KPSDK is not loaded");let t=this.#t.map(t=>{let n=e.#i(t.path);return{domain:n.host,path:n.pathname,method:t.method}});try{window.KPSDK.configure(t)}catch(e){console.error("Error configuring KPSDK...",e)}};#o=async()=>{let e=this;return new Promise((n,r)=>{let i=()=>{document.removeEventListener("kpsdk-load",i),this.#n()},o=()=>{document.removeEventListener("kpsdk-ready",o),e.#e=!0,n()};document.addEventListener("kpsdk-load",i,{once:!0}),document.addEventListener("kpsdk-ready",o,{once:!0}),t("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js").catch(e=>{document.removeEventListener("kpsdk-load",i),document.removeEventListener("kpsdk-ready",o),r(e)})})};static #i(e){let t;try{t=new URL(e)}catch{t=new URL(e,location.origin)}return t}},i=e=>{let t=e.replace(/[.?+^$[\]\\(){}|-]/g,"\\$&").split("*").join(".*");return RegExp(`^${t}$`)},o=({path:e,pattern:t})=>-1!==e.search(t);async function a(e,t,n){let r=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(e,t,n,i,o){return this._requestUrl=t.toString(),this._requestMethod=e,r.call(this,e,t,n??!0,i,o)},XMLHttpRequest.prototype.send=async function(r){let s=this._requestUrl;if(!s||this._isReexecution)return a.call(this,r);let l=new URL(s,location.href),u=l.origin===location.origin,c=this._requestMethod??"GET",d=n.find(e=>{let t=o({path:l.pathname,pattern:i(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||"*"===e.method;return t&&n});if(!d||!u)return a.call(this,r);let p=await e.getChallenge();if(this.setRequestHeader("x-is-human",JSON.stringify(p)),this.setRequestHeader("x-path",l.pathname),this.setRequestHeader("x-method",c),0!==p.b||t.loaded||((1===p.d||d?.advancedOptions?.checkLevel==="deepAnalysis")&&await t.load(),!t.loaded))return a.call(this,r);this.setRequestHeader("x-is-human",JSON.stringify(p)),this.setRequestHeader("x-path",l.pathname),this.setRequestHeader("x-method",c);let h=new XMLHttpRequest;return h._isReexecution=!0,h.open(c,s,!0),h.setRequestHeader("x-is-human",JSON.stringify(p)),h.setRequestHeader("x-path",l.pathname),h.setRequestHeader("x-method",c),this.timeout&&(h.timeout=this.timeout),this.responseType&&(h.responseType=this.responseType),this.withCredentials&&(h.withCredentials=this.withCredentials),h.onreadystatechange=()=>{Object.defineProperty(this,"readyState",{value:h.readyState,writable:!0,configurable:!0}),h.readyState===XMLHttpRequest.DONE&&(Object.defineProperty(this,"status",{value:h.status,writable:!0,configurable:!0}),Object.defineProperty(this,"statusText",{value:h.statusText,writable:!0,configurable:!0}),Object.defineProperty(this,"response",{value:h.response,writable:!0,configurable:!0}),Object.defineProperty(this,"responseText",{value:h.responseText,writable:!0,configurable:!0}),Object.defineProperty(this,"responseXML",{value:h.responseXML,writable:!0,configurable:!0}),this.getAllResponseHeaders=()=>h.getAllResponseHeaders(),this.getResponseHeader=e=>h.getResponseHeader(e)),this.onreadystatechange&&this.onreadystatechange.call(this,new Event("readystatechange"))},h.onload=e=>{this.onload&&this.onload.call(this,e)},h.onerror=e=>{this.onerror&&this.onerror.call(this,e)},h.onabort=e=>{this.onabort&&this.onabort.call(this,e)},h.ontimeout=e=>{this.ontimeout&&this.ontimeout.call(this,e)},h.onloadstart=e=>{this.onloadstart&&this.onloadstart.call(this,e)},h.onloadend=e=>{this.onloadend&&this.onloadend.call(this,e)},h.onprogress=e=>{this.onprogress&&this.onprogress.call(this,e)},h.send(r)}}!function({protect:e=[]}){let t;for(let t of e)if(t.advancedOptions?.checkLevel!==void 0&&"deepAnalysis"!==t.advancedOptions.checkLevel&&"basic"!==t.advancedOptions.checkLevel)throw Error(`Invalid checkLevel "${t.advancedOptions.checkLevel}" for route "${t.path}". Must be one of: deepAnalysis, basic`);let s=new n,l=new r(e);a(s,l,e).catch(e=>{console.error("Error patching XMLHttpRequest:",e)}),t=window.fetch,window.fetch=async(n,r)=>{let a=new URL(n instanceof Request?n.url:n,location.href),u=a.origin===location.origin,c=r?.method??(n instanceof Request?n.method:"GET"),d=e.find(e=>
1{let t=o({path:a.pathname,pattern:i(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||"*"===e.method;return t&&n});if(null==d||!u)return t(n,r);let p=await s.getChallenge(),h=new Headers(r?.headers||(n instanceof Request?n.headers:void 0));h.set("x-is-human",JSON.stringify(p)),h.set("x-path",a.pathname),h.set("x-method",c);let f={...r,headers:h};return l.loaded||0!==p.b?t(n,f):1===p.d||d?.advancedOptions?.checkLevel==="deepAnalysis"?(await l.load(),window.fetch(n,f)):t(n,f)}}({protect:e})})({ protect: [{"path":"/api/chat","method":"POST"}] });</script>
1<script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script>
1</head><body><div class="flex justify-center items-start sm:pt-16 min-h-screen w-full dark:bg-neutral-900 px-4 md:px-0 py-4"><div class="flex flex-col items-center w-full max-w-[500px]"><div class="w-full max-w-[600px] my-4" style="opacity:1;transform:none"><div class="border rounded-lg p-6 flex flex-col gap-4 text-neutral-500 text-sm dark:text-neutral-400 dark:border-neutral-700 dark:bg-neutral-900"><p class="flex flex-row justify-center gap-4 items-center text-neutral-900 dark:text-neutral-50"><svg height="16" stroke-linejoin="round" viewBox="0 0 16 16" width="16" style="color:currentcolor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 1L16 15H0L8 1Z" fill="currentColor"></path></svg><span>+</span><svg height="17" stroke-linejoin="round" viewBox="0 0 16 16" width="17" style="color:currentcolor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM6.25 7H7H7.74999C8.30227 7 8.74999 7.44772 8.74999 8V11.5V12.25H7.24999V11.5V8.5H7H6.25V7ZM8 6C8.55229 6 9 5.55228 9 5C9 4.44772 8.55229 4 8 4C7.44772 4 7 4.44772 7 5C7 5.55228 7.44772 6 8 6Z" fill="currentColor"></path></svg></p><p>The<!-- --> <a class="text-blue-500" href="https://sdk.vercel.ai/docs/reference/ai-sdk-ui/use-chat">useChat</a> <!-- -->hook along with the<!-- --> <a class="text-blue-500" href="https://sdk.vercel.ai/docs/reference/ai-sdk-core/stream-text">streamText</a> <!-- -->function allows you to build applications with retrieval augmented generation (RAG) capabilities. Data is stored as vector embeddings using DrizzleORM and PostgreSQL.</p><p>Learn how to build this project by following this<!-- --> <a class="text-blue-500" target="_blank" href="https://sdk.vercel.ai/docs/guides/rag-chatbot">guide</a>.</p></div></div><div class="rounded-lg w-full bg-transparent"><div class="flex flex-col w-full justify-between gap-2"><form class="flex space-x-2"><input class="flex h-10 rounded-md px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-50 bg-neutral-100 text-base w-full text-neutral-700 dark:bg-neutral-700 dark:placeholder:text-neutral-400 dark:text-neutral-300" minLength="3" required="" placeholder="Ask me anything..." value=""/></form><div class="min-h-fit flex flex-col gap-2"></div></div></div><div class="flex flex-row gap-4 items-center justify-between fixed bottom-6 text-xs " style="opacity:0;transform:translateY(20px)"><a target="_blank" class="flex flex-row gap-2 items-center border px-2 py-1.5 rounded-md hover:bg-neutral-100 dark:bg-black dark:text-white dark:border-neutral-800 dark:hover:bg-neutral-900" href="https://github.com/vercel-labs/ai-sdk-preview-rag"><svg height="16" stroke-linejoin="round" viewBox="0 0 16 16" width="16" style="color:currentcolor"><g clip-path="url(#clip0_872_3147)"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.57879 0 7.99729C0 11.5361 2.29 14.5251 5.47 15.5847C5.87 15.6547 6.02 15.4148 6.02 15.2049C6.02 15.0149 6.01 14.3851 6.01 13.7154C4 14.0852 3.48 13.2255 3.32 12.7757C3.23 12.5458 2.84 11.836 2.5 11.6461C2.22 11.4961 1.82 11.1262 2.49 11.1162C3.12 11.1062 3.57 11.696 3.72 11.936C4.44 13.1455 5.59 12.8057 6.05 12.5957C6.12 12.0759 6.33 11.726 6.56 11.5261C4.78 11.3262 2.92 10.6364 2.92 7.57743C2.92 6.70773 3.23 5.98797 3.74 5.42816C3.66 5.22823 3.38 4.40851 3.82 3.30888C3.82 3.30888 4.49 3.09895 6.02 4.1286C6.66 3.94866 7.34 3.85869 8.02 3.85869C8.7 3.85869 9.38 3.94866 10.02 4.1286C11.55 3.08895 12.22 3.30888 12.22 3.30888C12.66 4.40851 12.38 5.22823 12.3 5.42816C12.81 5.98797 13.12 6.69773 13.12 7.57743C13.12 10.6464 11.25 11.3262 9.47 11.5261C9.76 11.776 10.01 12.2558 10.01 13.0056C10.01 14.0752 10 14.9349 10 15.2049C10 15.4148 10.15 15.6647 10.55 15.5847C12.1381 15.0488 13.5182 14.0284 14.4958 12.6673C15.4735 11.3062 15.9996 9.67293 16 7.99729C16 3.57879 12.42 0 8 0Z" fill="currentColor"></path></g><defs><clipPath id="clip0_872_3147"><rect width="16" height="16" fill="white"></rect></clipPath></defs></svg>View Source Code</a><a target="_blank" class="flex flex-row gap-2 items-center bg-neutral-900 px-2 py-1.5 rounded-md text-neutral-50 hover:bg-neutral-950 dar
1k:bg-neutral-100 dark:text-neutral-900 dark:hover:bg-neutral-50" href="https://vercel.com/templates/next.js/ai-sdk-rag"><svg height="14" stroke-linejoin="round" viewBox="0 0 16 16" width="14" style="color:currentcolor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 1L16 15H0L8 1Z" fill="currentColor"></path></svg>Deploy with Vercel</a></div></div></div>
1<script src="/_next/static/chunks/webpack-16b7e338b060ca1a.js" async=""></script>
1<script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script>
1<script>self.__next_f.push([1,"1:HL[\"/_next/static/css/509ea2d35243f394.css\",\"style\"]\n"])</script>
1<script>self.__next_f.push([1,"2:I[541,[],\"\"]\n4:I[9965,[],\"ClientPageRoot\"]\n5:I[6517,[\"697\",\"static/chunks/697-1566f468629aad85.js\",\"481\",\"static/chunks/app/(preview)/page-7ab4b482e07afd95.js\"],\"default\",1]\n7:I[6916,[],\"\"]\n8:I[8799,[],\"\"]\n9:I[3017,[\"790\",\"static/chunks/app/(preview)/layout-baead8f5690f366e.js\"],\"Analytics\"]\nf:I[4931,[],\"\"]\n6:T1807,"])</script>
1<script>self.__next_f.push([1,"(({protect:e})=\u003e{function t(e){return new Promise((t,n)=\u003e{if(document.querySelector(`script[src=\"${e}\"]`)){t();return}let r=document.createElement(\"script\");r.src=e,r.async=!0,r.onload=()=\u003et(),r.onerror=e=\u003e{console.error(\"Error loading script\",e),n(e)},document.head.appendChild(r)})}var n=class e{#e;#t;#n=0;constructor(){let{promise:t,resolve:n}=e.#r();this.#e=t,this.#t=n,this.#i(),window.addEventListener(\"online\",this.#o),window.addEventListener(\"visibilitychange\",this.#o)}getChallenge=async()=\u003e(await this.#a(),await this.#e.then(e=\u003e\"function\"==typeof e?e():e));#o=()=\u003e{if(document.hidden)return;let{promise:t,resolve:n}=e.#r();this.#e=t,this.#t=n,window.V_C=[],window.V_C.push=n;let r=document.querySelector('script[src*=\"c.js\"]');r\u0026\u0026r.remove(),this.#n+=1};#i=()=\u003e{if(window.V_C){let e=window.V_C.pop();e\u0026\u0026this.#t(e)}else window.V_C=[],window.V_C.push=this.#t};#a=()=\u003e{let e=new URL(\"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js\",window.location.origin);return e.searchParams.set(\"i\",String(this.#n)),e.searchParams.set(\"v\",String(3)),e.searchParams.set(\"h\",window.location.host),t(e.pathname+e.search)};#s=()=\u003e{window.V_C=void 0};static #r(){let e,t;return{promise:new Promise((n,r)=\u003e{e=n,t=r}),resolve:e,reject:t}}},r=class e{#e=!1;#t;constructor(e){this.#t=e}get loaded(){return this.#e}load=async()=\u003e{this.#e||await this.#o()};#n=()=\u003e{if(typeof globalThis.window\u003e\"u\")throw Error(\"KPSDK is not available in the server\");if(!window.KPSDK)throw Error(\"KPSDK is not loaded\");let t=this.#t.map(t=\u003e{let n=e.#i(t.path);return{domain:n.host,path:n.pathname,method:t.method}});try{window.KPSDK.configure(t)}catch(e){console.error(\"Error configuring KPSDK...\",e)}};#o=async()=\u003e{let e=this;return new Promise((n,r)=\u003e{let i=()=\u003e{document.removeEventListener(\"kpsdk-load\",i),this.#n()},o=()=\u003e{document.removeEventListener(\"kpsdk-ready\",o),e.#e=!0,n()};document.addEventListener(\"kpsdk-load\",i,{once:!0}),document.addEventListener(\"kpsdk-ready\",o,{once:!0}),t(\"/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js\").catch(e=\u003e{document.removeEventListener(\"kpsdk-load\",i),document.removeEventListener(\"kpsdk-ready\",o),r(e)})})};static #i(e){let t;try{t=new URL(e)}catch{t=new URL(e,location.origin)}return t}},i=e=\u003e{let t=e.replace(/[.?+^$[\\]\\\\(){}|-]/g,\"\\\\$\u0026\").split(\"*\").join(\".*\");return RegExp(`^${t}$`)},o=({path:e,pattern:t})=\u003e-1!==e.search(t);async function a(e,t,n){let r=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(e,t,n,i,o){return this._requestUrl=t.toString(),this._requestMethod=e,r.call(this,e,t,n??!0,i,o)},XMLHttpRequest.prototype.send=async function(r){let s=this._requestUrl;if(!s||this._isReexecution)return a.call(this,r);let l=new URL(s,location.href),u=l.origin===location.origin,c=this._requestMethod??\"GET\",d=n.find(e=\u003e{let t=o({path:l.pathname,pattern:i(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||\"*\"===e.method;return t\u0026\u0026n});if(!d||!u)return a.call(this,r);let p=await e.getChallenge();if(this.setRequestHeader(\"x-is-human\",JSON.stringify(p)),this.setRequestHeader(\"x-path\",l.pathname),this.setRequestHeader(\"x-method\",c),0!==p.b||t.loaded||((1===p.d||d?.advancedOptions?.checkLevel===\"deepAnalysis\")\u0026\u0026await t.load(),!t.loaded))return a.call(this,r);this.setRequestHeader(\"x-is-human\",JSON.stringify(p)),this.setRequestHeader(\"x-path\",l.pathname),this.setRequestHeader(\"x-method\",c);let h=new XMLHttpRequest;return h._isReexecution=!0,h.open(c,s,!0),h.setRequestHeader(\"x-is-human\",JSON.stringify(p)),h.setRequestHeader(\"x-path\",l.pathname),h.setRequestHeader(\"x-method\",c),this.timeout\u0026\u0026(h.timeout=this.timeout),this.responseType\u0026\u0026(h.responseType=this.responseType),this.withCredentials\u0026\u0026(h.withCredentials=this.withCredentials),h.onreadystatechange=()=\u003e{Object.defineProperty(this,\"readyState\",{value:h.readyState,writable:!0,configurable:!0}),h.readyState===XMLHttpRequest.DONE\u0026\u0026(Object.defineProperty(this,\"status\",{value:h.status,writable:!0,configurable:!0}),Object.defineProperty(this,\"statusText\",{value:h.statusText,writable:!0,configurable:!0}),Object.defineProperty(this,\"response\",{value:h.response,writable:!0,configurable:!0}),Object.defineProperty(this,\"responseText\",{value:h.responseText,writable:!0,configurable:!0}),Object.defineProperty(this,\"responseXML\",{value:h.responseXML,writable:!0,configurable:!0}),this.getAllResponseHeaders=()=\u003eh.getAllResponseHeaders(),this.getResponseHeader=e=\u003eh.getResponseHeader(e)),this.onreadystatechange\u0026\u0026this.onreadystatechange.call(this,new Event(\"readystatechange\"))},h.onload=e=\u003e{this.onload\u0026\u0026this.onload.call(this,e)},h.onerror=e=\u003e{this.onerror\u0026\u0026this.onerror.call(this,e)},h.onabort=e=\u003e{this.onabort\u0026\u0026this.onabort.call(this,e)},h.ontimeout=e=\u003e{this.ontimeout\u0026\u0026this.ontimeout.call(this,e)},h.onloadstart=e=\u003e{this.onloadstart\u0026\u0026this.onloadstart.call(this,e)},h.onloadend=e=\u003e{this.onloadend\u0026\u0026this.onloadend.call(this,e)},h.onprogress=e=\u003e{this.onprogress\u0026\u0026this.onprogress.call(this,e)},h.send(r)}}!function({protect:e=[]}){let t;for(let t of e)if(t.advancedOptions?.checkLevel!==void 0\u0026\u0026\"deepAnalysis\"!==t.advancedOptions.checkLevel\u0026\u0026\"basic\"!==t.advancedOptions.checkLevel)throw Error(`Invalid checkLevel \"${t.advancedOptions.checkLevel}\" for route \"${t.path}\". Must be one of: deepAnalysis, basic`);let s=new n,l=new r(e);a(s,l,e).catch(e=\u003e{console.error(\"Error patching XMLHttpRequest:\",e)}),t=window.fetch,window.fetch=async(n,r)=\u003e{let a=new URL(n instanceof Request?n.url:n,location.href),u=a.origin===location.origin,c=r?.method??(n instanceof Request?n.method:\"GET\"),d=e.find(e=\u003e{let t=o({path:a.pathname,pattern:i(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||\"*\"===e.method;return t\u0026\u0026n});if(null==d||!u)return t(n,r);
1let p=await s.getChallenge(),h=new Headers(r?.headers||(n instanceof Request?n.headers:void 0));h.set(\"x-is-human\",JSON.stringify(p)),h.set(\"x-path\",a.pathname),h.set(\"x-method\",c);let f={...r,headers:h};return l.loaded||0!==p.b?t(n,f):1===p.d||d?.advancedOptions?.checkLevel===\"deepAnalysis\"?(await l.load(),window.fetch(n,f)):t(n,f)}}({protect:e})})({ protect: [{\"path\":\"/api/chat\",\"method\":\"POST\"}] });"])</script>
1<script>self.__next_f.push([1,"a:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nb:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nc:{\"display\":\"inline-block\"}\nd:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n10:[]\n"])</script>
1<script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"EcAhhZgdpaId2zTbePv7h\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"\"],\"initialTree\":[\"\",{\"children\":[\"(preview)\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true]}],\"initialSeedData\":[\"\",{\"children\":[\"(preview)\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$L4\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$5\"}],null],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/509ea2d35243f394.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$6\"}}]}],[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"(preview)\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],[\"$\",\"$L9\",null,{}]]}]]}]],null],null]},[null,[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$b\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$c\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$d\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Le\"],\"globalErrorComponent\":\"$f\",\"missingSlots\":\"$W10\"}]\n"])</script>
1<script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Retrieval Augmented Generation Preview\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Augment language model generations with vector based retrieval using the Vercel AI SDK\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:title\",\"content\":\"Retrieval Augmented Generation Preview\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:description\",\"content\":\"Augment language model generations with vector based retrieval using the Vercel AI SDK\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:image:type\",\"content\":\"image/png\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image:height\",\"content\":\"628\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image\",\"content\":\"https://ai-sdk-preview-rag.vercel.app/opengraph-image-1h4j0e.png?5111cdacb3186580\"}],[\"$\",\"meta\",\"10\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:title\",\"content\":\"Retrieval Augmented Generation Preview\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:description\",\"content\":\"Augment language model generations with vector based retrieval using the Vercel AI SDK\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:image:type\",\"content\":\"image/png\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"15\",{\"name\":\"twitter:image:height\",\"content\":\"628\"}],[\"$\",\"meta\",\"16\",{\"name\":\"twitter:image\",\"content\":\"https://ai-sdk-preview-rag.vercel.app/opengraph-image-1h4j0e.png?5111cdacb3186580\"}],[\"$\",\"link\",\"17\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}]]\n3:null\n"])</script>
1</body></html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.