From c368e5a0752a6ea1b1921bce281c39747294d68d Mon Sep 17 00:00:00 2001 From: Assaf Elovic <assaf.elovic@gmail.com> Date: Sat, 28 Dec 2024 10:14:58 +0200 Subject: [PATCH] Deploy website - based on f88dfb29e6174a334593704068a67d8bb33144df --- 404.html | 8 ++++---- assets/js/19d568e8.efd3f8d5.js | 1 + ...7f083.76f32392.js => 5497f083.631bebce.js} | 2 +- ...e4921.9bd1caf2.js => 55be4921.cf4ea8fc.js} | 2 +- ...8edaf.2518fc52.js => 82b8edaf.4a57ee09.js} | 2 +- ...f2afb.84f27113.js => 935f2afb.664788d0.js} | 2 +- assets/js/ad8d4462.4774c754.js | 1 - assets/js/ad8d4462.93a4b38a.js | 1 + assets/js/d136d620.a12c86d3.js | 1 - assets/js/d136d620.af31bb8e.js | 1 + assets/js/d52b8f97.4f9ad648.js | 1 + assets/js/d52b8f97.690abada.js | 1 - assets/js/main.6953f0b6.js | 2 -- assets/js/main.b373ac20.js | 2 ++ ...CENSE.txt => main.b373ac20.js.LICENSE.txt} | 0 assets/js/runtime~main.4ee0cc3b.js | 1 - assets/js/runtime~main.8e06e228.js | 1 + blog.html | 8 ++++---- blog/archive.html | 8 ++++---- blog/building-gpt-researcher.html | 8 ++++---- blog/building-openai-assistant.html | 8 ++++---- blog/gptr-hybrid.html | 8 ++++---- blog/gptr-langgraph.html | 8 ++++---- blog/tags.html | 8 ++++---- blog/tags/assistant-api.html | 8 ++++---- blog/tags/autonomous-agent.html | 8 ++++---- blog/tags/github.html | 8 ++++---- blog/tags/gpt-researcher.html | 8 ++++---- blog/tags/hybrid-research.html | 8 ++++---- blog/tags/langchain.html | 8 ++++---- blog/tags/langgraph.html | 8 ++++---- blog/tags/multi-skills.html | 8 ++++---- blog/tags/openai.html | 8 ++++---- blog/tags/opensource.html | 8 ++++---- blog/tags/search-api.html | 8 ++++---- blog/tags/tavily.html | 8 ++++---- docs/contribute.html | 8 ++++---- docs/examples/detailed_report.html | 8 ++++---- docs/examples/examples.html | 8 ++++---- docs/examples/hybrid_research.html | 12 +++++------ docs/faq.html | 8 ++++---- .../context/filtering-by-domain.html | 8 ++++---- docs/gpt-researcher/context/local-docs.html | 8 ++++---- .../context/tailored-research.html | 10 +++++----- .../gpt-researcher/context/vector-stores.html | 8 ++++---- docs/gpt-researcher/frontend/frontend.html | 10 +++++----- docs/gpt-researcher/frontend/logs.html | 20 +++++++++++++++++++ .../frontend/playing-with-webhooks.html | 10 +++++----- docs/gpt-researcher/getting-started/cli.html | 8 ++++---- .../getting-started-with-docker.html | 8 ++++---- .../getting-started/getting-started.html | 8 ++++---- .../getting-started/how-to-choose.html | 8 ++++---- .../getting-started/introduction.html | 10 +++++----- .../getting-started/linux-deployment.html | 8 ++++---- docs/gpt-researcher/gptr/automated-tests.html | 8 ++++---- docs/gpt-researcher/gptr/config.html | 10 +++++----- docs/gpt-researcher/gptr/example.html | 8 ++++---- .../gptr/handling-logs-as-they-stream.html | 8 ++++---- docs/gpt-researcher/gptr/pip-package.html | 8 ++++---- .../gptr/querying-the-backend.html | 8 ++++---- docs/gpt-researcher/gptr/scraping.html | 8 ++++---- docs/gpt-researcher/gptr/troubleshooting.html | 8 ++++---- docs/gpt-researcher/llms/llms.html | 12 +++++------ .../llms/running-with-ollama.html | 8 ++++---- .../gpt-researcher/llms/testing-your-llm.html | 8 ++++---- .../multi_agents/langgraph.html | 8 ++++---- .../search-engines/retrievers.html | 8 ++++---- .../search-engines/test-your-retriever.html | 8 ++++---- docs/reference/config/config.html | 8 ++++---- docs/reference/config/singleton.html | 8 ++++---- docs/reference/processing/html.html | 8 ++++---- docs/reference/processing/text.html | 8 ++++---- docs/roadmap.html | 8 ++++---- docs/welcome.html | 8 ++++---- index.html | 8 ++++---- search-index.json | 2 +- search.html | 8 ++++---- sitemap.xml | 2 +- 78 files changed, 278 insertions(+), 257 deletions(-) create mode 100644 assets/js/19d568e8.efd3f8d5.js rename assets/js/{5497f083.76f32392.js => 5497f083.631bebce.js} (83%) rename assets/js/{55be4921.9bd1caf2.js => 55be4921.cf4ea8fc.js} (64%) rename assets/js/{82b8edaf.2518fc52.js => 82b8edaf.4a57ee09.js} (57%) rename assets/js/{935f2afb.84f27113.js => 935f2afb.664788d0.js} (50%) delete mode 100644 assets/js/ad8d4462.4774c754.js create mode 100644 assets/js/ad8d4462.93a4b38a.js delete mode 100644 assets/js/d136d620.a12c86d3.js create mode 100644 assets/js/d136d620.af31bb8e.js create mode 100644 assets/js/d52b8f97.4f9ad648.js delete mode 100644 assets/js/d52b8f97.690abada.js delete mode 100644 assets/js/main.6953f0b6.js create mode 100644 assets/js/main.b373ac20.js rename assets/js/{main.6953f0b6.js.LICENSE.txt => main.b373ac20.js.LICENSE.txt} (100%) delete mode 100644 assets/js/runtime~main.4ee0cc3b.js create mode 100644 assets/js/runtime~main.8e06e228.js create mode 100644 docs/gpt-researcher/frontend/logs.html diff --git a/404.html b/404.html index 5b0ecf304..5d27208e6 100644 --- a/404.html +++ b/404.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Page Not Found | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="Page Not Found | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/404.html"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/404.html"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/404.html" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/404.html" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/assets/js/19d568e8.efd3f8d5.js b/assets/js/19d568e8.efd3f8d5.js new file mode 100644 index 000000000..2c8bf6d80 --- /dev/null +++ b/assets/js/19d568e8.efd3f8d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2645],{5680:(e,t,n)=>{n.d(t,{xA:()=>p,yg:()=>c});var a=n(6540);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 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<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,i=function(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),g=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",y={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,r=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=g(n),m=i,c=u["".concat(s,".").concat(m)]||u[m]||y[m]||r;return n?a.createElement(c,l(l({ref:t},p),{},{components:n})):a.createElement(c,l({ref:t},p))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var g=2;g<r;g++)l[g]=n[g];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},7203:(e,t,n)=>{n.r(t),n.d(t,{contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>s});var a=n(8168),i=(n(6540),n(5680));const r={},l="Log Files",o={unversionedId:"gpt-researcher/frontend/logs",id:"gpt-researcher/frontend/logs",isDocsHomePage:!1,title:"Log Files",description:"This document explains how to interpret the log files generated for each report. These logs provide a detailed record of the research process, from initial task planning to the gathering of information, and finally, the report writing process. Reports may change over time as new features are developed.",source:"@site/docs/gpt-researcher/frontend/logs.md",sourceDirName:"gpt-researcher/frontend",slug:"/gpt-researcher/frontend/logs",permalink:"/docs/gpt-researcher/frontend/logs",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/logs.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Playing with Webhooks",permalink:"/docs/gpt-researcher/frontend/playing-with-webhooks"},next:{title:"Tailored Research",permalink:"/docs/gpt-researcher/context/tailored-research"}},s=[{value:"Log File Overview",id:"log-file-overview",children:[],level:2},{value:"Key Components:",id:"key-components",children:[],level:2},{value:"Types of Events & Their Significance",id:"types-of-events--their-significance",children:[],level:2},{value:"How to Use the Logs",id:"how-to-use-the-logs",children:[],level:2},{value:"Example Usage",id:"example-usage",children:[],level:2},{value:"Logs for Developers",id:"logs-for-developers",children:[{value:"Basic Log File (.log)",id:"basic-log-file-log",children:[],level:3},{value:"JSON Log File (.json)",id:"json-log-file-json",children:[],level:3}],level:2}],g={toc:s},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.yg)(p,(0,a.A)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"log-files"},"Log Files"),(0,i.yg)("p",null,"This document explains how to interpret the log files generated for each report. These logs provide a detailed record of the research process, from initial task planning to the gathering of information, and finally, the report writing process. Reports may change over time as new features are developed. "),(0,i.yg)("h2",{id:"log-file-overview"},"Log File Overview"),(0,i.yg)("p",null,"The log file is a JSON file that contains a list of events that happened during the research process. Each event is an object with a timestamp, type, and data. The data contains the specific information about the event."),(0,i.yg)("p",null,"You can find the log file in the ",(0,i.yg)("inlineCode",{parentName:"p"},"outputs")," folder. "),(0,i.yg)("p",null,'Or you can access the log file from the report page itself by clicking the "Download Logs" button.'),(0,i.yg)("p",null,"For developers, there is an additional ",(0,i.yg)("inlineCode",{parentName:"p"},"logs")," folder that may be useful. See description below for more details. "),(0,i.yg)("h2",{id:"key-components"},"Key Components:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"timestamp"),": The timestamp is in the format ",(0,i.yg)("inlineCode",{parentName:"li"},"YYYY-MM-DDTHH:MM:SS.ffffff")," which is an ISO format. The main timestamp is for the generation of the file itself. The timestamps for the events are when each specific event happened during the research process. "),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"events"),": This is an array containing all the logged events during the research task. Each event object has the following structure."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"timestamp"),": The specific time when the event occurred, allowing you to follow the sequence of actions."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"type"),': This will always be "event" for now.'),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"data"),": Contains specific information about the event. Includes:"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"type"),': This indicates the general kind of event (e.g., "logs").'),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"content"),': A descriptor of what the tool is doing (e.g., "starting',"_",'research", "running',"_","subquery","_",'research", "scraping',"_",'content").'),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A more detailed message, which often includes visual indicators (emojis), that is sent to the user when the tool performs the task"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"metadata"),": Additional data related to the event. This can be ",(0,i.yg)("inlineCode",{parentName:"li"},"null")," or contain an array of relevant information like URLs.")),(0,i.yg)("h2",{id:"types-of-events--their-significance"},"Types of Events & Their Significance"),(0,i.yg)("p",null,"Here's a complete breakdown of all the unique ",(0,i.yg)("inlineCode",{parentName:"p"},"content")," types and what they mean. This is a comprehensive list of all the different actions the research tool will perform."),(0,i.yg)("ol",null,(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"starting_research")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that the research process has begun for a given task."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Includes the text of the research query.")),(0,i.yg)("ol",{start:2},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"agent_generated")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"This is an indicator of what the agent is used for this task"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Will show the name of the agent")),(0,i.yg)("ol",{start:3},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"planning_research")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Shows the tool is initially browsing to understand the scope of the request and start planning."),(0,i.yg)("li",{parentName:"ul"},"The ",(0,i.yg)("inlineCode",{parentName:"li"},"output")," indicates the tool is either browsing or doing initial planning.")),(0,i.yg)("ol",{start:4},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"subqueries")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that the tool has created subqueries that it will use for research"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Lists out all of the subqueries that the tool will be running to perform the research"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"metadata"),": An array of strings that contain the subqueries to be run")),(0,i.yg)("ol",{start:5},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"running_subquery_research")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that a specific subquery research is being performed."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Shows the specific subquery being run.")),(0,i.yg)("ol",{start:6},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"added_source_url")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Signifies a URL that was identified as a relevant source of information."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Provides the URL with a checkmark emoji to indicate success."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"metadata"),": Contains the actual URL added.")),(0,i.yg)("ol",{start:7},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"researching")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the tool is actively searching across multiple sources for information."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A general message indicating research across multiple sources is happening.")),(0,i.yg)("ol",{start:8},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"scraping_urls")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Shows the tool is beginning to scrape content from a group of URLs."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Indicates how many URLs the tool will be scraping from.")),(0,i.yg)("ol",{start:9},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"scraping_content")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the tool successfully scraped the content from the URLs."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Shows the number of pages that have been successfully scraped.")),(0,i.yg)("ol",{start:10},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"scraping_images")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Signifies that images were identified and selected during the scraping process."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": Shows the number of new images selected and the total images found"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"metadata"),": An array containing URLs of the selected images.")),(0,i.yg)("ol",{start:11},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"scraping_complete")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that the scraping process is complete for the URLs."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message stating that the scraping process is complete")),(0,i.yg)("ol",{start:12},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"fetching_query_content")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that the tool is fetching content based on a specific query."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": The specific query for which content is being fetched")),(0,i.yg)("ol",{start:13},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"subquery_context_window")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the tool is creating a context window for a given subquery to help with more detailed research."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message stating the context window for the subquery is created.")),(0,i.yg)("ol",{start:14},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"research_step_finalized")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that the research portion of a step is finalized."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message stating that the research is complete.")),(0,i.yg)("ol",{start:15},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"generating_subtopics")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Signifies that the tool is generating subtopics to guide the report."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message indicating that the tool is generating subtopics.")),(0,i.yg)("ol",{start:16},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"subtopics_generated")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that subtopics have been generated."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message that subtopics have been generated.")),(0,i.yg)("ol",{start:17},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"writing_introduction")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the tool is beginning to write the introduction to the report."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that the introduction writing has started.")),(0,i.yg)("ol",{start:18},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"introduction_written")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the introduction to the report is finished"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that the introduction writing is complete")),(0,i.yg)("ol",{start:19},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"generating_draft_sections")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Shows that the tool is generating draft sections for the report."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message that the report is generating draft sections.")),(0,i.yg)("ol",{start:20},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"draft_sections_generated")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the draft sections of the report are generated."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that the draft sections have been generated.")),(0,i.yg)("ol",{start:21},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"fetching_relevant_written_content")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the tool is fetching relevant written content for the report."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that relevant content is being fetched")),(0,i.yg)("ol",{start:22},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"writing_report")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that the tool is starting to compile the research into a report."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that the report generation has started.")),(0,i.yg)("ol",{start:23},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"report_written")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Signifies that the report generation is complete."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message that the report generation is finished.")),(0,i.yg)("ol",{start:24},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"relevant_contents_context")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates that a context window for relevant content has been created."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message indicating a context window for relevant content has been created.")),(0,i.yg)("ol",{start:25},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"writing_conclusion")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the tool has started writing the conclusion for the report"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that the conclusion is being written")),(0,i.yg)("ol",{start:26},(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("strong",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"strong"},"conclusion_written")),":")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Indicates the conclusion of the report has been written"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"output"),": A message to the user that the conclusion has been written")),(0,i.yg)("h2",{id:"how-to-use-the-logs"},"How to Use the Logs"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Troubleshooting:")," If the research results are unexpected, the log files can help you understand the exact steps the tool took, including the queries used, the sources it visited, and how the report was generated."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Transparency:")," The logs provide transparency into the research process. You can see exactly which URLs were visited, which images were selected, and how the report was built."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Understanding the Process"),": The logs will provide an overview of what the tool does and what each of the steps look like."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Reproducibility:")," The log files allow users to trace the exact process.")),(0,i.yg)("h2",{id:"example-usage"},"Example Usage"),(0,i.yg)("p",null,"By looking at the timestamps, you can see the flow of the research task. The logs will show you the subqueries used by the tool to approach the main query, all the URLs used, if images were selected for the research, and all the steps the tool took to generate the report."),(0,i.yg)("h2",{id:"logs-for-developers"},"Logs for Developers"),(0,i.yg)("p",null,"In addition to the user-facing log files (detailed and summary reports), the application also generates two types of log files specifically for developers:"),(0,i.yg)("ol",null,(0,i.yg)("li",{parentName:"ol"},"A ",(0,i.yg)("inlineCode",{parentName:"li"},".log")," file which is a basic log file format for logging events as they occur"),(0,i.yg)("li",{parentName:"ol"},"A ",(0,i.yg)("inlineCode",{parentName:"li"},".json")," file which is more structured\nFind the logs in the ",(0,i.yg)("inlineCode",{parentName:"li"},"logs")," folder.")),(0,i.yg)("h3",{id:"basic-log-file-log"},"Basic Log File (.log)"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Format:")," Plain text format. Each line represents a log entry."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Content:"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Timestamps with millisecond precision."),(0,i.yg)("li",{parentName:"ul"},"Log level: Usually ",(0,i.yg)("inlineCode",{parentName:"li"},"INFO"),", but could include ",(0,i.yg)("inlineCode",{parentName:"li"},"DEBUG"),", ",(0,i.yg)("inlineCode",{parentName:"li"},"WARNING"),", or ",(0,i.yg)("inlineCode",{parentName:"li"},"ERROR")," in a more complex setup."),(0,i.yg)("li",{parentName:"ul"},'Module name (e.g., "research").'),(0,i.yg)("li",{parentName:"ul"},"Descriptive messages about various processes."),(0,i.yg)("li",{parentName:"ul"},"Includes data about:",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Start and end of research tasks"),(0,i.yg)("li",{parentName:"ul"},"Web searches being performed"),(0,i.yg)("li",{parentName:"ul"},"Planning of the research"),(0,i.yg)("li",{parentName:"ul"},"Subqueries generated and their results"),(0,i.yg)("li",{parentName:"ul"},"The sizes of scraped data"),(0,i.yg)("li",{parentName:"ul"},"The size of content found from subqueries"),(0,i.yg)("li",{parentName:"ul"},"The final combined size of all context found"))))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Use Cases for Developers:"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Real-time Monitoring:")," Can be used to monitor the tool's activity in real time."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Debugging:")," Helpful for pinpointing issues by seeing the chronological flow of operations, the size of content collected, etc."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Performance Analysis:")," Timestamps can help in identifying bottlenecks by measuring how long certain operations take."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"High-level overview"),": Allows developers to easily see which steps of the tool were performed, and some basic information like sizes of collected content."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Key Differences from User Logs:"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Less structured, more for developers to review in real-time."),(0,i.yg)("li",{parentName:"ul"},"Contains technical information not usually relevant to a non-developer user."),(0,i.yg)("li",{parentName:"ul"},"Does not have emojis or simplified language."),(0,i.yg)("li",{parentName:"ul"},"No information on the images collected")))),(0,i.yg)("h3",{id:"json-log-file-json"},"JSON Log File (.json)"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Format"),": Structured JSON format"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Content"),":",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Timestamps, as in all log files",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"type")," field that can be:"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"sub_query"),": which contains the subquery string along with ",(0,i.yg)("inlineCode",{parentName:"li"},"scraped_data_size")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"content_found"),": which includes the ",(0,i.yg)("inlineCode",{parentName:"li"},"sub_query")," and the ",(0,i.yg)("inlineCode",{parentName:"li"},"content_size")),(0,i.yg)("li",{parentName:"ul"},"A ",(0,i.yg)("inlineCode",{parentName:"li"},"content")," field which gives a snapshot of the overall research and can contain the final context and sources found from the research for that task"))))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Use Cases for Developers"),":",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Detailed Analysis"),": Allows developers to view specific details of how the tool is running, particularly related to the subqueries and the results of the research."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Process Understanding"),": Developers can see the different subqueries run and how much content each generated which can lead to better debugging and understanding of the tool."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Data Inspection"),": Can be useful for reviewing the generated queries and content sizes."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Key Differences from User Logs"),":",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"Highly structured and focused on subquery execution, and the results of this process, specifically the sizes of collected information."),(0,i.yg)("li",{parentName:"ul"},"Does not contain simplified language, emojis, or high-level explanations."),(0,i.yg)("li",{parentName:"ul"},"Does not contain information on the overall context or the images collected, it mainly focuses on the subquery process.")))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5497f083.76f32392.js b/assets/js/5497f083.631bebce.js similarity index 83% rename from assets/js/5497f083.76f32392.js rename to assets/js/5497f083.631bebce.js index 721f3d83d..32ca188d5 100644 --- a/assets/js/5497f083.76f32392.js +++ b/assets/js/5497f083.631bebce.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6057],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>h});var a=r(6540);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),c=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},g="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,s=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),g=c(r),d=n,h=g["".concat(l,".").concat(d)]||g[d]||u[d]||s;return r?a.createElement(h,o(o({ref:t},p),{},{components:r})):a.createElement(h,o({ref:t},p))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=r.length,o=new Array(s);o[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[g]="string"==typeof e?e:n,o[1]=i;for(var c=2;c<s;c++)o[c]=r[c];return a.createElement.apply(null,o)}return a.createElement.apply(null,r)}d.displayName="MDXCreateElement"},6084:(e,t,r)=>{r.r(t),r.d(t,{contentTitle:()=>o,default:()=>g,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var a=r(8168),n=(r(6540),r(5680));const s={},o="Introduction",i={unversionedId:"gpt-researcher/getting-started/introduction",id:"gpt-researcher/getting-started/introduction",isDocsHomePage:!1,title:"Introduction",description:"Official Website",source:"@site/docs/gpt-researcher/getting-started/introduction.md",sourceDirName:"gpt-researcher/getting-started",slug:"/gpt-researcher/getting-started/introduction",permalink:"/docs/gpt-researcher/getting-started/introduction",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/introduction.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Welcome",permalink:"/docs/welcome"},next:{title:"How to Choose",permalink:"/docs/gpt-researcher/getting-started/how-to-choose"}},l=[{value:"Why GPT Researcher?",id:"why-gpt-researcher",children:[],level:2},{value:"Architecture",id:"architecture",children:[],level:2},{value:"Demo",id:"demo",children:[],level:2},{value:"Tutorials",id:"tutorials",children:[],level:2},{value:"Features",id:"features",children:[],level:2}],c={toc:l},p="wrapper";function g(e){let{components:t,...r}=e;return(0,n.yg)(p,(0,a.A)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.yg)("h1",{id:"introduction"},"Introduction"),(0,n.yg)("p",null,(0,n.yg)("a",{parentName:"p",href:"https://gptr.dev"},(0,n.yg)("img",{parentName:"a",src:"https://img.shields.io/badge/Official%20Website-gptr.dev-teal?style=for-the-badge&logo=world&logoColor=white",alt:"Official Website"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://discord.gg/QgZXvJAccX"},(0,n.yg)("img",{parentName:"a",src:"https://dcbadge.vercel.app/api/server/QgZXvJAccX?style=for-the-badge&theme=clean-inverted",alt:"Discord Follow"}))),(0,n.yg)("p",null,(0,n.yg)("a",{parentName:"p",href:"https://github.com/assafelovic/gpt-researcher"},(0,n.yg)("img",{parentName:"a",src:"https://img.shields.io/github/stars/assafelovic/gpt-researcher?style=social",alt:"GitHub Repo stars"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://twitter.com/assaf_elovic"},(0,n.yg)("img",{parentName:"a",src:"https://img.shields.io/twitter/follow/assaf_elovic?style=social",alt:"Twitter Follow"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://badge.fury.io/py/gpt-researcher"},(0,n.yg)("img",{parentName:"a",src:"https://badge.fury.io/py/gpt-researcher.svg",alt:"PyPI version"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://colab.research.google.com/github/assafelovic/gpt-researcher/blob/master/docs/docs/examples/pip-run.ipynb"},(0,n.yg)("img",{parentName:"a",src:"https://colab.research.google.com/assets/colab-badge.svg",alt:"Open In Colab"}))),(0,n.yg)("p",null,(0,n.yg)("strong",{parentName:"p"},(0,n.yg)("a",{parentName:"strong",href:"https://gptr.dev"},"GPT Researcher")," is an autonomous agent designed for comprehensive online research on a variety of tasks.")," "),(0,n.yg)("p",null,"The agent can produce detailed, factual and unbiased research reports, with customization options for focusing on relevant resources, outlines, and lessons. Inspired by the recent ",(0,n.yg)("a",{parentName:"p",href:"https://arxiv.org/abs/2305.04091"},"Plan-and-Solve")," and ",(0,n.yg)("a",{parentName:"p",href:"https://arxiv.org/abs/2005.11401"},"RAG")," papers, GPT Researcher addresses issues of speed, determinism and reliability, offering a more stable performance and increased speed through parallelized agent work, as opposed to synchronous operations."),(0,n.yg)("h2",{id:"why-gpt-researcher"},"Why GPT Researcher?"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"To form objective conclusions for manual research tasks can take time, sometimes weeks to find the right resources and information."),(0,n.yg)("li",{parentName:"ul"},"Current LLMs are trained on past and outdated information, with heavy risks of hallucinations, making them almost irrelevant for research tasks."),(0,n.yg)("li",{parentName:"ul"},"Current LLMs are limited to short token outputs which are not sufficient for long detailed research reports (2k+ words)."),(0,n.yg)("li",{parentName:"ul"},"Solutions that enable web search (such as ChatGPT + Web Plugin), only consider limited resources and content that in some cases result in superficial conclusions or biased answers."),(0,n.yg)("li",{parentName:"ul"},"Using only a selection of resources can create bias in determining the right conclusions for research questions or tasks. ")),(0,n.yg)("h2",{id:"architecture"},"Architecture"),(0,n.yg)("p",null,'The main idea is to run "planner" and "execution" agents, whereas the planner generates questions to research, and the execution agents seek the most related information based on each generated research question. Finally, the planner filters and aggregates all related information and creates a research report. ',(0,n.yg)("br",null)," ",(0,n.yg)("br",null),"\nThe agents leverage both gpt-4o-mini and gpt-4o (128K context) to complete a research task. We optimize for costs using each only when necessary. ",(0,n.yg)("strong",{parentName:"p"},"The average research task takes around 3 minutes to complete, and costs ~$0.1.")),(0,n.yg)("div",{align:"center"},(0,n.yg)("img",{align:"center",height:"600",src:"https://github.com/assafelovic/gpt-researcher/assets/13554167/4ac896fd-63ab-4b77-9688-ff62aafcc527"})),(0,n.yg)("p",null,"More specifically:"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"Create a domain specific agent based on research query or task."),(0,n.yg)("li",{parentName:"ul"},"Generate a set of research questions that together form an objective opinion on any given task. "),(0,n.yg)("li",{parentName:"ul"},"For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task."),(0,n.yg)("li",{parentName:"ul"},"For each scraped resources, summarize based on relevant information and keep track of its sources."),(0,n.yg)("li",{parentName:"ul"},"Finally, filter and aggregate all summarized sources and generate a final research report.")),(0,n.yg)("h2",{id:"demo"},"Demo"),(0,n.yg)("iframe",{height:"400",width:"700",src:"https://github.com/assafelovic/gpt-researcher/assets/13554167/a00c89a6-a295-4dd0-b58d-098a31c40fda",frameborder:"0",allow:"autoplay; encrypted-media",allowfullscreen:!0}),(0,n.yg)("h2",{id:"tutorials"},"Tutorials"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://medium.com/better-programming/how-i-built-an-autonomous-ai-agent-for-online-research-93435a97c6c"},"How it Works")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://www.loom.com/share/04ebffb6ed2a4520a27c3e3addcdde20?sid=da1848e8-b1f1-42d1-93c3-5b0b9c3b24ea"},"How to Install")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://www.loom.com/share/6a3385db4e8747a1913dd85a7834846f?sid=a740fd5b-2aa3-457e-8fb7-86976f59f9b8"},"Live Demo")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://gptr.dev"},"Homepage"))),(0,n.yg)("h2",{id:"features"},"Features"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcdd Generate research, outlines, resources and lessons reports"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcdc Can generate long and detailed research reports (over 2K words)"),(0,n.yg)("li",{parentName:"ul"},"\ud83c\udf10 Aggregates over 20 web sources per research to form objective and factual conclusions"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udda5\ufe0f Includes an easy-to-use web interface (HTML/CSS/JS)"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udd0d Scrapes web sources with javascript support"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcc2 Keeps track and context of visited and used web sources"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcc4 Export research reports to PDF, Word and more...")),(0,n.yg)("p",null,"Let's get started ",(0,n.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/getting-started/getting-started"},"here"),"!"))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6057],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>h});var a=r(6540);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),c=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},g="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,s=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),g=c(r),d=n,h=g["".concat(l,".").concat(d)]||g[d]||u[d]||s;return r?a.createElement(h,o(o({ref:t},p),{},{components:r})):a.createElement(h,o({ref:t},p))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=r.length,o=new Array(s);o[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[g]="string"==typeof e?e:n,o[1]=i;for(var c=2;c<s;c++)o[c]=r[c];return a.createElement.apply(null,o)}return a.createElement.apply(null,r)}d.displayName="MDXCreateElement"},6084:(e,t,r)=>{r.r(t),r.d(t,{contentTitle:()=>o,default:()=>g,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var a=r(8168),n=(r(6540),r(5680));const s={},o="Introduction",i={unversionedId:"gpt-researcher/getting-started/introduction",id:"gpt-researcher/getting-started/introduction",isDocsHomePage:!1,title:"Introduction",description:"Official Website",source:"@site/docs/gpt-researcher/getting-started/introduction.md",sourceDirName:"gpt-researcher/getting-started",slug:"/gpt-researcher/getting-started/introduction",permalink:"/docs/gpt-researcher/getting-started/introduction",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/introduction.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Welcome",permalink:"/docs/welcome"},next:{title:"How to Choose",permalink:"/docs/gpt-researcher/getting-started/how-to-choose"}},l=[{value:"Why GPT Researcher?",id:"why-gpt-researcher",children:[],level:2},{value:"Architecture",id:"architecture",children:[],level:2},{value:"Demo",id:"demo",children:[],level:2},{value:"Tutorials",id:"tutorials",children:[],level:2},{value:"Features",id:"features",children:[],level:2}],c={toc:l},p="wrapper";function g(e){let{components:t,...r}=e;return(0,n.yg)(p,(0,a.A)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.yg)("h1",{id:"introduction"},"Introduction"),(0,n.yg)("p",null,(0,n.yg)("a",{parentName:"p",href:"https://gptr.dev"},(0,n.yg)("img",{parentName:"a",src:"https://img.shields.io/badge/Official%20Website-gptr.dev-teal?style=for-the-badge&logo=world&logoColor=white",alt:"Official Website"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://discord.gg/QgZXvJAccX"},(0,n.yg)("img",{parentName:"a",src:"https://dcbadge.vercel.app/api/server/QgZXvJAccX?style=for-the-badge&theme=clean-inverted",alt:"Discord Follow"}))),(0,n.yg)("p",null,(0,n.yg)("a",{parentName:"p",href:"https://github.com/assafelovic/gpt-researcher"},(0,n.yg)("img",{parentName:"a",src:"https://img.shields.io/github/stars/assafelovic/gpt-researcher?style=social",alt:"GitHub Repo stars"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://twitter.com/assaf_elovic"},(0,n.yg)("img",{parentName:"a",src:"https://img.shields.io/twitter/follow/assaf_elovic?style=social",alt:"Twitter Follow"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://badge.fury.io/py/gpt-researcher"},(0,n.yg)("img",{parentName:"a",src:"https://badge.fury.io/py/gpt-researcher.svg",alt:"PyPI version"})),"\n",(0,n.yg)("a",{parentName:"p",href:"https://colab.research.google.com/github/assafelovic/gpt-researcher/blob/master/docs/docs/examples/pip-run.ipynb"},(0,n.yg)("img",{parentName:"a",src:"https://colab.research.google.com/assets/colab-badge.svg",alt:"Open In Colab"}))),(0,n.yg)("p",null,(0,n.yg)("strong",{parentName:"p"},(0,n.yg)("a",{parentName:"strong",href:"https://gptr.dev"},"GPT Researcher")," is an autonomous agent designed for comprehensive online research on a variety of tasks.")," "),(0,n.yg)("p",null,"The agent can produce detailed, factual and unbiased research reports, with customization options for focusing on relevant resources, outlines, and lessons. Inspired by the recent ",(0,n.yg)("a",{parentName:"p",href:"https://arxiv.org/abs/2305.04091"},"Plan-and-Solve")," and ",(0,n.yg)("a",{parentName:"p",href:"https://arxiv.org/abs/2005.11401"},"RAG")," papers, GPT Researcher addresses issues of speed, determinism and reliability, offering a more stable performance and increased speed through parallelized agent work, as opposed to synchronous operations."),(0,n.yg)("h2",{id:"why-gpt-researcher"},"Why GPT Researcher?"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"To form objective conclusions for manual research tasks can take time, sometimes weeks to find the right resources and information."),(0,n.yg)("li",{parentName:"ul"},"Current LLMs are trained on past and outdated information, with heavy risks of hallucinations, making them almost irrelevant for research tasks."),(0,n.yg)("li",{parentName:"ul"},"Current LLMs are limited to short token outputs which are not sufficient for long detailed research reports (2k+ words)."),(0,n.yg)("li",{parentName:"ul"},"Solutions that enable web search (such as ChatGPT + Web Plugin), only consider limited resources and content that in some cases result in superficial conclusions or biased answers."),(0,n.yg)("li",{parentName:"ul"},"Using only a selection of resources can create bias in determining the right conclusions for research questions or tasks. ")),(0,n.yg)("h2",{id:"architecture"},"Architecture"),(0,n.yg)("p",null,'The main idea is to run "planner" and "execution" agents, whereas the planner generates questions to research, and the execution agents seek the most related information based on each generated research question. Finally, the planner filters and aggregates all related information and creates a research report. ',(0,n.yg)("br",null)," ",(0,n.yg)("br",null),"\nThe agents leverage both gpt-4o-mini and gpt-4o (128K context) to complete a research task. We optimize for costs using each only when necessary. ",(0,n.yg)("strong",{parentName:"p"},"The average research task takes around 3 minutes to complete, and costs ~$0.1.")),(0,n.yg)("div",{align:"center"},(0,n.yg)("img",{align:"center",height:"600",src:"https://github.com/assafelovic/gpt-researcher/assets/13554167/4ac896fd-63ab-4b77-9688-ff62aafcc527"})),(0,n.yg)("p",null,"More specifically:"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"Create a domain specific agent based on research query or task."),(0,n.yg)("li",{parentName:"ul"},"Generate a set of research questions that together form an objective opinion on any given task. "),(0,n.yg)("li",{parentName:"ul"},"For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task."),(0,n.yg)("li",{parentName:"ul"},"For each scraped resources, summarize based on relevant information and keep track of its sources."),(0,n.yg)("li",{parentName:"ul"},"Finally, filter and aggregate all summarized sources and generate a final research report.")),(0,n.yg)("h2",{id:"demo"},"Demo"),(0,n.yg)("iframe",{height:"400",width:"700",src:"https://github.com/assafelovic/gpt-researcher/assets/13554167/a00c89a6-a295-4dd0-b58d-098a31c40fda",frameborder:"0",allow:"autoplay; encrypted-media",allowfullscreen:!0}),(0,n.yg)("h2",{id:"tutorials"},"Tutorials"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://www.youtube.com/playlist?list=PLUGOUZPIB0F-qv6MvKq3HGr0M_b3U2ATv"},"Full Introduction Playlist")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://medium.com/better-programming/how-i-built-an-autonomous-ai-agent-for-online-research-93435a97c6c"},"How it Works")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://www.loom.com/share/04ebffb6ed2a4520a27c3e3addcdde20?sid=da1848e8-b1f1-42d1-93c3-5b0b9c3b24ea"},"How to Install")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://www.loom.com/share/6a3385db4e8747a1913dd85a7834846f?sid=a740fd5b-2aa3-457e-8fb7-86976f59f9b8"},"Live Demo")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"https://gptr.dev"},"Homepage"))),(0,n.yg)("h2",{id:"features"},"Features"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcdd Generate research, outlines, resources and lessons reports"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcdc Can generate long and detailed research reports (over 2K words)"),(0,n.yg)("li",{parentName:"ul"},"\ud83c\udf10 Aggregates over 20 web sources per research to form objective and factual conclusions"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udda5\ufe0f Includes an easy-to-use web interface (HTML/CSS/JS)"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udd0d Scrapes web sources with javascript support"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcc2 Keeps track and context of visited and used web sources"),(0,n.yg)("li",{parentName:"ul"},"\ud83d\udcc4 Export research reports to PDF, Word and more...")),(0,n.yg)("p",null,"Let's get started ",(0,n.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/getting-started/getting-started"},"here"),"!"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/55be4921.9bd1caf2.js b/assets/js/55be4921.cf4ea8fc.js similarity index 64% rename from assets/js/55be4921.9bd1caf2.js rename to assets/js/55be4921.cf4ea8fc.js index 8422131e1..659a0f493 100644 --- a/assets/js/55be4921.9bd1caf2.js +++ b/assets/js/55be4921.cf4ea8fc.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[444],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>d});var n=r(6540);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 i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),l=function(e){var t=n.useContext(c),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(c.Provider,{value:t},e.children)},h="mdxType",g={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,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),h=l(r),u=o,d=h["".concat(c,".").concat(u)]||h[u]||g[u]||a;return r?n.createElement(d,i(i({ref:t},p),{},{components:r})):n.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[h]="string"==typeof e?e:o,i[1]=s;for(var l=2;l<a;l++)i[l]=r[l];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}u.displayName="MDXCreateElement"},956:(e,t,r)=>{r.r(t),r.d(t,{contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var n=r(8168),o=(r(6540),r(5680));const a={},i="Playing with Webhooks",s={unversionedId:"gpt-researcher/frontend/playing-with-webhooks",id:"gpt-researcher/frontend/playing-with-webhooks",isDocsHomePage:!1,title:"Playing with Webhooks",description:"The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend.",source:"@site/docs/gpt-researcher/frontend/playing-with-webhooks.md",sourceDirName:"gpt-researcher/frontend",slug:"/gpt-researcher/frontend/playing-with-webhooks",permalink:"/docs/gpt-researcher/frontend/playing-with-webhooks",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/playing-with-webhooks.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Frontend Application",permalink:"/docs/gpt-researcher/frontend/frontend"},next:{title:"Tailored Research",permalink:"/docs/gpt-researcher/context/tailored-research"}},c=[{value:"Inspecting Webhooks",id:"inspecting-webhooks",children:[{value:"Am I polling the right URL?",id:"am-i-polling-the-right-url",children:[],level:3}],level:2}],l={toc:c},p="wrapper";function h(e){let{components:t,...r}=e;return(0,o.yg)(p,(0,n.A)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"playing-with-webhooks"},"Playing with Webhooks"),(0,o.yg)("p",null,"The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend."),(0,o.yg)("h2",{id:"inspecting-webhooks"},"Inspecting Webhooks"),(0,o.yg)("p",null,"When running reports via the frontend, you can inspect the websocket messages in the Network Tab."),(0,o.yg)("p",null,"Here's how: "),(0,o.yg)("p",null,(0,o.yg)("img",{parentName:"p",src:"https://github.com/user-attachments/assets/15fcb5a4-77ea-4b3b-87d7-55d4b6f80095",alt:"image"})),(0,o.yg)("h3",{id:"am-i-polling-the-right-url"},"Am I polling the right URL?"),(0,o.yg)("p",null,"If you're concerned that your frontend isn't hitting the right API Endpoint, you can check the URL in the Network Tab."),(0,o.yg)("p",null,'Click into the WS request & go to the "Headers" tab'),(0,o.yg)("p",null,(0,o.yg)("img",{parentName:"p",src:"https://github.com/user-attachments/assets/dbd58c1d-3506-411a-852b-e1b133b6f5c8",alt:"image"})),(0,o.yg)("p",null,"For debugging, have a look at the ",(0,o.yg)("a",{href:"https://github.com/assafelovic/gpt-researcher/blob/master/frontend/nextjs/helpers/getHost.ts"},"getHost function.")))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[444],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>d});var n=r(6540);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 i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),l=function(e){var t=n.useContext(c),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(c.Provider,{value:t},e.children)},h="mdxType",g={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,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),h=l(r),u=o,d=h["".concat(c,".").concat(u)]||h[u]||g[u]||a;return r?n.createElement(d,i(i({ref:t},p),{},{components:r})):n.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[h]="string"==typeof e?e:o,i[1]=s;for(var l=2;l<a;l++)i[l]=r[l];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}u.displayName="MDXCreateElement"},956:(e,t,r)=>{r.r(t),r.d(t,{contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var n=r(8168),o=(r(6540),r(5680));const a={},i="Playing with Webhooks",s={unversionedId:"gpt-researcher/frontend/playing-with-webhooks",id:"gpt-researcher/frontend/playing-with-webhooks",isDocsHomePage:!1,title:"Playing with Webhooks",description:"The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend.",source:"@site/docs/gpt-researcher/frontend/playing-with-webhooks.md",sourceDirName:"gpt-researcher/frontend",slug:"/gpt-researcher/frontend/playing-with-webhooks",permalink:"/docs/gpt-researcher/frontend/playing-with-webhooks",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/playing-with-webhooks.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Frontend Application",permalink:"/docs/gpt-researcher/frontend/frontend"},next:{title:"Log Files",permalink:"/docs/gpt-researcher/frontend/logs"}},c=[{value:"Inspecting Webhooks",id:"inspecting-webhooks",children:[{value:"Am I polling the right URL?",id:"am-i-polling-the-right-url",children:[],level:3}],level:2}],l={toc:c},p="wrapper";function h(e){let{components:t,...r}=e;return(0,o.yg)(p,(0,n.A)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"playing-with-webhooks"},"Playing with Webhooks"),(0,o.yg)("p",null,"The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend."),(0,o.yg)("h2",{id:"inspecting-webhooks"},"Inspecting Webhooks"),(0,o.yg)("p",null,"When running reports via the frontend, you can inspect the websocket messages in the Network Tab."),(0,o.yg)("p",null,"Here's how: "),(0,o.yg)("p",null,(0,o.yg)("img",{parentName:"p",src:"https://github.com/user-attachments/assets/15fcb5a4-77ea-4b3b-87d7-55d4b6f80095",alt:"image"})),(0,o.yg)("h3",{id:"am-i-polling-the-right-url"},"Am I polling the right URL?"),(0,o.yg)("p",null,"If you're concerned that your frontend isn't hitting the right API Endpoint, you can check the URL in the Network Tab."),(0,o.yg)("p",null,'Click into the WS request & go to the "Headers" tab'),(0,o.yg)("p",null,(0,o.yg)("img",{parentName:"p",src:"https://github.com/user-attachments/assets/dbd58c1d-3506-411a-852b-e1b133b6f5c8",alt:"image"})),(0,o.yg)("p",null,"For debugging, have a look at the ",(0,o.yg)("a",{href:"https://github.com/assafelovic/gpt-researcher/blob/master/frontend/nextjs/helpers/getHost.ts"},"getHost function.")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/82b8edaf.2518fc52.js b/assets/js/82b8edaf.4a57ee09.js similarity index 57% rename from assets/js/82b8edaf.2518fc52.js rename to assets/js/82b8edaf.4a57ee09.js index 32b4dfb85..d2efdb9dc 100644 --- a/assets/js/82b8edaf.2518fc52.js +++ b/assets/js/82b8edaf.4a57ee09.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2337],{5680:(e,n,r)=>{r.d(n,{xA:()=>g,yg:()=>y});var t=r(6540);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function i(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?o(Object(r),!0).forEach((function(n){a(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function l(e,n){if(null==e)return{};var r,t,a=function(e,n){if(null==e)return{};var r,t,a={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=t.createContext({}),p=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):i(i({},n),e)),r},g=function(e){var n=p(e.components);return t.createElement(s.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},c=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,g=l(e,["components","mdxType","originalType","parentName"]),m=p(r),c=a,y=m["".concat(s,".").concat(c)]||m[c]||u[c]||o;return r?t.createElement(y,i(i({ref:n},g),{},{components:r})):t.createElement(y,i({ref:n},g))}));function y(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=c;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var p=2;p<o;p++)i[p]=r[p];return t.createElement.apply(null,i)}return t.createElement.apply(null,r)}c.displayName="MDXCreateElement"},7937:(e,n,r)=>{r.r(n),r.d(n,{contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var t=r(8168),a=(r(6540),r(5680));const o={},i="Configuration",l={unversionedId:"gpt-researcher/gptr/config",id:"gpt-researcher/gptr/config",isDocsHomePage:!1,title:"Configuration",description:"The config.py enables you to customize GPT Researcher to your specific needs and preferences.",source:"@site/docs/gpt-researcher/gptr/config.md",sourceDirName:"gpt-researcher/gptr",slug:"/gpt-researcher/gptr/config",permalink:"/docs/gpt-researcher/gptr/config",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/config.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Agent Example",permalink:"/docs/gpt-researcher/gptr/example"},next:{title:"Scraping Options",permalink:"/docs/gpt-researcher/gptr/scraping"}},s=[{value:"Example: Azure OpenAI Configuration",id:"example-azure-openai-configuration",children:[],level:2}],p={toc:s},g="wrapper";function m(e){let{components:n,...r}=e;return(0,a.yg)(g,(0,t.A)({},p,r,{components:n,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"configuration"},"Configuration"),(0,a.yg)("p",null,"The config.py enables you to customize GPT Researcher to your specific needs and preferences."),(0,a.yg)("p",null,"Thanks to our amazing community and contributions, GPT Researcher supports multiple LLMs and Retrievers.\nIn addition, GPT Researcher can be tailored to various report formats (such as APA), word count, research iterations depth, etc."),(0,a.yg)("p",null,"GPT Researcher defaults to our recommended suite of integrations: ",(0,a.yg)("a",{parentName:"p",href:"https://platform.openai.com/docs/overview"},"OpenAI")," for LLM calls and ",(0,a.yg)("a",{parentName:"p",href:"https://app.tavily.com"},"Tavily API")," for retrieving real-time web information."),(0,a.yg)("p",null,"As seen below, OpenAI still stands as the superior LLM. We assume it will stay this way for some time, and that prices will only continue to decrease, while performance and speed increase over time."),(0,a.yg)("div",{style:{marginBottom:"10px"}},(0,a.yg)("img",{align:"center",height:"350",src:"/img/leaderboard.png"})),(0,a.yg)("p",null,"The default config.py file can be found in ",(0,a.yg)("inlineCode",{parentName:"p"},"/gpt_researcher/config/"),". It supports various options for customizing GPT Researcher to your needs.\nYou can also include your own external JSON file ",(0,a.yg)("inlineCode",{parentName:"p"},"config.json")," by adding the path in the ",(0,a.yg)("inlineCode",{parentName:"p"},"config_file")," param. ",(0,a.yg)("strong",{parentName:"p"},"Please follow the config.py file for additional future support"),"."),(0,a.yg)("p",null,"Below is a list of current supported options:"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"RETRIEVER")),": Web search engine used for retrieving sources. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"tavily"),". Options: ",(0,a.yg)("inlineCode",{parentName:"li"},"duckduckgo"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"bing"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"google"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"searchapi"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"serper"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"searx"),". ",(0,a.yg)("a",{parentName:"li",href:"https://github.com/assafelovic/gpt-researcher/tree/master/gpt_researcher/retrievers"},"Check here")," for supported retrievers"),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"EMBEDDING")),": Embedding model. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:text-embedding-3-small"),". Options: ",(0,a.yg)("inlineCode",{parentName:"li"},"ollama"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"huggingface"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"azure_openai"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"custom"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"FAST_LLM")),": Model name for fast LLM operations such summaries. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:gpt-4o-mini"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SMART_LLM")),": Model name for smart operations like generating research reports and reasoning. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:gpt-4o"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"STRATEGIC_LLM")),": Model name for strategic operations like generating research plans and strategies. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:o1-preview"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"LANGUAGE")),": Language to be used for the final research report. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"english"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"CURATE_SOURCES")),": Whether to curate sources for research. This step adds an LLM run which may increase costs and total run time but improves quality of source selection. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"True"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"FAST_TOKEN_LIMIT")),": Maximum token limit for fast LLM responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"2000"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SMART_TOKEN_LIMIT")),": Maximum token limit for smart LLM responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"4000"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"BROWSE_CHUNK_MAX_LENGTH")),": Maximum length of text chunks to browse in web sources. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"8192"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SUMMARY_TOKEN_LIMIT")),": Maximum token limit for generating summaries. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"700"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"TEMPERATURE")),": Sampling temperature for LLM responses, typically between 0 and 1. A higher value results in more randomness and creativity, while a lower value results in more focused and deterministic responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"0.55"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"TOTAL_WORDS")),": Total word count limit for document generation or processing tasks. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"800"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"REPORT_FORMAT")),": Preferred format for report generation. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"APA"),". Consider formats like ",(0,a.yg)("inlineCode",{parentName:"li"},"MLA"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"CMS"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"Harvard style"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"IEEE"),", etc."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"MAX_ITERATIONS")),": Maximum number of iterations for processes like query expansion or search refinement. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"3"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"AGENT_ROLE")),": Role of the agent. This might be used to customize the behavior of the agent based on its assigned roles. No default value."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"MAX_SUBTOPICS")),": Maximum number of subtopics to generate or consider. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"3"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SCRAPER")),": Web scraper to use for gathering information. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"bs")," (BeautifulSoup). You can also use ",(0,a.yg)("a",{parentName:"li",href:"https://github.com/codelucas/newspaper"},"newspaper"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"DOC_PATH")),": Path to read and research local documents. Defaults to an empty string indicating no path specified."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"USER_AGENT")),": Custom User-Agent string for web crawling and web requests."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"MEMORY_BACKEND")),": Backend used for memory operations, such as local storage of temporary data. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"local"),".")),(0,a.yg)("p",null,"To change the default configurations, you can simply add env variables to your ",(0,a.yg)("inlineCode",{parentName:"p"},".env")," file as named above or export manually in your local project directory."),(0,a.yg)("p",null,"For example, to manually change the search engine and report format:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-bash"},"export RETRIEVER=bing\nexport REPORT_FORMAT=IEEE\n")),(0,a.yg)("p",null,"Please note that you might need to export additional env vars and obtain API keys for other supported search retrievers and LLM providers. Please follow your console logs for further assistance.\nTo learn more about additional LLM support you can check out the docs ",(0,a.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/llms/llms"},"here"),"."),(0,a.yg)("p",null,"You can also include your own external JSON file ",(0,a.yg)("inlineCode",{parentName:"p"},"config.json")," by adding the path in the ",(0,a.yg)("inlineCode",{parentName:"p"},"config_file")," param."),(0,a.yg)("h2",{id:"example-azure-openai-configuration"},"Example: Azure OpenAI Configuration"),(0,a.yg)("p",null,"If you are not using OpenAI's models, but other model providers, besides the general configuration above, also additional environment variables are required.\nCheck the ",(0,a.yg)("a",{parentName:"p",href:"https://python.langchain.com/v0.2/docs/integrations/platforms/"},"langchain documentation")," about your model for the exact configuration of the API keys and endpoints."),(0,a.yg)("p",null,"Here is an example for ",(0,a.yg)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models"},"Azure OpenAI")," configuration:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-bash"},'\nOPENAI_API_VERSION="2024-05-01-preview" # or whatever you are using\nAZURE_OPENAI_ENDPOINT="https://CHANGEMEN.openai.azure.com/" # change to the name of your deployment\nAZURE_OPENAI_API_KEY="[Your Key]" # change to your API key\n\nEMBEDDING="azure_openai:text-embedding-ada-002" # change to the deployment of your embedding model\n\nFAST_LLM="azure_openai:gpt-4o-mini" # change to the name of your deployment (not model-name)\nFAST_TOKEN_LIMIT=4000\n\nSMART_LLM="azure_openai:gpt-4o" # change to the name of your deployment (not model-name)\nSMART_TOKEN_LIMIT=4000\n\nRETRIEVER="bing" # if you are using Bing as your search engine (which is likely if you use Azure)\nBING_API_KEY="[Your Key]"\n\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2337],{5680:(e,n,r)=>{r.d(n,{xA:()=>g,yg:()=>y});var t=r(6540);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function i(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?o(Object(r),!0).forEach((function(n){a(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function l(e,n){if(null==e)return{};var r,t,a=function(e,n){if(null==e)return{};var r,t,a={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=t.createContext({}),p=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):i(i({},n),e)),r},g=function(e){var n=p(e.components);return t.createElement(s.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},c=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,g=l(e,["components","mdxType","originalType","parentName"]),m=p(r),c=a,y=m["".concat(s,".").concat(c)]||m[c]||u[c]||o;return r?t.createElement(y,i(i({ref:n},g),{},{components:r})):t.createElement(y,i({ref:n},g))}));function y(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=c;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var p=2;p<o;p++)i[p]=r[p];return t.createElement.apply(null,i)}return t.createElement.apply(null,r)}c.displayName="MDXCreateElement"},7937:(e,n,r)=>{r.r(n),r.d(n,{contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var t=r(8168),a=(r(6540),r(5680));const o={},i="Configuration",l={unversionedId:"gpt-researcher/gptr/config",id:"gpt-researcher/gptr/config",isDocsHomePage:!1,title:"Configuration",description:"The config.py enables you to customize GPT Researcher to your specific needs and preferences.",source:"@site/docs/gpt-researcher/gptr/config.md",sourceDirName:"gpt-researcher/gptr",slug:"/gpt-researcher/gptr/config",permalink:"/docs/gpt-researcher/gptr/config",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/config.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Agent Example",permalink:"/docs/gpt-researcher/gptr/example"},next:{title:"Scraping Options",permalink:"/docs/gpt-researcher/gptr/scraping"}},s=[{value:"Example: Azure OpenAI Configuration",id:"example-azure-openai-configuration",children:[],level:2}],p={toc:s},g="wrapper";function m(e){let{components:n,...r}=e;return(0,a.yg)(g,(0,t.A)({},p,r,{components:n,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"configuration"},"Configuration"),(0,a.yg)("p",null,"The config.py enables you to customize GPT Researcher to your specific needs and preferences."),(0,a.yg)("p",null,"Thanks to our amazing community and contributions, GPT Researcher supports multiple LLMs and Retrievers.\nIn addition, GPT Researcher can be tailored to various report formats (such as APA), word count, research iterations depth, etc."),(0,a.yg)("p",null,"GPT Researcher defaults to our recommended suite of integrations: ",(0,a.yg)("a",{parentName:"p",href:"https://platform.openai.com/docs/overview"},"OpenAI")," for LLM calls and ",(0,a.yg)("a",{parentName:"p",href:"https://app.tavily.com"},"Tavily API")," for retrieving real-time web information."),(0,a.yg)("p",null,"As seen below, OpenAI still stands as the superior LLM. We assume it will stay this way for some time, and that prices will only continue to decrease, while performance and speed increase over time."),(0,a.yg)("div",{style:{marginBottom:"10px"}},(0,a.yg)("img",{align:"center",height:"350",src:"/img/leaderboard.png"})),(0,a.yg)("p",null,"The default config.py file can be found in ",(0,a.yg)("inlineCode",{parentName:"p"},"/gpt_researcher/config/"),". It supports various options for customizing GPT Researcher to your needs.\nYou can also include your own external JSON file ",(0,a.yg)("inlineCode",{parentName:"p"},"config.json")," by adding the path in the ",(0,a.yg)("inlineCode",{parentName:"p"},"config_file")," param. ",(0,a.yg)("strong",{parentName:"p"},"Please follow the config.py file for additional future support"),"."),(0,a.yg)("p",null,"Below is a list of current supported options:"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"RETRIEVER")),": Web search engine used for retrieving sources. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"tavily"),". Options: ",(0,a.yg)("inlineCode",{parentName:"li"},"duckduckgo"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"bing"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"google"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"searchapi"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"serper"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"searx"),". ",(0,a.yg)("a",{parentName:"li",href:"https://github.com/assafelovic/gpt-researcher/tree/master/gpt_researcher/retrievers"},"Check here")," for supported retrievers"),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"EMBEDDING")),": Embedding model. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:text-embedding-3-small"),". Options: ",(0,a.yg)("inlineCode",{parentName:"li"},"ollama"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"huggingface"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"azure_openai"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"custom"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"FAST_LLM")),": Model name for fast LLM operations such summaries. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:gpt-4o-mini"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SMART_LLM")),": Model name for smart operations like generating research reports and reasoning. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:gpt-4o"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"STRATEGIC_LLM")),": Model name for strategic operations like generating research plans and strategies. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"openai:o1-preview"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"LANGUAGE")),": Language to be used for the final research report. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"english"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"CURATE_SOURCES")),": Whether to curate sources for research. This step adds an LLM run which may increase costs and total run time but improves quality of source selection. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"True"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"FAST_TOKEN_LIMIT")),": Maximum token limit for fast LLM responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"2000"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SMART_TOKEN_LIMIT")),": Maximum token limit for smart LLM responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"4000"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"STRATEGIC_TOKEN_LIMIT")),": Maximum token limit for strategic LLM responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"4000"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"BROWSE_CHUNK_MAX_LENGTH")),": Maximum length of text chunks to browse in web sources. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"8192"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SUMMARY_TOKEN_LIMIT")),": Maximum token limit for generating summaries. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"700"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"TEMPERATURE")),": Sampling temperature for LLM responses, typically between 0 and 1. A higher value results in more randomness and creativity, while a lower value results in more focused and deterministic responses. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"0.55"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"TOTAL_WORDS")),": Total word count limit for document generation or processing tasks. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"800"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"REPORT_FORMAT")),": Preferred format for report generation. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"APA"),". Consider formats like ",(0,a.yg)("inlineCode",{parentName:"li"},"MLA"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"CMS"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"Harvard style"),", ",(0,a.yg)("inlineCode",{parentName:"li"},"IEEE"),", etc."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"MAX_ITERATIONS")),": Maximum number of iterations for processes like query expansion or search refinement. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"3"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"AGENT_ROLE")),": Role of the agent. This might be used to customize the behavior of the agent based on its assigned roles. No default value."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"MAX_SUBTOPICS")),": Maximum number of subtopics to generate or consider. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"3"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"SCRAPER")),": Web scraper to use for gathering information. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"bs")," (BeautifulSoup). You can also use ",(0,a.yg)("a",{parentName:"li",href:"https://github.com/codelucas/newspaper"},"newspaper"),"."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"DOC_PATH")),": Path to read and research local documents. Defaults to an empty string indicating no path specified."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"USER_AGENT")),": Custom User-Agent string for web crawling and web requests."),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("strong",{parentName:"li"},(0,a.yg)("inlineCode",{parentName:"strong"},"MEMORY_BACKEND")),": Backend used for memory operations, such as local storage of temporary data. Defaults to ",(0,a.yg)("inlineCode",{parentName:"li"},"local"),".")),(0,a.yg)("p",null,"To change the default configurations, you can simply add env variables to your ",(0,a.yg)("inlineCode",{parentName:"p"},".env")," file as named above or export manually in your local project directory."),(0,a.yg)("p",null,"For example, to manually change the search engine and report format:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-bash"},"export RETRIEVER=bing\nexport REPORT_FORMAT=IEEE\n")),(0,a.yg)("p",null,"Please note that you might need to export additional env vars and obtain API keys for other supported search retrievers and LLM providers. Please follow your console logs for further assistance.\nTo learn more about additional LLM support you can check out the docs ",(0,a.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/llms/llms"},"here"),"."),(0,a.yg)("p",null,"You can also include your own external JSON file ",(0,a.yg)("inlineCode",{parentName:"p"},"config.json")," by adding the path in the ",(0,a.yg)("inlineCode",{parentName:"p"},"config_file")," param."),(0,a.yg)("h2",{id:"example-azure-openai-configuration"},"Example: Azure OpenAI Configuration"),(0,a.yg)("p",null,"If you are not using OpenAI's models, but other model providers, besides the general configuration above, also additional environment variables are required.\nCheck the ",(0,a.yg)("a",{parentName:"p",href:"https://python.langchain.com/v0.2/docs/integrations/platforms/"},"langchain documentation")," about your model for the exact configuration of the API keys and endpoints."),(0,a.yg)("p",null,"Here is an example for ",(0,a.yg)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models"},"Azure OpenAI")," configuration:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-bash"},'\nOPENAI_API_VERSION="2024-05-01-preview" # or whatever you are using\nAZURE_OPENAI_ENDPOINT="https://CHANGEMEN.openai.azure.com/" # change to the name of your deployment\nAZURE_OPENAI_API_KEY="[Your Key]" # change to your API key\n\nEMBEDDING="azure_openai:text-embedding-ada-002" # change to the deployment of your embedding model\n\nFAST_LLM="azure_openai:gpt-4o-mini" # change to the name of your deployment (not model-name)\nFAST_TOKEN_LIMIT=4000\n\nSMART_LLM="azure_openai:gpt-4o" # change to the name of your deployment (not model-name)\nSMART_TOKEN_LIMIT=4000\n\nRETRIEVER="bing" # if you are using Bing as your search engine (which is likely if you use Azure)\nBING_API_KEY="[Your Key]"\n\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.84f27113.js b/assets/js/935f2afb.664788d0.js similarity index 50% rename from assets/js/935f2afb.84f27113.js rename to assets/js/935f2afb.664788d0.js index 85f122da2..ec10f6226 100644 --- a/assets/js/935f2afb.84f27113.js +++ b/assets/js/935f2afb.664788d0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Welcome","href":"/docs/welcome"},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Introduction","href":"/docs/gpt-researcher/getting-started/introduction"},{"type":"link","label":"How to Choose","href":"/docs/gpt-researcher/getting-started/how-to-choose"},{"type":"link","label":"Getting Started","href":"/docs/gpt-researcher/getting-started/getting-started"},{"type":"link","label":"Run with CLI","href":"/docs/gpt-researcher/getting-started/cli"},{"type":"link","label":"Docker: Quickstart","href":"/docs/gpt-researcher/getting-started/getting-started-with-docker"},{"type":"link","label":"Running on Linux","href":"/docs/gpt-researcher/getting-started/linux-deployment"}]},{"type":"category","label":"GPT Researcher","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"PIP Package","href":"/docs/gpt-researcher/gptr/pip-package"},{"type":"link","label":"Agent Example","href":"/docs/gpt-researcher/gptr/example"},{"type":"link","label":"Configuration","href":"/docs/gpt-researcher/gptr/config"},{"type":"link","label":"Scraping Options","href":"/docs/gpt-researcher/gptr/scraping"},{"type":"link","label":"Handling Logs","href":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream"},{"type":"link","label":"Querying the Backend","href":"/docs/gpt-researcher/gptr/querying-the-backend"},{"type":"link","label":"Automated Tests","href":"/docs/gpt-researcher/gptr/automated-tests"},{"type":"link","label":"Troubleshooting","href":"/docs/gpt-researcher/gptr/troubleshooting"}]},{"type":"category","label":"Frontend","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Frontend Application","href":"/docs/gpt-researcher/frontend/frontend"},{"type":"link","label":"Playing with Webhooks","href":"/docs/gpt-researcher/frontend/playing-with-webhooks"}]},{"type":"category","label":"Custom Context","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Tailored Research","href":"/docs/gpt-researcher/context/tailored-research"},{"type":"link","label":"Research on Local Documents","href":"/docs/gpt-researcher/context/local-docs"},{"type":"link","label":"Filtering by Domain","href":"/docs/gpt-researcher/context/filtering-by-domain"},{"type":"link","label":"Vector Stores","href":"/docs/gpt-researcher/context/vector-stores"}]},{"type":"category","label":"LLM Providers","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configure LLM","href":"/docs/gpt-researcher/llms/llms"},{"type":"link","label":"Running with Ollama","href":"/docs/gpt-researcher/llms/running-with-ollama"},{"type":"link","label":"Testing your LLM","href":"/docs/gpt-researcher/llms/testing-your-llm"}]},{"type":"category","label":"Search Engines","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Retrievers","href":"/docs/gpt-researcher/search-engines/retrievers"},{"type":"link","label":"Testing your Retriever","href":"/docs/gpt-researcher/search-engines/test-your-retriever"}]},{"type":"category","label":"Multi-Agent Frameworks","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"LangGraph","href":"/docs/gpt-researcher/multi_agents/langgraph"}]},{"type":"category","collapsed":true,"collapsible":true,"label":"Examples","items":[{"type":"link","label":"Detailed Report","href":"/docs/examples/detailed_report"},{"type":"link","label":"Simple Run","href":"/docs/examples/examples"},{"type":"link","label":"Hybrid Research","href":"/docs/examples/hybrid_research"}]},{"type":"link","label":"Contribute","href":"/docs/contribute"},{"type":"link","label":"Roadmap","href":"/docs/roadmap"},{"type":"link","label":"FAQ","href":"/docs/faq"}],"referenceSideBar":[{"items":[],"label":"Reference","type":"category","collapsible":true,"collapsed":true}]}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Welcome","href":"/docs/welcome"},{"type":"category","label":"Getting Started","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Introduction","href":"/docs/gpt-researcher/getting-started/introduction"},{"type":"link","label":"How to Choose","href":"/docs/gpt-researcher/getting-started/how-to-choose"},{"type":"link","label":"Getting Started","href":"/docs/gpt-researcher/getting-started/getting-started"},{"type":"link","label":"Run with CLI","href":"/docs/gpt-researcher/getting-started/cli"},{"type":"link","label":"Docker: Quickstart","href":"/docs/gpt-researcher/getting-started/getting-started-with-docker"},{"type":"link","label":"Running on Linux","href":"/docs/gpt-researcher/getting-started/linux-deployment"}]},{"type":"category","label":"GPT Researcher","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"PIP Package","href":"/docs/gpt-researcher/gptr/pip-package"},{"type":"link","label":"Agent Example","href":"/docs/gpt-researcher/gptr/example"},{"type":"link","label":"Configuration","href":"/docs/gpt-researcher/gptr/config"},{"type":"link","label":"Scraping Options","href":"/docs/gpt-researcher/gptr/scraping"},{"type":"link","label":"Handling Logs","href":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream"},{"type":"link","label":"Querying the Backend","href":"/docs/gpt-researcher/gptr/querying-the-backend"},{"type":"link","label":"Automated Tests","href":"/docs/gpt-researcher/gptr/automated-tests"},{"type":"link","label":"Troubleshooting","href":"/docs/gpt-researcher/gptr/troubleshooting"}]},{"type":"category","label":"Frontend","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Frontend Application","href":"/docs/gpt-researcher/frontend/frontend"},{"type":"link","label":"Playing with Webhooks","href":"/docs/gpt-researcher/frontend/playing-with-webhooks"},{"type":"link","label":"Log Files","href":"/docs/gpt-researcher/frontend/logs"}]},{"type":"category","label":"Custom Context","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Tailored Research","href":"/docs/gpt-researcher/context/tailored-research"},{"type":"link","label":"Research on Local Documents","href":"/docs/gpt-researcher/context/local-docs"},{"type":"link","label":"Filtering by Domain","href":"/docs/gpt-researcher/context/filtering-by-domain"},{"type":"link","label":"Vector Stores","href":"/docs/gpt-researcher/context/vector-stores"}]},{"type":"category","label":"LLM Providers","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configure LLM","href":"/docs/gpt-researcher/llms/llms"},{"type":"link","label":"Running with Ollama","href":"/docs/gpt-researcher/llms/running-with-ollama"},{"type":"link","label":"Testing your LLM","href":"/docs/gpt-researcher/llms/testing-your-llm"}]},{"type":"category","label":"Search Engines","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Retrievers","href":"/docs/gpt-researcher/search-engines/retrievers"},{"type":"link","label":"Testing your Retriever","href":"/docs/gpt-researcher/search-engines/test-your-retriever"}]},{"type":"category","label":"Multi-Agent Frameworks","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"LangGraph","href":"/docs/gpt-researcher/multi_agents/langgraph"}]},{"type":"category","collapsed":true,"collapsible":true,"label":"Examples","items":[{"type":"link","label":"Detailed Report","href":"/docs/examples/detailed_report"},{"type":"link","label":"Simple Run","href":"/docs/examples/examples"},{"type":"link","label":"Hybrid Research","href":"/docs/examples/hybrid_research"}]},{"type":"link","label":"Contribute","href":"/docs/contribute"},{"type":"link","label":"Roadmap","href":"/docs/roadmap"},{"type":"link","label":"FAQ","href":"/docs/faq"}],"referenceSideBar":[{"items":[],"label":"Reference","type":"category","collapsible":true,"collapsed":true}]}}')}}]); \ No newline at end of file diff --git a/assets/js/ad8d4462.4774c754.js b/assets/js/ad8d4462.4774c754.js deleted file mode 100644 index d91202d65..000000000 --- a/assets/js/ad8d4462.4774c754.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6644],{5680:(e,r,n)=>{n.d(r,{xA:()=>p,yg:()=>h});var t=n(6540);function a(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function s(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){a(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function i(e,r){if(null==e)return{};var n,t,a=function(e,r){if(null==e)return{};var n,t,a={},o=Object.keys(e);for(t=0;t<o.length;t++)n=o[t],r.indexOf(n)>=0||(a[n]=e[n]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)n=o[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=t.createContext({}),c=function(e){var r=t.useContext(l),n=r;return e&&(n="function"==typeof e?e(r):s(s({},r),e)),n},p=function(e){var r=c(e.components);return t.createElement(l.Provider,{value:r},e.children)},u="mdxType",y={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},d=t.forwardRef((function(e,r){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,h=u["".concat(l,".").concat(d)]||u[d]||y[d]||o;return n?t.createElement(h,s(s({ref:r},p),{},{components:n})):t.createElement(h,s({ref:r},p))}));function h(e,r){var n=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=d;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[u]="string"==typeof e?e:a,s[1]=i;for(var c=2;c<o;c++)s[c]=n[c];return t.createElement.apply(null,s)}return t.createElement.apply(null,n)}d.displayName="MDXCreateElement"},1934:(e,r,n)=>{n.r(r),n.d(r,{contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var t=n(8168),a=(n(6540),n(5680));const o={},s="Hybrid Research",i={unversionedId:"examples/hybrid_research",id:"examples/hybrid_research",isDocsHomePage:!1,title:"Hybrid Research",description:"Introduction",source:"@site/docs/examples/hybrid_research.md",sourceDirName:"examples",slug:"/examples/hybrid_research",permalink:"/docs/examples/hybrid_research",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/examples/hybrid_research.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Simple Run",permalink:"/docs/examples/examples"},next:{title:"Contribute",permalink:"/docs/contribute"}},l=[{value:"Introduction",id:"introduction",children:[],level:2},{value:"Prerequisites",id:"prerequisites",children:[],level:2},{value:"Installation",id:"installation",children:[],level:2},{value:"Setting Up the Environment",id:"setting-up-the-environment",children:[],level:2},{value:"Preparing Local Documents",id:"preparing-local-documents",children:[],level:2},{value:"Running Hybrid Research",id:"running-hybrid-research",children:[],level:2},{value:"Understanding the Results",id:"understanding-the-results",children:[],level:2},{value:"Troubleshooting",id:"troubleshooting",children:[],level:2},{value:"FAQ",id:"faq",children:[],level:2}],c={toc:l},p="wrapper";function u(e){let{components:r,...n}=e;return(0,a.yg)(p,(0,t.A)({},c,n,{components:r,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"hybrid-research"},"Hybrid Research"),(0,a.yg)("h2",{id:"introduction"},"Introduction"),(0,a.yg)("p",null,"GPT Researcher can combine web search capabilities with local document analysis to provide comprehensive, context-aware research results. "),(0,a.yg)("p",null,"This guide will walk you through the process of setting up and running hybrid research using GPT Researcher."),(0,a.yg)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.yg)("p",null,"Before you begin, ensure you have the following:"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"Python 3.10 or higher installed on your system"),(0,a.yg)("li",{parentName:"ul"},"pip (Python package installer)"),(0,a.yg)("li",{parentName:"ul"},"An OpenAI API key (you can also choose other supported ",(0,a.yg)("a",{parentName:"li",href:"/docs/gpt-researcher/llms/llms"},"LLMs"),")"),(0,a.yg)("li",{parentName:"ul"},"A Tavily API key (you can also choose other supported ",(0,a.yg)("a",{parentName:"li",href:"/docs/gpt-researcher/search-engines/retrievers"},"Retrievers"),")")),(0,a.yg)("h2",{id:"installation"},"Installation"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-bash"},"pip install gpt-researcher\n")),(0,a.yg)("h2",{id:"setting-up-the-environment"},"Setting Up the Environment"),(0,a.yg)("p",null,"Export your API keys as environment variables:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-bash"},"export OPENAI_API_KEY=your_openai_api_key_here\nexport TAVILY_API_KEY=your_tavily_api_key_here\n")),(0,a.yg)("p",null,"Alternatively, you can set these in your Python script:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-python"},"import os\nos.environ['OPENAI_API_KEY'] = 'your_openai_api_key_here'\nos.environ['TAVILY_API_KEY'] = 'your_tavily_api_key_here'\n")),(0,a.yg)("h2",{id:"preparing-local-documents"},"Preparing Local Documents"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},"Create a directory named ",(0,a.yg)("inlineCode",{parentName:"li"},"my-docs")," in your project folder."),(0,a.yg)("li",{parentName:"ol"},"Place all relevant local documents (PDFs, TXTs, DOCXs, etc.) in this directory.")),(0,a.yg)("h2",{id:"running-hybrid-research"},"Running Hybrid Research"),(0,a.yg)("p",null,"Here's a basic script to run hybrid research:"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_research_report(query: str, report_type: str, report_source: str) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source)\n research = await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "How does our product roadmap compare to emerging market trends in our industry?"\n report_source = "hybrid"\n\n report = asyncio.run(get_research_report(query=query, report_type="research_report", report_source=report_source))\n print(report)\n')),(0,a.yg)("p",null,"To run the script:"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},"Save it as ",(0,a.yg)("inlineCode",{parentName:"li"},"run_research.py")),(0,a.yg)("li",{parentName:"ol"},"Execute it with: ",(0,a.yg)("inlineCode",{parentName:"li"},"python run_research.py"))),(0,a.yg)("h2",{id:"understanding-the-results"},"Understanding the Results"),(0,a.yg)("p",null,"The output will be a comprehensive research report that combines insights from both web sources and your local documents. The report typically includes an executive summary, key findings, detailed analysis, comparisons between your internal data and external trends, and recommendations based on the combined insights."),(0,a.yg)("h2",{id:"troubleshooting"},"Troubleshooting"),(0,a.yg)("ol",null,(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("strong",{parentName:"li"},"API Key Issues"),": Ensure your API keys are correctly set and have the necessary permissions."),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("strong",{parentName:"li"},"Document Loading Errors"),": Check that your local documents are in supported formats and are not corrupted."),(0,a.yg)("li",{parentName:"ol"},(0,a.yg)("strong",{parentName:"li"},"Memory Issues"),": For large documents or extensive research, you may need to increase your system's available memory or adjust the ",(0,a.yg)("inlineCode",{parentName:"li"},"chunk_size")," in the document processing step.")),(0,a.yg)("h2",{id:"faq"},"FAQ"),(0,a.yg)("p",null,(0,a.yg)("strong",{parentName:"p"},"Q: How long does a typical research session take?"),"\nA: The duration varies based on the complexity of the query and the amount of data to process. It can range from 1-5 minutes for very comprehensive research."),(0,a.yg)("p",null,(0,a.yg)("strong",{parentName:"p"},"Q: Can I use GPT Researcher with other language models?"),"\nA: Currently, GPT Researcher is optimized for OpenAI's models. Support for other models can be found ",(0,a.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/llms/llms"},"here"),"."),(0,a.yg)("p",null,(0,a.yg)("strong",{parentName:"p"},"Q: How does GPT Researcher handle conflicting information between local and web sources?"),"\nA: The system attempts to reconcile differences by providing context and noting discrepancies in the final report. It prioritizes more recent or authoritative sources when conflicts arise."),(0,a.yg)("p",null,(0,a.yg)("strong",{parentName:"p"},"Q: Is my local data sent to external servers during the research process?"),"\nA: No, your local documents are processed on your machine. Only the generated queries and synthesized information (not raw data) are sent to external services for web research."),(0,a.yg)("p",null,"For more information and updates, please visit the ",(0,a.yg)("a",{parentName:"p",href:"https://github.com/assafelovic/gpt-researcher"},"GPT Researcher GitHub repository"),"."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ad8d4462.93a4b38a.js b/assets/js/ad8d4462.93a4b38a.js new file mode 100644 index 000000000..aa6b7b612 --- /dev/null +++ b/assets/js/ad8d4462.93a4b38a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6644],{5680:(e,r,n)=>{n.d(r,{xA:()=>p,yg:()=>h});var t=n(6540);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function s(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?a(Object(n),!0).forEach((function(r){o(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function i(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)n=a[t],r.indexOf(n)>=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)n=a[t],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=t.createContext({}),c=function(e){var r=t.useContext(l),n=r;return e&&(n="function"==typeof e?e(r):s(s({},r),e)),n},p=function(e){var r=c(e.components);return t.createElement(l.Provider,{value:r},e.children)},u="mdxType",y={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},d=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(n),d=o,h=u["".concat(l,".").concat(d)]||u[d]||y[d]||a;return n?t.createElement(h,s(s({ref:r},p),{},{components:n})):t.createElement(h,s({ref:r},p))}));function h(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=d;var i={};for(var l in r)hasOwnProperty.call(r,l)&&(i[l]=r[l]);i.originalType=e,i[u]="string"==typeof e?e:o,s[1]=i;for(var c=2;c<a;c++)s[c]=n[c];return t.createElement.apply(null,s)}return t.createElement.apply(null,n)}d.displayName="MDXCreateElement"},1934:(e,r,n)=>{n.r(r),n.d(r,{contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var t=n(8168),o=(n(6540),n(5680));const a={},s="Hybrid Research",i={unversionedId:"examples/hybrid_research",id:"examples/hybrid_research",isDocsHomePage:!1,title:"Hybrid Research",description:"Introduction",source:"@site/docs/examples/hybrid_research.md",sourceDirName:"examples",slug:"/examples/hybrid_research",permalink:"/docs/examples/hybrid_research",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/examples/hybrid_research.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Simple Run",permalink:"/docs/examples/examples"},next:{title:"Contribute",permalink:"/docs/contribute"}},l=[{value:"Introduction",id:"introduction",children:[],level:2},{value:"Prerequisites",id:"prerequisites",children:[],level:2},{value:"Installation",id:"installation",children:[],level:2},{value:"Setting Up the Environment",id:"setting-up-the-environment",children:[],level:2},{value:"Preparing Documents",id:"preparing-documents",children:[{value:"1. Local Documents",id:"1-local-documents",children:[],level:3},{value:"2. Online Documents",id:"2-online-documents",children:[],level:3}],level:2},{value:"Running Hybrid Research By "Local Documents"",id:"running-hybrid-research-by-local-documents",children:[],level:2},{value:"Running Hybrid Research By "Online Documents"",id:"running-hybrid-research-by-online-documents",children:[],level:2},{value:"Understanding the Results",id:"understanding-the-results",children:[],level:2},{value:"Troubleshooting",id:"troubleshooting",children:[],level:2},{value:"FAQ",id:"faq",children:[],level:2}],c={toc:l},p="wrapper";function u(e){let{components:r,...n}=e;return(0,o.yg)(p,(0,t.A)({},c,n,{components:r,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"hybrid-research"},"Hybrid Research"),(0,o.yg)("h2",{id:"introduction"},"Introduction"),(0,o.yg)("p",null,"GPT Researcher can combine web search capabilities with local document analysis to provide comprehensive, context-aware research results. "),(0,o.yg)("p",null,"This guide will walk you through the process of setting up and running hybrid research using GPT Researcher."),(0,o.yg)("h2",{id:"prerequisites"},"Prerequisites"),(0,o.yg)("p",null,"Before you begin, ensure you have the following:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"Python 3.10 or higher installed on your system"),(0,o.yg)("li",{parentName:"ul"},"pip (Python package installer)"),(0,o.yg)("li",{parentName:"ul"},"An OpenAI API key (you can also choose other supported ",(0,o.yg)("a",{parentName:"li",href:"/docs/gpt-researcher/llms/llms"},"LLMs"),")"),(0,o.yg)("li",{parentName:"ul"},"A Tavily API key (you can also choose other supported ",(0,o.yg)("a",{parentName:"li",href:"/docs/gpt-researcher/search-engines/retrievers"},"Retrievers"),")")),(0,o.yg)("h2",{id:"installation"},"Installation"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"pip install gpt-researcher\n")),(0,o.yg)("h2",{id:"setting-up-the-environment"},"Setting Up the Environment"),(0,o.yg)("p",null,"Export your API keys as environment variables:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"export OPENAI_API_KEY=your_openai_api_key_here\nexport TAVILY_API_KEY=your_tavily_api_key_here\n")),(0,o.yg)("p",null,"Alternatively, you can set these in your Python script:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},"import os\nos.environ['OPENAI_API_KEY'] = 'your_openai_api_key_here'\nos.environ['TAVILY_API_KEY'] = 'your_tavily_api_key_here'\n")),(0,o.yg)("p",null,'Set the environment variable REPORT_SOURCE to an empty string "" in default.py'),(0,o.yg)("h2",{id:"preparing-documents"},"Preparing Documents"),(0,o.yg)("h3",{id:"1-local-documents"},"1. Local Documents"),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},"Create a directory named ",(0,o.yg)("inlineCode",{parentName:"li"},"my-docs")," in your project folder."),(0,o.yg)("li",{parentName:"ol"},"Place all relevant local documents (PDFs, TXTs, DOCXs, etc.) in this directory.")),(0,o.yg)("h3",{id:"2-online-documents"},"2. Online Documents"),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},"Here is an example of your online document URL example: ",(0,o.yg)("a",{parentName:"li",href:"https://xxxx.xxx.pdf"},"https://xxxx.xxx.pdf")," (supports file formats like PDFs, TXTs, DOCXs, etc.) ")),(0,o.yg)("h2",{id:"running-hybrid-research-by-local-documents"},'Running Hybrid Research By "Local Documents"'),(0,o.yg)("p",null,"Here's a basic script to run hybrid research:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_research_report(query: str, report_type: str, report_source: str) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source)\n research = await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "How does our product roadmap compare to emerging market trends in our industry?"\n report_source = "hybrid"\n\n report = asyncio.run(get_research_report(query=query, report_type="research_report", report_source=report_source))\n print(report)\n')),(0,o.yg)("h2",{id:"running-hybrid-research-by-online-documents"},'Running Hybrid Research By "Online Documents"'),(0,o.yg)("p",null,"Here's a basic script to run hybrid research:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_research_report(query: str, report_type: str, report_source: str) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, document_urls=document_urls, report_source=report_source)\n research = await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "How does our product roadmap compare to emerging market trends in our industry?"\n report_source = "hybrid"\n document_urls = ["https://xxxx.xxx.pdf", "https://xxxx.xxx.doc"]\n\n report = asyncio.run(get_research_report(query=query, report_type="research_report", document_urls=document_urls, report_source=report_source))\n print(report)\n')),(0,o.yg)("p",null,"To run the script:"),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},"Save it as ",(0,o.yg)("inlineCode",{parentName:"li"},"run_research.py")),(0,o.yg)("li",{parentName:"ol"},"Execute it with: ",(0,o.yg)("inlineCode",{parentName:"li"},"python run_research.py"))),(0,o.yg)("h2",{id:"understanding-the-results"},"Understanding the Results"),(0,o.yg)("p",null,"The output will be a comprehensive research report that combines insights from both web sources and your local documents. The report typically includes an executive summary, key findings, detailed analysis, comparisons between your internal data and external trends, and recommendations based on the combined insights."),(0,o.yg)("h2",{id:"troubleshooting"},"Troubleshooting"),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("strong",{parentName:"li"},"API Key Issues"),": Ensure your API keys are correctly set and have the necessary permissions."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("strong",{parentName:"li"},"Document Loading Errors"),": Check that your local documents are in supported formats and are not corrupted."),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("strong",{parentName:"li"},"Memory Issues"),": For large documents or extensive research, you may need to increase your system's available memory or adjust the ",(0,o.yg)("inlineCode",{parentName:"li"},"chunk_size")," in the document processing step.")),(0,o.yg)("h2",{id:"faq"},"FAQ"),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Q: How long does a typical research session take?"),"\nA: The duration varies based on the complexity of the query and the amount of data to process. It can range from 1-5 minutes for very comprehensive research."),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Q: Can I use GPT Researcher with other language models?"),"\nA: Currently, GPT Researcher is optimized for OpenAI's models. Support for other models can be found ",(0,o.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/llms/llms"},"here"),"."),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Q: How does GPT Researcher handle conflicting information between local and web sources?"),"\nA: The system attempts to reconcile differences by providing context and noting discrepancies in the final report. It prioritizes more recent or authoritative sources when conflicts arise."),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Q: Is my local data sent to external servers during the research process?"),"\nA: No, your local documents are processed on your machine. Only the generated queries and synthesized information (not raw data) are sent to external services for web research."),(0,o.yg)("p",null,"For more information and updates, please visit the ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/assafelovic/gpt-researcher"},"GPT Researcher GitHub repository"),"."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d136d620.a12c86d3.js b/assets/js/d136d620.a12c86d3.js deleted file mode 100644 index c0e0ea3ef..000000000 --- a/assets/js/d136d620.a12c86d3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3089],{5680:(e,n,a)=>{a.d(n,{xA:()=>s,yg:()=>u});var r=a(6540);function o(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function t(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(n){o(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function i(e,n){if(null==e)return{};var a,r,o=function(e,n){if(null==e)return{};var a,r,o={},t=Object.keys(e);for(r=0;r<t.length;r++)a=t[r],n.indexOf(a)>=0||(o[a]=e[a]);return o}(e,n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(r=0;r<t.length;r++)a=t[r],n.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var p=r.createContext({}),g=function(e){var n=r.useContext(p),a=n;return e&&(a="function"==typeof e?e(n):l(l({},n),e)),a},s=function(e){var n=g(e.components);return r.createElement(p.Provider,{value:n},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var a=e.components,o=e.mdxType,t=e.originalType,p=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),m=g(a),d=o,u=m["".concat(p,".").concat(d)]||m[d]||c[d]||t;return a?r.createElement(u,l(l({ref:n},s),{},{components:a})):r.createElement(u,l({ref:n},s))}));function u(e,n){var a=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var t=a.length,l=new Array(t);l[0]=d;var i={};for(var p in n)hasOwnProperty.call(n,p)&&(i[p]=n[p]);i.originalType=e,i[m]="string"==typeof e?e:o,l[1]=i;for(var g=2;g<t;g++)l[g]=a[g];return r.createElement.apply(null,l)}return r.createElement.apply(null,a)}d.displayName="MDXCreateElement"},5204:(e,n,a)=>{a.r(n),a.d(n,{contentTitle:()=>l,default:()=>m,frontMatter:()=>t,metadata:()=>i,toc:()=>p});var r=a(8168),o=(a(6540),a(5680));const t={},l="Configure LLM",i={unversionedId:"gpt-researcher/llms/llms",id:"gpt-researcher/llms/llms",isDocsHomePage:!1,title:"Configure LLM",description:"As described in the introduction, the default LLM and embedding is OpenAI due to its superior performance and speed.",source:"@site/docs/gpt-researcher/llms/llms.md",sourceDirName:"gpt-researcher/llms",slug:"/gpt-researcher/llms/llms",permalink:"/docs/gpt-researcher/llms/llms",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/llms/llms.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Vector Stores",permalink:"/docs/gpt-researcher/context/vector-stores"},next:{title:"Running with Ollama",permalink:"/docs/gpt-researcher/llms/running-with-ollama"}},p=[{value:"OpenAI",id:"openai",children:[],level:2},{value:"Custom LLM",id:"custom-llm",children:[],level:2},{value:"Azure OpenAI",id:"azure-openai",children:[],level:2},{value:"Ollama",id:"ollama",children:[],level:2},{value:"Groq",id:"groq",children:[{value:"Sign up",id:"sign-up",children:[],level:3},{value:"Update env vars",id:"update-env-vars",children:[],level:3}],level:2},{value:"Anthropic",id:"anthropic",children:[],level:2},{value:"Mistral AI",id:"mistral-ai",children:[],level:2},{value:"Together AI",id:"together-ai",children:[],level:2},{value:"HuggingFace",id:"huggingface",children:[],level:2},{value:"Google Gemini",id:"google-gemini",children:[],level:2},{value:"Google VertexAI",id:"google-vertexai",children:[],level:2},{value:"Cohere",id:"cohere",children:[],level:2},{value:"Fireworks",id:"fireworks",children:[],level:2},{value:"Bedrock",id:"bedrock",children:[],level:2},{value:"xAI",id:"xai",children:[],level:2},{value:"Other Embedding Models",id:"other-embedding-models",children:[{value:"Nomic",id:"nomic",children:[],level:3},{value:"VoyageAI",id:"voyageai",children:[],level:3}],level:2}],g={toc:p},s="wrapper";function m(e){let{components:n,...a}=e;return(0,o.yg)(s,(0,r.A)({},g,a,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"configure-llm"},"Configure LLM"),(0,o.yg)("p",null,"As described in the ",(0,o.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/gptr/config"},"introduction"),", the default LLM and embedding is OpenAI due to its superior performance and speed.\nWith that said, GPT Researcher supports various open/closed source LLMs and embeddings, and you can easily switch between them by updating the ",(0,o.yg)("inlineCode",{parentName:"p"},"SMART_LLM"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"FAST_LLM")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"EMBEDDING")," env variables. You might also need to include the provider API key and corresponding configuration params."),(0,o.yg)("p",null,"Current supported LLMs are ",(0,o.yg)("inlineCode",{parentName:"p"},"openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"anthropic"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"azure_openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"cohere"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_vertexai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_genai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"fireworks"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"ollama"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"together"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"mistralai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"huggingface"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"groq")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"bedrock"),"."),(0,o.yg)("p",null,"Current supported embeddings are ",(0,o.yg)("inlineCode",{parentName:"p"},"openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"azure_openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"cohere"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_vertexai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_genai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"fireworks"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"ollama"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"together"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"mistralai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"huggingface"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"nomic")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"voyageai"),"."),(0,o.yg)("p",null,"To learn more about support customization options see ",(0,o.yg)("a",{parentName:"p",href:"/gpt-researcher/config"},"here"),"."),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Please note"),": GPT Researcher is optimized and heavily tested on GPT models. Some other models might run into context limit errors, and unexpected responses.\nPlease provide any feedback in our ",(0,o.yg)("a",{parentName:"p",href:"https://discord.gg/DUmbTebB"},"Discord community")," channel, so we can better improve the experience and performance."),(0,o.yg)("p",null,"Below you can find examples for how to configure the various supported LLMs."),(0,o.yg)("h2",{id:"openai"},"OpenAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'# set the custom OpenAI API key\nOPENAI_API_KEY=[Your Key]\n\n# specify llms\nFAST_LLM="openai:gpt-4o-mini"\nSMART_LLM="openai:gpt-4o"\nSTRATEGIC_LLM="openai:o1-preview"\n\n# specify embedding\nEMBEDDING="openai:text-embedding-3-small"\n')),(0,o.yg)("h2",{id:"custom-llm"},"Custom LLM"),(0,o.yg)("p",null,"Create a local OpenAI API using ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md#quick-start"},"llama.cpp Server"),"."),(0,o.yg)("p",null,'For custom LLM, specify "openai:{your-llm}"'),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'# set the custom OpenAI API url\nOPENAI_BASE_URL="http://localhost:1234/v1"\n# set the custom OpenAI API key\nOPENAI_API_KEY="dummy_key"\n\n# specify custom llms \nFAST_LLM="openai:your_fast_llm"\nSMART_LLM="openai:your_smart_llm"\nSTRATEGIC_LLM="openai:your_strategic_llm"\n')),(0,o.yg)("p",null,'For custom embedding, set "custom:{your-embedding}"'),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'# set the custom OpenAI API url\nOPENAI_BASE_URL="http://localhost:1234/v1"\n# set the custom OpenAI API key\nOPENAI_API_KEY="dummy_key"\n\n# specify the custom embedding model \nEMBEDDING="custom:your_embedding"\n')),(0,o.yg)("h2",{id:"azure-openai"},"Azure OpenAI"),(0,o.yg)("p",null,"See also the documentation in the Langchain ",(0,o.yg)("a",{parentName:"p",href:"https://api.python.langchain.com/en/latest/chat_models/langchain_openai.chat_models.azure.AzureChatOpenAI.html"},"Azure OpenAI")," page."),(0,o.yg)("p",null,"On Azure OpenAI you will need to create deployments for each model you want to use. Please also specify the model names/deployment names in your ",(0,o.yg)("inlineCode",{parentName:"p"},".env")," file:"),(0,o.yg)("p",null,"Required Embedding Model:\nTo ensure optimal performance, GPT Researcher requires the text-embedding-3-large model. Please deploy this specific model to your Azure Endpoint."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"AZURE_OPENAI_API_KEY=[Your Key]\nAZURE_OPENAI_ENDPOINT=https://{your-endpoint}.openai.azure.com/\nOPENAI_API_VERSION=2024-05-01-preview\n\n# note that the deployment name must be the same as the model name\nFAST_LLM=azure_openai:gpt-4o-mini \nSMART_LLM=azure_openai:gpt-4o\nSTRATEGIC_LLM=azure_openai:o1-preview\n\n\n")),(0,o.yg)("h2",{id:"ollama"},"Ollama"),(0,o.yg)("p",null,"GPT Researcher supports both Ollama LLMs and embeddings. You can choose each or both.\nTo use ",(0,o.yg)("a",{parentName:"p",href:"http://www.ollama.com"},"Ollama")," you can set the following environment variables"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'OLLAMA_BASE_URL=http://localhost:11434\nFAST_LLM="ollama:llama3"\nSMART_LLM="ollama:llama3"\nSTRATEGIC_LLM="ollama:llama3"\n\nEMBEDDING="ollama:nomic-embed-text"\n')),(0,o.yg)("h2",{id:"groq"},"Groq"),(0,o.yg)("p",null,"GroqCloud provides advanced AI hardware and software solutions designed to deliver amazingly fast AI inference performance.\nTo leverage Groq in GPT-Researcher, you will need a GroqCloud account and an API Key. (",(0,o.yg)("strong",{parentName:"p"},"NOTE:")," Groq has a very ",(0,o.yg)("em",{parentName:"p"},"generous free tier"),".)"),(0,o.yg)("h3",{id:"sign-up"},"Sign up"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"You can signup here: ",(0,o.yg)("a",{parentName:"p",href:"https://console.groq.com/login"},"https://console.groq.com/login"))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Once you are logged in, you can get an API Key here: ",(0,o.yg)("a",{parentName:"p",href:"https://console.groq.com/keys"},"https://console.groq.com/keys"))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Once you have an API key, you will need to add it to your ",(0,o.yg)("inlineCode",{parentName:"p"},"systems environment")," using the variable name:\n",(0,o.yg)("inlineCode",{parentName:"p"},'GROQ_API_KEY="*********************"')))),(0,o.yg)("h3",{id:"update-env-vars"},"Update env vars"),(0,o.yg)("p",null,"And finally, you will need to configure the GPT-Researcher Provider and Model variables:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'GROQ_API_KEY=[Your Key]\n\n# Set one of the LLM models supported by Groq\nFAST_LLM="groq:Mixtral-8x7b-32768"\nSMART_LLM="groq:Mixtral-8x7b-32768"\nSTRATEGIC_LLM="groq:Mixtral-8x7b-32768"\n')),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"NOTE:")," As of the writing of this Doc (May 2024), the available Language Models from Groq are:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"Llama3-70b-8192"),(0,o.yg)("li",{parentName:"ul"},"Llama3-8b-8192"),(0,o.yg)("li",{parentName:"ul"},"Mixtral-8x7b-32768"),(0,o.yg)("li",{parentName:"ul"},"Gemma-7b-it")),(0,o.yg)("h2",{id:"anthropic"},"Anthropic"),(0,o.yg)("p",null,"Refer to Anthropic ",(0,o.yg)("a",{parentName:"p",href:"https://docs.anthropic.com/en/api/getting-started"},"Getting started page")," to obtain Anthropic API key. Update the corresponding env vars, for example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'ANTHROPIC_API_KEY=[Your key]\nFAST_LLM="anthropic:claude-2.1"\nSMART_LLM="anthropic:claude-3-opus-20240229"\nSTRATEGIC_LLM="anthropic:claude-3-opus-20240229"\n')),(0,o.yg)("p",null,"Anthropic does not offer its own embedding model. "),(0,o.yg)("h2",{id:"mistral-ai"},"Mistral AI"),(0,o.yg)("p",null,"Sign up for a ",(0,o.yg)("a",{parentName:"p",href:"https://console.mistral.ai/users/api-keys/"},"Mistral API key"),".\nThen update the corresponding env vars, for example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'MISTRAL_API_KEY=[Your key]\nFAST_LLM="mistralai:open-mistral-7b"\nSMART_LLM="mistralai:mistral-large-latest"\nSTRATEGIC_LLM="mistralai:mistral-large-latest"\n\nEMBEDDING="mistralai:mistral-embed"\n')),(0,o.yg)("h2",{id:"together-ai"},"Together AI"),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"https://www.together.ai/"},"Together AI")," offers an API to query ",(0,o.yg)("a",{parentName:"p",href:"https://docs.together.ai/docs/inference-models"},"50+ leading open-source models")," in a couple lines of code.\nThen update corresponding env vars, for example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'TOGETHER_API_KEY=[Your key]\nFAST_LLM="together:meta-llama/Llama-3-8b-chat-hf"\nSMART_LLM="together:meta-llama/Llama-3-70b-chat-hf"\nSTRATEGIC_LLM="together:meta-llama/Llama-3-70b-chat-hf"\n\nEMBEDDING="mistralai:nomic-ai/nomic-embed-text-v1.5"\n')),(0,o.yg)("h2",{id:"huggingface"},"HuggingFace"),(0,o.yg)("p",null,"This integration requires a bit of extra work. Follow ",(0,o.yg)("a",{parentName:"p",href:"https://python.langchain.com/v0.1/docs/integrations/chat/huggingface/"},"this guide")," to learn more.\nAfter you've followed the tutorial above, update the env vars:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'HUGGINGFACE_API_KEY=[Your key]\nFAST_LLM="huggingface:HuggingFaceH4/zephyr-7b-beta"\nSMART_LLM="huggingface:HuggingFaceH4/zephyr-7b-beta"\nSTRATEGIC_LLM="huggingface:HuggingFaceH4/zephyr-7b-beta"\n\nEMBEDDING="sentence-transformers/all-MiniLM-L6-v2"\n')),(0,o.yg)("h2",{id:"google-gemini"},"Google Gemini"),(0,o.yg)("p",null,"Sign up ",(0,o.yg)("a",{parentName:"p",href:"https://ai.google.dev/gemini-api/docs/api-key"},"here")," for obtaining a Google Gemini API Key and update the following env vars:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'GOOGLE_API_KEY=[Your key]\nFAST_LLM="google_genai:gemini-1.5-flash"\nSMART_LLM="google_genai:gemini-1.5-pro"\nSTRATEGIC_LLM="google_genai:gemini-1.5-pro"\n\nEMBEDDING="google_genai:models/text-embedding-004"\n')),(0,o.yg)("h2",{id:"google-vertexai"},"Google VertexAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FAST_LLM="google_vertexai:gemini-1.5-flash-001"\nSMART_LLM="google_vertexai:gemini-1.5-pro-001"\nSTRATEGIC_LLM="google_vertexai:gemini-1.5-pro-001"\n\nEMBEDDING="google_vertexai:text-embedding-004"\n')),(0,o.yg)("h2",{id:"cohere"},"Cohere"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'COHERE_API_KEY=[Your key]\nFAST_LLM="cohere:command"\nSMART_LLM="cohere:command-nightly"\nSTRATEGIC_LLM="cohere:command-nightly"\n\nEMBEDDING="cohere:embed-english-v3.0"\n')),(0,o.yg)("h2",{id:"fireworks"},"Fireworks"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FIREWORKS_API_KEY=[Your key]\nbase_url="https://api.fireworks.ai/inference/v1/completions"\nFAST_LLM="fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"\nSMART_LLM="fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"\nSTRATEGIC_LLM="fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"\n\nEMBEDDING="fireworks:nomic-ai/nomic-embed-text-v1.5"\n')),(0,o.yg)("h2",{id:"bedrock"},"Bedrock"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FAST_LLM="bedrock:anthropic.claude-3-sonnet-20240229-v1:0"\nSMART_LLM="bedrock:anthropic.claude-3-sonnet-20240229-v1:0"\nSTRATEGIC_LLM="bedrock:anthropic.claude-3-sonnet-20240229-v1:0"\n')),(0,o.yg)("h2",{id:"xai"},"xAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FAST_LLM="xai:grok-beta"\nSMART_LLM="xai:grok-beta"\nSTRATEGIC_LLM="xai:grok-beta"\n')),(0,o.yg)("h2",{id:"other-embedding-models"},"Other Embedding Models"),(0,o.yg)("h3",{id:"nomic"},"Nomic"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'EMBEDDING="nomic:nomic-embed-text-v1.5"\n')),(0,o.yg)("h3",{id:"voyageai"},"VoyageAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'VOYAGE_API_KEY=[Your Key]\nEMBEDDING="voyageai:voyage-law-2"\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d136d620.af31bb8e.js b/assets/js/d136d620.af31bb8e.js new file mode 100644 index 000000000..add8db792 --- /dev/null +++ b/assets/js/d136d620.af31bb8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3089],{5680:(e,n,a)=>{a.d(n,{xA:()=>s,yg:()=>u});var r=a(6540);function o(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function t(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach((function(n){o(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function i(e,n){if(null==e)return{};var a,r,o=function(e,n){if(null==e)return{};var a,r,o={},t=Object.keys(e);for(r=0;r<t.length;r++)a=t[r],n.indexOf(a)>=0||(o[a]=e[a]);return o}(e,n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(r=0;r<t.length;r++)a=t[r],n.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var p=r.createContext({}),g=function(e){var n=r.useContext(p),a=n;return e&&(a="function"==typeof e?e(n):l(l({},n),e)),a},s=function(e){var n=g(e.components);return r.createElement(p.Provider,{value:n},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var a=e.components,o=e.mdxType,t=e.originalType,p=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),m=g(a),d=o,u=m["".concat(p,".").concat(d)]||m[d]||c[d]||t;return a?r.createElement(u,l(l({ref:n},s),{},{components:a})):r.createElement(u,l({ref:n},s))}));function u(e,n){var a=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var t=a.length,l=new Array(t);l[0]=d;var i={};for(var p in n)hasOwnProperty.call(n,p)&&(i[p]=n[p]);i.originalType=e,i[m]="string"==typeof e?e:o,l[1]=i;for(var g=2;g<t;g++)l[g]=a[g];return r.createElement.apply(null,l)}return r.createElement.apply(null,a)}d.displayName="MDXCreateElement"},5204:(e,n,a)=>{a.r(n),a.d(n,{contentTitle:()=>l,default:()=>m,frontMatter:()=>t,metadata:()=>i,toc:()=>p});var r=a(8168),o=(a(6540),a(5680));const t={},l="Configure LLM",i={unversionedId:"gpt-researcher/llms/llms",id:"gpt-researcher/llms/llms",isDocsHomePage:!1,title:"Configure LLM",description:"As described in the introduction, the default LLM and embedding is OpenAI due to its superior performance and speed.",source:"@site/docs/gpt-researcher/llms/llms.md",sourceDirName:"gpt-researcher/llms",slug:"/gpt-researcher/llms/llms",permalink:"/docs/gpt-researcher/llms/llms",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/llms/llms.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Vector Stores",permalink:"/docs/gpt-researcher/context/vector-stores"},next:{title:"Running with Ollama",permalink:"/docs/gpt-researcher/llms/running-with-ollama"}},p=[{value:"OpenAI",id:"openai",children:[],level:2},{value:"Custom LLM",id:"custom-llm",children:[],level:2},{value:"Azure OpenAI",id:"azure-openai",children:[],level:2},{value:"Ollama",id:"ollama",children:[],level:2},{value:"Groq",id:"groq",children:[{value:"Sign up",id:"sign-up",children:[],level:3},{value:"Update env vars",id:"update-env-vars",children:[],level:3}],level:2},{value:"Anthropic",id:"anthropic",children:[],level:2},{value:"Mistral AI",id:"mistral-ai",children:[],level:2},{value:"Together AI",id:"together-ai",children:[],level:2},{value:"HuggingFace",id:"huggingface",children:[],level:2},{value:"Google Gemini",id:"google-gemini",children:[],level:2},{value:"Google VertexAI",id:"google-vertexai",children:[],level:2},{value:"Cohere",id:"cohere",children:[],level:2},{value:"Fireworks",id:"fireworks",children:[],level:2},{value:"Bedrock",id:"bedrock",children:[],level:2},{value:"xAI",id:"xai",children:[],level:2},{value:"Other Embedding Models",id:"other-embedding-models",children:[{value:"Nomic",id:"nomic",children:[],level:3},{value:"VoyageAI",id:"voyageai",children:[],level:3}],level:2}],g={toc:p},s="wrapper";function m(e){let{components:n,...a}=e;return(0,o.yg)(s,(0,r.A)({},g,a,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"configure-llm"},"Configure LLM"),(0,o.yg)("p",null,"As described in the ",(0,o.yg)("a",{parentName:"p",href:"/docs/gpt-researcher/gptr/config"},"introduction"),", the default LLM and embedding is OpenAI due to its superior performance and speed.\nWith that said, GPT Researcher supports various open/closed source LLMs and embeddings, and you can easily switch between them by updating the ",(0,o.yg)("inlineCode",{parentName:"p"},"SMART_LLM"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"FAST_LLM")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"EMBEDDING")," env variables. You might also need to include the provider API key and corresponding configuration params."),(0,o.yg)("p",null,"Current supported LLMs are ",(0,o.yg)("inlineCode",{parentName:"p"},"openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"anthropic"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"azure_openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"cohere"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_vertexai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_genai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"fireworks"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"ollama"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"together"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"mistralai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"huggingface"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"groq")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"bedrock"),"."),(0,o.yg)("p",null,"Current supported embeddings are ",(0,o.yg)("inlineCode",{parentName:"p"},"openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"azure_openai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"cohere"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_vertexai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"google_genai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"fireworks"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"ollama"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"together"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"mistralai"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"huggingface"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"nomic")," ,",(0,o.yg)("inlineCode",{parentName:"p"},"voyageai")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"bedrock"),"."),(0,o.yg)("p",null,"To learn more about support customization options see ",(0,o.yg)("a",{parentName:"p",href:"/gpt-researcher/config"},"here"),"."),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Please note"),": GPT Researcher is optimized and heavily tested on GPT models. Some other models might run into context limit errors, and unexpected responses.\nPlease provide any feedback in our ",(0,o.yg)("a",{parentName:"p",href:"https://discord.gg/DUmbTebB"},"Discord community")," channel, so we can better improve the experience and performance."),(0,o.yg)("p",null,"Below you can find examples for how to configure the various supported LLMs."),(0,o.yg)("h2",{id:"openai"},"OpenAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'# set the custom OpenAI API key\nOPENAI_API_KEY=[Your Key]\n\n# specify llms\nFAST_LLM="openai:gpt-4o-mini"\nSMART_LLM="openai:gpt-4o"\nSTRATEGIC_LLM="openai:o1-preview"\n\n# specify embedding\nEMBEDDING="openai:text-embedding-3-small"\n')),(0,o.yg)("h2",{id:"custom-llm"},"Custom LLM"),(0,o.yg)("p",null,"Create a local OpenAI API using ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md#quick-start"},"llama.cpp Server"),"."),(0,o.yg)("p",null,'For custom LLM, specify "openai:{your-llm}"'),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'# set the custom OpenAI API url\nOPENAI_BASE_URL="http://localhost:1234/v1"\n# set the custom OpenAI API key\nOPENAI_API_KEY="dummy_key"\n\n# specify custom llms \nFAST_LLM="openai:your_fast_llm"\nSMART_LLM="openai:your_smart_llm"\nSTRATEGIC_LLM="openai:your_strategic_llm"\n')),(0,o.yg)("p",null,'For custom embedding, set "custom:{your-embedding}"'),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'# set the custom OpenAI API url\nOPENAI_BASE_URL="http://localhost:1234/v1"\n# set the custom OpenAI API key\nOPENAI_API_KEY="dummy_key"\n\n# specify the custom embedding model \nEMBEDDING="custom:your_embedding"\n')),(0,o.yg)("h2",{id:"azure-openai"},"Azure OpenAI"),(0,o.yg)("p",null,"See also the documentation in the Langchain ",(0,o.yg)("a",{parentName:"p",href:"https://api.python.langchain.com/en/latest/chat_models/langchain_openai.chat_models.azure.AzureChatOpenAI.html"},"Azure OpenAI")," page."),(0,o.yg)("p",null,"On Azure OpenAI you will need to create deployments for each model you want to use. Please also specify the model names/deployment names in your ",(0,o.yg)("inlineCode",{parentName:"p"},".env")," file:"),(0,o.yg)("p",null,"Required Embedding Model:\nTo ensure optimal performance, GPT Researcher requires the text-embedding-3-large model. Please deploy this specific model to your Azure Endpoint."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"AZURE_OPENAI_API_KEY=[Your Key]\nAZURE_OPENAI_ENDPOINT=https://{your-endpoint}.openai.azure.com/\nOPENAI_API_VERSION=2024-05-01-preview\n\n# note that the deployment name must be the same as the model name\nFAST_LLM=azure_openai:gpt-4o-mini \nSMART_LLM=azure_openai:gpt-4o\nSTRATEGIC_LLM=azure_openai:o1-preview\n\n\n")),(0,o.yg)("h2",{id:"ollama"},"Ollama"),(0,o.yg)("p",null,"GPT Researcher supports both Ollama LLMs and embeddings. You can choose each or both.\nTo use ",(0,o.yg)("a",{parentName:"p",href:"http://www.ollama.com"},"Ollama")," you can set the following environment variables"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'OLLAMA_BASE_URL=http://localhost:11434\nFAST_LLM="ollama:llama3"\nSMART_LLM="ollama:llama3"\nSTRATEGIC_LLM="ollama:llama3"\n\nEMBEDDING="ollama:nomic-embed-text"\n')),(0,o.yg)("h2",{id:"groq"},"Groq"),(0,o.yg)("p",null,"GroqCloud provides advanced AI hardware and software solutions designed to deliver amazingly fast AI inference performance.\nTo leverage Groq in GPT-Researcher, you will need a GroqCloud account and an API Key. (",(0,o.yg)("strong",{parentName:"p"},"NOTE:")," Groq has a very ",(0,o.yg)("em",{parentName:"p"},"generous free tier"),".)"),(0,o.yg)("h3",{id:"sign-up"},"Sign up"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"You can signup here: ",(0,o.yg)("a",{parentName:"p",href:"https://console.groq.com/login"},"https://console.groq.com/login"))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Once you are logged in, you can get an API Key here: ",(0,o.yg)("a",{parentName:"p",href:"https://console.groq.com/keys"},"https://console.groq.com/keys"))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Once you have an API key, you will need to add it to your ",(0,o.yg)("inlineCode",{parentName:"p"},"systems environment")," using the variable name:\n",(0,o.yg)("inlineCode",{parentName:"p"},'GROQ_API_KEY="*********************"')))),(0,o.yg)("h3",{id:"update-env-vars"},"Update env vars"),(0,o.yg)("p",null,"And finally, you will need to configure the GPT-Researcher Provider and Model variables:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'GROQ_API_KEY=[Your Key]\n\n# Set one of the LLM models supported by Groq\nFAST_LLM="groq:Mixtral-8x7b-32768"\nSMART_LLM="groq:Mixtral-8x7b-32768"\nSTRATEGIC_LLM="groq:Mixtral-8x7b-32768"\n')),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"NOTE:")," As of the writing of this Doc (May 2024), the available Language Models from Groq are:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"Llama3-70b-8192"),(0,o.yg)("li",{parentName:"ul"},"Llama3-8b-8192"),(0,o.yg)("li",{parentName:"ul"},"Mixtral-8x7b-32768"),(0,o.yg)("li",{parentName:"ul"},"Gemma-7b-it")),(0,o.yg)("h2",{id:"anthropic"},"Anthropic"),(0,o.yg)("p",null,"Refer to Anthropic ",(0,o.yg)("a",{parentName:"p",href:"https://docs.anthropic.com/en/api/getting-started"},"Getting started page")," to obtain Anthropic API key. Update the corresponding env vars, for example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'ANTHROPIC_API_KEY=[Your key]\nFAST_LLM="anthropic:claude-2.1"\nSMART_LLM="anthropic:claude-3-opus-20240229"\nSTRATEGIC_LLM="anthropic:claude-3-opus-20240229"\n')),(0,o.yg)("p",null,"Anthropic does not offer its own embedding model. "),(0,o.yg)("h2",{id:"mistral-ai"},"Mistral AI"),(0,o.yg)("p",null,"Sign up for a ",(0,o.yg)("a",{parentName:"p",href:"https://console.mistral.ai/users/api-keys/"},"Mistral API key"),".\nThen update the corresponding env vars, for example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'MISTRAL_API_KEY=[Your key]\nFAST_LLM="mistralai:open-mistral-7b"\nSMART_LLM="mistralai:mistral-large-latest"\nSTRATEGIC_LLM="mistralai:mistral-large-latest"\n\nEMBEDDING="mistralai:mistral-embed"\n')),(0,o.yg)("h2",{id:"together-ai"},"Together AI"),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"https://www.together.ai/"},"Together AI")," offers an API to query ",(0,o.yg)("a",{parentName:"p",href:"https://docs.together.ai/docs/inference-models"},"50+ leading open-source models")," in a couple lines of code.\nThen update corresponding env vars, for example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'TOGETHER_API_KEY=[Your key]\nFAST_LLM="together:meta-llama/Llama-3-8b-chat-hf"\nSMART_LLM="together:meta-llama/Llama-3-70b-chat-hf"\nSTRATEGIC_LLM="together:meta-llama/Llama-3-70b-chat-hf"\n\nEMBEDDING="mistralai:nomic-ai/nomic-embed-text-v1.5"\n')),(0,o.yg)("h2",{id:"huggingface"},"HuggingFace"),(0,o.yg)("p",null,"This integration requires a bit of extra work. Follow ",(0,o.yg)("a",{parentName:"p",href:"https://python.langchain.com/v0.1/docs/integrations/chat/huggingface/"},"this guide")," to learn more.\nAfter you've followed the tutorial above, update the env vars:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'HUGGINGFACE_API_KEY=[Your key]\nFAST_LLM="huggingface:HuggingFaceH4/zephyr-7b-beta"\nSMART_LLM="huggingface:HuggingFaceH4/zephyr-7b-beta"\nSTRATEGIC_LLM="huggingface:HuggingFaceH4/zephyr-7b-beta"\n\nEMBEDDING="sentence-transformers/all-MiniLM-L6-v2"\n')),(0,o.yg)("h2",{id:"google-gemini"},"Google Gemini"),(0,o.yg)("p",null,"Sign up ",(0,o.yg)("a",{parentName:"p",href:"https://ai.google.dev/gemini-api/docs/api-key"},"here")," for obtaining a Google Gemini API Key and update the following env vars:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'GOOGLE_API_KEY=[Your key]\nFAST_LLM="google_genai:gemini-1.5-flash"\nSMART_LLM="google_genai:gemini-1.5-pro"\nSTRATEGIC_LLM="google_genai:gemini-1.5-pro"\n\nEMBEDDING="google_genai:models/text-embedding-004"\n')),(0,o.yg)("h2",{id:"google-vertexai"},"Google VertexAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FAST_LLM="google_vertexai:gemini-1.5-flash-001"\nSMART_LLM="google_vertexai:gemini-1.5-pro-001"\nSTRATEGIC_LLM="google_vertexai:gemini-1.5-pro-001"\n\nEMBEDDING="google_vertexai:text-embedding-004"\n')),(0,o.yg)("h2",{id:"cohere"},"Cohere"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'COHERE_API_KEY=[Your key]\nFAST_LLM="cohere:command"\nSMART_LLM="cohere:command-nightly"\nSTRATEGIC_LLM="cohere:command-nightly"\n\nEMBEDDING="cohere:embed-english-v3.0"\n')),(0,o.yg)("h2",{id:"fireworks"},"Fireworks"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FIREWORKS_API_KEY=[Your key]\nbase_url="https://api.fireworks.ai/inference/v1/completions"\nFAST_LLM="fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"\nSMART_LLM="fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"\nSTRATEGIC_LLM="fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"\n\nEMBEDDING="fireworks:nomic-ai/nomic-embed-text-v1.5"\n')),(0,o.yg)("h2",{id:"bedrock"},"Bedrock"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FAST_LLM="bedrock:anthropic.claude-3-sonnet-20240229-v1:0"\nSMART_LLM="bedrock:anthropic.claude-3-sonnet-20240229-v1:0"\nSTRATEGIC_LLM="bedrock:anthropic.claude-3-sonnet-20240229-v1:0"\n\nEMBEDDING="bedrock:amazon.titan-embed-text-v2:0"\n')),(0,o.yg)("h2",{id:"xai"},"xAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'FAST_LLM="xai:grok-beta"\nSMART_LLM="xai:grok-beta"\nSTRATEGIC_LLM="xai:grok-beta"\n')),(0,o.yg)("h2",{id:"other-embedding-models"},"Other Embedding Models"),(0,o.yg)("h3",{id:"nomic"},"Nomic"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'EMBEDDING="nomic:nomic-embed-text-v1.5"\n')),(0,o.yg)("h3",{id:"voyageai"},"VoyageAI"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'VOYAGE_API_KEY=[Your Key]\nEMBEDDING="voyageai:voyage-law-2"\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d52b8f97.4f9ad648.js b/assets/js/d52b8f97.4f9ad648.js new file mode 100644 index 000000000..61ff3a3cb --- /dev/null +++ b/assets/js/d52b8f97.4f9ad648.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2976],{5680:(e,r,t)=>{t.d(r,{xA:()=>l,yg:()=>m});var n=t(6540);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<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){o(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=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):c(c({},r),e)),t},l=function(e){var r=p(e.components);return n.createElement(i.Provider,{value:r},e.children)},u="mdxType",h={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=s(e,["components","mdxType","originalType","parentName"]),u=p(t),d=o,m=u["".concat(i,".").concat(d)]||u[d]||h[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 s={};for(var i in r)hasOwnProperty.call(r,i)&&(s[i]=r[i]);s.originalType=e,s[u]="string"==typeof e?e:o,c[1]=s;for(var p=2;p<a;p++)c[p]=t[p];return n.createElement.apply(null,c)}return n.createElement.apply(null,t)}d.displayName="MDXCreateElement"},7225:(e,r,t)=>{t.r(r),t.d(r,{contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>i});var n=t(8168),o=(t(6540),t(5680));const a={},c="Tailored Research",s={unversionedId:"gpt-researcher/context/tailored-research",id:"gpt-researcher/context/tailored-research",isDocsHomePage:!1,title:"Tailored Research",description:"The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted.",source:"@site/docs/gpt-researcher/context/tailored-research.md",sourceDirName:"gpt-researcher/context",slug:"/gpt-researcher/context/tailored-research",permalink:"/docs/gpt-researcher/context/tailored-research",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/tailored-research.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Log Files",permalink:"/docs/gpt-researcher/frontend/logs"},next:{title:"Research on Local Documents",permalink:"/docs/gpt-researcher/context/local-docs"}},i=[{value:"Research on Specific Sources \ud83d\udcda",id:"research-on-specific-sources-",children:[],level:3},{value:"Specify Agent Prompt \ud83d\udcdd",id:"specify-agent-prompt-",children:[],level:3},{value:"Research on Local Documents \ud83d\udcc4",id:"research-on-local-documents-",children:[],level:3},{value:"Hybrid Research \ud83d\udd04",id:"hybrid-research-",children:[],level:3},{value:"Research on LangChain Documents \ud83e\udd9c\ufe0f\ud83d\udd17",id:"research-on-langchain-documents-\ufe0f",children:[],level:3}],p={toc:i},l="wrapper";function u(e){let{components:r,...t}=e;return(0,o.yg)(l,(0,n.A)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"tailored-research"},"Tailored Research"),(0,o.yg)("p",null,"The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted."),(0,o.yg)("h3",{id:"research-on-specific-sources-"},"Research on Specific Sources \ud83d\udcda"),(0,o.yg)("p",null,"You can specify the sources you want the GPT Researcher to research on by providing a list of URLs. The GPT Researcher will then conduct research on the provided sources via ",(0,o.yg)("inlineCode",{parentName:"p"},"source_urls"),". "),(0,o.yg)("p",null,"If you want GPT Researcher to perform additional research outside of the URLs you provided, i.e., conduct research on various other websites that it finds suitable for the query/sub-query, you can set the parameter ",(0,o.yg)("inlineCode",{parentName:"p"},"complement_source_urls")," as ",(0,o.yg)("inlineCode",{parentName:"p"},"True"),". Default value of ",(0,o.yg)("inlineCode",{parentName:"p"},"False")," will only scour the websites you provide via ",(0,o.yg)("inlineCode",{parentName:"p"},"source_urls"),"."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_report(query: str, report_type: str, sources: list) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, source_urls=sources, complement_source_urls=False)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "What are the biggest trends in AI lately?"\n report_source = "static"\n sources = [\n "https://en.wikipedia.org/wiki/Artificial_intelligence",\n "https://www.ibm.com/think/insights/artificial-intelligence-trends",\n "https://www.forbes.com/advisor/business/ai-statistics"\n ]\n report = asyncio.run(get_report(query=query, report_source=report_source, sources=sources))\n print(report)\n')),(0,o.yg)("h3",{id:"specify-agent-prompt-"},"Specify Agent Prompt \ud83d\udcdd"),(0,o.yg)("p",null,"You can specify the agent prompt instruction upon which the research is conducted. This allows you to guide the research in a specific direction and tailor the report layout.\nSimply pass the prompt as the ",(0,o.yg)("inlineCode",{parentName:"p"},"query")," argument to the ",(0,o.yg)("inlineCode",{parentName:"p"},"GPTResearcher"),' class and the "custom_report" ',(0,o.yg)("inlineCode",{parentName:"p"},"report_type"),"."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_report(prompt: str, report_type: str) -> str:\n researcher = GPTResearcher(query=prompt, report_type=report_type)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n \nif __name__ == "__main__":\n report_type = "custom_report"\n prompt = "Research the latest advancements in AI and provide a detailed report in APA format including sources."\n\n report = asyncio.run(get_report(prompt=prompt, report_type=report_type))\n print(report)\n')),(0,o.yg)("h3",{id:"research-on-local-documents-"},"Research on Local Documents \ud83d\udcc4"),(0,o.yg)("p",null,"You can instruct the GPT Researcher to research on local documents by providing the path to those documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents."),(0,o.yg)("p",null,(0,o.yg)("em",{parentName:"p"},"Step 1"),": Add the env variable ",(0,o.yg)("inlineCode",{parentName:"p"},"DOC_PATH")," pointing to the folder where your documents are located."),(0,o.yg)("p",null,"For example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'export DOC_PATH="./my-docs"\n')),(0,o.yg)("p",null,(0,o.yg)("em",{parentName:"p"},"Step 2"),": When you create an instance of the ",(0,o.yg)("inlineCode",{parentName:"p"},"GPTResearcher")," class, pass the ",(0,o.yg)("inlineCode",{parentName:"p"},"report_source")," argument as ",(0,o.yg)("inlineCode",{parentName:"p"},'"local"'),"."),(0,o.yg)("p",null,"GPT Researcher will then conduct research on the provided documents."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_report(query: str, report_source: str) -> str:\n researcher = GPTResearcher(query=query, report_source=report_source)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n \nif __name__ == "__main__":\n query = "What can you tell me about myself based on my documents?"\n report_source = "local" # "local" or "web"\n\n report = asyncio.run(get_report(query=query, report_source=report_source))\n print(report)\n')),(0,o.yg)("h3",{id:"hybrid-research-"},"Hybrid Research \ud83d\udd04"),(0,o.yg)("p",null,"You can combine the above methods to conduct hybrid research. For example, you can instruct the GPT Researcher to research on both web sources and local documents.\nSimply provide the sources and set the ",(0,o.yg)("inlineCode",{parentName:"p"},"report_source")," argument as ",(0,o.yg)("inlineCode",{parentName:"p"},'"hybrid"')," and watch the magic happen."),(0,o.yg)("p",null,"Please note! You should set the proper retrievers for the web sources and doc path for local documents for this to work.\nTo learn more about retrievers check out the ",(0,o.yg)("a",{parentName:"p",href:"https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers"},"Retrievers")," documentation."),(0,o.yg)("h3",{id:"research-on-langchain-documents-\ufe0f"},"Research on LangChain Documents \ud83e\udd9c\ufe0f\ud83d\udd17"),(0,o.yg)("p",null,"You can instruct the GPT Researcher to research on a list of langchain document instances."),(0,o.yg)("p",null,"For example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from langchain_core.documents import Document\nfrom typing import List, Dict\nfrom gpt_researcher import GPTResearcher\nfrom langchain_postgres.vectorstores import PGVector\nfrom langchain_openai import OpenAIEmbeddings\nfrom sqlalchemy import create_engine\nimport asyncio\n\n\n\nCONNECTION_STRING = \'postgresql://someuser:somepass@localhost:5432/somedatabase\'\n\ndef get_retriever(collection_name: str, search_kwargs: Dict[str, str]):\n engine = create_engine(CONNECTION_STRING)\n embeddings = OpenAIEmbeddings()\n\n index = PGVector.from_existing_index(\n use_jsonb=True,\n embedding=embeddings,\n collection_name=collection_name,\n connection=engine,\n )\n\n return index.as_retriever(search_kwargs=search_kwargs)\n\n\nasync def get_report(query: str, report_type: str, report_source: str, documents: List[Document]) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source, documents=documents)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "What can you tell me about blue cheese based on my documents?"\n report_type = "research_report"\n report_source = "langchain_documents"\n\n # using a LangChain retriever to get all the documents regarding cheese\n # https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html#langchain_core.retrievers.BaseRetriever.invoke\n langchain_retriever = get_retriever("cheese_collection", { "k": 3 })\n documents = langchain_retriever.invoke("All the documents about cheese")\n report = asyncio.run(get_report(query=query, report_type=report_type, report_source=report_source, documents=documents))\n print(report)\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d52b8f97.690abada.js b/assets/js/d52b8f97.690abada.js deleted file mode 100644 index c30154aa2..000000000 --- a/assets/js/d52b8f97.690abada.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2976],{5680:(e,r,t)=>{t.d(r,{xA:()=>l,yg:()=>m});var n=t(6540);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<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){o(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=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):c(c({},r),e)),t},l=function(e){var r=p(e.components);return n.createElement(i.Provider,{value:r},e.children)},u="mdxType",h={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=s(e,["components","mdxType","originalType","parentName"]),u=p(t),d=o,m=u["".concat(i,".").concat(d)]||u[d]||h[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 s={};for(var i in r)hasOwnProperty.call(r,i)&&(s[i]=r[i]);s.originalType=e,s[u]="string"==typeof e?e:o,c[1]=s;for(var p=2;p<a;p++)c[p]=t[p];return n.createElement.apply(null,c)}return n.createElement.apply(null,t)}d.displayName="MDXCreateElement"},7225:(e,r,t)=>{t.r(r),t.d(r,{contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>i});var n=t(8168),o=(t(6540),t(5680));const a={},c="Tailored Research",s={unversionedId:"gpt-researcher/context/tailored-research",id:"gpt-researcher/context/tailored-research",isDocsHomePage:!1,title:"Tailored Research",description:"The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted.",source:"@site/docs/gpt-researcher/context/tailored-research.md",sourceDirName:"gpt-researcher/context",slug:"/gpt-researcher/context/tailored-research",permalink:"/docs/gpt-researcher/context/tailored-research",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/tailored-research.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Playing with Webhooks",permalink:"/docs/gpt-researcher/frontend/playing-with-webhooks"},next:{title:"Research on Local Documents",permalink:"/docs/gpt-researcher/context/local-docs"}},i=[{value:"Research on Specific Sources \ud83d\udcda",id:"research-on-specific-sources-",children:[],level:3},{value:"Specify Agent Prompt \ud83d\udcdd",id:"specify-agent-prompt-",children:[],level:3},{value:"Research on Local Documents \ud83d\udcc4",id:"research-on-local-documents-",children:[],level:3},{value:"Hybrid Research \ud83d\udd04",id:"hybrid-research-",children:[],level:3},{value:"Research on LangChain Documents \ud83e\udd9c\ufe0f\ud83d\udd17",id:"research-on-langchain-documents-\ufe0f",children:[],level:3}],p={toc:i},l="wrapper";function u(e){let{components:r,...t}=e;return(0,o.yg)(l,(0,n.A)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"tailored-research"},"Tailored Research"),(0,o.yg)("p",null,"The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted."),(0,o.yg)("h3",{id:"research-on-specific-sources-"},"Research on Specific Sources \ud83d\udcda"),(0,o.yg)("p",null,"You can specify the sources you want the GPT Researcher to research on by providing a list of URLs. The GPT Researcher will then conduct research on the provided sources via ",(0,o.yg)("inlineCode",{parentName:"p"},"source_urls"),". "),(0,o.yg)("p",null,"If you want GPT Researcher to perform additional research outside of the URLs you provided, i.e., conduct research on various other websites that it finds suitable for the query/sub-query, you can set the parameter ",(0,o.yg)("inlineCode",{parentName:"p"},"complement_source_urls")," as ",(0,o.yg)("inlineCode",{parentName:"p"},"True"),". Default value of ",(0,o.yg)("inlineCode",{parentName:"p"},"False")," will only scour the websites you provide via ",(0,o.yg)("inlineCode",{parentName:"p"},"source_urls"),"."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_report(query: str, report_type: str, sources: list) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, source_urls=sources, complement_source_urls=False)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "What are the biggest trends in AI lately?"\n report_source = "static"\n sources = [\n "https://en.wikipedia.org/wiki/Artificial_intelligence",\n "https://www.ibm.com/think/insights/artificial-intelligence-trends",\n "https://www.forbes.com/advisor/business/ai-statistics"\n ]\n report = asyncio.run(get_report(query=query, report_source=report_source, sources=sources))\n print(report)\n')),(0,o.yg)("h3",{id:"specify-agent-prompt-"},"Specify Agent Prompt \ud83d\udcdd"),(0,o.yg)("p",null,"You can specify the agent prompt instruction upon which the research is conducted. This allows you to guide the research in a specific direction and tailor the report layout.\nSimply pass the prompt as the ",(0,o.yg)("inlineCode",{parentName:"p"},"query")," argument to the ",(0,o.yg)("inlineCode",{parentName:"p"},"GPTResearcher"),' class and the "custom_report" ',(0,o.yg)("inlineCode",{parentName:"p"},"report_type"),"."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_report(prompt: str, report_type: str) -> str:\n researcher = GPTResearcher(query=prompt, report_type=report_type)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n \nif __name__ == "__main__":\n report_type = "custom_report"\n prompt = "Research the latest advancements in AI and provide a detailed report in APA format including sources."\n\n report = asyncio.run(get_report(prompt=prompt, report_type=report_type))\n print(report)\n')),(0,o.yg)("h3",{id:"research-on-local-documents-"},"Research on Local Documents \ud83d\udcc4"),(0,o.yg)("p",null,"You can instruct the GPT Researcher to research on local documents by providing the path to those documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents."),(0,o.yg)("p",null,(0,o.yg)("em",{parentName:"p"},"Step 1"),": Add the env variable ",(0,o.yg)("inlineCode",{parentName:"p"},"DOC_PATH")," pointing to the folder where your documents are located."),(0,o.yg)("p",null,"For example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'export DOC_PATH="./my-docs"\n')),(0,o.yg)("p",null,(0,o.yg)("em",{parentName:"p"},"Step 2"),": When you create an instance of the ",(0,o.yg)("inlineCode",{parentName:"p"},"GPTResearcher")," class, pass the ",(0,o.yg)("inlineCode",{parentName:"p"},"report_source")," argument as ",(0,o.yg)("inlineCode",{parentName:"p"},'"local"'),"."),(0,o.yg)("p",null,"GPT Researcher will then conduct research on the provided documents."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from gpt_researcher import GPTResearcher\nimport asyncio\n\nasync def get_report(query: str, report_source: str) -> str:\n researcher = GPTResearcher(query=query, report_source=report_source)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n \nif __name__ == "__main__":\n query = "What can you tell me about myself based on my documents?"\n report_source = "local" # "local" or "web"\n\n report = asyncio.run(get_report(query=query, report_source=report_source))\n print(report)\n')),(0,o.yg)("h3",{id:"hybrid-research-"},"Hybrid Research \ud83d\udd04"),(0,o.yg)("p",null,"You can combine the above methods to conduct hybrid research. For example, you can instruct the GPT Researcher to research on both web sources and local documents.\nSimply provide the sources and set the ",(0,o.yg)("inlineCode",{parentName:"p"},"report_source")," argument as ",(0,o.yg)("inlineCode",{parentName:"p"},'"hybrid"')," and watch the magic happen."),(0,o.yg)("p",null,"Please note! You should set the proper retrievers for the web sources and doc path for local documents for this to work.\nTo learn more about retrievers check out the ",(0,o.yg)("a",{parentName:"p",href:"https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers"},"Retrievers")," documentation."),(0,o.yg)("h3",{id:"research-on-langchain-documents-\ufe0f"},"Research on LangChain Documents \ud83e\udd9c\ufe0f\ud83d\udd17"),(0,o.yg)("p",null,"You can instruct the GPT Researcher to research on a list of langchain document instances."),(0,o.yg)("p",null,"For example:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-python"},'from langchain_core.documents import Document\nfrom typing import List, Dict\nfrom gpt_researcher import GPTResearcher\nfrom langchain_postgres.vectorstores import PGVector\nfrom langchain_openai import OpenAIEmbeddings\nfrom sqlalchemy import create_engine\nimport asyncio\n\n\n\nCONNECTION_STRING = \'postgresql://someuser:somepass@localhost:5432/somedatabase\'\n\ndef get_retriever(collection_name: str, search_kwargs: Dict[str, str]):\n engine = create_engine(CONNECTION_STRING)\n embeddings = OpenAIEmbeddings()\n\n index = PGVector.from_existing_index(\n use_jsonb=True,\n embedding=embeddings,\n collection_name=collection_name,\n connection=engine,\n )\n\n return index.as_retriever(search_kwargs=search_kwargs)\n\n\nasync def get_report(query: str, report_type: str, report_source: str, documents: List[Document]) -> str:\n researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source, documents=documents)\n await researcher.conduct_research()\n report = await researcher.write_report()\n return report\n\nif __name__ == "__main__":\n query = "What can you tell me about blue cheese based on my documents?"\n report_type = "research_report"\n report_source = "langchain_documents"\n\n # using a LangChain retriever to get all the documents regarding cheese\n # https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html#langchain_core.retrievers.BaseRetriever.invoke\n langchain_retriever = get_retriever("cheese_collection", { "k": 3 })\n documents = langchain_retriever.invoke("All the documents about cheese")\n report = asyncio.run(get_report(query=query, report_type=report_type, report_source=report_source, documents=documents))\n print(report)\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.6953f0b6.js b/assets/js/main.6953f0b6.js deleted file mode 100644 index 66d7f68b4..000000000 --- a/assets/js/main.6953f0b6.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.6953f0b6.js.LICENSE.txt */ -(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8792],{5091:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"GPT Researcher",tagline:"The leading autonomous AI research agent",url:"https://docs.gptr.dev",baseUrl:"/",onBrokenLinks:"ignore",onBrokenMarkdownLinks:"warn",favicon:"img/gptr-logo.png",organizationName:"assafelovic",trailingSlash:!1,projectName:"gpt-researcher",themeConfig:{navbar:{title:"GPT Researcher",logo:{alt:"GPT Researcher",src:"img/gptr-logo.png"},items:[{type:"doc",docId:"welcome",position:"left",label:"Docs"},{to:"blog",label:"Blog",position:"left"},{type:"doc",docId:"faq",position:"left",label:"FAQ"},{href:"mailto:assaf.elovic@gmail.com",position:"left",label:"Contact"},{href:"https://github.com/assafelovic/gpt-researcher",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Community",items:[{label:"Discord",href:"https://discord.gg/8YkBcCED5y"},{label:"Twitter",href:"https://twitter.com/assaf_elovic"},{label:"LinkedIn",href:"https://www.linkedin.com/in/assafe/"}]},{title:"Company",items:[{label:"Homepage",href:"https://gptr.dev"},{label:"Contact",href:"mailto:assafelovic@gmail.com"}]}],copyright:"Copyright \xa9 2024 GPT Researcher."},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1,switchConfig:{darkIcon:"\ud83c\udf1c",darkIconStyle:{},lightIcon:"\ud83c\udf1e",lightIconStyle:{}}},docs:{versionPersistence:"localStorage"},metadata:[],prism:{additionalLanguages:[]},hideableSidebar:!1,tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},presets:[["@docusaurus/preset-classic",{docs:{sidebarPath:"/Users/assafelovic/Sites/gpt-researcher/docs/sidebars.js",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs",remarkPlugins:[null],rehypePlugins:[null]},theme:{customCss:"/Users/assafelovic/Sites/gpt-researcher/docs/src/css/custom.css"}}]],stylesheets:[{href:"https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css",integrity:"sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc",crossorigin:"anonymous"}],plugins:[["/Users/assafelovic/Sites/gpt-researcher/docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/index.js",{hashed:!0,blogDir:"./blog/"}]],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",locales:["en"],localeConfigs:{}},onDuplicateRoutes:"warn",customFields:{},themes:[],titleDelimiter:"|",noIndex:!1}},9516:(e,t,n)=>{"use strict";var r=n(6540),a=n(961),o=n(4625),i=n(3259),l=n.n(i);const s=e=>{let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{align:"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,t.message),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},c=JSON.parse('{"/blog-f4c":{"component":"a6aa9e1f","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"},{"content":"1527b239"},{"content":"c7d22e29"}],"metadata":"b2b675dd"},"/blog/archive-f4c":{"component":"9e4087bc","archive":"b2f554cd"},"/blog/building-gpt-researcher-dcf":{"component":"ccc49370","sidebar":"814f3328","content":"6222f147"},"/blog/building-openai-assistant-7ba":{"component":"ccc49370","sidebar":"814f3328","content":"d3f86d34"},"/blog/gptr-hybrid-c62":{"component":"ccc49370","sidebar":"814f3328","content":"777ab133"},"/blog/gptr-langgraph-437":{"component":"ccc49370","sidebar":"814f3328","content":"5986bbbc"},"/blog/tags-e13":{"component":"01a85c17","sidebar":"814f3328","tags":"a7023ddc"},"/blog/tags/assistant-api-3c8":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"1527b239"}],"metadata":"9bc9a8f7"},"/blog/tags/autonomous-agent-093":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"c7d22e29"}],"metadata":"33e7285c"},"/blog/tags/github-e38":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"c7d22e29"}],"metadata":"78060cbc"},"/blog/tags/gpt-researcher-941":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"},{"content":"c7d22e29"}],"metadata":"667a64de"},"/blog/tags/hybrid-research-8a3":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"}],"metadata":"57fdb5e0"},"/blog/tags/langchain-97e":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"}],"metadata":"bcd3bfb0"},"/blog/tags/langgraph-932":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"}],"metadata":"5f72c304"},"/blog/tags/multi-skills-16a":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"03136cca"}],"metadata":"86f86571"},"/blog/tags/openai-4e6":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"1527b239"}],"metadata":"415f4636"},"/blog/tags/opensource-43b":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"c7d22e29"}],"metadata":"f3eeb784"},"/blog/tags/search-api-cd3":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"1527b239"}],"metadata":"6081ee74"},"/blog/tags/tavily-d67":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"1527b239"}],"metadata":"d1355481"},"/search-79a":{"component":"1a4e3797"},"/docs-d6b":{"component":"1be78505","versionMetadata":"935f2afb"},"/docs/contribute-e6a":{"component":"17896441","content":"4ba7e5a3"},"/docs/examples/detailed_report-c1a":{"component":"17896441","content":"2700a261"},"/docs/examples/examples-8df":{"component":"17896441","content":"c6694585"},"/docs/examples/hybrid_research-16b":{"component":"17896441","content":"ad8d4462"},"/docs/faq-76c":{"component":"17896441","content":"0480b142"},"/docs/gpt-researcher/context/filtering-by-domain-2ab":{"component":"17896441","content":"167e38bb"},"/docs/gpt-researcher/context/local-docs-59a":{"component":"17896441","content":"4d63772d"},"/docs/gpt-researcher/context/tailored-research-1db":{"component":"17896441","content":"d52b8f97"},"/docs/gpt-researcher/context/vector-stores-b43":{"component":"17896441","content":"4f74abd9"},"/docs/gpt-researcher/frontend/frontend-15e":{"component":"17896441","content":"87b2d671"},"/docs/gpt-researcher/frontend/playing-with-webhooks-07d":{"component":"17896441","content":"55be4921"},"/docs/gpt-researcher/getting-started/cli-917":{"component":"17896441","content":"bce7c409"},"/docs/gpt-researcher/getting-started/getting-started-82c":{"component":"17896441","content":"a9cdb420"},"/docs/gpt-researcher/getting-started/getting-started-with-docker-000":{"component":"17896441","content":"5b527261"},"/docs/gpt-researcher/getting-started/how-to-choose-6ed":{"component":"17896441","content":"845acc88"},"/docs/gpt-researcher/getting-started/introduction-079":{"component":"17896441","content":"5497f083"},"/docs/gpt-researcher/getting-started/linux-deployment-970":{"component":"17896441","content":"5dbe55ec"},"/docs/gpt-researcher/gptr/automated-tests-68e":{"component":"17896441","content":"dc7438fe"},"/docs/gpt-researcher/gptr/config-059":{"component":"17896441","content":"82b8edaf"},"/docs/gpt-researcher/gptr/example-b9b":{"component":"17896441","content":"b94bec88"},"/docs/gpt-researcher/gptr/handling-logs-as-they-stream-ac0":{"component":"17896441","content":"6410037f"},"/docs/gpt-researcher/gptr/pip-package-332":{"component":"17896441","content":"80f133ef"},"/docs/gpt-researcher/gptr/querying-the-backend-a32":{"component":"17896441","content":"f17f44a5"},"/docs/gpt-researcher/gptr/scraping-ab5":{"component":"17896441","content":"22f692c8"},"/docs/gpt-researcher/gptr/troubleshooting-b8f":{"component":"17896441","content":"5f72931d"},"/docs/gpt-researcher/llms/llms-0a2":{"component":"17896441","content":"d136d620"},"/docs/gpt-researcher/llms/running-with-ollama-4eb":{"component":"17896441","content":"25e02a64"},"/docs/gpt-researcher/llms/testing-your-llm-493":{"component":"17896441","content":"5de085db"},"/docs/gpt-researcher/multi_agents/langgraph-d54":{"component":"17896441","content":"9f68de09"},"/docs/gpt-researcher/search-engines/retrievers-47a":{"component":"17896441","content":"6a8455ba"},"/docs/gpt-researcher/search-engines/test-your-retriever-e89":{"component":"17896441","content":"7af93ffd"},"/docs/reference/config/config-212":{"component":"17896441","content":"44b7ef8d"},"/docs/reference/config/singleton-beb":{"component":"17896441","content":"b205135c"},"/docs/reference/processing/html-919":{"component":"17896441","content":"ae92dbda"},"/docs/reference/processing/text-d18":{"component":"17896441","content":"de289047"},"/docs/roadmap-e16":{"component":"17896441","content":"0dffb83e"},"/docs/welcome-177":{"component":"17896441","content":"ebfee794"},"/-deb":{"component":"c4f5d8e4","config":"5e9f5e1a"}}'),u={"01a85c17":[()=>Promise.all([n.e(1869),n.e(8209)]).then(n.bind(n,7867)),"@theme/BlogTagsListPage",7867],"03136cca":[()=>n.e(4093).then(n.bind(n,8724)),"@site/blog/2024-05-19-gptr-langgraph/index.md?truncated=true",8724],"0480b142":[()=>n.e(8070).then(n.bind(n,842)),"@site/docs/faq.md",842],"0dffb83e":[()=>n.e(821).then(n.bind(n,5146)),"@site/docs/roadmap.md",5146],"1527b239":[()=>n.e(8256).then(n.bind(n,4890)),"@site/blog/2023-11-12-openai-assistant/index.md?truncated=true",4890],"167e38bb":[()=>n.e(9195).then(n.bind(n,714)),"@site/docs/gpt-researcher/context/filtering-by-domain.md",714],17896441:[()=>Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,4578)),"@theme/DocItem",4578],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,8988)),"@theme/SearchPage",8988],"1be78505":[()=>Promise.all([n.e(1869),n.e(3802),n.e(8714)]).then(n.bind(n,7641)),"@theme/DocPage",7641],"22f692c8":[()=>n.e(2363).then(n.bind(n,2080)),"@site/docs/gpt-researcher/gptr/scraping.md",2080],"25e02a64":[()=>n.e(2082).then(n.bind(n,5221)),"@site/docs/gpt-researcher/llms/running-with-ollama.md",5221],"2700a261":[()=>n.e(264).then(n.bind(n,1091)),"@site/docs/examples/detailed_report.md",1091],"33e7285c":[()=>n.e(3107).then(n.t.bind(n,8989,19)),"~blog/default/blog-tags-autonomous-agent-12c.json",8989],"415f4636":[()=>n.e(634).then(n.t.bind(n,3922,19)),"~blog/default/blog-tags-openai-2f3.json",3922],"44b7ef8d":[()=>n.e(3587).then(n.bind(n,9425)),"@site/docs/reference/config/config.md",9425],"4ba7e5a3":[()=>n.e(9591).then(n.bind(n,4247)),"@site/docs/contribute.md",4247],"4d63772d":[()=>n.e(3622).then(n.bind(n,680)),"@site/docs/gpt-researcher/context/local-docs.md",680],"4f74abd9":[()=>n.e(8048).then(n.bind(n,1645)),"@site/docs/gpt-researcher/context/vector-stores.md",1645],"5497f083":[()=>n.e(6057).then(n.bind(n,6084)),"@site/docs/gpt-researcher/getting-started/introduction.md",6084],"55be4921":[()=>n.e(444).then(n.bind(n,956)),"@site/docs/gpt-researcher/frontend/playing-with-webhooks.md",956],"57fdb5e0":[()=>n.e(5193).then(n.t.bind(n,3309,19)),"~blog/default/blog-tags-hybrid-research-83e.json",3309],"5986bbbc":[()=>n.e(30).then(n.bind(n,7912)),"@site/blog/2024-05-19-gptr-langgraph/index.md",7912],"5b527261":[()=>n.e(1675).then(n.bind(n,4664)),"@site/docs/gpt-researcher/getting-started/getting-started-with-docker.md",4664],"5dbe55ec":[()=>n.e(989).then(n.bind(n,3294)),"@site/docs/gpt-researcher/getting-started/linux-deployment.md",3294],"5de085db":[()=>n.e(1736).then(n.bind(n,3630)),"@site/docs/gpt-researcher/llms/testing-your-llm.md",3630],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,5091)),"@generated/docusaurus.config",5091],"5f72931d":[()=>n.e(9066).then(n.bind(n,1121)),"@site/docs/gpt-researcher/gptr/troubleshooting.md",1121],"5f72c304":[()=>n.e(6107).then(n.t.bind(n,1362,19)),"~blog/default/blog-tags-langgraph-078.json",1362],"6081ee74":[()=>n.e(463).then(n.t.bind(n,7993,19)),"~blog/default/blog-tags-search-api-f27.json",7993],"6222f147":[()=>n.e(3287).then(n.bind(n,8727)),"@site/blog/2023-09-22-gpt-researcher/index.md",8727],"6410037f":[()=>n.e(4266).then(n.bind(n,1849)),"@site/docs/gpt-researcher/gptr/handling-logs-as-they-stream.md",1849],"667a64de":[()=>n.e(2212).then(n.t.bind(n,8548,19)),"~blog/default/blog-tags-gpt-researcher-3fd.json",8548],"6875c492":[()=>Promise.all([n.e(1869),n.e(3802),n.e(4813)]).then(n.bind(n,6033)),"@theme/BlogTagsPostsPage",6033],"6a8455ba":[()=>n.e(4753).then(n.bind(n,9385)),"@site/docs/gpt-researcher/search-engines/retrievers.md",9385],"708a06f3":[()=>n.e(9292).then(n.bind(n,9183)),"@site/blog/2024-09-7-hybrid-research/index.md?truncated=true",9183],"777ab133":[()=>n.e(4264).then(n.bind(n,7933)),"@site/blog/2024-09-7-hybrid-research/index.md",7933],"78060cbc":[()=>n.e(1178).then(n.t.bind(n,7102,19)),"~blog/default/blog-tags-github-f68.json",7102],"7af93ffd":[()=>n.e(8717).then(n.bind(n,939)),"@site/docs/gpt-researcher/search-engines/test-your-retriever.md",939],"80f133ef":[()=>n.e(4151).then(n.bind(n,3471)),"@site/docs/gpt-researcher/gptr/pip-package.md",3471],"814f3328":[()=>n.e(7472).then(n.t.bind(n,5513,19)),"~blog/default/blog-post-list-prop-default.json",5513],"82b8edaf":[()=>n.e(2337).then(n.bind(n,7937)),"@site/docs/gpt-researcher/gptr/config.md",7937],"845acc88":[()=>n.e(6631).then(n.bind(n,2288)),"@site/docs/gpt-researcher/getting-started/how-to-choose.md",2288],"86f86571":[()=>n.e(1624).then(n.t.bind(n,8778,19)),"~blog/default/blog-tags-multi-skills-0fe.json",8778],"87b2d671":[()=>n.e(6918).then(n.bind(n,920)),"@site/docs/gpt-researcher/frontend/frontend.md",920],"935f2afb":[()=>n.e(8581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],"9bc9a8f7":[()=>n.e(4492).then(n.t.bind(n,7005,19)),"~blog/default/blog-tags-assistant-api-f81.json",7005],"9e4087bc":[()=>n.e(2711).then(n.bind(n,631)),"@theme/BlogArchivePage",631],"9f68de09":[()=>n.e(3824).then(n.bind(n,4298)),"@site/docs/gpt-researcher/multi_agents/langgraph.md",4298],a6aa9e1f:[()=>Promise.all([n.e(1869),n.e(3802),n.e(7643)]).then(n.bind(n,2876)),"@theme/BlogListPage",2876],a7023ddc:[()=>n.e(9267).then(n.t.bind(n,8289,19)),"~blog/default/blog-tags-tags-4c2.json",8289],a9cdb420:[()=>n.e(2076).then(n.bind(n,8278)),"@site/docs/gpt-researcher/getting-started/getting-started.md",8278],ad8d4462:[()=>n.e(6644).then(n.bind(n,1934)),"@site/docs/examples/hybrid_research.md",1934],ae92dbda:[()=>n.e(2663).then(n.bind(n,9109)),"@site/docs/reference/processing/html.md",9109],b205135c:[()=>n.e(318).then(n.bind(n,1006)),"@site/docs/reference/config/singleton.md",1006],b2b675dd:[()=>n.e(1991).then(n.t.bind(n,9775,19)),"~blog/default/blog-c06.json",9775],b2f554cd:[()=>n.e(5894).then(n.t.bind(n,6042,19)),"~blog/default/blog-archive-80c.json",6042],b94bec88:[()=>n.e(8074).then(n.bind(n,3561)),"@site/docs/gpt-researcher/gptr/example.md",3561],bcd3bfb0:[()=>n.e(303).then(n.t.bind(n,1037,19)),"~blog/default/blog-tags-langchain-595.json",1037],bce7c409:[()=>n.e(2746).then(n.bind(n,7252)),"@site/docs/gpt-researcher/getting-started/cli.md",7252],c4f5d8e4:[()=>Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,1852)),"@site/src/pages/index.js",1852],c6694585:[()=>n.e(8995).then(n.bind(n,9593)),"@site/docs/examples/examples.md",9593],c7d22e29:[()=>n.e(6139).then(n.bind(n,4329)),"@site/blog/2023-09-22-gpt-researcher/index.md?truncated=true",4329],ccc49370:[()=>Promise.all([n.e(1869),n.e(3802),n.e(3249)]).then(n.bind(n,2359)),"@theme/BlogPostPage",2359],d1355481:[()=>n.e(708).then(n.t.bind(n,5506,19)),"~blog/default/blog-tags-tavily-7f7.json",5506],d136d620:[()=>n.e(3089).then(n.bind(n,5204)),"@site/docs/gpt-researcher/llms/llms.md",5204],d3f86d34:[()=>n.e(6553).then(n.bind(n,6694)),"@site/blog/2023-11-12-openai-assistant/index.md",6694],d52b8f97:[()=>n.e(2976).then(n.bind(n,7225)),"@site/docs/gpt-researcher/context/tailored-research.md",7225],dc7438fe:[()=>n.e(487).then(n.bind(n,9457)),"@site/docs/gpt-researcher/gptr/automated-tests.md",9457],de289047:[()=>n.e(5232).then(n.bind(n,4295)),"@site/docs/reference/processing/text.md",4295],ebfee794:[()=>n.e(4386).then(n.bind(n,674)),"@site/docs/welcome.md",674],f17f44a5:[()=>n.e(5981).then(n.bind(n,3368)),"@site/docs/gpt-researcher/gptr/querying-the-backend.md",3368],f3eeb784:[()=>n.e(7041).then(n.t.bind(n,8261,19)),"~blog/default/blog-tags-opensource-64e.json",8261]};const d=function(e){const t={};return function e(n,r){Object.keys(n).forEach((a=>{const o=n[a],i=r?r+"."+a:a;"object"===typeof o&&!!o&&Object.keys(o).length?e(o,i):t[i]=o}))}(e),t};const p=function(e,t){if("*"===e)return l()({loading:s,loader:()=>n.e(9090).then(n.bind(n,9090))});const a=c[`${e}-${t}`],o=[],i=[],p={},f=d(a);return Object.keys(f).forEach((e=>{const t=u[f[e]];t&&(p[e]=t[0],o.push(t[1]),i.push(t[2]))})),l().Map({loading:s,loader:p,modules:o,webpack:()=>i,render:(e,t)=>{const n=JSON.parse(JSON.stringify(a));Object.keys(e).forEach((t=>{let r=n;const a=t.split(".");for(let e=0;e<a.length-1;e+=1)r=r[a[e]];r[a[a.length-1]]=e[t].default;const o=Object.keys(e[t]).filter((e=>"default"!==e));o&&o.length&&o.forEach((n=>{r[a[a.length-1]][n]=e[t][n]}))}));const o=n.component;return delete n.component,r.createElement(o,{...n,...t})}})},f=[{path:"/blog",component:p("/blog","f4c"),exact:!0},{path:"/blog/archive",component:p("/blog/archive","f4c"),exact:!0},{path:"/blog/building-gpt-researcher",component:p("/blog/building-gpt-researcher","dcf"),exact:!0},{path:"/blog/building-openai-assistant",component:p("/blog/building-openai-assistant","7ba"),exact:!0},{path:"/blog/gptr-hybrid",component:p("/blog/gptr-hybrid","c62"),exact:!0},{path:"/blog/gptr-langgraph",component:p("/blog/gptr-langgraph","437"),exact:!0},{path:"/blog/tags",component:p("/blog/tags","e13"),exact:!0},{path:"/blog/tags/assistant-api",component:p("/blog/tags/assistant-api","3c8"),exact:!0},{path:"/blog/tags/autonomous-agent",component:p("/blog/tags/autonomous-agent","093"),exact:!0},{path:"/blog/tags/github",component:p("/blog/tags/github","e38"),exact:!0},{path:"/blog/tags/gpt-researcher",component:p("/blog/tags/gpt-researcher","941"),exact:!0},{path:"/blog/tags/hybrid-research",component:p("/blog/tags/hybrid-research","8a3"),exact:!0},{path:"/blog/tags/langchain",component:p("/blog/tags/langchain","97e"),exact:!0},{path:"/blog/tags/langgraph",component:p("/blog/tags/langgraph","932"),exact:!0},{path:"/blog/tags/multi-skills",component:p("/blog/tags/multi-skills","16a"),exact:!0},{path:"/blog/tags/openai",component:p("/blog/tags/openai","4e6"),exact:!0},{path:"/blog/tags/opensource",component:p("/blog/tags/opensource","43b"),exact:!0},{path:"/blog/tags/search-api",component:p("/blog/tags/search-api","cd3"),exact:!0},{path:"/blog/tags/tavily",component:p("/blog/tags/tavily","d67"),exact:!0},{path:"/search",component:p("/search","79a"),exact:!0},{path:"/docs",component:p("/docs","d6b"),routes:[{path:"/docs/contribute",component:p("/docs/contribute","e6a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/examples/detailed_report",component:p("/docs/examples/detailed_report","c1a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/examples/examples",component:p("/docs/examples/examples","8df"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/examples/hybrid_research",component:p("/docs/examples/hybrid_research","16b"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/faq",component:p("/docs/faq","76c"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/filtering-by-domain",component:p("/docs/gpt-researcher/context/filtering-by-domain","2ab"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/local-docs",component:p("/docs/gpt-researcher/context/local-docs","59a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/tailored-research",component:p("/docs/gpt-researcher/context/tailored-research","1db"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/vector-stores",component:p("/docs/gpt-researcher/context/vector-stores","b43"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/frontend/frontend",component:p("/docs/gpt-researcher/frontend/frontend","15e"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/frontend/playing-with-webhooks",component:p("/docs/gpt-researcher/frontend/playing-with-webhooks","07d"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/cli",component:p("/docs/gpt-researcher/getting-started/cli","917"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/getting-started",component:p("/docs/gpt-researcher/getting-started/getting-started","82c"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/getting-started-with-docker",component:p("/docs/gpt-researcher/getting-started/getting-started-with-docker","000"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/how-to-choose",component:p("/docs/gpt-researcher/getting-started/how-to-choose","6ed"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/introduction",component:p("/docs/gpt-researcher/getting-started/introduction","079"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/linux-deployment",component:p("/docs/gpt-researcher/getting-started/linux-deployment","970"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/automated-tests",component:p("/docs/gpt-researcher/gptr/automated-tests","68e"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/config",component:p("/docs/gpt-researcher/gptr/config","059"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/example",component:p("/docs/gpt-researcher/gptr/example","b9b"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/handling-logs-as-they-stream",component:p("/docs/gpt-researcher/gptr/handling-logs-as-they-stream","ac0"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/pip-package",component:p("/docs/gpt-researcher/gptr/pip-package","332"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/querying-the-backend",component:p("/docs/gpt-researcher/gptr/querying-the-backend","a32"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/scraping",component:p("/docs/gpt-researcher/gptr/scraping","ab5"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/troubleshooting",component:p("/docs/gpt-researcher/gptr/troubleshooting","b8f"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/llms/llms",component:p("/docs/gpt-researcher/llms/llms","0a2"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/llms/running-with-ollama",component:p("/docs/gpt-researcher/llms/running-with-ollama","4eb"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/llms/testing-your-llm",component:p("/docs/gpt-researcher/llms/testing-your-llm","493"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/multi_agents/langgraph",component:p("/docs/gpt-researcher/multi_agents/langgraph","d54"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/search-engines/retrievers",component:p("/docs/gpt-researcher/search-engines/retrievers","47a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/search-engines/test-your-retriever",component:p("/docs/gpt-researcher/search-engines/test-your-retriever","e89"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/reference/config/config",component:p("/docs/reference/config/config","212"),exact:!0},{path:"/docs/reference/config/singleton",component:p("/docs/reference/config/singleton","beb"),exact:!0},{path:"/docs/reference/processing/html",component:p("/docs/reference/processing/html","919"),exact:!0},{path:"/docs/reference/processing/text",component:p("/docs/reference/processing/text","d18"),exact:!0},{path:"/docs/roadmap",component:p("/docs/roadmap","e16"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/welcome",component:p("/docs/welcome","177"),exact:!0,sidebar:"docsSidebar"}]},{path:"/",component:p("/","deb"),exact:!0},{path:"*",component:p("*")}];var h=n(8193),m=n(5920),g=n(3509),b=n(1169),v=n(7788),y=n(6347),w=n(5947),k=n.n(w);const E=[n(119),n(6725),n(435),n(1043)];function S(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];E.forEach((t=>{var r,a;const o=null!==(a=null===(r=null==t?void 0:t.default)||void 0===r?void 0:r[e])&&void 0!==a?a:t[e];o&&o(...n)}))}const x={onRouteUpdate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S("onRouteUpdate",...t)},onRouteUpdateDelayed(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S("onRouteUpdateDelayed",...t)}};var _=n(2831);function T(e,t){const n=(0,_.u)(e,t);return Promise.all(n.map((e=>{const{component:t}=e.route;if(t&&t.preload)return t.preload()})))}const A={};const C=function(e){if(A[e.pathname])return{...e,pathname:A[e.pathname]};let t=e.pathname||"/";return t=t.trim().replace(/\/index\.html$/,""),""===t&&(t="/"),A[e.pathname]=t,{...e,pathname:t}};k().configure({showSpinner:!1});class P extends r.Component{constructor(e){super(e),this.previousLocation=null,this.progressBarTimeout=null,this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){const n=e.location!==this.props.location,{routes:r,delay:a}=this.props;if(n){const t=C(e.location);return this.startProgressBar(a),this.previousLocation=C(this.props.location),this.setState({nextRouteHasLoaded:!1}),T(r,t.pathname).then((()=>{x.onRouteUpdate({previousLocation:this.previousLocation,location:t}),this.previousLocation=null,this.setState({nextRouteHasLoaded:!0},this.stopProgressBar);const{hash:e}=t;if(e){const t=decodeURIComponent(e.substring(1)),n=document.getElementById(t);n&&n.scrollIntoView()}else window.scrollTo(0,0)})).catch((e=>console.warn(e))),!1}return!!t.nextRouteHasLoaded}clearProgressBarTimeout(){this.progressBarTimeout&&(clearTimeout(this.progressBarTimeout),this.progressBarTimeout=null)}startProgressBar(e){this.clearProgressBarTimeout(),this.progressBarTimeout=setTimeout((()=>{x.onRouteUpdateDelayed({location:C(this.props.location)}),k().start()}),e)}stopProgressBar(){this.clearProgressBarTimeout(),k().done()}render(){const{children:e,location:t}=this.props;return r.createElement(y.qh,{location:C(t),render:()=>e})}}const L=(0,y.y)(P);var R=n(8895),O=n(4586);const N="docusaurus-base-url-issue-banner-container",I="docusaurus-base-url-issue-banner",D="docusaurus-base-url-issue-banner-suggestion-container",F="__DOCUSAURUS_INSERT_BASEURL_BANNER";function j(e){return`\nwindow['${F}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${F}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${N}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="${I}" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${D}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n var suggestionContainer = document.getElementById('${D}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function M(){const{siteConfig:{baseUrl:e}}=(0,O.A)();return(0,r.useLayoutEffect)((()=>{window[F]=!1}),[]),r.createElement(r.Fragment,null,!h.A.canUseDOM&&r.createElement(R.A,null,r.createElement("script",null,j(e))),r.createElement("div",{id:N}))}function B(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,O.A)(),{pathname:n}=(0,y.zy)();return t&&n===e?r.createElement(M,null):null}const z=function(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)};var $=n(6474);const U=function(){return r.createElement(v.A,{fallback:$.A},r.createElement(b.l,null,r.createElement(g.x,null,r.createElement(z,null,r.createElement(B,null),r.createElement(L,{routes:f,delay:1e3},(0,m.A)(f))))))};const q=function(e){if("undefined"==typeof document)return!1;const t=document.createElement("link");try{if(t.relList&&"function"==typeof t.relList.supports)return t.relList.supports(e)}catch(n){return!1}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;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).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)}))},G={};const H=function(e){return new Promise((t=>{G[e]?t():q(e).then((()=>{t(),G[e]=!0})).catch((()=>{}))}))},Q={},V={},W=()=>!(!("connection"in navigator)||-1===(navigator.connection.effectiveType||"").indexOf("2g")||!navigator.connection.saveData),K=e=>Array.prototype.concat.apply([],e),Y={prefetch:e=>{if(!(e=>!W()&&!V[e]&&!Q[e])(e))return!1;Q[e]=!0;const t=(0,_.u)(f,e);return K(t.map((e=>{return t=e.route.path,K(Object.entries(c).filter((e=>{let[n]=e;return n.replace(/(-[^-]+)$/,"")===t})).map((e=>{let[,t]=e;return Object.values(d(t))})));var t}))).forEach((e=>{const t=n.gca(e);t&&!/undefined/.test(t)&&H(t)})),!0},preload:e=>!!(e=>!W()&&!V[e])(e)&&(V[e]=!0,T(f,e),!0)};if(h.A.canUseDOM){window.docusaurus=Y;const e=a.hydrate;T(f,window.location.pathname).then((()=>{e(r.createElement(o.Kd,null,r.createElement(U,null)),document.getElementById("__docusaurus"))}))}},7788:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(6540),a=n(8193),o=n(6474);class i extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.A.canUseDOM&&this.setState({error:e})}render(){var e;const{children:t}=this.props,{error:n}=this.state;if(n){return(null!==(e=this.props.fallback)&&void 0!==e?e:o.A)({error:n,tryAgain:()=>this.setState({error:null})})}return t}}const l=i},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&!!window.screen}},8895:(e,t,n)=>{"use strict";n.d(t,{A:()=>he});var r,a,o,i,l=n(6540),s=n(5556),c=n.n(s),u=n(2098),d=n.n(u),p=n(115),f=n.n(p),h=n(5228),m=n.n(h),g="bodyAttributes",b="htmlAttributes",v="titleAttributes",y={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},w=(Object.keys(y).map((function(e){return y[e]})),"charset"),k="cssText",E="href",S="http-equiv",x="innerHTML",_="itemprop",T="name",A="property",C="rel",P="src",L="target",R={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},O="defaultTitle",N="defer",I="encodeSpecialCharacters",D="onChangeClientState",F="titleTemplate",j=Object.keys(R).reduce((function(e,t){return e[R[t]]=t,e}),{}),M=[y.NOSCRIPT,y.SCRIPT,y.STYLE],B="data-react-helmet",z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},G=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},H=function(e){var t=Y(e,y.TITLE),n=Y(e,F);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=Y(e,O);return t||r||void 0},Q=function(e){return Y(e,D)||function(){}},V=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return U({},e,t)}),{})},W=function(e,t){return t.filter((function(e){return void 0!==e[y.BASE]})).map((function(e){return e[y.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a<r.length;a++){var o=r[a].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}return t}),[])},K=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&te("Helmet: "+e+' should be of type "Array". Instead found type "'+z(t[e])+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var a={};n.filter((function(e){for(var n=void 0,o=Object.keys(e),i=0;i<o.length;i++){var l=o[i],s=l.toLowerCase();-1===t.indexOf(s)||n===C&&"canonical"===e[n].toLowerCase()||s===C&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(l)||l!==x&&l!==k&&l!==_||(n=l)}if(!n||!e[n])return!1;var c=e[n].toLowerCase();return r[n]||(r[n]={}),a[n]||(a[n]={}),!r[n][c]&&(a[n][c]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var o=Object.keys(a),i=0;i<o.length;i++){var l=o[i],s=m()({},r[l],a[l]);r[l]=s}return e}),[]).reverse()},Y=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},X=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){X(e)}),0)}),Z=function(e){return clearTimeout(e)},J="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||X:n.g.requestAnimationFrame||X,ee="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Z:n.g.cancelAnimationFrame||Z,te=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},ne=null,re=function(e,t){var n=e.baseTag,r=e.bodyAttributes,a=e.htmlAttributes,o=e.linkTags,i=e.metaTags,l=e.noscriptTags,s=e.onChangeClientState,c=e.scriptTags,u=e.styleTags,d=e.title,p=e.titleAttributes;ie(y.BODY,r),ie(y.HTML,a),oe(d,p);var f={baseTag:le(y.BASE,n),linkTags:le(y.LINK,o),metaTags:le(y.META,i),noscriptTags:le(y.NOSCRIPT,l),scriptTags:le(y.SCRIPT,c),styleTags:le(y.STYLE,u)},h={},m={};Object.keys(f).forEach((function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(h[e]=n),r.length&&(m[e]=f[e].oldTags)})),t&&t(),s(e,h,m)},ae=function(e){return Array.isArray(e)?e.join(""):e},oe=function(e,t){void 0!==e&&document.title!==e&&(document.title=ae(e)),ie(y.TITLE,t)},ie=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(B),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l<i.length;l++){var s=i[l],c=t[s]||"";n.getAttribute(s)!==c&&n.setAttribute(s,c),-1===a.indexOf(s)&&a.push(s);var u=o.indexOf(s);-1!==u&&o.splice(u,1)}for(var d=o.length-1;d>=0;d--)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute(B):n.getAttribute(B)!==i.join(",")&&n.setAttribute(B,i.join(","))}},le=function(e,t){var n=document.head||document.querySelector(y.HEAD),r=n.querySelectorAll(e+"["+B+"]"),a=Array.prototype.slice.call(r),o=[],i=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===x)n.innerHTML=t.innerHTML;else if(r===k)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var l=void 0===t[r]?"":t[r];n.setAttribute(r,l)}n.setAttribute(B,"true"),a.some((function(e,t){return i=t,n.isEqualNode(e)}))?a.splice(i,1):o.push(n)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return n.appendChild(e)})),{oldTags:a,newTags:o}},se=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[R[n]||n]=e[n],t}),t)},ue=function(e,t,n){switch(e){case y.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[B]=!0,a=ce(n,r),[l.createElement(y.TITLE,a,e)];var e,n,r,a},toString:function(){return function(e,t,n,r){var a=se(n),o=ae(t);return a?"<"+e+" "+B+'="true" '+a+">"+G(o,r)+"</"+e+">":"<"+e+" "+B+'="true">'+G(o,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case g:case b:return{toComponent:function(){return ce(t)},toString:function(){return se(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,a=((r={key:n})[B]=!0,r);return Object.keys(t).forEach((function(e){var n=R[e]||e;if(n===x||n===k){var r=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:r}}else a[n]=t[e]})),l.createElement(e,a)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!(e===x||e===k)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+G(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===M.indexOf(e);return t+"<"+e+" "+B+'="true" '+a+(i?"/>":">"+o+"</"+e+">")}),"")}(e,t,n)}}}},de=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.linkTags,i=e.metaTags,l=e.noscriptTags,s=e.scriptTags,c=e.styleTags,u=e.title,d=void 0===u?"":u,p=e.titleAttributes;return{base:ue(y.BASE,t,r),bodyAttributes:ue(g,n,r),htmlAttributes:ue(b,a,r),link:ue(y.LINK,o,r),meta:ue(y.META,i,r),noscript:ue(y.NOSCRIPT,l,r),script:ue(y.SCRIPT,s,r),style:ue(y.STYLE,c,r),title:ue(y.TITLE,{title:d,titleAttributes:p},r)}},pe=d()((function(e){return{baseTag:W([E,L],e),bodyAttributes:V(g,e),defer:Y(e,N),encode:Y(e,I),htmlAttributes:V(b,e),linkTags:K(y.LINK,[C,E],e),metaTags:K(y.META,[T,w,S,A,_],e),noscriptTags:K(y.NOSCRIPT,[x],e),onChangeClientState:Q(e),scriptTags:K(y.SCRIPT,[P,x],e),styleTags:K(y.STYLE,[k],e),title:H(e),titleAttributes:V(v,e)}}),(function(e){ne&&ee(ne),e.defer?ne=J((function(){re(e,(function(){ne=null}))})):(re(e),ne=null)}),de)((function(){return null})),fe=(a=pe,i=o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!f()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case y.SCRIPT:case y.NOSCRIPT:return{innerHTML:t};case y.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,a=e.newChildProps,o=e.nestedChildren;return U({},r,((t={})[n.type]=[].concat(r[n.type]||[],[U({},a,this.mapNestedChildrenToProps(n,o))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case y.TITLE:return U({},a,((t={})[r.type]=i,t.titleAttributes=U({},o),t));case y.BODY:return U({},a,{bodyAttributes:U({},o)});case y.HTML:return U({},a,{htmlAttributes:U({},o)})}return U({},a,((n={})[r.type]=U({},o),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=U({},t);return Object.keys(e).forEach((function(t){var r;n=U({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return l.Children.forEach(e,(function(e){if(e&&e.props){var a=e.props,o=a.children,i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[j[n]||n]=e[n],t}),t)}(q(a,["children"]));switch(n.warnOnInvalidChildren(e,o),e.type){case y.LINK:case y.META:case y.NOSCRIPT:case y.SCRIPT:case y.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:i,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:i,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=q(e,["children"]),r=U({},n);return t&&(r=this.mapChildrenToProps(t,r)),l.createElement(a,r)},$(t,null,[{key:"canUseDOM",set:function(e){a.canUseDOM=e}}]),t}(l.Component),o.propTypes={base:c().object,bodyAttributes:c().object,children:c().oneOfType([c().arrayOf(c().node),c().node]),defaultTitle:c().string,defer:c().bool,encodeSpecialCharacters:c().bool,htmlAttributes:c().object,link:c().arrayOf(c().object),meta:c().arrayOf(c().object),noscript:c().arrayOf(c().object),onChangeClientState:c().func,script:c().arrayOf(c().object),style:c().arrayOf(c().object),title:c().string,titleAttributes:c().object,titleTemplate:c().string},o.defaultProps={defer:!0,encodeSpecialCharacters:!0},o.peek=a.peek,o.rewind=function(){var e=a.rewind();return e||(e=de({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},i);fe.renderStatic=fe.rewind;const he=function(e){return l.createElement(fe,{...e})}},5489:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(6540),a=n(4625),o=n(4586),i=n(6654),l=n(8193);const s=(0,r.createContext)({collectLink:()=>{}});var c=n(6025),u=n(440);const d=function(e){let{isNavLink:t,to:n,href:d,activeClassName:p,isActive:f,"data-noBrokenLinkCheck":h,autoAddBaseUrl:m=!0,...g}=e;var b;const{siteConfig:{trailingSlash:v,baseUrl:y}}=(0,o.A)(),{withBaseUrl:w}=(0,c.h)(),k=(0,r.useContext)(s),E=n||d,S=(0,i.A)(E),x=null==E?void 0:E.replace("pathname://","");let _=void 0!==x?(T=x,m&&(e=>e.startsWith("/"))(T)?w(T):T):void 0;var T;_&&S&&(_=(0,u.applyTrailingSlash)(_,{trailingSlash:v,baseUrl:y}));const A=(0,r.useRef)(!1),C=t?a.k2:a.N_,P=l.A.canUseIntersectionObserver,L=(0,r.useRef)();(0,r.useEffect)((()=>(!P&&S&&null!=_&&window.docusaurus.prefetch(_),()=>{P&&L.current&&L.current.disconnect()})),[L,_,P,S]);const R=null!==(b=null==_?void 0:_.startsWith("#"))&&void 0!==b&&b,O=!_||!S||R;return _&&S&&!R&&!h&&k.collectLink(_),O?r.createElement("a",{href:_,...E&&!S&&{target:"_blank",rel:"noopener noreferrer"},...g}):r.createElement(C,{...g,onMouseEnter:()=>{A.current||null==_||(window.docusaurus.preload(_),A.current=!0)},innerRef:e=>{var t,n;P&&e&&S&&(t=e,n=()=>{null!=_&&window.docusaurus.prefetch(_)},L.current=new window.IntersectionObserver((e=>{e.forEach((e=>{t===e.target&&(e.isIntersecting||e.intersectionRatio>0)&&(L.current.unobserve(t),L.current.disconnect(),n())}))})),L.current.observe(t))},to:_||"",...t&&{isActive:f,activeClassName:p}})}},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>c});var r=n(6540);const a=/{\w+}/g,o="{}";function i(e,t){const n=[],i=e.replace(a,(e=>{const a=e.substr(1,e.length-2),i=null==t?void 0:t[a];if(void 0!==i){const e=r.isValidElement(i)?i:String(i);return n.push(e),o}return e}));return 0===n.length?e:n.every((e=>"string"==typeof e))?i.split(o).reduce(((e,t,r)=>{var a;return e.concat(t).concat(null!==(a=n[r])&&void 0!==a?a:"")}),""):i.split(o).reduce(((e,t,a)=>[...e,r.createElement(r.Fragment,{key:a},t,n[a])]),[])}var l=n(2654);function s(e){let{id:t,message:n}=e;var r,a;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 null!==(a=null!==(r=l[null!=t?t:n])&&void 0!==r?r:n)&&void 0!==a?a:t}function c(e,t){let{message:n,id:r}=e;return i(s({message:n,id:r}),t)}function u(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");return i(s({message:t,id:n}),r)}},3509:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>o});var r=n(6540);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)}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},1169:(e,t,n)=>{"use strict";n.d(t,{o:()=>u,l:()=>d});var r=n(6540),a=n(5091);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"welcome","docs":[{"id":"contribute","path":"/docs/contribute","sidebar":"docsSidebar"},{"id":"examples/detailed_report","path":"/docs/examples/detailed_report","sidebar":"docsSidebar"},{"id":"examples/examples","path":"/docs/examples/examples","sidebar":"docsSidebar"},{"id":"examples/hybrid_research","path":"/docs/examples/hybrid_research","sidebar":"docsSidebar"},{"id":"faq","path":"/docs/faq","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/filtering-by-domain","path":"/docs/gpt-researcher/context/filtering-by-domain","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/local-docs","path":"/docs/gpt-researcher/context/local-docs","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/tailored-research","path":"/docs/gpt-researcher/context/tailored-research","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/vector-stores","path":"/docs/gpt-researcher/context/vector-stores","sidebar":"docsSidebar"},{"id":"gpt-researcher/frontend/frontend","path":"/docs/gpt-researcher/frontend/frontend","sidebar":"docsSidebar"},{"id":"gpt-researcher/frontend/playing-with-webhooks","path":"/docs/gpt-researcher/frontend/playing-with-webhooks","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/cli","path":"/docs/gpt-researcher/getting-started/cli","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/getting-started","path":"/docs/gpt-researcher/getting-started/getting-started","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/getting-started-with-docker","path":"/docs/gpt-researcher/getting-started/getting-started-with-docker","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/how-to-choose","path":"/docs/gpt-researcher/getting-started/how-to-choose","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/introduction","path":"/docs/gpt-researcher/getting-started/introduction","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/linux-deployment","path":"/docs/gpt-researcher/getting-started/linux-deployment","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/automated-tests","path":"/docs/gpt-researcher/gptr/automated-tests","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/config","path":"/docs/gpt-researcher/gptr/config","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/example","path":"/docs/gpt-researcher/gptr/example","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/handling-logs-as-they-stream","path":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/pip-package","path":"/docs/gpt-researcher/gptr/pip-package","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/querying-the-backend","path":"/docs/gpt-researcher/gptr/querying-the-backend","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/scraping","path":"/docs/gpt-researcher/gptr/scraping","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/troubleshooting","path":"/docs/gpt-researcher/gptr/troubleshooting","sidebar":"docsSidebar"},{"id":"gpt-researcher/llms/llms","path":"/docs/gpt-researcher/llms/llms","sidebar":"docsSidebar"},{"id":"gpt-researcher/llms/running-with-ollama","path":"/docs/gpt-researcher/llms/running-with-ollama","sidebar":"docsSidebar"},{"id":"gpt-researcher/llms/testing-your-llm","path":"/docs/gpt-researcher/llms/testing-your-llm","sidebar":"docsSidebar"},{"id":"gpt-researcher/multi_agents/langgraph","path":"/docs/gpt-researcher/multi_agents/langgraph","sidebar":"docsSidebar"},{"id":"gpt-researcher/search-engines/retrievers","path":"/docs/gpt-researcher/search-engines/retrievers","sidebar":"docsSidebar"},{"id":"gpt-researcher/search-engines/test-your-retriever","path":"/docs/gpt-researcher/search-engines/test-your-retriever","sidebar":"docsSidebar"},{"id":"reference/config/config","path":"/docs/reference/config/config"},{"id":"reference/config/singleton","path":"/docs/reference/config/singleton"},{"id":"reference/processing/html","path":"/docs/reference/processing/html"},{"id":"reference/processing/text","path":"/docs/reference/processing/text"},{"id":"roadmap","path":"/docs/roadmap","sidebar":"docsSidebar"},{"id":"welcome","path":"/docs/welcome","sidebar":"docsSidebar"}]}]}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"0.0.0-4193","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"0.0.0-4193"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"0.0.0-4193"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"0.0.0-4193"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"0.0.0-4193"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"0.0.0-4193"},"@easyops-cn/docusaurus-search-local":{"type":"package","name":"@easyops-cn/docusaurus-search-local","version":"0.21.4"}}}'),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)}},6654:(e,t,n)=>{"use strict";function r(e){return!0===/^(\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},5920:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(2831).v},5567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BrowserRouter:()=>r.Kd,HashRouter:()=>r.I9,Link:()=>r.N_,MemoryRouter:()=>r.fS,NavLink:()=>r.k2,Prompt:()=>r.XG,Redirect:()=>r.rd,Route:()=>r.qh,Router:()=>r.Ix,StaticRouter:()=>r.kO,Switch:()=>r.dO,generatePath:()=>r.tW,matchPath:()=>r.B6,useHistory:()=>r.W6,useLocation:()=>r.zy,useParams:()=>r.g,useRouteMatch:()=>r.W5,withRouter:()=>r.y});var r=n(4625)},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,h:()=>o});var r=n(4586),a=n(6654);function o(){const{siteConfig:{baseUrl:e="/",url:t}={}}=(0,r.A)();return{withBaseUrl:(n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n)return n;if(n.startsWith("#"))return n;if((0,a.z)(n))return n;if(o)return t+n;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)}}function i(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(1169);const o=function(){return(0,r.useContext)(a.o)}},6588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,useAllPluginInstancesData:()=>i,usePluginData:()=>l});var r=n(4586),a=n(7065);function o(){const{globalData:e}=(0,r.A)();if(!e)throw new Error("Docusaurus global data not found.");return e}function i(e){const t=o()[e];if(!t)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return t}function l(e,t){void 0===t&&(t=a.W);const n=i(e)[t];if(!n)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return n}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(3509);function o(){return(0,r.useContext)(a.o)}},6474:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(6540),a=n(9360),o=n(7788);function i(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}const l=function(e){let{error:t,tryAgain:n}=e;return r.createElement(o.A,{fallback:()=>r.createElement(i,{error:t,tryAgain:n})},r.createElement(a.A,{title:"Page Error"},r.createElement(i,{error:t,tryAgain:n})))}},4733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocVersionSuggestions=t.getActiveDocContext=t.getActiveVersion=t.getLatestVersion=t.getActivePlugin=void 0;const r=n(5567);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).find((e=>{let[n,a]=e;return!!(0,r.matchPath)(t,{path:a.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.getLatestVersion=e=>e.versions.find((e=>e.isLast));t.getActiveVersion=(e,n)=>{const a=(0,t.getLatestVersion)(e);return[...e.versions.filter((e=>e!==a)),a].find((e=>!!(0,r.matchPath)(n,{path:e.path,exact:!1,strict:!1})))};t.getActiveDocContext=(e,n)=>{const a=(0,t.getActiveVersion)(e,n),o=null==a?void 0:a.docs.find((e=>!!(0,r.matchPath)(n,{path:e.path,exact:!0,strict:!1})));return{activeVersion:a,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}};t.getDocVersionSuggestions=(e,n)=>{const r=(0,t.getLatestVersion)(e),a=(0,t.getActiveDocContext)(e,n);return{latestDocSuggestion:null==a?void 0:a.alternateDocVersions[r.name],latestVersionSuggestion:r}}},727:(e,t,n)=>{"use strict";t.HW=t.zK=t.ir=t.r7=t.jh=t.vT=t.ht=t.Gy=void 0;const r=n(5215),a=n(5567),o=(0,r.__importStar)(n(6588)),i=n(4733),l={};t.Gy=()=>{var e;return null!==(e=(0,o.default)()["docusaurus-plugin-content-docs"])&&void 0!==e?e:l};t.ht=e=>(0,o.usePluginData)("docusaurus-plugin-content-docs",e);t.vT=function(e){void 0===e&&(e={});const n=(0,t.Gy)(),{pathname:r}=(0,a.useLocation)();return(0,i.getActivePlugin)(n,r,e)};t.jh=e=>(0,t.ht)(e).versions;t.r7=e=>{const n=(0,t.ht)(e);return(0,i.getLatestVersion)(n)};t.ir=e=>{const n=(0,t.ht)(e),{pathname:r}=(0,a.useLocation)();return(0,i.getActiveVersion)(n,r)};t.zK=e=>{const n=(0,t.ht)(e),{pathname:r}=(0,a.useLocation)();return(0,i.getActiveDocContext)(n,r)};t.HW=e=>{const n=(0,t.ht)(e),{pathname:r}=(0,a.useLocation)();return(0,i.getDocVersionSuggestions)(n,r)}},3679:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const a="iconExternalLink_wgqa",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},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"}))}},9360:(e,t,n)=>{"use strict";n.d(t,{A:()=>ve});var r=n(6540),a=n(53),o=n(7788),i=n(6347),l=n(1312),s=n(5965);const c="skipToContent_OuoZ";function u(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}const d=function(){const e=(0,r.useRef)(null),{action:t}=(0,i.W6)();return(0,s.$G)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&u(e.current)})),r.createElement("div",{ref:e},r.createElement("a",{href:"#",className:c,onClick:e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")||document.querySelector(".main-wrapper");t&&u(t)}},r.createElement(l.A,{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"},"Skip to main content")))};var p=n(8168);function f(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...l}=e;return r.createElement("svg",(0,p.A)({viewBox:"0 0 15 15",width:t,height:n},l),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const h="announcementBar_axC9",m="announcementBarPlaceholder_xYHE",g="announcementBarClose_A3A1",b="announcementBarContent_6uhP";const v=function(){const{isActive:e,close:t}=(0,s.Mj)(),{announcementBar:n}=(0,s.pN)();if(!e)return null;const{content:o,backgroundColor:i,textColor:c,isCloseable:u}=n;return r.createElement("div",{className:h,style:{backgroundColor:i,color:c},role:"banner"},u&&r.createElement("div",{className:m}),r.createElement("div",{className:b,dangerouslySetInnerHTML:{__html:o}}),u?r.createElement("button",{type:"button",className:(0,a.A)("clean-btn close",g),onClick:t,"aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(f,{width:14,height:14,strokeWidth:3.1})):null)};var y=n(3338),w=n(2303);const k={toggle:"toggle_iYfV",toggleScreenReader:"toggleScreenReader_h9qa",toggleDisabled:"toggleDisabled_xj38",toggleTrack:"toggleTrack_t-f2",toggleTrackCheck:"toggleTrackCheck_mk7D",toggleChecked:"toggleChecked_a04y",toggleTrackX:"toggleTrackX_dm8H",toggleTrackThumb:"toggleTrackThumb_W6To",toggleFocused:"toggleFocused_pRSw",toggleIcon:"toggleIcon_pHJ9"},E=e=>{let{icon:t,style:n}=e;return r.createElement("span",{className:(0,a.A)(k.toggleIcon,k.dark),style:n},t)},S=e=>{let{icon:t,style:n}=e;return r.createElement("span",{className:(0,a.A)(k.toggleIcon,k.light),style:n},t)},x=(0,r.memo)((e=>{let{className:t,icons:n,checked:o,disabled:i,onChange:l}=e;const[s,c]=(0,r.useState)(o),[u,d]=(0,r.useState)(!1),p=(0,r.useRef)(null);return r.createElement("div",{className:(0,a.A)(k.toggle,t,{[k.toggleChecked]:s,[k.toggleFocused]:u,[k.toggleDisabled]:i})},r.createElement("div",{className:k.toggleTrack,role:"button",tabIndex:-1,onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()}},r.createElement("div",{className:k.toggleTrackCheck},n.checked),r.createElement("div",{className:k.toggleTrackX},n.unchecked),r.createElement("div",{className:k.toggleTrackThumb})),r.createElement("input",{ref:p,checked:s,type:"checkbox",className:k.toggleScreenReader,"aria-label":"Switch between dark and light mode",onChange:l,onClick:()=>c(!s),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:e=>{var t;"Enter"===e.key&&(null==(t=p.current)||t.click())}}))}));function _(e){const{colorMode:{switchConfig:{darkIcon:t,darkIconStyle:n,lightIcon:a,lightIconStyle:o}}}=(0,s.pN)(),i=(0,w.A)();return r.createElement(x,(0,p.A)({disabled:!i,icons:{checked:r.createElement(E,{icon:t,style:n}),unchecked:r.createElement(S,{icon:a,style:o})}},e))}var T=n(4785);const A=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,s.Mq)(((t,r)=>{if(!e)return;const i=t.scrollY;if(i<o.current)return void n(!0);if(a.current)return void(a.current=!1);const l=null==r?void 0:r.scrollY,s=document.documentElement.scrollHeight-o.current,c=window.innerHeight;l&&i>=l?n(!1):i+c<s&&n(!0)})),(0,s.$G)((t=>{if(e)return t.location.hash?(a.current=!0,void n(!1)):void n(!0)})),{navbarRef:i,isNavbarVisible:t}};const C=function(e){void 0===e&&(e=!0),(0,r.useEffect)((()=>(document.body.style.overflow=e?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[e])};var P=n(9312),L=n(4098),R=n(1612),O=n(1773);const N=e=>{let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,p.A)({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"}))},I={toggle:"toggle_2i4l",navbarHideable:"navbarHideable_RReh",navbarHidden:"navbarHidden_FBwS",navbarSidebarToggle:"navbarSidebarToggle_AVbO"},D="right";function F(){return(0,s.pN)().navbar.items}function j(){const{colorMode:{disableSwitch:e}}=(0,s.pN)(),{isDarkTheme:t,setLightTheme:n,setDarkTheme:a}=(0,T.A)();return{isDarkTheme:t,toggle:(0,r.useCallback)((e=>e.target.checked?a():n()),[n,a]),disabled:e}}function M(e){let{sidebarShown:t,toggleSidebar:n}=e;C(t);const o=F(),i=j(),c=function(e){var t;let{sidebarShown:n,toggleSidebar:a}=e;const o=null==(t=(0,s.Ko)())?void 0:t({toggleSidebar:a}),i=(0,s.ZC)(o),[l,c]=(0,r.useState)((()=>!1));(0,r.useEffect)((()=>{o&&!i&&c(!0)}),[o,i]);const u=!!o;return(0,r.useEffect)((()=>{u?n||c(!0):c(!1)}),[n,u]),{shown:l,hide:(0,r.useCallback)((()=>{c(!1)}),[]),content:o}}({sidebarShown:t,toggleSidebar:n});return r.createElement("div",{className:"navbar-sidebar"},r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(O.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title"}),!i.disabled&&r.createElement(_,{className:I.navbarSidebarToggle,checked:i.isDarkTheme,onChange:i.toggle}),r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:n},r.createElement(f,{color:"var(--ifm-color-emphasis-600)",className:I.navbarSidebarCloseSvg}))),r.createElement("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":c.shown})},r.createElement("div",{className:"navbar-sidebar__item menu"},r.createElement("ul",{className:"menu__list"},o.map(((e,t)=>r.createElement(R.A,(0,p.A)({mobile:!0},e,{onClick:n,key:t})))))),r.createElement("div",{className:"navbar-sidebar__item menu"},o.length>0&&r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__back",onClick:c.hide},r.createElement(l.A,{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")),c.content)))}const B=function(){const{navbar:{hideOnScroll:e,style:t}}=(0,s.pN)(),n=function(){const e=(0,P.A)(),t="mobile"===e,[n,a]=(0,r.useState)(!1);(0,s.$Z)((()=>{if(n)return a(!1),!1}));const o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===e&&a(!1)}),[e]),{shouldRender:t,toggle:o,shown:n}}(),o=j(),i=(0,L.vT)(),{navbarRef:l,isNavbarVisible:c}=A(e),u=F(),d=u.some((e=>"search"===e.type)),{leftItems:f,rightItems:h}=function(e){return{leftItems:e.filter((e=>"left"===(e.position??D))),rightItems:e.filter((e=>"right"===(e.position??D)))}}(u);return r.createElement("nav",{ref:l,className:(0,a.A)("navbar","navbar--fixed-top",{"navbar--dark":"dark"===t,"navbar--primary":"primary"===t,"navbar-sidebar--show":n.shown,[I.navbarHideable]:e,[I.navbarHidden]:e&&!c})},r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},((null==u?void 0:u.length)>0||i)&&r.createElement("button",{"aria-label":"Navigation bar toggle",className:"navbar__toggle clean-btn",type:"button",tabIndex:0,onClick:n.toggle,onKeyDown:n.toggle},r.createElement(N,null)),r.createElement(O.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title"}),f.map(((e,t)=>r.createElement(R.A,(0,p.A)({},e,{key:t}))))),r.createElement("div",{className:"navbar__items navbar__items--right"},h.map(((e,t)=>r.createElement(R.A,(0,p.A)({},e,{key:t})))),!o.disabled&&r.createElement(_,{className:I.toggle,checked:o.isDarkTheme,onChange:o.toggle}),!d&&r.createElement(y.A,null))),r.createElement("div",{role:"presentation",className:"navbar-sidebar__backdrop",onClick:n.toggle}),n.shouldRender&&r.createElement(M,{sidebarShown:n.shown,toggleSidebar:n.toggle}))};var z=n(5489),$=n(6025),U=n(6654);const q="footerLogoLink_SRtH";var G=n(6265),H=n(3679);function Q(e){let{to:t,href:n,label:a,prependBaseUrlToHref:o,...i}=e;const l=(0,$.A)(t),s=(0,$.A)(n,{forcePrependBaseUrl:!0});return r.createElement(z.A,(0,p.A)({className:"footer__link-item"},n?{href:o?s:n}:{to:l},i),n&&!(0,U.A)(n)?r.createElement("span",null,a,r.createElement(H.A,null)):a)}const V=e=>{let{sources:t,alt:n,width:a,height:o}=e;return r.createElement(G.A,{className:"footer__logo",alt:n,sources:t,width:a,height:o})};const W=function(){const{footer:e}=(0,s.pN)(),{copyright:t,links:n=[],logo:o={}}=e||{},i={light:(0,$.A)(o.src),dark:(0,$.A)(o.srcDark||o.src)};return e?r.createElement("footer",{className:(0,a.A)("footer",{"footer--dark":"dark"===e.style})},r.createElement("div",{className:"container"},n&&n.length>0&&r.createElement("div",{className:"row footer__links"},n.map(((e,t)=>r.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.createElement("div",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.createElement("ul",{className:"footer__items"},e.items.map(((e,t)=>e.html?r.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.createElement("li",{key:e.href||e.to,className:"footer__item"},r.createElement(Q,e))))):null)))),(o||t)&&r.createElement("div",{className:"footer__bottom text--center"},o&&(o.src||o.srcDark)&&r.createElement("div",{className:"margin-bottom--sm"},o.href?r.createElement(z.A,{href:o.href,className:q},r.createElement(V,{alt:o.alt,sources:i,width:o.width,height:o.height})):r.createElement(V,{alt:o.alt,sources:i})),t?r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}}):null))):null};var K=n(8193);const Y=(0,s.Wf)("theme"),X="light",Z="dark",J=e=>e===Z?Z:X,ee=e=>{(0,s.Wf)("theme").set(J(e))},te=()=>{const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.pN)(),[a,o]=(0,r.useState)((e=>K.A.canUseDOM?J(document.documentElement.getAttribute("data-theme")):J(e))(e)),i=(0,r.useCallback)((()=>{o(X),ee(X)}),[]),l=(0,r.useCallback)((()=>{o(Z),ee(Z)}),[]);return(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",J(a))}),[a]),(0,r.useEffect)((()=>{if(!t)try{const e=Y.get();null!==e&&o(J(e))}catch(e){console.error(e)}}),[t,o]),(0,r.useEffect)((()=>{t&&!n||window.matchMedia("(prefers-color-scheme: dark)").addListener((e=>{let{matches:t}=e;o(t?Z:X)}))}),[t,n]),{isDarkTheme:a===Z,setLightTheme:i,setDarkTheme:l}};var ne=n(493);const re=function(e){const{isDarkTheme:t,setLightTheme:n,setDarkTheme:a}=te();return r.createElement(ne.A.Provider,{value:{isDarkTheme:t,setLightTheme:n,setDarkTheme:a}},e.children)},ae="docusaurus.tab.",oe=()=>{const[e,t]=(0,r.useState)({}),n=(0,r.useCallback)(((e,t)=>{(0,s.Wf)(`${ae}${e}`).set(t)}),[]);return(0,r.useEffect)((()=>{try{const e={};(0,s.Eo)().forEach((t=>{if(t.startsWith(ae)){const n=t.substring(15);e[n]=(0,s.Wf)(t).get()}})),t(e)}catch(e){console.error(e)}}),[]),{tabGroupChoices:e,setTabGroupChoices:(e,r)=>{t((t=>({...t,[e]:r}))),n(e,r)}}},ie=(0,r.createContext)(void 0);const le=function(e){const{tabGroupChoices:t,setTabGroupChoices:n}=oe();return r.createElement(ie.Provider,{value:{tabGroupChoices:t,setTabGroupChoices:n}},e.children)};function se(e){let{children:t}=e;return r.createElement(re,null,r.createElement(s.oq,null,r.createElement(le,null,r.createElement(s.Tv,null,r.createElement(s.VQ,null,r.createElement(s.pM,null,t))))))}var ce=n(8895),ue=n(4586);function de(e){let{locale:t,version:n,tag:a}=e;return r.createElement(ce.A,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),a&&r.createElement("meta",{name:"docusaurus_tag",content:a}))}var pe=n(8139);function fe(){const{i18n:{defaultLocale:e,locales:t}}=(0,ue.A)(),n=(0,s.oK)();return r.createElement(ce.A,null,t.map((e=>r.createElement("link",{key:e,rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:e}))),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function he(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,ue.A)(),a=function(){const{siteConfig:{url:e}}=(0,ue.A)(),{pathname:t}=(0,i.zy)();return e+(0,$.A)(t)}(),o=t?`${n}${t}`:a;return r.createElement(ce.A,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function me(e){const{siteConfig:{favicon:t},i18n:{currentLocale:n,localeConfigs:a}}=(0,ue.A)(),{metadata:o,image:i}=(0,s.pN)(),{title:l,description:c,image:u,keywords:d,searchMetadata:f}=e,h=(0,$.A)(t),m=(0,s.s$)(l),g=n,b=a[n].direction;return r.createElement(r.Fragment,null,r.createElement(ce.A,null,r.createElement("html",{lang:g,dir:b}),t&&r.createElement("link",{rel:"shortcut icon",href:h}),r.createElement("title",null,m),r.createElement("meta",{property:"og:title",content:m}),r.createElement("meta",{name:"twitter:card",content:"summary_large_image"})),i&&r.createElement(pe.A,{image:i}),u&&r.createElement(pe.A,{image:u}),r.createElement(pe.A,{description:c,keywords:d}),r.createElement(he,null),r.createElement(fe,null),r.createElement(de,(0,p.A)({tag:s.Cy,locale:n},f)),r.createElement(ce.A,null,o.map(((e,t)=>r.createElement("meta",(0,p.A)({key:`metadata_${t}`},e))))))}const ge=function(){(0,r.useEffect)((()=>{const e="navigation-with-keyboard";function t(t){"keydown"===t.type&&"Tab"===t.key&&document.body.classList.add(e),"mousedown"===t.type&&document.body.classList.remove(e)}return document.addEventListener("keydown",t),document.addEventListener("mousedown",t),()=>{document.body.classList.remove(e),document.removeEventListener("keydown",t),document.removeEventListener("mousedown",t)}}),[])};function be(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(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(l.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}const ve=function(e){const{children:t,noFooter:n,wrapperClassName:i,pageClassName:l}=e;return ge(),r.createElement(se,null,r.createElement(me,e),r.createElement(d,null),r.createElement(v,null),r.createElement(B,null),r.createElement("div",{className:(0,a.A)(s.GN.wrapper.main,i,l)},r.createElement(o.A,{fallback:be},t)),!n&&r.createElement(W,null))}},1773:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(8168),a=n(6540),o=n(5489),i=n(6265),l=n(6025),s=n(4586),c=n(5965);const u=e=>{const{siteConfig:{title:t}}=(0,s.A)(),{navbar:{title:n,logo:u={src:""}}}=(0,c.pN)(),{imageClassName:d,titleClassName:p,...f}=e,h=(0,l.A)(u.href||"/"),m={light:(0,l.A)(u.src),dark:(0,l.A)(u.srcDark||u.src)},g=a.createElement(i.A,{sources:m,height:u.height,width:u.width,alt:u.alt||n||t});return a.createElement(o.A,(0,r.A)({to:h},f,u.target&&{target:u.target}),u.src&&(d?a.createElement("div",{className:d},g):a.createElement(a.Fragment,null,g)),null!=n&&a.createElement("b",{className:p},n))}},3031:(e,t,n)=>{"use strict";n.d(t,{A:()=>g,k:()=>f});var r=n(8168),a=n(6540),o=n(53),i=n(5489),l=n(6025),s=n(3679),c=n(6654),u=n(5965),d=n(1612);const p="dropdown__link--active";function f(e){var t;let{activeBasePath:n,activeBaseRegex:o,to:d,href:f,label:h,activeClassName:m="",prependBaseUrlToHref:g,...b}=e;const v=(0,l.A)(d),y=(0,l.A)(n),w=(0,l.A)(f,{forcePrependBaseUrl:!0}),k=h&&f&&!(0,c.A)(f),E=m===p;return a.createElement(i.A,(0,r.A)({},f?{href:g?w:f}:{isNavLink:!0,activeClassName:null!=(t=b.className)&&t.includes(m)?"":m,to:v,...n||o?{isActive:(e,t)=>o?(0,u.Gv)(o,t.pathname):t.pathname.startsWith(y)}:null},b),k?a.createElement("span",null,h,a.createElement(s.A,E&&{width:12,height:12})):h)}function h(e){let{className:t,isDropdownItem:n=!1,...i}=e;const l=a.createElement(f,(0,r.A)({className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t)},i));return n?a.createElement("li",null,l):l}function m(e){let{className:t,isDropdownItem:n,...i}=e;return a.createElement("li",{className:"menu__list-item"},a.createElement(f,(0,r.A)({className:(0,o.A)("menu__link",t)},i)))}const g=function(e){let{mobile:t=!1,position:n,...o}=e;const i=t?m:h;return a.createElement(i,(0,r.A)({},o,{activeClassName:o.activeClassName??(0,d.S)(t)}))}},8240:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(8168),a=n(6540),o=n(3031),i=n(4098),l=n(53),s=n(1612),c=n(5965);function u(e){let{docId:t,label:n,docsPluginId:u,...d}=e;const{activeVersion:p,activeDoc:f}=(0,i.zK)(u),{preferredVersion:h}=(0,c.g1)(u),m=(0,i.r7)(u),g=function(e,t){const n=e.flatMap((e=>e.docs)),r=n.find((e=>e.id===t));if(!r){const r=n.map((e=>e.id)).join("\n- ");throw new Error(`DocNavbarItem: couldn't find any doc with id "${t}" in version${e.length?"s":""} ${e.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${r}`)}return r}((0,c.sb)([p,h,m].filter(Boolean)),t),b=(0,s.S)(d.mobile);return a.createElement(o.A,(0,r.A)({exact:!0},d,{className:(0,l.A)(d.className,{[b]:(null==f?void 0:f.sidebar)&&f.sidebar===g.sidebar}),activeClassName:b,label:n??g.id,to:g.path}))}},7754:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(8168),a=n(6540),o=n(3031),i=n(1175),l=n(4098),s=n(5965),c=n(1312);const u=e=>e.docs.find((t=>t.id===e.mainDocId));function d(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:d,dropdownItemsBefore:p,dropdownItemsAfter:f,...h}=e;const m=(0,l.zK)(n),g=(0,l.jh)(n),b=(0,l.r7)(n),{preferredVersion:v,savePreferredVersionName:y}=(0,s.g1)(n);const w=function(){const e=g.map((e=>{const t=(null==m?void 0:m.alternateDocVersions[e.name])||u(e);return{isNavLink:!0,label:e.label,to:t.path,isActive:()=>e===(null==m?void 0:m.activeVersion),onClick:()=>{y(e.name)}}}));return[...p,...e,...f]}(),k=m.activeVersion??v??b,E=t&&w?(0,c.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):k.label,S=t&&w?void 0:u(k).path;return w.length<=1?a.createElement(o.A,(0,r.A)({},h,{mobile:t,label:E,to:S,isActive:d?()=>!1:void 0})):a.createElement(i.A,(0,r.A)({},h,{mobile:t,label:E,to:S,items:w,isActive:d?()=>!1:void 0}))}},6467:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),a=n(6540),o=n(3031),i=n(4098),l=n(5965);const s=e=>e.docs.find((t=>t.id===e.mainDocId));function c(e){let{label:t,to:n,docsPluginId:c,...u}=e;const d=(0,i.ir)(c),{preferredVersion:p}=(0,l.g1)(c),f=(0,i.r7)(c),h=d??p??f,m=t??h.label,g=n??s(h).path;return a.createElement(o.A,(0,r.A)({},u,{label:m,to:g}))}},1175:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(8168),a=n(6540),o=n(53),i=n(5965),l=n(3031),s=n(1612);const c="dropdown__link--active";function u(e,t){return e.some((e=>function(e,t){return!!(0,i.ys)(e.to,t)||!!(0,i.Gv)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function d(e){let{items:t,position:n,className:i,...u}=e;const d=(0,a.useRef)(null),p=(0,a.useRef)(null),[f,h]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{const e=e=>{d.current&&!d.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[d]),a.createElement("div",{ref:d,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":f})},a.createElement(l.k,(0,r.A)({className:(0,o.A)("navbar__link",i)},u,{onClick:u.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),h(!f))}}),u.children??u.label),a.createElement("ul",{ref:p,className:"dropdown__menu"},t.map(((e,n)=>a.createElement(s.A,(0,r.A)({isDropdownItem:!0,onKeyDown:e=>{if(n===t.length-1&&"Tab"===e.key){e.preventDefault(),h(!1);const t=d.current.nextElementSibling;t&&t.focus()}},activeClassName:c},e,{key:n}))))))}function p(e){let{items:t,className:n,position:c,...d}=e;const p=(0,i.BH)(),f=u(t,p),{collapsed:h,toggleCollapsed:m,setCollapsed:g}=(0,i.uW)({initialState:()=>!f});return(0,a.useEffect)((()=>{f&&g(!f)}),[p,f,g]),a.createElement("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":h})},a.createElement(l.k,(0,r.A)({role:"button",className:(0,o.A)("menu__link menu__link--sublist",n)},d,{onClick:e=>{e.preventDefault(),m()}}),d.children??d.label),a.createElement(i.Nt,{lazy:!0,as:"ul",className:"menu__list",collapsed:h},t.map(((e,t)=>a.createElement(s.A,(0,r.A)({mobile:!0,isDropdownItem:!0,onClick:d.onClick,activeClassName:"menu__link--active"},e,{key:t}))))))}const f=function(e){let{mobile:t=!1,...n}=e;const r=t?p:d;return a.createElement(r,n)}},1612:(e,t,n)=>{"use strict";n.d(t,{A:()=>b,S:()=>g});var r=n(6540),a=n(3031),o=n(1175),i=n(8168);const l=e=>{let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,i.A)({viewBox:"0 0 20 20",width:t,height:n,"aria-hidden":"true"},a),r.createElement("path",{fill:"currentColor",d:"M19.753 10.909c-.624-1.707-2.366-2.726-4.661-2.726-.09 0-.176.002-.262.006l-.016-2.063 3.525-.607c.115-.019.133-.119.109-.231-.023-.111-.167-.883-.188-.976-.027-.131-.102-.127-.207-.109-.104.018-3.25.461-3.25.461l-.013-2.078c-.001-.125-.069-.158-.194-.156l-1.025.016c-.105.002-.164.049-.162.148l.033 2.307s-3.061.527-3.144.543c-.084.014-.17.053-.151.143.019.09.19 1.094.208 1.172.018.08.072.129.188.107l2.924-.504.035 2.018c-1.077.281-1.801.824-2.256 1.303-.768.807-1.207 1.887-1.207 2.963 0 1.586.971 2.529 2.328 2.695 3.162.387 5.119-3.06 5.769-4.715 1.097 1.506.256 4.354-2.094 5.98-.043.029-.098.129-.033.207l.619.756c.08.096.206.059.256.023 2.51-1.73 3.661-4.515 2.869-6.683zm-7.386 3.188c-.966-.121-.944-.914-.944-1.453 0-.773.327-1.58.876-2.156a3.21 3.21 0 011.229-.799l.082 4.277a2.773 2.773 0 01-1.243.131zm2.427-.553l.046-4.109c.084-.004.166-.01.252-.01.773 0 1.494.145 1.885.361.391.217-1.023 2.713-2.183 3.758zm-8.95-7.668a.196.196 0 00-.196-.145h-1.95a.194.194 0 00-.194.144L.008 16.916c-.017.051-.011.076.062.076h1.733c.075 0 .099-.023.114-.072l1.008-3.318h3.496l1.008 3.318c.016.049.039.072.113.072h1.734c.072 0 .078-.025.062-.076-.014-.05-3.083-9.741-3.494-11.04zm-2.618 6.318l1.447-5.25 1.447 5.25H3.226z"}))};var s=n(4586),c=n(5965);const u="iconLanguage_EbrZ";function d(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...d}=e;const{i18n:{currentLocale:p,locales:f,localeConfigs:h}}=(0,s.A)(),m=(0,c.oK)();function g(e){return h[e].label}const b=[...n,...f.map((e=>{const t=`pathname://${m.createUrl({locale:e,fullyQualified:!1})}`;return{isNavLink:!0,label:g(e),to:t,target:"_self",autoAddBaseUrl:!1,className:e===p?"dropdown__link--active":"",style:{textTransform:"capitalize"}}})),...a],v=t?"Languages":g(p);return r.createElement(o.A,(0,i.A)({},d,{href:"#",mobile:t,label:r.createElement("span",null,r.createElement(l,{className:u}),r.createElement("span",null,v)),items:b}))}var p=n(3338);function f(e){let{mobile:t}=e;return t?null:r.createElement(p.A,null)}const h={default:()=>a.A,localeDropdown:()=>d,search:()=>f,dropdown:()=>o.A,docsVersion:()=>n(6467).A,docsVersionDropdown:()=>n(7754).A,doc:()=>n(8240).A},m=e=>{const t=h[e];if(!t)throw new Error(`No NavbarItem component found for type "${e}".`);return t()};const g=e=>e?"menu__link--active":"navbar__link--active";function b(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:t?"dropdown":"default"}(t,void 0!==n.items),o=m(a);return r.createElement(o,n)}},8139:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(6540),a=n(8895),o=n(5965),i=n(6025);function l(e){let{title:t,description:n,keywords:l,image:s,children:c}=e;const u=(0,o.s$)(t),{withBaseUrl:d}=(0,i.h)(),p=s?d(s,{absolute:!0}):void 0;return r.createElement(a.A,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}),l&&r.createElement("meta",{name:"keywords",content:Array.isArray(l)?l.join(","):l}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),c)}},493:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(6540).createContext(void 0)},6265:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),a=n(6540),o=n(53),i=n(2303),l=n(4785);const s={themedImage:"themedImage_TMUO","themedImage--light":"themedImage--light_4Vu1","themedImage--dark":"themedImage--dark_uzRr"},c=e=>{const t=(0,i.A)(),{isDarkTheme:n}=(0,l.A)(),{sources:c,className:u,alt:d="",...p}=e,f=t?n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,f.map((e=>a.createElement("img",(0,r.A)({key:e,src:c[e],alt:d,className:(0,o.A)(s.themedImage,s[`themedImage--${e}`],u)},p)))))}},4098:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>r.Gy,HW:()=>r.HW,ht:()=>r.ht,ir:()=>r.ir,jh:()=>r.jh,r7:()=>r.r7,vT:()=>r.vT,zK:()=>r.zK});var r=n(727)},4785:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(493);const o=function(){const e=(0,r.useContext)(a.A);if(null==e)throw new Error('"useThemeContext" is used outside of "Layout" component. Please see https://docusaurus.io/docs/api/themes/configuration#usethemecontext.');return e}},9312:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return a.A.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}const s=function(){const[e,t]=(0,r.useState)((()=>l()));return(0,r.useEffect)((()=>{function e(){t(l())}return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),e}},9567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(8193),a=n(5091);const o=e=>{if(r.A.canUseDOM){const{themeConfig:{prism:t={}}}=a.default,{additionalLanguages:r=[]}=t;window.Prism=e,r.forEach((e=>{n(8692)(`./prism-${e}`)})),delete window.Prism}}},6725:(e,t,n)=>{"use strict";var r=a(n(1258));function a(e){return e&&e.__esModule?e:{default:e}}(0,a(n(9567)).default)(r.default)},5965:(e,t,n)=>{"use strict";n.d(t,{oq:()=>Ae,Nt:()=>X,Cy:()=>_,B_:()=>oe,VQ:()=>ge,Gh:()=>ue,pM:()=>le,Tv:()=>Ue,GN:()=>ke,Wf:()=>c,tU:()=>T,Gv:()=>Qe,ys:()=>P,Eo:()=>u,QW:()=>Oe,wt:()=>E,Op:()=>S,Li:()=>x,bi:()=>Re,sb:()=>we,oK:()=>p,Mj:()=>Ce,uW:()=>q,g1:()=>ye,$Z:()=>Ne,BH:()=>Pe,$G:()=>z,Ko:()=>ce,Ww:()=>F,ZC:()=>B,Mq:()=>He,WQ:()=>Be,i3:()=>je,pN:()=>a,s$:()=>L});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}const o="localStorage";function i(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,l||(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),l=!0),null}var t}let l=!1;const s={get:()=>null,set:()=>{},del:()=>{}};const c=(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}}(e);const n=i(null==t?void 0:t.persistence);return null===n?s:{get:()=>n.getItem(e),set:t=>n.setItem(e,t),del:()=>n.removeItem(e)}};function u(e){void 0===e&&(e=o);const t=i(e);if(!t)return[];const n=[];for(let r=0;r<t.length;r+=1){const e=t.key(r);null!==e&&n.push(e)}return n}var d=n(6347);function p(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:a}}=(0,r.A)(),{pathname:o}=(0,d.zy)(),i=a===n?e:e.replace(`/${a}/`,"/"),l=o.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return`${a?t:""}${function(e){return e===n?`${i}`:`${i}${e}/`}(r)}${l}`}}}var f=n(8426),h=n.n(f);const m=/title=(["'])(.*?)\1/,g=/{([\d,-]+)}/,b=["js","jsBlock","jsx","python","html"],v={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},python:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},y=["highlight-next-line","highlight-start","highlight-end"],w=function(e){void 0===e&&(e=b);const t=e.map((e=>{const{start:t,end:n}=v[e];return`(?:${t}\\s*(${y.join("|")})\\s*${n})`})).join("|");return new RegExp(`^\\s*(?:${t})\\s*$`)},k=e=>{switch(e){case"js":case"javascript":case"ts":case"typescript":return w(["js","jsBlock"]);case"jsx":case"tsx":return w(["js","jsBlock","jsx"]);case"html":return w(["js","jsBlock","html"]);case"python":case"py":return w(["python"]);default:return w()}};function E(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.match(m))||void 0===t?void 0:t[2])&&void 0!==n?n:""}function S(e){const t=null==e?void 0:e.split(" ").find((e=>e.startsWith("language-")));return null==t?void 0:t.replace(/language-/,"")}function x(e,t,n){let r=e.replace(/\n$/,"");if(t&&g.test(t)){const e=t.match(g)[1];return{highlightLines:h()(e).filter((e=>e>0)).map((e=>e-1)),code:r}}if(void 0===n)return{highlightLines:[],code:r};const a=k(n),o=r.split("\n");let i,l="";for(let c=0;c<o.length;){const e=o[c].match(a);if(null!==e){switch(e.slice(1).find((e=>void 0!==e))){case"highlight-next-line":l+=`${c},`;break;case"highlight-start":i=c;break;case"highlight-end":l+=`${i}-${c-1},`}o.splice(c,1)}else c+=1}const s=h()(l);return r=o.join("\n"),{highlightLines:s,code:r}}const _="default";function T(e,t){return`docs-${e}-${t}`}var A=n(4098);const C=!!A.Gy,P=(e,t)=>{const n=e=>!e||(null==e?void 0:e.endsWith("/"))?e:`${e}/`;return n(e)===n(t)},L=e=>{const{siteConfig:t}=(0,r.A)(),{title:n,titleDelimiter:a}=t;return e&&e.trim().length?`${e.trim()} ${a} ${n}`:n};var R=n(6540);const O=["zero","one","two","few","many","other"];function N(e){return O.filter((t=>e.includes(t)))}const I={locale:"en",pluralForms:N(["one","other"]),select:e=>1===e?"one":"other"};function D(){const{i18n:{currentLocale:e}}=(0,r.A)();return(0,R.useMemo)((()=>{if(!Intl.PluralRules)return console.error("Intl.PluralRules not available!\nDocusaurus will fallback to a default/fallback (English) Intl.PluralRules implementation.\n "),I;try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:N(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to a default/fallback (English) Intl.PluralRules implementation.\n`),I}}),[e])}function F(){const e=D();return{selectMessage:(t,n)=>function(e,t,n){const r=e.split("|");if(1===r.length)return r[0];{r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms}), but the message contains ${r.length} plural forms: ${e} `);const a=n.select(t),o=n.pluralForms.indexOf(a);return r[Math.min(o,r.length-1)]}}(n,t,e)}}const j="undefined"!=typeof window?R.useLayoutEffect:R.useEffect;function M(e){const t=(0,R.useRef)(e);return j((()=>{t.current=e}),[e]),(0,R.useCallback)((function(){return t.current(...arguments)}),[])}function B(e){const t=(0,R.useRef)();return j((()=>{t.current=e})),t.current}function z(e){const t=(0,d.zy)(),n=B(t),r=M(e);(0,R.useEffect)((()=>{r({location:t,previousLocation:n})}),[r,t,n])}var $=n(8193);const U="ease-in-out";function q(e){let{initialState:t}=e;const[n,r]=(0,R.useState)(null!=t&&t),a=(0,R.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:a}}const G={display:"none",overflow:"hidden",height:"0px"},H={display:"block",overflow:"visible",height:"auto"};function Q(e,t){const n=t?G:H;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function V(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const a=(0,R.useRef)(!1);(0,R.useEffect)((()=>{const e=t.current;function o(){var t,n;const a=e.scrollHeight,o=null!==(t=null==r?void 0:r.duration)&&void 0!==t?t:function(e){const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(a);return{transition:`height ${o}ms ${null!==(n=null==r?void 0:r.easing)&&void 0!==n?n:U}`,height:`${a}px`}}function i(){const t=o();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return Q(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(i(),requestAnimationFrame((()=>{e.style.height=G.height,e.style.overflow=G.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{i()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function W(e){if(!$.A.canUseDOM)return e?G:H}function K(e){let{as:t="div",collapsed:n,children:r,animation:a,onCollapseTransitionEnd:o,className:i,disableSSRStyle:l}=e;const s=(0,R.useRef)(null);return V({collapsibleRef:s,collapsed:n,animation:a}),R.createElement(t,{ref:s,style:l?void 0:W(n),onTransitionEnd:e=>{"height"===e.propertyName&&(Q(s.current,n),null==o||o(n))},className:i},r)}function Y(e){let{collapsed:t,...n}=e;const[r,a]=(0,R.useState)(!t);(0,R.useLayoutEffect)((()=>{t||a(!0)}),[t]);const[o,i]=(0,R.useState)(t);return(0,R.useLayoutEffect)((()=>{r&&i(t)}),[r,t]),r?R.createElement(K,{...n,collapsed:o}):null}function X(e){let{lazy:t,...n}=e;const r=t?Y:K;return R.createElement(r,{...n})}var Z=n(2303),J=n(53);const ee="details_Q743",te="isBrowser_rWTL",ne="collapsibleContent_K5uX";function re(e){return!!e&&("SUMMARY"===e.tagName||re(e.parentElement))}function ae(e,t){return!!e&&(e===t||ae(e.parentElement,t))}const oe=e=>{let{summary:t,children:n,...r}=e;const a=(0,Z.A)(),o=(0,R.useRef)(null),{collapsed:i,setCollapsed:l}=q({initialState:!r.open}),[s,c]=(0,R.useState)(r.open);return R.createElement("details",{...r,ref:o,open:s,"data-collapsed":i,className:(0,J.A)(ee,{[te]:a},r.className),onMouseDown:e=>{re(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;re(t)&&ae(t,o.current)&&(e.preventDefault(),i?(l(!1),c(!0)):l(!0))}},t,R.createElement(X,{lazy:!1,collapsed:i,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{l(e),c(!e)}},R.createElement("div",{className:ne},n)))};const ie=(0,R.createContext)(null);function le(e){let{children:t}=e;return R.createElement(ie.Provider,{value:(0,R.useState)(null)},t)}function se(){const e=(0,R.useContext)(ie);if(null===e)throw new Error("MobileSecondaryMenuProvider was not used correctly, context value is null");return e}function ce(){const[e]=se();if(e){const t=e.component;return function(n){return R.createElement(t,{...e.props,...n})}}return()=>{}}function ue(e){let{component:t,props:n}=e;const[,r]=se(),a=(o=n,(0,R.useMemo)((()=>o),[...Object.keys(o),...Object.values(o)]));var o;return(0,R.useEffect)((()=>{r({component:t,props:a})}),[r,t,a]),(0,R.useEffect)((()=>()=>r(null)),[r]),null}const de=e=>`docs-preferred-version-${e}`,pe={save:(e,t,n)=>{c(de(e),{persistence:t}).set(n)},read:(e,t)=>c(de(e),{persistence:t}).get(),clear:(e,t)=>{c(de(e),{persistence:t}).del()}};function fe(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;const a={};return t.forEach((e=>{a[e]=function(e){const t=pe.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(pe.clear(e,n),{preferredVersionName:null})}(e)})),a}function he(){const e=(0,A.Gy)(),t=a().docs.versionPersistence,n=(0,R.useMemo)((()=>Object.keys(e)),[e]),[r,o]=(0,R.useState)((()=>function(e){const t={};return e.forEach((e=>{t[e]={preferredVersionName:null}})),t}(n)));(0,R.useEffect)((()=>{o(fe({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[r,(0,R.useMemo)((()=>({savePreferredVersion:function(e,n){pe.save(e,t,n),o((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}const me=(0,R.createContext)(null);function ge(e){let{children:t}=e;return C?R.createElement(be,null,t):R.createElement(R.Fragment,null,t)}function be(e){let{children:t}=e;const n=he();return R.createElement(me.Provider,{value:n},t)}var ve=n(7065);function ye(e){void 0===e&&(e=ve.W);const t=(0,A.ht)(e),[n,r]=function(){const e=(0,R.useContext)(me);if(!e)throw new Error('Can\'t find docs preferred context, maybe you forgot to use the "DocsPreferredVersionContextProvider"?');return e}(),{preferredVersionName:a}=n[e];return{preferredVersion:a?t.versions.find((e=>e.name===a)):null,savePreferredVersionName:(0,R.useCallback)((t=>{r.savePreferredVersion(e,t)}),[r,e])}}function we(e){return Array.from(new Set(e))}const ke={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"},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",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",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:{}},Ee=c("docusaurus.announcement.dismiss"),Se=c("docusaurus.announcement.id"),xe=()=>"true"===Ee.get(),_e=e=>Ee.set(String(e)),Te=(0,R.createContext)(null),Ae=e=>{let{children:t}=e;const n=(()=>{const{announcementBar:e}=a(),t=(0,Z.A)(),[n,r]=(0,R.useState)((()=>!!t&&xe()));(0,R.useEffect)((()=>{r(xe())}),[]);const o=(0,R.useCallback)((()=>{_e(!0),r(!0)}),[]);return(0,R.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=Se.get();"annoucement-bar"===n&&(n="announcement-bar");const a=t!==n;Se.set(t),a&&_e(!1),!a&&xe()||r(!1)}),[e]),(0,R.useMemo)((()=>({isActive:!!e&&!n,close:o})),[e,n,o])})();return R.createElement(Te.Provider,{value:n},t)},Ce=()=>{const e=(0,R.useContext)(Te);if(!e)throw new Error("useAnnouncementBar(): AnnouncementBar not found in React context: make sure to use the AnnouncementBarProvider on top of the tree");return e};function Pe(){const{siteConfig:{baseUrl:e}}=(0,r.A)(),{pathname:t}=(0,d.zy)();return t.replace(e,"/")}var Le=n(1312);const Re=()=>(0,Le.T)({id:"theme.tags.tagsPageTitle",message:"Tags",description:"The title of the tag list page"});function Oe(e){const t={};return Object.values(e).forEach((e=>{var n;const r=function(e){return e[0].toUpperCase()}(e.name);t[r]=null!==(n=t[r])&&void 0!==n?n:[],t[r].push(e)})),Object.entries(t).sort(((e,t)=>{let[n]=e,[r]=t;return n.localeCompare(r)})).map((e=>{let[t,n]=e;return{letter:t,tags:n.sort(((e,t)=>e.name.localeCompare(t.name)))}}))}function Ne(e){!function(e){const{block:t}=(0,d.W6)(),n=(0,R.useRef)(e);(0,R.useEffect)((()=>{n.current=e}),[e]),(0,R.useEffect)((()=>t(((e,t)=>n.current(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function Ie(e){const t=e.getBoundingClientRect();return t.top===t.bottom?Ie(e.parentNode):t}function De(e,t){let{anchorTopOffset:n}=t;var r;const a=e.find((e=>Ie(e).top>=n));if(a){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(Ie(a))?a:null!==(r=e[e.indexOf(a)-1])&&void 0!==r?r:null}return e[e.length-1]}function Fe(){const e=(0,R.useRef)(0),{navbar:{hideOnScroll:t}}=a();return(0,R.useEffect)((()=>{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}const je=function(e){const t=(0,R.useRef)(void 0),n=Fe();(0,R.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:r,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:i}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(r),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const r=[];for(let a=t;a<=n;a+=1)r.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(r.join()))}({minHeadingLevel:o,maxHeadingLevel:i}),s=De(l,{anchorTopOffset:n.current}),c=e.find((e=>s&&s.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){var r;n?(t.current&&t.current!==e&&(null===(r=t.current)||void 0===r||r.classList.remove(a)),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===c)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])};function Me(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:r}=e;return t.flatMap((e=>{const t=Me({toc:e.children,minHeadingLevel:n,maxHeadingLevel:r});return function(e){return e.level>=n&&e.level<=r}(e)?[{...e,children:t}]:t}))}function Be(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:r}=e;return(0,R.useMemo)((()=>Me({toc:t,minHeadingLevel:n,maxHeadingLevel:r})),[t,n,r])}function ze(){const e=(0,R.useRef)(!0);return(0,R.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}const $e=(0,R.createContext)(void 0);function Ue(e){let{children:t}=e;return R.createElement($e.Provider,{value:ze()},t)}function qe(){const e=(0,R.useContext)($e);if(null==e)throw new Error('"useScrollController" is used but no context provider was found in the React tree.');return e}const Ge=()=>$.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function He(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=qe(),r=(0,R.useRef)(Ge()),a=M(e);(0,R.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=Ge();a&&a(e,r.current),r.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function Qe(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}},2983:(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)}},440: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.applyTrailingSlash=void 0;var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}})},2849:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540),a=n(53);const o={loadingRing:"loadingRing_Zg7X","loading-ring":"loading-ring_rO2c"};function i(e){let{className:t}=e;return r.createElement("div",{className:(0,a.A)(o.loadingRing,t)},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null))}},5891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(8291),a=n.n(r),o=n(1088);async function i(e){{const t=await(await fetch(`${e}search-index.json?_=${o.Xi}`)).json(),n=t.map(((e,t)=>{let{documents:n,index:r}=e;return{type:t,documents:n,index:a().Index.load(r)}})),r=t.reduce(((e,t)=>{for(const n of t.index.invertedIndex)/\p{Unified_Ideograph}/u.test(n[0][0])&&e.add(n[0]);return e}),new Set);return{wrappedIndexes:n,zhDictionary:Array.from(r)}}}},3338:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=n(1088),a=n(6540),o=n(53),i=n(4586),l=n(8193),s=n(6347),c=n(5891),u=n(2384),d=n(6841),p=n(3810),f=n(7674);const h='<svg width="20" height="20" viewBox="0 0 20 20"><path d="M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round"></path></svg>',m='<svg width="20" height="20" viewBox="0 0 20 20"><path d="M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg>',g='<svg width="20" height="20" viewBox="0 0 20 20"><path d="M17 5H3h14zm0 5H3h14zm0 5H3h14z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round"></path></svg>',b='<svg width="20" height="20" viewBox="0 0 20 20"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M18 3v4c0 2-2 4-4 4H2"></path><path d="M8 17l-6-6 6-6"></path></g></svg>',v='<svg width="40" height="40" viewBox="0 0 20 20" fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"></path></svg>',y='<svg viewBox="0 0 24 54"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M8 6v42M20 27H8.3"></path></g></svg>',w='<svg viewBox="0 0 24 54"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M8 6v21M20 27H8.3"></path></g></svg>',k={searchBar:"searchBar_DBlZ",dropdownMenu:"dropdownMenu_0bDV",suggestion:"suggestion_uMTE",cursor:"cursor_PFw8",hitTree:"hitTree_v+XL",hitIcon:"hitIcon_rLCp",hitPath:"hitPath_gCTv",noResultsIcon:"noResultsIcon_jKPf",hitFooter:"hitFooter_9rOv",hitWrapper:"hitWrapper_RTFf",hitTitle:"hitTitle_4Fan",hitAction:"hitAction_ETy-",hideAction:"hideAction_KhBz",noResults:"noResults_iBoj",searchBarContainer:"searchBarContainer_I7kZ",searchBarLoadingRing:"searchBarLoadingRing_J5Ez",searchIndexLoading:"searchIndexLoading_oVRS",searchHintContainer:"searchHintContainer_CDc6",searchHint:"searchHint_2RRg",input:"input_e95Y",hint:"hint_S1nb",suggestions:"suggestions_Gb5D",dataset:"dataset_N4X9",empty:"empty_i1dZ"};function E(e){let{document:t,type:n,page:r,metadata:a,tokens:o,isInterOfTree:i,isLastOfTree:l}=e;const s=0===n,c=1===n,u=[];i?u.push(y):l&&u.push(w);const v=u.map((e=>`<span class="${k.hitTree}">${e}</span>`)),E=`<span class="${k.hitIcon}">${s?h:c?m:g}</span>`,S=[`<span class="${k.hitTitle}">${(0,p.C)(t.t,(0,f.g)(a,"t"),o)}</span>`];s||S.push(`<span class="${k.hitPath}">${(0,d.Z)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),o)}</span>`);const x=`<span class="${k.hitAction}">${b}</span>`;return[...v,E,`<span class="${k.hitWrapper}">`,...S,"</span>",x].join("")}function S(){return`<span class="${k.noResults}"><span class="${k.noResultsIcon}">${v}</span><span>${r.P9.no_results}</span></span>`}var x=n(2849);async function _(){const e=await Promise.all([n.e(489),n.e(5741)]).then(n.t.bind(n,489,23)),t=e.default;return t.noConflict?t.noConflict():e.noConflict&&e.noConflict(),t}const T="_highlight";const A=function(e){var t;let{handleSearchBarToggle:n}=e;const{siteConfig:{baseUrl:d}}=(0,i.A)(),p=(0,s.W6)(),f=(0,s.zy)(),h=(0,a.useRef)(null),m=(0,a.useRef)("empty"),g=(0,a.useRef)(!1),[b,v]=(0,a.useState)(!1),[y,w]=(0,a.useState)(!1),A=(0,a.useCallback)((async()=>{if("empty"!==m.current)return;m.current="loading",v(!0);const[{wrappedIndexes:e,zhDictionary:t},n]=await Promise.all([(0,c.Z)(d),_()]),a=n(h.current,{hint:!1,autoselect:!0,cssClasses:{root:k.searchBar,noPrefix:!0,dropdownMenu:k.dropdownMenu,input:k.input,hint:k.hint,suggestions:k.suggestions,suggestion:k.suggestion,cursor:k.cursor,dataset:k.dataset,empty:k.empty}},[{source:(0,u.m)(e,t,r.AT),templates:{suggestion:E,empty:S,footer:e=>{let{query:t,isEmpty:n}=e;if(n)return;const o=document.createElement("a"),i=`${d}search?q=${encodeURIComponent(t)}`;o.href=i,o.textContent=r.P9.see_all_results,o.addEventListener("click",(e=>{e.ctrlKey||e.metaKey||(e.preventDefault(),a.autocomplete.close(),p.push(i))}));const l=document.createElement("div");return l.className=k.hitFooter,l.appendChild(o),l}}}]).on("autocomplete:selected",(function(e,t){let{document:{u:n,h:a},tokens:o}=t,i=n;if(r.CU&&o.length>0){const e=new URLSearchParams;for(const t of o)e.append(T,t);i+=`?${e.toString()}`}a&&(i+=a),p.push(i)}));if(m.current="done",v(!1),g.current){const e=h.current;e.value&&a.autocomplete.open(),e.focus()}}),[d,p]);(0,a.useEffect)((()=>{if(!r.CU)return;const e=l.A.canUseDOM?new URLSearchParams(f.search).getAll(T):[];0!==e.length&&setTimeout((()=>{const t=document.querySelector("article");if(!t)return;const n=new r.CU(t);n.unmark(),n.mark(e)}))}),[f.search]);const C=(0,a.useCallback)((()=>{g.current=!0,A(),null==n||n(!0)}),[n,A]),P=(0,a.useCallback)((()=>{null==n||n(!1)}),[n]),L=(0,a.useCallback)((()=>{A()}),[A]),R=(0,a.useCallback)((e=>{e.target.value&&w(!0)}),[]),O=!!l.A.canUseDOM&&/mac/i.test((null==(t=navigator.userAgentData)?void 0:t.platform)??navigator.platform);return(0,a.useEffect)((()=>{function e(e){var t;(O?e.metaKey:e.ctrlKey)&&"KeyK"===e.code&&(e.preventDefault(),null==(t=h.current)||t.focus())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[O]),a.createElement("div",{className:(0,o.A)("navbar__search",k.searchBarContainer,{[k.searchIndexLoading]:b&&y})},a.createElement("input",{placeholder:r.P9.search_placeholder,"aria-label":"Search",className:"navbar__search-input",onMouseEnter:L,onFocus:C,onBlur:P,onChange:R,ref:h}),a.createElement(x.A,{className:k.searchBarLoadingRing}),a.createElement("div",{className:k.searchHintContainer},a.createElement("kbd",{className:k.searchHint},O?"\u2318":"ctrl"),a.createElement("kbd",{className:k.searchHint},"K")))}},2384:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(8291),a=n.n(r);var o=n(1088);function i(e){return l(e).concat(l(e.filter((e=>{const t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function l(e,t){return e.map((e=>({tokens:e.map((e=>e.value)),term:e.map((e=>({value:e.value,presence:a().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?a().Query.wildcard.TRAILING:a().Query.wildcard.NONE})))})))}function s(e,t,n){return function(r,l){const s=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return a()[t[0]].tokenizer(e).map((e=>e.toString()));let n=/[^-\s]+/g;return t.includes("zh")&&(n=/\w+|\p{Unified_Ideograph}+/gu),e.toLowerCase().match(n)||[]}(r,o.BH);if(0===s.length)return void l([]);const c=function(e,t){const n=function(e,t){const n=[];return function e(r,a){if(0===r.length)return void n.push(a);const o=r[0];if(/\p{Unified_Ideograph}/u.test(o)){const n=function(e,t){const n=[];return function e(r,a){let o=0,i=!1;for(const l of t)if(r.substr(0,l.length)===l){const t={missed:a.missed,term:a.term.concat({value:l})};r.length>l.length?e(r.substr(l.length),t):n.push(t),i=!0}else for(let t=l.length-1;t>o;t-=1){const s=l.substr(0,t);if(r.substr(0,t)===s){o=t;const l={missed:a.missed,term:a.term.concat({value:s,trailing:!0})};r.length>t?e(r.substr(t),l):n.push(l),i=!0;break}}i||(r.length>0?e(r.substr(1),{missed:a.missed+1,term:a.term}):a.term.length>0&&n.push(a))}(e,{missed:0,term:[]}),n.sort(((e,t)=>{const n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((e=>e.term))}(o,t);for(const t of n){const n=a.concat(...t);e(r.slice(1),n)}}else{const t=a.concat({value:o});e(r.slice(1),t)}}(e,[]),n}(e,t);if(0===n.length)return[{tokens:e,term:e.map((e=>({value:e,presence:a().Query.presence.REQUIRED,wildcard:a().Query.wildcard.LEADING|a().Query.wildcard.TRAILING})))}];for(const a of n)a[a.length-1].maybeTyping=!0;const r=[];for(const i of o.BH)if("en"===i)o.sx||r.unshift(a().stopWordFilter);else{const e=a()[i];e.stopWordFilter&&r.unshift(e.stopWordFilter)}let l;if(r.length>0){const e=e=>r.reduce(((e,t)=>e.filter((e=>t(e.value)))),e);l=[];const t=[];for(const r of n){const n=e(r);l.push(n),n.length<r.length&&n.length>0&&t.push(n)}n.push(...t)}else l=n.slice();const s=[];for(const a of l)if(a.length>2)for(let e=a.length-1;e>=0;e-=1)s.push(a.slice(0,e).concat(a.slice(e+1)));return i(n).concat(i(s))}(s,t),u=[];e:for(const{term:t,tokens:a}of c)for(const{documents:r,index:o,type:i}of e)if(u.push(...o.query((e=>{for(const n of t)e.term(n.value,{wildcard:n.wildcard,presence:n.presence})})).slice(0,n).filter((e=>!u.some((t=>t.document.i.toString()===e.ref)))).slice(0,n-u.length).map((t=>{const n=r.find((e=>e.i.toString()===t.ref));return{document:n,type:i,page:0!==i&&e[0].documents.find((e=>e.i===n.p)),metadata:t.matchData.metadata,tokens:a,score:t.score}}))),u.length>=n)break e;!function(e){e.forEach(((e,t)=>{e.index=t})),e.sort(((t,n)=>{let r=t.type>0&&t.page?e.findIndex((e=>e.document===t.page)):t.index,a=n.type>0&&n.page?e.findIndex((e=>e.document===n.page)):n.index;return-1===r&&(r=t.index),-1===a&&(a=n.index),r===a?0===t.type?-1:0===n.type?1:t.index-n.index:r-a}))}(u),function(e){e.forEach(((t,n)=>{n>0&&t.page&&e.some((e=>e.document===t.page))&&(n<e.length-1&&e[n+1].page===t.page?t.isInterOfTree=!0:t.isLastOfTree=!0)}))}(u),l(u)}}},3103:(e,t,n)=>{"use strict";function r(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{Z:()=>r})},7674:(e,t,n)=>{"use strict";function r(e,t){const n=[];for(const r of Object.values(e))r[t]&&n.push(...r[t].position);return n.sort(((e,t)=>e[0]-t[0]||t[1]-e[1]))}n.d(t,{g:()=>r})},6841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(3103);function a(e,t,n){const o=[];for(const i of t){const n=e.toLowerCase().indexOf(i);if(n>=0){n>0&&o.push(a(e.substr(0,n),t)),o.push(`<mark>${(0,r.Z)(e.substr(n,i.length))}</mark>`);const l=n+i.length;l<e.length&&o.push(a(e.substr(l),t));break}}return 0===o.length?n?`<mark>${(0,r.Z)(e)}</mark>`:(0,r.Z)(e):o.join("")}},3810:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(3103),a=n(6841);const o=/\w+|\p{Unified_Ideograph}/u;function i(e){const t=[];let n=0,r=e;for(;r.length>0;){const a=r.match(o);if(!a){t.push(r);break}a.index>0&&t.push(r.substr(0,a.index)),t.push(a[0]),n+=a.index+a[0].length,r=e.substr(n)}return t}var l=n(1088);function s(e,t,n,r){void 0===r&&(r=l.rG);const a={chunkIndex:-1},o=c(e,t,n,0,0,a),i=o.slice(0,a.chunkIndex),s=o[a.chunkIndex],u=[s.html],d=o.slice(a.chunkIndex+1);let p=s.textLength,f=0,h=0,m=!1,g=!1;for(;p<r;)if((f<=h||0===d.length)&&i.length>0){const e=i.pop();p+e.textLength<=r?(u.unshift(e.html),f+=e.textLength,p+=e.textLength):(m=!0,i.length=0)}else{if(!(d.length>0))break;{const e=d.shift();p+e.textLength<=r?(u.push(e.html),h+=e.textLength,p+=e.textLength):(g=!0,d.length=0)}}return(m||i.length>0)&&u.unshift("\u2026"),(g||d.length>0)&&u.push("\u2026"),u.join("")}function c(e,t,n,o,l,s){const u=[],[d,p]=t[o];if(d<l)(o+=1)<t.length&&u.push(...c(e,t,n,o,l));else{d>l&&u.push(...i(e.substring(l,d)).map((e=>({html:(0,r.Z)(e),textLength:e.length})))),s&&(s.chunkIndex=u.length),u.push({html:(0,a.Z)(e.substr(d,p),n,!0),textLength:p});const f=d+p;(o+=1)<t.length?u.push(...c(e,t,n,o,f)):f<e.length&&u.push(...i(e.substr(f)).map((e=>({html:(0,r.Z)(e),textLength:e.length}))))}return u}},1088:(e,t,n)=>{"use strict";n.d(t,{CU:()=>o,Xi:()=>i,BH:()=>r,sx:()=>a,rG:()=>s,AT:()=>l,P9:()=>c});n(8291);const r=["en"],a=!1,o=null,i="1e283c2b",l=8,s=50,c={search_placeholder:"Search",see_all_results:"See all results",no_results:"No results.",search_results_for:'Search results for "{{ keyword }}"',search_the_documentation:"Search the documentation",count_documents_found_plural:"{{ count }} documents found",count_documents_found:"{{ count }} document found",no_documents_were_found:"No documents were found"}},53:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}n.d(t,{A:()=>a});const a=function(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}},9231:(e,t,n)=>{"use strict";n.d(t,{zR:()=>S,TM:()=>P,yJ:()=>m,sC:()=>R,AO:()=>h,Fu:()=>g});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],l=e&&a(e),s=t&&a(t),c=l||s;if(e&&a(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var u=i[i.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,p=i.length;p>=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),a=l(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var c=n(1561);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function f(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function m(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}var w="popstate",k="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function S(e){void 0===e&&(e={}),v||(0,c.A)(!1);var t,n=window.history,a=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,l=i.forceRefresh,s=void 0!==l&&l,d=i.getUserConfirmation,g=void 0===d?y:d,S=i.keyLength,x=void 0===S?6:S,_=e.basename?f(u(e.basename)):"";function T(e){var t=e||{},n=t.key,r=t.state,a=window.location,o=a.pathname+a.search+a.hash;return _&&(o=p(o,_)),m(o,r,n)}function A(){return Math.random().toString(36).substr(2,x)}var C=b();function P(e){(0,r.A)($,e),$.length=n.length,C.notifyListeners($.location,$.action)}function L(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(T(e.state))}function R(){N(T(E()))}var O=!1;function N(e){if(O)O=!1,P();else{C.confirmTransitionTo(e,"POP",g,(function(t){t?P({action:"POP",location:e}):function(e){var t=$.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(O=!0,j(a))}(e)}))}}var I=T(E()),D=[I.key];function F(e){return _+h(e)}function j(e){n.go(e)}var M=0;function B(e){1===(M+=e)&&1===e?(window.addEventListener(w,L),o&&window.addEventListener(k,R)):0===M&&(window.removeEventListener(w,L),o&&window.removeEventListener(k,R))}var z=!1;var $={length:n.length,action:"POP",location:I,createHref:F,push:function(e,t){var r="PUSH",o=m(e,t,A(),$.location);C.confirmTransitionTo(o,r,g,(function(e){if(e){var t=F(o),i=o.key,l=o.state;if(a)if(n.pushState({key:i,state:l},null,t),s)window.location.href=t;else{var c=D.indexOf($.location.key),u=D.slice(0,c+1);u.push(o.key),D=u,P({action:r,location:o})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",o=m(e,t,A(),$.location);C.confirmTransitionTo(o,r,g,(function(e){if(e){var t=F(o),i=o.key,l=o.state;if(a)if(n.replaceState({key:i,state:l},null,t),s)window.location.replace(t);else{var c=D.indexOf($.location.key);-1!==c&&(D[c]=o.key),P({action:r,location:o})}else window.location.replace(t)}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return z||(B(1),z=!0),function(){return z&&(z=!1,B(-1)),t()}},listen:function(e){var t=C.appendListener(e);return B(1),function(){B(-1),t()}}};return $}var x="hashchange",_={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:u},slash:{encodePath:u,decodePath:u}};function T(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function A(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(T(window.location.href)+"#"+e)}function P(e){void 0===e&&(e={}),v||(0,c.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),a=n.getUserConfirmation,o=void 0===a?y:a,i=n.hashType,l=void 0===i?"slash":i,s=e.basename?f(u(e.basename)):"",d=_[l],g=d.encodePath,w=d.decodePath;function k(){var e=w(A());return s&&(e=p(e,s)),m(e)}var E=b();function S(e){(0,r.A)(z,e),z.length=t.length,E.notifyListeners(z.location,z.action)}var P=!1,L=null;function R(){var e,t,n=A(),r=g(n);if(n!==r)C(r);else{var a=k(),i=z.location;if(!P&&(t=a,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(L===h(a))return;L=null,function(e){if(P)P=!1,S();else{var t="POP";E.confirmTransitionTo(e,t,o,(function(n){n?S({action:t,location:e}):function(e){var t=z.location,n=D.lastIndexOf(h(t));-1===n&&(n=0);var r=D.lastIndexOf(h(e));-1===r&&(r=0);var a=n-r;a&&(P=!0,F(a))}(e)}))}}(a)}}var O=A(),N=g(O);O!==N&&C(N);var I=k(),D=[h(I)];function F(e){t.go(e)}var j=0;function M(e){1===(j+=e)&&1===e?window.addEventListener(x,R):0===j&&window.removeEventListener(x,R)}var B=!1;var z={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=T(window.location.href)),n+"#"+g(s+h(e))},push:function(e,t){var n="PUSH",r=m(e,void 0,void 0,z.location);E.confirmTransitionTo(r,n,o,(function(e){if(e){var t=h(r),a=g(s+t);if(A()!==a){L=t,function(e){window.location.hash=e}(a);var o=D.lastIndexOf(h(z.location)),i=D.slice(0,o+1);i.push(t),D=i,S({action:n,location:r})}else S()}}))},replace:function(e,t){var n="REPLACE",r=m(e,void 0,void 0,z.location);E.confirmTransitionTo(r,n,o,(function(e){if(e){var t=h(r),a=g(s+t);A()!==a&&(L=t,C(a));var o=D.indexOf(h(z.location));-1!==o&&(D[o]=t),S({action:n,location:r})}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(e){void 0===e&&(e=!1);var t=E.setPrompt(e);return B||(M(1),B=!0),function(){return B&&(B=!1,M(-1)),t()}},listen:function(e){var t=E.appendListener(e);return M(1),function(){M(-1),t()}}};return z}function L(e,t,n){return Math.min(Math.max(e,t),n)}function R(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,a=t.initialEntries,o=void 0===a?["/"]:a,i=t.initialIndex,l=void 0===i?0:i,s=t.keyLength,c=void 0===s?6:s,u=b();function d(e){(0,r.A)(w,e),w.length=w.entries.length,u.notifyListeners(w.location,w.action)}function p(){return Math.random().toString(36).substr(2,c)}var f=L(l,0,o.length-1),g=o.map((function(e){return m(e,void 0,"string"==typeof e?p():e.key||p())})),v=h;function y(e){var t=L(w.index+e,0,w.entries.length-1),r=w.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:g.length,action:"POP",location:g[f],index:f,entries:g,createHref:v,push:function(e,t){var r="PUSH",a=m(e,t,p(),w.location);u.confirmTransitionTo(a,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=m(e,t,p(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return w}},4146:(e,t,n)=>{"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var a=f(n);a&&a!==h&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),m=s(n),g=0;g<i.length;++g){var b=i[g];if(!(o[b]||r&&r[b]||m&&m[b]||l&&l[b])){var v=p(n,b);try{c(t,b,v)}catch(y){}}}}return t}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},8291:(e,t,n)=>{var r,a;!function(){var o,i,l,s,c,u,d,p,f,h,m,g,b,v,y,w,k,E,S,x,_,T,A,C,P,L,R,O,N,I,D=function(e){var t=new D.Builder;return t.pipeline.add(D.trimmer,D.stopWordFilter,D.stemmer),t.searchPipeline.add(D.stemmer),e.call(t,t),t.build()};D.version="2.3.9",D.utils={},D.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),D.utils.asString=function(e){return null==e?"":e.toString()},D.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r<n.length;r++){var a=n[r],o=e[a];if(Array.isArray(o))t[a]=o.slice();else{if("string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o)throw new TypeError("clone is not deep and does not support nested objects");t[a]=o}}return t},D.FieldRef=function(e,t,n){this.docRef=e,this.fieldName=t,this._stringValue=n},D.FieldRef.joiner="/",D.FieldRef.fromString=function(e){var t=e.indexOf(D.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var n=e.slice(0,t),r=e.slice(t+1);return new D.FieldRef(r,n,e)},D.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+D.FieldRef.joiner+this.docRef),this._stringValue},D.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},D.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},D.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},D.Set.prototype.contains=function(e){return!!this.elements[e]},D.Set.prototype.intersect=function(e){var t,n,r,a=[];if(e===D.Set.complete)return this;if(e===D.Set.empty)return e;this.length<e.length?(t=this,n=e):(t=e,n=this),r=Object.keys(t.elements);for(var o=0;o<r.length;o++){var i=r[o];i in n.elements&&a.push(i)}return new D.Set(a)},D.Set.prototype.union=function(e){return e===D.Set.complete?D.Set.complete:e===D.Set.empty?this:new D.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},D.idf=function(e,t){var n=0;for(var r in e)"_index"!=r&&(n+=Object.keys(e[r]).length);var a=(t-n+.5)/(n+.5);return Math.log(1+Math.abs(a))},D.Token=function(e,t){this.str=e||"",this.metadata=t||{}},D.Token.prototype.toString=function(){return this.str},D.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},D.Token.prototype.clone=function(e){return e=e||function(e){return e},new D.Token(e(this.str,this.metadata),this.metadata)},D.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map((function(e){return new D.Token(D.utils.asString(e).toLowerCase(),D.utils.clone(t))}));for(var n=e.toString().toLowerCase(),r=n.length,a=[],o=0,i=0;o<=r;o++){var l=o-i;if(n.charAt(o).match(D.tokenizer.separator)||o==r){if(l>0){var s=D.utils.clone(t)||{};s.position=[i,l],s.index=a.length,a.push(new D.Token(n.slice(i,o),s))}i=o+1}}return a},D.tokenizer.separator=/[\s\-]+/,D.Pipeline=function(){this._stack=[]},D.Pipeline.registeredFunctions=Object.create(null),D.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&D.utils.warn("Overwriting existing registered function: "+t),e.label=t,D.Pipeline.registeredFunctions[e.label]=e},D.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||D.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},D.Pipeline.load=function(e){var t=new D.Pipeline;return e.forEach((function(e){var n=D.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},D.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){D.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},D.Pipeline.prototype.after=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},D.Pipeline.prototype.before=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},D.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},D.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n<t;n++){for(var r=this._stack[n],a=[],o=0;o<e.length;o++){var i=r(e[o],o,e);if(null!=i&&""!==i)if(Array.isArray(i))for(var l=0;l<i.length;l++)a.push(i[l]);else a.push(i)}e=a}return e},D.Pipeline.prototype.runString=function(e,t){var n=new D.Token(e,t);return this.run([n]).map((function(e){return e.toString()}))},D.Pipeline.prototype.reset=function(){this._stack=[]},D.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return D.Pipeline.warnIfFunctionNotRegistered(e),e.label}))},D.Vector=function(e){this._magnitude=0,this.elements=e||[]},D.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,n=this.elements.length/2,r=n-t,a=Math.floor(r/2),o=this.elements[2*a];r>1&&(o<e&&(t=a),o>e&&(n=a),o!=e);)r=n-t,a=t+Math.floor(r/2),o=this.elements[2*a];return o==e||o>e?2*a:o<e?2*(a+1):void 0},D.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},D.Vector.prototype.upsert=function(e,t,n){this._magnitude=0;var r=this.positionForIndex(e);this.elements[r]==e?this.elements[r+1]=n(this.elements[r+1],t):this.elements.splice(r,0,e,t)},D.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,n=1;n<t;n+=2){var r=this.elements[n];e+=r*r}return this._magnitude=Math.sqrt(e)},D.Vector.prototype.dot=function(e){for(var t=0,n=this.elements,r=e.elements,a=n.length,o=r.length,i=0,l=0,s=0,c=0;s<a&&c<o;)(i=n[s])<(l=r[c])?s+=2:i>l?c+=2:i==l&&(t+=n[s+1]*r[c+1],s+=2,c+=2);return t},D.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},D.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t<this.elements.length;t+=2,n++)e[n]=this.elements[t];return e},D.Vector.prototype.toJSON=function(){return this.elements},D.stemmer=(i={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},l={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},d="^("+(c="[^aeiou][^aeiouy]*")+")?"+(u=(s="[aeiouy]")+"[aeiou]*")+c+"("+u+")?$",p="^("+c+")?"+u+c+u+c,f="^("+c+")?"+s,h=new RegExp("^("+c+")?"+u+c),m=new RegExp(p),g=new RegExp(d),b=new RegExp(f),v=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,w=/^(.+?)eed$/,k=/^(.+?)(ed|ing)$/,E=/.$/,S=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),_=new RegExp("^"+c+s+"[^aeiouwxy]$"),T=/^(.+?[^aeiou])y$/,A=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,C=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,P=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,L=/^(.+?)(s|t)(ion)$/,R=/^(.+?)e$/,O=/ll$/,N=new RegExp("^"+c+s+"[^aeiouwxy]$"),I=function(e){var t,n,r,a,o,s,c;if(e.length<3)return e;if("y"==(r=e.substr(0,1))&&(e=r.toUpperCase()+e.substr(1)),o=y,(a=v).test(e)?e=e.replace(a,"$1$2"):o.test(e)&&(e=e.replace(o,"$1$2")),o=k,(a=w).test(e)){var u=a.exec(e);(a=h).test(u[1])&&(a=E,e=e.replace(a,""))}else o.test(e)&&(t=(u=o.exec(e))[1],(o=b).test(t)&&(s=x,c=_,(o=S).test(e=t)?e+="e":s.test(e)?(a=E,e=e.replace(a,"")):c.test(e)&&(e+="e")));return(a=T).test(e)&&(e=(t=(u=a.exec(e))[1])+"i"),(a=A).test(e)&&(t=(u=a.exec(e))[1],n=u[2],(a=h).test(t)&&(e=t+i[n])),(a=C).test(e)&&(t=(u=a.exec(e))[1],n=u[2],(a=h).test(t)&&(e=t+l[n])),o=L,(a=P).test(e)?(t=(u=a.exec(e))[1],(a=m).test(t)&&(e=t)):o.test(e)&&(t=(u=o.exec(e))[1]+u[2],(o=m).test(t)&&(e=t)),(a=R).test(e)&&(t=(u=a.exec(e))[1],o=g,s=N,((a=m).test(t)||o.test(t)&&!s.test(t))&&(e=t)),o=m,(a=O).test(e)&&o.test(e)&&(a=E,e=e.replace(a,"")),"y"==r&&(e=r.toLowerCase()+e.substr(1)),e},function(e){return e.update(I)}),D.Pipeline.registerFunction(D.stemmer,"stemmer"),D.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},D.stopWordFilter=D.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),D.Pipeline.registerFunction(D.stopWordFilter,"stopWordFilter"),D.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},D.Pipeline.registerFunction(D.trimmer,"trimmer"),D.TokenSet=function(){this.final=!1,this.edges={},this.id=D.TokenSet._nextId,D.TokenSet._nextId+=1},D.TokenSet._nextId=1,D.TokenSet.fromArray=function(e){for(var t=new D.TokenSet.Builder,n=0,r=e.length;n<r;n++)t.insert(e[n]);return t.finish(),t.root},D.TokenSet.fromClause=function(e){return"editDistance"in e?D.TokenSet.fromFuzzyString(e.term,e.editDistance):D.TokenSet.fromString(e.term)},D.TokenSet.fromFuzzyString=function(e,t){for(var n=new D.TokenSet,r=[{node:n,editsRemaining:t,str:e}];r.length;){var a=r.pop();if(a.str.length>0){var o,i=a.str.charAt(0);i in a.node.edges?o=a.node.edges[i]:(o=new D.TokenSet,a.node.edges[i]=o),1==a.str.length&&(o.final=!0),r.push({node:o,editsRemaining:a.editsRemaining,str:a.str.slice(1)})}if(0!=a.editsRemaining){if("*"in a.node.edges)var l=a.node.edges["*"];else{l=new D.TokenSet;a.node.edges["*"]=l}if(0==a.str.length&&(l.final=!0),r.push({node:l,editsRemaining:a.editsRemaining-1,str:a.str}),a.str.length>1&&r.push({node:a.node,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)}),1==a.str.length&&(a.node.final=!0),a.str.length>=1){if("*"in a.node.edges)var s=a.node.edges["*"];else{s=new D.TokenSet;a.node.edges["*"]=s}1==a.str.length&&(s.final=!0),r.push({node:s,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)})}if(a.str.length>1){var c,u=a.str.charAt(0),d=a.str.charAt(1);d in a.node.edges?c=a.node.edges[d]:(c=new D.TokenSet,a.node.edges[d]=c),1==a.str.length&&(c.final=!0),r.push({node:c,editsRemaining:a.editsRemaining-1,str:u+a.str.slice(2)})}}}return n},D.TokenSet.fromString=function(e){for(var t=new D.TokenSet,n=t,r=0,a=e.length;r<a;r++){var o=e[r],i=r==a-1;if("*"==o)t.edges[o]=t,t.final=i;else{var l=new D.TokenSet;l.final=i,t.edges[o]=l,t=l}}return n},D.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var n=t.pop(),r=Object.keys(n.node.edges),a=r.length;n.node.final&&(n.prefix.charAt(0),e.push(n.prefix));for(var o=0;o<a;o++){var i=r[o];t.push({prefix:n.prefix.concat(i),node:n.node.edges[i]})}}return e},D.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),n=t.length,r=0;r<n;r++){var a=t[r];e=e+a+this.edges[a].id}return e},D.TokenSet.prototype.intersect=function(e){for(var t=new D.TokenSet,n=void 0,r=[{qNode:e,output:t,node:this}];r.length;){n=r.pop();for(var a=Object.keys(n.qNode.edges),o=a.length,i=Object.keys(n.node.edges),l=i.length,s=0;s<o;s++)for(var c=a[s],u=0;u<l;u++){var d=i[u];if(d==c||"*"==c){var p=n.node.edges[d],f=n.qNode.edges[c],h=p.final&&f.final,m=void 0;d in n.output.edges?(m=n.output.edges[d]).final=m.final||h:((m=new D.TokenSet).final=h,n.output.edges[d]=m),r.push({qNode:f,output:m,node:p})}}}return t},D.TokenSet.Builder=function(){this.previousWord="",this.root=new D.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},D.TokenSet.Builder.prototype.insert=function(e){var t,n=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var r=0;r<e.length&&r<this.previousWord.length&&e[r]==this.previousWord[r];r++)n++;this.minimize(n),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(r=n;r<e.length;r++){var a=new D.TokenSet,o=e[r];t.edges[o]=a,this.uncheckedNodes.push({parent:t,char:o,child:a}),t=a}t.final=!0,this.previousWord=e},D.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},D.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},D.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},D.Index.prototype.search=function(e){return this.query((function(t){new D.QueryParser(e,t).parse()}))},D.Index.prototype.query=function(e){for(var t=new D.Query(this.fields),n=Object.create(null),r=Object.create(null),a=Object.create(null),o=Object.create(null),i=Object.create(null),l=0;l<this.fields.length;l++)r[this.fields[l]]=new D.Vector;e.call(t,t);for(l=0;l<t.clauses.length;l++){var s=t.clauses[l],c=null,u=D.Set.empty;c=s.usePipeline?this.pipeline.runString(s.term,{fields:s.fields}):[s.term];for(var d=0;d<c.length;d++){var p=c[d];s.term=p;var f=D.TokenSet.fromClause(s),h=this.tokenSet.intersect(f).toArray();if(0===h.length&&s.presence===D.Query.presence.REQUIRED){for(var m=0;m<s.fields.length;m++){o[R=s.fields[m]]=D.Set.empty}break}for(var g=0;g<h.length;g++){var b=h[g],v=this.invertedIndex[b],y=v._index;for(m=0;m<s.fields.length;m++){var w=v[R=s.fields[m]],k=Object.keys(w),E=b+"/"+R,S=new D.Set(k);if(s.presence==D.Query.presence.REQUIRED&&(u=u.union(S),void 0===o[R]&&(o[R]=D.Set.complete)),s.presence!=D.Query.presence.PROHIBITED){if(r[R].upsert(y,s.boost,(function(e,t){return e+t})),!a[E]){for(var x=0;x<k.length;x++){var _,T=k[x],A=new D.FieldRef(T,R),C=w[T];void 0===(_=n[A])?n[A]=new D.MatchData(b,R,C):_.add(b,R,C)}a[E]=!0}}else void 0===i[R]&&(i[R]=D.Set.empty),i[R]=i[R].union(S)}}}if(s.presence===D.Query.presence.REQUIRED)for(m=0;m<s.fields.length;m++){o[R=s.fields[m]]=o[R].intersect(u)}}var P=D.Set.complete,L=D.Set.empty;for(l=0;l<this.fields.length;l++){var R;o[R=this.fields[l]]&&(P=P.intersect(o[R])),i[R]&&(L=L.union(i[R]))}var O=Object.keys(n),N=[],I=Object.create(null);if(t.isNegated()){O=Object.keys(this.fieldVectors);for(l=0;l<O.length;l++){A=O[l];var F=D.FieldRef.fromString(A);n[A]=new D.MatchData}}for(l=0;l<O.length;l++){var j=(F=D.FieldRef.fromString(O[l])).docRef;if(P.contains(j)&&!L.contains(j)){var M,B=this.fieldVectors[F],z=r[F.fieldName].similarity(B);if(void 0!==(M=I[j]))M.score+=z,M.matchData.combine(n[F]);else{var $={ref:j,score:z,matchData:n[F]};I[j]=$,N.push($)}}}return N.sort((function(e,t){return t.score-e.score}))},D.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:D.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},D.Index.load=function(e){var t={},n={},r=e.fieldVectors,a=Object.create(null),o=e.invertedIndex,i=new D.TokenSet.Builder,l=D.Pipeline.load(e.pipeline);e.version!=D.version&&D.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+D.version+"' does not match serialized index '"+e.version+"'");for(var s=0;s<r.length;s++){var c=(d=r[s])[0],u=d[1];n[c]=new D.Vector(u)}for(s=0;s<o.length;s++){var d,p=(d=o[s])[0],f=d[1];i.insert(p),a[p]=f}return i.finish(),t.fields=e.fields,t.fieldVectors=n,t.invertedIndex=a,t.tokenSet=i.root,t.pipeline=l,new D.Index(t)},D.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=D.tokenizer,this.pipeline=new D.Pipeline,this.searchPipeline=new D.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},D.Builder.prototype.ref=function(e){this._ref=e},D.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},D.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},D.Builder.prototype.k1=function(e){this._k1=e},D.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var a=0;a<r.length;a++){var o=r[a],i=this._fields[o].extractor,l=i?i(e):e[o],s=this.tokenizer(l,{fields:[o]}),c=this.pipeline.run(s),u=new D.FieldRef(n,o),d=Object.create(null);this.fieldTermFrequencies[u]=d,this.fieldLengths[u]=0,this.fieldLengths[u]+=c.length;for(var p=0;p<c.length;p++){var f=c[p];if(null==d[f]&&(d[f]=0),d[f]+=1,null==this.invertedIndex[f]){var h=Object.create(null);h._index=this.termIndex,this.termIndex+=1;for(var m=0;m<r.length;m++)h[r[m]]=Object.create(null);this.invertedIndex[f]=h}null==this.invertedIndex[f][o][n]&&(this.invertedIndex[f][o][n]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var b=this.metadataWhitelist[g],v=f.metadata[b];null==this.invertedIndex[f][o][n][b]&&(this.invertedIndex[f][o][n][b]=[]),this.invertedIndex[f][o][n][b].push(v)}}}},D.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,n={},r={},a=0;a<t;a++){var o=D.FieldRef.fromString(e[a]),i=o.fieldName;r[i]||(r[i]=0),r[i]+=1,n[i]||(n[i]=0),n[i]+=this.fieldLengths[o]}var l=Object.keys(this._fields);for(a=0;a<l.length;a++){var s=l[a];n[s]=n[s]/r[s]}this.averageFieldLength=n},D.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),n=t.length,r=Object.create(null),a=0;a<n;a++){for(var o=D.FieldRef.fromString(t[a]),i=o.fieldName,l=this.fieldLengths[o],s=new D.Vector,c=this.fieldTermFrequencies[o],u=Object.keys(c),d=u.length,p=this._fields[i].boost||1,f=this._documents[o.docRef].boost||1,h=0;h<d;h++){var m,g,b,v=u[h],y=c[v],w=this.invertedIndex[v]._index;void 0===r[v]?(m=D.idf(this.invertedIndex[v],this.documentCount),r[v]=m):m=r[v],g=m*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[i]))+y),g*=p,g*=f,b=Math.round(1e3*g)/1e3,s.insert(w,b)}e[o]=s}this.fieldVectors=e},D.Builder.prototype.createTokenSet=function(){this.tokenSet=D.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},D.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new D.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},D.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},D.MatchData=function(e,t,n){for(var r=Object.create(null),a=Object.keys(n||{}),o=0;o<a.length;o++){var i=a[o];r[i]=n[i].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=r)},D.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),n=0;n<t.length;n++){var r=t[n],a=Object.keys(e.metadata[r]);null==this.metadata[r]&&(this.metadata[r]=Object.create(null));for(var o=0;o<a.length;o++){var i=a[o],l=Object.keys(e.metadata[r][i]);null==this.metadata[r][i]&&(this.metadata[r][i]=Object.create(null));for(var s=0;s<l.length;s++){var c=l[s];null==this.metadata[r][i][c]?this.metadata[r][i][c]=e.metadata[r][i][c]:this.metadata[r][i][c]=this.metadata[r][i][c].concat(e.metadata[r][i][c])}}}},D.MatchData.prototype.add=function(e,t,n){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=n);if(t in this.metadata[e])for(var r=Object.keys(n),a=0;a<r.length;a++){var o=r[a];o in this.metadata[e][t]?this.metadata[e][t][o]=this.metadata[e][t][o].concat(n[o]):this.metadata[e][t][o]=n[o]}else this.metadata[e][t]=n},D.Query=function(e){this.clauses=[],this.allFields=e},D.Query.wildcard=new String("*"),D.Query.wildcard.NONE=0,D.Query.wildcard.LEADING=1,D.Query.wildcard.TRAILING=2,D.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},D.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=D.Query.wildcard.NONE),e.wildcard&D.Query.wildcard.LEADING&&e.term.charAt(0)!=D.Query.wildcard&&(e.term="*"+e.term),e.wildcard&D.Query.wildcard.TRAILING&&e.term.slice(-1)!=D.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=D.Query.presence.OPTIONAL),this.clauses.push(e),this},D.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=D.Query.presence.PROHIBITED)return!1;return!0},D.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,D.utils.clone(t))}),this),this;var n=t||{};return n.term=e.toString(),this.clause(n),this},D.QueryParseError=function(e,t,n){this.name="QueryParseError",this.message=e,this.start=t,this.end=n},D.QueryParseError.prototype=new Error,D.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},D.QueryLexer.prototype.run=function(){for(var e=D.QueryLexer.lexText;e;)e=e(this)},D.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,n=this.pos,r=0;r<this.escapeCharPositions.length;r++)n=this.escapeCharPositions[r],e.push(this.str.slice(t,n)),t=n+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},D.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},D.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},D.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return D.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},D.QueryLexer.prototype.width=function(){return this.pos-this.start},D.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},D.QueryLexer.prototype.backup=function(){this.pos-=1},D.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=D.QueryLexer.EOS&&this.backup()},D.QueryLexer.prototype.more=function(){return this.pos<this.length},D.QueryLexer.EOS="EOS",D.QueryLexer.FIELD="FIELD",D.QueryLexer.TERM="TERM",D.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",D.QueryLexer.BOOST="BOOST",D.QueryLexer.PRESENCE="PRESENCE",D.QueryLexer.lexField=function(e){return e.backup(),e.emit(D.QueryLexer.FIELD),e.ignore(),D.QueryLexer.lexText},D.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(D.QueryLexer.TERM)),e.ignore(),e.more())return D.QueryLexer.lexText},D.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.EDIT_DISTANCE),D.QueryLexer.lexText},D.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.BOOST),D.QueryLexer.lexText},D.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(D.QueryLexer.TERM)},D.QueryLexer.termSeparator=D.tokenizer.separator,D.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==D.QueryLexer.EOS)return D.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return D.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if(t.match(D.QueryLexer.termSeparator))return D.QueryLexer.lexTerm}else e.escapeCharacter()}},D.QueryParser=function(e,t){this.lexer=new D.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},D.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=D.QueryParser.parseClause;e;)e=e(this);return this.query},D.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},D.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},D.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},D.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case D.QueryLexer.PRESENCE:return D.QueryParser.parsePresence;case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new D.QueryParseError(n,t.start,t.end)}},D.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=D.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=D.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new D.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new D.QueryParseError(n,t.start,t.end)}switch(r.type){case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new D.QueryParseError(n,r.start,r.end)}}},D.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var a=e.peekLexeme();if(null==a){r="expecting term, found nothing";throw new D.QueryParseError(r,t.start,t.end)}if(a.type===D.QueryLexer.TERM)return D.QueryParser.parseTerm;r="expecting term, found '"+a.type+"'";throw new D.QueryParseError(r,a.start,a.end)}},D.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new D.QueryParseError(r,n.start,n.end)}else e.nextClause()}},D.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new D.QueryParseError(r,a.start,a.end)}else e.nextClause()}},D.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new D.QueryParseError(r,a.start,a.end)}else e.nextClause()}},void 0===(a="function"==typeof(r=function(){return D})?r.call(t,n,t,e):r)||(e.exports=a)}()},435:(e,t,n)=>{"use strict";n.r(t)},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(e,t,n){return e<t?t:e>n?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,a){for(var o,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in o=Object(arguments[s]))n.call(o,c)&&(l[c]=o[c]);if(t){i=t(o);for(var u=0;u<i.length;u++)r.call(o,i[u])&&(l[i[u]]=o[i[u]])}}return l}},8426:(e,t)=>{function n(e){let t,n=[];for(let r of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,a,o]=t;if(r&&o){r=parseInt(r),o=parseInt(o);const e=r<o?1:-1;"-"!==a&&".."!==a&&"\u2025"!==a||(o+=e);for(let t=r;t!==o;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},5302:(e,t,n)=>{var r=n(4634);e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return l(o(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,l="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],p=n[1],f=n.index;if(l+=e.slice(i,f),i=f+d.length,p)l+=p[1];else{var h=e[i],m=n[2],g=n[3],b=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=m&&null!=h&&h!==m,E="+"===y||"*"===y,S="?"===y||"*"===y,x=n[2]||u,_=b||v;r.push({name:g||o++,prefix:m||"",delimiter:x,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:_?c(_):w?".*":"[^"+s(x)+"]+?"})}}return i<e.length&&(l+=e.substr(i)),l&&r.push(l),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",d(t)));return function(t,a){for(var o="",l=t||{},s=(a||{}).pretty?i:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var d,p=l[u.name];if(null==p){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(d=s(p[f]),!n[c].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");o+=(0===f?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[c].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');o+=u.prefix+d}}else o+=u}return o}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,o=!1!==n.end,i="",l=0;l<e.length;l++){var c=e[l];if("string"==typeof c)i+=s(c);else{var p=s(c.prefix),f="(?:"+c.pattern+")";t.push(c),c.repeat&&(f+="(?:"+p+f+")*"),i+=f=c.optional?c.partial?p+"("+f+")?":"(?:"+p+"("+f+"))?":p+"("+f+")"}}var h=s(n.delimiter||"/"),m=i.slice(-h.length)===h;return a||(i=(m?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":a&&m?"":"(?="+h+"|$)",u(new RegExp("^"+i,d(n)),t)}function f(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(f(e[a],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return p(o(e,n),t,n)}(e,t,n)}},1258:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>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(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=o[l])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],a||l);var s=t[l],c=r.util.type(s);"Object"!==c||o[i(s)]?"Array"!==c||o[i(s)]||(o[i(s)]=!0,e(s,n,l,o)):(o[i(s)]=!0,e(s,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};return r.hooks.run("before-tokenize",o),o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new l;return s(a,a.head,e),i(e,a,t,a.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,l,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,b=!!m.lookbehind,v=!!m.greedy,y=m.alias;if(v&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var k=m.pattern||m,E=l.next,S=u;E!==t.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var _,T=1;if(v){if(!(_=o(k,S,e,b))||_.index>=e.length)break;var A=_.index,C=_.index+_[0].length,P=S;for(P+=E.value.length;A>=P;)P+=(E=E.next).value.length;if(S=P-=E.value.length,E.value instanceof a)continue;for(var L=E;L!==t.tail&&(P<C||"string"==typeof L.value);L=L.next)T++,P+=L.value.length;T--,x=e.slice(S,P),_.index-=S}else if(!(_=o(k,0,x,b)))continue;A=_.index;var R=_[0],O=x.slice(0,A),N=x.slice(A+R.length),I=S+x.length;d&&I>d.reach&&(d.reach=I);var D=E.prev;if(O&&(D=s(t,D,O),S+=O.length),c(t,D,T),E=s(t,D,new a(p,g?r.tokenize(R,g):R,y,R)),N&&s(t,E,N),T>1){var F={cause:p+","+h,reach:I};i(e,t,n,E.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.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<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var l="";for(var s in o.attributes)l+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+l+">"+o.content+"</"+o.tag+">"},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\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:/<!\[CDATA\[[\s\S]*?\]\]>/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:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.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<a.length;i++)o[a[i]]=e.languages.bash[a[i]];e.languages.shell=e.languages.bash}(a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,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(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/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+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/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]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/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<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/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(/<inner>/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__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\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(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.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<r;n++){var a=t[n];if("code"===a.type){var o=a.content[1],i=a.content[3];if(o&&i&&"code-language"===o.type&&"code-block"===i.type&&"string"==typeof o.content){var l=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(l=(/[a-z][\w-]*/i.exec(l)||[""])[0].toLowerCase());i.alias?"string"==typeof i.alias?i.alias=[i.alias,s]:i.alias.push(s):i.alias=[s]}}else e(a.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r],c=/language-(.+)/.exec(o);if(c){n=c[1];break}}var u,d=e.languages[n];if(d)t.content=e.highlight((u=t.content,u.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),s(n);var r=l[t];return r||e}))),d,n);else if(n&&"none"!==n&&e.plugins.autoloader){var p="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var i=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",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;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),a.length>0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s<l;s++){var c=t[s];"variable"===c.type&&a.indexOf(c.content)>=0&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return!1}return!0}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))a++;else if(r.test(l)&&0===--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\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),p=Object.keys(u);return i=0,function e(t){for(var n=0;n<t.length;n++){if(i>=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=p[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]),f=o.substring(l+a.length),h=[];if(s&&h.push(s),h.push(d),f){var m=[f];e(m),h.push.apply(h,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(h)),n+=h.length-1):r.content=h}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(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 p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r<a;r++){var o=n[r];if("string"!=typeof o){var i=o.content;if(Array.isArray(i))if("template-string"===o.type){var l=i[1];if(3===i.length&&"string"!=typeof l&&"embedded-code"===l.type){var s=p(l),c=l.alias,d=Array.isArray(c)?c[0]:c,f=e.languages[d];if(!f)continue;i[1]=u(s,f,d)}}else t(i);else"string"!=typeof i&&t([i])}}}(t.tokens)}))}(a),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,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(/<ID>/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*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\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*)#?<ID>/.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<n.length;r++){var a=n[r],o=e.languages.javascript[a];"RegExp"===e.util.type(o)&&(o=e.languages.javascript[a]={pattern:o});var i=o.inside||{};o.inside=i,i["maybe-class-name"]=/^[A-Z][\s\S]*/}}(a),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/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.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<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(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.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;r<t.length;r++){var a=t[r],o=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?n.length>0&&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);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=i(t[r+1]),t.splice(r+1,1)),r>0&&("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<l.length&&!(a>=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],p="string"==typeof c?c:c.content,f=t(r,u),h=p.indexOf(f);if(h>-1){++a;var m=p.substring(0,h),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(h+f.length),v=[];m&&v.push.apply(v,i([m])),v.push(g),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://,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},6969:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),a=n(8380),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),o.add(e)}))}i.silent=!1,e.exports=i},8692:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8692},3157:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function r(e){var n={},r=[];function a(r,o){if(!(r in n)){o.push(r);var i=o.indexOf(r);if(i<o.length-1)throw new Error("Circular dependency: "+o.slice(i).join(" -> "));var l={},s=e[r];if(s){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in a(t,o),l[t]=!0,n[t])l[i]=!0}t(s.require,c),t(s.optional,c),t(s.modify,c)}n[r]=l,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(s);i=i.map(c),l=(l||[]).map(c);var u=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var p,f=r(s),h=u;a(h);){for(var m in p={},h){var g=s[m];t(g&&g.modify,(function(e){e in d&&(p[e]=!0)}))}for(var b in d)if(!(b in u))for(var v in f(b))if(v in u){p[b]=!0;break}for(var y in h=p)u[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,l={},s={};function c(e){if(e in l)return l[e];s[e]=!0;var a,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)a=r(e);else{var p=i(u.map((function(e){var t=c(e);return delete s[e],t})));o?a=o(p,(function(){return r(e)})):r(e)}return l[e]=a}for(var u in n)c(u);var d=[];for(var p in s)d.push(l[p]);return i(d)}(f,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(5228),o=n(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(i(227));var l=new Set,s={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f=Object.prototype.hasOwnProperty,h={},m={};function g(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=b.hasOwnProperty(t)?b[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!f.call(m,e)||!f.call(h,e)&&(p.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,x=60107,_=60108,T=60114,A=60109,C=60110,P=60112,L=60113,R=60120,O=60115,N=60116,I=60121,D=60128,F=60129,j=60130,M=60131;if("function"==typeof Symbol&&Symbol.for){var B=Symbol.for;E=B("react.element"),S=B("react.portal"),x=B("react.fragment"),_=B("react.strict_mode"),T=B("react.profiler"),A=B("react.provider"),C=B("react.context"),P=B("react.forward_ref"),L=B("react.suspense"),R=B("react.suspense_list"),O=B("react.memo"),N=B("react.lazy"),I=B("react.block"),B("react.scope"),D=B("react.opaque.id"),F=B("react.debug_trace_mode"),j=B("react.offscreen"),M=B("react.legacy_hidden")}var z,$="function"==typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}function q(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var G=!1;function H(e,t){if(!e||G)return"";G=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"==typeof s.stack){for(var a=s.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,l=o.length-1;1<=i&&0<=l&&a[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(a[i]!==o[l]){if(1!==i||1!==l)do{if(i--,0>--l||a[i]!==o[l])return"\n"+a[i].replace(" at new "," at ")}while(1<=i&&0<=l);break}}}finally{G=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q(e):""}function Q(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 22:return e=H(e.type._render,!1);case 1:return e=H(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case T:return"Profiler";case _:return"StrictMode";case L:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case O:return V(e.type);case I:return V(e._render);case N:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function W(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ie(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ce(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,me,ge=(me=function(e,t){if(e.namespaceURI!==de.svg||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ve).forEach((function(e){ye.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var Ee=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Ae=null,Ce=null;function Pe(e){if(e=na(e)){if("function"!=typeof Te)throw Error(i(280));var t=e.stateNode;t&&(t=aa(t),Te(e.stateNode,e.type,t))}}function Le(e){Ae?Ce?Ce.push(e):Ce=[e]:Ae=e}function Re(){if(Ae){var e=Ae,t=Ce;if(Ce=Ae=null,Pe(e),t)for(e=0;e<t.length;e++)Pe(t[e])}}function Oe(e,t){return e(t)}function Ne(e,t,n,r,a){return e(t,n,r,a)}function Ie(){}var De=Oe,Fe=!1,je=!1;function Me(){null===Ae&&null===Ce||(Ie(),Re())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=aa(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}var ze=!1;if(d)try{var $e={};Object.defineProperty($e,"passive",{get:function(){ze=!0}}),window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch(me){ze=!1}function Ue(e,t,n,r,a,o,i,l,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var qe=!1,Ge=null,He=!1,Qe=null,Ve={onError:function(e){qe=!0,Ge=e}};function We(e,t,n,r,a,o,i,l,s){qe=!1,Ge=null,Ue.apply(Ve,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ye(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ke(e)!==e)throw Error(i(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Xe(a),e;if(o===r)return Xe(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var l=!1,s=a.child;s;){if(s===n){l=!0,n=a,r=o;break}if(s===r){l=!0,r=a,n=o;break}s=s.sibling}if(!l){for(s=o.child;s;){if(s===n){l=!0,n=o,r=a;break}if(s===r){l=!0,r=o,n=a;break}s=s.sibling}if(!l)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,at=!1,ot=[],it=null,lt=null,st=null,ct=new Map,ut=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ft(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function ht(e,t){switch(e){case"focusin":case"focusout":it=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":st=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ut.delete(t.pointerId)}}function mt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e=ft(t,n,r,a,o),null!==t&&(null!==(t=na(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function gt(e){var t=ta(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ye(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=na(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){bt(e)&&n.delete(t)}function yt(){for(at=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=na(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==it&&bt(it)&&(it=null),null!==lt&&bt(lt)&&(lt=null),null!==st&&bt(st)&&(st=null),ct.forEach(vt),ut.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,yt)))}function kt(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==it&&wt(it,e),null!==lt&&wt(lt,e),null!==st&&wt(st,e),ct.forEach(t),ut.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},xt={},_t={};function Tt(e){if(xt[e])return xt[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in _t)return xt[e]=n[t];return e}d&&(_t=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var At=Tt("animationend"),Ct=Tt("animationiteration"),Pt=Tt("animationstart"),Lt=Tt("transitionend"),Rt=new Map,Ot=new Map,Nt=["abort","abort",At,"animationEnd",Ct,"animationIteration",Pt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),Ot.set(r,t),Rt.set(r,a),c(a,[r])}}(0,o.unstable_now)();var Dt=8;function Ft(e){if(1&e)return Dt=15,1;if(2&e)return Dt=14,2;if(4&e)return Dt=13,4;var t=24&e;return 0!==t?(Dt=12,t):32&e?(Dt=11,32):0!==(t=192&e)?(Dt=10,t):256&e?(Dt=9,256):0!==(t=3584&e)?(Dt=8,t):4096&e?(Dt=7,4096):0!==(t=4186112&e)?(Dt=6,t):0!==(t=62914560&e)?(Dt=5,t):67108864&e?(Dt=4,67108864):134217728&e?(Dt=3,134217728):0!==(t=805306368&e)?(Dt=2,t):1073741824&e?(Dt=1,1073741824):(Dt=8,e)}function jt(e,t){var n=e.pendingLanes;if(0===n)return Dt=0;var r=0,a=0,o=e.expiredLanes,i=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,a=Dt=15;else if(0!==(o=134217727&n)){var s=o&~i;0!==s?(r=Ft(s),a=Dt):0!==(l&=o)&&(r=Ft(l),a=Dt)}else 0!==(o=n&~i)?(r=Ft(o),a=Dt):0!==l&&(r=Ft(l),a=Dt);if(0===r)return 0;if(r=n&((0>(r=31-qt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&!(t&i)){if(Ft(t),a<=Dt)return t;Dt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-qt(t)),r|=e[n],t&=~a;return r}function Mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=zt(24&~t))?Bt(10,t):e;case 10:return 0===(e=zt(192&~t))?Bt(8,t):e;case 8:return 0===(e=zt(3584&~t))&&(0===(e=zt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=zt(805306368&~t))&&(t=268435456),t}throw Error(i(358,e))}function zt(e){return e&-e}function $t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-qt(t)]=n}var qt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Gt(e)/Ht|0)|0},Gt=Math.log,Ht=Math.LN2;var Qt=o.unstable_UserBlockingPriority,Vt=o.unstable_runWithPriority,Wt=!0;function Kt(e,t,n,r){Fe||Ie();var a=Xt,o=Fe;Fe=!0;try{Ne(a,e,t,n,r)}finally{(Fe=o)||Me()}}function Yt(e,t,n,r){Vt(Qt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var a;if(Wt)if((a=!(4&t))&&0<ot.length&&-1<pt.indexOf(e))e=ft(null,e,t,n,r),ot.push(e);else{var o=Zt(e,t,n,r);if(null===o)a&&ht(e,r);else{if(a){if(-1<pt.indexOf(e))return e=ft(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return it=mt(it,e,t,n,r,a),!0;case"dragenter":return lt=mt(lt,e,t,n,r,a),!0;case"mouseover":return st=mt(st,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return ct.set(o,mt(ct.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,ut.set(o,mt(ut.get(o)||null,e,t,n,r,a)),!0}return!1}(o,e,t,n,r))return;ht(e,r)}Ir(e,t,r,null,n)}}}function Zt(e,t,n,r){var a=_e(r);if(null!==(a=ta(a))){var o=Ke(a);if(null===o)a=null;else{var i=o.tag;if(13===i){if(null!==(a=Ye(o)))return a;a=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return Ir(e,t,r,a,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,a="value"in Jt?Jt.value:Jt.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return tn=a.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function on(){return!1}function ln(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?an:on,this.isPropagationStopped=on,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var sn,cn,un,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=ln(dn),fn=a({},dn,{view:0,detail:0}),hn=ln(fn),mn=a({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(sn=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=sn=0,un=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=ln(mn),bn=ln(a({},mn,{dataTransfer:0})),vn=ln(a({},fn,{relatedTarget:0})),yn=ln(a({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=a({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=ln(wn),En=ln(a({},dn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function An(){return Tn}var Cn=a({},fn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=ln(Cn),Ln=ln(a({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=ln(a({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),On=ln(a({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=a({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=ln(Nn),Dn=[9,13,27,32],Fn=d&&"CompositionEvent"in window,jn=null;d&&"documentMode"in document&&(jn=document.documentMode);var Mn=d&&"TextEvent"in window&&!jn,Bn=d&&(!Fn||jn&&8<jn&&11>=jn),zn=String.fromCharCode(32),$n=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Vn(e,t,n,r){Le(r),0<(t=Fr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Kn=null;function Yn(e){Cr(e,0)}function Xn(e){if(X(ra(e)))return e}function Zn(e,t){if("change"===e)return t}var Jn=!1;if(d){var er;if(d){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9<document.documentMode)}function rr(){Wn&&(Wn.detachEvent("onpropertychange",ar),Kn=Wn=null)}function ar(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];if(Vn(t,Kn,e,_e(e)),e=Yn,Fe)e(t);else{Fe=!0;try{Oe(e,t)}finally{Fe=!1,Me()}}}}function or(e,t,n){"focusin"===e?(rr(),Kn=n,(Wn=t).attachEvent("onpropertychange",ar)):"focusout"===e&&rr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function lr(e,t){if("click"===e)return Xn(t)}function sr(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ur=Object.prototype.hasOwnProperty;function dr(e,t){if(cr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var br=d&&"documentMode"in document&&11>=document.documentMode,vr=null,yr=null,wr=null,kr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==vr||vr!==Z(r)||("selectionStart"in(r=vr)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Fr(yr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Nt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<Sr.length;xr++)Ot.set(Sr[xr],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Tr=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,l,s,c){if(We.apply(this,arguments),qe){if(!qe)throw Error(i(198));var u=Ge;qe=!1,Ge=null,He||(He=!0,Qe=u)}}(r,t,void 0,e),e.currentTarget=null}function Cr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,c=l.currentTarget;if(l=l.listener,s!==o&&a.isPropagationStopped())break e;Ar(a,l,c),o=s}else for(i=0;i<r.length;i++){if(s=(l=r[i]).instance,c=l.currentTarget,l=l.listener,s!==o&&a.isPropagationStopped())break e;Ar(a,l,c),o=s}}}if(He)throw e=Qe,He=!1,Qe=null,e}function Pr(e,t){var n=oa(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Lr="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[Lr]||(e[Lr]=!0,l.forEach((function(t){Tr.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Tr.has(e)){if("scroll"!==e)return;a|=2,o=r}var i=oa(o),l=e+"__"+(t?"capture":"bubble");i.has(l)||(t&&(a|=4),Nr(o,e,a,t),i.add(l))}function Nr(e,t,n,r){var a=Ot.get(t);switch(void 0===a?2:a){case 0:a=Kt;break;case 1:a=Yt;break;default:a=Xt}n=a.bind(null,t,n,e),a=void 0,!ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Ir(e,t,n,r,a){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===a||8===l.nodeType&&l.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;i=i.return}for(;null!==l;){if(null===(i=ta(l)))return;if(5===(s=i.tag)||6===s){r=o=i;continue e}l=l.parentNode}}r=r.return}!function(e,t,n){if(je)return e(t,n);je=!0;try{return De(e,t,n)}finally{je=!1,Me()}}((function(){var r=o,a=_e(n),i=[];e:{var l=Rt.get(e);if(void 0!==l){var s=pn,c=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":s=Pn;break;case"focusin":c="focus",s=vn;break;case"focusout":c="blur",s=vn;break;case"beforeblur":case"afterblur":s=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=bn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Rn;break;case At:case Ct:case Pt:s=yn;break;case Lt:s=On;break;case"scroll":s=hn;break;case"wheel":s=In;break;case"copy":case"cut":case"paste":s=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Ln}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==l?l+"Capture":null:l;u=[];for(var f,h=r;null!==h;){var m=(f=h).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==p&&(null!=(m=Be(h,p))&&u.push(Dr(h,m,f)))),d)break;h=h.return}0<u.length&&(l=new s(l,c,null,n,a),i.push({event:l,listeners:u}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||16&t||!(c=n.relatedTarget||n.fromElement)||!ta(c)&&!c[Jr])&&(s||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?ta(c):null)&&(c!==(d=Ke(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(s=null,c=r),s!==c)){if(u=gn,m="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Ln,m="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==s?l:ra(s),f=null==c?l:ra(c),(l=new u(m,h+"leave",s,n,a)).target=d,l.relatedTarget=f,m=null,ta(a)===r&&((u=new u(p,h+"enter",c,n,a)).target=f,u.relatedTarget=d,m=u),d=m,s&&c)e:{for(p=c,h=0,f=u=s;f;f=jr(f))h++;for(f=0,m=p;m;m=jr(m))f++;for(;0<h-f;)u=jr(u),h--;for(;0<f-h;)p=jr(p),f--;for(;h--;){if(u===p||null!==p&&u===p.alternate)break e;u=jr(u),p=jr(p)}u=null}else u=null;null!==s&&Mr(i,l,s,u,!1),null!==c&&null!==d&&Mr(i,d,c,u,!0)}if("select"===(s=(l=r?ra(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g=Zn;else if(Qn(l))if(Jn)g=sr;else{g=ir;var b=or}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=lr);switch(g&&(g=g(e,r))?Vn(i,g,n,a):(b&&b(e,l,r),"focusout"===e&&(b=l._wrapperState)&&b.controlled&&"number"===l.type&&ae(l,"number",l.value)),b=r?ra(r):window,e){case"focusin":(Qn(b)||"true"===b.contentEditable)&&(vr=b,yr=r,wr=null);break;case"focusout":wr=yr=vr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,Er(i,n,a);break;case"selectionchange":if(br)break;case"keydown":case"keyup":Er(i,n,a)}var v;if(Fn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Gn?Un(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Bn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Gn&&(v=nn()):(en="value"in(Jt=a)?Jt.value:Jt.textContent,Gn=!0)),0<(b=Fr(r,y)).length&&(y=new En(y,e,null,n,a),i.push({event:y,listeners:b}),v?y.data=v:null!==(v=qn(n))&&(y.data=v))),(v=Mn?function(e,t){switch(e){case"compositionend":return qn(t);case"keypress":return 32!==t.which?null:($n=!0,zn);case"textInput":return(e=t.data)===zn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!Fn&&Un(e,t)?(e=nn(),tn=en=Jt=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(a=new En("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=v))}Cr(i,t)}))}function Dr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=Be(e,n))&&r.unshift(Dr(e,o,a)),null!=(o=Be(e,t))&&r.push(Dr(e,o,a))),e=e.return}return r}function jr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,c=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==c&&(l=c,a?null!=(s=Be(n,o))&&i.unshift(Dr(n,s,l)):a||null!=(s=Be(n,o))&&i.push(Dr(n,s,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}function Br(){}var zr=null,$r=null;function Ur(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function qr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Gr="function"==typeof setTimeout?setTimeout:void 0,Hr="function"==typeof clearTimeout?clearTimeout:void 0;function Qr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Vr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Yr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Yr,Zr="__reactProps$"+Yr,Jr="__reactContainer$"+Yr,ea="__reactEvents$"+Yr;function ta(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Xr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function na(e){return!(e=e[Xr]||e[Jr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ra(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function aa(e){return e[Zr]||null}function oa(e){var t=e[ea];return void 0===t&&(t=e[ea]=new Set),t}var ia=[],la=-1;function sa(e){return{current:e}}function ca(e){0>la||(e.current=ia[la],ia[la]=null,la--)}function ua(e,t){la++,ia[la]=e.current,e.current=t}var da={},pa=sa(da),fa=sa(!1),ha=da;function ma(e,t){var n=e.type.contextTypes;if(!n)return da;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ga(e){return null!=(e=e.childContextTypes)}function ba(){ca(fa),ca(pa)}function va(e,t,n){if(pa.current!==da)throw Error(i(168));ua(pa,t),ua(fa,n)}function ya(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(i(108,V(t)||"Unknown",o));return a({},n,r)}function wa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||da,ha=pa.current,ua(pa,e),ua(fa,fa.current),!0}function ka(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=ya(e,t,ha),r.__reactInternalMemoizedMergedChildContext=e,ca(fa),ca(pa),ua(pa,e)):ca(fa),ua(fa,n)}var Ea=null,Sa=null,xa=o.unstable_runWithPriority,_a=o.unstable_scheduleCallback,Ta=o.unstable_cancelCallback,Aa=o.unstable_shouldYield,Ca=o.unstable_requestPaint,Pa=o.unstable_now,La=o.unstable_getCurrentPriorityLevel,Ra=o.unstable_ImmediatePriority,Oa=o.unstable_UserBlockingPriority,Na=o.unstable_NormalPriority,Ia=o.unstable_LowPriority,Da=o.unstable_IdlePriority,Fa={},ja=void 0!==Ca?Ca:function(){},Ma=null,Ba=null,za=!1,$a=Pa(),Ua=1e4>$a?Pa:function(){return Pa()-$a};function qa(){switch(La()){case Ra:return 99;case Oa:return 98;case Na:return 97;case Ia:return 96;case Da:return 95;default:throw Error(i(332))}}function Ga(e){switch(e){case 99:return Ra;case 98:return Oa;case 97:return Na;case 96:return Ia;case 95:return Da;default:throw Error(i(332))}}function Ha(e,t){return e=Ga(e),xa(e,t)}function Qa(e,t,n){return e=Ga(e),_a(e,t,n)}function Va(){if(null!==Ba){var e=Ba;Ba=null,Ta(e)}Wa()}function Wa(){if(!za&&null!==Ma){za=!0;var e=0;try{var t=Ma;Ha(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ma=null}catch(n){throw null!==Ma&&(Ma=Ma.slice(e+1)),_a(Ra,Va),n}finally{za=!1}}}var Ka=k.ReactCurrentBatchConfig;function Ya(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xa=sa(null),Za=null,Ja=null,eo=null;function to(){eo=Ja=Za=null}function no(e){var t=Xa.current;ca(Xa),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ao(e,t){Za=e,eo=Ja=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(Fi=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ja){if(null===Za)throw Error(i(308));Ja=t,Za.dependencies={lanes:0,firstContext:t,responders:null}}else Ja=Ja.next=t;return e._currentValue}var io=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function so(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fo(e,t,n,r){var o=e.updateQueue;io=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var c=s,u=c.next;c.next=null,null===l?i=u:l.next=u,l=c;var d=e.alternate;if(null!==d){var p=(d=d.updateQueue).lastBaseUpdate;p!==l&&(null===p?d.firstBaseUpdate=u:p.next=u,d.lastBaseUpdate=c)}}if(null!==i){for(p=o.baseState,l=0,d=u=c=null;;){s=i.lane;var f=i.eventTime;if((r&s)===s){null!==d&&(d=d.next={eventTime:f,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,m=i;switch(s=t,f=n,m.tag){case 1:if("function"==typeof(h=m.payload)){p=h.call(f,p,s);break e}p=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null==(s="function"==typeof(h=m.payload)?h.call(f,p,s):h))break e;p=a({},p,s);break e;case 2:io=!0}}null!==i.callback&&(e.flags|=32,null===(s=o.effects)?o.effects=[i]:s.push(i))}else f={eventTime:f,lane:s,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===d?(u=d=f,c=p):d=d.next=f,l|=s;if(null===(i=i.next)){if(null===(s=o.shared.pending))break;i=s.next,s.next=null,o.lastBaseUpdate=s,o.shared.pending=null}}null===d&&(c=p),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,$l|=l,e.lanes=l,e.memoizedState=p}}function ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(i(191,a));a.call(r)}}}var mo=(new r.Component).refs;function go(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var bo={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ps(),a=fs(e),o=co(r,a);o.payload=t,null!=n&&(o.callback=n),uo(e,o),hs(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ps(),a=fs(e),o=co(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),uo(e,o),hs(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ps(),r=fs(e),a=co(n,r);a.tag=2,null!=t&&(a.callback=t),uo(e,a),hs(e,r,n)}};function vo(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(a,o))}function yo(e,t,n){var r=!1,a=da,o=t.contextType;return"object"==typeof o&&null!==o?o=oo(o):(a=ga(t)?ha:pa.current,o=(r=null!=(r=t.contextTypes))?ma(e,a):da),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=bo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function wo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function ko(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=mo,lo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=oo(o):(o=ga(t)?ha:pa.current,a.context=ma(e,o)),fo(e,n,a,r),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(go(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&bo.enqueueReplaceState(a,a.state,null),fo(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var Eo=Array.isArray;function So(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(i(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function _o(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Qs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function l(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=So(e,t,n),r.return=e,r):((r=Vs(n.type,n.key,n.props,null,e.mode,r)).ref=So(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xs(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Ws(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Vs(t.type,t.key,t.props,null,e.mode,n)).ref=So(e,null,t),n.return=e,n;case S:return(t=Xs(t,e.mode,n)).return=e,t}if(Eo(t)||U(t))return(t=Ws(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function f(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===x?d(e,t,n.props.children,r,a):c(e,t,n,r):null;case S:return n.key===a?u(e,t,n,r):null}if(Eo(n)||U(n))return null!==a?null:d(e,t,n,r,null);xo(e,n)}return null}function h(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===x?d(t,e,r.props.children,a,r.key):c(t,e,r,a);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(Eo(r)||U(r))return d(t,e=e.get(n)||null,r,a,null);xo(t,r)}return null}function m(a,i,l,s){for(var c=null,u=null,d=i,m=i=0,g=null;null!==d&&m<l.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var b=f(a,d,l[m],s);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(a,d),i=o(b,i,m),null===u?c=b:u.sibling=b,u=b,d=g}if(m===l.length)return n(a,d),c;if(null===d){for(;m<l.length;m++)null!==(d=p(a,l[m],s))&&(i=o(d,i,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(a,d);m<l.length;m++)null!==(g=h(d,a,m,l[m],s))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=o(g,i,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(a,e)})),c}function g(a,l,s,c){var u=U(s);if("function"!=typeof u)throw Error(i(150));if(null==(s=u.call(s)))throw Error(i(151));for(var d=u=null,m=l,g=l=0,b=null,v=s.next();null!==m&&!v.done;g++,v=s.next()){m.index>g?(b=m,m=null):b=m.sibling;var y=f(a,m,v.value,c);if(null===y){null===m&&(m=b);break}e&&m&&null===y.alternate&&t(a,m),l=o(y,l,g),null===d?u=y:d.sibling=y,d=y,m=b}if(v.done)return n(a,m),u;if(null===m){for(;!v.done;g++,v=s.next())null!==(v=p(a,v.value,c))&&(l=o(v,l,g),null===d?u=v:d.sibling=v,d=v);return u}for(m=r(a,m);!v.done;g++,v=s.next())null!==(v=h(m,a,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),l=o(v,l,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(a,e)})),u}return function(e,r,o,s){var c="object"==typeof o&&null!==o&&o.type===x&&null===o.key;c&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case E:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(o.type===x){n(e,c.sibling),(r=a(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=a(c,o.props)).ref=So(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===x?((r=Ws(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=Vs(o.type,o.key,o.props,null,e.mode,s)).ref=So(e,r,o),s.return=e,e=s)}return l(e);case S:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xs(o,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,o)).return=e,e=r):(n(e,r),(r=Ys(o,e.mode,s)).return=e,e=r),l(e);if(Eo(o))return m(e,r,o,s);if(U(o))return g(e,r,o,s);if(u&&xo(e,o),void 0===o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(i(152,V(e.type)||"Component"))}return n(e,r)}}var To=_o(!0),Ao=_o(!1),Co={},Po=sa(Co),Lo=sa(Co),Ro=sa(Co);function Oo(e){if(e===Co)throw Error(i(174));return e}function No(e,t){switch(ua(Ro,t),ua(Lo,e),ua(Po,Co),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fe(null,"");break;default:t=fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ca(Po),ua(Po,t)}function Io(){ca(Po),ca(Lo),ca(Ro)}function Do(e){Oo(Ro.current);var t=Oo(Po.current),n=fe(t,e.type);t!==n&&(ua(Lo,e),ua(Po,n))}function Fo(e){Lo.current===e&&(ca(Po),ca(Lo))}var jo=sa(0);function Mo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(64&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=null,zo=null,$o=!1;function Uo(e,t){var n=Gs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Go(e){if($o){var t=zo;if(t){var n=t;if(!qo(e,t)){if(!(t=Vr(n.nextSibling))||!qo(e,t))return e.flags=-1025&e.flags|2,$o=!1,void(Bo=e);Uo(Bo,n)}Bo=e,zo=Vr(t.firstChild)}else e.flags=-1025&e.flags|2,$o=!1,Bo=e}}function Ho(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Bo=e}function Qo(e){if(e!==Bo)return!1;if(!$o)return Ho(e),$o=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!qr(t,e.memoizedProps))for(t=zo;t;)Uo(e,t),t=Vr(t.nextSibling);if(Ho(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){zo=Vr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}zo=null}}else zo=Bo?Vr(e.stateNode.nextSibling):null;return!0}function Vo(){zo=Bo=null,$o=!1}var Wo=[];function Ko(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Yo=k.ReactCurrentDispatcher,Xo=k.ReactCurrentBatchConfig,Zo=0,Jo=null,ei=null,ti=null,ni=!1,ri=!1;function ai(){throw Error(i(321))}function oi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function ii(e,t,n,r,a,o){if(Zo=o,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yo.current=null===e||null===e.memoizedState?Oi:Ni,e=n(r,a),ri){o=0;do{if(ri=!1,!(25>o))throw Error(i(301));o+=1,ti=ei=null,t.updateQueue=null,Yo.current=Ii,e=n(r,a)}while(ri)}if(Yo.current=Ri,t=null!==ei&&null!==ei.next,Zo=0,ti=ei=Jo=null,ni=!1,t)throw Error(i(300));return e}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ti?Jo.memoizedState=ti=e:ti=ti.next=e,ti}function si(){if(null===ei){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ei.next;var t=null===ti?Jo.memoizedState:ti.next;if(null!==t)ti=t,ei=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ei=e).memoizedState,baseState:ei.baseState,baseQueue:ei.baseQueue,queue:ei.queue,next:null},null===ti?Jo.memoizedState=ti=e:ti=ti.next=e}return ti}function ci(e,t){return"function"==typeof t?t(e):t}function ui(e){var t=si(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ei,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var l=a.next;a.next=o.next,o.next=l}r.baseQueue=a=o,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var s=l=o=null,c=a;do{var u=c.lane;if((Zo&u)===u)null!==s&&(s=s.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===s?(l=s=d,o=r):s=s.next=d,Jo.lanes|=u,$l|=u}c=c.next}while(null!==c&&c!==a);null===s?o=r:s.next=l,cr(r,t.memoizedState)||(Fi=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function di(e){var t=si(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var l=a=a.next;do{o=e(o,l.action),l=l.next}while(l!==a);cr(o,t.memoizedState)||(Fi=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function pi(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(Zo&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(i(350))}function fi(e,t,n,r){var a=Nl;if(null===a)throw Error(i(349));var o=t._getVersion,l=o(t._source),s=Yo.current,c=s.useState((function(){return pi(a,t,n)})),u=c[1],d=c[0];c=ti;var p=e.memoizedState,f=p.refs,h=f.getSnapshot,m=p.source;p=p.subscribe;var g=Jo;return e.memoizedState={refs:f,source:t,subscribe:r},s.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=o(t._source);if(!cr(l,e)){e=n(t._source),cr(d,e)||(u(e),e=fs(g),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,i=e;0<i;){var s=31-qt(i),c=1<<s;r[s]|=e,i&=~c}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=fs(g);a.mutableReadLanes|=r&a.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(p,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ci,lastRenderedState:d}).dispatch=u=Li.bind(null,Jo,e),c.queue=e,c.baseQueue=null,d=pi(a,t,n),c.memoizedState=c.baseState=d),d}function hi(e,t,n){return fi(si(),e,t,n)}function mi(e){var t=li();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ci,lastRenderedState:e}).dispatch=Li.bind(null,Jo,e),[t.memoizedState,e]}function gi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Jo.updateQueue)?(t={lastEffect:null},Jo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function bi(e){return e={current:e},li().memoizedState=e}function vi(){return si().memoizedState}function yi(e,t,n,r){var a=li();Jo.flags|=e,a.memoizedState=gi(1|t,n,void 0,void 0===r?null:r)}function wi(e,t,n,r){var a=si();r=void 0===r?null:r;var o=void 0;if(null!==ei){var i=ei.memoizedState;if(o=i.destroy,null!==r&&oi(r,i.deps))return void gi(t,n,o,r)}Jo.flags|=e,a.memoizedState=gi(1|t,n,o,r)}function ki(e,t){return yi(516,4,e,t)}function Ei(e,t){return wi(516,4,e,t)}function Si(e,t){return wi(4,2,e,t)}function xi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _i(e,t,n){return n=null!=n?n.concat([e]):null,wi(4,2,xi.bind(null,t,e),n)}function Ti(){}function Ai(e,t){var n=si();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ci(e,t){var n=si();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pi(e,t){var n=qa();Ha(98>n?98:n,(function(){e(!0)})),Ha(97<n?97:n,(function(){var n=Xo.transition;Xo.transition=1;try{e(!1),t()}finally{Xo.transition=n}}))}function Li(e,t,n){var r=ps(),a=fs(e),o={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Jo||null!==i&&i===Jo)ri=ni=!0;else{if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var l=t.lastRenderedState,s=i(l,n);if(o.eagerReducer=i,o.eagerState=s,cr(s,l))return}catch(c){}hs(e,a,r)}}var Ri={readContext:oo,useCallback:ai,useContext:ai,useEffect:ai,useImperativeHandle:ai,useLayoutEffect:ai,useMemo:ai,useReducer:ai,useRef:ai,useState:ai,useDebugValue:ai,useDeferredValue:ai,useTransition:ai,useMutableSource:ai,useOpaqueIdentifier:ai,unstable_isNewReconciler:!1},Oi={readContext:oo,useCallback:function(e,t){return li().memoizedState=[e,void 0===t?null:t],e},useContext:oo,useEffect:ki,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,yi(4,2,xi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yi(4,2,e,t)},useMemo:function(e,t){var n=li();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=li();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Li.bind(null,Jo,e),[r.memoizedState,e]},useRef:bi,useState:mi,useDebugValue:Ti,useDeferredValue:function(e){var t=mi(e),n=t[0],r=t[1];return ki((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=mi(!1),t=e[0];return bi(e=Pi.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=li();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fi(r,e,t,n)},useOpaqueIdentifier:function(){if($o){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(i(355))})),n=mi(t)[1];return!(2&Jo.mode)&&(Jo.flags|=516,gi(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return mi(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},Ni={readContext:oo,useCallback:Ai,useContext:oo,useEffect:Ei,useImperativeHandle:_i,useLayoutEffect:Si,useMemo:Ci,useReducer:ui,useRef:vi,useState:function(){return ui(ci)},useDebugValue:Ti,useDeferredValue:function(e){var t=ui(ci),n=t[0],r=t[1];return Ei((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ui(ci)[0];return[vi().current,e]},useMutableSource:hi,useOpaqueIdentifier:function(){return ui(ci)[0]},unstable_isNewReconciler:!1},Ii={readContext:oo,useCallback:Ai,useContext:oo,useEffect:Ei,useImperativeHandle:_i,useLayoutEffect:Si,useMemo:Ci,useReducer:di,useRef:vi,useState:function(){return di(ci)},useDebugValue:Ti,useDeferredValue:function(e){var t=di(ci),n=t[0],r=t[1];return Ei((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=di(ci)[0];return[vi().current,e]},useMutableSource:hi,useOpaqueIdentifier:function(){return di(ci)[0]},unstable_isNewReconciler:!1},Di=k.ReactCurrentOwner,Fi=!1;function ji(e,t,n,r){t.child=null===e?Ao(t,null,n,r):To(t,e.child,n,r)}function Mi(e,t,n,r,a){n=n.render;var o=t.ref;return ao(t,a),r=ii(e,t,n,r,o,a),null===e||Fi?(t.flags|=1,ji(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function Bi(e,t,n,r,a,o){if(null===e){var i=n.type;return"function"!=typeof i||Hs(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Vs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,zi(e,t,i,r,a,o))}return i=e.child,a&o||(a=i.memoizedProps,!(n=null!==(n=n.compare)?n:dr)(a,r)||e.ref!==t.ref)?(t.flags|=1,(e=Qs(i,r)).ref=t.ref,e.return=t,t.child=e):ol(e,t,o)}function zi(e,t,n,r,a,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Fi=!1,!(o&a))return t.lanes=e.lanes,ol(e,t,o);16384&e.flags&&(Fi=!0)}return qi(e,t,n,r,o)}function $i(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(4&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Es(t,e),null;t.memoizedState={baseLanes:0},Es(t,null!==o?o.baseLanes:n)}else t.memoizedState={baseLanes:0},Es(t,n);else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Es(t,r);return ji(e,t,a,n),t.child}function Ui(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function qi(e,t,n,r,a){var o=ga(n)?ha:pa.current;return o=ma(t,o),ao(t,a),n=ii(e,t,n,r,o,a),null===e||Fi?(t.flags|=1,ji(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function Gi(e,t,n,r,a){if(ga(n)){var o=!0;wa(t)}else o=!1;if(ao(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),yo(t,n,r),ko(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var s=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=oo(c):c=ma(t,c=ga(n)?ha:pa.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||s!==c)&&wo(t,i,r,c),io=!1;var p=t.memoizedState;i.state=p,fo(t,r,i,a),s=t.memoizedState,l!==r||p!==s||fa.current||io?("function"==typeof u&&(go(t,n,u,r),s=t.memoizedState),(l=io||vo(t,n,l,r,p,s,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4)):("function"==typeof i.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=c,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4),r=!1)}else{i=t.stateNode,so(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:Ya(t.type,l),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=oo(s):s=ma(t,s=ga(n)?ha:pa.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||p!==s)&&wo(t,i,r,s),io=!1,p=t.memoizedState,i.state=p,fo(t,r,i,a);var h=t.memoizedState;l!==d||p!==h||fa.current||io?("function"==typeof f&&(go(t,n,f,r),h=t.memoizedState),(c=io||vo(t,n,c,r,p,h,s))?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=s,r=c):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),r=!1)}return Hi(e,t,n,r,o,a)}function Hi(e,t,n,r,a,o){Ui(e,t);var i=!!(64&t.flags);if(!r&&!i)return a&&ka(t,n,!1),ol(e,t,o);r=t.stateNode,Di.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=To(t,e.child,null,o),t.child=To(t,null,l,o)):ji(e,t,l,o),t.memoizedState=r.state,a&&ka(t,n,!0),t.child}function Qi(e){var t=e.stateNode;t.pendingContext?va(0,t.pendingContext,t.pendingContext!==t.context):t.context&&va(0,t.context,!1),No(e,t.containerInfo)}var Vi,Wi,Ki,Yi,Xi={dehydrated:null,retryLane:0};function Zi(e,t,n){var r,a=t.pendingProps,o=jo.current,i=!1;return(r=!!(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(i=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(o|=1),ua(jo,1&o),null===e?(void 0!==a.fallback&&Go(t),e=a.children,o=a.fallback,i?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xi,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xi,t.lanes=33554432,e):((n=Ks({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,i?(a=tl(e,t,a.children,a.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=Xi,a):(n=el(e,t,a.children,n),t.memoizedState=null,n))}function Ji(e,t,n,r){var a=e.mode,o=e.child;return t={mode:"hidden",children:t},2&a||null===o?o=Ks(t,a,0,null):(o.childLanes=0,o.pendingProps=t),n=Ws(n,a,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function el(e,t,n,r){var a=e.child;return e=a.sibling,n=Qs(a,{mode:"visible",children:n}),!(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tl(e,t,n,r,a){var o=t.mode,i=e.child;e=i.sibling;var l={mode:"hidden",children:n};return 2&o||t.child===i?n=Qs(i,l):((n=t.child).childLanes=0,n.pendingProps=l,null!==(i=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=i,i.nextEffect=null):t.firstEffect=t.lastEffect=null),null!==e?r=Qs(e,r):(r=Ws(r,o,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nl(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ro(e.return,t)}function rl(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.lastEffect=o)}function al(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ji(e,t,r.children,n),2&(r=jo.current))r=1&r|2,t.flags|=64;else{if(null!==e&&64&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nl(e,n);else if(19===e.tag)nl(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ua(jo,r),2&t.mode)switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Mo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),rl(t,!1,a,n,o,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Mo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}rl(t,!0,n,null,o,t.lastEffect);break;case"together":rl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),$l|=t.lanes,n&t.childLanes){if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Qs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Qs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function il(e,t){if(!$o)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ll(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return ga(t.type)&&ba(),null;case 3:return Io(),ca(fa),ca(pa),Ko(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Qo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Wi(t),null;case 5:Fo(t);var o=Oo(Ro.current);if(n=t.type,null!==e&&null!=t.stateNode)Ki(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(i(166));return null}if(e=Oo(Po.current),Qo(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Xr]=t,r[Zr]=l,n){case"dialog":Pr("cancel",r),Pr("close",r);break;case"iframe":case"object":case"embed":Pr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Pr(_r[e],r);break;case"source":Pr("error",r);break;case"img":case"image":case"link":Pr("error",r),Pr("load",r);break;case"details":Pr("toggle",r);break;case"input":ee(r,l),Pr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Pr("invalid",r);break;case"textarea":se(r,l),Pr("invalid",r)}for(var c in Se(n,l),e=null,l)l.hasOwnProperty(c)&&(o=l[c],"children"===c?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):s.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Pr("scroll",r));switch(n){case"input":Y(r),re(r,l,!0);break;case"textarea":Y(r),ue(r);break;case"select":case"option":break;default:"function"==typeof l.onClick&&(r.onclick=Br)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===de.html&&(e=pe(n)),e===de.html?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Vi(e,t,!1,!1),t.stateNode=e,c=xe(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),o=r;break;case"iframe":case"object":case"embed":Pr("load",e),o=r;break;case"video":case"audio":for(o=0;o<_r.length;o++)Pr(_r[o],e);o=r;break;case"source":Pr("error",e),o=r;break;case"img":case"image":case"link":Pr("error",e),Pr("load",e),o=r;break;case"details":Pr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Pr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=a({},r,{value:void 0}),Pr("invalid",e);break;case"textarea":se(e,r),o=le(e,r),Pr("invalid",e);break;default:o=r}Se(n,o);var u=o;for(l in u)if(u.hasOwnProperty(l)){var d=u[l];"style"===l?ke(e,d):"dangerouslySetInnerHTML"===l?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===l?"string"==typeof d?("textarea"!==n||""!==d)&&be(e,d):"number"==typeof d&&be(e,""+d):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?null!=d&&"onScroll"===l&&Pr("scroll",e):null!=d&&w(e,l,d,c))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(l=r.value)?ie(e,!!r.multiple,l,!1):null!=r.defaultValue&&ie(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Br)}Ur(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Yi(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));n=Oo(Ro.current),Oo(Po.current),Qo(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return ca(jo),r=t.memoizedState,64&t.flags?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Qo(t):n=null!==e.memoizedState,r&&!n&&2&t.mode&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||1&jo.current?0===Ml&&(Ml=3):(0!==Ml&&3!==Ml||(Ml=4),null===Nl||!(134217727&$l)&&!(134217727&Ul)||vs(Nl,Dl))),(r||n)&&(t.flags|=4),null);case 4:return Io(),Wi(t),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return no(t),null;case 19:if(ca(jo),null===(r=t.memoizedState))return null;if(l=!!(64&t.flags),null===(c=r.rendering))if(l)il(r,!1);else{if(0!==Ml||null!==e&&64&e.flags)for(e=t.child;null!==e;){if(null!==(c=Mo(e))){for(t.flags|=64,il(r,!1),null!==(l=c.updateQueue)&&(t.updateQueue=l,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(l=n).flags&=2,l.nextEffect=null,l.firstEffect=null,l.lastEffect=null,null===(c=l.alternate)?(l.childLanes=0,l.lanes=e,l.child=null,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=c.childLanes,l.lanes=c.lanes,l.child=c.child,l.memoizedProps=c.memoizedProps,l.memoizedState=c.memoizedState,l.updateQueue=c.updateQueue,l.type=c.type,e=c.dependencies,l.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ua(jo,1&jo.current|2),t.child}e=e.sibling}null!==r.tail&&Ua()>Ql&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Mo(c))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),il(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!$o)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ua()-r.renderingStartTime>Ql&&1073741824!==n&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ua(),n.sibling=null,t=jo.current,ua(jo,l?1&t|2:1&t),n):null;case 23:case 24:return Ss(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(i(156,t.tag))}function sl(e){switch(e.tag){case 1:ga(e.type)&&ba();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Io(),ca(fa),ca(pa),Ko(),64&(t=e.flags))throw Error(i(285));return e.flags=-4097&t|64,e;case 5:return Fo(e),null;case 13:return ca(jo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ca(jo),null;case 4:return Io(),null;case 10:return no(e),null;case 23:case 24:return Ss(),null;default:return null}}function cl(e,t){try{var n="",r=t;do{n+=Q(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a}}function ul(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Vi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wi=function(){},Ki=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Oo(Po.current);var i,l=null;switch(n){case"input":o=J(e,o),r=J(e,r),l=[];break;case"option":o=oe(e,o),r=oe(e,r),l=[];break;case"select":o=a({},o,{value:void 0}),r=a({},r,{value:void 0}),l=[];break;case"textarea":o=le(e,o),r=le(e,r),l=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Br)}for(d in Se(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(i in c)c.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(c=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&u!==c&&(null!=u||null!=c))if("style"===d)if(c){for(i in c)!c.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&c[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(l||(l=[]),l.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(l=l||[]).push(d,u)):"children"===d?"string"!=typeof u&&"number"!=typeof u||(l=l||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&Pr("scroll",e),l||c===u||(l=[])):"object"==typeof u&&null!==u&&u.$$typeof===D?u.toString():(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}},Yi=function(e,t,n,r){n!==r&&(t.flags|=4)};var dl="function"==typeof WeakMap?WeakMap:Map;function pl(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yl||(Yl=!0,Xl=r),ul(0,t)},n}function fl(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return ul(0,t),r(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Zl?Zl=new Set([this]):Zl.add(this),ul(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hl="function"==typeof WeakSet?WeakSet:Set;function ml(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){zs(e,n)}else t.current=null}function gl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ya(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Qr(t.stateNode.containerInfo))}throw Error(i(163))}function bl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(!(3&~e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,4&(a=a.tag)&&1&a&&(js(n,e),Fs(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ya(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ho(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ho(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ur(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))))}throw Error(i(163))}function vl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=we("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function yl(e,t){if(Sa&&"function"==typeof Sa.onCommitFiberUnmount)try{Sa.onCommitFiberUnmount(Ea,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(4&r)js(t,n);else{r=t;try{a()}catch(o){zs(r,o)}}n=n.next}while(n!==e)}break;case 1:if(ml(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){zs(t,o)}break;case 5:ml(t);break;case 4:_l(e,t)}}function wl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function kl(e){return 5===e.tag||3===e.tag||4===e.tag}function El(e){e:{for(var t=e.return;null!==t;){if(kl(t))break e;t=t.return}throw Error(i(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(i(161))}16&n.flags&&(be(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||kl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Sl(e,n,t):xl(e,n,t)}function Sl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Br));else if(4!==r&&null!==(e=e.child))for(Sl(e,t,n),e=e.sibling;null!==e;)Sl(e,t,n),e=e.sibling}function xl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(xl(e,t,n),e=e.sibling;null!==e;)xl(e,t,n),e=e.sibling}function _l(e,t){for(var n,r,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(i(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag){e:for(var l=e,s=a,c=s;;)if(yl(l,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===s)break e;for(;null===c.sibling;){if(null===c.return||c.return===s)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(l=n,s=a.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(yl(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function Tl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{!(3&~r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),xe(e,a),t=xe(e,r),a=0;a<o.length;a+=2){var l=o[a],s=o[a+1];"style"===l?ke(n,s):"dangerouslySetInnerHTML"===l?ge(n,s):"children"===l?be(n,s):w(n,l,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ie(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ie(n,!!r.multiple,r.defaultValue,!0):ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(i(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Hl=Ua(),vl(t.child,!0)),void Al(t);case 19:return void Al(t);case 23:case 24:return void vl(t,null!==t.memoizedState)}throw Error(i(163))}function Al(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hl),t.forEach((function(t){var r=Us.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Cl(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Pl=Math.ceil,Ll=k.ReactCurrentDispatcher,Rl=k.ReactCurrentOwner,Ol=0,Nl=null,Il=null,Dl=0,Fl=0,jl=sa(0),Ml=0,Bl=null,zl=0,$l=0,Ul=0,ql=0,Gl=null,Hl=0,Ql=1/0;function Vl(){Ql=Ua()+500}var Wl,Kl=null,Yl=!1,Xl=null,Zl=null,Jl=!1,es=null,ts=90,ns=[],rs=[],as=null,os=0,is=null,ls=-1,ss=0,cs=0,us=null,ds=!1;function ps(){return 48&Ol?Ua():-1!==ls?ls:ls=Ua()}function fs(e){if(!(2&(e=e.mode)))return 1;if(!(4&e))return 99===qa()?1:2;if(0===ss&&(ss=zl),0!==Ka.transition){0!==cs&&(cs=null!==Gl?Gl.pendingLanes:0),e=ss;var t=4186112&~cs;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qa(),4&Ol&&98===e?e=Bt(12,ss):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function hs(e,t,n){if(50<os)throw os=0,is=null,Error(i(185));if(null===(e=ms(e,t)))return null;Ut(e,t,n),e===Nl&&(Ul|=t,4===Ml&&vs(e,Dl));var r=qa();1===t?8&Ol&&!(48&Ol)?ys(e):(gs(e,n),0===Ol&&(Vl(),Va())):(!(4&Ol)||98!==r&&99!==r||(null===as?as=new Set([e]):as.add(e)),gs(e,n)),Gl=e}function ms(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gs(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-qt(l),c=1<<s,u=o[s];if(-1===u){if(!(c&r)||c&a){u=t,Ft(c);var d=Dt;o[s]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);l&=~c}if(r=jt(e,e===Nl?Dl:0),t=Dt,0===r)null!==n&&(n!==Fa&&Ta(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Fa&&Ta(n)}15===t?(n=ys.bind(null,e),null===Ma?(Ma=[n],Ba=_a(Ra,Wa)):Ma.push(n),n=Fa):14===t?n=Qa(99,ys.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(i(358,e))}}(t),n=Qa(n,bs.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function bs(e){if(ls=-1,cs=ss=0,48&Ol)throw Error(i(327));var t=e.callbackNode;if(Ds()&&e.callbackNode!==t)return null;var n=jt(e,e===Nl?Dl:0);if(0===n)return null;var r=n,a=Ol;Ol|=16;var o=Ts();for(Nl===e&&Dl===r||(Vl(),xs(e,r));;)try{Ps();break}catch(s){_s(e,s)}if(to(),Ll.current=o,Ol=a,null!==Il?r=0:(Nl=null,Dl=0,r=Ml),zl&Ul)xs(e,0);else if(0!==r){if(2===r&&(Ol|=64,e.hydrate&&(e.hydrate=!1,Qr(e.containerInfo)),0!==(n=Mt(e))&&(r=As(e,n))),1===r)throw t=Bl,xs(e,0),vs(e,n),gs(e,Ua()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(i(345));case 2:case 5:Os(e);break;case 3:if(vs(e,n),(62914560&n)===n&&10<(r=Hl+500-Ua())){if(0!==jt(e,0))break;if(((a=e.suspendedLanes)&n)!==n){ps(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Gr(Os.bind(null,e),r);break}Os(e);break;case 4:if(vs(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var l=31-qt(n);o=1<<l,(l=r[l])>a&&(a=l),n&=~o}if(n=a,10<(n=(120>(n=Ua()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Pl(n/1960))-n)){e.timeoutHandle=Gr(Os.bind(null,e),n);break}Os(e);break;default:throw Error(i(329))}}return gs(e,Ua()),e.callbackNode===t?bs.bind(null,e):null}function vs(e,t){for(t&=~ql,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function ys(e){if(48&Ol)throw Error(i(327));if(Ds(),e===Nl&&e.expiredLanes&Dl){var t=Dl,n=As(e,t);zl&Ul&&(n=As(e,t=jt(e,t)))}else n=As(e,t=jt(e,0));if(0!==e.tag&&2===n&&(Ol|=64,e.hydrate&&(e.hydrate=!1,Qr(e.containerInfo)),0!==(t=Mt(e))&&(n=As(e,t))),1===n)throw n=Bl,xs(e,0),vs(e,t),gs(e,Ua()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Os(e),gs(e,Ua()),null}function ws(e,t){var n=Ol;Ol|=1;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}}function ks(e,t){var n=Ol;Ol&=-2,Ol|=8;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}}function Es(e,t){ua(jl,Fl),Fl|=t,zl|=t}function Ss(){Fl=jl.current,ca(jl)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Hr(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&ba();break;case 3:Io(),ca(fa),ca(pa),Ko();break;case 5:Fo(r);break;case 4:Io();break;case 13:case 19:ca(jo);break;case 10:no(r);break;case 23:case 24:Ss()}n=n.return}Nl=e,Il=Qs(e.current,null),Dl=Fl=zl=t,Ml=0,Bl=null,ql=Ul=$l=0}function _s(e,t){for(;;){var n=Il;try{if(to(),Yo.current=Ri,ni){for(var r=Jo.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}ni=!1}if(Zo=0,ti=ei=Jo=null,ri=!1,Rl.current=null,null===n||null===n.return){Ml=1,Bl=t,Il=null;break}e:{var o=e,i=n.return,l=n,s=t;if(t=Dl,l.flags|=2048,l.firstEffect=l.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s;if(!(2&l.mode)){var u=l.alternate;u?(l.updateQueue=u.updateQueue,l.memoizedState=u.memoizedState,l.lanes=u.lanes):(l.updateQueue=null,l.memoizedState=null)}var d=!!(1&jo.current),p=i;do{var f;if(f=13===p.tag){var h=p.memoizedState;if(null!==h)f=null!==h.dehydrated;else{var m=p.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(f){var g=p.updateQueue;if(null===g){var b=new Set;b.add(c),p.updateQueue=b}else g.add(c);if(!(2&p.mode)){if(p.flags|=64,l.flags|=16384,l.flags&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var v=co(-1,1);v.tag=2,uo(l,v)}l.lanes|=1;break e}s=void 0,l=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new dl,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(l)){s.add(l);var w=$s.bind(null,o,c,l);c.then(w,w)}p.flags|=4096,p.lanes=t;break e}p=p.return}while(null!==p);s=Error((V(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ml&&(Ml=2),s=cl(s,l),p=i;do{switch(p.tag){case 3:o=s,p.flags|=4096,t&=-t,p.lanes|=t,po(p,pl(0,o,t));break e;case 1:o=s;var k=p.type,E=p.stateNode;if(!(64&p.flags||"function"!=typeof k.getDerivedStateFromError&&(null===E||"function"!=typeof E.componentDidCatch||null!==Zl&&Zl.has(E)))){p.flags|=4096,t&=-t,p.lanes|=t,po(p,fl(p,o,t));break e}}p=p.return}while(null!==p)}Rs(n)}catch(S){t=S,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function Ts(){var e=Ll.current;return Ll.current=Ri,null===e?Ri:e}function As(e,t){var n=Ol;Ol|=16;var r=Ts();for(Nl===e&&Dl===t||xs(e,t);;)try{Cs();break}catch(a){_s(e,a)}if(to(),Ol=n,Ll.current=r,null!==Il)throw Error(i(261));return Nl=null,Dl=0,Ml}function Cs(){for(;null!==Il;)Ls(Il)}function Ps(){for(;null!==Il&&!Aa();)Ls(Il)}function Ls(e){var t=Wl(e.alternate,e,Fl);e.memoizedProps=e.pendingProps,null===t?Rs(e):Il=t,Rl.current=null}function Rs(e){var t=e;do{var n=t.alternate;if(e=t.return,2048&t.flags){if(null!==(n=sl(t)))return n.flags&=2047,void(Il=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(null!==(n=ll(n,t,Fl)))return void(Il=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||1073741824&Fl||!(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&!(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Ml&&(Ml=5)}function Os(e){var t=qa();return Ha(99,Ns.bind(null,e,t)),null}function Ns(e,t){do{Ds()}while(null!==es);if(48&Ol)throw Error(i(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,o=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var l=e.eventTimes,s=e.expirationTimes;0<o;){var c=31-qt(o),u=1<<c;a[c]=0,l[c]=-1,s[c]=-1,o&=~u}if(null!==as&&!(24&r)&&as.has(e)&&as.delete(e),e===Nl&&(Il=Nl=null,Dl=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=Ol,Ol|=32,Rl.current=null,zr=Wt,gr(l=mr())){if("selectionStart"in l)s={start:l.selectionStart,end:l.selectionEnd};else e:if(s=(s=l.ownerDocument)&&s.defaultView||window,(u=s.getSelection&&s.getSelection())&&0!==u.rangeCount){s=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{s.nodeType,c.nodeType}catch(T){s=null;break e}var d=0,p=-1,f=-1,h=0,m=0,g=l,b=null;t:for(;;){for(var v;g!==s||0!==o&&3!==g.nodeType||(p=d+o),g!==c||0!==u&&3!==g.nodeType||(f=d+u),3===g.nodeType&&(d+=g.nodeValue.length),null!==(v=g.firstChild);)b=g,g=v;for(;;){if(g===l)break t;if(b===s&&++h===o&&(p=d),b===c&&++m===u&&(f=d),null!==(v=g.nextSibling))break;b=(g=b).parentNode}g=v}s=-1===p||-1===f?null:{start:p,end:f}}else s=null;s=s||{start:0,end:0}}else s=null;$r={focusedElem:l,selectionRange:s},Wt=!1,us=null,ds=!1,Kl=r;do{try{Is()}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);us=null,Kl=r;do{try{for(l=e;null!==Kl;){var y=Kl.flags;if(16&y&&be(Kl.stateNode,""),128&y){var w=Kl.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&y){case 2:El(Kl),Kl.flags&=-3;break;case 6:El(Kl),Kl.flags&=-3,Tl(Kl.alternate,Kl);break;case 1024:Kl.flags&=-1025;break;case 1028:Kl.flags&=-1025,Tl(Kl.alternate,Kl);break;case 4:Tl(Kl.alternate,Kl);break;case 8:_l(l,s=Kl);var E=s.alternate;wl(s),null!==E&&wl(E)}Kl=Kl.nextEffect}}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);if(k=$r,w=mr(),y=k.focusedElem,l=k.selectionRange,w!==y&&y&&y.ownerDocument&&hr(y.ownerDocument.documentElement,y)){null!==l&&gr(y)&&(w=l.start,void 0===(k=l.end)&&(k=w),"selectionStart"in y?(y.selectionStart=w,y.selectionEnd=Math.min(k,y.value.length)):(k=(w=y.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),s=y.textContent.length,E=Math.min(l.start,s),l=void 0===l.end?E:Math.min(l.end,s),!k.extend&&E>l&&(s=l,l=E,E=s),s=fr(y,E),o=fr(y,l),s&&o&&(1!==k.rangeCount||k.anchorNode!==s.node||k.anchorOffset!==s.offset||k.focusNode!==o.node||k.focusOffset!==o.offset)&&((w=w.createRange()).setStart(s.node,s.offset),k.removeAllRanges(),E>l?(k.addRange(w),k.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),k.addRange(w))))),w=[];for(k=y;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<w.length;y++)(k=w[y]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Wt=!!zr,$r=zr=null,e.current=n,Kl=r;do{try{for(y=e;null!==Kl;){var S=Kl.flags;if(36&S&&bl(y,Kl.alternate,Kl),128&S){w=void 0;var x=Kl.ref;if(null!==x){var _=Kl.stateNode;Kl.tag,w=_,"function"==typeof x?x(w):x.current=w}}Kl=Kl.nextEffect}}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);Kl=null,ja(),Ol=a}else e.current=n;if(Jl)Jl=!1,es=e,ts=t;else for(Kl=r;null!==Kl;)t=Kl.nextEffect,Kl.nextEffect=null,8&Kl.flags&&((S=Kl).sibling=null,S.stateNode=null),Kl=t;if(0===(r=e.pendingLanes)&&(Zl=null),1===r?e===is?os++:(os=0,is=e):os=0,n=n.stateNode,Sa&&"function"==typeof Sa.onCommitFiberRoot)try{Sa.onCommitFiberRoot(Ea,n,void 0,!(64&~n.current.flags))}catch(T){}if(gs(e,Ua()),Yl)throw Yl=!1,e=Xl,Xl=null,e;return 8&Ol||Va(),null}function Is(){for(;null!==Kl;){var e=Kl.alternate;ds||null===us||(8&Kl.flags?Je(Kl,us)&&(ds=!0):13===Kl.tag&&Cl(e,Kl)&&Je(Kl,us)&&(ds=!0));var t=Kl.flags;256&t&&gl(e,Kl),!(512&t)||Jl||(Jl=!0,Qa(97,(function(){return Ds(),null}))),Kl=Kl.nextEffect}}function Ds(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Ha(e,Ms)}return!1}function Fs(e,t){ns.push(t,e),Jl||(Jl=!0,Qa(97,(function(){return Ds(),null})))}function js(e,t){rs.push(t,e),Jl||(Jl=!0,Qa(97,(function(){return Ds(),null})))}function Ms(){if(null===es)return!1;var e=es;if(es=null,48&Ol)throw Error(i(331));var t=Ol;Ol|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var a=n[r],o=n[r+1],l=a.destroy;if(a.destroy=void 0,"function"==typeof l)try{l()}catch(c){if(null===o)throw Error(i(330));zs(o,c)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){a=n[r],o=n[r+1];try{var s=a.create;a.destroy=s()}catch(c){if(null===o)throw Error(i(330));zs(o,c)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Ol=t,Va(),!0}function Bs(e,t,n){uo(e,t=pl(0,t=cl(n,t),1)),t=ps(),null!==(e=ms(e,1))&&(Ut(e,1,t),gs(e,t))}function zs(e,t){if(3===e.tag)Bs(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bs(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r))){var a=fl(n,e=cl(t,e),1);if(uo(n,a),a=ps(),null!==(n=ms(n,1)))Ut(n,1,a),gs(n,a);else if("function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function $s(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ps(),e.pingedLanes|=e.suspendedLanes&n,Nl===e&&(Dl&n)===n&&(4===Ml||3===Ml&&(62914560&Dl)===Dl&&500>Ua()-Hl?xs(e,0):ql|=n),gs(e,t)}function Us(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(2&(t=e.mode)?4&t?(0===ss&&(ss=zl),0===(t=zt(62914560&~ss))&&(t=4194304)):t=99===qa()?1:2:t=1),n=ps(),null!==(e=ms(e,t))&&(Ut(e,t,n),gs(e,n))}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Gs(e,t,n,r){return new qs(e,t,n,r)}function Hs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Qs(e,t){var n=e.alternate;return null===n?((n=Gs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vs(e,t,n,r,a,o){var l=2;if(r=e,"function"==typeof e)Hs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case x:return Ws(n.children,a,o,t);case F:l=8,a|=16;break;case _:l=8,a|=1;break;case T:return(e=Gs(12,n,t,8|a)).elementType=T,e.type=T,e.lanes=o,e;case L:return(e=Gs(13,n,t,a)).type=L,e.elementType=L,e.lanes=o,e;case R:return(e=Gs(19,n,t,a)).elementType=R,e.lanes=o,e;case j:return Ks(n,a,o,t);case M:return(e=Gs(24,n,t,a)).elementType=M,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case A:l=10;break e;case C:l=9;break e;case P:l=11;break e;case O:l=14;break e;case N:l=16,r=null;break e;case I:l=22;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Gs(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Ws(e,t,n,r){return(e=Gs(7,e,r,t)).lanes=n,e}function Ks(e,t,n,r){return(e=Gs(23,e,r,t)).elementType=j,e.lanes=n,e}function Ys(e,t,n){return(e=Gs(6,e,null,t)).lanes=n,e}function Xs(e,t,n){return(t=Gs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Js(e,t,n,r){var a=t.current,o=ps(),l=fs(a);e:if(n){t:{if(Ke(n=n._reactInternals)!==n||1!==n.tag)throw Error(i(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ga(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(i(171))}if(1===n.tag){var c=n.type;if(ga(c)){n=ya(n,c,s);break e}}n=s}else n=da;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(a,t),hs(a,l,o),l}function ec(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function nc(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function rc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Zs(e,t,null!=n&&!0===n.hydrate),t=Gs(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,lo(t),e[Jr]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function ac(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function oc(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if("function"==typeof a){var l=a;a=function(){var e=ec(i);l.call(e)}}Js(t,i,e,a)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new rc(e,0,t?{hydrate:!0}:void 0)}(n,r),i=o._internalRoot,"function"==typeof a){var s=a;a=function(){var e=ec(i);s.call(e)}}ks((function(){Js(t,i,e,a)}))}return ec(i)}function ic(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ac(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Wl=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fa.current)Fi=!0;else{if(!(n&r)){switch(Fi=!1,t.tag){case 3:Qi(t),Vo();break;case 5:Do(t);break;case 1:ga(t.type)&&wa(t);break;case 4:No(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;ua(Xa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return n&t.child.childLanes?Zi(e,t,n):(ua(jo,1&jo.current),null!==(t=ol(e,t,n))?t.sibling:null);ua(jo,1&jo.current);break;case 19:if(r=!!(n&t.childLanes),64&e.flags){if(r)return al(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),ua(jo,jo.current),r)break;return null;case 23:case 24:return t.lanes=0,$i(e,t,n)}return ol(e,t,n)}Fi=!!(16384&e.flags)}else Fi=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=ma(t,pa.current),ao(t,n),a=ii(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ga(r)){var o=!0;wa(t)}else o=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,lo(t);var l=r.getDerivedStateFromProps;"function"==typeof l&&go(t,r,l,e),a.updater=bo,t.stateNode=a,a._reactInternals=t,ko(t,r,e,n),t=Hi(null,t,r,!0,o,n)}else t.tag=0,ji(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(o=a._init)(a._payload),t.type=a,o=t.tag=function(e){if("function"==typeof e)return Hs(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===O)return 14}return 2}(a),e=Ya(a,e),o){case 0:t=qi(null,t,a,e,n);break e;case 1:t=Gi(null,t,a,e,n);break e;case 11:t=Mi(null,t,a,e,n);break e;case 14:t=Bi(null,t,a,Ya(a.type,e),r,n);break e}throw Error(i(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,qi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 1:return r=t.type,a=t.pendingProps,Gi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 3:if(Qi(t),r=t.updateQueue,null===e||null===r)throw Error(i(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,so(e,t),fo(t,r,null,n),(r=t.memoizedState.element)===a)Vo(),t=ol(e,t,n);else{if((o=(a=t.stateNode).hydrate)&&(zo=Vr(t.stateNode.containerInfo.firstChild),Bo=t,o=$o=!0),o){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(o=e[a])._workInProgressVersionPrimary=e[a+1],Wo.push(o);for(n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else ji(e,t,r,n),Vo();t=t.child}return t;case 5:return Do(t),null===e&&Go(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,l=a.children,qr(r,a)?l=null:null!==o&&qr(r,o)&&(t.flags|=16),Ui(e,t),ji(e,t,l,n),t.child;case 6:return null===e&&Go(t),null;case 13:return Zi(e,t,n);case 4:return No(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=To(t,null,r,n):ji(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Mi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 7:return ji(e,t,t.pendingProps,n),t.child;case 8:case 12:return ji(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,l=t.memoizedProps,o=a.value;var s=t.type._context;if(ua(Xa,s._currentValue),s._currentValue=o,null!==l)if(s=l.value,0===(o=cr(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(l.children===a.children&&!fa.current){t=ol(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){l=s.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&u.observedBits&o){1===s.tag&&((u=co(-1,n&-n)).tag=2,uo(s,u)),s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),ro(s.return,n),c.lanes|=n;break}u=u.next}}else l=10===s.tag&&s.type===t.type?null:s.child;if(null!==l)l.return=s;else for(l=s;null!==l;){if(l===t){l=null;break}if(null!==(s=l.sibling)){s.return=l.return,l=s;break}l=l.return}s=l}ji(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(o=t.pendingProps).children,ao(t,n),r=r(a=oo(a,o.unstable_observedBits)),t.flags|=1,ji(e,t,r,n),t.child;case 14:return o=Ya(a=t.type,t.pendingProps),Bi(e,t,a,o=Ya(a.type,o),r,n);case 15:return zi(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ya(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ga(r)?(e=!0,wa(t)):e=!1,ao(t,n),yo(t,r,a),ko(t,r,a,n),Hi(null,t,r,!0,e,n);case 19:return al(e,t,n);case 23:case 24:return $i(e,t,n)}throw Error(i(156,t.tag))},rc.prototype.render=function(e){Js(e,this._internalRoot,null,null)},rc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Js(null,e,null,(function(){t[Jr]=null}))},et=function(e){13===e.tag&&(hs(e,4,ps()),nc(e,4))},tt=function(e){13===e.tag&&(hs(e,67108864,ps()),nc(e,67108864))},nt=function(e){if(13===e.tag){var t=ps(),n=fs(e);hs(e,n,t),nc(e,n)}},rt=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=aa(r);if(!a)throw Error(i(90));X(r),ne(r,a)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ie(e,!!n.multiple,t,!1)}},Oe=ws,Ne=function(e,t,n,r,a){var o=Ol;Ol|=4;try{return Ha(98,e.bind(null,t,n,r,a))}finally{0===(Ol=o)&&(Vl(),Va())}},Ie=function(){!(49&Ol)&&(function(){if(null!==as){var e=as;as=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gs(e,Ua())}))}Va()}(),Ds())},De=function(e,t){var n=Ol;Ol|=2;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}};var lc={Events:[na,ra,aa,Le,Re,Ds,{current:!1}]},sc={findFiberByHostInstance:ta,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cc={bundleType:sc.bundleType,version:sc.version,rendererPackageName:sc.rendererPackageName,rendererConfig:sc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:sc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Ea=uc.inject(cc),Sa=uc}catch(me){}}t.hydrate=function(e,t,n){if(!ac(t))throw Error(i(200));return oc(null,e,t,!0,n)}},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2551)},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var l,s,c,u;if(Array.isArray(e)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(!o(e[s],i[s]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!i.has(s.value[0]))return!1;for(u=e.entries();!(s=u.next()).done;)if(!o(s.value[1],i.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!i.has(s.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(e[s]!==i[s])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((l=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,c[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!e.$$typeof)&&!o(e[c[s]],i[c[s]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},2799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case l:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case s:return e;default:return t}}case a:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===g},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=k},4363:(e,t,n)=>{"use strict";e.exports=n(2799)},3259:(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<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var l=n(6540),s=n(5556),c=[],u=[];function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=d(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function f(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function h(e,t){var d,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var h=i({loader:null,loading:null,delay:200,timeout:null,render:f,webpack:null,modules:null},t),m=null;function g(){return m||(m=e(h.loader)),m.promise}return c.push(g),"function"==typeof h.webpack&&u.push((function(){if((0,h.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g()})),p=d=function(t){function n(n){var r;return o(a(a(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),m=e(h.loader),r._loadModule()})),g(),r.state={error:m.error,pastDelay:!1,timedOut:!1,loading:m.loading,loaded:m.loaded},r}r(n,t),n.preload=function(){return g()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(h.modules)&&h.modules.forEach((function(t){e.context.loadable.report(t)})),m.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof h.delay&&(0===h.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),h.delay)),"number"==typeof h.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),h.timeout));var n=function(){t({error:m.error,loaded:m.loaded,loading:m.loading}),e._clearTimeouts()};m.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?l.createElement(h.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?h.render(this.state.loaded,this.props):null},n}(l.Component),o(d,"contextTypes",{loadable:s.shape({report:s.func.isRequired})}),p}function m(e){return h(d,e)}m.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return h(p,e)};var g=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.getChildContext=function(){return{loadable:{report:this.props.report}}},n.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return b(e)}))}o(g,"propTypes",{report:s.func.isRequired}),o(g,"childContextTypes",{loadable:s.shape({report:s.func.isRequired}).isRequired}),m.Capture=g,m.preloadAll=function(){return new Promise((function(e,t){b(c).then(e,t)}))},m.preloadReady=function(){return new Promise((function(e,t){b(u).then(e,e)}))},e.exports=m},2831:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,v:()=>l});var r=n(6347),a=n(8168),o=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map((function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})}))):null}},4625:(e,t,n)=>{"use strict";n.d(t,{B6:()=>r.B6,I9:()=>d,Ix:()=>r.Ix,Kd:()=>u,N_:()=>b,W5:()=>r.W5,W6:()=>r.W6,XG:()=>r.XG,dO:()=>r.dO,fS:()=>r.fS,g:()=>r.g,k2:()=>w,kO:()=>r.kO,qh:()=>r.qh,rd:()=>r.rd,tW:()=>r.tW,y:()=>r.y,zy:()=>r.zy});var r=n(6347),a=n(2892),o=n(6540),i=n(9231),l=n(8168),s=n(8587),c=n(1561),u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.zR)(t.props),t}return(0,a.A)(t,e),t.prototype.render=function(){return o.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(o.Component);var d=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.TM)(t.props),t}return(0,a.A)(t,e),t.prototype.render=function(){return o.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(o.Component);var p=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.yJ)(e,null,null,t):e},h=function(e){return e},m=o.forwardRef;void 0===m&&(m=h);var g=m((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,i=(0,s.A)(e,["innerRef","navigate","onClick"]),c=i.target,u=(0,l.A)({},i,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||c&&"_self"!==c||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=h!==m&&t||n,o.createElement("a",u)}));var b=m((function(e,t){var n=e.component,a=void 0===n?g:n,u=e.replace,d=e.to,b=e.innerRef,v=(0,s.A)(e,["component","replace","to","innerRef"]);return o.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=e.history,r=f(p(d,e.location),e.location),s=r?n.createHref(r):"",g=(0,l.A)({},v,{href:s,navigate:function(){var t=p(d,e.location),r=(0,i.AO)(e.location)===(0,i.AO)(f(t));(u||r?n.replace:n.push)(t)}});return h!==m?g.ref=t||b:g.innerRef=b,o.createElement(a,g)}))})),v=function(e){return e},y=o.forwardRef;void 0===y&&(y=v);var w=y((function(e,t){var n=e["aria-current"],a=void 0===n?"page":n,i=e.activeClassName,u=void 0===i?"active":i,d=e.activeStyle,h=e.className,m=e.exact,g=e.isActive,w=e.location,k=e.sensitive,E=e.strict,S=e.style,x=e.to,_=e.innerRef,T=(0,s.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=w||e.location,i=f(p(x,n),n),s=i.pathname,A=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=A?(0,r.B6)(n.pathname,{path:A,exact:m,sensitive:k,strict:E}):null,P=!!(g?g(C,n):C),L="function"==typeof h?h(P):h,R="function"==typeof S?S(P):S;P&&(L=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(L,u),R=(0,l.A)({},R,d));var O=(0,l.A)({"aria-current":P&&a||null,className:L,style:R,to:i},T);return v!==y?O.ref=t||_:O.innerRef=_,o.createElement(b,O)}))}))},6347:(e,t,n)=>{"use strict";n.d(t,{B6:()=>N,Ix:()=>k,W5:()=>V,W6:()=>G,XG:()=>x,XZ:()=>w,dO:()=>$,fS:()=>E,g:()=>Q,kO:()=>z,qh:()=>I,rd:()=>P,tW:()=>C,y:()=>U,zy:()=>H});var r=n(2892),a=n(6540),o=n(5556),i=n.n(o),l=n(9231),s=n(1561),c=n(8168),u=n(5302),d=n.n(u),p=(n(4363),n(8587)),f=n(4146),h=n.n(f),m=1073741823,g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var b=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return g[e]=(g[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter((function(t){return t!==e}))},get:function(){return n},set:function(e,t){n=e,r.forEach((function(e){return e(n,t)}))}}),t}(0,r.A)(n,e);var a=n.prototype;return a.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},a.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((o=r)===(i=a)?0!==o||1/o==1/i:o!=o&&i!=i)?n=0:(n="function"==typeof t?t(r,a):m,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,i},a.render=function(){return this.props.children},n}(a.Component);s.childContextTypes=((n={})[l]=i().object.isRequired,n);var c=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var a=n.prototype;return a.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?m:t},a.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?m:e},a.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},a.getValue=function(){return this.context[l]?this.context[l].get():e},a.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(a.Component);return c.contextTypes=((o={})[l]=i().object,o),{Provider:s,Consumer:c}},v=function(e){var t=b();return t.displayName=e,t},y=v("Router-History"),w=v("Router"),k=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a.createElement(w.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.Component);var E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,l.sC)(t.props),t}return(0,r.A)(t,e),t.prototype.render=function(){return a.createElement(k,{history:this.history,children:this.props.children})},t}(a.Component);var S=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(a.Component);function x(e){var t=e.message,n=e.when,r=void 0===n||n;return a.createElement(w.Consumer,null,(function(e){if(e||(0,s.A)(!1),!r||e.staticContext)return null;var n=e.history.block;return a.createElement(S,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})}))}var _={},T=1e4,A=0;function C(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(_[e])return _[e];var t=d().compile(e);return A<T&&(_[e]=t,A++),t}(e)(t,{pretty:!0})}function P(e){var t=e.computedMatch,n=e.to,r=e.push,o=void 0!==r&&r;return a.createElement(w.Consumer,null,(function(e){e||(0,s.A)(!1);var r=e.history,i=e.staticContext,u=o?r.push:r.replace,d=(0,l.yJ)(t?"string"==typeof n?C(n,t.params):(0,c.A)({},n,{pathname:C(n.pathname,t.params)}):n);return i?(u(d),null):a.createElement(S,{onMount:function(){u(d)},onUpdate:function(e,t){var n=(0,l.yJ)(t.to);(0,l.Fu)(n,(0,c.A)({},d,{key:n.key}))||u(d)},to:n})}))}var L={},R=1e4,O=0;function N(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,i=n.strict,l=void 0!==i&&i,s=n.sensitive,c=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=L[n]||(L[n]={});if(r[e])return r[e];var a=[],o={regexp:d()(e,a,t),keys:a};return O<R&&(r[e]=o,O++),o}(n,{end:o,strict:l,sensitive:c}),a=r.regexp,i=r.keys,s=a.exec(e);if(!s)return null;var u=s[0],p=s.slice(1),f=e===u;return o&&!f?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:f,params:i.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var I=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return a.createElement(w.Consumer,null,(function(t){t||(0,s.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?N(n.pathname,e.props):t.match,o=(0,c.A)({},t,{location:n,match:r}),i=e.props,l=i.children,u=i.component,d=i.render;return Array.isArray(l)&&function(e){return 0===a.Children.count(e)}(l)&&(l=null),a.createElement(w.Provider,{value:o},o.match?l?"function"==typeof l?l(o):l:u?a.createElement(u,o):d?d(o):null:"function"==typeof l?l(o):null)}))},t}(a.Component);function D(e){return"/"===e.charAt(0)?e:"/"+e}function F(e,t){if(!e)return t;var n=D(e);return 0!==t.pathname.indexOf(n)?t:(0,c.A)({},t,{pathname:t.pathname.substr(n.length)})}function j(e){return"string"==typeof e?e:(0,l.AO)(e)}function M(e){return function(){(0,s.A)(!1)}}function B(){}var z=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return B},t.handleBlock=function(){return B},t}(0,r.A)(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,o=n.context,i=void 0===o?{}:o;i.action=t,i.location=function(e,t){return e?(0,c.A)({},t,{pathname:D(e)+t.pathname}):t}(a,(0,l.yJ)(e)),i.url=j(i.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,o=void 0===r?{}:r,i=e.location,s=void 0===i?"/":i,u=(0,p.A)(e,["basename","context","location"]),d={createHref:function(e){return D(n+j(e))},action:"POP",location:F(n,(0,l.yJ)(s)),push:this.handlePush,replace:this.handleReplace,go:M(),goBack:M(),goForward:M(),listen:this.handleListen,block:this.handleBlock};return a.createElement(k,(0,c.A)({},u,{history:d,staticContext:o}))},t}(a.Component);var $=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return a.createElement(w.Consumer,null,(function(t){t||(0,s.A)(!1);var n,r,o=e.props.location||t.location;return a.Children.forEach(e.props.children,(function(e){if(null==r&&a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?N(o.pathname,(0,c.A)({},e.props,{path:i})):t.match}})),r?a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(a.Component);function U(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,p.A)(t,["wrappedComponentRef"]);return a.createElement(w.Consumer,null,(function(t){return t||(0,s.A)(!1),a.createElement(e,(0,c.A)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,h()(n,e)}var q=a.useContext;function G(){return q(y)}function H(){return q(w).location}function Q(){var e=q(w).match;return e?e.params:{}}function V(e){var t=H(),n=q(w).match;return e?N(t.pathname,e):n}},2098:(e,t,n)=>{"use strict";var r,a=n(6540),o=(r=a)&&"object"==typeof r&&"default"in r?r.default:r;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}var l=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var s,c=[];function u(){s=e(c.map((function(e){return e.props}))),d.canUseDOM?t(s):n&&(s=n(s))}var d=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.peek=function(){return s},a.rewind=function(){if(a.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=s;return s=void 0,c=[],e};var i=a.prototype;return i.UNSAFE_componentWillMount=function(){c.push(this),u()},i.componentDidUpdate=function(){u()},i.componentWillUnmount=function(){var e=c.indexOf(this);c.splice(e,1),u()},i.render=function(){return o.createElement(r,this.props)},a}(a.PureComponent);return i(d,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),i(d,"canUseDOM",l),d}}},5287:(e,t,n)=>{"use strict";var r=n(5228),a=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var i=60109,l=60110,s=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;a=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),i=d("react.provider"),l=d("react.context"),s=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var p="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=g.prototype;var y=v.prototype=new b;y.constructor=v,r(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},i=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,r)&&!E.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:a,type:e,key:i,ref:l,props:o,_owner:w.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var _=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,n,r,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case a:case o:s=!0}}if(s)return i=i(s=e),e=""===r?"."+T(s,0):r,Array.isArray(i)?(n="",null!=e&&(n=e.replace(_,"$&/")+"/"),A(i,t,n,"",(function(e){return e}))):null!=i&&(x(i)&&(i=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(_,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+T(l=e[c],c);s+=A(l,t,n,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(l=e.next()).done;)s+=A(l=l.value,t,n,u=r+T(l,c++),i);else if("object"===l)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function C(e,t,n){if(null==e)return e;var r=[],a=0;return A(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function P(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var L={current:null};function R(){var e=L.current;if(null===e)throw Error(f(321));return e}var O={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:C,forEach:function(e,t,n){C(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return C(e,(function(){t++})),t},toArray:function(e){return C(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error(f(143));return e}},t.Component=g,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error(f(267,e));var o=r({},e.props),i=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=w.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)k.call(t,u)&&!E.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:a,type:e.type,key:i,ref:l,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return R().useCallback(e,t)},t.useContext=function(e,t){return R().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return R().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return R().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return R().useLayoutEffect(e,t)},t.useMemo=function(e,t){return R().useMemo(e,t)},t.useReducer=function(e,t,n){return R().useReducer(e,t,n)},t.useRef=function(e){return R().useRef(e)},t.useState=function(e){return R().useState(e)},t.version="17.0.2"},6540:(e,t,n)=>{"use strict";e.exports=n(5287)},7463:(e,t)=>{"use strict";var n,r,a,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,u=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(n){throw setTimeout(d,0),n}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(d,0))},r=function(e,t){u=setTimeout(e,t)},a=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,f=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,g=null,b=-1,v=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();y=e+v;try{g(!0,e)?k.postMessage(null):(m=!1,g=null)}catch(n){throw k.postMessage(null),n}}else m=!1},n=function(e){g=e,m||(m=!0,k.postMessage(null))},r=function(e,n){b=p((function(){e(t.unstable_now())}),n)},a=function(){f(b),b=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<_(a,t)))break e;e[r]=t,e[n]=a,n=r}}function S(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var o=2*(r+1)-1,i=e[o],l=o+1,s=e[l];if(void 0!==i&&0>_(i,n))void 0!==s&&0>_(s,i)?(e[r]=s,e[l]=n,r=l):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==s&&0>_(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],A=[],C=1,P=null,L=3,R=!1,O=!1,N=!1;function I(e){for(var t=S(A);null!==t;){if(null===t.callback)x(A);else{if(!(t.startTime<=e))break;x(A),t.sortIndex=t.expirationTime,E(T,t)}t=S(A)}}function D(e){if(N=!1,I(e),!O)if(null!==S(T))O=!0,n(F);else{var t=S(A);null!==t&&r(D,t.startTime-e)}}function F(e,n){O=!1,N&&(N=!1,a()),R=!0;var o=L;try{for(I(n),P=S(T);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var i=P.callback;if("function"==typeof i){P.callback=null,L=P.priorityLevel;var l=i(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?P.callback=l:P===S(T)&&x(T),I(n)}else x(T);P=S(T)}if(null!==P)var s=!0;else{var c=S(A);null!==c&&r(D,c.startTime-n),s=!1}return s}finally{P=null,L=o,R=!1}}var j=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){O||R||(O=!0,n(F))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return S(T)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,o,i){var l=t.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?l+i:l:i=l,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:C++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>l?(e.sortIndex=i,E(A,e),null===S(T)&&e===S(A)&&(N?a():N=!0,r(D,i-l))):(e.sortIndex=s,E(T,e),O||R||(O=!0,n(F))),e},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},9982:(e,t,n)=>{"use strict";e.exports=n(7463)},5215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>k,__asyncGenerator:()=>w,__asyncValues:()=>E,__await:()=>y,__awaiter:()=>u,__classPrivateFieldGet:()=>A,__classPrivateFieldIn:()=>P,__classPrivateFieldSet:()=>C,__createBinding:()=>p,__decorate:()=>l,__exportStar:()=>f,__extends:()=>a,__generator:()=>d,__importDefault:()=>T,__importStar:()=>_,__makeTemplateObject:()=>S,__metadata:()=>c,__param:()=>s,__read:()=>m,__rest:()=>i,__spread:()=>g,__spreadArray:()=>v,__spreadArrays:()=>b,__values:()=>h});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function l(e,t,n,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{s(r.next(e))}catch(t){o(t)}}function l(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}var p=Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function f(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||p(t,e,n)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<n;t++)for(var o=arguments[t],i=0,l=o.length;i<l;i++,a++)r[a]=o[i];return r}function v(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=a[e](t)).value instanceof y?Promise.resolve(n.value.v).then(s,c):u(o[0][2],n)}catch(r){u(o[0][3],r)}var n}function s(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function k(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:a?a(t):t}:a}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,a){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,a,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var x=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return x(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function A(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function C(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},2892:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>a})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{A:()=>r})},1561:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=!0,a="Invariant failed";function o(e,t){if(!e){if(r)throw new Error(a);var n="function"==typeof t?t():t,o=n?"".concat(a,": ").concat(n):a;throw new Error(o)}}},2654:e=>{"use strict";e.exports={}}},e=>{e.O(0,[1869],(()=>{return t=9516,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.b373ac20.js b/assets/js/main.b373ac20.js new file mode 100644 index 000000000..e7677ddfd --- /dev/null +++ b/assets/js/main.b373ac20.js @@ -0,0 +1,2 @@ +/*! For license information please see main.b373ac20.js.LICENSE.txt */ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8792],{5091:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"GPT Researcher",tagline:"The leading autonomous AI research agent",url:"https://docs.gptr.dev",baseUrl:"/",onBrokenLinks:"ignore",onBrokenMarkdownLinks:"warn",favicon:"img/gptr-logo.png",organizationName:"assafelovic",trailingSlash:!1,projectName:"gpt-researcher",themeConfig:{navbar:{title:"GPT Researcher",logo:{alt:"GPT Researcher",src:"img/gptr-logo.png"},items:[{type:"doc",docId:"welcome",position:"left",label:"Docs"},{to:"blog",label:"Blog",position:"left"},{type:"doc",docId:"faq",position:"left",label:"FAQ"},{href:"mailto:assaf.elovic@gmail.com",position:"left",label:"Contact"},{href:"https://github.com/assafelovic/gpt-researcher",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Community",items:[{label:"Discord",href:"https://discord.gg/8YkBcCED5y"},{label:"Twitter",href:"https://twitter.com/assaf_elovic"},{label:"LinkedIn",href:"https://www.linkedin.com/in/assafe/"}]},{title:"Company",items:[{label:"Homepage",href:"https://gptr.dev"},{label:"Contact",href:"mailto:assafelovic@gmail.com"}]}],copyright:"Copyright \xa9 2024 GPT Researcher."},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1,switchConfig:{darkIcon:"\ud83c\udf1c",darkIconStyle:{},lightIcon:"\ud83c\udf1e",lightIconStyle:{}}},docs:{versionPersistence:"localStorage"},metadata:[],prism:{additionalLanguages:[]},hideableSidebar:!1,tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},presets:[["@docusaurus/preset-classic",{docs:{sidebarPath:"/Users/assafelovic/Sites/gpt-researcher/docs/sidebars.js",editUrl:"https://github.com/assafelovic/gpt-researcher/tree/master/docs",remarkPlugins:[null],rehypePlugins:[null]},theme:{customCss:"/Users/assafelovic/Sites/gpt-researcher/docs/src/css/custom.css"}}]],stylesheets:[{href:"https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css",integrity:"sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc",crossorigin:"anonymous"}],plugins:[["/Users/assafelovic/Sites/gpt-researcher/docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/index.js",{hashed:!0,blogDir:"./blog/"}]],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",locales:["en"],localeConfigs:{}},onDuplicateRoutes:"warn",customFields:{},themes:[],titleDelimiter:"|",noIndex:!1}},9516:(e,t,n)=>{"use strict";var r=n(6540),a=n(961),o=n(4625),i=n(3259),l=n.n(i);const s=e=>{let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{align:"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,t.message),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},c=JSON.parse('{"/blog-f4c":{"component":"a6aa9e1f","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"},{"content":"1527b239"},{"content":"c7d22e29"}],"metadata":"b2b675dd"},"/blog/archive-f4c":{"component":"9e4087bc","archive":"b2f554cd"},"/blog/building-gpt-researcher-dcf":{"component":"ccc49370","sidebar":"814f3328","content":"6222f147"},"/blog/building-openai-assistant-7ba":{"component":"ccc49370","sidebar":"814f3328","content":"d3f86d34"},"/blog/gptr-hybrid-c62":{"component":"ccc49370","sidebar":"814f3328","content":"777ab133"},"/blog/gptr-langgraph-437":{"component":"ccc49370","sidebar":"814f3328","content":"5986bbbc"},"/blog/tags-e13":{"component":"01a85c17","sidebar":"814f3328","tags":"a7023ddc"},"/blog/tags/assistant-api-3c8":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"1527b239"}],"metadata":"9bc9a8f7"},"/blog/tags/autonomous-agent-093":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"c7d22e29"}],"metadata":"33e7285c"},"/blog/tags/github-e38":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"c7d22e29"}],"metadata":"78060cbc"},"/blog/tags/gpt-researcher-941":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"},{"content":"c7d22e29"}],"metadata":"667a64de"},"/blog/tags/hybrid-research-8a3":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"}],"metadata":"57fdb5e0"},"/blog/tags/langchain-97e":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"}],"metadata":"bcd3bfb0"},"/blog/tags/langgraph-932":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"03136cca"}],"metadata":"5f72c304"},"/blog/tags/multi-skills-16a":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"03136cca"}],"metadata":"86f86571"},"/blog/tags/openai-4e6":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"1527b239"}],"metadata":"415f4636"},"/blog/tags/opensource-43b":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"c7d22e29"}],"metadata":"f3eeb784"},"/blog/tags/search-api-cd3":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"1527b239"}],"metadata":"6081ee74"},"/blog/tags/tavily-d67":{"component":"6875c492","sidebar":"814f3328","items":[{"content":"708a06f3"},{"content":"1527b239"}],"metadata":"d1355481"},"/search-79a":{"component":"1a4e3797"},"/docs-2db":{"component":"1be78505","versionMetadata":"935f2afb"},"/docs/contribute-e6a":{"component":"17896441","content":"4ba7e5a3"},"/docs/examples/detailed_report-c1a":{"component":"17896441","content":"2700a261"},"/docs/examples/examples-8df":{"component":"17896441","content":"c6694585"},"/docs/examples/hybrid_research-16b":{"component":"17896441","content":"ad8d4462"},"/docs/faq-76c":{"component":"17896441","content":"0480b142"},"/docs/gpt-researcher/context/filtering-by-domain-2ab":{"component":"17896441","content":"167e38bb"},"/docs/gpt-researcher/context/local-docs-59a":{"component":"17896441","content":"4d63772d"},"/docs/gpt-researcher/context/tailored-research-1db":{"component":"17896441","content":"d52b8f97"},"/docs/gpt-researcher/context/vector-stores-b43":{"component":"17896441","content":"4f74abd9"},"/docs/gpt-researcher/frontend/frontend-15e":{"component":"17896441","content":"87b2d671"},"/docs/gpt-researcher/frontend/logs-777":{"component":"17896441","content":"19d568e8"},"/docs/gpt-researcher/frontend/playing-with-webhooks-07d":{"component":"17896441","content":"55be4921"},"/docs/gpt-researcher/getting-started/cli-917":{"component":"17896441","content":"bce7c409"},"/docs/gpt-researcher/getting-started/getting-started-82c":{"component":"17896441","content":"a9cdb420"},"/docs/gpt-researcher/getting-started/getting-started-with-docker-000":{"component":"17896441","content":"5b527261"},"/docs/gpt-researcher/getting-started/how-to-choose-6ed":{"component":"17896441","content":"845acc88"},"/docs/gpt-researcher/getting-started/introduction-079":{"component":"17896441","content":"5497f083"},"/docs/gpt-researcher/getting-started/linux-deployment-970":{"component":"17896441","content":"5dbe55ec"},"/docs/gpt-researcher/gptr/automated-tests-68e":{"component":"17896441","content":"dc7438fe"},"/docs/gpt-researcher/gptr/config-059":{"component":"17896441","content":"82b8edaf"},"/docs/gpt-researcher/gptr/example-b9b":{"component":"17896441","content":"b94bec88"},"/docs/gpt-researcher/gptr/handling-logs-as-they-stream-ac0":{"component":"17896441","content":"6410037f"},"/docs/gpt-researcher/gptr/pip-package-332":{"component":"17896441","content":"80f133ef"},"/docs/gpt-researcher/gptr/querying-the-backend-a32":{"component":"17896441","content":"f17f44a5"},"/docs/gpt-researcher/gptr/scraping-ab5":{"component":"17896441","content":"22f692c8"},"/docs/gpt-researcher/gptr/troubleshooting-b8f":{"component":"17896441","content":"5f72931d"},"/docs/gpt-researcher/llms/llms-0a2":{"component":"17896441","content":"d136d620"},"/docs/gpt-researcher/llms/running-with-ollama-4eb":{"component":"17896441","content":"25e02a64"},"/docs/gpt-researcher/llms/testing-your-llm-493":{"component":"17896441","content":"5de085db"},"/docs/gpt-researcher/multi_agents/langgraph-d54":{"component":"17896441","content":"9f68de09"},"/docs/gpt-researcher/search-engines/retrievers-47a":{"component":"17896441","content":"6a8455ba"},"/docs/gpt-researcher/search-engines/test-your-retriever-e89":{"component":"17896441","content":"7af93ffd"},"/docs/reference/config/config-212":{"component":"17896441","content":"44b7ef8d"},"/docs/reference/config/singleton-beb":{"component":"17896441","content":"b205135c"},"/docs/reference/processing/html-919":{"component":"17896441","content":"ae92dbda"},"/docs/reference/processing/text-d18":{"component":"17896441","content":"de289047"},"/docs/roadmap-e16":{"component":"17896441","content":"0dffb83e"},"/docs/welcome-177":{"component":"17896441","content":"ebfee794"},"/-deb":{"component":"c4f5d8e4","config":"5e9f5e1a"}}'),u={"01a85c17":[()=>Promise.all([n.e(1869),n.e(8209)]).then(n.bind(n,7867)),"@theme/BlogTagsListPage",7867],"03136cca":[()=>n.e(4093).then(n.bind(n,8724)),"@site/blog/2024-05-19-gptr-langgraph/index.md?truncated=true",8724],"0480b142":[()=>n.e(8070).then(n.bind(n,842)),"@site/docs/faq.md",842],"0dffb83e":[()=>n.e(821).then(n.bind(n,5146)),"@site/docs/roadmap.md",5146],"1527b239":[()=>n.e(8256).then(n.bind(n,4890)),"@site/blog/2023-11-12-openai-assistant/index.md?truncated=true",4890],"167e38bb":[()=>n.e(9195).then(n.bind(n,714)),"@site/docs/gpt-researcher/context/filtering-by-domain.md",714],17896441:[()=>Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,4578)),"@theme/DocItem",4578],"19d568e8":[()=>n.e(2645).then(n.bind(n,7203)),"@site/docs/gpt-researcher/frontend/logs.md",7203],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,8988)),"@theme/SearchPage",8988],"1be78505":[()=>Promise.all([n.e(1869),n.e(3802),n.e(8714)]).then(n.bind(n,7641)),"@theme/DocPage",7641],"22f692c8":[()=>n.e(2363).then(n.bind(n,2080)),"@site/docs/gpt-researcher/gptr/scraping.md",2080],"25e02a64":[()=>n.e(2082).then(n.bind(n,5221)),"@site/docs/gpt-researcher/llms/running-with-ollama.md",5221],"2700a261":[()=>n.e(264).then(n.bind(n,1091)),"@site/docs/examples/detailed_report.md",1091],"33e7285c":[()=>n.e(3107).then(n.t.bind(n,8989,19)),"~blog/default/blog-tags-autonomous-agent-12c.json",8989],"415f4636":[()=>n.e(634).then(n.t.bind(n,3922,19)),"~blog/default/blog-tags-openai-2f3.json",3922],"44b7ef8d":[()=>n.e(3587).then(n.bind(n,9425)),"@site/docs/reference/config/config.md",9425],"4ba7e5a3":[()=>n.e(9591).then(n.bind(n,4247)),"@site/docs/contribute.md",4247],"4d63772d":[()=>n.e(3622).then(n.bind(n,680)),"@site/docs/gpt-researcher/context/local-docs.md",680],"4f74abd9":[()=>n.e(8048).then(n.bind(n,1645)),"@site/docs/gpt-researcher/context/vector-stores.md",1645],"5497f083":[()=>n.e(6057).then(n.bind(n,6084)),"@site/docs/gpt-researcher/getting-started/introduction.md",6084],"55be4921":[()=>n.e(444).then(n.bind(n,956)),"@site/docs/gpt-researcher/frontend/playing-with-webhooks.md",956],"57fdb5e0":[()=>n.e(5193).then(n.t.bind(n,3309,19)),"~blog/default/blog-tags-hybrid-research-83e.json",3309],"5986bbbc":[()=>n.e(30).then(n.bind(n,7912)),"@site/blog/2024-05-19-gptr-langgraph/index.md",7912],"5b527261":[()=>n.e(1675).then(n.bind(n,4664)),"@site/docs/gpt-researcher/getting-started/getting-started-with-docker.md",4664],"5dbe55ec":[()=>n.e(989).then(n.bind(n,3294)),"@site/docs/gpt-researcher/getting-started/linux-deployment.md",3294],"5de085db":[()=>n.e(1736).then(n.bind(n,3630)),"@site/docs/gpt-researcher/llms/testing-your-llm.md",3630],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,5091)),"@generated/docusaurus.config",5091],"5f72931d":[()=>n.e(9066).then(n.bind(n,1121)),"@site/docs/gpt-researcher/gptr/troubleshooting.md",1121],"5f72c304":[()=>n.e(6107).then(n.t.bind(n,1362,19)),"~blog/default/blog-tags-langgraph-078.json",1362],"6081ee74":[()=>n.e(463).then(n.t.bind(n,7993,19)),"~blog/default/blog-tags-search-api-f27.json",7993],"6222f147":[()=>n.e(3287).then(n.bind(n,8727)),"@site/blog/2023-09-22-gpt-researcher/index.md",8727],"6410037f":[()=>n.e(4266).then(n.bind(n,1849)),"@site/docs/gpt-researcher/gptr/handling-logs-as-they-stream.md",1849],"667a64de":[()=>n.e(2212).then(n.t.bind(n,8548,19)),"~blog/default/blog-tags-gpt-researcher-3fd.json",8548],"6875c492":[()=>Promise.all([n.e(1869),n.e(3802),n.e(4813)]).then(n.bind(n,6033)),"@theme/BlogTagsPostsPage",6033],"6a8455ba":[()=>n.e(4753).then(n.bind(n,9385)),"@site/docs/gpt-researcher/search-engines/retrievers.md",9385],"708a06f3":[()=>n.e(9292).then(n.bind(n,9183)),"@site/blog/2024-09-7-hybrid-research/index.md?truncated=true",9183],"777ab133":[()=>n.e(4264).then(n.bind(n,7933)),"@site/blog/2024-09-7-hybrid-research/index.md",7933],"78060cbc":[()=>n.e(1178).then(n.t.bind(n,7102,19)),"~blog/default/blog-tags-github-f68.json",7102],"7af93ffd":[()=>n.e(8717).then(n.bind(n,939)),"@site/docs/gpt-researcher/search-engines/test-your-retriever.md",939],"80f133ef":[()=>n.e(4151).then(n.bind(n,3471)),"@site/docs/gpt-researcher/gptr/pip-package.md",3471],"814f3328":[()=>n.e(7472).then(n.t.bind(n,5513,19)),"~blog/default/blog-post-list-prop-default.json",5513],"82b8edaf":[()=>n.e(2337).then(n.bind(n,7937)),"@site/docs/gpt-researcher/gptr/config.md",7937],"845acc88":[()=>n.e(6631).then(n.bind(n,2288)),"@site/docs/gpt-researcher/getting-started/how-to-choose.md",2288],"86f86571":[()=>n.e(1624).then(n.t.bind(n,8778,19)),"~blog/default/blog-tags-multi-skills-0fe.json",8778],"87b2d671":[()=>n.e(6918).then(n.bind(n,920)),"@site/docs/gpt-researcher/frontend/frontend.md",920],"935f2afb":[()=>n.e(8581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],"9bc9a8f7":[()=>n.e(4492).then(n.t.bind(n,7005,19)),"~blog/default/blog-tags-assistant-api-f81.json",7005],"9e4087bc":[()=>n.e(2711).then(n.bind(n,631)),"@theme/BlogArchivePage",631],"9f68de09":[()=>n.e(3824).then(n.bind(n,4298)),"@site/docs/gpt-researcher/multi_agents/langgraph.md",4298],a6aa9e1f:[()=>Promise.all([n.e(1869),n.e(3802),n.e(7643)]).then(n.bind(n,2876)),"@theme/BlogListPage",2876],a7023ddc:[()=>n.e(9267).then(n.t.bind(n,8289,19)),"~blog/default/blog-tags-tags-4c2.json",8289],a9cdb420:[()=>n.e(2076).then(n.bind(n,8278)),"@site/docs/gpt-researcher/getting-started/getting-started.md",8278],ad8d4462:[()=>n.e(6644).then(n.bind(n,1934)),"@site/docs/examples/hybrid_research.md",1934],ae92dbda:[()=>n.e(2663).then(n.bind(n,9109)),"@site/docs/reference/processing/html.md",9109],b205135c:[()=>n.e(318).then(n.bind(n,1006)),"@site/docs/reference/config/singleton.md",1006],b2b675dd:[()=>n.e(1991).then(n.t.bind(n,9775,19)),"~blog/default/blog-c06.json",9775],b2f554cd:[()=>n.e(5894).then(n.t.bind(n,6042,19)),"~blog/default/blog-archive-80c.json",6042],b94bec88:[()=>n.e(8074).then(n.bind(n,3561)),"@site/docs/gpt-researcher/gptr/example.md",3561],bcd3bfb0:[()=>n.e(303).then(n.t.bind(n,1037,19)),"~blog/default/blog-tags-langchain-595.json",1037],bce7c409:[()=>n.e(2746).then(n.bind(n,7252)),"@site/docs/gpt-researcher/getting-started/cli.md",7252],c4f5d8e4:[()=>Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,1852)),"@site/src/pages/index.js",1852],c6694585:[()=>n.e(8995).then(n.bind(n,9593)),"@site/docs/examples/examples.md",9593],c7d22e29:[()=>n.e(6139).then(n.bind(n,4329)),"@site/blog/2023-09-22-gpt-researcher/index.md?truncated=true",4329],ccc49370:[()=>Promise.all([n.e(1869),n.e(3802),n.e(3249)]).then(n.bind(n,2359)),"@theme/BlogPostPage",2359],d1355481:[()=>n.e(708).then(n.t.bind(n,5506,19)),"~blog/default/blog-tags-tavily-7f7.json",5506],d136d620:[()=>n.e(3089).then(n.bind(n,5204)),"@site/docs/gpt-researcher/llms/llms.md",5204],d3f86d34:[()=>n.e(6553).then(n.bind(n,6694)),"@site/blog/2023-11-12-openai-assistant/index.md",6694],d52b8f97:[()=>n.e(2976).then(n.bind(n,7225)),"@site/docs/gpt-researcher/context/tailored-research.md",7225],dc7438fe:[()=>n.e(487).then(n.bind(n,9457)),"@site/docs/gpt-researcher/gptr/automated-tests.md",9457],de289047:[()=>n.e(5232).then(n.bind(n,4295)),"@site/docs/reference/processing/text.md",4295],ebfee794:[()=>n.e(4386).then(n.bind(n,674)),"@site/docs/welcome.md",674],f17f44a5:[()=>n.e(5981).then(n.bind(n,3368)),"@site/docs/gpt-researcher/gptr/querying-the-backend.md",3368],f3eeb784:[()=>n.e(7041).then(n.t.bind(n,8261,19)),"~blog/default/blog-tags-opensource-64e.json",8261]};const d=function(e){const t={};return function e(n,r){Object.keys(n).forEach((a=>{const o=n[a],i=r?r+"."+a:a;"object"===typeof o&&!!o&&Object.keys(o).length?e(o,i):t[i]=o}))}(e),t};const p=function(e,t){if("*"===e)return l()({loading:s,loader:()=>n.e(9090).then(n.bind(n,9090))});const a=c[`${e}-${t}`],o=[],i=[],p={},f=d(a);return Object.keys(f).forEach((e=>{const t=u[f[e]];t&&(p[e]=t[0],o.push(t[1]),i.push(t[2]))})),l().Map({loading:s,loader:p,modules:o,webpack:()=>i,render:(e,t)=>{const n=JSON.parse(JSON.stringify(a));Object.keys(e).forEach((t=>{let r=n;const a=t.split(".");for(let e=0;e<a.length-1;e+=1)r=r[a[e]];r[a[a.length-1]]=e[t].default;const o=Object.keys(e[t]).filter((e=>"default"!==e));o&&o.length&&o.forEach((n=>{r[a[a.length-1]][n]=e[t][n]}))}));const o=n.component;return delete n.component,r.createElement(o,{...n,...t})}})},f=[{path:"/blog",component:p("/blog","f4c"),exact:!0},{path:"/blog/archive",component:p("/blog/archive","f4c"),exact:!0},{path:"/blog/building-gpt-researcher",component:p("/blog/building-gpt-researcher","dcf"),exact:!0},{path:"/blog/building-openai-assistant",component:p("/blog/building-openai-assistant","7ba"),exact:!0},{path:"/blog/gptr-hybrid",component:p("/blog/gptr-hybrid","c62"),exact:!0},{path:"/blog/gptr-langgraph",component:p("/blog/gptr-langgraph","437"),exact:!0},{path:"/blog/tags",component:p("/blog/tags","e13"),exact:!0},{path:"/blog/tags/assistant-api",component:p("/blog/tags/assistant-api","3c8"),exact:!0},{path:"/blog/tags/autonomous-agent",component:p("/blog/tags/autonomous-agent","093"),exact:!0},{path:"/blog/tags/github",component:p("/blog/tags/github","e38"),exact:!0},{path:"/blog/tags/gpt-researcher",component:p("/blog/tags/gpt-researcher","941"),exact:!0},{path:"/blog/tags/hybrid-research",component:p("/blog/tags/hybrid-research","8a3"),exact:!0},{path:"/blog/tags/langchain",component:p("/blog/tags/langchain","97e"),exact:!0},{path:"/blog/tags/langgraph",component:p("/blog/tags/langgraph","932"),exact:!0},{path:"/blog/tags/multi-skills",component:p("/blog/tags/multi-skills","16a"),exact:!0},{path:"/blog/tags/openai",component:p("/blog/tags/openai","4e6"),exact:!0},{path:"/blog/tags/opensource",component:p("/blog/tags/opensource","43b"),exact:!0},{path:"/blog/tags/search-api",component:p("/blog/tags/search-api","cd3"),exact:!0},{path:"/blog/tags/tavily",component:p("/blog/tags/tavily","d67"),exact:!0},{path:"/search",component:p("/search","79a"),exact:!0},{path:"/docs",component:p("/docs","2db"),routes:[{path:"/docs/contribute",component:p("/docs/contribute","e6a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/examples/detailed_report",component:p("/docs/examples/detailed_report","c1a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/examples/examples",component:p("/docs/examples/examples","8df"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/examples/hybrid_research",component:p("/docs/examples/hybrid_research","16b"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/faq",component:p("/docs/faq","76c"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/filtering-by-domain",component:p("/docs/gpt-researcher/context/filtering-by-domain","2ab"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/local-docs",component:p("/docs/gpt-researcher/context/local-docs","59a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/tailored-research",component:p("/docs/gpt-researcher/context/tailored-research","1db"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/context/vector-stores",component:p("/docs/gpt-researcher/context/vector-stores","b43"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/frontend/frontend",component:p("/docs/gpt-researcher/frontend/frontend","15e"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/frontend/logs",component:p("/docs/gpt-researcher/frontend/logs","777"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/frontend/playing-with-webhooks",component:p("/docs/gpt-researcher/frontend/playing-with-webhooks","07d"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/cli",component:p("/docs/gpt-researcher/getting-started/cli","917"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/getting-started",component:p("/docs/gpt-researcher/getting-started/getting-started","82c"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/getting-started-with-docker",component:p("/docs/gpt-researcher/getting-started/getting-started-with-docker","000"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/how-to-choose",component:p("/docs/gpt-researcher/getting-started/how-to-choose","6ed"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/introduction",component:p("/docs/gpt-researcher/getting-started/introduction","079"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/getting-started/linux-deployment",component:p("/docs/gpt-researcher/getting-started/linux-deployment","970"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/automated-tests",component:p("/docs/gpt-researcher/gptr/automated-tests","68e"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/config",component:p("/docs/gpt-researcher/gptr/config","059"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/example",component:p("/docs/gpt-researcher/gptr/example","b9b"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/handling-logs-as-they-stream",component:p("/docs/gpt-researcher/gptr/handling-logs-as-they-stream","ac0"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/pip-package",component:p("/docs/gpt-researcher/gptr/pip-package","332"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/querying-the-backend",component:p("/docs/gpt-researcher/gptr/querying-the-backend","a32"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/scraping",component:p("/docs/gpt-researcher/gptr/scraping","ab5"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/gptr/troubleshooting",component:p("/docs/gpt-researcher/gptr/troubleshooting","b8f"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/llms/llms",component:p("/docs/gpt-researcher/llms/llms","0a2"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/llms/running-with-ollama",component:p("/docs/gpt-researcher/llms/running-with-ollama","4eb"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/llms/testing-your-llm",component:p("/docs/gpt-researcher/llms/testing-your-llm","493"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/multi_agents/langgraph",component:p("/docs/gpt-researcher/multi_agents/langgraph","d54"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/search-engines/retrievers",component:p("/docs/gpt-researcher/search-engines/retrievers","47a"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/gpt-researcher/search-engines/test-your-retriever",component:p("/docs/gpt-researcher/search-engines/test-your-retriever","e89"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/reference/config/config",component:p("/docs/reference/config/config","212"),exact:!0},{path:"/docs/reference/config/singleton",component:p("/docs/reference/config/singleton","beb"),exact:!0},{path:"/docs/reference/processing/html",component:p("/docs/reference/processing/html","919"),exact:!0},{path:"/docs/reference/processing/text",component:p("/docs/reference/processing/text","d18"),exact:!0},{path:"/docs/roadmap",component:p("/docs/roadmap","e16"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/welcome",component:p("/docs/welcome","177"),exact:!0,sidebar:"docsSidebar"}]},{path:"/",component:p("/","deb"),exact:!0},{path:"*",component:p("*")}];var h=n(8193),m=n(5920),g=n(3509),b=n(1169),v=n(7788),y=n(6347),w=n(5947),k=n.n(w);const E=[n(119),n(6725),n(435),n(1043)];function S(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];E.forEach((t=>{var r,a;const o=null!==(a=null===(r=null==t?void 0:t.default)||void 0===r?void 0:r[e])&&void 0!==a?a:t[e];o&&o(...n)}))}const x={onRouteUpdate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S("onRouteUpdate",...t)},onRouteUpdateDelayed(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];S("onRouteUpdateDelayed",...t)}};var _=n(2831);function T(e,t){const n=(0,_.u)(e,t);return Promise.all(n.map((e=>{const{component:t}=e.route;if(t&&t.preload)return t.preload()})))}const A={};const C=function(e){if(A[e.pathname])return{...e,pathname:A[e.pathname]};let t=e.pathname||"/";return t=t.trim().replace(/\/index\.html$/,""),""===t&&(t="/"),A[e.pathname]=t,{...e,pathname:t}};k().configure({showSpinner:!1});class P extends r.Component{constructor(e){super(e),this.previousLocation=null,this.progressBarTimeout=null,this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){const n=e.location!==this.props.location,{routes:r,delay:a}=this.props;if(n){const t=C(e.location);return this.startProgressBar(a),this.previousLocation=C(this.props.location),this.setState({nextRouteHasLoaded:!1}),T(r,t.pathname).then((()=>{x.onRouteUpdate({previousLocation:this.previousLocation,location:t}),this.previousLocation=null,this.setState({nextRouteHasLoaded:!0},this.stopProgressBar);const{hash:e}=t;if(e){const t=decodeURIComponent(e.substring(1)),n=document.getElementById(t);n&&n.scrollIntoView()}else window.scrollTo(0,0)})).catch((e=>console.warn(e))),!1}return!!t.nextRouteHasLoaded}clearProgressBarTimeout(){this.progressBarTimeout&&(clearTimeout(this.progressBarTimeout),this.progressBarTimeout=null)}startProgressBar(e){this.clearProgressBarTimeout(),this.progressBarTimeout=setTimeout((()=>{x.onRouteUpdateDelayed({location:C(this.props.location)}),k().start()}),e)}stopProgressBar(){this.clearProgressBarTimeout(),k().done()}render(){const{children:e,location:t}=this.props;return r.createElement(y.qh,{location:C(t),render:()=>e})}}const L=(0,y.y)(P);var R=n(8895),O=n(4586);const N="docusaurus-base-url-issue-banner-container",I="docusaurus-base-url-issue-banner",D="docusaurus-base-url-issue-banner-suggestion-container",F="__DOCUSAURUS_INSERT_BASEURL_BANNER";function j(e){return`\nwindow['${F}'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['${F}'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('${N}');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="${I}" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${D}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n var suggestionContainer = document.getElementById('${D}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function M(){const{siteConfig:{baseUrl:e}}=(0,O.A)();return(0,r.useLayoutEffect)((()=>{window[F]=!1}),[]),r.createElement(r.Fragment,null,!h.A.canUseDOM&&r.createElement(R.A,null,r.createElement("script",null,j(e))),r.createElement("div",{id:N}))}function B(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,O.A)(),{pathname:n}=(0,y.zy)();return t&&n===e?r.createElement(M,null):null}const z=function(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)};var $=n(6474);const U=function(){return r.createElement(v.A,{fallback:$.A},r.createElement(b.l,null,r.createElement(g.x,null,r.createElement(z,null,r.createElement(B,null),r.createElement(L,{routes:f,delay:1e3},(0,m.A)(f))))))};const q=function(e){if("undefined"==typeof document)return!1;const t=document.createElement("link");try{if(t.relList&&"function"==typeof t.relList.supports)return t.relList.supports(e)}catch(n){return!1}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;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).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)}))},G={};const H=function(e){return new Promise((t=>{G[e]?t():q(e).then((()=>{t(),G[e]=!0})).catch((()=>{}))}))},Q={},V={},W=()=>!(!("connection"in navigator)||-1===(navigator.connection.effectiveType||"").indexOf("2g")||!navigator.connection.saveData),K=e=>Array.prototype.concat.apply([],e),Y={prefetch:e=>{if(!(e=>!W()&&!V[e]&&!Q[e])(e))return!1;Q[e]=!0;const t=(0,_.u)(f,e);return K(t.map((e=>{return t=e.route.path,K(Object.entries(c).filter((e=>{let[n]=e;return n.replace(/(-[^-]+)$/,"")===t})).map((e=>{let[,t]=e;return Object.values(d(t))})));var t}))).forEach((e=>{const t=n.gca(e);t&&!/undefined/.test(t)&&H(t)})),!0},preload:e=>!!(e=>!W()&&!V[e])(e)&&(V[e]=!0,T(f,e),!0)};if(h.A.canUseDOM){window.docusaurus=Y;const e=a.hydrate;T(f,window.location.pathname).then((()=>{e(r.createElement(o.Kd,null,r.createElement(U,null)),document.getElementById("__docusaurus"))}))}},7788:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(6540),a=n(8193),o=n(6474);class i extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.A.canUseDOM&&this.setState({error:e})}render(){var e;const{children:t}=this.props,{error:n}=this.state;if(n){return(null!==(e=this.props.fallback)&&void 0!==e?e:o.A)({error:n,tryAgain:()=>this.setState({error:null})})}return t}}const l=i},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&!!window.screen}},8895:(e,t,n)=>{"use strict";n.d(t,{A:()=>he});var r,a,o,i,l=n(6540),s=n(5556),c=n.n(s),u=n(2098),d=n.n(u),p=n(115),f=n.n(p),h=n(5228),m=n.n(h),g="bodyAttributes",b="htmlAttributes",v="titleAttributes",y={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},w=(Object.keys(y).map((function(e){return y[e]})),"charset"),k="cssText",E="href",S="http-equiv",x="innerHTML",_="itemprop",T="name",A="property",C="rel",P="src",L="target",R={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},O="defaultTitle",N="defer",I="encodeSpecialCharacters",D="onChangeClientState",F="titleTemplate",j=Object.keys(R).reduce((function(e,t){return e[R[t]]=t,e}),{}),M=[y.NOSCRIPT,y.SCRIPT,y.STYLE],B="data-react-helmet",z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},G=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},H=function(e){var t=Y(e,y.TITLE),n=Y(e,F);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=Y(e,O);return t||r||void 0},Q=function(e){return Y(e,D)||function(){}},V=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return U({},e,t)}),{})},W=function(e,t){return t.filter((function(e){return void 0!==e[y.BASE]})).map((function(e){return e[y.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a<r.length;a++){var o=r[a].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}return t}),[])},K=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&te("Helmet: "+e+' should be of type "Array". Instead found type "'+z(t[e])+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var a={};n.filter((function(e){for(var n=void 0,o=Object.keys(e),i=0;i<o.length;i++){var l=o[i],s=l.toLowerCase();-1===t.indexOf(s)||n===C&&"canonical"===e[n].toLowerCase()||s===C&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(l)||l!==x&&l!==k&&l!==_||(n=l)}if(!n||!e[n])return!1;var c=e[n].toLowerCase();return r[n]||(r[n]={}),a[n]||(a[n]={}),!r[n][c]&&(a[n][c]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var o=Object.keys(a),i=0;i<o.length;i++){var l=o[i],s=m()({},r[l],a[l]);r[l]=s}return e}),[]).reverse()},Y=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},X=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){X(e)}),0)}),Z=function(e){return clearTimeout(e)},J="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||X:n.g.requestAnimationFrame||X,ee="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Z:n.g.cancelAnimationFrame||Z,te=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},ne=null,re=function(e,t){var n=e.baseTag,r=e.bodyAttributes,a=e.htmlAttributes,o=e.linkTags,i=e.metaTags,l=e.noscriptTags,s=e.onChangeClientState,c=e.scriptTags,u=e.styleTags,d=e.title,p=e.titleAttributes;ie(y.BODY,r),ie(y.HTML,a),oe(d,p);var f={baseTag:le(y.BASE,n),linkTags:le(y.LINK,o),metaTags:le(y.META,i),noscriptTags:le(y.NOSCRIPT,l),scriptTags:le(y.SCRIPT,c),styleTags:le(y.STYLE,u)},h={},m={};Object.keys(f).forEach((function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(h[e]=n),r.length&&(m[e]=f[e].oldTags)})),t&&t(),s(e,h,m)},ae=function(e){return Array.isArray(e)?e.join(""):e},oe=function(e,t){void 0!==e&&document.title!==e&&(document.title=ae(e)),ie(y.TITLE,t)},ie=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(B),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l<i.length;l++){var s=i[l],c=t[s]||"";n.getAttribute(s)!==c&&n.setAttribute(s,c),-1===a.indexOf(s)&&a.push(s);var u=o.indexOf(s);-1!==u&&o.splice(u,1)}for(var d=o.length-1;d>=0;d--)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute(B):n.getAttribute(B)!==i.join(",")&&n.setAttribute(B,i.join(","))}},le=function(e,t){var n=document.head||document.querySelector(y.HEAD),r=n.querySelectorAll(e+"["+B+"]"),a=Array.prototype.slice.call(r),o=[],i=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===x)n.innerHTML=t.innerHTML;else if(r===k)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var l=void 0===t[r]?"":t[r];n.setAttribute(r,l)}n.setAttribute(B,"true"),a.some((function(e,t){return i=t,n.isEqualNode(e)}))?a.splice(i,1):o.push(n)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return n.appendChild(e)})),{oldTags:a,newTags:o}},se=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[R[n]||n]=e[n],t}),t)},ue=function(e,t,n){switch(e){case y.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[B]=!0,a=ce(n,r),[l.createElement(y.TITLE,a,e)];var e,n,r,a},toString:function(){return function(e,t,n,r){var a=se(n),o=ae(t);return a?"<"+e+" "+B+'="true" '+a+">"+G(o,r)+"</"+e+">":"<"+e+" "+B+'="true">'+G(o,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case g:case b:return{toComponent:function(){return ce(t)},toString:function(){return se(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,a=((r={key:n})[B]=!0,r);return Object.keys(t).forEach((function(e){var n=R[e]||e;if(n===x||n===k){var r=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:r}}else a[n]=t[e]})),l.createElement(e,a)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!(e===x||e===k)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+G(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===M.indexOf(e);return t+"<"+e+" "+B+'="true" '+a+(i?"/>":">"+o+"</"+e+">")}),"")}(e,t,n)}}}},de=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.linkTags,i=e.metaTags,l=e.noscriptTags,s=e.scriptTags,c=e.styleTags,u=e.title,d=void 0===u?"":u,p=e.titleAttributes;return{base:ue(y.BASE,t,r),bodyAttributes:ue(g,n,r),htmlAttributes:ue(b,a,r),link:ue(y.LINK,o,r),meta:ue(y.META,i,r),noscript:ue(y.NOSCRIPT,l,r),script:ue(y.SCRIPT,s,r),style:ue(y.STYLE,c,r),title:ue(y.TITLE,{title:d,titleAttributes:p},r)}},pe=d()((function(e){return{baseTag:W([E,L],e),bodyAttributes:V(g,e),defer:Y(e,N),encode:Y(e,I),htmlAttributes:V(b,e),linkTags:K(y.LINK,[C,E],e),metaTags:K(y.META,[T,w,S,A,_],e),noscriptTags:K(y.NOSCRIPT,[x],e),onChangeClientState:Q(e),scriptTags:K(y.SCRIPT,[P,x],e),styleTags:K(y.STYLE,[k],e),title:H(e),titleAttributes:V(v,e)}}),(function(e){ne&&ee(ne),e.defer?ne=J((function(){re(e,(function(){ne=null}))})):(re(e),ne=null)}),de)((function(){return null})),fe=(a=pe,i=o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!f()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case y.SCRIPT:case y.NOSCRIPT:return{innerHTML:t};case y.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,a=e.newChildProps,o=e.nestedChildren;return U({},r,((t={})[n.type]=[].concat(r[n.type]||[],[U({},a,this.mapNestedChildrenToProps(n,o))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case y.TITLE:return U({},a,((t={})[r.type]=i,t.titleAttributes=U({},o),t));case y.BODY:return U({},a,{bodyAttributes:U({},o)});case y.HTML:return U({},a,{htmlAttributes:U({},o)})}return U({},a,((n={})[r.type]=U({},o),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=U({},t);return Object.keys(e).forEach((function(t){var r;n=U({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return l.Children.forEach(e,(function(e){if(e&&e.props){var a=e.props,o=a.children,i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[j[n]||n]=e[n],t}),t)}(q(a,["children"]));switch(n.warnOnInvalidChildren(e,o),e.type){case y.LINK:case y.META:case y.NOSCRIPT:case y.SCRIPT:case y.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:i,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:i,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=q(e,["children"]),r=U({},n);return t&&(r=this.mapChildrenToProps(t,r)),l.createElement(a,r)},$(t,null,[{key:"canUseDOM",set:function(e){a.canUseDOM=e}}]),t}(l.Component),o.propTypes={base:c().object,bodyAttributes:c().object,children:c().oneOfType([c().arrayOf(c().node),c().node]),defaultTitle:c().string,defer:c().bool,encodeSpecialCharacters:c().bool,htmlAttributes:c().object,link:c().arrayOf(c().object),meta:c().arrayOf(c().object),noscript:c().arrayOf(c().object),onChangeClientState:c().func,script:c().arrayOf(c().object),style:c().arrayOf(c().object),title:c().string,titleAttributes:c().object,titleTemplate:c().string},o.defaultProps={defer:!0,encodeSpecialCharacters:!0},o.peek=a.peek,o.rewind=function(){var e=a.rewind();return e||(e=de({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},i);fe.renderStatic=fe.rewind;const he=function(e){return l.createElement(fe,{...e})}},5489:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(6540),a=n(4625),o=n(4586),i=n(6654),l=n(8193);const s=(0,r.createContext)({collectLink:()=>{}});var c=n(6025),u=n(440);const d=function(e){let{isNavLink:t,to:n,href:d,activeClassName:p,isActive:f,"data-noBrokenLinkCheck":h,autoAddBaseUrl:m=!0,...g}=e;var b;const{siteConfig:{trailingSlash:v,baseUrl:y}}=(0,o.A)(),{withBaseUrl:w}=(0,c.h)(),k=(0,r.useContext)(s),E=n||d,S=(0,i.A)(E),x=null==E?void 0:E.replace("pathname://","");let _=void 0!==x?(T=x,m&&(e=>e.startsWith("/"))(T)?w(T):T):void 0;var T;_&&S&&(_=(0,u.applyTrailingSlash)(_,{trailingSlash:v,baseUrl:y}));const A=(0,r.useRef)(!1),C=t?a.k2:a.N_,P=l.A.canUseIntersectionObserver,L=(0,r.useRef)();(0,r.useEffect)((()=>(!P&&S&&null!=_&&window.docusaurus.prefetch(_),()=>{P&&L.current&&L.current.disconnect()})),[L,_,P,S]);const R=null!==(b=null==_?void 0:_.startsWith("#"))&&void 0!==b&&b,O=!_||!S||R;return _&&S&&!R&&!h&&k.collectLink(_),O?r.createElement("a",{href:_,...E&&!S&&{target:"_blank",rel:"noopener noreferrer"},...g}):r.createElement(C,{...g,onMouseEnter:()=>{A.current||null==_||(window.docusaurus.preload(_),A.current=!0)},innerRef:e=>{var t,n;P&&e&&S&&(t=e,n=()=>{null!=_&&window.docusaurus.prefetch(_)},L.current=new window.IntersectionObserver((e=>{e.forEach((e=>{t===e.target&&(e.isIntersecting||e.intersectionRatio>0)&&(L.current.unobserve(t),L.current.disconnect(),n())}))})),L.current.observe(t))},to:_||"",...t&&{isActive:f,activeClassName:p}})}},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>c});var r=n(6540);const a=/{\w+}/g,o="{}";function i(e,t){const n=[],i=e.replace(a,(e=>{const a=e.substr(1,e.length-2),i=null==t?void 0:t[a];if(void 0!==i){const e=r.isValidElement(i)?i:String(i);return n.push(e),o}return e}));return 0===n.length?e:n.every((e=>"string"==typeof e))?i.split(o).reduce(((e,t,r)=>{var a;return e.concat(t).concat(null!==(a=n[r])&&void 0!==a?a:"")}),""):i.split(o).reduce(((e,t,a)=>[...e,r.createElement(r.Fragment,{key:a},t,n[a])]),[])}var l=n(2654);function s(e){let{id:t,message:n}=e;var r,a;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 null!==(a=null!==(r=l[null!=t?t:n])&&void 0!==r?r:n)&&void 0!==a?a:t}function c(e,t){let{message:n,id:r}=e;return i(s({message:n,id:r}),t)}function u(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");return i(s({message:t,id:n}),r)}},3509:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>o});var r=n(6540);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)}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},1169:(e,t,n)=>{"use strict";n.d(t,{o:()=>u,l:()=>d});var r=n(6540),a=n(5091);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"welcome","docs":[{"id":"contribute","path":"/docs/contribute","sidebar":"docsSidebar"},{"id":"examples/detailed_report","path":"/docs/examples/detailed_report","sidebar":"docsSidebar"},{"id":"examples/examples","path":"/docs/examples/examples","sidebar":"docsSidebar"},{"id":"examples/hybrid_research","path":"/docs/examples/hybrid_research","sidebar":"docsSidebar"},{"id":"faq","path":"/docs/faq","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/filtering-by-domain","path":"/docs/gpt-researcher/context/filtering-by-domain","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/local-docs","path":"/docs/gpt-researcher/context/local-docs","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/tailored-research","path":"/docs/gpt-researcher/context/tailored-research","sidebar":"docsSidebar"},{"id":"gpt-researcher/context/vector-stores","path":"/docs/gpt-researcher/context/vector-stores","sidebar":"docsSidebar"},{"id":"gpt-researcher/frontend/frontend","path":"/docs/gpt-researcher/frontend/frontend","sidebar":"docsSidebar"},{"id":"gpt-researcher/frontend/logs","path":"/docs/gpt-researcher/frontend/logs","sidebar":"docsSidebar"},{"id":"gpt-researcher/frontend/playing-with-webhooks","path":"/docs/gpt-researcher/frontend/playing-with-webhooks","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/cli","path":"/docs/gpt-researcher/getting-started/cli","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/getting-started","path":"/docs/gpt-researcher/getting-started/getting-started","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/getting-started-with-docker","path":"/docs/gpt-researcher/getting-started/getting-started-with-docker","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/how-to-choose","path":"/docs/gpt-researcher/getting-started/how-to-choose","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/introduction","path":"/docs/gpt-researcher/getting-started/introduction","sidebar":"docsSidebar"},{"id":"gpt-researcher/getting-started/linux-deployment","path":"/docs/gpt-researcher/getting-started/linux-deployment","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/automated-tests","path":"/docs/gpt-researcher/gptr/automated-tests","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/config","path":"/docs/gpt-researcher/gptr/config","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/example","path":"/docs/gpt-researcher/gptr/example","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/handling-logs-as-they-stream","path":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/pip-package","path":"/docs/gpt-researcher/gptr/pip-package","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/querying-the-backend","path":"/docs/gpt-researcher/gptr/querying-the-backend","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/scraping","path":"/docs/gpt-researcher/gptr/scraping","sidebar":"docsSidebar"},{"id":"gpt-researcher/gptr/troubleshooting","path":"/docs/gpt-researcher/gptr/troubleshooting","sidebar":"docsSidebar"},{"id":"gpt-researcher/llms/llms","path":"/docs/gpt-researcher/llms/llms","sidebar":"docsSidebar"},{"id":"gpt-researcher/llms/running-with-ollama","path":"/docs/gpt-researcher/llms/running-with-ollama","sidebar":"docsSidebar"},{"id":"gpt-researcher/llms/testing-your-llm","path":"/docs/gpt-researcher/llms/testing-your-llm","sidebar":"docsSidebar"},{"id":"gpt-researcher/multi_agents/langgraph","path":"/docs/gpt-researcher/multi_agents/langgraph","sidebar":"docsSidebar"},{"id":"gpt-researcher/search-engines/retrievers","path":"/docs/gpt-researcher/search-engines/retrievers","sidebar":"docsSidebar"},{"id":"gpt-researcher/search-engines/test-your-retriever","path":"/docs/gpt-researcher/search-engines/test-your-retriever","sidebar":"docsSidebar"},{"id":"reference/config/config","path":"/docs/reference/config/config"},{"id":"reference/config/singleton","path":"/docs/reference/config/singleton"},{"id":"reference/processing/html","path":"/docs/reference/processing/html"},{"id":"reference/processing/text","path":"/docs/reference/processing/text"},{"id":"roadmap","path":"/docs/roadmap","sidebar":"docsSidebar"},{"id":"welcome","path":"/docs/welcome","sidebar":"docsSidebar"}]}]}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"0.0.0-4193","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"0.0.0-4193"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"0.0.0-4193"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"0.0.0-4193"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"0.0.0-4193"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"0.0.0-4193"},"@easyops-cn/docusaurus-search-local":{"type":"package","name":"@easyops-cn/docusaurus-search-local","version":"0.21.4"}}}'),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)}},6654:(e,t,n)=>{"use strict";function r(e){return!0===/^(\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},5920:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(2831).v},5567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BrowserRouter:()=>r.Kd,HashRouter:()=>r.I9,Link:()=>r.N_,MemoryRouter:()=>r.fS,NavLink:()=>r.k2,Prompt:()=>r.XG,Redirect:()=>r.rd,Route:()=>r.qh,Router:()=>r.Ix,StaticRouter:()=>r.kO,Switch:()=>r.dO,generatePath:()=>r.tW,matchPath:()=>r.B6,useHistory:()=>r.W6,useLocation:()=>r.zy,useParams:()=>r.g,useRouteMatch:()=>r.W5,withRouter:()=>r.y});var r=n(4625)},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,h:()=>o});var r=n(4586),a=n(6654);function o(){const{siteConfig:{baseUrl:e="/",url:t}={}}=(0,r.A)();return{withBaseUrl:(n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n)return n;if(n.startsWith("#"))return n;if((0,a.z)(n))return n;if(o)return t+n;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)}}function i(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(1169);const o=function(){return(0,r.useContext)(a.o)}},6588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,useAllPluginInstancesData:()=>i,usePluginData:()=>l});var r=n(4586),a=n(7065);function o(){const{globalData:e}=(0,r.A)();if(!e)throw new Error("Docusaurus global data not found.");return e}function i(e){const t=o()[e];if(!t)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return t}function l(e,t){void 0===t&&(t=a.W);const n=i(e)[t];if(!n)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return n}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(3509);function o(){return(0,r.useContext)(a.o)}},6474:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(6540),a=n(9360),o=n(7788);function i(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}const l=function(e){let{error:t,tryAgain:n}=e;return r.createElement(o.A,{fallback:()=>r.createElement(i,{error:t,tryAgain:n})},r.createElement(a.A,{title:"Page Error"},r.createElement(i,{error:t,tryAgain:n})))}},4733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocVersionSuggestions=t.getActiveDocContext=t.getActiveVersion=t.getLatestVersion=t.getActivePlugin=void 0;const r=n(5567);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).find((e=>{let[n,a]=e;return!!(0,r.matchPath)(t,{path:a.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.getLatestVersion=e=>e.versions.find((e=>e.isLast));t.getActiveVersion=(e,n)=>{const a=(0,t.getLatestVersion)(e);return[...e.versions.filter((e=>e!==a)),a].find((e=>!!(0,r.matchPath)(n,{path:e.path,exact:!1,strict:!1})))};t.getActiveDocContext=(e,n)=>{const a=(0,t.getActiveVersion)(e,n),o=null==a?void 0:a.docs.find((e=>!!(0,r.matchPath)(n,{path:e.path,exact:!0,strict:!1})));return{activeVersion:a,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}};t.getDocVersionSuggestions=(e,n)=>{const r=(0,t.getLatestVersion)(e),a=(0,t.getActiveDocContext)(e,n);return{latestDocSuggestion:null==a?void 0:a.alternateDocVersions[r.name],latestVersionSuggestion:r}}},727:(e,t,n)=>{"use strict";t.HW=t.zK=t.ir=t.r7=t.jh=t.vT=t.ht=t.Gy=void 0;const r=n(5215),a=n(5567),o=(0,r.__importStar)(n(6588)),i=n(4733),l={};t.Gy=()=>{var e;return null!==(e=(0,o.default)()["docusaurus-plugin-content-docs"])&&void 0!==e?e:l};t.ht=e=>(0,o.usePluginData)("docusaurus-plugin-content-docs",e);t.vT=function(e){void 0===e&&(e={});const n=(0,t.Gy)(),{pathname:r}=(0,a.useLocation)();return(0,i.getActivePlugin)(n,r,e)};t.jh=e=>(0,t.ht)(e).versions;t.r7=e=>{const n=(0,t.ht)(e);return(0,i.getLatestVersion)(n)};t.ir=e=>{const n=(0,t.ht)(e),{pathname:r}=(0,a.useLocation)();return(0,i.getActiveVersion)(n,r)};t.zK=e=>{const n=(0,t.ht)(e),{pathname:r}=(0,a.useLocation)();return(0,i.getActiveDocContext)(n,r)};t.HW=e=>{const n=(0,t.ht)(e),{pathname:r}=(0,a.useLocation)();return(0,i.getDocVersionSuggestions)(n,r)}},3679:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const a="iconExternalLink_wgqa",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},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"}))}},9360:(e,t,n)=>{"use strict";n.d(t,{A:()=>ve});var r=n(6540),a=n(53),o=n(7788),i=n(6347),l=n(1312),s=n(5965);const c="skipToContent_OuoZ";function u(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}const d=function(){const e=(0,r.useRef)(null),{action:t}=(0,i.W6)();return(0,s.$G)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&u(e.current)})),r.createElement("div",{ref:e},r.createElement("a",{href:"#",className:c,onClick:e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")||document.querySelector(".main-wrapper");t&&u(t)}},r.createElement(l.A,{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"},"Skip to main content")))};var p=n(8168);function f(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...l}=e;return r.createElement("svg",(0,p.A)({viewBox:"0 0 15 15",width:t,height:n},l),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const h="announcementBar_axC9",m="announcementBarPlaceholder_xYHE",g="announcementBarClose_A3A1",b="announcementBarContent_6uhP";const v=function(){const{isActive:e,close:t}=(0,s.Mj)(),{announcementBar:n}=(0,s.pN)();if(!e)return null;const{content:o,backgroundColor:i,textColor:c,isCloseable:u}=n;return r.createElement("div",{className:h,style:{backgroundColor:i,color:c},role:"banner"},u&&r.createElement("div",{className:m}),r.createElement("div",{className:b,dangerouslySetInnerHTML:{__html:o}}),u?r.createElement("button",{type:"button",className:(0,a.A)("clean-btn close",g),onClick:t,"aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(f,{width:14,height:14,strokeWidth:3.1})):null)};var y=n(3338),w=n(2303);const k={toggle:"toggle_iYfV",toggleScreenReader:"toggleScreenReader_h9qa",toggleDisabled:"toggleDisabled_xj38",toggleTrack:"toggleTrack_t-f2",toggleTrackCheck:"toggleTrackCheck_mk7D",toggleChecked:"toggleChecked_a04y",toggleTrackX:"toggleTrackX_dm8H",toggleTrackThumb:"toggleTrackThumb_W6To",toggleFocused:"toggleFocused_pRSw",toggleIcon:"toggleIcon_pHJ9"},E=e=>{let{icon:t,style:n}=e;return r.createElement("span",{className:(0,a.A)(k.toggleIcon,k.dark),style:n},t)},S=e=>{let{icon:t,style:n}=e;return r.createElement("span",{className:(0,a.A)(k.toggleIcon,k.light),style:n},t)},x=(0,r.memo)((e=>{let{className:t,icons:n,checked:o,disabled:i,onChange:l}=e;const[s,c]=(0,r.useState)(o),[u,d]=(0,r.useState)(!1),p=(0,r.useRef)(null);return r.createElement("div",{className:(0,a.A)(k.toggle,t,{[k.toggleChecked]:s,[k.toggleFocused]:u,[k.toggleDisabled]:i})},r.createElement("div",{className:k.toggleTrack,role:"button",tabIndex:-1,onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()}},r.createElement("div",{className:k.toggleTrackCheck},n.checked),r.createElement("div",{className:k.toggleTrackX},n.unchecked),r.createElement("div",{className:k.toggleTrackThumb})),r.createElement("input",{ref:p,checked:s,type:"checkbox",className:k.toggleScreenReader,"aria-label":"Switch between dark and light mode",onChange:l,onClick:()=>c(!s),onFocus:()=>d(!0),onBlur:()=>d(!1),onKeyDown:e=>{var t;"Enter"===e.key&&(null==(t=p.current)||t.click())}}))}));function _(e){const{colorMode:{switchConfig:{darkIcon:t,darkIconStyle:n,lightIcon:a,lightIconStyle:o}}}=(0,s.pN)(),i=(0,w.A)();return r.createElement(x,(0,p.A)({disabled:!i,icons:{checked:r.createElement(E,{icon:t,style:n}),unchecked:r.createElement(S,{icon:a,style:o})}},e))}var T=n(4785);const A=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,s.Mq)(((t,r)=>{if(!e)return;const i=t.scrollY;if(i<o.current)return void n(!0);if(a.current)return void(a.current=!1);const l=null==r?void 0:r.scrollY,s=document.documentElement.scrollHeight-o.current,c=window.innerHeight;l&&i>=l?n(!1):i+c<s&&n(!0)})),(0,s.$G)((t=>{if(e)return t.location.hash?(a.current=!0,void n(!1)):void n(!0)})),{navbarRef:i,isNavbarVisible:t}};const C=function(e){void 0===e&&(e=!0),(0,r.useEffect)((()=>(document.body.style.overflow=e?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[e])};var P=n(9312),L=n(4098),R=n(1612),O=n(1773);const N=e=>{let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,p.A)({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"}))},I={toggle:"toggle_2i4l",navbarHideable:"navbarHideable_RReh",navbarHidden:"navbarHidden_FBwS",navbarSidebarToggle:"navbarSidebarToggle_AVbO"},D="right";function F(){return(0,s.pN)().navbar.items}function j(){const{colorMode:{disableSwitch:e}}=(0,s.pN)(),{isDarkTheme:t,setLightTheme:n,setDarkTheme:a}=(0,T.A)();return{isDarkTheme:t,toggle:(0,r.useCallback)((e=>e.target.checked?a():n()),[n,a]),disabled:e}}function M(e){let{sidebarShown:t,toggleSidebar:n}=e;C(t);const o=F(),i=j(),c=function(e){var t;let{sidebarShown:n,toggleSidebar:a}=e;const o=null==(t=(0,s.Ko)())?void 0:t({toggleSidebar:a}),i=(0,s.ZC)(o),[l,c]=(0,r.useState)((()=>!1));(0,r.useEffect)((()=>{o&&!i&&c(!0)}),[o,i]);const u=!!o;return(0,r.useEffect)((()=>{u?n||c(!0):c(!1)}),[n,u]),{shown:l,hide:(0,r.useCallback)((()=>{c(!1)}),[]),content:o}}({sidebarShown:t,toggleSidebar:n});return r.createElement("div",{className:"navbar-sidebar"},r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(O.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title"}),!i.disabled&&r.createElement(_,{className:I.navbarSidebarToggle,checked:i.isDarkTheme,onChange:i.toggle}),r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:n},r.createElement(f,{color:"var(--ifm-color-emphasis-600)",className:I.navbarSidebarCloseSvg}))),r.createElement("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":c.shown})},r.createElement("div",{className:"navbar-sidebar__item menu"},r.createElement("ul",{className:"menu__list"},o.map(((e,t)=>r.createElement(R.A,(0,p.A)({mobile:!0},e,{onClick:n,key:t})))))),r.createElement("div",{className:"navbar-sidebar__item menu"},o.length>0&&r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__back",onClick:c.hide},r.createElement(l.A,{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")),c.content)))}const B=function(){const{navbar:{hideOnScroll:e,style:t}}=(0,s.pN)(),n=function(){const e=(0,P.A)(),t="mobile"===e,[n,a]=(0,r.useState)(!1);(0,s.$Z)((()=>{if(n)return a(!1),!1}));const o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===e&&a(!1)}),[e]),{shouldRender:t,toggle:o,shown:n}}(),o=j(),i=(0,L.vT)(),{navbarRef:l,isNavbarVisible:c}=A(e),u=F(),d=u.some((e=>"search"===e.type)),{leftItems:f,rightItems:h}=function(e){return{leftItems:e.filter((e=>"left"===(e.position??D))),rightItems:e.filter((e=>"right"===(e.position??D)))}}(u);return r.createElement("nav",{ref:l,className:(0,a.A)("navbar","navbar--fixed-top",{"navbar--dark":"dark"===t,"navbar--primary":"primary"===t,"navbar-sidebar--show":n.shown,[I.navbarHideable]:e,[I.navbarHidden]:e&&!c})},r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},((null==u?void 0:u.length)>0||i)&&r.createElement("button",{"aria-label":"Navigation bar toggle",className:"navbar__toggle clean-btn",type:"button",tabIndex:0,onClick:n.toggle,onKeyDown:n.toggle},r.createElement(N,null)),r.createElement(O.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title"}),f.map(((e,t)=>r.createElement(R.A,(0,p.A)({},e,{key:t}))))),r.createElement("div",{className:"navbar__items navbar__items--right"},h.map(((e,t)=>r.createElement(R.A,(0,p.A)({},e,{key:t})))),!o.disabled&&r.createElement(_,{className:I.toggle,checked:o.isDarkTheme,onChange:o.toggle}),!d&&r.createElement(y.A,null))),r.createElement("div",{role:"presentation",className:"navbar-sidebar__backdrop",onClick:n.toggle}),n.shouldRender&&r.createElement(M,{sidebarShown:n.shown,toggleSidebar:n.toggle}))};var z=n(5489),$=n(6025),U=n(6654);const q="footerLogoLink_SRtH";var G=n(6265),H=n(3679);function Q(e){let{to:t,href:n,label:a,prependBaseUrlToHref:o,...i}=e;const l=(0,$.A)(t),s=(0,$.A)(n,{forcePrependBaseUrl:!0});return r.createElement(z.A,(0,p.A)({className:"footer__link-item"},n?{href:o?s:n}:{to:l},i),n&&!(0,U.A)(n)?r.createElement("span",null,a,r.createElement(H.A,null)):a)}const V=e=>{let{sources:t,alt:n,width:a,height:o}=e;return r.createElement(G.A,{className:"footer__logo",alt:n,sources:t,width:a,height:o})};const W=function(){const{footer:e}=(0,s.pN)(),{copyright:t,links:n=[],logo:o={}}=e||{},i={light:(0,$.A)(o.src),dark:(0,$.A)(o.srcDark||o.src)};return e?r.createElement("footer",{className:(0,a.A)("footer",{"footer--dark":"dark"===e.style})},r.createElement("div",{className:"container"},n&&n.length>0&&r.createElement("div",{className:"row footer__links"},n.map(((e,t)=>r.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.createElement("div",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.createElement("ul",{className:"footer__items"},e.items.map(((e,t)=>e.html?r.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.createElement("li",{key:e.href||e.to,className:"footer__item"},r.createElement(Q,e))))):null)))),(o||t)&&r.createElement("div",{className:"footer__bottom text--center"},o&&(o.src||o.srcDark)&&r.createElement("div",{className:"margin-bottom--sm"},o.href?r.createElement(z.A,{href:o.href,className:q},r.createElement(V,{alt:o.alt,sources:i,width:o.width,height:o.height})):r.createElement(V,{alt:o.alt,sources:i})),t?r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}}):null))):null};var K=n(8193);const Y=(0,s.Wf)("theme"),X="light",Z="dark",J=e=>e===Z?Z:X,ee=e=>{(0,s.Wf)("theme").set(J(e))},te=()=>{const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.pN)(),[a,o]=(0,r.useState)((e=>K.A.canUseDOM?J(document.documentElement.getAttribute("data-theme")):J(e))(e)),i=(0,r.useCallback)((()=>{o(X),ee(X)}),[]),l=(0,r.useCallback)((()=>{o(Z),ee(Z)}),[]);return(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",J(a))}),[a]),(0,r.useEffect)((()=>{if(!t)try{const e=Y.get();null!==e&&o(J(e))}catch(e){console.error(e)}}),[t,o]),(0,r.useEffect)((()=>{t&&!n||window.matchMedia("(prefers-color-scheme: dark)").addListener((e=>{let{matches:t}=e;o(t?Z:X)}))}),[t,n]),{isDarkTheme:a===Z,setLightTheme:i,setDarkTheme:l}};var ne=n(493);const re=function(e){const{isDarkTheme:t,setLightTheme:n,setDarkTheme:a}=te();return r.createElement(ne.A.Provider,{value:{isDarkTheme:t,setLightTheme:n,setDarkTheme:a}},e.children)},ae="docusaurus.tab.",oe=()=>{const[e,t]=(0,r.useState)({}),n=(0,r.useCallback)(((e,t)=>{(0,s.Wf)(`${ae}${e}`).set(t)}),[]);return(0,r.useEffect)((()=>{try{const e={};(0,s.Eo)().forEach((t=>{if(t.startsWith(ae)){const n=t.substring(15);e[n]=(0,s.Wf)(t).get()}})),t(e)}catch(e){console.error(e)}}),[]),{tabGroupChoices:e,setTabGroupChoices:(e,r)=>{t((t=>({...t,[e]:r}))),n(e,r)}}},ie=(0,r.createContext)(void 0);const le=function(e){const{tabGroupChoices:t,setTabGroupChoices:n}=oe();return r.createElement(ie.Provider,{value:{tabGroupChoices:t,setTabGroupChoices:n}},e.children)};function se(e){let{children:t}=e;return r.createElement(re,null,r.createElement(s.oq,null,r.createElement(le,null,r.createElement(s.Tv,null,r.createElement(s.VQ,null,r.createElement(s.pM,null,t))))))}var ce=n(8895),ue=n(4586);function de(e){let{locale:t,version:n,tag:a}=e;return r.createElement(ce.A,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),a&&r.createElement("meta",{name:"docusaurus_tag",content:a}))}var pe=n(8139);function fe(){const{i18n:{defaultLocale:e,locales:t}}=(0,ue.A)(),n=(0,s.oK)();return r.createElement(ce.A,null,t.map((e=>r.createElement("link",{key:e,rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:e}))),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function he(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,ue.A)(),a=function(){const{siteConfig:{url:e}}=(0,ue.A)(),{pathname:t}=(0,i.zy)();return e+(0,$.A)(t)}(),o=t?`${n}${t}`:a;return r.createElement(ce.A,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function me(e){const{siteConfig:{favicon:t},i18n:{currentLocale:n,localeConfigs:a}}=(0,ue.A)(),{metadata:o,image:i}=(0,s.pN)(),{title:l,description:c,image:u,keywords:d,searchMetadata:f}=e,h=(0,$.A)(t),m=(0,s.s$)(l),g=n,b=a[n].direction;return r.createElement(r.Fragment,null,r.createElement(ce.A,null,r.createElement("html",{lang:g,dir:b}),t&&r.createElement("link",{rel:"shortcut icon",href:h}),r.createElement("title",null,m),r.createElement("meta",{property:"og:title",content:m}),r.createElement("meta",{name:"twitter:card",content:"summary_large_image"})),i&&r.createElement(pe.A,{image:i}),u&&r.createElement(pe.A,{image:u}),r.createElement(pe.A,{description:c,keywords:d}),r.createElement(he,null),r.createElement(fe,null),r.createElement(de,(0,p.A)({tag:s.Cy,locale:n},f)),r.createElement(ce.A,null,o.map(((e,t)=>r.createElement("meta",(0,p.A)({key:`metadata_${t}`},e))))))}const ge=function(){(0,r.useEffect)((()=>{const e="navigation-with-keyboard";function t(t){"keydown"===t.type&&"Tab"===t.key&&document.body.classList.add(e),"mousedown"===t.type&&document.body.classList.remove(e)}return document.addEventListener("keydown",t),document.addEventListener("mousedown",t),()=>{document.body.classList.remove(e),document.removeEventListener("keydown",t),document.removeEventListener("mousedown",t)}}),[])};function be(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(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(l.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}const ve=function(e){const{children:t,noFooter:n,wrapperClassName:i,pageClassName:l}=e;return ge(),r.createElement(se,null,r.createElement(me,e),r.createElement(d,null),r.createElement(v,null),r.createElement(B,null),r.createElement("div",{className:(0,a.A)(s.GN.wrapper.main,i,l)},r.createElement(o.A,{fallback:be},t)),!n&&r.createElement(W,null))}},1773:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(8168),a=n(6540),o=n(5489),i=n(6265),l=n(6025),s=n(4586),c=n(5965);const u=e=>{const{siteConfig:{title:t}}=(0,s.A)(),{navbar:{title:n,logo:u={src:""}}}=(0,c.pN)(),{imageClassName:d,titleClassName:p,...f}=e,h=(0,l.A)(u.href||"/"),m={light:(0,l.A)(u.src),dark:(0,l.A)(u.srcDark||u.src)},g=a.createElement(i.A,{sources:m,height:u.height,width:u.width,alt:u.alt||n||t});return a.createElement(o.A,(0,r.A)({to:h},f,u.target&&{target:u.target}),u.src&&(d?a.createElement("div",{className:d},g):a.createElement(a.Fragment,null,g)),null!=n&&a.createElement("b",{className:p},n))}},3031:(e,t,n)=>{"use strict";n.d(t,{A:()=>g,k:()=>f});var r=n(8168),a=n(6540),o=n(53),i=n(5489),l=n(6025),s=n(3679),c=n(6654),u=n(5965),d=n(1612);const p="dropdown__link--active";function f(e){var t;let{activeBasePath:n,activeBaseRegex:o,to:d,href:f,label:h,activeClassName:m="",prependBaseUrlToHref:g,...b}=e;const v=(0,l.A)(d),y=(0,l.A)(n),w=(0,l.A)(f,{forcePrependBaseUrl:!0}),k=h&&f&&!(0,c.A)(f),E=m===p;return a.createElement(i.A,(0,r.A)({},f?{href:g?w:f}:{isNavLink:!0,activeClassName:null!=(t=b.className)&&t.includes(m)?"":m,to:v,...n||o?{isActive:(e,t)=>o?(0,u.Gv)(o,t.pathname):t.pathname.startsWith(y)}:null},b),k?a.createElement("span",null,h,a.createElement(s.A,E&&{width:12,height:12})):h)}function h(e){let{className:t,isDropdownItem:n=!1,...i}=e;const l=a.createElement(f,(0,r.A)({className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t)},i));return n?a.createElement("li",null,l):l}function m(e){let{className:t,isDropdownItem:n,...i}=e;return a.createElement("li",{className:"menu__list-item"},a.createElement(f,(0,r.A)({className:(0,o.A)("menu__link",t)},i)))}const g=function(e){let{mobile:t=!1,position:n,...o}=e;const i=t?m:h;return a.createElement(i,(0,r.A)({},o,{activeClassName:o.activeClassName??(0,d.S)(t)}))}},8240:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(8168),a=n(6540),o=n(3031),i=n(4098),l=n(53),s=n(1612),c=n(5965);function u(e){let{docId:t,label:n,docsPluginId:u,...d}=e;const{activeVersion:p,activeDoc:f}=(0,i.zK)(u),{preferredVersion:h}=(0,c.g1)(u),m=(0,i.r7)(u),g=function(e,t){const n=e.flatMap((e=>e.docs)),r=n.find((e=>e.id===t));if(!r){const r=n.map((e=>e.id)).join("\n- ");throw new Error(`DocNavbarItem: couldn't find any doc with id "${t}" in version${e.length?"s":""} ${e.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${r}`)}return r}((0,c.sb)([p,h,m].filter(Boolean)),t),b=(0,s.S)(d.mobile);return a.createElement(o.A,(0,r.A)({exact:!0},d,{className:(0,l.A)(d.className,{[b]:(null==f?void 0:f.sidebar)&&f.sidebar===g.sidebar}),activeClassName:b,label:n??g.id,to:g.path}))}},7754:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(8168),a=n(6540),o=n(3031),i=n(1175),l=n(4098),s=n(5965),c=n(1312);const u=e=>e.docs.find((t=>t.id===e.mainDocId));function d(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:d,dropdownItemsBefore:p,dropdownItemsAfter:f,...h}=e;const m=(0,l.zK)(n),g=(0,l.jh)(n),b=(0,l.r7)(n),{preferredVersion:v,savePreferredVersionName:y}=(0,s.g1)(n);const w=function(){const e=g.map((e=>{const t=(null==m?void 0:m.alternateDocVersions[e.name])||u(e);return{isNavLink:!0,label:e.label,to:t.path,isActive:()=>e===(null==m?void 0:m.activeVersion),onClick:()=>{y(e.name)}}}));return[...p,...e,...f]}(),k=m.activeVersion??v??b,E=t&&w?(0,c.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):k.label,S=t&&w?void 0:u(k).path;return w.length<=1?a.createElement(o.A,(0,r.A)({},h,{mobile:t,label:E,to:S,isActive:d?()=>!1:void 0})):a.createElement(i.A,(0,r.A)({},h,{mobile:t,label:E,to:S,items:w,isActive:d?()=>!1:void 0}))}},6467:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),a=n(6540),o=n(3031),i=n(4098),l=n(5965);const s=e=>e.docs.find((t=>t.id===e.mainDocId));function c(e){let{label:t,to:n,docsPluginId:c,...u}=e;const d=(0,i.ir)(c),{preferredVersion:p}=(0,l.g1)(c),f=(0,i.r7)(c),h=d??p??f,m=t??h.label,g=n??s(h).path;return a.createElement(o.A,(0,r.A)({},u,{label:m,to:g}))}},1175:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(8168),a=n(6540),o=n(53),i=n(5965),l=n(3031),s=n(1612);const c="dropdown__link--active";function u(e,t){return e.some((e=>function(e,t){return!!(0,i.ys)(e.to,t)||!!(0,i.Gv)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function d(e){let{items:t,position:n,className:i,...u}=e;const d=(0,a.useRef)(null),p=(0,a.useRef)(null),[f,h]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{const e=e=>{d.current&&!d.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[d]),a.createElement("div",{ref:d,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":f})},a.createElement(l.k,(0,r.A)({className:(0,o.A)("navbar__link",i)},u,{onClick:u.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),h(!f))}}),u.children??u.label),a.createElement("ul",{ref:p,className:"dropdown__menu"},t.map(((e,n)=>a.createElement(s.A,(0,r.A)({isDropdownItem:!0,onKeyDown:e=>{if(n===t.length-1&&"Tab"===e.key){e.preventDefault(),h(!1);const t=d.current.nextElementSibling;t&&t.focus()}},activeClassName:c},e,{key:n}))))))}function p(e){let{items:t,className:n,position:c,...d}=e;const p=(0,i.BH)(),f=u(t,p),{collapsed:h,toggleCollapsed:m,setCollapsed:g}=(0,i.uW)({initialState:()=>!f});return(0,a.useEffect)((()=>{f&&g(!f)}),[p,f,g]),a.createElement("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":h})},a.createElement(l.k,(0,r.A)({role:"button",className:(0,o.A)("menu__link menu__link--sublist",n)},d,{onClick:e=>{e.preventDefault(),m()}}),d.children??d.label),a.createElement(i.Nt,{lazy:!0,as:"ul",className:"menu__list",collapsed:h},t.map(((e,t)=>a.createElement(s.A,(0,r.A)({mobile:!0,isDropdownItem:!0,onClick:d.onClick,activeClassName:"menu__link--active"},e,{key:t}))))))}const f=function(e){let{mobile:t=!1,...n}=e;const r=t?p:d;return a.createElement(r,n)}},1612:(e,t,n)=>{"use strict";n.d(t,{A:()=>b,S:()=>g});var r=n(6540),a=n(3031),o=n(1175),i=n(8168);const l=e=>{let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,i.A)({viewBox:"0 0 20 20",width:t,height:n,"aria-hidden":"true"},a),r.createElement("path",{fill:"currentColor",d:"M19.753 10.909c-.624-1.707-2.366-2.726-4.661-2.726-.09 0-.176.002-.262.006l-.016-2.063 3.525-.607c.115-.019.133-.119.109-.231-.023-.111-.167-.883-.188-.976-.027-.131-.102-.127-.207-.109-.104.018-3.25.461-3.25.461l-.013-2.078c-.001-.125-.069-.158-.194-.156l-1.025.016c-.105.002-.164.049-.162.148l.033 2.307s-3.061.527-3.144.543c-.084.014-.17.053-.151.143.019.09.19 1.094.208 1.172.018.08.072.129.188.107l2.924-.504.035 2.018c-1.077.281-1.801.824-2.256 1.303-.768.807-1.207 1.887-1.207 2.963 0 1.586.971 2.529 2.328 2.695 3.162.387 5.119-3.06 5.769-4.715 1.097 1.506.256 4.354-2.094 5.98-.043.029-.098.129-.033.207l.619.756c.08.096.206.059.256.023 2.51-1.73 3.661-4.515 2.869-6.683zm-7.386 3.188c-.966-.121-.944-.914-.944-1.453 0-.773.327-1.58.876-2.156a3.21 3.21 0 011.229-.799l.082 4.277a2.773 2.773 0 01-1.243.131zm2.427-.553l.046-4.109c.084-.004.166-.01.252-.01.773 0 1.494.145 1.885.361.391.217-1.023 2.713-2.183 3.758zm-8.95-7.668a.196.196 0 00-.196-.145h-1.95a.194.194 0 00-.194.144L.008 16.916c-.017.051-.011.076.062.076h1.733c.075 0 .099-.023.114-.072l1.008-3.318h3.496l1.008 3.318c.016.049.039.072.113.072h1.734c.072 0 .078-.025.062-.076-.014-.05-3.083-9.741-3.494-11.04zm-2.618 6.318l1.447-5.25 1.447 5.25H3.226z"}))};var s=n(4586),c=n(5965);const u="iconLanguage_EbrZ";function d(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...d}=e;const{i18n:{currentLocale:p,locales:f,localeConfigs:h}}=(0,s.A)(),m=(0,c.oK)();function g(e){return h[e].label}const b=[...n,...f.map((e=>{const t=`pathname://${m.createUrl({locale:e,fullyQualified:!1})}`;return{isNavLink:!0,label:g(e),to:t,target:"_self",autoAddBaseUrl:!1,className:e===p?"dropdown__link--active":"",style:{textTransform:"capitalize"}}})),...a],v=t?"Languages":g(p);return r.createElement(o.A,(0,i.A)({},d,{href:"#",mobile:t,label:r.createElement("span",null,r.createElement(l,{className:u}),r.createElement("span",null,v)),items:b}))}var p=n(3338);function f(e){let{mobile:t}=e;return t?null:r.createElement(p.A,null)}const h={default:()=>a.A,localeDropdown:()=>d,search:()=>f,dropdown:()=>o.A,docsVersion:()=>n(6467).A,docsVersionDropdown:()=>n(7754).A,doc:()=>n(8240).A},m=e=>{const t=h[e];if(!t)throw new Error(`No NavbarItem component found for type "${e}".`);return t()};const g=e=>e?"menu__link--active":"navbar__link--active";function b(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:t?"dropdown":"default"}(t,void 0!==n.items),o=m(a);return r.createElement(o,n)}},8139:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(6540),a=n(8895),o=n(5965),i=n(6025);function l(e){let{title:t,description:n,keywords:l,image:s,children:c}=e;const u=(0,o.s$)(t),{withBaseUrl:d}=(0,i.h)(),p=s?d(s,{absolute:!0}):void 0;return r.createElement(a.A,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}),l&&r.createElement("meta",{name:"keywords",content:Array.isArray(l)?l.join(","):l}),p&&r.createElement("meta",{property:"og:image",content:p}),p&&r.createElement("meta",{name:"twitter:image",content:p}),c)}},493:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(6540).createContext(void 0)},6265:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),a=n(6540),o=n(53),i=n(2303),l=n(4785);const s={themedImage:"themedImage_TMUO","themedImage--light":"themedImage--light_4Vu1","themedImage--dark":"themedImage--dark_uzRr"},c=e=>{const t=(0,i.A)(),{isDarkTheme:n}=(0,l.A)(),{sources:c,className:u,alt:d="",...p}=e,f=t?n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,f.map((e=>a.createElement("img",(0,r.A)({key:e,src:c[e],alt:d,className:(0,o.A)(s.themedImage,s[`themedImage--${e}`],u)},p)))))}},4098:(e,t,n)=>{"use strict";n.d(t,{Gy:()=>r.Gy,HW:()=>r.HW,ht:()=>r.ht,ir:()=>r.ir,jh:()=>r.jh,r7:()=>r.r7,vT:()=>r.vT,zK:()=>r.zK});var r=n(727)},4785:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(493);const o=function(){const e=(0,r.useContext)(a.A);if(null==e)throw new Error('"useThemeContext" is used outside of "Layout" component. Please see https://docusaurus.io/docs/api/themes/configuration#usethemecontext.');return e}},9312:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return a.A.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}const s=function(){const[e,t]=(0,r.useState)((()=>l()));return(0,r.useEffect)((()=>{function e(){t(l())}return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),e}},9567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(8193),a=n(5091);const o=e=>{if(r.A.canUseDOM){const{themeConfig:{prism:t={}}}=a.default,{additionalLanguages:r=[]}=t;window.Prism=e,r.forEach((e=>{n(8692)(`./prism-${e}`)})),delete window.Prism}}},6725:(e,t,n)=>{"use strict";var r=a(n(1258));function a(e){return e&&e.__esModule?e:{default:e}}(0,a(n(9567)).default)(r.default)},5965:(e,t,n)=>{"use strict";n.d(t,{oq:()=>Ae,Nt:()=>X,Cy:()=>_,B_:()=>oe,VQ:()=>ge,Gh:()=>ue,pM:()=>le,Tv:()=>Ue,GN:()=>ke,Wf:()=>c,tU:()=>T,Gv:()=>Qe,ys:()=>P,Eo:()=>u,QW:()=>Oe,wt:()=>E,Op:()=>S,Li:()=>x,bi:()=>Re,sb:()=>we,oK:()=>p,Mj:()=>Ce,uW:()=>q,g1:()=>ye,$Z:()=>Ne,BH:()=>Pe,$G:()=>z,Ko:()=>ce,Ww:()=>F,ZC:()=>B,Mq:()=>He,WQ:()=>Be,i3:()=>je,pN:()=>a,s$:()=>L});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}const o="localStorage";function i(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,l||(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),l=!0),null}var t}let l=!1;const s={get:()=>null,set:()=>{},del:()=>{}};const c=(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}}(e);const n=i(null==t?void 0:t.persistence);return null===n?s:{get:()=>n.getItem(e),set:t=>n.setItem(e,t),del:()=>n.removeItem(e)}};function u(e){void 0===e&&(e=o);const t=i(e);if(!t)return[];const n=[];for(let r=0;r<t.length;r+=1){const e=t.key(r);null!==e&&n.push(e)}return n}var d=n(6347);function p(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:a}}=(0,r.A)(),{pathname:o}=(0,d.zy)(),i=a===n?e:e.replace(`/${a}/`,"/"),l=o.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return`${a?t:""}${function(e){return e===n?`${i}`:`${i}${e}/`}(r)}${l}`}}}var f=n(8426),h=n.n(f);const m=/title=(["'])(.*?)\1/,g=/{([\d,-]+)}/,b=["js","jsBlock","jsx","python","html"],v={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},python:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},y=["highlight-next-line","highlight-start","highlight-end"],w=function(e){void 0===e&&(e=b);const t=e.map((e=>{const{start:t,end:n}=v[e];return`(?:${t}\\s*(${y.join("|")})\\s*${n})`})).join("|");return new RegExp(`^\\s*(?:${t})\\s*$`)},k=e=>{switch(e){case"js":case"javascript":case"ts":case"typescript":return w(["js","jsBlock"]);case"jsx":case"tsx":return w(["js","jsBlock","jsx"]);case"html":return w(["js","jsBlock","html"]);case"python":case"py":return w(["python"]);default:return w()}};function E(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.match(m))||void 0===t?void 0:t[2])&&void 0!==n?n:""}function S(e){const t=null==e?void 0:e.split(" ").find((e=>e.startsWith("language-")));return null==t?void 0:t.replace(/language-/,"")}function x(e,t,n){let r=e.replace(/\n$/,"");if(t&&g.test(t)){const e=t.match(g)[1];return{highlightLines:h()(e).filter((e=>e>0)).map((e=>e-1)),code:r}}if(void 0===n)return{highlightLines:[],code:r};const a=k(n),o=r.split("\n");let i,l="";for(let c=0;c<o.length;){const e=o[c].match(a);if(null!==e){switch(e.slice(1).find((e=>void 0!==e))){case"highlight-next-line":l+=`${c},`;break;case"highlight-start":i=c;break;case"highlight-end":l+=`${i}-${c-1},`}o.splice(c,1)}else c+=1}const s=h()(l);return r=o.join("\n"),{highlightLines:s,code:r}}const _="default";function T(e,t){return`docs-${e}-${t}`}var A=n(4098);const C=!!A.Gy,P=(e,t)=>{const n=e=>!e||(null==e?void 0:e.endsWith("/"))?e:`${e}/`;return n(e)===n(t)},L=e=>{const{siteConfig:t}=(0,r.A)(),{title:n,titleDelimiter:a}=t;return e&&e.trim().length?`${e.trim()} ${a} ${n}`:n};var R=n(6540);const O=["zero","one","two","few","many","other"];function N(e){return O.filter((t=>e.includes(t)))}const I={locale:"en",pluralForms:N(["one","other"]),select:e=>1===e?"one":"other"};function D(){const{i18n:{currentLocale:e}}=(0,r.A)();return(0,R.useMemo)((()=>{if(!Intl.PluralRules)return console.error("Intl.PluralRules not available!\nDocusaurus will fallback to a default/fallback (English) Intl.PluralRules implementation.\n "),I;try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:N(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to a default/fallback (English) Intl.PluralRules implementation.\n`),I}}),[e])}function F(){const e=D();return{selectMessage:(t,n)=>function(e,t,n){const r=e.split("|");if(1===r.length)return r[0];{r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms}), but the message contains ${r.length} plural forms: ${e} `);const a=n.select(t),o=n.pluralForms.indexOf(a);return r[Math.min(o,r.length-1)]}}(n,t,e)}}const j="undefined"!=typeof window?R.useLayoutEffect:R.useEffect;function M(e){const t=(0,R.useRef)(e);return j((()=>{t.current=e}),[e]),(0,R.useCallback)((function(){return t.current(...arguments)}),[])}function B(e){const t=(0,R.useRef)();return j((()=>{t.current=e})),t.current}function z(e){const t=(0,d.zy)(),n=B(t),r=M(e);(0,R.useEffect)((()=>{r({location:t,previousLocation:n})}),[r,t,n])}var $=n(8193);const U="ease-in-out";function q(e){let{initialState:t}=e;const[n,r]=(0,R.useState)(null!=t&&t),a=(0,R.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:a}}const G={display:"none",overflow:"hidden",height:"0px"},H={display:"block",overflow:"visible",height:"auto"};function Q(e,t){const n=t?G:H;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function V(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const a=(0,R.useRef)(!1);(0,R.useEffect)((()=>{const e=t.current;function o(){var t,n;const a=e.scrollHeight,o=null!==(t=null==r?void 0:r.duration)&&void 0!==t?t:function(e){const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(a);return{transition:`height ${o}ms ${null!==(n=null==r?void 0:r.easing)&&void 0!==n?n:U}`,height:`${a}px`}}function i(){const t=o();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return Q(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(i(),requestAnimationFrame((()=>{e.style.height=G.height,e.style.overflow=G.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{i()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function W(e){if(!$.A.canUseDOM)return e?G:H}function K(e){let{as:t="div",collapsed:n,children:r,animation:a,onCollapseTransitionEnd:o,className:i,disableSSRStyle:l}=e;const s=(0,R.useRef)(null);return V({collapsibleRef:s,collapsed:n,animation:a}),R.createElement(t,{ref:s,style:l?void 0:W(n),onTransitionEnd:e=>{"height"===e.propertyName&&(Q(s.current,n),null==o||o(n))},className:i},r)}function Y(e){let{collapsed:t,...n}=e;const[r,a]=(0,R.useState)(!t);(0,R.useLayoutEffect)((()=>{t||a(!0)}),[t]);const[o,i]=(0,R.useState)(t);return(0,R.useLayoutEffect)((()=>{r&&i(t)}),[r,t]),r?R.createElement(K,{...n,collapsed:o}):null}function X(e){let{lazy:t,...n}=e;const r=t?Y:K;return R.createElement(r,{...n})}var Z=n(2303),J=n(53);const ee="details_Q743",te="isBrowser_rWTL",ne="collapsibleContent_K5uX";function re(e){return!!e&&("SUMMARY"===e.tagName||re(e.parentElement))}function ae(e,t){return!!e&&(e===t||ae(e.parentElement,t))}const oe=e=>{let{summary:t,children:n,...r}=e;const a=(0,Z.A)(),o=(0,R.useRef)(null),{collapsed:i,setCollapsed:l}=q({initialState:!r.open}),[s,c]=(0,R.useState)(r.open);return R.createElement("details",{...r,ref:o,open:s,"data-collapsed":i,className:(0,J.A)(ee,{[te]:a},r.className),onMouseDown:e=>{re(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;re(t)&&ae(t,o.current)&&(e.preventDefault(),i?(l(!1),c(!0)):l(!0))}},t,R.createElement(X,{lazy:!1,collapsed:i,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{l(e),c(!e)}},R.createElement("div",{className:ne},n)))};const ie=(0,R.createContext)(null);function le(e){let{children:t}=e;return R.createElement(ie.Provider,{value:(0,R.useState)(null)},t)}function se(){const e=(0,R.useContext)(ie);if(null===e)throw new Error("MobileSecondaryMenuProvider was not used correctly, context value is null");return e}function ce(){const[e]=se();if(e){const t=e.component;return function(n){return R.createElement(t,{...e.props,...n})}}return()=>{}}function ue(e){let{component:t,props:n}=e;const[,r]=se(),a=(o=n,(0,R.useMemo)((()=>o),[...Object.keys(o),...Object.values(o)]));var o;return(0,R.useEffect)((()=>{r({component:t,props:a})}),[r,t,a]),(0,R.useEffect)((()=>()=>r(null)),[r]),null}const de=e=>`docs-preferred-version-${e}`,pe={save:(e,t,n)=>{c(de(e),{persistence:t}).set(n)},read:(e,t)=>c(de(e),{persistence:t}).get(),clear:(e,t)=>{c(de(e),{persistence:t}).del()}};function fe(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;const a={};return t.forEach((e=>{a[e]=function(e){const t=pe.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(pe.clear(e,n),{preferredVersionName:null})}(e)})),a}function he(){const e=(0,A.Gy)(),t=a().docs.versionPersistence,n=(0,R.useMemo)((()=>Object.keys(e)),[e]),[r,o]=(0,R.useState)((()=>function(e){const t={};return e.forEach((e=>{t[e]={preferredVersionName:null}})),t}(n)));(0,R.useEffect)((()=>{o(fe({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[r,(0,R.useMemo)((()=>({savePreferredVersion:function(e,n){pe.save(e,t,n),o((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}const me=(0,R.createContext)(null);function ge(e){let{children:t}=e;return C?R.createElement(be,null,t):R.createElement(R.Fragment,null,t)}function be(e){let{children:t}=e;const n=he();return R.createElement(me.Provider,{value:n},t)}var ve=n(7065);function ye(e){void 0===e&&(e=ve.W);const t=(0,A.ht)(e),[n,r]=function(){const e=(0,R.useContext)(me);if(!e)throw new Error('Can\'t find docs preferred context, maybe you forgot to use the "DocsPreferredVersionContextProvider"?');return e}(),{preferredVersionName:a}=n[e];return{preferredVersion:a?t.versions.find((e=>e.name===a)):null,savePreferredVersionName:(0,R.useCallback)((t=>{r.savePreferredVersion(e,t)}),[r,e])}}function we(e){return Array.from(new Set(e))}const ke={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"},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",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",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:{}},Ee=c("docusaurus.announcement.dismiss"),Se=c("docusaurus.announcement.id"),xe=()=>"true"===Ee.get(),_e=e=>Ee.set(String(e)),Te=(0,R.createContext)(null),Ae=e=>{let{children:t}=e;const n=(()=>{const{announcementBar:e}=a(),t=(0,Z.A)(),[n,r]=(0,R.useState)((()=>!!t&&xe()));(0,R.useEffect)((()=>{r(xe())}),[]);const o=(0,R.useCallback)((()=>{_e(!0),r(!0)}),[]);return(0,R.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=Se.get();"annoucement-bar"===n&&(n="announcement-bar");const a=t!==n;Se.set(t),a&&_e(!1),!a&&xe()||r(!1)}),[e]),(0,R.useMemo)((()=>({isActive:!!e&&!n,close:o})),[e,n,o])})();return R.createElement(Te.Provider,{value:n},t)},Ce=()=>{const e=(0,R.useContext)(Te);if(!e)throw new Error("useAnnouncementBar(): AnnouncementBar not found in React context: make sure to use the AnnouncementBarProvider on top of the tree");return e};function Pe(){const{siteConfig:{baseUrl:e}}=(0,r.A)(),{pathname:t}=(0,d.zy)();return t.replace(e,"/")}var Le=n(1312);const Re=()=>(0,Le.T)({id:"theme.tags.tagsPageTitle",message:"Tags",description:"The title of the tag list page"});function Oe(e){const t={};return Object.values(e).forEach((e=>{var n;const r=function(e){return e[0].toUpperCase()}(e.name);t[r]=null!==(n=t[r])&&void 0!==n?n:[],t[r].push(e)})),Object.entries(t).sort(((e,t)=>{let[n]=e,[r]=t;return n.localeCompare(r)})).map((e=>{let[t,n]=e;return{letter:t,tags:n.sort(((e,t)=>e.name.localeCompare(t.name)))}}))}function Ne(e){!function(e){const{block:t}=(0,d.W6)(),n=(0,R.useRef)(e);(0,R.useEffect)((()=>{n.current=e}),[e]),(0,R.useEffect)((()=>t(((e,t)=>n.current(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function Ie(e){const t=e.getBoundingClientRect();return t.top===t.bottom?Ie(e.parentNode):t}function De(e,t){let{anchorTopOffset:n}=t;var r;const a=e.find((e=>Ie(e).top>=n));if(a){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(Ie(a))?a:null!==(r=e[e.indexOf(a)-1])&&void 0!==r?r:null}return e[e.length-1]}function Fe(){const e=(0,R.useRef)(0),{navbar:{hideOnScroll:t}}=a();return(0,R.useEffect)((()=>{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}const je=function(e){const t=(0,R.useRef)(void 0),n=Fe();(0,R.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:r,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:i}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(r),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const r=[];for(let a=t;a<=n;a+=1)r.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(r.join()))}({minHeadingLevel:o,maxHeadingLevel:i}),s=De(l,{anchorTopOffset:n.current}),c=e.find((e=>s&&s.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){var r;n?(t.current&&t.current!==e&&(null===(r=t.current)||void 0===r||r.classList.remove(a)),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===c)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])};function Me(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:r}=e;return t.flatMap((e=>{const t=Me({toc:e.children,minHeadingLevel:n,maxHeadingLevel:r});return function(e){return e.level>=n&&e.level<=r}(e)?[{...e,children:t}]:t}))}function Be(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:r}=e;return(0,R.useMemo)((()=>Me({toc:t,minHeadingLevel:n,maxHeadingLevel:r})),[t,n,r])}function ze(){const e=(0,R.useRef)(!0);return(0,R.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}const $e=(0,R.createContext)(void 0);function Ue(e){let{children:t}=e;return R.createElement($e.Provider,{value:ze()},t)}function qe(){const e=(0,R.useContext)($e);if(null==e)throw new Error('"useScrollController" is used but no context provider was found in the React tree.');return e}const Ge=()=>$.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function He(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=qe(),r=(0,R.useRef)(Ge()),a=M(e);(0,R.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=Ge();a&&a(e,r.current),r.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function Qe(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}},2983:(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)}},440: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.applyTrailingSlash=void 0;var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}})},2849:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540),a=n(53);const o={loadingRing:"loadingRing_Zg7X","loading-ring":"loading-ring_rO2c"};function i(e){let{className:t}=e;return r.createElement("div",{className:(0,a.A)(o.loadingRing,t)},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null))}},5891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(8291),a=n.n(r),o=n(1088);async function i(e){{const t=await(await fetch(`${e}search-index.json?_=${o.Xi}`)).json(),n=t.map(((e,t)=>{let{documents:n,index:r}=e;return{type:t,documents:n,index:a().Index.load(r)}})),r=t.reduce(((e,t)=>{for(const n of t.index.invertedIndex)/\p{Unified_Ideograph}/u.test(n[0][0])&&e.add(n[0]);return e}),new Set);return{wrappedIndexes:n,zhDictionary:Array.from(r)}}}},3338:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=n(1088),a=n(6540),o=n(53),i=n(4586),l=n(8193),s=n(6347),c=n(5891),u=n(2384),d=n(6841),p=n(3810),f=n(7674);const h='<svg width="20" height="20" viewBox="0 0 20 20"><path d="M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round"></path></svg>',m='<svg width="20" height="20" viewBox="0 0 20 20"><path d="M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg>',g='<svg width="20" height="20" viewBox="0 0 20 20"><path d="M17 5H3h14zm0 5H3h14zm0 5H3h14z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round"></path></svg>',b='<svg width="20" height="20" viewBox="0 0 20 20"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M18 3v4c0 2-2 4-4 4H2"></path><path d="M8 17l-6-6 6-6"></path></g></svg>',v='<svg width="40" height="40" viewBox="0 0 20 20" fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"></path></svg>',y='<svg viewBox="0 0 24 54"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M8 6v42M20 27H8.3"></path></g></svg>',w='<svg viewBox="0 0 24 54"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M8 6v21M20 27H8.3"></path></g></svg>',k={searchBar:"searchBar_DBlZ",dropdownMenu:"dropdownMenu_0bDV",suggestion:"suggestion_uMTE",cursor:"cursor_PFw8",hitTree:"hitTree_v+XL",hitIcon:"hitIcon_rLCp",hitPath:"hitPath_gCTv",noResultsIcon:"noResultsIcon_jKPf",hitFooter:"hitFooter_9rOv",hitWrapper:"hitWrapper_RTFf",hitTitle:"hitTitle_4Fan",hitAction:"hitAction_ETy-",hideAction:"hideAction_KhBz",noResults:"noResults_iBoj",searchBarContainer:"searchBarContainer_I7kZ",searchBarLoadingRing:"searchBarLoadingRing_J5Ez",searchIndexLoading:"searchIndexLoading_oVRS",searchHintContainer:"searchHintContainer_CDc6",searchHint:"searchHint_2RRg",input:"input_e95Y",hint:"hint_S1nb",suggestions:"suggestions_Gb5D",dataset:"dataset_N4X9",empty:"empty_i1dZ"};function E(e){let{document:t,type:n,page:r,metadata:a,tokens:o,isInterOfTree:i,isLastOfTree:l}=e;const s=0===n,c=1===n,u=[];i?u.push(y):l&&u.push(w);const v=u.map((e=>`<span class="${k.hitTree}">${e}</span>`)),E=`<span class="${k.hitIcon}">${s?h:c?m:g}</span>`,S=[`<span class="${k.hitTitle}">${(0,p.C)(t.t,(0,f.g)(a,"t"),o)}</span>`];s||S.push(`<span class="${k.hitPath}">${(0,d.Z)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),o)}</span>`);const x=`<span class="${k.hitAction}">${b}</span>`;return[...v,E,`<span class="${k.hitWrapper}">`,...S,"</span>",x].join("")}function S(){return`<span class="${k.noResults}"><span class="${k.noResultsIcon}">${v}</span><span>${r.P9.no_results}</span></span>`}var x=n(2849);async function _(){const e=await Promise.all([n.e(489),n.e(5741)]).then(n.t.bind(n,489,23)),t=e.default;return t.noConflict?t.noConflict():e.noConflict&&e.noConflict(),t}const T="_highlight";const A=function(e){var t;let{handleSearchBarToggle:n}=e;const{siteConfig:{baseUrl:d}}=(0,i.A)(),p=(0,s.W6)(),f=(0,s.zy)(),h=(0,a.useRef)(null),m=(0,a.useRef)("empty"),g=(0,a.useRef)(!1),[b,v]=(0,a.useState)(!1),[y,w]=(0,a.useState)(!1),A=(0,a.useCallback)((async()=>{if("empty"!==m.current)return;m.current="loading",v(!0);const[{wrappedIndexes:e,zhDictionary:t},n]=await Promise.all([(0,c.Z)(d),_()]),a=n(h.current,{hint:!1,autoselect:!0,cssClasses:{root:k.searchBar,noPrefix:!0,dropdownMenu:k.dropdownMenu,input:k.input,hint:k.hint,suggestions:k.suggestions,suggestion:k.suggestion,cursor:k.cursor,dataset:k.dataset,empty:k.empty}},[{source:(0,u.m)(e,t,r.AT),templates:{suggestion:E,empty:S,footer:e=>{let{query:t,isEmpty:n}=e;if(n)return;const o=document.createElement("a"),i=`${d}search?q=${encodeURIComponent(t)}`;o.href=i,o.textContent=r.P9.see_all_results,o.addEventListener("click",(e=>{e.ctrlKey||e.metaKey||(e.preventDefault(),a.autocomplete.close(),p.push(i))}));const l=document.createElement("div");return l.className=k.hitFooter,l.appendChild(o),l}}}]).on("autocomplete:selected",(function(e,t){let{document:{u:n,h:a},tokens:o}=t,i=n;if(r.CU&&o.length>0){const e=new URLSearchParams;for(const t of o)e.append(T,t);i+=`?${e.toString()}`}a&&(i+=a),p.push(i)}));if(m.current="done",v(!1),g.current){const e=h.current;e.value&&a.autocomplete.open(),e.focus()}}),[d,p]);(0,a.useEffect)((()=>{if(!r.CU)return;const e=l.A.canUseDOM?new URLSearchParams(f.search).getAll(T):[];0!==e.length&&setTimeout((()=>{const t=document.querySelector("article");if(!t)return;const n=new r.CU(t);n.unmark(),n.mark(e)}))}),[f.search]);const C=(0,a.useCallback)((()=>{g.current=!0,A(),null==n||n(!0)}),[n,A]),P=(0,a.useCallback)((()=>{null==n||n(!1)}),[n]),L=(0,a.useCallback)((()=>{A()}),[A]),R=(0,a.useCallback)((e=>{e.target.value&&w(!0)}),[]),O=!!l.A.canUseDOM&&/mac/i.test((null==(t=navigator.userAgentData)?void 0:t.platform)??navigator.platform);return(0,a.useEffect)((()=>{function e(e){var t;(O?e.metaKey:e.ctrlKey)&&"KeyK"===e.code&&(e.preventDefault(),null==(t=h.current)||t.focus())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[O]),a.createElement("div",{className:(0,o.A)("navbar__search",k.searchBarContainer,{[k.searchIndexLoading]:b&&y})},a.createElement("input",{placeholder:r.P9.search_placeholder,"aria-label":"Search",className:"navbar__search-input",onMouseEnter:L,onFocus:C,onBlur:P,onChange:R,ref:h}),a.createElement(x.A,{className:k.searchBarLoadingRing}),a.createElement("div",{className:k.searchHintContainer},a.createElement("kbd",{className:k.searchHint},O?"\u2318":"ctrl"),a.createElement("kbd",{className:k.searchHint},"K")))}},2384:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(8291),a=n.n(r);var o=n(1088);function i(e){return l(e).concat(l(e.filter((e=>{const t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function l(e,t){return e.map((e=>({tokens:e.map((e=>e.value)),term:e.map((e=>({value:e.value,presence:a().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?a().Query.wildcard.TRAILING:a().Query.wildcard.NONE})))})))}function s(e,t,n){return function(r,l){const s=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return a()[t[0]].tokenizer(e).map((e=>e.toString()));let n=/[^-\s]+/g;return t.includes("zh")&&(n=/\w+|\p{Unified_Ideograph}+/gu),e.toLowerCase().match(n)||[]}(r,o.BH);if(0===s.length)return void l([]);const c=function(e,t){const n=function(e,t){const n=[];return function e(r,a){if(0===r.length)return void n.push(a);const o=r[0];if(/\p{Unified_Ideograph}/u.test(o)){const n=function(e,t){const n=[];return function e(r,a){let o=0,i=!1;for(const l of t)if(r.substr(0,l.length)===l){const t={missed:a.missed,term:a.term.concat({value:l})};r.length>l.length?e(r.substr(l.length),t):n.push(t),i=!0}else for(let t=l.length-1;t>o;t-=1){const s=l.substr(0,t);if(r.substr(0,t)===s){o=t;const l={missed:a.missed,term:a.term.concat({value:s,trailing:!0})};r.length>t?e(r.substr(t),l):n.push(l),i=!0;break}}i||(r.length>0?e(r.substr(1),{missed:a.missed+1,term:a.term}):a.term.length>0&&n.push(a))}(e,{missed:0,term:[]}),n.sort(((e,t)=>{const n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((e=>e.term))}(o,t);for(const t of n){const n=a.concat(...t);e(r.slice(1),n)}}else{const t=a.concat({value:o});e(r.slice(1),t)}}(e,[]),n}(e,t);if(0===n.length)return[{tokens:e,term:e.map((e=>({value:e,presence:a().Query.presence.REQUIRED,wildcard:a().Query.wildcard.LEADING|a().Query.wildcard.TRAILING})))}];for(const a of n)a[a.length-1].maybeTyping=!0;const r=[];for(const i of o.BH)if("en"===i)o.sx||r.unshift(a().stopWordFilter);else{const e=a()[i];e.stopWordFilter&&r.unshift(e.stopWordFilter)}let l;if(r.length>0){const e=e=>r.reduce(((e,t)=>e.filter((e=>t(e.value)))),e);l=[];const t=[];for(const r of n){const n=e(r);l.push(n),n.length<r.length&&n.length>0&&t.push(n)}n.push(...t)}else l=n.slice();const s=[];for(const a of l)if(a.length>2)for(let e=a.length-1;e>=0;e-=1)s.push(a.slice(0,e).concat(a.slice(e+1)));return i(n).concat(i(s))}(s,t),u=[];e:for(const{term:t,tokens:a}of c)for(const{documents:r,index:o,type:i}of e)if(u.push(...o.query((e=>{for(const n of t)e.term(n.value,{wildcard:n.wildcard,presence:n.presence})})).slice(0,n).filter((e=>!u.some((t=>t.document.i.toString()===e.ref)))).slice(0,n-u.length).map((t=>{const n=r.find((e=>e.i.toString()===t.ref));return{document:n,type:i,page:0!==i&&e[0].documents.find((e=>e.i===n.p)),metadata:t.matchData.metadata,tokens:a,score:t.score}}))),u.length>=n)break e;!function(e){e.forEach(((e,t)=>{e.index=t})),e.sort(((t,n)=>{let r=t.type>0&&t.page?e.findIndex((e=>e.document===t.page)):t.index,a=n.type>0&&n.page?e.findIndex((e=>e.document===n.page)):n.index;return-1===r&&(r=t.index),-1===a&&(a=n.index),r===a?0===t.type?-1:0===n.type?1:t.index-n.index:r-a}))}(u),function(e){e.forEach(((t,n)=>{n>0&&t.page&&e.some((e=>e.document===t.page))&&(n<e.length-1&&e[n+1].page===t.page?t.isInterOfTree=!0:t.isLastOfTree=!0)}))}(u),l(u)}}},3103:(e,t,n)=>{"use strict";function r(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{Z:()=>r})},7674:(e,t,n)=>{"use strict";function r(e,t){const n=[];for(const r of Object.values(e))r[t]&&n.push(...r[t].position);return n.sort(((e,t)=>e[0]-t[0]||t[1]-e[1]))}n.d(t,{g:()=>r})},6841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(3103);function a(e,t,n){const o=[];for(const i of t){const n=e.toLowerCase().indexOf(i);if(n>=0){n>0&&o.push(a(e.substr(0,n),t)),o.push(`<mark>${(0,r.Z)(e.substr(n,i.length))}</mark>`);const l=n+i.length;l<e.length&&o.push(a(e.substr(l),t));break}}return 0===o.length?n?`<mark>${(0,r.Z)(e)}</mark>`:(0,r.Z)(e):o.join("")}},3810:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(3103),a=n(6841);const o=/\w+|\p{Unified_Ideograph}/u;function i(e){const t=[];let n=0,r=e;for(;r.length>0;){const a=r.match(o);if(!a){t.push(r);break}a.index>0&&t.push(r.substr(0,a.index)),t.push(a[0]),n+=a.index+a[0].length,r=e.substr(n)}return t}var l=n(1088);function s(e,t,n,r){void 0===r&&(r=l.rG);const a={chunkIndex:-1},o=c(e,t,n,0,0,a),i=o.slice(0,a.chunkIndex),s=o[a.chunkIndex],u=[s.html],d=o.slice(a.chunkIndex+1);let p=s.textLength,f=0,h=0,m=!1,g=!1;for(;p<r;)if((f<=h||0===d.length)&&i.length>0){const e=i.pop();p+e.textLength<=r?(u.unshift(e.html),f+=e.textLength,p+=e.textLength):(m=!0,i.length=0)}else{if(!(d.length>0))break;{const e=d.shift();p+e.textLength<=r?(u.push(e.html),h+=e.textLength,p+=e.textLength):(g=!0,d.length=0)}}return(m||i.length>0)&&u.unshift("\u2026"),(g||d.length>0)&&u.push("\u2026"),u.join("")}function c(e,t,n,o,l,s){const u=[],[d,p]=t[o];if(d<l)(o+=1)<t.length&&u.push(...c(e,t,n,o,l));else{d>l&&u.push(...i(e.substring(l,d)).map((e=>({html:(0,r.Z)(e),textLength:e.length})))),s&&(s.chunkIndex=u.length),u.push({html:(0,a.Z)(e.substr(d,p),n,!0),textLength:p});const f=d+p;(o+=1)<t.length?u.push(...c(e,t,n,o,f)):f<e.length&&u.push(...i(e.substr(f)).map((e=>({html:(0,r.Z)(e),textLength:e.length}))))}return u}},1088:(e,t,n)=>{"use strict";n.d(t,{CU:()=>o,Xi:()=>i,BH:()=>r,sx:()=>a,rG:()=>s,AT:()=>l,P9:()=>c});n(8291);const r=["en"],a=!1,o=null,i="1e283c2b",l=8,s=50,c={search_placeholder:"Search",see_all_results:"See all results",no_results:"No results.",search_results_for:'Search results for "{{ keyword }}"',search_the_documentation:"Search the documentation",count_documents_found_plural:"{{ count }} documents found",count_documents_found:"{{ count }} document found",no_documents_were_found:"No documents were found"}},53:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}n.d(t,{A:()=>a});const a=function(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}},9231:(e,t,n)=>{"use strict";n.d(t,{zR:()=>S,TM:()=>P,yJ:()=>m,sC:()=>R,AO:()=>h,Fu:()=>g});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],l=e&&a(e),s=t&&a(t),c=l||s;if(e&&a(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var u=i[i.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,p=i.length;p>=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),a=l(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var c=n(1561);function u(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function f(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function m(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}var w="popstate",k="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function S(e){void 0===e&&(e={}),v||(0,c.A)(!1);var t,n=window.history,a=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,l=i.forceRefresh,s=void 0!==l&&l,d=i.getUserConfirmation,g=void 0===d?y:d,S=i.keyLength,x=void 0===S?6:S,_=e.basename?f(u(e.basename)):"";function T(e){var t=e||{},n=t.key,r=t.state,a=window.location,o=a.pathname+a.search+a.hash;return _&&(o=p(o,_)),m(o,r,n)}function A(){return Math.random().toString(36).substr(2,x)}var C=b();function P(e){(0,r.A)($,e),$.length=n.length,C.notifyListeners($.location,$.action)}function L(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(T(e.state))}function R(){N(T(E()))}var O=!1;function N(e){if(O)O=!1,P();else{C.confirmTransitionTo(e,"POP",g,(function(t){t?P({action:"POP",location:e}):function(e){var t=$.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var a=n-r;a&&(O=!0,j(a))}(e)}))}}var I=T(E()),D=[I.key];function F(e){return _+h(e)}function j(e){n.go(e)}var M=0;function B(e){1===(M+=e)&&1===e?(window.addEventListener(w,L),o&&window.addEventListener(k,R)):0===M&&(window.removeEventListener(w,L),o&&window.removeEventListener(k,R))}var z=!1;var $={length:n.length,action:"POP",location:I,createHref:F,push:function(e,t){var r="PUSH",o=m(e,t,A(),$.location);C.confirmTransitionTo(o,r,g,(function(e){if(e){var t=F(o),i=o.key,l=o.state;if(a)if(n.pushState({key:i,state:l},null,t),s)window.location.href=t;else{var c=D.indexOf($.location.key),u=D.slice(0,c+1);u.push(o.key),D=u,P({action:r,location:o})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",o=m(e,t,A(),$.location);C.confirmTransitionTo(o,r,g,(function(e){if(e){var t=F(o),i=o.key,l=o.state;if(a)if(n.replaceState({key:i,state:l},null,t),s)window.location.replace(t);else{var c=D.indexOf($.location.key);-1!==c&&(D[c]=o.key),P({action:r,location:o})}else window.location.replace(t)}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return z||(B(1),z=!0),function(){return z&&(z=!1,B(-1)),t()}},listen:function(e){var t=C.appendListener(e);return B(1),function(){B(-1),t()}}};return $}var x="hashchange",_={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:u},slash:{encodePath:u,decodePath:u}};function T(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function A(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(T(window.location.href)+"#"+e)}function P(e){void 0===e&&(e={}),v||(0,c.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),a=n.getUserConfirmation,o=void 0===a?y:a,i=n.hashType,l=void 0===i?"slash":i,s=e.basename?f(u(e.basename)):"",d=_[l],g=d.encodePath,w=d.decodePath;function k(){var e=w(A());return s&&(e=p(e,s)),m(e)}var E=b();function S(e){(0,r.A)(z,e),z.length=t.length,E.notifyListeners(z.location,z.action)}var P=!1,L=null;function R(){var e,t,n=A(),r=g(n);if(n!==r)C(r);else{var a=k(),i=z.location;if(!P&&(t=a,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(L===h(a))return;L=null,function(e){if(P)P=!1,S();else{var t="POP";E.confirmTransitionTo(e,t,o,(function(n){n?S({action:t,location:e}):function(e){var t=z.location,n=D.lastIndexOf(h(t));-1===n&&(n=0);var r=D.lastIndexOf(h(e));-1===r&&(r=0);var a=n-r;a&&(P=!0,F(a))}(e)}))}}(a)}}var O=A(),N=g(O);O!==N&&C(N);var I=k(),D=[h(I)];function F(e){t.go(e)}var j=0;function M(e){1===(j+=e)&&1===e?window.addEventListener(x,R):0===j&&window.removeEventListener(x,R)}var B=!1;var z={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=T(window.location.href)),n+"#"+g(s+h(e))},push:function(e,t){var n="PUSH",r=m(e,void 0,void 0,z.location);E.confirmTransitionTo(r,n,o,(function(e){if(e){var t=h(r),a=g(s+t);if(A()!==a){L=t,function(e){window.location.hash=e}(a);var o=D.lastIndexOf(h(z.location)),i=D.slice(0,o+1);i.push(t),D=i,S({action:n,location:r})}else S()}}))},replace:function(e,t){var n="REPLACE",r=m(e,void 0,void 0,z.location);E.confirmTransitionTo(r,n,o,(function(e){if(e){var t=h(r),a=g(s+t);A()!==a&&(L=t,C(a));var o=D.indexOf(h(z.location));-1!==o&&(D[o]=t),S({action:n,location:r})}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(e){void 0===e&&(e=!1);var t=E.setPrompt(e);return B||(M(1),B=!0),function(){return B&&(B=!1,M(-1)),t()}},listen:function(e){var t=E.appendListener(e);return M(1),function(){M(-1),t()}}};return z}function L(e,t,n){return Math.min(Math.max(e,t),n)}function R(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,a=t.initialEntries,o=void 0===a?["/"]:a,i=t.initialIndex,l=void 0===i?0:i,s=t.keyLength,c=void 0===s?6:s,u=b();function d(e){(0,r.A)(w,e),w.length=w.entries.length,u.notifyListeners(w.location,w.action)}function p(){return Math.random().toString(36).substr(2,c)}var f=L(l,0,o.length-1),g=o.map((function(e){return m(e,void 0,"string"==typeof e?p():e.key||p())})),v=h;function y(e){var t=L(w.index+e,0,w.entries.length-1),r=w.entries[t];u.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:g.length,action:"POP",location:g[f],index:f,entries:g,createHref:v,push:function(e,t){var r="PUSH",a=m(e,t,p(),w.location);u.confirmTransitionTo(a,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=m(e,t,p(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return w}},4146:(e,t,n)=>{"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var a=f(n);a&&a!==h&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),m=s(n),g=0;g<i.length;++g){var b=i[g];if(!(o[b]||r&&r[b]||m&&m[b]||l&&l[b])){var v=p(n,b);try{c(t,b,v)}catch(y){}}}}return t}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},8291:(e,t,n)=>{var r,a;!function(){var o,i,l,s,c,u,d,p,f,h,m,g,b,v,y,w,k,E,S,x,_,T,A,C,P,L,R,O,N,I,D=function(e){var t=new D.Builder;return t.pipeline.add(D.trimmer,D.stopWordFilter,D.stemmer),t.searchPipeline.add(D.stemmer),e.call(t,t),t.build()};D.version="2.3.9",D.utils={},D.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),D.utils.asString=function(e){return null==e?"":e.toString()},D.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r<n.length;r++){var a=n[r],o=e[a];if(Array.isArray(o))t[a]=o.slice();else{if("string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o)throw new TypeError("clone is not deep and does not support nested objects");t[a]=o}}return t},D.FieldRef=function(e,t,n){this.docRef=e,this.fieldName=t,this._stringValue=n},D.FieldRef.joiner="/",D.FieldRef.fromString=function(e){var t=e.indexOf(D.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var n=e.slice(0,t),r=e.slice(t+1);return new D.FieldRef(r,n,e)},D.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+D.FieldRef.joiner+this.docRef),this._stringValue},D.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},D.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},D.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},D.Set.prototype.contains=function(e){return!!this.elements[e]},D.Set.prototype.intersect=function(e){var t,n,r,a=[];if(e===D.Set.complete)return this;if(e===D.Set.empty)return e;this.length<e.length?(t=this,n=e):(t=e,n=this),r=Object.keys(t.elements);for(var o=0;o<r.length;o++){var i=r[o];i in n.elements&&a.push(i)}return new D.Set(a)},D.Set.prototype.union=function(e){return e===D.Set.complete?D.Set.complete:e===D.Set.empty?this:new D.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},D.idf=function(e,t){var n=0;for(var r in e)"_index"!=r&&(n+=Object.keys(e[r]).length);var a=(t-n+.5)/(n+.5);return Math.log(1+Math.abs(a))},D.Token=function(e,t){this.str=e||"",this.metadata=t||{}},D.Token.prototype.toString=function(){return this.str},D.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},D.Token.prototype.clone=function(e){return e=e||function(e){return e},new D.Token(e(this.str,this.metadata),this.metadata)},D.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map((function(e){return new D.Token(D.utils.asString(e).toLowerCase(),D.utils.clone(t))}));for(var n=e.toString().toLowerCase(),r=n.length,a=[],o=0,i=0;o<=r;o++){var l=o-i;if(n.charAt(o).match(D.tokenizer.separator)||o==r){if(l>0){var s=D.utils.clone(t)||{};s.position=[i,l],s.index=a.length,a.push(new D.Token(n.slice(i,o),s))}i=o+1}}return a},D.tokenizer.separator=/[\s\-]+/,D.Pipeline=function(){this._stack=[]},D.Pipeline.registeredFunctions=Object.create(null),D.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&D.utils.warn("Overwriting existing registered function: "+t),e.label=t,D.Pipeline.registeredFunctions[e.label]=e},D.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||D.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},D.Pipeline.load=function(e){var t=new D.Pipeline;return e.forEach((function(e){var n=D.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},D.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){D.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},D.Pipeline.prototype.after=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},D.Pipeline.prototype.before=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},D.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},D.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n<t;n++){for(var r=this._stack[n],a=[],o=0;o<e.length;o++){var i=r(e[o],o,e);if(null!=i&&""!==i)if(Array.isArray(i))for(var l=0;l<i.length;l++)a.push(i[l]);else a.push(i)}e=a}return e},D.Pipeline.prototype.runString=function(e,t){var n=new D.Token(e,t);return this.run([n]).map((function(e){return e.toString()}))},D.Pipeline.prototype.reset=function(){this._stack=[]},D.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return D.Pipeline.warnIfFunctionNotRegistered(e),e.label}))},D.Vector=function(e){this._magnitude=0,this.elements=e||[]},D.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,n=this.elements.length/2,r=n-t,a=Math.floor(r/2),o=this.elements[2*a];r>1&&(o<e&&(t=a),o>e&&(n=a),o!=e);)r=n-t,a=t+Math.floor(r/2),o=this.elements[2*a];return o==e||o>e?2*a:o<e?2*(a+1):void 0},D.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},D.Vector.prototype.upsert=function(e,t,n){this._magnitude=0;var r=this.positionForIndex(e);this.elements[r]==e?this.elements[r+1]=n(this.elements[r+1],t):this.elements.splice(r,0,e,t)},D.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,n=1;n<t;n+=2){var r=this.elements[n];e+=r*r}return this._magnitude=Math.sqrt(e)},D.Vector.prototype.dot=function(e){for(var t=0,n=this.elements,r=e.elements,a=n.length,o=r.length,i=0,l=0,s=0,c=0;s<a&&c<o;)(i=n[s])<(l=r[c])?s+=2:i>l?c+=2:i==l&&(t+=n[s+1]*r[c+1],s+=2,c+=2);return t},D.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},D.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t<this.elements.length;t+=2,n++)e[n]=this.elements[t];return e},D.Vector.prototype.toJSON=function(){return this.elements},D.stemmer=(i={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},l={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},d="^("+(c="[^aeiou][^aeiouy]*")+")?"+(u=(s="[aeiouy]")+"[aeiou]*")+c+"("+u+")?$",p="^("+c+")?"+u+c+u+c,f="^("+c+")?"+s,h=new RegExp("^("+c+")?"+u+c),m=new RegExp(p),g=new RegExp(d),b=new RegExp(f),v=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,w=/^(.+?)eed$/,k=/^(.+?)(ed|ing)$/,E=/.$/,S=/(at|bl|iz)$/,x=new RegExp("([^aeiouylsz])\\1$"),_=new RegExp("^"+c+s+"[^aeiouwxy]$"),T=/^(.+?[^aeiou])y$/,A=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,C=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,P=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,L=/^(.+?)(s|t)(ion)$/,R=/^(.+?)e$/,O=/ll$/,N=new RegExp("^"+c+s+"[^aeiouwxy]$"),I=function(e){var t,n,r,a,o,s,c;if(e.length<3)return e;if("y"==(r=e.substr(0,1))&&(e=r.toUpperCase()+e.substr(1)),o=y,(a=v).test(e)?e=e.replace(a,"$1$2"):o.test(e)&&(e=e.replace(o,"$1$2")),o=k,(a=w).test(e)){var u=a.exec(e);(a=h).test(u[1])&&(a=E,e=e.replace(a,""))}else o.test(e)&&(t=(u=o.exec(e))[1],(o=b).test(t)&&(s=x,c=_,(o=S).test(e=t)?e+="e":s.test(e)?(a=E,e=e.replace(a,"")):c.test(e)&&(e+="e")));return(a=T).test(e)&&(e=(t=(u=a.exec(e))[1])+"i"),(a=A).test(e)&&(t=(u=a.exec(e))[1],n=u[2],(a=h).test(t)&&(e=t+i[n])),(a=C).test(e)&&(t=(u=a.exec(e))[1],n=u[2],(a=h).test(t)&&(e=t+l[n])),o=L,(a=P).test(e)?(t=(u=a.exec(e))[1],(a=m).test(t)&&(e=t)):o.test(e)&&(t=(u=o.exec(e))[1]+u[2],(o=m).test(t)&&(e=t)),(a=R).test(e)&&(t=(u=a.exec(e))[1],o=g,s=N,((a=m).test(t)||o.test(t)&&!s.test(t))&&(e=t)),o=m,(a=O).test(e)&&o.test(e)&&(a=E,e=e.replace(a,"")),"y"==r&&(e=r.toLowerCase()+e.substr(1)),e},function(e){return e.update(I)}),D.Pipeline.registerFunction(D.stemmer,"stemmer"),D.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},D.stopWordFilter=D.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),D.Pipeline.registerFunction(D.stopWordFilter,"stopWordFilter"),D.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},D.Pipeline.registerFunction(D.trimmer,"trimmer"),D.TokenSet=function(){this.final=!1,this.edges={},this.id=D.TokenSet._nextId,D.TokenSet._nextId+=1},D.TokenSet._nextId=1,D.TokenSet.fromArray=function(e){for(var t=new D.TokenSet.Builder,n=0,r=e.length;n<r;n++)t.insert(e[n]);return t.finish(),t.root},D.TokenSet.fromClause=function(e){return"editDistance"in e?D.TokenSet.fromFuzzyString(e.term,e.editDistance):D.TokenSet.fromString(e.term)},D.TokenSet.fromFuzzyString=function(e,t){for(var n=new D.TokenSet,r=[{node:n,editsRemaining:t,str:e}];r.length;){var a=r.pop();if(a.str.length>0){var o,i=a.str.charAt(0);i in a.node.edges?o=a.node.edges[i]:(o=new D.TokenSet,a.node.edges[i]=o),1==a.str.length&&(o.final=!0),r.push({node:o,editsRemaining:a.editsRemaining,str:a.str.slice(1)})}if(0!=a.editsRemaining){if("*"in a.node.edges)var l=a.node.edges["*"];else{l=new D.TokenSet;a.node.edges["*"]=l}if(0==a.str.length&&(l.final=!0),r.push({node:l,editsRemaining:a.editsRemaining-1,str:a.str}),a.str.length>1&&r.push({node:a.node,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)}),1==a.str.length&&(a.node.final=!0),a.str.length>=1){if("*"in a.node.edges)var s=a.node.edges["*"];else{s=new D.TokenSet;a.node.edges["*"]=s}1==a.str.length&&(s.final=!0),r.push({node:s,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)})}if(a.str.length>1){var c,u=a.str.charAt(0),d=a.str.charAt(1);d in a.node.edges?c=a.node.edges[d]:(c=new D.TokenSet,a.node.edges[d]=c),1==a.str.length&&(c.final=!0),r.push({node:c,editsRemaining:a.editsRemaining-1,str:u+a.str.slice(2)})}}}return n},D.TokenSet.fromString=function(e){for(var t=new D.TokenSet,n=t,r=0,a=e.length;r<a;r++){var o=e[r],i=r==a-1;if("*"==o)t.edges[o]=t,t.final=i;else{var l=new D.TokenSet;l.final=i,t.edges[o]=l,t=l}}return n},D.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var n=t.pop(),r=Object.keys(n.node.edges),a=r.length;n.node.final&&(n.prefix.charAt(0),e.push(n.prefix));for(var o=0;o<a;o++){var i=r[o];t.push({prefix:n.prefix.concat(i),node:n.node.edges[i]})}}return e},D.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),n=t.length,r=0;r<n;r++){var a=t[r];e=e+a+this.edges[a].id}return e},D.TokenSet.prototype.intersect=function(e){for(var t=new D.TokenSet,n=void 0,r=[{qNode:e,output:t,node:this}];r.length;){n=r.pop();for(var a=Object.keys(n.qNode.edges),o=a.length,i=Object.keys(n.node.edges),l=i.length,s=0;s<o;s++)for(var c=a[s],u=0;u<l;u++){var d=i[u];if(d==c||"*"==c){var p=n.node.edges[d],f=n.qNode.edges[c],h=p.final&&f.final,m=void 0;d in n.output.edges?(m=n.output.edges[d]).final=m.final||h:((m=new D.TokenSet).final=h,n.output.edges[d]=m),r.push({qNode:f,output:m,node:p})}}}return t},D.TokenSet.Builder=function(){this.previousWord="",this.root=new D.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},D.TokenSet.Builder.prototype.insert=function(e){var t,n=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var r=0;r<e.length&&r<this.previousWord.length&&e[r]==this.previousWord[r];r++)n++;this.minimize(n),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(r=n;r<e.length;r++){var a=new D.TokenSet,o=e[r];t.edges[o]=a,this.uncheckedNodes.push({parent:t,char:o,child:a}),t=a}t.final=!0,this.previousWord=e},D.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},D.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},D.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},D.Index.prototype.search=function(e){return this.query((function(t){new D.QueryParser(e,t).parse()}))},D.Index.prototype.query=function(e){for(var t=new D.Query(this.fields),n=Object.create(null),r=Object.create(null),a=Object.create(null),o=Object.create(null),i=Object.create(null),l=0;l<this.fields.length;l++)r[this.fields[l]]=new D.Vector;e.call(t,t);for(l=0;l<t.clauses.length;l++){var s=t.clauses[l],c=null,u=D.Set.empty;c=s.usePipeline?this.pipeline.runString(s.term,{fields:s.fields}):[s.term];for(var d=0;d<c.length;d++){var p=c[d];s.term=p;var f=D.TokenSet.fromClause(s),h=this.tokenSet.intersect(f).toArray();if(0===h.length&&s.presence===D.Query.presence.REQUIRED){for(var m=0;m<s.fields.length;m++){o[R=s.fields[m]]=D.Set.empty}break}for(var g=0;g<h.length;g++){var b=h[g],v=this.invertedIndex[b],y=v._index;for(m=0;m<s.fields.length;m++){var w=v[R=s.fields[m]],k=Object.keys(w),E=b+"/"+R,S=new D.Set(k);if(s.presence==D.Query.presence.REQUIRED&&(u=u.union(S),void 0===o[R]&&(o[R]=D.Set.complete)),s.presence!=D.Query.presence.PROHIBITED){if(r[R].upsert(y,s.boost,(function(e,t){return e+t})),!a[E]){for(var x=0;x<k.length;x++){var _,T=k[x],A=new D.FieldRef(T,R),C=w[T];void 0===(_=n[A])?n[A]=new D.MatchData(b,R,C):_.add(b,R,C)}a[E]=!0}}else void 0===i[R]&&(i[R]=D.Set.empty),i[R]=i[R].union(S)}}}if(s.presence===D.Query.presence.REQUIRED)for(m=0;m<s.fields.length;m++){o[R=s.fields[m]]=o[R].intersect(u)}}var P=D.Set.complete,L=D.Set.empty;for(l=0;l<this.fields.length;l++){var R;o[R=this.fields[l]]&&(P=P.intersect(o[R])),i[R]&&(L=L.union(i[R]))}var O=Object.keys(n),N=[],I=Object.create(null);if(t.isNegated()){O=Object.keys(this.fieldVectors);for(l=0;l<O.length;l++){A=O[l];var F=D.FieldRef.fromString(A);n[A]=new D.MatchData}}for(l=0;l<O.length;l++){var j=(F=D.FieldRef.fromString(O[l])).docRef;if(P.contains(j)&&!L.contains(j)){var M,B=this.fieldVectors[F],z=r[F.fieldName].similarity(B);if(void 0!==(M=I[j]))M.score+=z,M.matchData.combine(n[F]);else{var $={ref:j,score:z,matchData:n[F]};I[j]=$,N.push($)}}}return N.sort((function(e,t){return t.score-e.score}))},D.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:D.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},D.Index.load=function(e){var t={},n={},r=e.fieldVectors,a=Object.create(null),o=e.invertedIndex,i=new D.TokenSet.Builder,l=D.Pipeline.load(e.pipeline);e.version!=D.version&&D.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+D.version+"' does not match serialized index '"+e.version+"'");for(var s=0;s<r.length;s++){var c=(d=r[s])[0],u=d[1];n[c]=new D.Vector(u)}for(s=0;s<o.length;s++){var d,p=(d=o[s])[0],f=d[1];i.insert(p),a[p]=f}return i.finish(),t.fields=e.fields,t.fieldVectors=n,t.invertedIndex=a,t.tokenSet=i.root,t.pipeline=l,new D.Index(t)},D.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=D.tokenizer,this.pipeline=new D.Pipeline,this.searchPipeline=new D.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},D.Builder.prototype.ref=function(e){this._ref=e},D.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},D.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},D.Builder.prototype.k1=function(e){this._k1=e},D.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var a=0;a<r.length;a++){var o=r[a],i=this._fields[o].extractor,l=i?i(e):e[o],s=this.tokenizer(l,{fields:[o]}),c=this.pipeline.run(s),u=new D.FieldRef(n,o),d=Object.create(null);this.fieldTermFrequencies[u]=d,this.fieldLengths[u]=0,this.fieldLengths[u]+=c.length;for(var p=0;p<c.length;p++){var f=c[p];if(null==d[f]&&(d[f]=0),d[f]+=1,null==this.invertedIndex[f]){var h=Object.create(null);h._index=this.termIndex,this.termIndex+=1;for(var m=0;m<r.length;m++)h[r[m]]=Object.create(null);this.invertedIndex[f]=h}null==this.invertedIndex[f][o][n]&&(this.invertedIndex[f][o][n]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var b=this.metadataWhitelist[g],v=f.metadata[b];null==this.invertedIndex[f][o][n][b]&&(this.invertedIndex[f][o][n][b]=[]),this.invertedIndex[f][o][n][b].push(v)}}}},D.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,n={},r={},a=0;a<t;a++){var o=D.FieldRef.fromString(e[a]),i=o.fieldName;r[i]||(r[i]=0),r[i]+=1,n[i]||(n[i]=0),n[i]+=this.fieldLengths[o]}var l=Object.keys(this._fields);for(a=0;a<l.length;a++){var s=l[a];n[s]=n[s]/r[s]}this.averageFieldLength=n},D.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),n=t.length,r=Object.create(null),a=0;a<n;a++){for(var o=D.FieldRef.fromString(t[a]),i=o.fieldName,l=this.fieldLengths[o],s=new D.Vector,c=this.fieldTermFrequencies[o],u=Object.keys(c),d=u.length,p=this._fields[i].boost||1,f=this._documents[o.docRef].boost||1,h=0;h<d;h++){var m,g,b,v=u[h],y=c[v],w=this.invertedIndex[v]._index;void 0===r[v]?(m=D.idf(this.invertedIndex[v],this.documentCount),r[v]=m):m=r[v],g=m*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[i]))+y),g*=p,g*=f,b=Math.round(1e3*g)/1e3,s.insert(w,b)}e[o]=s}this.fieldVectors=e},D.Builder.prototype.createTokenSet=function(){this.tokenSet=D.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},D.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new D.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},D.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},D.MatchData=function(e,t,n){for(var r=Object.create(null),a=Object.keys(n||{}),o=0;o<a.length;o++){var i=a[o];r[i]=n[i].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=r)},D.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),n=0;n<t.length;n++){var r=t[n],a=Object.keys(e.metadata[r]);null==this.metadata[r]&&(this.metadata[r]=Object.create(null));for(var o=0;o<a.length;o++){var i=a[o],l=Object.keys(e.metadata[r][i]);null==this.metadata[r][i]&&(this.metadata[r][i]=Object.create(null));for(var s=0;s<l.length;s++){var c=l[s];null==this.metadata[r][i][c]?this.metadata[r][i][c]=e.metadata[r][i][c]:this.metadata[r][i][c]=this.metadata[r][i][c].concat(e.metadata[r][i][c])}}}},D.MatchData.prototype.add=function(e,t,n){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=n);if(t in this.metadata[e])for(var r=Object.keys(n),a=0;a<r.length;a++){var o=r[a];o in this.metadata[e][t]?this.metadata[e][t][o]=this.metadata[e][t][o].concat(n[o]):this.metadata[e][t][o]=n[o]}else this.metadata[e][t]=n},D.Query=function(e){this.clauses=[],this.allFields=e},D.Query.wildcard=new String("*"),D.Query.wildcard.NONE=0,D.Query.wildcard.LEADING=1,D.Query.wildcard.TRAILING=2,D.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},D.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=D.Query.wildcard.NONE),e.wildcard&D.Query.wildcard.LEADING&&e.term.charAt(0)!=D.Query.wildcard&&(e.term="*"+e.term),e.wildcard&D.Query.wildcard.TRAILING&&e.term.slice(-1)!=D.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=D.Query.presence.OPTIONAL),this.clauses.push(e),this},D.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=D.Query.presence.PROHIBITED)return!1;return!0},D.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,D.utils.clone(t))}),this),this;var n=t||{};return n.term=e.toString(),this.clause(n),this},D.QueryParseError=function(e,t,n){this.name="QueryParseError",this.message=e,this.start=t,this.end=n},D.QueryParseError.prototype=new Error,D.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},D.QueryLexer.prototype.run=function(){for(var e=D.QueryLexer.lexText;e;)e=e(this)},D.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,n=this.pos,r=0;r<this.escapeCharPositions.length;r++)n=this.escapeCharPositions[r],e.push(this.str.slice(t,n)),t=n+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},D.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},D.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},D.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return D.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},D.QueryLexer.prototype.width=function(){return this.pos-this.start},D.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},D.QueryLexer.prototype.backup=function(){this.pos-=1},D.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=D.QueryLexer.EOS&&this.backup()},D.QueryLexer.prototype.more=function(){return this.pos<this.length},D.QueryLexer.EOS="EOS",D.QueryLexer.FIELD="FIELD",D.QueryLexer.TERM="TERM",D.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",D.QueryLexer.BOOST="BOOST",D.QueryLexer.PRESENCE="PRESENCE",D.QueryLexer.lexField=function(e){return e.backup(),e.emit(D.QueryLexer.FIELD),e.ignore(),D.QueryLexer.lexText},D.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(D.QueryLexer.TERM)),e.ignore(),e.more())return D.QueryLexer.lexText},D.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.EDIT_DISTANCE),D.QueryLexer.lexText},D.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.BOOST),D.QueryLexer.lexText},D.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(D.QueryLexer.TERM)},D.QueryLexer.termSeparator=D.tokenizer.separator,D.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==D.QueryLexer.EOS)return D.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return D.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if(t.match(D.QueryLexer.termSeparator))return D.QueryLexer.lexTerm}else e.escapeCharacter()}},D.QueryParser=function(e,t){this.lexer=new D.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},D.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=D.QueryParser.parseClause;e;)e=e(this);return this.query},D.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},D.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},D.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},D.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case D.QueryLexer.PRESENCE:return D.QueryParser.parsePresence;case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new D.QueryParseError(n,t.start,t.end)}},D.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=D.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=D.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new D.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new D.QueryParseError(n,t.start,t.end)}switch(r.type){case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new D.QueryParseError(n,r.start,r.end)}}},D.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var a=e.peekLexeme();if(null==a){r="expecting term, found nothing";throw new D.QueryParseError(r,t.start,t.end)}if(a.type===D.QueryLexer.TERM)return D.QueryParser.parseTerm;r="expecting term, found '"+a.type+"'";throw new D.QueryParseError(r,a.start,a.end)}},D.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new D.QueryParseError(r,n.start,n.end)}else e.nextClause()}},D.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new D.QueryParseError(r,a.start,a.end)}else e.nextClause()}},D.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new D.QueryParseError(r,a.start,a.end)}else e.nextClause()}},void 0===(a="function"==typeof(r=function(){return D})?r.call(t,n,t,e):r)||(e.exports=a)}()},435:(e,t,n)=>{"use strict";n.r(t)},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function a(e,t,n){return e<t?t:e>n?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,a){for(var o,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in o=Object(arguments[s]))n.call(o,c)&&(l[c]=o[c]);if(t){i=t(o);for(var u=0;u<i.length;u++)r.call(o,i[u])&&(l[i[u]]=o[i[u]])}}return l}},8426:(e,t)=>{function n(e){let t,n=[];for(let r of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,a,o]=t;if(r&&o){r=parseInt(r),o=parseInt(o);const e=r<o?1:-1;"-"!==a&&".."!==a&&"\u2025"!==a||(o+=e);for(let t=r;t!==o;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},5302:(e,t,n)=>{var r=n(4634);e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return l(o(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,l="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],p=n[1],f=n.index;if(l+=e.slice(i,f),i=f+d.length,p)l+=p[1];else{var h=e[i],m=n[2],g=n[3],b=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=m&&null!=h&&h!==m,E="+"===y||"*"===y,S="?"===y||"*"===y,x=n[2]||u,_=b||v;r.push({name:g||o++,prefix:m||"",delimiter:x,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:_?c(_):w?".*":"[^"+s(x)+"]+?"})}}return i<e.length&&(l+=e.substr(i)),l&&r.push(l),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),a=0;a<e.length;a++)"object"==typeof e[a]&&(n[a]=new RegExp("^(?:"+e[a].pattern+")$",d(t)));return function(t,a){for(var o="",l=t||{},s=(a||{}).pretty?i:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var d,p=l[u.name];if(null==p){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(d=s(p[f]),!n[c].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");o+=(0===f?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[c].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');o+=u.prefix+d}}else o+=u}return o}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var a=(n=n||{}).strict,o=!1!==n.end,i="",l=0;l<e.length;l++){var c=e[l];if("string"==typeof c)i+=s(c);else{var p=s(c.prefix),f="(?:"+c.pattern+")";t.push(c),c.repeat&&(f+="(?:"+p+f+")*"),i+=f=c.optional?c.partial?p+"("+f+")?":"(?:"+p+"("+f+"))?":p+"("+f+")"}}var h=s(n.delimiter||"/"),m=i.slice(-h.length)===h;return a||(i=(m?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":a&&m?"":"(?="+h+"|$)",u(new RegExp("^"+i,d(n)),t)}function f(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],a=0;a<e.length;a++)r.push(f(e[a],t,n).source);return u(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return p(o(e,n),t,n)}(e,t,n)}},1258:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>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(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var l in o)if(o.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=o[l])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],a||l);var s=t[l],c=r.util.type(s);"Object"!==c||o[i(s)]?"Array"!==c||o[i(s)]||(o[i(s)]=!0,e(s,n,l,o)):(o[i(s)]=!0,e(s,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};return r.hooks.run("before-tokenize",o),o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new l;return s(a,a.head,e),i(e,a,t,a.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,l,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,b=!!m.lookbehind,v=!!m.greedy,y=m.alias;if(v&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var k=m.pattern||m,E=l.next,S=u;E!==t.tail&&!(d&&S>=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var _,T=1;if(v){if(!(_=o(k,S,e,b))||_.index>=e.length)break;var A=_.index,C=_.index+_[0].length,P=S;for(P+=E.value.length;A>=P;)P+=(E=E.next).value.length;if(S=P-=E.value.length,E.value instanceof a)continue;for(var L=E;L!==t.tail&&(P<C||"string"==typeof L.value);L=L.next)T++,P+=L.value.length;T--,x=e.slice(S,P),_.index-=S}else if(!(_=o(k,0,x,b)))continue;A=_.index;var R=_[0],O=x.slice(0,A),N=x.slice(A+R.length),I=S+x.length;d&&I>d.reach&&(d.reach=I);var D=E.prev;if(O&&(D=s(t,D,O),S+=O.length),c(t,D,T),E=s(t,D,new a(p,g?r.tokenize(R,g):R,y,R)),N&&s(t,E,N),T>1){var F={cause:p+","+h,reach:I};i(e,t,n,E.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.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<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var l="";for(var s in o.attributes)l+=" "+s+'="'+(o.attributes[s]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+l+">"+o.content+"</"+o.tag+">"},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\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:/<!\[CDATA\[[\s\S]*?\]\]>/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:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.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<a.length;i++)o[a[i]]=e.languages.bash[a[i]];e.languages.shell=e.languages.bash}(a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,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(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/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+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/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]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/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<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/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(/<inner>/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__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\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(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.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<r;n++){var a=t[n];if("code"===a.type){var o=a.content[1],i=a.content[3];if(o&&i&&"code-language"===o.type&&"code-block"===i.type&&"string"==typeof o.content){var l=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(l=(/[a-z][\w-]*/i.exec(l)||[""])[0].toLowerCase());i.alias?"string"==typeof i.alias?i.alias=[i.alias,s]:i.alias.push(s):i.alias=[s]}}else e(a.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r],c=/language-(.+)/.exec(o);if(c){n=c[1];break}}var u,d=e.languages[n];if(d)t.content=e.highlight((u=t.content,u.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),s(n);var r=l[t];return r||e}))),d,n);else if(n&&"none"!==n&&e.plugins.autoloader){var p="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=p,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(p);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var i=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",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;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),a.length>0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s<l;s++){var c=t[s];"variable"===c.type&&a.indexOf(c.content)>=0&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return!1}return!0}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))a++;else if(r.test(l)&&0===--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\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),p=Object.keys(u);return i=0,function e(t){for(var n=0;n<t.length;n++){if(i>=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=p[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]),f=o.substring(l+a.length),h=[];if(s&&h.push(s),h.push(d),f){var m=[f];e(m),h.push.apply(h,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(h)),n+=h.length-1):r.content=h}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(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 p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r<a;r++){var o=n[r];if("string"!=typeof o){var i=o.content;if(Array.isArray(i))if("template-string"===o.type){var l=i[1];if(3===i.length&&"string"!=typeof l&&"embedded-code"===l.type){var s=p(l),c=l.alias,d=Array.isArray(c)?c[0]:c,f=e.languages[d];if(!f)continue;i[1]=u(s,f,d)}}else t(i);else"string"!=typeof i&&t([i])}}}(t.tokens)}))}(a),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,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(/<ID>/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*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\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*)#?<ID>/.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<n.length;r++){var a=n[r],o=e.languages.javascript[a];"RegExp"===e.util.type(o)&&(o=e.languages.javascript[a]={pattern:o});var i=o.inside||{};o.inside=i,i["maybe-class-name"]=/^[A-Z][\s\S]*/}}(a),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/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.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<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(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.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;r<t.length;r++){var a=t[r],o=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?n.length>0&&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);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=i(t[r+1]),t.splice(r+1,1)),r>0&&("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<l.length&&!(a>=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],p="string"==typeof c?c:c.content,f=t(r,u),h=p.indexOf(f);if(h>-1){++a;var m=p.substring(0,h),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(h+f.length),v=[];m&&v.push.apply(v,i([m])),v.push(g),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://,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},6969:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),a=n(8380),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),o.add(e)}))}i.silent=!1,e.exports=i},8692:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8692},3157:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function r(e){var n={},r=[];function a(r,o){if(!(r in n)){o.push(r);var i=o.indexOf(r);if(i<o.length-1)throw new Error("Circular dependency: "+o.slice(i).join(" -> "));var l={},s=e[r];if(s){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in a(t,o),l[t]=!0,n[t])l[i]=!0}t(s.require,c),t(s.optional,c),t(s.modify,c)}n[r]=l,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(s);i=i.map(c),l=(l||[]).map(c);var u=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var p,f=r(s),h=u;a(h);){for(var m in p={},h){var g=s[m];t(g&&g.modify,(function(e){e in d&&(p[e]=!0)}))}for(var b in d)if(!(b in u))for(var v in f(b))if(v in u){p[b]=!0;break}for(var y in h=p)u[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,a){var o=a?a.series:void 0,i=a?a.parallel:e,l={},s={};function c(e){if(e in l)return l[e];s[e]=!0;var a,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)a=r(e);else{var p=i(u.map((function(e){var t=c(e);return delete s[e],t})));o?a=o(p,(function(){return r(e)})):r(e)}return l[e]=a}for(var u in n)c(u);var d=[];for(var p in s)d.push(l[p]);return i(d)}(f,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(5228),o=n(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(i(227));var l=new Set,s={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f=Object.prototype.hasOwnProperty,h={},m={};function g(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=b.hasOwnProperty(t)?b[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!f.call(m,e)||!f.call(h,e)&&(p.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);b[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,x=60107,_=60108,T=60114,A=60109,C=60110,P=60112,L=60113,R=60120,O=60115,N=60116,I=60121,D=60128,F=60129,j=60130,M=60131;if("function"==typeof Symbol&&Symbol.for){var B=Symbol.for;E=B("react.element"),S=B("react.portal"),x=B("react.fragment"),_=B("react.strict_mode"),T=B("react.profiler"),A=B("react.provider"),C=B("react.context"),P=B("react.forward_ref"),L=B("react.suspense"),R=B("react.suspense_list"),O=B("react.memo"),N=B("react.lazy"),I=B("react.block"),B("react.scope"),D=B("react.opaque.id"),F=B("react.debug_trace_mode"),j=B("react.offscreen"),M=B("react.legacy_hidden")}var z,$="function"==typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}function q(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var G=!1;function H(e,t){if(!e||G)return"";G=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"==typeof s.stack){for(var a=s.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,l=o.length-1;1<=i&&0<=l&&a[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(a[i]!==o[l]){if(1!==i||1!==l)do{if(i--,0>--l||a[i]!==o[l])return"\n"+a[i].replace(" at new "," at ")}while(1<=i&&0<=l);break}}}finally{G=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q(e):""}function Q(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 22:return e=H(e.type._render,!1);case 1:return e=H(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case S:return"Portal";case T:return"Profiler";case _:return"StrictMode";case L:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case O:return V(e.type);case I:return V(e._render);case N:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function W(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ie(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ce(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,me,ge=(me=function(e,t){if(e.namespaceURI!==de.svg||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ve).forEach((function(e){ye.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var Ee=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Ae=null,Ce=null;function Pe(e){if(e=na(e)){if("function"!=typeof Te)throw Error(i(280));var t=e.stateNode;t&&(t=aa(t),Te(e.stateNode,e.type,t))}}function Le(e){Ae?Ce?Ce.push(e):Ce=[e]:Ae=e}function Re(){if(Ae){var e=Ae,t=Ce;if(Ce=Ae=null,Pe(e),t)for(e=0;e<t.length;e++)Pe(t[e])}}function Oe(e,t){return e(t)}function Ne(e,t,n,r,a){return e(t,n,r,a)}function Ie(){}var De=Oe,Fe=!1,je=!1;function Me(){null===Ae&&null===Ce||(Ie(),Re())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=aa(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}var ze=!1;if(d)try{var $e={};Object.defineProperty($e,"passive",{get:function(){ze=!0}}),window.addEventListener("test",$e,$e),window.removeEventListener("test",$e,$e)}catch(me){ze=!1}function Ue(e,t,n,r,a,o,i,l,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var qe=!1,Ge=null,He=!1,Qe=null,Ve={onError:function(e){qe=!0,Ge=e}};function We(e,t,n,r,a,o,i,l,s){qe=!1,Ge=null,Ue.apply(Ve,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ye(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ke(e)!==e)throw Error(i(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return Xe(a),e;if(o===r)return Xe(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var l=!1,s=a.child;s;){if(s===n){l=!0,n=a,r=o;break}if(s===r){l=!0,r=a,n=o;break}s=s.sibling}if(!l){for(s=o.child;s;){if(s===n){l=!0,n=o,r=a;break}if(s===r){l=!0,r=o,n=a;break}s=s.sibling}if(!l)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,at=!1,ot=[],it=null,lt=null,st=null,ct=new Map,ut=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ft(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function ht(e,t){switch(e){case"focusin":case"focusout":it=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":st=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ut.delete(t.pointerId)}}function mt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e=ft(t,n,r,a,o),null!==t&&(null!==(t=na(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function gt(e){var t=ta(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ye(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=na(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){bt(e)&&n.delete(t)}function yt(){for(at=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=na(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==it&&bt(it)&&(it=null),null!==lt&&bt(lt)&&(lt=null),null!==st&&bt(st)&&(st=null),ct.forEach(vt),ut.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,yt)))}function kt(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==it&&wt(it,e),null!==lt&&wt(lt,e),null!==st&&wt(st,e),ct.forEach(t),ut.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},xt={},_t={};function Tt(e){if(xt[e])return xt[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in _t)return xt[e]=n[t];return e}d&&(_t=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var At=Tt("animationend"),Ct=Tt("animationiteration"),Pt=Tt("animationstart"),Lt=Tt("transitionend"),Rt=new Map,Ot=new Map,Nt=["abort","abort",At,"animationEnd",Ct,"animationIteration",Pt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),Ot.set(r,t),Rt.set(r,a),c(a,[r])}}(0,o.unstable_now)();var Dt=8;function Ft(e){if(1&e)return Dt=15,1;if(2&e)return Dt=14,2;if(4&e)return Dt=13,4;var t=24&e;return 0!==t?(Dt=12,t):32&e?(Dt=11,32):0!==(t=192&e)?(Dt=10,t):256&e?(Dt=9,256):0!==(t=3584&e)?(Dt=8,t):4096&e?(Dt=7,4096):0!==(t=4186112&e)?(Dt=6,t):0!==(t=62914560&e)?(Dt=5,t):67108864&e?(Dt=4,67108864):134217728&e?(Dt=3,134217728):0!==(t=805306368&e)?(Dt=2,t):1073741824&e?(Dt=1,1073741824):(Dt=8,e)}function jt(e,t){var n=e.pendingLanes;if(0===n)return Dt=0;var r=0,a=0,o=e.expiredLanes,i=e.suspendedLanes,l=e.pingedLanes;if(0!==o)r=o,a=Dt=15;else if(0!==(o=134217727&n)){var s=o&~i;0!==s?(r=Ft(s),a=Dt):0!==(l&=o)&&(r=Ft(l),a=Dt)}else 0!==(o=n&~i)?(r=Ft(o),a=Dt):0!==l&&(r=Ft(l),a=Dt);if(0===r)return 0;if(r=n&((0>(r=31-qt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&!(t&i)){if(Ft(t),a<=Dt)return t;Dt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-qt(t)),r|=e[n],t&=~a;return r}function Mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=zt(24&~t))?Bt(10,t):e;case 10:return 0===(e=zt(192&~t))?Bt(8,t):e;case 8:return 0===(e=zt(3584&~t))&&(0===(e=zt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=zt(805306368&~t))&&(t=268435456),t}throw Error(i(358,e))}function zt(e){return e&-e}function $t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-qt(t)]=n}var qt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Gt(e)/Ht|0)|0},Gt=Math.log,Ht=Math.LN2;var Qt=o.unstable_UserBlockingPriority,Vt=o.unstable_runWithPriority,Wt=!0;function Kt(e,t,n,r){Fe||Ie();var a=Xt,o=Fe;Fe=!0;try{Ne(a,e,t,n,r)}finally{(Fe=o)||Me()}}function Yt(e,t,n,r){Vt(Qt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var a;if(Wt)if((a=!(4&t))&&0<ot.length&&-1<pt.indexOf(e))e=ft(null,e,t,n,r),ot.push(e);else{var o=Zt(e,t,n,r);if(null===o)a&&ht(e,r);else{if(a){if(-1<pt.indexOf(e))return e=ft(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return it=mt(it,e,t,n,r,a),!0;case"dragenter":return lt=mt(lt,e,t,n,r,a),!0;case"mouseover":return st=mt(st,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return ct.set(o,mt(ct.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,ut.set(o,mt(ut.get(o)||null,e,t,n,r,a)),!0}return!1}(o,e,t,n,r))return;ht(e,r)}Ir(e,t,r,null,n)}}}function Zt(e,t,n,r){var a=_e(r);if(null!==(a=ta(a))){var o=Ke(a);if(null===o)a=null;else{var i=o.tag;if(13===i){if(null!==(a=Ye(o)))return a;a=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return Ir(e,t,r,a,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,a="value"in Jt?Jt.value:Jt.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return tn=a.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function on(){return!1}function ln(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?an:on,this.isPropagationStopped=on,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var sn,cn,un,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=ln(dn),fn=a({},dn,{view:0,detail:0}),hn=ln(fn),mn=a({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(sn=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=sn=0,un=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=ln(mn),bn=ln(a({},mn,{dataTransfer:0})),vn=ln(a({},fn,{relatedTarget:0})),yn=ln(a({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=a({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=ln(wn),En=ln(a({},dn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function An(){return Tn}var Cn=a({},fn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=ln(Cn),Ln=ln(a({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=ln(a({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),On=ln(a({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=a({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),In=ln(Nn),Dn=[9,13,27,32],Fn=d&&"CompositionEvent"in window,jn=null;d&&"documentMode"in document&&(jn=document.documentMode);var Mn=d&&"TextEvent"in window&&!jn,Bn=d&&(!Fn||jn&&8<jn&&11>=jn),zn=String.fromCharCode(32),$n=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Vn(e,t,n,r){Le(r),0<(t=Fr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Kn=null;function Yn(e){Cr(e,0)}function Xn(e){if(X(ra(e)))return e}function Zn(e,t){if("change"===e)return t}var Jn=!1;if(d){var er;if(d){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9<document.documentMode)}function rr(){Wn&&(Wn.detachEvent("onpropertychange",ar),Kn=Wn=null)}function ar(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];if(Vn(t,Kn,e,_e(e)),e=Yn,Fe)e(t);else{Fe=!0;try{Oe(e,t)}finally{Fe=!1,Me()}}}}function or(e,t,n){"focusin"===e?(rr(),Kn=n,(Wn=t).attachEvent("onpropertychange",ar)):"focusout"===e&&rr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function lr(e,t){if("click"===e)return Xn(t)}function sr(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ur=Object.prototype.hasOwnProperty;function dr(e,t){if(cr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var br=d&&"documentMode"in document&&11>=document.documentMode,vr=null,yr=null,wr=null,kr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==vr||vr!==Z(r)||("selectionStart"in(r=vr)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Fr(yr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Nt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<Sr.length;xr++)Ot.set(Sr[xr],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Tr=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,o,l,s,c){if(We.apply(this,arguments),qe){if(!qe)throw Error(i(198));var u=Ge;qe=!1,Ge=null,He||(He=!0,Qe=u)}}(r,t,void 0,e),e.currentTarget=null}function Cr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,c=l.currentTarget;if(l=l.listener,s!==o&&a.isPropagationStopped())break e;Ar(a,l,c),o=s}else for(i=0;i<r.length;i++){if(s=(l=r[i]).instance,c=l.currentTarget,l=l.listener,s!==o&&a.isPropagationStopped())break e;Ar(a,l,c),o=s}}}if(He)throw e=Qe,He=!1,Qe=null,e}function Pr(e,t){var n=oa(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Lr="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[Lr]||(e[Lr]=!0,l.forEach((function(t){Tr.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Tr.has(e)){if("scroll"!==e)return;a|=2,o=r}var i=oa(o),l=e+"__"+(t?"capture":"bubble");i.has(l)||(t&&(a|=4),Nr(o,e,a,t),i.add(l))}function Nr(e,t,n,r){var a=Ot.get(t);switch(void 0===a?2:a){case 0:a=Kt;break;case 1:a=Yt;break;default:a=Xt}n=a.bind(null,t,n,e),a=void 0,!ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Ir(e,t,n,r,a){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===a||8===l.nodeType&&l.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===a||8===s.nodeType&&s.parentNode===a))return;i=i.return}for(;null!==l;){if(null===(i=ta(l)))return;if(5===(s=i.tag)||6===s){r=o=i;continue e}l=l.parentNode}}r=r.return}!function(e,t,n){if(je)return e(t,n);je=!0;try{return De(e,t,n)}finally{je=!1,Me()}}((function(){var r=o,a=_e(n),i=[];e:{var l=Rt.get(e);if(void 0!==l){var s=pn,c=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":s=Pn;break;case"focusin":c="focus",s=vn;break;case"focusout":c="blur",s=vn;break;case"beforeblur":case"afterblur":s=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=bn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=Rn;break;case At:case Ct:case Pt:s=yn;break;case Lt:s=On;break;case"scroll":s=hn;break;case"wheel":s=In;break;case"copy":case"cut":case"paste":s=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Ln}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==l?l+"Capture":null:l;u=[];for(var f,h=r;null!==h;){var m=(f=h).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==p&&(null!=(m=Be(h,p))&&u.push(Dr(h,m,f)))),d)break;h=h.return}0<u.length&&(l=new s(l,c,null,n,a),i.push({event:l,listeners:u}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||16&t||!(c=n.relatedTarget||n.fromElement)||!ta(c)&&!c[Jr])&&(s||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(c=(c=n.relatedTarget||n.toElement)?ta(c):null)&&(c!==(d=Ke(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(s=null,c=r),s!==c)){if(u=gn,m="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Ln,m="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==s?l:ra(s),f=null==c?l:ra(c),(l=new u(m,h+"leave",s,n,a)).target=d,l.relatedTarget=f,m=null,ta(a)===r&&((u=new u(p,h+"enter",c,n,a)).target=f,u.relatedTarget=d,m=u),d=m,s&&c)e:{for(p=c,h=0,f=u=s;f;f=jr(f))h++;for(f=0,m=p;m;m=jr(m))f++;for(;0<h-f;)u=jr(u),h--;for(;0<f-h;)p=jr(p),f--;for(;h--;){if(u===p||null!==p&&u===p.alternate)break e;u=jr(u),p=jr(p)}u=null}else u=null;null!==s&&Mr(i,l,s,u,!1),null!==c&&null!==d&&Mr(i,d,c,u,!0)}if("select"===(s=(l=r?ra(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g=Zn;else if(Qn(l))if(Jn)g=sr;else{g=ir;var b=or}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=lr);switch(g&&(g=g(e,r))?Vn(i,g,n,a):(b&&b(e,l,r),"focusout"===e&&(b=l._wrapperState)&&b.controlled&&"number"===l.type&&ae(l,"number",l.value)),b=r?ra(r):window,e){case"focusin":(Qn(b)||"true"===b.contentEditable)&&(vr=b,yr=r,wr=null);break;case"focusout":wr=yr=vr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,Er(i,n,a);break;case"selectionchange":if(br)break;case"keydown":case"keyup":Er(i,n,a)}var v;if(Fn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Gn?Un(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Bn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Gn&&(v=nn()):(en="value"in(Jt=a)?Jt.value:Jt.textContent,Gn=!0)),0<(b=Fr(r,y)).length&&(y=new En(y,e,null,n,a),i.push({event:y,listeners:b}),v?y.data=v:null!==(v=qn(n))&&(y.data=v))),(v=Mn?function(e,t){switch(e){case"compositionend":return qn(t);case"keypress":return 32!==t.which?null:($n=!0,zn);case"textInput":return(e=t.data)===zn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!Fn&&Un(e,t)?(e=nn(),tn=en=Jt=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(a=new En("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=v))}Cr(i,t)}))}function Dr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=Be(e,n))&&r.unshift(Dr(e,o,a)),null!=(o=Be(e,t))&&r.push(Dr(e,o,a))),e=e.return}return r}function jr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,c=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==c&&(l=c,a?null!=(s=Be(n,o))&&i.unshift(Dr(n,s,l)):a||null!=(s=Be(n,o))&&i.push(Dr(n,s,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}function Br(){}var zr=null,$r=null;function Ur(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function qr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Gr="function"==typeof setTimeout?setTimeout:void 0,Hr="function"==typeof clearTimeout?clearTimeout:void 0;function Qr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Vr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Yr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Yr,Zr="__reactProps$"+Yr,Jr="__reactContainer$"+Yr,ea="__reactEvents$"+Yr;function ta(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Xr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function na(e){return!(e=e[Xr]||e[Jr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ra(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function aa(e){return e[Zr]||null}function oa(e){var t=e[ea];return void 0===t&&(t=e[ea]=new Set),t}var ia=[],la=-1;function sa(e){return{current:e}}function ca(e){0>la||(e.current=ia[la],ia[la]=null,la--)}function ua(e,t){la++,ia[la]=e.current,e.current=t}var da={},pa=sa(da),fa=sa(!1),ha=da;function ma(e,t){var n=e.type.contextTypes;if(!n)return da;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ga(e){return null!=(e=e.childContextTypes)}function ba(){ca(fa),ca(pa)}function va(e,t,n){if(pa.current!==da)throw Error(i(168));ua(pa,t),ua(fa,n)}function ya(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(i(108,V(t)||"Unknown",o));return a({},n,r)}function wa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||da,ha=pa.current,ua(pa,e),ua(fa,fa.current),!0}function ka(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=ya(e,t,ha),r.__reactInternalMemoizedMergedChildContext=e,ca(fa),ca(pa),ua(pa,e)):ca(fa),ua(fa,n)}var Ea=null,Sa=null,xa=o.unstable_runWithPriority,_a=o.unstable_scheduleCallback,Ta=o.unstable_cancelCallback,Aa=o.unstable_shouldYield,Ca=o.unstable_requestPaint,Pa=o.unstable_now,La=o.unstable_getCurrentPriorityLevel,Ra=o.unstable_ImmediatePriority,Oa=o.unstable_UserBlockingPriority,Na=o.unstable_NormalPriority,Ia=o.unstable_LowPriority,Da=o.unstable_IdlePriority,Fa={},ja=void 0!==Ca?Ca:function(){},Ma=null,Ba=null,za=!1,$a=Pa(),Ua=1e4>$a?Pa:function(){return Pa()-$a};function qa(){switch(La()){case Ra:return 99;case Oa:return 98;case Na:return 97;case Ia:return 96;case Da:return 95;default:throw Error(i(332))}}function Ga(e){switch(e){case 99:return Ra;case 98:return Oa;case 97:return Na;case 96:return Ia;case 95:return Da;default:throw Error(i(332))}}function Ha(e,t){return e=Ga(e),xa(e,t)}function Qa(e,t,n){return e=Ga(e),_a(e,t,n)}function Va(){if(null!==Ba){var e=Ba;Ba=null,Ta(e)}Wa()}function Wa(){if(!za&&null!==Ma){za=!0;var e=0;try{var t=Ma;Ha(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ma=null}catch(n){throw null!==Ma&&(Ma=Ma.slice(e+1)),_a(Ra,Va),n}finally{za=!1}}}var Ka=k.ReactCurrentBatchConfig;function Ya(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xa=sa(null),Za=null,Ja=null,eo=null;function to(){eo=Ja=Za=null}function no(e){var t=Xa.current;ca(Xa),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ao(e,t){Za=e,eo=Ja=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(Fi=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ja){if(null===Za)throw Error(i(308));Ja=t,Za.dependencies={lanes:0,firstContext:t,responders:null}}else Ja=Ja.next=t;return e._currentValue}var io=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function so(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fo(e,t,n,r){var o=e.updateQueue;io=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var c=s,u=c.next;c.next=null,null===l?i=u:l.next=u,l=c;var d=e.alternate;if(null!==d){var p=(d=d.updateQueue).lastBaseUpdate;p!==l&&(null===p?d.firstBaseUpdate=u:p.next=u,d.lastBaseUpdate=c)}}if(null!==i){for(p=o.baseState,l=0,d=u=c=null;;){s=i.lane;var f=i.eventTime;if((r&s)===s){null!==d&&(d=d.next={eventTime:f,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,m=i;switch(s=t,f=n,m.tag){case 1:if("function"==typeof(h=m.payload)){p=h.call(f,p,s);break e}p=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null==(s="function"==typeof(h=m.payload)?h.call(f,p,s):h))break e;p=a({},p,s);break e;case 2:io=!0}}null!==i.callback&&(e.flags|=32,null===(s=o.effects)?o.effects=[i]:s.push(i))}else f={eventTime:f,lane:s,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===d?(u=d=f,c=p):d=d.next=f,l|=s;if(null===(i=i.next)){if(null===(s=o.shared.pending))break;i=s.next,s.next=null,o.lastBaseUpdate=s,o.shared.pending=null}}null===d&&(c=p),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,$l|=l,e.lanes=l,e.memoizedState=p}}function ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(i(191,a));a.call(r)}}}var mo=(new r.Component).refs;function go(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var bo={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ps(),a=fs(e),o=co(r,a);o.payload=t,null!=n&&(o.callback=n),uo(e,o),hs(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ps(),a=fs(e),o=co(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),uo(e,o),hs(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ps(),r=fs(e),a=co(n,r);a.tag=2,null!=t&&(a.callback=t),uo(e,a),hs(e,r,n)}};function vo(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(a,o))}function yo(e,t,n){var r=!1,a=da,o=t.contextType;return"object"==typeof o&&null!==o?o=oo(o):(a=ga(t)?ha:pa.current,o=(r=null!=(r=t.contextTypes))?ma(e,a):da),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=bo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function wo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function ko(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=mo,lo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=oo(o):(o=ga(t)?ha:pa.current,a.context=ma(e,o)),fo(e,n,a,r),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(go(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&bo.enqueueReplaceState(a,a.state,null),fo(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var Eo=Array.isArray;function So(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(i(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function _o(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Qs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function l(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=So(e,t,n),r.return=e,r):((r=Vs(n.type,n.key,n.props,null,e.mode,r)).ref=So(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xs(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Ws(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Vs(t.type,t.key,t.props,null,e.mode,n)).ref=So(e,null,t),n.return=e,n;case S:return(t=Xs(t,e.mode,n)).return=e,t}if(Eo(t)||U(t))return(t=Ws(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function f(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===x?d(e,t,n.props.children,r,a):c(e,t,n,r):null;case S:return n.key===a?u(e,t,n,r):null}if(Eo(n)||U(n))return null!==a?null:d(e,t,n,r,null);xo(e,n)}return null}function h(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===x?d(t,e,r.props.children,a,r.key):c(t,e,r,a);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(Eo(r)||U(r))return d(t,e=e.get(n)||null,r,a,null);xo(t,r)}return null}function m(a,i,l,s){for(var c=null,u=null,d=i,m=i=0,g=null;null!==d&&m<l.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var b=f(a,d,l[m],s);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(a,d),i=o(b,i,m),null===u?c=b:u.sibling=b,u=b,d=g}if(m===l.length)return n(a,d),c;if(null===d){for(;m<l.length;m++)null!==(d=p(a,l[m],s))&&(i=o(d,i,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(a,d);m<l.length;m++)null!==(g=h(d,a,m,l[m],s))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),i=o(g,i,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(a,e)})),c}function g(a,l,s,c){var u=U(s);if("function"!=typeof u)throw Error(i(150));if(null==(s=u.call(s)))throw Error(i(151));for(var d=u=null,m=l,g=l=0,b=null,v=s.next();null!==m&&!v.done;g++,v=s.next()){m.index>g?(b=m,m=null):b=m.sibling;var y=f(a,m,v.value,c);if(null===y){null===m&&(m=b);break}e&&m&&null===y.alternate&&t(a,m),l=o(y,l,g),null===d?u=y:d.sibling=y,d=y,m=b}if(v.done)return n(a,m),u;if(null===m){for(;!v.done;g++,v=s.next())null!==(v=p(a,v.value,c))&&(l=o(v,l,g),null===d?u=v:d.sibling=v,d=v);return u}for(m=r(a,m);!v.done;g++,v=s.next())null!==(v=h(m,a,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),l=o(v,l,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(a,e)})),u}return function(e,r,o,s){var c="object"==typeof o&&null!==o&&o.type===x&&null===o.key;c&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case E:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(o.type===x){n(e,c.sibling),(r=a(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=a(c,o.props)).ref=So(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===x?((r=Ws(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=Vs(o.type,o.key,o.props,null,e.mode,s)).ref=So(e,r,o),s.return=e,e=s)}return l(e);case S:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xs(o,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,o)).return=e,e=r):(n(e,r),(r=Ys(o,e.mode,s)).return=e,e=r),l(e);if(Eo(o))return m(e,r,o,s);if(U(o))return g(e,r,o,s);if(u&&xo(e,o),void 0===o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(i(152,V(e.type)||"Component"))}return n(e,r)}}var To=_o(!0),Ao=_o(!1),Co={},Po=sa(Co),Lo=sa(Co),Ro=sa(Co);function Oo(e){if(e===Co)throw Error(i(174));return e}function No(e,t){switch(ua(Ro,t),ua(Lo,e),ua(Po,Co),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fe(null,"");break;default:t=fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ca(Po),ua(Po,t)}function Io(){ca(Po),ca(Lo),ca(Ro)}function Do(e){Oo(Ro.current);var t=Oo(Po.current),n=fe(t,e.type);t!==n&&(ua(Lo,e),ua(Po,n))}function Fo(e){Lo.current===e&&(ca(Po),ca(Lo))}var jo=sa(0);function Mo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(64&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=null,zo=null,$o=!1;function Uo(e,t){var n=Gs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Go(e){if($o){var t=zo;if(t){var n=t;if(!qo(e,t)){if(!(t=Vr(n.nextSibling))||!qo(e,t))return e.flags=-1025&e.flags|2,$o=!1,void(Bo=e);Uo(Bo,n)}Bo=e,zo=Vr(t.firstChild)}else e.flags=-1025&e.flags|2,$o=!1,Bo=e}}function Ho(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Bo=e}function Qo(e){if(e!==Bo)return!1;if(!$o)return Ho(e),$o=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!qr(t,e.memoizedProps))for(t=zo;t;)Uo(e,t),t=Vr(t.nextSibling);if(Ho(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){zo=Vr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}zo=null}}else zo=Bo?Vr(e.stateNode.nextSibling):null;return!0}function Vo(){zo=Bo=null,$o=!1}var Wo=[];function Ko(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Yo=k.ReactCurrentDispatcher,Xo=k.ReactCurrentBatchConfig,Zo=0,Jo=null,ei=null,ti=null,ni=!1,ri=!1;function ai(){throw Error(i(321))}function oi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function ii(e,t,n,r,a,o){if(Zo=o,Jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yo.current=null===e||null===e.memoizedState?Oi:Ni,e=n(r,a),ri){o=0;do{if(ri=!1,!(25>o))throw Error(i(301));o+=1,ti=ei=null,t.updateQueue=null,Yo.current=Ii,e=n(r,a)}while(ri)}if(Yo.current=Ri,t=null!==ei&&null!==ei.next,Zo=0,ti=ei=Jo=null,ni=!1,t)throw Error(i(300));return e}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ti?Jo.memoizedState=ti=e:ti=ti.next=e,ti}function si(){if(null===ei){var e=Jo.alternate;e=null!==e?e.memoizedState:null}else e=ei.next;var t=null===ti?Jo.memoizedState:ti.next;if(null!==t)ti=t,ei=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ei=e).memoizedState,baseState:ei.baseState,baseQueue:ei.baseQueue,queue:ei.queue,next:null},null===ti?Jo.memoizedState=ti=e:ti=ti.next=e}return ti}function ci(e,t){return"function"==typeof t?t(e):t}function ui(e){var t=si(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ei,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var l=a.next;a.next=o.next,o.next=l}r.baseQueue=a=o,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var s=l=o=null,c=a;do{var u=c.lane;if((Zo&u)===u)null!==s&&(s=s.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===s?(l=s=d,o=r):s=s.next=d,Jo.lanes|=u,$l|=u}c=c.next}while(null!==c&&c!==a);null===s?o=r:s.next=l,cr(r,t.memoizedState)||(Fi=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function di(e){var t=si(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var l=a=a.next;do{o=e(o,l.action),l=l.next}while(l!==a);cr(o,t.memoizedState)||(Fi=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function pi(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(Zo&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(i(350))}function fi(e,t,n,r){var a=Nl;if(null===a)throw Error(i(349));var o=t._getVersion,l=o(t._source),s=Yo.current,c=s.useState((function(){return pi(a,t,n)})),u=c[1],d=c[0];c=ti;var p=e.memoizedState,f=p.refs,h=f.getSnapshot,m=p.source;p=p.subscribe;var g=Jo;return e.memoizedState={refs:f,source:t,subscribe:r},s.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=o(t._source);if(!cr(l,e)){e=n(t._source),cr(d,e)||(u(e),e=fs(g),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,i=e;0<i;){var s=31-qt(i),c=1<<s;r[s]|=e,i&=~c}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=fs(g);a.mutableReadLanes|=r&a.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(p,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ci,lastRenderedState:d}).dispatch=u=Li.bind(null,Jo,e),c.queue=e,c.baseQueue=null,d=pi(a,t,n),c.memoizedState=c.baseState=d),d}function hi(e,t,n){return fi(si(),e,t,n)}function mi(e){var t=li();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ci,lastRenderedState:e}).dispatch=Li.bind(null,Jo,e),[t.memoizedState,e]}function gi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Jo.updateQueue)?(t={lastEffect:null},Jo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function bi(e){return e={current:e},li().memoizedState=e}function vi(){return si().memoizedState}function yi(e,t,n,r){var a=li();Jo.flags|=e,a.memoizedState=gi(1|t,n,void 0,void 0===r?null:r)}function wi(e,t,n,r){var a=si();r=void 0===r?null:r;var o=void 0;if(null!==ei){var i=ei.memoizedState;if(o=i.destroy,null!==r&&oi(r,i.deps))return void gi(t,n,o,r)}Jo.flags|=e,a.memoizedState=gi(1|t,n,o,r)}function ki(e,t){return yi(516,4,e,t)}function Ei(e,t){return wi(516,4,e,t)}function Si(e,t){return wi(4,2,e,t)}function xi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _i(e,t,n){return n=null!=n?n.concat([e]):null,wi(4,2,xi.bind(null,t,e),n)}function Ti(){}function Ai(e,t){var n=si();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ci(e,t){var n=si();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pi(e,t){var n=qa();Ha(98>n?98:n,(function(){e(!0)})),Ha(97<n?97:n,(function(){var n=Xo.transition;Xo.transition=1;try{e(!1),t()}finally{Xo.transition=n}}))}function Li(e,t,n){var r=ps(),a=fs(e),o={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Jo||null!==i&&i===Jo)ri=ni=!0;else{if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var l=t.lastRenderedState,s=i(l,n);if(o.eagerReducer=i,o.eagerState=s,cr(s,l))return}catch(c){}hs(e,a,r)}}var Ri={readContext:oo,useCallback:ai,useContext:ai,useEffect:ai,useImperativeHandle:ai,useLayoutEffect:ai,useMemo:ai,useReducer:ai,useRef:ai,useState:ai,useDebugValue:ai,useDeferredValue:ai,useTransition:ai,useMutableSource:ai,useOpaqueIdentifier:ai,unstable_isNewReconciler:!1},Oi={readContext:oo,useCallback:function(e,t){return li().memoizedState=[e,void 0===t?null:t],e},useContext:oo,useEffect:ki,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,yi(4,2,xi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yi(4,2,e,t)},useMemo:function(e,t){var n=li();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=li();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Li.bind(null,Jo,e),[r.memoizedState,e]},useRef:bi,useState:mi,useDebugValue:Ti,useDeferredValue:function(e){var t=mi(e),n=t[0],r=t[1];return ki((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=mi(!1),t=e[0];return bi(e=Pi.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=li();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fi(r,e,t,n)},useOpaqueIdentifier:function(){if($o){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(i(355))})),n=mi(t)[1];return!(2&Jo.mode)&&(Jo.flags|=516,gi(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return mi(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},Ni={readContext:oo,useCallback:Ai,useContext:oo,useEffect:Ei,useImperativeHandle:_i,useLayoutEffect:Si,useMemo:Ci,useReducer:ui,useRef:vi,useState:function(){return ui(ci)},useDebugValue:Ti,useDeferredValue:function(e){var t=ui(ci),n=t[0],r=t[1];return Ei((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ui(ci)[0];return[vi().current,e]},useMutableSource:hi,useOpaqueIdentifier:function(){return ui(ci)[0]},unstable_isNewReconciler:!1},Ii={readContext:oo,useCallback:Ai,useContext:oo,useEffect:Ei,useImperativeHandle:_i,useLayoutEffect:Si,useMemo:Ci,useReducer:di,useRef:vi,useState:function(){return di(ci)},useDebugValue:Ti,useDeferredValue:function(e){var t=di(ci),n=t[0],r=t[1];return Ei((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=di(ci)[0];return[vi().current,e]},useMutableSource:hi,useOpaqueIdentifier:function(){return di(ci)[0]},unstable_isNewReconciler:!1},Di=k.ReactCurrentOwner,Fi=!1;function ji(e,t,n,r){t.child=null===e?Ao(t,null,n,r):To(t,e.child,n,r)}function Mi(e,t,n,r,a){n=n.render;var o=t.ref;return ao(t,a),r=ii(e,t,n,r,o,a),null===e||Fi?(t.flags|=1,ji(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function Bi(e,t,n,r,a,o){if(null===e){var i=n.type;return"function"!=typeof i||Hs(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Vs(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,zi(e,t,i,r,a,o))}return i=e.child,a&o||(a=i.memoizedProps,!(n=null!==(n=n.compare)?n:dr)(a,r)||e.ref!==t.ref)?(t.flags|=1,(e=Qs(i,r)).ref=t.ref,e.return=t,t.child=e):ol(e,t,o)}function zi(e,t,n,r,a,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Fi=!1,!(o&a))return t.lanes=e.lanes,ol(e,t,o);16384&e.flags&&(Fi=!0)}return qi(e,t,n,r,o)}function $i(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(4&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Es(t,e),null;t.memoizedState={baseLanes:0},Es(t,null!==o?o.baseLanes:n)}else t.memoizedState={baseLanes:0},Es(t,n);else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Es(t,r);return ji(e,t,a,n),t.child}function Ui(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function qi(e,t,n,r,a){var o=ga(n)?ha:pa.current;return o=ma(t,o),ao(t,a),n=ii(e,t,n,r,o,a),null===e||Fi?(t.flags|=1,ji(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ol(e,t,a))}function Gi(e,t,n,r,a){if(ga(n)){var o=!0;wa(t)}else o=!1;if(ao(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),yo(t,n,r),ko(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var s=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=oo(c):c=ma(t,c=ga(n)?ha:pa.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||s!==c)&&wo(t,i,r,c),io=!1;var p=t.memoizedState;i.state=p,fo(t,r,i,a),s=t.memoizedState,l!==r||p!==s||fa.current||io?("function"==typeof u&&(go(t,n,u,r),s=t.memoizedState),(l=io||vo(t,n,l,r,p,s,c))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4)):("function"==typeof i.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=c,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4),r=!1)}else{i=t.stateNode,so(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:Ya(t.type,l),i.props=c,d=t.pendingProps,p=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=oo(s):s=ma(t,s=ga(n)?ha:pa.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||p!==s)&&wo(t,i,r,s),io=!1,p=t.memoizedState,i.state=p,fo(t,r,i,a);var h=t.memoizedState;l!==d||p!==h||fa.current||io?("function"==typeof f&&(go(t,n,f,r),h=t.memoizedState),(c=io||vo(t,n,c,r,p,h,s))?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=s,r=c):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),r=!1)}return Hi(e,t,n,r,o,a)}function Hi(e,t,n,r,a,o){Ui(e,t);var i=!!(64&t.flags);if(!r&&!i)return a&&ka(t,n,!1),ol(e,t,o);r=t.stateNode,Di.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=To(t,e.child,null,o),t.child=To(t,null,l,o)):ji(e,t,l,o),t.memoizedState=r.state,a&&ka(t,n,!0),t.child}function Qi(e){var t=e.stateNode;t.pendingContext?va(0,t.pendingContext,t.pendingContext!==t.context):t.context&&va(0,t.context,!1),No(e,t.containerInfo)}var Vi,Wi,Ki,Yi,Xi={dehydrated:null,retryLane:0};function Zi(e,t,n){var r,a=t.pendingProps,o=jo.current,i=!1;return(r=!!(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(i=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(o|=1),ua(jo,1&o),null===e?(void 0!==a.fallback&&Go(t),e=a.children,o=a.fallback,i?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xi,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ji(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xi,t.lanes=33554432,e):((n=Ks({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,i?(a=tl(e,t,a.children,a.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=Xi,a):(n=el(e,t,a.children,n),t.memoizedState=null,n))}function Ji(e,t,n,r){var a=e.mode,o=e.child;return t={mode:"hidden",children:t},2&a||null===o?o=Ks(t,a,0,null):(o.childLanes=0,o.pendingProps=t),n=Ws(n,a,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function el(e,t,n,r){var a=e.child;return e=a.sibling,n=Qs(a,{mode:"visible",children:n}),!(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tl(e,t,n,r,a){var o=t.mode,i=e.child;e=i.sibling;var l={mode:"hidden",children:n};return 2&o||t.child===i?n=Qs(i,l):((n=t.child).childLanes=0,n.pendingProps=l,null!==(i=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=i,i.nextEffect=null):t.firstEffect=t.lastEffect=null),null!==e?r=Qs(e,r):(r=Ws(r,o,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nl(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ro(e.return,t)}function rl(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.lastEffect=o)}function al(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ji(e,t,r.children,n),2&(r=jo.current))r=1&r|2,t.flags|=64;else{if(null!==e&&64&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nl(e,n);else if(19===e.tag)nl(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ua(jo,r),2&t.mode)switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Mo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),rl(t,!1,a,n,o,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Mo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}rl(t,!0,n,null,o,t.lastEffect);break;case"together":rl(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function ol(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),$l|=t.lanes,n&t.childLanes){if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Qs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Qs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function il(e,t){if(!$o)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ll(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return ga(t.type)&&ba(),null;case 3:return Io(),ca(fa),ca(pa),Ko(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Qo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Wi(t),null;case 5:Fo(t);var o=Oo(Ro.current);if(n=t.type,null!==e&&null!=t.stateNode)Ki(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(i(166));return null}if(e=Oo(Po.current),Qo(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Xr]=t,r[Zr]=l,n){case"dialog":Pr("cancel",r),Pr("close",r);break;case"iframe":case"object":case"embed":Pr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Pr(_r[e],r);break;case"source":Pr("error",r);break;case"img":case"image":case"link":Pr("error",r),Pr("load",r);break;case"details":Pr("toggle",r);break;case"input":ee(r,l),Pr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Pr("invalid",r);break;case"textarea":se(r,l),Pr("invalid",r)}for(var c in Se(n,l),e=null,l)l.hasOwnProperty(c)&&(o=l[c],"children"===c?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):s.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Pr("scroll",r));switch(n){case"input":Y(r),re(r,l,!0);break;case"textarea":Y(r),ue(r);break;case"select":case"option":break;default:"function"==typeof l.onClick&&(r.onclick=Br)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===de.html&&(e=pe(n)),e===de.html?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Vi(e,t,!1,!1),t.stateNode=e,c=xe(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),o=r;break;case"iframe":case"object":case"embed":Pr("load",e),o=r;break;case"video":case"audio":for(o=0;o<_r.length;o++)Pr(_r[o],e);o=r;break;case"source":Pr("error",e),o=r;break;case"img":case"image":case"link":Pr("error",e),Pr("load",e),o=r;break;case"details":Pr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Pr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=a({},r,{value:void 0}),Pr("invalid",e);break;case"textarea":se(e,r),o=le(e,r),Pr("invalid",e);break;default:o=r}Se(n,o);var u=o;for(l in u)if(u.hasOwnProperty(l)){var d=u[l];"style"===l?ke(e,d):"dangerouslySetInnerHTML"===l?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===l?"string"==typeof d?("textarea"!==n||""!==d)&&be(e,d):"number"==typeof d&&be(e,""+d):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?null!=d&&"onScroll"===l&&Pr("scroll",e):null!=d&&w(e,l,d,c))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(l=r.value)?ie(e,!!r.multiple,l,!1):null!=r.defaultValue&&ie(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Br)}Ur(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Yi(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));n=Oo(Ro.current),Oo(Po.current),Qo(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return ca(jo),r=t.memoizedState,64&t.flags?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Qo(t):n=null!==e.memoizedState,r&&!n&&2&t.mode&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||1&jo.current?0===Ml&&(Ml=3):(0!==Ml&&3!==Ml||(Ml=4),null===Nl||!(134217727&$l)&&!(134217727&Ul)||vs(Nl,Dl))),(r||n)&&(t.flags|=4),null);case 4:return Io(),Wi(t),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return no(t),null;case 19:if(ca(jo),null===(r=t.memoizedState))return null;if(l=!!(64&t.flags),null===(c=r.rendering))if(l)il(r,!1);else{if(0!==Ml||null!==e&&64&e.flags)for(e=t.child;null!==e;){if(null!==(c=Mo(e))){for(t.flags|=64,il(r,!1),null!==(l=c.updateQueue)&&(t.updateQueue=l,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(l=n).flags&=2,l.nextEffect=null,l.firstEffect=null,l.lastEffect=null,null===(c=l.alternate)?(l.childLanes=0,l.lanes=e,l.child=null,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=c.childLanes,l.lanes=c.lanes,l.child=c.child,l.memoizedProps=c.memoizedProps,l.memoizedState=c.memoizedState,l.updateQueue=c.updateQueue,l.type=c.type,e=c.dependencies,l.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ua(jo,1&jo.current|2),t.child}e=e.sibling}null!==r.tail&&Ua()>Ql&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Mo(c))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),il(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!$o)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ua()-r.renderingStartTime>Ql&&1073741824!==n&&(t.flags|=64,l=!0,il(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ua(),n.sibling=null,t=jo.current,ua(jo,l?1&t|2:1&t),n):null;case 23:case 24:return Ss(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(i(156,t.tag))}function sl(e){switch(e.tag){case 1:ga(e.type)&&ba();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Io(),ca(fa),ca(pa),Ko(),64&(t=e.flags))throw Error(i(285));return e.flags=-4097&t|64,e;case 5:return Fo(e),null;case 13:return ca(jo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ca(jo),null;case 4:return Io(),null;case 10:return no(e),null;case 23:case 24:return Ss(),null;default:return null}}function cl(e,t){try{var n="",r=t;do{n+=Q(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a}}function ul(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Vi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wi=function(){},Ki=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Oo(Po.current);var i,l=null;switch(n){case"input":o=J(e,o),r=J(e,r),l=[];break;case"option":o=oe(e,o),r=oe(e,r),l=[];break;case"select":o=a({},o,{value:void 0}),r=a({},r,{value:void 0}),l=[];break;case"textarea":o=le(e,o),r=le(e,r),l=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Br)}for(d in Se(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(i in c)c.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(c=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&u!==c&&(null!=u||null!=c))if("style"===d)if(c){for(i in c)!c.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&c[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(l||(l=[]),l.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(l=l||[]).push(d,u)):"children"===d?"string"!=typeof u&&"number"!=typeof u||(l=l||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&Pr("scroll",e),l||c===u||(l=[])):"object"==typeof u&&null!==u&&u.$$typeof===D?u.toString():(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}},Yi=function(e,t,n,r){n!==r&&(t.flags|=4)};var dl="function"==typeof WeakMap?WeakMap:Map;function pl(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yl||(Yl=!0,Xl=r),ul(0,t)},n}function fl(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return ul(0,t),r(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Zl?Zl=new Set([this]):Zl.add(this),ul(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hl="function"==typeof WeakSet?WeakSet:Set;function ml(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){zs(e,n)}else t.current=null}function gl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ya(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Qr(t.stateNode.containerInfo))}throw Error(i(163))}function bl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(!(3&~e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,4&(a=a.tag)&&1&a&&(js(n,e),Fs(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ya(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ho(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ho(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ur(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))))}throw Error(i(163))}function vl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=we("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function yl(e,t){if(Sa&&"function"==typeof Sa.onCommitFiberUnmount)try{Sa.onCommitFiberUnmount(Ea,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(4&r)js(t,n);else{r=t;try{a()}catch(o){zs(r,o)}}n=n.next}while(n!==e)}break;case 1:if(ml(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){zs(t,o)}break;case 5:ml(t);break;case 4:_l(e,t)}}function wl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function kl(e){return 5===e.tag||3===e.tag||4===e.tag}function El(e){e:{for(var t=e.return;null!==t;){if(kl(t))break e;t=t.return}throw Error(i(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(i(161))}16&n.flags&&(be(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||kl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Sl(e,n,t):xl(e,n,t)}function Sl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Br));else if(4!==r&&null!==(e=e.child))for(Sl(e,t,n),e=e.sibling;null!==e;)Sl(e,t,n),e=e.sibling}function xl(e,t,n){var r=e.tag,a=5===r||6===r;if(a)e=a?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(xl(e,t,n),e=e.sibling;null!==e;)xl(e,t,n),e=e.sibling}function _l(e,t){for(var n,r,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(i(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag){e:for(var l=e,s=a,c=s;;)if(yl(l,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===s)break e;for(;null===c.sibling;){if(null===c.return||c.return===s)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(l=n,s=a.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(yl(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function Tl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{!(3&~r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),xe(e,a),t=xe(e,r),a=0;a<o.length;a+=2){var l=o[a],s=o[a+1];"style"===l?ke(n,s):"dangerouslySetInnerHTML"===l?ge(n,s):"children"===l?be(n,s):w(n,l,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ie(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ie(n,!!r.multiple,r.defaultValue,!0):ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(i(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Hl=Ua(),vl(t.child,!0)),void Al(t);case 19:return void Al(t);case 23:case 24:return void vl(t,null!==t.memoizedState)}throw Error(i(163))}function Al(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hl),t.forEach((function(t){var r=Us.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Cl(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Pl=Math.ceil,Ll=k.ReactCurrentDispatcher,Rl=k.ReactCurrentOwner,Ol=0,Nl=null,Il=null,Dl=0,Fl=0,jl=sa(0),Ml=0,Bl=null,zl=0,$l=0,Ul=0,ql=0,Gl=null,Hl=0,Ql=1/0;function Vl(){Ql=Ua()+500}var Wl,Kl=null,Yl=!1,Xl=null,Zl=null,Jl=!1,es=null,ts=90,ns=[],rs=[],as=null,os=0,is=null,ls=-1,ss=0,cs=0,us=null,ds=!1;function ps(){return 48&Ol?Ua():-1!==ls?ls:ls=Ua()}function fs(e){if(!(2&(e=e.mode)))return 1;if(!(4&e))return 99===qa()?1:2;if(0===ss&&(ss=zl),0!==Ka.transition){0!==cs&&(cs=null!==Gl?Gl.pendingLanes:0),e=ss;var t=4186112&~cs;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qa(),4&Ol&&98===e?e=Bt(12,ss):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function hs(e,t,n){if(50<os)throw os=0,is=null,Error(i(185));if(null===(e=ms(e,t)))return null;Ut(e,t,n),e===Nl&&(Ul|=t,4===Ml&&vs(e,Dl));var r=qa();1===t?8&Ol&&!(48&Ol)?ys(e):(gs(e,n),0===Ol&&(Vl(),Va())):(!(4&Ol)||98!==r&&99!==r||(null===as?as=new Set([e]):as.add(e)),gs(e,n)),Gl=e}function ms(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function gs(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-qt(l),c=1<<s,u=o[s];if(-1===u){if(!(c&r)||c&a){u=t,Ft(c);var d=Dt;o[s]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);l&=~c}if(r=jt(e,e===Nl?Dl:0),t=Dt,0===r)null!==n&&(n!==Fa&&Ta(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Fa&&Ta(n)}15===t?(n=ys.bind(null,e),null===Ma?(Ma=[n],Ba=_a(Ra,Wa)):Ma.push(n),n=Fa):14===t?n=Qa(99,ys.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(i(358,e))}}(t),n=Qa(n,bs.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function bs(e){if(ls=-1,cs=ss=0,48&Ol)throw Error(i(327));var t=e.callbackNode;if(Ds()&&e.callbackNode!==t)return null;var n=jt(e,e===Nl?Dl:0);if(0===n)return null;var r=n,a=Ol;Ol|=16;var o=Ts();for(Nl===e&&Dl===r||(Vl(),xs(e,r));;)try{Ps();break}catch(s){_s(e,s)}if(to(),Ll.current=o,Ol=a,null!==Il?r=0:(Nl=null,Dl=0,r=Ml),zl&Ul)xs(e,0);else if(0!==r){if(2===r&&(Ol|=64,e.hydrate&&(e.hydrate=!1,Qr(e.containerInfo)),0!==(n=Mt(e))&&(r=As(e,n))),1===r)throw t=Bl,xs(e,0),vs(e,n),gs(e,Ua()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(i(345));case 2:case 5:Os(e);break;case 3:if(vs(e,n),(62914560&n)===n&&10<(r=Hl+500-Ua())){if(0!==jt(e,0))break;if(((a=e.suspendedLanes)&n)!==n){ps(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Gr(Os.bind(null,e),r);break}Os(e);break;case 4:if(vs(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var l=31-qt(n);o=1<<l,(l=r[l])>a&&(a=l),n&=~o}if(n=a,10<(n=(120>(n=Ua()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Pl(n/1960))-n)){e.timeoutHandle=Gr(Os.bind(null,e),n);break}Os(e);break;default:throw Error(i(329))}}return gs(e,Ua()),e.callbackNode===t?bs.bind(null,e):null}function vs(e,t){for(t&=~ql,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function ys(e){if(48&Ol)throw Error(i(327));if(Ds(),e===Nl&&e.expiredLanes&Dl){var t=Dl,n=As(e,t);zl&Ul&&(n=As(e,t=jt(e,t)))}else n=As(e,t=jt(e,0));if(0!==e.tag&&2===n&&(Ol|=64,e.hydrate&&(e.hydrate=!1,Qr(e.containerInfo)),0!==(t=Mt(e))&&(n=As(e,t))),1===n)throw n=Bl,xs(e,0),vs(e,t),gs(e,Ua()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Os(e),gs(e,Ua()),null}function ws(e,t){var n=Ol;Ol|=1;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}}function ks(e,t){var n=Ol;Ol&=-2,Ol|=8;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}}function Es(e,t){ua(jl,Fl),Fl|=t,zl|=t}function Ss(){Fl=jl.current,ca(jl)}function xs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Hr(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&ba();break;case 3:Io(),ca(fa),ca(pa),Ko();break;case 5:Fo(r);break;case 4:Io();break;case 13:case 19:ca(jo);break;case 10:no(r);break;case 23:case 24:Ss()}n=n.return}Nl=e,Il=Qs(e.current,null),Dl=Fl=zl=t,Ml=0,Bl=null,ql=Ul=$l=0}function _s(e,t){for(;;){var n=Il;try{if(to(),Yo.current=Ri,ni){for(var r=Jo.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}ni=!1}if(Zo=0,ti=ei=Jo=null,ri=!1,Rl.current=null,null===n||null===n.return){Ml=1,Bl=t,Il=null;break}e:{var o=e,i=n.return,l=n,s=t;if(t=Dl,l.flags|=2048,l.firstEffect=l.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var c=s;if(!(2&l.mode)){var u=l.alternate;u?(l.updateQueue=u.updateQueue,l.memoizedState=u.memoizedState,l.lanes=u.lanes):(l.updateQueue=null,l.memoizedState=null)}var d=!!(1&jo.current),p=i;do{var f;if(f=13===p.tag){var h=p.memoizedState;if(null!==h)f=null!==h.dehydrated;else{var m=p.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(f){var g=p.updateQueue;if(null===g){var b=new Set;b.add(c),p.updateQueue=b}else g.add(c);if(!(2&p.mode)){if(p.flags|=64,l.flags|=16384,l.flags&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var v=co(-1,1);v.tag=2,uo(l,v)}l.lanes|=1;break e}s=void 0,l=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new dl,s=new Set,y.set(c,s)):void 0===(s=y.get(c))&&(s=new Set,y.set(c,s)),!s.has(l)){s.add(l);var w=$s.bind(null,o,c,l);c.then(w,w)}p.flags|=4096,p.lanes=t;break e}p=p.return}while(null!==p);s=Error((V(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ml&&(Ml=2),s=cl(s,l),p=i;do{switch(p.tag){case 3:o=s,p.flags|=4096,t&=-t,p.lanes|=t,po(p,pl(0,o,t));break e;case 1:o=s;var k=p.type,E=p.stateNode;if(!(64&p.flags||"function"!=typeof k.getDerivedStateFromError&&(null===E||"function"!=typeof E.componentDidCatch||null!==Zl&&Zl.has(E)))){p.flags|=4096,t&=-t,p.lanes|=t,po(p,fl(p,o,t));break e}}p=p.return}while(null!==p)}Rs(n)}catch(S){t=S,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function Ts(){var e=Ll.current;return Ll.current=Ri,null===e?Ri:e}function As(e,t){var n=Ol;Ol|=16;var r=Ts();for(Nl===e&&Dl===t||xs(e,t);;)try{Cs();break}catch(a){_s(e,a)}if(to(),Ol=n,Ll.current=r,null!==Il)throw Error(i(261));return Nl=null,Dl=0,Ml}function Cs(){for(;null!==Il;)Ls(Il)}function Ps(){for(;null!==Il&&!Aa();)Ls(Il)}function Ls(e){var t=Wl(e.alternate,e,Fl);e.memoizedProps=e.pendingProps,null===t?Rs(e):Il=t,Rl.current=null}function Rs(e){var t=e;do{var n=t.alternate;if(e=t.return,2048&t.flags){if(null!==(n=sl(t)))return n.flags&=2047,void(Il=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(null!==(n=ll(n,t,Fl)))return void(Il=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||1073741824&Fl||!(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&!(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Ml&&(Ml=5)}function Os(e){var t=qa();return Ha(99,Ns.bind(null,e,t)),null}function Ns(e,t){do{Ds()}while(null!==es);if(48&Ol)throw Error(i(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,o=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var l=e.eventTimes,s=e.expirationTimes;0<o;){var c=31-qt(o),u=1<<c;a[c]=0,l[c]=-1,s[c]=-1,o&=~u}if(null!==as&&!(24&r)&&as.has(e)&&as.delete(e),e===Nl&&(Il=Nl=null,Dl=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=Ol,Ol|=32,Rl.current=null,zr=Wt,gr(l=mr())){if("selectionStart"in l)s={start:l.selectionStart,end:l.selectionEnd};else e:if(s=(s=l.ownerDocument)&&s.defaultView||window,(u=s.getSelection&&s.getSelection())&&0!==u.rangeCount){s=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{s.nodeType,c.nodeType}catch(T){s=null;break e}var d=0,p=-1,f=-1,h=0,m=0,g=l,b=null;t:for(;;){for(var v;g!==s||0!==o&&3!==g.nodeType||(p=d+o),g!==c||0!==u&&3!==g.nodeType||(f=d+u),3===g.nodeType&&(d+=g.nodeValue.length),null!==(v=g.firstChild);)b=g,g=v;for(;;){if(g===l)break t;if(b===s&&++h===o&&(p=d),b===c&&++m===u&&(f=d),null!==(v=g.nextSibling))break;b=(g=b).parentNode}g=v}s=-1===p||-1===f?null:{start:p,end:f}}else s=null;s=s||{start:0,end:0}}else s=null;$r={focusedElem:l,selectionRange:s},Wt=!1,us=null,ds=!1,Kl=r;do{try{Is()}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);us=null,Kl=r;do{try{for(l=e;null!==Kl;){var y=Kl.flags;if(16&y&&be(Kl.stateNode,""),128&y){var w=Kl.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&y){case 2:El(Kl),Kl.flags&=-3;break;case 6:El(Kl),Kl.flags&=-3,Tl(Kl.alternate,Kl);break;case 1024:Kl.flags&=-1025;break;case 1028:Kl.flags&=-1025,Tl(Kl.alternate,Kl);break;case 4:Tl(Kl.alternate,Kl);break;case 8:_l(l,s=Kl);var E=s.alternate;wl(s),null!==E&&wl(E)}Kl=Kl.nextEffect}}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);if(k=$r,w=mr(),y=k.focusedElem,l=k.selectionRange,w!==y&&y&&y.ownerDocument&&hr(y.ownerDocument.documentElement,y)){null!==l&&gr(y)&&(w=l.start,void 0===(k=l.end)&&(k=w),"selectionStart"in y?(y.selectionStart=w,y.selectionEnd=Math.min(k,y.value.length)):(k=(w=y.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),s=y.textContent.length,E=Math.min(l.start,s),l=void 0===l.end?E:Math.min(l.end,s),!k.extend&&E>l&&(s=l,l=E,E=s),s=fr(y,E),o=fr(y,l),s&&o&&(1!==k.rangeCount||k.anchorNode!==s.node||k.anchorOffset!==s.offset||k.focusNode!==o.node||k.focusOffset!==o.offset)&&((w=w.createRange()).setStart(s.node,s.offset),k.removeAllRanges(),E>l?(k.addRange(w),k.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),k.addRange(w))))),w=[];for(k=y;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<w.length;y++)(k=w[y]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Wt=!!zr,$r=zr=null,e.current=n,Kl=r;do{try{for(y=e;null!==Kl;){var S=Kl.flags;if(36&S&&bl(y,Kl.alternate,Kl),128&S){w=void 0;var x=Kl.ref;if(null!==x){var _=Kl.stateNode;Kl.tag,w=_,"function"==typeof x?x(w):x.current=w}}Kl=Kl.nextEffect}}catch(T){if(null===Kl)throw Error(i(330));zs(Kl,T),Kl=Kl.nextEffect}}while(null!==Kl);Kl=null,ja(),Ol=a}else e.current=n;if(Jl)Jl=!1,es=e,ts=t;else for(Kl=r;null!==Kl;)t=Kl.nextEffect,Kl.nextEffect=null,8&Kl.flags&&((S=Kl).sibling=null,S.stateNode=null),Kl=t;if(0===(r=e.pendingLanes)&&(Zl=null),1===r?e===is?os++:(os=0,is=e):os=0,n=n.stateNode,Sa&&"function"==typeof Sa.onCommitFiberRoot)try{Sa.onCommitFiberRoot(Ea,n,void 0,!(64&~n.current.flags))}catch(T){}if(gs(e,Ua()),Yl)throw Yl=!1,e=Xl,Xl=null,e;return 8&Ol||Va(),null}function Is(){for(;null!==Kl;){var e=Kl.alternate;ds||null===us||(8&Kl.flags?Je(Kl,us)&&(ds=!0):13===Kl.tag&&Cl(e,Kl)&&Je(Kl,us)&&(ds=!0));var t=Kl.flags;256&t&&gl(e,Kl),!(512&t)||Jl||(Jl=!0,Qa(97,(function(){return Ds(),null}))),Kl=Kl.nextEffect}}function Ds(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Ha(e,Ms)}return!1}function Fs(e,t){ns.push(t,e),Jl||(Jl=!0,Qa(97,(function(){return Ds(),null})))}function js(e,t){rs.push(t,e),Jl||(Jl=!0,Qa(97,(function(){return Ds(),null})))}function Ms(){if(null===es)return!1;var e=es;if(es=null,48&Ol)throw Error(i(331));var t=Ol;Ol|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var a=n[r],o=n[r+1],l=a.destroy;if(a.destroy=void 0,"function"==typeof l)try{l()}catch(c){if(null===o)throw Error(i(330));zs(o,c)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){a=n[r],o=n[r+1];try{var s=a.create;a.destroy=s()}catch(c){if(null===o)throw Error(i(330));zs(o,c)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Ol=t,Va(),!0}function Bs(e,t,n){uo(e,t=pl(0,t=cl(n,t),1)),t=ps(),null!==(e=ms(e,1))&&(Ut(e,1,t),gs(e,t))}function zs(e,t){if(3===e.tag)Bs(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bs(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r))){var a=fl(n,e=cl(t,e),1);if(uo(n,a),a=ps(),null!==(n=ms(n,1)))Ut(n,1,a),gs(n,a);else if("function"==typeof r.componentDidCatch&&(null===Zl||!Zl.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function $s(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ps(),e.pingedLanes|=e.suspendedLanes&n,Nl===e&&(Dl&n)===n&&(4===Ml||3===Ml&&(62914560&Dl)===Dl&&500>Ua()-Hl?xs(e,0):ql|=n),gs(e,t)}function Us(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(2&(t=e.mode)?4&t?(0===ss&&(ss=zl),0===(t=zt(62914560&~ss))&&(t=4194304)):t=99===qa()?1:2:t=1),n=ps(),null!==(e=ms(e,t))&&(Ut(e,t,n),gs(e,n))}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Gs(e,t,n,r){return new qs(e,t,n,r)}function Hs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Qs(e,t){var n=e.alternate;return null===n?((n=Gs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vs(e,t,n,r,a,o){var l=2;if(r=e,"function"==typeof e)Hs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case x:return Ws(n.children,a,o,t);case F:l=8,a|=16;break;case _:l=8,a|=1;break;case T:return(e=Gs(12,n,t,8|a)).elementType=T,e.type=T,e.lanes=o,e;case L:return(e=Gs(13,n,t,a)).type=L,e.elementType=L,e.lanes=o,e;case R:return(e=Gs(19,n,t,a)).elementType=R,e.lanes=o,e;case j:return Ks(n,a,o,t);case M:return(e=Gs(24,n,t,a)).elementType=M,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case A:l=10;break e;case C:l=9;break e;case P:l=11;break e;case O:l=14;break e;case N:l=16,r=null;break e;case I:l=22;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Gs(l,n,t,a)).elementType=e,t.type=r,t.lanes=o,t}function Ws(e,t,n,r){return(e=Gs(7,e,r,t)).lanes=n,e}function Ks(e,t,n,r){return(e=Gs(23,e,r,t)).elementType=j,e.lanes=n,e}function Ys(e,t,n){return(e=Gs(6,e,null,t)).lanes=n,e}function Xs(e,t,n){return(t=Gs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=$t(0),this.expirationTimes=$t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$t(0),this.mutableSourceEagerHydrationData=null}function Js(e,t,n,r){var a=t.current,o=ps(),l=fs(a);e:if(n){t:{if(Ke(n=n._reactInternals)!==n||1!==n.tag)throw Error(i(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(ga(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(i(171))}if(1===n.tag){var c=n.type;if(ga(c)){n=ya(n,c,s);break e}}n=s}else n=da;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(a,t),hs(a,l,o),l}function ec(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function nc(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function rc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Zs(e,t,null!=n&&!0===n.hydrate),t=Gs(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,lo(t),e[Jr]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function ac(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function oc(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if("function"==typeof a){var l=a;a=function(){var e=ec(i);l.call(e)}}Js(t,i,e,a)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new rc(e,0,t?{hydrate:!0}:void 0)}(n,r),i=o._internalRoot,"function"==typeof a){var s=a;a=function(){var e=ec(i);s.call(e)}}ks((function(){Js(t,i,e,a)}))}return ec(i)}function ic(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ac(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}Wl=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fa.current)Fi=!0;else{if(!(n&r)){switch(Fi=!1,t.tag){case 3:Qi(t),Vo();break;case 5:Do(t);break;case 1:ga(t.type)&&wa(t);break;case 4:No(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;ua(Xa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return n&t.child.childLanes?Zi(e,t,n):(ua(jo,1&jo.current),null!==(t=ol(e,t,n))?t.sibling:null);ua(jo,1&jo.current);break;case 19:if(r=!!(n&t.childLanes),64&e.flags){if(r)return al(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),ua(jo,jo.current),r)break;return null;case 23:case 24:return t.lanes=0,$i(e,t,n)}return ol(e,t,n)}Fi=!!(16384&e.flags)}else Fi=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=ma(t,pa.current),ao(t,n),a=ii(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ga(r)){var o=!0;wa(t)}else o=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,lo(t);var l=r.getDerivedStateFromProps;"function"==typeof l&&go(t,r,l,e),a.updater=bo,t.stateNode=a,a._reactInternals=t,ko(t,r,e,n),t=Hi(null,t,r,!0,o,n)}else t.tag=0,ji(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(o=a._init)(a._payload),t.type=a,o=t.tag=function(e){if("function"==typeof e)return Hs(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===O)return 14}return 2}(a),e=Ya(a,e),o){case 0:t=qi(null,t,a,e,n);break e;case 1:t=Gi(null,t,a,e,n);break e;case 11:t=Mi(null,t,a,e,n);break e;case 14:t=Bi(null,t,a,Ya(a.type,e),r,n);break e}throw Error(i(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,qi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 1:return r=t.type,a=t.pendingProps,Gi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 3:if(Qi(t),r=t.updateQueue,null===e||null===r)throw Error(i(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,so(e,t),fo(t,r,null,n),(r=t.memoizedState.element)===a)Vo(),t=ol(e,t,n);else{if((o=(a=t.stateNode).hydrate)&&(zo=Vr(t.stateNode.containerInfo.firstChild),Bo=t,o=$o=!0),o){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(o=e[a])._workInProgressVersionPrimary=e[a+1],Wo.push(o);for(n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else ji(e,t,r,n),Vo();t=t.child}return t;case 5:return Do(t),null===e&&Go(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,l=a.children,qr(r,a)?l=null:null!==o&&qr(r,o)&&(t.flags|=16),Ui(e,t),ji(e,t,l,n),t.child;case 6:return null===e&&Go(t),null;case 13:return Zi(e,t,n);case 4:return No(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=To(t,null,r,n):ji(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Mi(e,t,r,a=t.elementType===r?a:Ya(r,a),n);case 7:return ji(e,t,t.pendingProps,n),t.child;case 8:case 12:return ji(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,l=t.memoizedProps,o=a.value;var s=t.type._context;if(ua(Xa,s._currentValue),s._currentValue=o,null!==l)if(s=l.value,0===(o=cr(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(l.children===a.children&&!fa.current){t=ol(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){l=s.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&u.observedBits&o){1===s.tag&&((u=co(-1,n&-n)).tag=2,uo(s,u)),s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),ro(s.return,n),c.lanes|=n;break}u=u.next}}else l=10===s.tag&&s.type===t.type?null:s.child;if(null!==l)l.return=s;else for(l=s;null!==l;){if(l===t){l=null;break}if(null!==(s=l.sibling)){s.return=l.return,l=s;break}l=l.return}s=l}ji(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(o=t.pendingProps).children,ao(t,n),r=r(a=oo(a,o.unstable_observedBits)),t.flags|=1,ji(e,t,r,n),t.child;case 14:return o=Ya(a=t.type,t.pendingProps),Bi(e,t,a,o=Ya(a.type,o),r,n);case 15:return zi(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Ya(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ga(r)?(e=!0,wa(t)):e=!1,ao(t,n),yo(t,r,a),ko(t,r,a,n),Hi(null,t,r,!0,e,n);case 19:return al(e,t,n);case 23:case 24:return $i(e,t,n)}throw Error(i(156,t.tag))},rc.prototype.render=function(e){Js(e,this._internalRoot,null,null)},rc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Js(null,e,null,(function(){t[Jr]=null}))},et=function(e){13===e.tag&&(hs(e,4,ps()),nc(e,4))},tt=function(e){13===e.tag&&(hs(e,67108864,ps()),nc(e,67108864))},nt=function(e){if(13===e.tag){var t=ps(),n=fs(e);hs(e,n,t),nc(e,n)}},rt=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=aa(r);if(!a)throw Error(i(90));X(r),ne(r,a)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ie(e,!!n.multiple,t,!1)}},Oe=ws,Ne=function(e,t,n,r,a){var o=Ol;Ol|=4;try{return Ha(98,e.bind(null,t,n,r,a))}finally{0===(Ol=o)&&(Vl(),Va())}},Ie=function(){!(49&Ol)&&(function(){if(null!==as){var e=as;as=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,gs(e,Ua())}))}Va()}(),Ds())},De=function(e,t){var n=Ol;Ol|=2;try{return e(t)}finally{0===(Ol=n)&&(Vl(),Va())}};var lc={Events:[na,ra,aa,Le,Re,Ds,{current:!1}]},sc={findFiberByHostInstance:ta,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cc={bundleType:sc.bundleType,version:sc.version,rendererPackageName:sc.rendererPackageName,rendererConfig:sc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:sc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Ea=uc.inject(cc),Sa=uc}catch(me){}}t.hydrate=function(e,t,n){if(!ac(t))throw Error(i(200));return oc(null,e,t,!0,n)}},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2551)},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var l,s,c,u;if(Array.isArray(e)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(!o(e[s],i[s]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!i.has(s.value[0]))return!1;for(u=e.entries();!(s=u.next()).done;)if(!o(s.value[1],i.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!i.has(s.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(e[s]!==i[s])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((l=(c=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,c[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!e.$$typeof)&&!o(e[c[s]],i[c[s]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},2799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case l:case i:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case s:return e;default:return t}}case a:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===g},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=k},4363:(e,t,n)=>{"use strict";e.exports=n(2799)},3259:(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<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var l=n(6540),s=n(5556),c=[],u=[];function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=d(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function f(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function h(e,t){var d,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var h=i({loader:null,loading:null,delay:200,timeout:null,render:f,webpack:null,modules:null},t),m=null;function g(){return m||(m=e(h.loader)),m.promise}return c.push(g),"function"==typeof h.webpack&&u.push((function(){if((0,h.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g()})),p=d=function(t){function n(n){var r;return o(a(a(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),m=e(h.loader),r._loadModule()})),g(),r.state={error:m.error,pastDelay:!1,timedOut:!1,loading:m.loading,loaded:m.loaded},r}r(n,t),n.preload=function(){return g()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(h.modules)&&h.modules.forEach((function(t){e.context.loadable.report(t)})),m.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof h.delay&&(0===h.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),h.delay)),"number"==typeof h.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),h.timeout));var n=function(){t({error:m.error,loaded:m.loaded,loading:m.loading}),e._clearTimeouts()};m.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?l.createElement(h.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?h.render(this.state.loaded,this.props):null},n}(l.Component),o(d,"contextTypes",{loadable:s.shape({report:s.func.isRequired})}),p}function m(e){return h(d,e)}m.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return h(p,e)};var g=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.getChildContext=function(){return{loadable:{report:this.props.report}}},n.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return b(e)}))}o(g,"propTypes",{report:s.func.isRequired}),o(g,"childContextTypes",{loadable:s.shape({report:s.func.isRequired}).isRequired}),m.Capture=g,m.preloadAll=function(){return new Promise((function(e,t){b(c).then(e,t)}))},m.preloadReady=function(){return new Promise((function(e,t){b(u).then(e,e)}))},e.exports=m},2831:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,v:()=>l});var r=n(6347),a=n(8168),o=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map((function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})}))):null}},4625:(e,t,n)=>{"use strict";n.d(t,{B6:()=>r.B6,I9:()=>d,Ix:()=>r.Ix,Kd:()=>u,N_:()=>b,W5:()=>r.W5,W6:()=>r.W6,XG:()=>r.XG,dO:()=>r.dO,fS:()=>r.fS,g:()=>r.g,k2:()=>w,kO:()=>r.kO,qh:()=>r.qh,rd:()=>r.rd,tW:()=>r.tW,y:()=>r.y,zy:()=>r.zy});var r=n(6347),a=n(2892),o=n(6540),i=n(9231),l=n(8168),s=n(8587),c=n(1561),u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.zR)(t.props),t}return(0,a.A)(t,e),t.prototype.render=function(){return o.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(o.Component);var d=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.TM)(t.props),t}return(0,a.A)(t,e),t.prototype.render=function(){return o.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(o.Component);var p=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.yJ)(e,null,null,t):e},h=function(e){return e},m=o.forwardRef;void 0===m&&(m=h);var g=m((function(e,t){var n=e.innerRef,r=e.navigate,a=e.onClick,i=(0,s.A)(e,["innerRef","navigate","onClick"]),c=i.target,u=(0,l.A)({},i,{onClick:function(e){try{a&&a(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||c&&"_self"!==c||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=h!==m&&t||n,o.createElement("a",u)}));var b=m((function(e,t){var n=e.component,a=void 0===n?g:n,u=e.replace,d=e.to,b=e.innerRef,v=(0,s.A)(e,["component","replace","to","innerRef"]);return o.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=e.history,r=f(p(d,e.location),e.location),s=r?n.createHref(r):"",g=(0,l.A)({},v,{href:s,navigate:function(){var t=p(d,e.location),r=(0,i.AO)(e.location)===(0,i.AO)(f(t));(u||r?n.replace:n.push)(t)}});return h!==m?g.ref=t||b:g.innerRef=b,o.createElement(a,g)}))})),v=function(e){return e},y=o.forwardRef;void 0===y&&(y=v);var w=y((function(e,t){var n=e["aria-current"],a=void 0===n?"page":n,i=e.activeClassName,u=void 0===i?"active":i,d=e.activeStyle,h=e.className,m=e.exact,g=e.isActive,w=e.location,k=e.sensitive,E=e.strict,S=e.style,x=e.to,_=e.innerRef,T=(0,s.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.createElement(r.XZ.Consumer,null,(function(e){e||(0,c.A)(!1);var n=w||e.location,i=f(p(x,n),n),s=i.pathname,A=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=A?(0,r.B6)(n.pathname,{path:A,exact:m,sensitive:k,strict:E}):null,P=!!(g?g(C,n):C),L="function"==typeof h?h(P):h,R="function"==typeof S?S(P):S;P&&(L=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(L,u),R=(0,l.A)({},R,d));var O=(0,l.A)({"aria-current":P&&a||null,className:L,style:R,to:i},T);return v!==y?O.ref=t||_:O.innerRef=_,o.createElement(b,O)}))}))},6347:(e,t,n)=>{"use strict";n.d(t,{B6:()=>N,Ix:()=>k,W5:()=>V,W6:()=>G,XG:()=>x,XZ:()=>w,dO:()=>$,fS:()=>E,g:()=>Q,kO:()=>z,qh:()=>I,rd:()=>P,tW:()=>C,y:()=>U,zy:()=>H});var r=n(2892),a=n(6540),o=n(5556),i=n.n(o),l=n(9231),s=n(1561),c=n(8168),u=n(5302),d=n.n(u),p=(n(4363),n(8587)),f=n(4146),h=n.n(f),m=1073741823,g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var b=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return g[e]=(g[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(t=e.call.apply(e,[this].concat(o))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter((function(t){return t!==e}))},get:function(){return n},set:function(e,t){n=e,r.forEach((function(e){return e(n,t)}))}}),t}(0,r.A)(n,e);var a=n.prototype;return a.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},a.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((o=r)===(i=a)?0!==o||1/o==1/i:o!=o&&i!=i)?n=0:(n="function"==typeof t?t(r,a):m,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,i},a.render=function(){return this.props.children},n}(a.Component);s.childContextTypes=((n={})[l]=i().object.isRequired,n);var c=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var a=n.prototype;return a.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?m:t},a.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?m:e},a.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},a.getValue=function(){return this.context[l]?this.context[l].get():e},a.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(a.Component);return c.contextTypes=((o={})[l]=i().object,o),{Provider:s,Consumer:c}},v=function(e){var t=b();return t.displayName=e,t},y=v("Router-History"),w=v("Router"),k=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a.createElement(w.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a.Component);var E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,l.sC)(t.props),t}return(0,r.A)(t,e),t.prototype.render=function(){return a.createElement(k,{history:this.history,children:this.props.children})},t}(a.Component);var S=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(a.Component);function x(e){var t=e.message,n=e.when,r=void 0===n||n;return a.createElement(w.Consumer,null,(function(e){if(e||(0,s.A)(!1),!r||e.staticContext)return null;var n=e.history.block;return a.createElement(S,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})}))}var _={},T=1e4,A=0;function C(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(_[e])return _[e];var t=d().compile(e);return A<T&&(_[e]=t,A++),t}(e)(t,{pretty:!0})}function P(e){var t=e.computedMatch,n=e.to,r=e.push,o=void 0!==r&&r;return a.createElement(w.Consumer,null,(function(e){e||(0,s.A)(!1);var r=e.history,i=e.staticContext,u=o?r.push:r.replace,d=(0,l.yJ)(t?"string"==typeof n?C(n,t.params):(0,c.A)({},n,{pathname:C(n.pathname,t.params)}):n);return i?(u(d),null):a.createElement(S,{onMount:function(){u(d)},onUpdate:function(e,t){var n=(0,l.yJ)(t.to);(0,l.Fu)(n,(0,c.A)({},d,{key:n.key}))||u(d)},to:n})}))}var L={},R=1e4,O=0;function N(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,i=n.strict,l=void 0!==i&&i,s=n.sensitive,c=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=L[n]||(L[n]={});if(r[e])return r[e];var a=[],o={regexp:d()(e,a,t),keys:a};return O<R&&(r[e]=o,O++),o}(n,{end:o,strict:l,sensitive:c}),a=r.regexp,i=r.keys,s=a.exec(e);if(!s)return null;var u=s[0],p=s.slice(1),f=e===u;return o&&!f?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:f,params:i.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var I=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return a.createElement(w.Consumer,null,(function(t){t||(0,s.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?N(n.pathname,e.props):t.match,o=(0,c.A)({},t,{location:n,match:r}),i=e.props,l=i.children,u=i.component,d=i.render;return Array.isArray(l)&&function(e){return 0===a.Children.count(e)}(l)&&(l=null),a.createElement(w.Provider,{value:o},o.match?l?"function"==typeof l?l(o):l:u?a.createElement(u,o):d?d(o):null:"function"==typeof l?l(o):null)}))},t}(a.Component);function D(e){return"/"===e.charAt(0)?e:"/"+e}function F(e,t){if(!e)return t;var n=D(e);return 0!==t.pathname.indexOf(n)?t:(0,c.A)({},t,{pathname:t.pathname.substr(n.length)})}function j(e){return"string"==typeof e?e:(0,l.AO)(e)}function M(e){return function(){(0,s.A)(!1)}}function B(){}var z=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return B},t.handleBlock=function(){return B},t}(0,r.A)(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,a=void 0===r?"":r,o=n.context,i=void 0===o?{}:o;i.action=t,i.location=function(e,t){return e?(0,c.A)({},t,{pathname:D(e)+t.pathname}):t}(a,(0,l.yJ)(e)),i.url=j(i.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,o=void 0===r?{}:r,i=e.location,s=void 0===i?"/":i,u=(0,p.A)(e,["basename","context","location"]),d={createHref:function(e){return D(n+j(e))},action:"POP",location:F(n,(0,l.yJ)(s)),push:this.handlePush,replace:this.handleReplace,go:M(),goBack:M(),goForward:M(),listen:this.handleListen,block:this.handleBlock};return a.createElement(k,(0,c.A)({},u,{history:d,staticContext:o}))},t}(a.Component);var $=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return a.createElement(w.Consumer,null,(function(t){t||(0,s.A)(!1);var n,r,o=e.props.location||t.location;return a.Children.forEach(e.props.children,(function(e){if(null==r&&a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?N(o.pathname,(0,c.A)({},e.props,{path:i})):t.match}})),r?a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(a.Component);function U(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,p.A)(t,["wrappedComponentRef"]);return a.createElement(w.Consumer,null,(function(t){return t||(0,s.A)(!1),a.createElement(e,(0,c.A)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,h()(n,e)}var q=a.useContext;function G(){return q(y)}function H(){return q(w).location}function Q(){var e=q(w).match;return e?e.params:{}}function V(e){var t=H(),n=q(w).match;return e?N(t.pathname,e):n}},2098:(e,t,n)=>{"use strict";var r,a=n(6540),o=(r=a)&&"object"==typeof r&&"default"in r?r.default:r;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}var l=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var s,c=[];function u(){s=e(c.map((function(e){return e.props}))),d.canUseDOM?t(s):n&&(s=n(s))}var d=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.peek=function(){return s},a.rewind=function(){if(a.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=s;return s=void 0,c=[],e};var i=a.prototype;return i.UNSAFE_componentWillMount=function(){c.push(this),u()},i.componentDidUpdate=function(){u()},i.componentWillUnmount=function(){var e=c.indexOf(this);c.splice(e,1),u()},i.render=function(){return o.createElement(r,this.props)},a}(a.PureComponent);return i(d,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),i(d,"canUseDOM",l),d}}},5287:(e,t,n)=>{"use strict";var r=n(5228),a=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var i=60109,l=60110,s=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;a=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),i=d("react.provider"),l=d("react.context"),s=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var p="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=g.prototype;var y=v.prototype=new b;y.constructor=v,r(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,o={},i=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,r)&&!E.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:a,type:e,key:i,ref:l,props:o,_owner:w.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var _=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,n,r,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case a:case o:s=!0}}if(s)return i=i(s=e),e=""===r?"."+T(s,0):r,Array.isArray(i)?(n="",null!=e&&(n=e.replace(_,"$&/")+"/"),A(i,t,n,"",(function(e){return e}))):null!=i&&(x(i)&&(i=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(_,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+T(l=e[c],c);s+=A(l,t,n,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(l=e.next()).done;)s+=A(l=l.value,t,n,u=r+T(l,c++),i);else if("object"===l)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function C(e,t,n){if(null==e)return e;var r=[],a=0;return A(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function P(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var L={current:null};function R(){var e=L.current;if(null===e)throw Error(f(321));return e}var O={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:C,forEach:function(e,t,n){C(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return C(e,(function(){t++})),t},toArray:function(e){return C(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error(f(143));return e}},t.Component=g,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error(f(267,e));var o=r({},e.props),i=e.key,l=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,s=w.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)k.call(t,u)&&!E.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:a,type:e.type,key:i,ref:l,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return R().useCallback(e,t)},t.useContext=function(e,t){return R().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return R().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return R().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return R().useLayoutEffect(e,t)},t.useMemo=function(e,t){return R().useMemo(e,t)},t.useReducer=function(e,t,n){return R().useReducer(e,t,n)},t.useRef=function(e){return R().useRef(e)},t.useState=function(e){return R().useState(e)},t.version="17.0.2"},6540:(e,t,n)=>{"use strict";e.exports=n(5287)},7463:(e,t)=>{"use strict";var n,r,a,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,u=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(n){throw setTimeout(d,0),n}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(d,0))},r=function(e,t){u=setTimeout(e,t)},a=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,f=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,g=null,b=-1,v=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();y=e+v;try{g(!0,e)?k.postMessage(null):(m=!1,g=null)}catch(n){throw k.postMessage(null),n}}else m=!1},n=function(e){g=e,m||(m=!0,k.postMessage(null))},r=function(e,n){b=p((function(){e(t.unstable_now())}),n)},a=function(){f(b),b=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<_(a,t)))break e;e[r]=t,e[n]=a,n=r}}function S(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var o=2*(r+1)-1,i=e[o],l=o+1,s=e[l];if(void 0!==i&&0>_(i,n))void 0!==s&&0>_(s,i)?(e[r]=s,e[l]=n,r=l):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==s&&0>_(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],A=[],C=1,P=null,L=3,R=!1,O=!1,N=!1;function I(e){for(var t=S(A);null!==t;){if(null===t.callback)x(A);else{if(!(t.startTime<=e))break;x(A),t.sortIndex=t.expirationTime,E(T,t)}t=S(A)}}function D(e){if(N=!1,I(e),!O)if(null!==S(T))O=!0,n(F);else{var t=S(A);null!==t&&r(D,t.startTime-e)}}function F(e,n){O=!1,N&&(N=!1,a()),R=!0;var o=L;try{for(I(n),P=S(T);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var i=P.callback;if("function"==typeof i){P.callback=null,L=P.priorityLevel;var l=i(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?P.callback=l:P===S(T)&&x(T),I(n)}else x(T);P=S(T)}if(null!==P)var s=!0;else{var c=S(A);null!==c&&r(D,c.startTime-n),s=!1}return s}finally{P=null,L=o,R=!1}}var j=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){O||R||(O=!0,n(F))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return S(T)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,o,i){var l=t.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0<i?l+i:l:i=l,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:C++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>l?(e.sortIndex=i,E(A,e),null===S(T)&&e===S(A)&&(N?a():N=!0,r(D,i-l))):(e.sortIndex=s,E(T,e),O||R||(O=!0,n(F))),e},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},9982:(e,t,n)=>{"use strict";e.exports=n(7463)},5215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>k,__asyncGenerator:()=>w,__asyncValues:()=>E,__await:()=>y,__awaiter:()=>u,__classPrivateFieldGet:()=>A,__classPrivateFieldIn:()=>P,__classPrivateFieldSet:()=>C,__createBinding:()=>p,__decorate:()=>l,__exportStar:()=>f,__extends:()=>a,__generator:()=>d,__importDefault:()=>T,__importStar:()=>_,__makeTemplateObject:()=>S,__metadata:()=>c,__param:()=>s,__read:()=>m,__rest:()=>i,__spread:()=>g,__spreadArray:()=>v,__spreadArrays:()=>b,__values:()=>h});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function l(e,t,n,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{s(r.next(e))}catch(t){o(t)}}function l(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(6===l[0]&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}var p=Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function f(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||p(t,e,n)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),a=0;for(t=0;t<n;t++)for(var o=arguments[t],i=0,l=o.length;i<l;i++,a++)r[a]=o[i];return r}function v(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),o=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=a[e](t)).value instanceof y?Promise.resolve(n.value.v).then(s,c):u(o[0][2],n)}catch(r){u(o[0][3],r)}var n}function s(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function k(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:a?a(t):t}:a}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,a){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,a,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var x=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return x(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function A(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function C(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},2892:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>a})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{A:()=>r})},1561:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=!0,a="Invariant failed";function o(e,t){if(!e){if(r)throw new Error(a);var n="function"==typeof t?t():t,o=n?"".concat(a,": ").concat(n):a;throw new Error(o)}}},2654:e=>{"use strict";e.exports={}}},e=>{e.O(0,[1869],(()=>{return t=9516,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.6953f0b6.js.LICENSE.txt b/assets/js/main.b373ac20.js.LICENSE.txt similarity index 100% rename from assets/js/main.6953f0b6.js.LICENSE.txt rename to assets/js/main.b373ac20.js.LICENSE.txt diff --git a/assets/js/runtime~main.4ee0cc3b.js b/assets/js/runtime~main.4ee0cc3b.js deleted file mode 100644 index 8df764faa..000000000 --- a/assets/js/runtime~main.4ee0cc3b.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,a,f,d,c,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=b,r.c=t,e=[],r.O=(a,f,d,c)=>{if(!f){var b=1/0;for(i=0;i<e.length;i++){f=e[i][0],d=e[i][1],c=e[i][2];for(var t=!0,o=0;o<f.length;o++)(!1&c||b>=c)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,c<b&&(b=c));if(t){e.splice(i--,1);var n=d();void 0!==n&&(a=n)}}return a}c=c||0;for(var i=e.length;i>0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[f,d,c]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var c=Object.create(null);r.r(c);var b={};a=a||[null,f({}),f([]),f(f)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(c,b),c},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({30:"5986bbbc",264:"2700a261",303:"bcd3bfb0",318:"b205135c",444:"55be4921",463:"6081ee74",487:"dc7438fe",634:"415f4636",708:"d1355481",821:"0dffb83e",989:"5dbe55ec",1178:"78060cbc",1624:"86f86571",1675:"5b527261",1736:"5de085db",1991:"b2b675dd",2076:"a9cdb420",2082:"25e02a64",2138:"1a4e3797",2212:"667a64de",2337:"82b8edaf",2363:"22f692c8",2634:"c4f5d8e4",2663:"ae92dbda",2711:"9e4087bc",2746:"bce7c409",2976:"d52b8f97",3089:"d136d620",3107:"33e7285c",3249:"ccc49370",3287:"6222f147",3587:"44b7ef8d",3622:"4d63772d",3824:"9f68de09",4093:"03136cca",4151:"80f133ef",4264:"777ab133",4266:"6410037f",4386:"ebfee794",4492:"9bc9a8f7",4753:"6a8455ba",4813:"6875c492",5193:"57fdb5e0",5232:"de289047",5894:"b2f554cd",5981:"f17f44a5",6057:"5497f083",6107:"5f72c304",6139:"c7d22e29",6553:"d3f86d34",6631:"845acc88",6644:"ad8d4462",6918:"87b2d671",7041:"f3eeb784",7472:"814f3328",7643:"a6aa9e1f",8048:"4f74abd9",8070:"0480b142",8074:"b94bec88",8209:"01a85c17",8256:"1527b239",8401:"17896441",8581:"935f2afb",8714:"1be78505",8717:"7af93ffd",8995:"c6694585",9066:"5f72931d",9195:"167e38bb",9267:"a7023ddc",9292:"708a06f3",9591:"4ba7e5a3"}[e]||e)+"."+{30:"d7235f40",264:"fa44bfea",303:"a5c3e7e3",318:"a29595bc",444:"9bd1caf2",463:"b9284c7b",487:"0d5218fc",489:"ca291d9d",634:"7a31a4c9",708:"e2df6903",821:"63965d2f",989:"1ec7143d",1178:"4a17b02e",1624:"44f53b96",1675:"75c111fe",1736:"8c81bf77",1991:"9d79c29a",2076:"8c237922",2082:"ceb41915",2138:"9a32e74a",2212:"b6e89c6d",2337:"2518fc52",2363:"d429aa88",2634:"f5db07bb",2663:"fa3e9054",2711:"cb4b7bde",2746:"fd972dcb",2976:"690abada",3089:"a12c86d3",3107:"59452d43",3249:"09b0e9dd",3287:"a176d713",3587:"66d84936",3622:"10860821",3802:"2204ea4d",3824:"c9a40bb1",4093:"dcfbbf90",4151:"b9bea742",4264:"7496333d",4266:"cb153e70",4386:"5e976474",4492:"25ac6f8c",4753:"6a984874",4813:"c5267267",5193:"cd8624b2",5232:"b194732b",5741:"12a31c5f",5894:"6c312be4",5981:"c2bfe08d",6057:"76f32392",6107:"d8d3c4d6",6139:"87fdb6c3",6553:"50483152",6631:"b67b5b40",6644:"4774c754",6918:"15b9e967",7041:"90fb44e3",7472:"c07ec749",7643:"0d1f45a8",8048:"54a7c6c1",8070:"64e7869d",8074:"f7c54268",8209:"fff1baab",8256:"1dfe6ad5",8401:"a101c2be",8581:"84f27113",8714:"50559659",8717:"df38a66e",8995:"fbf15775",9066:"36f59a09",9090:"c2a8fc87",9195:"32f3a96b",9267:"ae3de725",9292:"4750b397",9591:"a81dffda"}[e]+".js",r.miniCssF=e=>"assets/css/styles.ec55c1be.css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},c="website:",r.l=(e,a,f,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var s=n[i];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==c+f){t=s;break}}t||(o=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,r.nc&&t.setAttribute("nonce",r.nc),t.setAttribute("data-webpack",c+f),t.src=e),d[e]=[a];var u=(a,f)=>{t.onerror=t.onload=null,clearTimeout(l);var c=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),c&&c.forEach((e=>e(f))),a)return a(f)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"8401","5986bbbc":"30","2700a261":"264",bcd3bfb0:"303",b205135c:"318","55be4921":"444","6081ee74":"463",dc7438fe:"487","415f4636":"634",d1355481:"708","0dffb83e":"821","5dbe55ec":"989","78060cbc":"1178","86f86571":"1624","5b527261":"1675","5de085db":"1736",b2b675dd:"1991",a9cdb420:"2076","25e02a64":"2082","1a4e3797":"2138","667a64de":"2212","82b8edaf":"2337","22f692c8":"2363",c4f5d8e4:"2634",ae92dbda:"2663","9e4087bc":"2711",bce7c409:"2746",d52b8f97:"2976",d136d620:"3089","33e7285c":"3107",ccc49370:"3249","6222f147":"3287","44b7ef8d":"3587","4d63772d":"3622","9f68de09":"3824","03136cca":"4093","80f133ef":"4151","777ab133":"4264","6410037f":"4266",ebfee794:"4386","9bc9a8f7":"4492","6a8455ba":"4753","6875c492":"4813","57fdb5e0":"5193",de289047:"5232",b2f554cd:"5894",f17f44a5:"5981","5497f083":"6057","5f72c304":"6107",c7d22e29:"6139",d3f86d34:"6553","845acc88":"6631",ad8d4462:"6644","87b2d671":"6918",f3eeb784:"7041","814f3328":"7472",a6aa9e1f:"7643","4f74abd9":"8048","0480b142":"8070",b94bec88:"8074","01a85c17":"8209","1527b239":"8256","935f2afb":"8581","1be78505":"8714","7af93ffd":"8717",c6694585:"8995","5f72931d":"9066","167e38bb":"9195",a7023ddc:"9267","708a06f3":"9292","4ba7e5a3":"9591"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,f)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)f.push(d[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var c=new Promise(((f,c)=>d=e[a]=[f,c]));f.push(d[2]=c);var b=r.p+r.u(a),t=new Error;r.l(b,(f=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var c=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+c+": "+b+")",t.name="ChunkLoadError",t.type=c,t.request=b,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var d,c,b=f[0],t=f[1],o=f[2],n=0;if(b.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(f);n<b.length;n++)c=b[n],r.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return r.O(i)},f=self.webpackChunkwebsite=self.webpackChunkwebsite||[];f.forEach(a.bind(null,0)),f.push=a.bind(null,f.push.bind(f))})()})(); \ No newline at end of file diff --git a/assets/js/runtime~main.8e06e228.js b/assets/js/runtime~main.8e06e228.js new file mode 100644 index 000000000..8143c51d9 --- /dev/null +++ b/assets/js/runtime~main.8e06e228.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,a,d,f,c,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var d=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(d.exports,d,d.exports,r),d.loaded=!0,d.exports}r.m=b,r.c=t,e=[],r.O=(a,d,f,c)=>{if(!d){var b=1/0;for(i=0;i<e.length;i++){d=e[i][0],f=e[i][1],c=e[i][2];for(var t=!0,o=0;o<d.length;o++)(!1&c||b>=c)&&Object.keys(r.O).every((e=>r.O[e](d[o])))?d.splice(o--,1):(t=!1,c<b&&(b=c));if(t){e.splice(i--,1);var n=f();void 0!==n&&(a=n)}}return a}c=c||0;for(var i=e.length;i>0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[d,f,c]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var c=Object.create(null);r.r(c);var b={};a=a||[null,d({}),d([]),d(d)];for(var t=2&f&&e;"object"==typeof t&&!~a.indexOf(t);t=d(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(c,b),c},r.d=(e,a)=>{for(var d in a)r.o(a,d)&&!r.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,d)=>(r.f[d](e,a),a)),[])),r.u=e=>"assets/js/"+({30:"5986bbbc",264:"2700a261",303:"bcd3bfb0",318:"b205135c",444:"55be4921",463:"6081ee74",487:"dc7438fe",634:"415f4636",708:"d1355481",821:"0dffb83e",989:"5dbe55ec",1178:"78060cbc",1624:"86f86571",1675:"5b527261",1736:"5de085db",1991:"b2b675dd",2076:"a9cdb420",2082:"25e02a64",2138:"1a4e3797",2212:"667a64de",2337:"82b8edaf",2363:"22f692c8",2634:"c4f5d8e4",2645:"19d568e8",2663:"ae92dbda",2711:"9e4087bc",2746:"bce7c409",2976:"d52b8f97",3089:"d136d620",3107:"33e7285c",3249:"ccc49370",3287:"6222f147",3587:"44b7ef8d",3622:"4d63772d",3824:"9f68de09",4093:"03136cca",4151:"80f133ef",4264:"777ab133",4266:"6410037f",4386:"ebfee794",4492:"9bc9a8f7",4753:"6a8455ba",4813:"6875c492",5193:"57fdb5e0",5232:"de289047",5894:"b2f554cd",5981:"f17f44a5",6057:"5497f083",6107:"5f72c304",6139:"c7d22e29",6553:"d3f86d34",6631:"845acc88",6644:"ad8d4462",6918:"87b2d671",7041:"f3eeb784",7472:"814f3328",7643:"a6aa9e1f",8048:"4f74abd9",8070:"0480b142",8074:"b94bec88",8209:"01a85c17",8256:"1527b239",8401:"17896441",8581:"935f2afb",8714:"1be78505",8717:"7af93ffd",8995:"c6694585",9066:"5f72931d",9195:"167e38bb",9267:"a7023ddc",9292:"708a06f3",9591:"4ba7e5a3"}[e]||e)+"."+{30:"d7235f40",264:"fa44bfea",303:"a5c3e7e3",318:"a29595bc",444:"cf4ea8fc",463:"b9284c7b",487:"0d5218fc",489:"ca291d9d",634:"7a31a4c9",708:"e2df6903",821:"63965d2f",989:"1ec7143d",1178:"4a17b02e",1624:"44f53b96",1675:"75c111fe",1736:"8c81bf77",1991:"9d79c29a",2076:"8c237922",2082:"ceb41915",2138:"9a32e74a",2212:"b6e89c6d",2337:"4a57ee09",2363:"d429aa88",2634:"f5db07bb",2645:"efd3f8d5",2663:"fa3e9054",2711:"cb4b7bde",2746:"fd972dcb",2976:"4f9ad648",3089:"af31bb8e",3107:"59452d43",3249:"09b0e9dd",3287:"a176d713",3587:"66d84936",3622:"10860821",3802:"2204ea4d",3824:"c9a40bb1",4093:"dcfbbf90",4151:"b9bea742",4264:"7496333d",4266:"cb153e70",4386:"5e976474",4492:"25ac6f8c",4753:"6a984874",4813:"c5267267",5193:"cd8624b2",5232:"b194732b",5741:"12a31c5f",5894:"6c312be4",5981:"c2bfe08d",6057:"631bebce",6107:"d8d3c4d6",6139:"87fdb6c3",6553:"50483152",6631:"b67b5b40",6644:"93a4b38a",6918:"15b9e967",7041:"90fb44e3",7472:"c07ec749",7643:"0d1f45a8",8048:"54a7c6c1",8070:"64e7869d",8074:"f7c54268",8209:"fff1baab",8256:"1dfe6ad5",8401:"a101c2be",8581:"664788d0",8714:"50559659",8717:"df38a66e",8995:"fbf15775",9066:"36f59a09",9090:"c2a8fc87",9195:"32f3a96b",9267:"ae3de725",9292:"4750b397",9591:"a81dffda"}[e]+".js",r.miniCssF=e=>"assets/css/styles.ec55c1be.css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},c="website:",r.l=(e,a,d,b)=>{if(f[e])f[e].push(a);else{var t,o;if(void 0!==d)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var s=n[i];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==c+d){t=s;break}}t||(o=!0,(t=document.createElement("script")).charset="utf-8",t.timeout=120,r.nc&&t.setAttribute("nonce",r.nc),t.setAttribute("data-webpack",c+d),t.src=e),f[e]=[a];var u=(a,d)=>{t.onerror=t.onload=null,clearTimeout(l);var c=f[e];if(delete f[e],t.parentNode&&t.parentNode.removeChild(t),c&&c.forEach((e=>e(d))),a)return a(d)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"8401","5986bbbc":"30","2700a261":"264",bcd3bfb0:"303",b205135c:"318","55be4921":"444","6081ee74":"463",dc7438fe:"487","415f4636":"634",d1355481:"708","0dffb83e":"821","5dbe55ec":"989","78060cbc":"1178","86f86571":"1624","5b527261":"1675","5de085db":"1736",b2b675dd:"1991",a9cdb420:"2076","25e02a64":"2082","1a4e3797":"2138","667a64de":"2212","82b8edaf":"2337","22f692c8":"2363",c4f5d8e4:"2634","19d568e8":"2645",ae92dbda:"2663","9e4087bc":"2711",bce7c409:"2746",d52b8f97:"2976",d136d620:"3089","33e7285c":"3107",ccc49370:"3249","6222f147":"3287","44b7ef8d":"3587","4d63772d":"3622","9f68de09":"3824","03136cca":"4093","80f133ef":"4151","777ab133":"4264","6410037f":"4266",ebfee794:"4386","9bc9a8f7":"4492","6a8455ba":"4753","6875c492":"4813","57fdb5e0":"5193",de289047:"5232",b2f554cd:"5894",f17f44a5:"5981","5497f083":"6057","5f72c304":"6107",c7d22e29:"6139",d3f86d34:"6553","845acc88":"6631",ad8d4462:"6644","87b2d671":"6918",f3eeb784:"7041","814f3328":"7472",a6aa9e1f:"7643","4f74abd9":"8048","0480b142":"8070",b94bec88:"8074","01a85c17":"8209","1527b239":"8256","935f2afb":"8581","1be78505":"8714","7af93ffd":"8717",c6694585:"8995","5f72931d":"9066","167e38bb":"9195",a7023ddc:"9267","708a06f3":"9292","4ba7e5a3":"9591"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,d)=>{var f=r.o(e,a)?e[a]:void 0;if(0!==f)if(f)d.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var c=new Promise(((d,c)=>f=e[a]=[d,c]));d.push(f[2]=c);var b=r.p+r.u(a),t=new Error;r.l(b,(d=>{if(r.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var c=d&&("load"===d.type?"missing":d.type),b=d&&d.target&&d.target.src;t.message="Loading chunk "+a+" failed.\n("+c+": "+b+")",t.name="ChunkLoadError",t.type=c,t.request=b,f[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,d)=>{var f,c,b=d[0],t=d[1],o=d[2],n=0;if(b.some((a=>0!==e[a]))){for(f in t)r.o(t,f)&&(r.m[f]=t[f]);if(o)var i=o(r)}for(a&&a(d);n<b.length;n++)c=b[n],r.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return r.O(i)},d=self.webpackChunkwebsite=self.webpackChunkwebsite||[];d.forEach(a.bind(null,0)),d.push=a.bind(null,d.push.bind(d))})()})(); \ No newline at end of file diff --git a/blog.html b/blog.html index 4f310a2cb..79fdfdd7b 100644 --- a/blog.html +++ b/blog.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Blog | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="Blog | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" name="description" content="Blog"><meta data-react-helmet="true" property="og:description" content="Blog"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_posts_list"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2024</time> · <!-- -->10 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img alt="Header" src="/assets/images/blog-langgraph-eff5140e985f93f932d5d69baeb86e01.jpeg"></p><header><h1>Introducing the GPT Researcher Multi-Agent Assistant</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents<a aria-hidden="true" class="hash-link" href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" title="Direct link to heading"></a></h3><p>It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”).</p><p>Andrew Ng has <a href="https://www.deeplearning.ai/the-batch/how-agents-can-improve-llm-performance/" target="_blank" rel="noopener noreferrer">recently stated</a>, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.”</p><p>In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph.</p><p>To skip this tutorial, feel free to check out the Github repo of <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introducing-langgraph">Introducing LangGraph<a aria-hidden="true" class="hash-link" href="#introducing-langgraph" title="Direct link to heading"></a></h2><p>LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents.</p><p>LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so.</p><p>Enough with the smalltalk, let’s start building!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-ultimate-autonomous-research-agent">Building the Ultimate Autonomous Research Agent<a aria-hidden="true" class="hash-link" href="#building-the-ultimate-autonomous-research-agent" title="Direct link to heading"></a></h2><p>By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows.</p><p>Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-research-agent-team">The Research Agent Team<a aria-hidden="true" class="hash-link" href="#the-research-agent-team" title="Direct link to heading"></a></h3><p>The research team consists of seven LLM agents:</p><ul><li><strong>Chief Editor</strong> — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface.</li><li><strong>GPT Researcher</strong> — A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> — Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> — Validates the correctness of the research results given a set of criteria.</li><li><strong>Reviser</strong> — Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> — Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> — Responsible for publishing the final report in various formats.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><p>As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication:</p><p><img alt="Architecture" src="/assets/images/architecture-c650467192975ae0999e5b10ea82a958.jpeg"></p><p>More specifically the process is as follows:</p><ul><li><p><strong>Browser (gpt-researcher)</strong> — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic.</p></li><li><p><strong>Editor</strong> — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline.</p></li><li><p>For each outline topic (in parallel):</p><ul><li><strong>Researcher (gpt-researcher)</strong> — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report.</li><li><strong>Reviewer</strong> — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any).</li><li><strong>Reviser</strong> — Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li><p><strong>Writer</strong> — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</p></li><li><p><strong>Publisher</strong> — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</p></li><li><p>We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="define-the-graph-state">Define the Graph State<a aria-hidden="true" class="hash-link" href="#define-the-graph-state" title="Direct link to heading"></a></h2><p>One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction.</p><p>Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sections</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report layout</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> title</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> date</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> table_of_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> introduction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents.</p><p>We can then initialize the graph with the following:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langgraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">graph </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> StateGraph</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">pass</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">parent_query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">parent_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init_research_team</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize skills</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> editor_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> EditorAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> writer_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> WriterAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> publisher_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PublisherAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">output_dir</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a Langchain StateGraph with the ResearchState</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add nodes for each agent</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"planner"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">plan_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"writer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> writer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"publisher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> publisher_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'browser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up start and end nodes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> workflow</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point.</p><p>Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="a-graph-within-a-graph-to-support-stateful-parallelization">A Graph within a Graph to support stateful Parallelization<a aria-hidden="true" class="hash-link" href="#a-graph-within-a-graph-to-support-stateful-parallelization" title="Direct link to heading"></a></h2><p>This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines.</p><p>Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised.</p><p>As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> topic</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> review</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> revision_notes</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_state</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_depth_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviewer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviewer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviser_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up edges researcher->reviewer->reviser->reviewer...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_conditional_edges</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="font-style:italic">lambda</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'review'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">is</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent.</p><p>Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-turbo"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in APA format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in spanish"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report.</p><p>Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx.</p><p>To download and run the example check out the GPT Researcher x LangGraph <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">open source page</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="whats-next">What’s Next?<a aria-hidden="true" class="hash-link" href="#whats-next" title="Direct link to heading"></a></h2><p>Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here.</p><p>In addition, having support for research about both web and local data would be key for many types of business and personal use cases.</p><p>Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline.</p><p>A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings!</p><p>To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/multi-skills">multi-skills</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-11-12T00:00:00.000Z" itemprop="datePublished">November 12, 2023</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>OpenAI has done it again with a <a href="https://openai.com/blog/new-models-and-developer-products-announced-at-devday" target="_blank" rel="noopener noreferrer">groundbreaking DevDay</a> showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new <a href="https://platform.openai.com/docs/assistants/overview" target="_blank" rel="noopener noreferrer">Assistants API</a> that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools.</p><p>The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files.</p><p>This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool.</p><p>To skip the tutorial below, feel free to check out the full <a href="https://gist.github.com/assafelovic/579822cd42d52d80db1e1c1ff82ffffd" target="_blank" rel="noopener noreferrer">Github Gist here</a>.</p><p>At a high level, a typical integration of the Assistants API has the following steps:</p><ul><li>Create an <a href="https://platform.openai.com/docs/api-reference/assistants/createAssistant" target="_blank" rel="noopener noreferrer">Assistant</a> in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.</li><li>Create a <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank" rel="noopener noreferrer">Thread</a> when a user starts a conversation.</li><li>Add <a href="https://platform.openai.com/docs/api-reference/messages" target="_blank" rel="noopener noreferrer">Messages</a> to the Thread as the user ask questions.</li><li><a href="https://platform.openai.com/docs/api-reference/runs" target="_blank" rel="noopener noreferrer">Run</a> the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.</li></ul><p>As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread.</p><p><img alt="OpenAI Assistant Object" src="/assets/images/diagram-assistant-dc2f0898038aeab2cea7be34e9e528ed.jpeg"></p><p>Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">OpenAI Python SDK v1.2</a> and <a href="https://tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a>.</p><p>First things first, let’s define the assistant’s instructions:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Next, let’s finalize step 1 and create an assistant using the latest <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">GPT-4 Turbo model</a> (128K context), and the call function using the <a href="https://tavily.com/" target="_blank" rel="noopener noreferrer">Tavily web search API</a>:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Finally, we’ll run the assistant on the thread to trigger the function call and get the response:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually.</p><p><img alt="Status Diagram" src="/assets/images/diagram-1-6294e919a265f26a37175386003c5074.png"></p><p>To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’):</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call.</p><p>We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> json</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> time</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> tavily </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> TavilyClient</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize clients with API keys</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"OPENAI_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tavily_client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TavilyClient</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"TAVILY_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to perform a Tavily search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_search_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_depth</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"advanced"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> search_result</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to print messages from a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> msg </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">role</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">content</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string-interpolation interpolation number" style="color:rgb(247, 140, 108)">0</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">text</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">value</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> assistant</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Assistant ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">assistant_id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Thread: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">thread</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Ongoing conversation loop</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">lower</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'exit'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">break</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a message</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a run</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Run ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation builtin" style="color:rgb(130, 170, 255)">id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Wait for run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">continue</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Print messages from the thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter.</p><p>Feel free to drop a comment below if you have any further questions!</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/search-api">search-api</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/openai">openai</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/assistant-api">assistant-api</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-09-22T00:00:00.000Z" itemprop="datePublished">September 22, 2023</time> · <!-- -->7 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After <a href="https://github.com/Significant-Gravitas/AutoGPT" target="_blank" rel="noopener noreferrer">AutoGPT</a> was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research.</p><p>But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task.</p><p>Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated.</p><p>The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> — an open source autonomous agent for online comprehensive research.</p><p>In this article, we will share the steps that guided me toward the proposed solution.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="moving-from-infinite-loops-to-deterministic-results">Moving from infinite loops to deterministic results<a aria-hidden="true" class="hash-link" href="#moving-from-infinite-loops-to-deterministic-results" title="Direct link to heading"></a></h3><p>The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference.</p><p>This is when we stumbled upon the recent paper <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan and Solve</a>. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan.</p><p><img alt="Planner-Excutor-Model" src="/assets/images/planner-d1137da59b1f7025e268a44bdcdfb9f2.jpeg"></p><p>As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research.</p><p>Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="aiming-for-objective-and-unbiased-results">Aiming for objective and unbiased results<a aria-hidden="true" class="hash-link" href="#aiming-for-objective-and-unbiased-results" title="Direct link to heading"></a></h3><p>The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias.</p><p>To tackle this challenges, we assumed the following:</p><ul><li>Law of large numbers — More content will lead to less biased results. Especially if gathered properly.</li><li>Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results.</li></ul><p>After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly.</p><p>In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers" target="_blank" rel="noopener noreferrer">law of large numbers</a>. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic.</p><p>Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="speeding-up-the-research-process">Speeding up the research process<a aria-hidden="true" class="hash-link" href="#speeding-up-the-research-process" title="Direct link to heading"></a></h3><p>Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work?</p><p>By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a list to hold the coroutine agent tasks</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tasks </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">async_browse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> url </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> new_search_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Gather the results as they become available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">responses </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">gather</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">tasks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> return_exceptions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="finalizing-the-research-report">Finalizing the research report<a aria-hidden="true" class="hash-link" href="#finalizing-the-research-report" title="Direct link to heading"></a></h3><p>Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it.</p><p>After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task.</p><p>The prompt is as follows:</p><div class="codeBlockContainer_J+bg language-commandline"><div class="codeBlockContent_csEI commandline"><pre tabindex="0" class="prism-code language-commandline codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">"{research_summary}" Using the above information, answer the following question or topic: "{question}" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-final-architecture">The final architecture<a aria-hidden="true" class="hash-link" href="#the-final-architecture" title="Direct link to heading"></a></h3><p>Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below:</p><div align="center"><img align="center" height="500" src="https://cowriter-images.s3.amazonaws.com/architecture.png"></div><p>More specifically:</p><ul><li>Generate an outline of research questions that form an objective opinion on any given task.</li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resource, keep track, filter, and summarize only if it includes relevant information.</li><li>Finally, aggregate all summarized sources and generate a final research report.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="going-forward">Going forward<a aria-hidden="true" class="hash-link" href="#going-forward" title="Direct link to heading"></a></h3><p>The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information.</p><p>Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds.</p><p>It’s all a matter of time and what <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is all about.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/autonomous-agent">autonomous-agent</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/opensource">opensource</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/github">github</a></li></ul></div></footer></article><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/archive.html b/blog/archive.html index ba9bb2567..514c30e5a 100644 --- a/blog/archive.html +++ b/blog/archive.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Archive | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="Archive | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" name="description" content="Archive"><meta data-react-helmet="true" property="og:description" content="Archive"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/archive"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/archive"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/archive" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/archive" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><header class="hero hero--primary"><div class="container"><h1 class="hero__title">Archive</h1><p class="hero__subtitle">Archive</p></div></header><main><section class="margin-vert--lg"><div class="container"><div class="row"><div class="col col--4 margin-vert--lg"><h3>2023</h3><ul><li><a href="/blog/building-openai-assistant">November 12, 2023<!-- --> - <!-- -->How to build an OpenAI Assistant with Internet access</a></li><li><a href="/blog/building-gpt-researcher">September 22, 2023<!-- --> - <!-- -->How we built GPT Researcher</a></li></ul></div><div class="col col--4 margin-vert--lg"><h3>2024</h3><ul><li><a href="/blog/gptr-hybrid">September 7, 2024<!-- --> - <!-- -->The Future of Research is Hybrid</a></li><li><a href="/blog/gptr-langgraph">May 19, 2024<!-- --> - <!-- -->How to Build the Ultimate Research Multi-Agent Assistant</a></li></ul></div></div></div></section></main></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/building-gpt-researcher.html b/blog/building-gpt-researcher.html index f03f1b168..8966dddd4 100644 --- a/blog/building-gpt-researcher.html +++ b/blog/building-gpt-researcher.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">How we built GPT Researcher | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/building-gpt-researcher"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><meta data-react-helmet="true" property="og:title" content="How we built GPT Researcher | GPT Researcher"><meta data-react-helmet="true" name="description" content="After AutoGPT was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research."><meta data-react-helmet="true" property="og:description" content="After AutoGPT was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research."><meta data-react-helmet="true" property="og:type" content="article"><meta data-react-helmet="true" property="article:published_time" content="2023-09-22T00:00:00.000Z"><meta data-react-helmet="true" property="article:author" content="https://github.com/assafelovic"><meta data-react-helmet="true" property="article:tag" content="gpt-researcher,autonomous-agent,opensource,github"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/building-gpt-researcher"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/building-gpt-researcher" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/building-gpt-researcher" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-post-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a aria-current="page" class="sidebarItemLink_zyXk sidebarItemLinkActive_wcJs" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h1 class="blogPostTitle_d4p0" itemprop="headline">How we built GPT Researcher</h1><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-09-22T00:00:00.000Z" itemprop="datePublished">September 22, 2023</time> · <!-- -->7 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After <a href="https://github.com/Significant-Gravitas/AutoGPT" target="_blank" rel="noopener noreferrer">AutoGPT</a> was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research.</p><p>But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task.</p><p>Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated.</p><p>The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> — an open source autonomous agent for online comprehensive research.</p><p>In this article, we will share the steps that guided me toward the proposed solution.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="moving-from-infinite-loops-to-deterministic-results">Moving from infinite loops to deterministic results<a aria-hidden="true" class="hash-link" href="#moving-from-infinite-loops-to-deterministic-results" title="Direct link to heading"></a></h3><p>The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference.</p><p>This is when we stumbled upon the recent paper <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan and Solve</a>. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan.</p><p><img alt="Planner-Excutor-Model" src="/assets/images/planner-d1137da59b1f7025e268a44bdcdfb9f2.jpeg"></p><p>As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research.</p><p>Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="aiming-for-objective-and-unbiased-results">Aiming for objective and unbiased results<a aria-hidden="true" class="hash-link" href="#aiming-for-objective-and-unbiased-results" title="Direct link to heading"></a></h3><p>The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias.</p><p>To tackle this challenges, we assumed the following:</p><ul><li>Law of large numbers — More content will lead to less biased results. Especially if gathered properly.</li><li>Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results.</li></ul><p>After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly.</p><p>In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers" target="_blank" rel="noopener noreferrer">law of large numbers</a>. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic.</p><p>Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="speeding-up-the-research-process">Speeding up the research process<a aria-hidden="true" class="hash-link" href="#speeding-up-the-research-process" title="Direct link to heading"></a></h3><p>Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work?</p><p>By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a list to hold the coroutine agent tasks</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tasks </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">async_browse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> url </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> new_search_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Gather the results as they become available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">responses </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">gather</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">tasks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> return_exceptions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="finalizing-the-research-report">Finalizing the research report<a aria-hidden="true" class="hash-link" href="#finalizing-the-research-report" title="Direct link to heading"></a></h3><p>Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it.</p><p>After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task.</p><p>The prompt is as follows:</p><div class="codeBlockContainer_J+bg language-commandline"><div class="codeBlockContent_csEI commandline"><pre tabindex="0" class="prism-code language-commandline codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">"{research_summary}" Using the above information, answer the following question or topic: "{question}" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-final-architecture">The final architecture<a aria-hidden="true" class="hash-link" href="#the-final-architecture" title="Direct link to heading"></a></h3><p>Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below:</p><div align="center"><img align="center" height="500" src="https://cowriter-images.s3.amazonaws.com/architecture.png"></div><p>More specifically:</p><ul><li>Generate an outline of research questions that form an objective opinion on any given task.</li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resource, keep track, filter, and summarize only if it includes relevant information.</li><li>Finally, aggregate all summarized sources and generate a final research report.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="going-forward">Going forward<a aria-hidden="true" class="hash-link" href="#going-forward" title="Direct link to heading"></a></h3><p>The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information.</p><p>Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds.</p><p>It’s all a matter of time and what <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is all about.</p></div><footer class="row docusaurus-mt-lg blogPostDetailsFull_xD8n"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/autonomous-agent">autonomous-agent</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/opensource">opensource</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/github">github</a></li></ul></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/blog/building-openai-assistant"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">« <!-- -->How to build an OpenAI Assistant with Internet access</div></a></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></main><div class="col col--2"><div class="tableOfContents_vrFS thin-scrollbar"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#moving-from-infinite-loops-to-deterministic-results" class="table-of-contents__link toc-highlight">Moving from infinite loops to deterministic results</a></li><li><a href="#aiming-for-objective-and-unbiased-results" class="table-of-contents__link toc-highlight">Aiming for objective and unbiased results</a></li><li><a href="#speeding-up-the-research-process" class="table-of-contents__link toc-highlight">Speeding up the research process</a></li><li><a href="#finalizing-the-research-report" class="table-of-contents__link toc-highlight">Finalizing the research report</a></li><li><a href="#the-final-architecture" class="table-of-contents__link toc-highlight">The final architecture</a></li><li><a href="#going-forward" class="table-of-contents__link toc-highlight">Going forward</a></li></ul></div></div></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/building-openai-assistant.html b/blog/building-openai-assistant.html index 4b79b8dc0..f9ed9d345 100644 --- a/blog/building-openai-assistant.html +++ b/blog/building-openai-assistant.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">How to build an OpenAI Assistant with Internet access | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/building-openai-assistant"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><meta data-react-helmet="true" property="og:title" content="How to build an OpenAI Assistant with Internet access | GPT Researcher"><meta data-react-helmet="true" name="description" content="OpenAI has done it again with a groundbreaking DevDay showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new Assistants API that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools."><meta data-react-helmet="true" property="og:description" content="OpenAI has done it again with a groundbreaking DevDay showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new Assistants API that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools."><meta data-react-helmet="true" property="og:type" content="article"><meta data-react-helmet="true" property="article:published_time" content="2023-11-12T00:00:00.000Z"><meta data-react-helmet="true" property="article:author" content="https://github.com/assafelovic"><meta data-react-helmet="true" property="article:tag" content="tavily,search-api,openai,assistant-api"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/building-openai-assistant"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/building-openai-assistant" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/building-openai-assistant" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-post-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a aria-current="page" class="sidebarItemLink_zyXk sidebarItemLinkActive_wcJs" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h1 class="blogPostTitle_d4p0" itemprop="headline">How to build an OpenAI Assistant with Internet access</h1><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-11-12T00:00:00.000Z" itemprop="datePublished">November 12, 2023</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>OpenAI has done it again with a <a href="https://openai.com/blog/new-models-and-developer-products-announced-at-devday" target="_blank" rel="noopener noreferrer">groundbreaking DevDay</a> showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new <a href="https://platform.openai.com/docs/assistants/overview" target="_blank" rel="noopener noreferrer">Assistants API</a> that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools.</p><p>The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files.</p><p>This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool.</p><p>To skip the tutorial below, feel free to check out the full <a href="https://gist.github.com/assafelovic/579822cd42d52d80db1e1c1ff82ffffd" target="_blank" rel="noopener noreferrer">Github Gist here</a>.</p><p>At a high level, a typical integration of the Assistants API has the following steps:</p><ul><li>Create an <a href="https://platform.openai.com/docs/api-reference/assistants/createAssistant" target="_blank" rel="noopener noreferrer">Assistant</a> in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.</li><li>Create a <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank" rel="noopener noreferrer">Thread</a> when a user starts a conversation.</li><li>Add <a href="https://platform.openai.com/docs/api-reference/messages" target="_blank" rel="noopener noreferrer">Messages</a> to the Thread as the user ask questions.</li><li><a href="https://platform.openai.com/docs/api-reference/runs" target="_blank" rel="noopener noreferrer">Run</a> the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.</li></ul><p>As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread.</p><p><img alt="OpenAI Assistant Object" src="/assets/images/diagram-assistant-dc2f0898038aeab2cea7be34e9e528ed.jpeg"></p><p>Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">OpenAI Python SDK v1.2</a> and <a href="https://tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a>.</p><p>First things first, let’s define the assistant’s instructions:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Next, let’s finalize step 1 and create an assistant using the latest <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">GPT-4 Turbo model</a> (128K context), and the call function using the <a href="https://tavily.com/" target="_blank" rel="noopener noreferrer">Tavily web search API</a>:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Finally, we’ll run the assistant on the thread to trigger the function call and get the response:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually.</p><p><img alt="Status Diagram" src="/assets/images/diagram-1-6294e919a265f26a37175386003c5074.png"></p><p>To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’):</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call.</p><p>We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> json</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> time</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> tavily </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> TavilyClient</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize clients with API keys</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"OPENAI_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tavily_client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TavilyClient</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"TAVILY_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to perform a Tavily search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_search_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_depth</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"advanced"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> search_result</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to print messages from a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> msg </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">role</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">content</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string-interpolation interpolation number" style="color:rgb(247, 140, 108)">0</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">text</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">value</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> assistant</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Assistant ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">assistant_id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Thread: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">thread</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Ongoing conversation loop</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">lower</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'exit'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">break</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a message</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a run</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Run ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation builtin" style="color:rgb(130, 170, 255)">id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Wait for run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">continue</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Print messages from the thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter.</p><p>Feel free to drop a comment below if you have any further questions!</p></div><footer class="row docusaurus-mt-lg blogPostDetailsFull_xD8n"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/search-api">search-api</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/openai">openai</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/assistant-api">assistant-api</a></li></ul></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/blog/gptr-langgraph"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">« <!-- -->How to Build the Ultimate Research Multi-Agent Assistant</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/blog/building-gpt-researcher"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">How we built GPT Researcher<!-- --> »</div></a></div></nav></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/gptr-hybrid.html b/blog/gptr-hybrid.html index 34fd056cb..11324d3c7 100644 --- a/blog/gptr-hybrid.html +++ b/blog/gptr-hybrid.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">The Future of Research is Hybrid | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/gptr-hybrid"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><meta data-react-helmet="true" property="og:title" content="The Future of Research is Hybrid | GPT Researcher"><meta data-react-helmet="true" name="description" content="Hyrbrid Research with GPT Researcher"><meta data-react-helmet="true" property="og:description" content="Hyrbrid Research with GPT Researcher"><meta data-react-helmet="true" property="og:image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><meta data-react-helmet="true" name="twitter:image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><meta data-react-helmet="true" property="og:type" content="article"><meta data-react-helmet="true" property="article:published_time" content="2024-09-07T00:00:00.000Z"><meta data-react-helmet="true" property="article:author" content="https://github.com/assafelovic"><meta data-react-helmet="true" property="article:tag" content="hybrid-research,gpt-researcher,langchain,langgraph,tavily"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/gptr-hybrid"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/gptr-hybrid" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/gptr-hybrid" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-post-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a aria-current="page" class="sidebarItemLink_zyXk sidebarItemLinkActive_wcJs" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h1 class="blogPostTitle_d4p0" itemprop="headline">The Future of Research is Hybrid</h1><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg blogPostDetailsFull_xD8n"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/blog/gptr-langgraph"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">How to Build the Ultimate Research Multi-Agent Assistant<!-- --> »</div></a></div></nav></main><div class="col col--2"><div class="tableOfContents_vrFS thin-scrollbar"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#why-hybrid-research-works-better" class="table-of-contents__link toc-highlight">Why Hybrid Research Works Better</a></li><li><a href="#building-the-hybrid-research-assistant" class="table-of-contents__link toc-highlight">Building the Hybrid Research Assistant</a><ul><li><a href="#processing-local-documents-with-langchain" class="table-of-contents__link toc-highlight">Processing Local Documents with Langchain</a></li><li><a href="#conducting-web-research-with-gpt-researcher" class="table-of-contents__link toc-highlight">Conducting Web Research with GPT Researcher</a></li><li><a href="#running-the-hybrid-research-with-gpt-researcher" class="table-of-contents__link toc-highlight">Running the Hybrid Research with GPT Researcher</a></li></ul></li><li><a href="#conclusion" class="table-of-contents__link toc-highlight">Conclusion</a></li></ul></div></div></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/gptr-langgraph.html b/blog/gptr-langgraph.html index 479b080a1..e840aae41 100644 --- a/blog/gptr-langgraph.html +++ b/blog/gptr-langgraph.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">How to Build the Ultimate Research Multi-Agent Assistant | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/gptr-langgraph"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><meta data-react-helmet="true" property="og:title" content="How to Build the Ultimate Research Multi-Agent Assistant | GPT Researcher"><meta data-react-helmet="true" name="description" content="Header"><meta data-react-helmet="true" property="og:description" content="Header"><meta data-react-helmet="true" property="og:type" content="article"><meta data-react-helmet="true" property="article:published_time" content="2024-05-19T00:00:00.000Z"><meta data-react-helmet="true" property="article:author" content="https://github.com/assafelovic"><meta data-react-helmet="true" property="article:tag" content="multi-skills,gpt-researcher,langchain,langgraph"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/gptr-langgraph"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/gptr-langgraph" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/gptr-langgraph" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-post-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a aria-current="page" class="sidebarItemLink_zyXk sidebarItemLinkActive_wcJs" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h1 class="blogPostTitle_d4p0" itemprop="headline">How to Build the Ultimate Research Multi-Agent Assistant</h1><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2024</time> · <!-- -->10 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img alt="Header" src="/assets/images/blog-langgraph-eff5140e985f93f932d5d69baeb86e01.jpeg"></p><header><h1>Introducing the GPT Researcher Multi-Agent Assistant</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents<a aria-hidden="true" class="hash-link" href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" title="Direct link to heading"></a></h3><p>It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”).</p><p>Andrew Ng has <a href="https://www.deeplearning.ai/the-batch/how-agents-can-improve-llm-performance/" target="_blank" rel="noopener noreferrer">recently stated</a>, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.”</p><p>In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph.</p><p>To skip this tutorial, feel free to check out the Github repo of <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introducing-langgraph">Introducing LangGraph<a aria-hidden="true" class="hash-link" href="#introducing-langgraph" title="Direct link to heading"></a></h2><p>LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents.</p><p>LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so.</p><p>Enough with the smalltalk, let’s start building!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-ultimate-autonomous-research-agent">Building the Ultimate Autonomous Research Agent<a aria-hidden="true" class="hash-link" href="#building-the-ultimate-autonomous-research-agent" title="Direct link to heading"></a></h2><p>By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows.</p><p>Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-research-agent-team">The Research Agent Team<a aria-hidden="true" class="hash-link" href="#the-research-agent-team" title="Direct link to heading"></a></h3><p>The research team consists of seven LLM agents:</p><ul><li><strong>Chief Editor</strong> — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface.</li><li><strong>GPT Researcher</strong> — A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> — Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> — Validates the correctness of the research results given a set of criteria.</li><li><strong>Reviser</strong> — Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> — Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> — Responsible for publishing the final report in various formats.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><p>As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication:</p><p><img alt="Architecture" src="/assets/images/architecture-c650467192975ae0999e5b10ea82a958.jpeg"></p><p>More specifically the process is as follows:</p><ul><li><p><strong>Browser (gpt-researcher)</strong> — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic.</p></li><li><p><strong>Editor</strong> — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline.</p></li><li><p>For each outline topic (in parallel):</p><ul><li><strong>Researcher (gpt-researcher)</strong> — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report.</li><li><strong>Reviewer</strong> — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any).</li><li><strong>Reviser</strong> — Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li><p><strong>Writer</strong> — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</p></li><li><p><strong>Publisher</strong> — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</p></li><li><p>We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="define-the-graph-state">Define the Graph State<a aria-hidden="true" class="hash-link" href="#define-the-graph-state" title="Direct link to heading"></a></h2><p>One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction.</p><p>Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sections</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report layout</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> title</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> date</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> table_of_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> introduction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents.</p><p>We can then initialize the graph with the following:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langgraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">graph </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> StateGraph</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">pass</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">parent_query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">parent_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init_research_team</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize skills</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> editor_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> EditorAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> writer_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> WriterAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> publisher_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PublisherAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">output_dir</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a Langchain StateGraph with the ResearchState</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add nodes for each agent</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"planner"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">plan_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"writer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> writer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"publisher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> publisher_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'browser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up start and end nodes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> workflow</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point.</p><p>Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="a-graph-within-a-graph-to-support-stateful-parallelization">A Graph within a Graph to support stateful Parallelization<a aria-hidden="true" class="hash-link" href="#a-graph-within-a-graph-to-support-stateful-parallelization" title="Direct link to heading"></a></h2><p>This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines.</p><p>Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised.</p><p>As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> topic</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> review</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> revision_notes</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_state</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_depth_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviewer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviewer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviser_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up edges researcher->reviewer->reviser->reviewer...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_conditional_edges</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="font-style:italic">lambda</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'review'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">is</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent.</p><p>Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-turbo"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in APA format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in spanish"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report.</p><p>Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx.</p><p>To download and run the example check out the GPT Researcher x LangGraph <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">open source page</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="whats-next">What’s Next?<a aria-hidden="true" class="hash-link" href="#whats-next" title="Direct link to heading"></a></h2><p>Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here.</p><p>In addition, having support for research about both web and local data would be key for many types of business and personal use cases.</p><p>Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline.</p><p>A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings!</p><p>To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!</p></div><footer class="row docusaurus-mt-lg blogPostDetailsFull_xD8n"><div class="col"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/multi-skills">multi-skills</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li></ul></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/blog/gptr-hybrid"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">« <!-- -->The Future of Research is Hybrid</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/blog/building-openai-assistant"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">How to build an OpenAI Assistant with Internet access<!-- --> »</div></a></div></nav></main><div class="col col--2"><div class="tableOfContents_vrFS thin-scrollbar"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" class="table-of-contents__link toc-highlight">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents</a></li><li><a href="#introducing-langgraph" class="table-of-contents__link toc-highlight">Introducing LangGraph</a></li><li><a href="#building-the-ultimate-autonomous-research-agent" class="table-of-contents__link toc-highlight">Building the Ultimate Autonomous Research Agent</a><ul><li><a href="#the-research-agent-team" class="table-of-contents__link toc-highlight">The Research Agent Team</a></li><li><a href="#architecture" class="table-of-contents__link toc-highlight">Architecture</a></li></ul></li><li><a href="#define-the-graph-state" class="table-of-contents__link toc-highlight">Define the Graph State</a></li><li><a href="#a-graph-within-a-graph-to-support-stateful-parallelization" class="table-of-contents__link toc-highlight">A Graph within a Graph to support stateful Parallelization</a></li><li><a href="#whats-next" class="table-of-contents__link toc-highlight">What’s Next?</a></li></ul></div></div></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags.html b/blog/tags.html index 3abd80af9..12e04cf80 100644 --- a/blog/tags.html +++ b/blog/tags.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Tags | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="Tags | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_list"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><h1>Tags</h1><section class="margin-vert--lg"><article><h2>A</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/assistant-api">assistant-api<span>1</span></a></li><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/autonomous-agent">autonomous-agent<span>1</span></a></li></ul><hr></article><article><h2>G</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/github">github<span>1</span></a></li><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/gpt-researcher">gpt-researcher<span>3</span></a></li></ul><hr></article><article><h2>H</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/hybrid-research">hybrid-research<span>1</span></a></li></ul><hr></article><article><h2>L</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/langchain">langchain<span>2</span></a></li><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/langgraph">langgraph<span>2</span></a></li></ul><hr></article><article><h2>M</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/multi-skills">multi-skills<span>1</span></a></li></ul><hr></article><article><h2>O</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/openai">openai<span>1</span></a></li><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/opensource">opensource<span>1</span></a></li></ul><hr></article><article><h2>S</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/search-api">search-api<span>1</span></a></li></ul><hr></article><article><h2>T</h2><ul class="padding--none"><li class="tag_7kA+"><a class="tag_WK-t tagWithCount_S5Zl" href="/blog/tags/tavily">tavily<span>2</span></a></li></ul><hr></article></section></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/assistant-api.html b/blog/tags/assistant-api.html index 7032b54bc..ee2d97a50 100644 --- a/blog/tags/assistant-api.html +++ b/blog/tags/assistant-api.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "assistant-api" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "assistant-api" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/assistant-api"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/assistant-api"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/assistant-api" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/assistant-api" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "assistant-api"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-11-12T00:00:00.000Z" itemprop="datePublished">November 12, 2023</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>OpenAI has done it again with a <a href="https://openai.com/blog/new-models-and-developer-products-announced-at-devday" target="_blank" rel="noopener noreferrer">groundbreaking DevDay</a> showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new <a href="https://platform.openai.com/docs/assistants/overview" target="_blank" rel="noopener noreferrer">Assistants API</a> that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools.</p><p>The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files.</p><p>This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool.</p><p>To skip the tutorial below, feel free to check out the full <a href="https://gist.github.com/assafelovic/579822cd42d52d80db1e1c1ff82ffffd" target="_blank" rel="noopener noreferrer">Github Gist here</a>.</p><p>At a high level, a typical integration of the Assistants API has the following steps:</p><ul><li>Create an <a href="https://platform.openai.com/docs/api-reference/assistants/createAssistant" target="_blank" rel="noopener noreferrer">Assistant</a> in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.</li><li>Create a <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank" rel="noopener noreferrer">Thread</a> when a user starts a conversation.</li><li>Add <a href="https://platform.openai.com/docs/api-reference/messages" target="_blank" rel="noopener noreferrer">Messages</a> to the Thread as the user ask questions.</li><li><a href="https://platform.openai.com/docs/api-reference/runs" target="_blank" rel="noopener noreferrer">Run</a> the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.</li></ul><p>As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread.</p><p><img alt="OpenAI Assistant Object" src="/assets/images/diagram-assistant-dc2f0898038aeab2cea7be34e9e528ed.jpeg"></p><p>Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">OpenAI Python SDK v1.2</a> and <a href="https://tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a>.</p><p>First things first, let’s define the assistant’s instructions:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Next, let’s finalize step 1 and create an assistant using the latest <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">GPT-4 Turbo model</a> (128K context), and the call function using the <a href="https://tavily.com/" target="_blank" rel="noopener noreferrer">Tavily web search API</a>:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Finally, we’ll run the assistant on the thread to trigger the function call and get the response:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually.</p><p><img alt="Status Diagram" src="/assets/images/diagram-1-6294e919a265f26a37175386003c5074.png"></p><p>To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’):</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call.</p><p>We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> json</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> time</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> tavily </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> TavilyClient</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize clients with API keys</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"OPENAI_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tavily_client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TavilyClient</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"TAVILY_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to perform a Tavily search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_search_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_depth</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"advanced"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> search_result</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to print messages from a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> msg </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">role</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">content</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string-interpolation interpolation number" style="color:rgb(247, 140, 108)">0</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">text</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">value</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> assistant</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Assistant ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">assistant_id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Thread: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">thread</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Ongoing conversation loop</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">lower</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'exit'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">break</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a message</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a run</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Run ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation builtin" style="color:rgb(130, 170, 255)">id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Wait for run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">continue</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Print messages from the thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter.</p><p>Feel free to drop a comment below if you have any further questions!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/search-api">search-api</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/openai">openai</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/assistant-api">assistant-api</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to build an OpenAI Assistant with Internet access" href="/blog/building-openai-assistant"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/autonomous-agent.html b/blog/tags/autonomous-agent.html index 87d4b5382..3ba34721c 100644 --- a/blog/tags/autonomous-agent.html +++ b/blog/tags/autonomous-agent.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "autonomous-agent" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "autonomous-agent" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/autonomous-agent"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/autonomous-agent"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/autonomous-agent" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/autonomous-agent" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "autonomous-agent"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-09-22T00:00:00.000Z" itemprop="datePublished">September 22, 2023</time> · <!-- -->7 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After <a href="https://github.com/Significant-Gravitas/AutoGPT" target="_blank" rel="noopener noreferrer">AutoGPT</a> was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research.</p><p>But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task.</p><p>Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated.</p><p>The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> — an open source autonomous agent for online comprehensive research.</p><p>In this article, we will share the steps that guided me toward the proposed solution.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="moving-from-infinite-loops-to-deterministic-results">Moving from infinite loops to deterministic results<a aria-hidden="true" class="hash-link" href="#moving-from-infinite-loops-to-deterministic-results" title="Direct link to heading"></a></h3><p>The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference.</p><p>This is when we stumbled upon the recent paper <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan and Solve</a>. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan.</p><p><img alt="Planner-Excutor-Model" src="/assets/images/planner-d1137da59b1f7025e268a44bdcdfb9f2.jpeg"></p><p>As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research.</p><p>Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="aiming-for-objective-and-unbiased-results">Aiming for objective and unbiased results<a aria-hidden="true" class="hash-link" href="#aiming-for-objective-and-unbiased-results" title="Direct link to heading"></a></h3><p>The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias.</p><p>To tackle this challenges, we assumed the following:</p><ul><li>Law of large numbers — More content will lead to less biased results. Especially if gathered properly.</li><li>Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results.</li></ul><p>After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly.</p><p>In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers" target="_blank" rel="noopener noreferrer">law of large numbers</a>. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic.</p><p>Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="speeding-up-the-research-process">Speeding up the research process<a aria-hidden="true" class="hash-link" href="#speeding-up-the-research-process" title="Direct link to heading"></a></h3><p>Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work?</p><p>By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a list to hold the coroutine agent tasks</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tasks </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">async_browse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> url </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> new_search_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Gather the results as they become available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">responses </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">gather</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">tasks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> return_exceptions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="finalizing-the-research-report">Finalizing the research report<a aria-hidden="true" class="hash-link" href="#finalizing-the-research-report" title="Direct link to heading"></a></h3><p>Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it.</p><p>After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task.</p><p>The prompt is as follows:</p><div class="codeBlockContainer_J+bg language-commandline"><div class="codeBlockContent_csEI commandline"><pre tabindex="0" class="prism-code language-commandline codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">"{research_summary}" Using the above information, answer the following question or topic: "{question}" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-final-architecture">The final architecture<a aria-hidden="true" class="hash-link" href="#the-final-architecture" title="Direct link to heading"></a></h3><p>Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below:</p><div align="center"><img align="center" height="500" src="https://cowriter-images.s3.amazonaws.com/architecture.png"></div><p>More specifically:</p><ul><li>Generate an outline of research questions that form an objective opinion on any given task.</li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resource, keep track, filter, and summarize only if it includes relevant information.</li><li>Finally, aggregate all summarized sources and generate a final research report.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="going-forward">Going forward<a aria-hidden="true" class="hash-link" href="#going-forward" title="Direct link to heading"></a></h3><p>The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information.</p><p>Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds.</p><p>It’s all a matter of time and what <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is all about.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/autonomous-agent">autonomous-agent</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/opensource">opensource</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/github">github</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How we built GPT Researcher" href="/blog/building-gpt-researcher"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/github.html b/blog/tags/github.html index c2a60e107..92ffe7689 100644 --- a/blog/tags/github.html +++ b/blog/tags/github.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "github" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "github" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/github"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/github"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/github" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/github" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "github"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-09-22T00:00:00.000Z" itemprop="datePublished">September 22, 2023</time> · <!-- -->7 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After <a href="https://github.com/Significant-Gravitas/AutoGPT" target="_blank" rel="noopener noreferrer">AutoGPT</a> was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research.</p><p>But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task.</p><p>Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated.</p><p>The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> — an open source autonomous agent for online comprehensive research.</p><p>In this article, we will share the steps that guided me toward the proposed solution.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="moving-from-infinite-loops-to-deterministic-results">Moving from infinite loops to deterministic results<a aria-hidden="true" class="hash-link" href="#moving-from-infinite-loops-to-deterministic-results" title="Direct link to heading"></a></h3><p>The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference.</p><p>This is when we stumbled upon the recent paper <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan and Solve</a>. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan.</p><p><img alt="Planner-Excutor-Model" src="/assets/images/planner-d1137da59b1f7025e268a44bdcdfb9f2.jpeg"></p><p>As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research.</p><p>Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="aiming-for-objective-and-unbiased-results">Aiming for objective and unbiased results<a aria-hidden="true" class="hash-link" href="#aiming-for-objective-and-unbiased-results" title="Direct link to heading"></a></h3><p>The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias.</p><p>To tackle this challenges, we assumed the following:</p><ul><li>Law of large numbers — More content will lead to less biased results. Especially if gathered properly.</li><li>Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results.</li></ul><p>After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly.</p><p>In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers" target="_blank" rel="noopener noreferrer">law of large numbers</a>. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic.</p><p>Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="speeding-up-the-research-process">Speeding up the research process<a aria-hidden="true" class="hash-link" href="#speeding-up-the-research-process" title="Direct link to heading"></a></h3><p>Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work?</p><p>By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a list to hold the coroutine agent tasks</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tasks </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">async_browse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> url </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> new_search_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Gather the results as they become available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">responses </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">gather</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">tasks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> return_exceptions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="finalizing-the-research-report">Finalizing the research report<a aria-hidden="true" class="hash-link" href="#finalizing-the-research-report" title="Direct link to heading"></a></h3><p>Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it.</p><p>After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task.</p><p>The prompt is as follows:</p><div class="codeBlockContainer_J+bg language-commandline"><div class="codeBlockContent_csEI commandline"><pre tabindex="0" class="prism-code language-commandline codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">"{research_summary}" Using the above information, answer the following question or topic: "{question}" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-final-architecture">The final architecture<a aria-hidden="true" class="hash-link" href="#the-final-architecture" title="Direct link to heading"></a></h3><p>Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below:</p><div align="center"><img align="center" height="500" src="https://cowriter-images.s3.amazonaws.com/architecture.png"></div><p>More specifically:</p><ul><li>Generate an outline of research questions that form an objective opinion on any given task.</li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resource, keep track, filter, and summarize only if it includes relevant information.</li><li>Finally, aggregate all summarized sources and generate a final research report.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="going-forward">Going forward<a aria-hidden="true" class="hash-link" href="#going-forward" title="Direct link to heading"></a></h3><p>The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information.</p><p>Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds.</p><p>It’s all a matter of time and what <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is all about.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/autonomous-agent">autonomous-agent</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/opensource">opensource</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/github">github</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How we built GPT Researcher" href="/blog/building-gpt-researcher"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/gpt-researcher.html b/blog/tags/gpt-researcher.html index d56edf05f..27c05eb20 100644 --- a/blog/tags/gpt-researcher.html +++ b/blog/tags/gpt-researcher.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">3 posts tagged with "gpt-researcher" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="3 posts tagged with "gpt-researcher" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/gpt-researcher"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/gpt-researcher"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/gpt-researcher" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/gpt-researcher" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>3 posts tagged with "gpt-researcher"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about The Future of Research is Hybrid" href="/blog/gptr-hybrid"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2024</time> · <!-- -->10 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img alt="Header" src="/assets/images/blog-langgraph-eff5140e985f93f932d5d69baeb86e01.jpeg"></p><header><h1>Introducing the GPT Researcher Multi-Agent Assistant</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents<a aria-hidden="true" class="hash-link" href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" title="Direct link to heading"></a></h3><p>It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”).</p><p>Andrew Ng has <a href="https://www.deeplearning.ai/the-batch/how-agents-can-improve-llm-performance/" target="_blank" rel="noopener noreferrer">recently stated</a>, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.”</p><p>In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph.</p><p>To skip this tutorial, feel free to check out the Github repo of <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introducing-langgraph">Introducing LangGraph<a aria-hidden="true" class="hash-link" href="#introducing-langgraph" title="Direct link to heading"></a></h2><p>LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents.</p><p>LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so.</p><p>Enough with the smalltalk, let’s start building!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-ultimate-autonomous-research-agent">Building the Ultimate Autonomous Research Agent<a aria-hidden="true" class="hash-link" href="#building-the-ultimate-autonomous-research-agent" title="Direct link to heading"></a></h2><p>By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows.</p><p>Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-research-agent-team">The Research Agent Team<a aria-hidden="true" class="hash-link" href="#the-research-agent-team" title="Direct link to heading"></a></h3><p>The research team consists of seven LLM agents:</p><ul><li><strong>Chief Editor</strong> — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface.</li><li><strong>GPT Researcher</strong> — A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> — Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> — Validates the correctness of the research results given a set of criteria.</li><li><strong>Reviser</strong> — Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> — Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> — Responsible for publishing the final report in various formats.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><p>As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication:</p><p><img alt="Architecture" src="/assets/images/architecture-c650467192975ae0999e5b10ea82a958.jpeg"></p><p>More specifically the process is as follows:</p><ul><li><p><strong>Browser (gpt-researcher)</strong> — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic.</p></li><li><p><strong>Editor</strong> — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline.</p></li><li><p>For each outline topic (in parallel):</p><ul><li><strong>Researcher (gpt-researcher)</strong> — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report.</li><li><strong>Reviewer</strong> — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any).</li><li><strong>Reviser</strong> — Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li><p><strong>Writer</strong> — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</p></li><li><p><strong>Publisher</strong> — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</p></li><li><p>We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="define-the-graph-state">Define the Graph State<a aria-hidden="true" class="hash-link" href="#define-the-graph-state" title="Direct link to heading"></a></h2><p>One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction.</p><p>Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sections</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report layout</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> title</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> date</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> table_of_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> introduction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents.</p><p>We can then initialize the graph with the following:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langgraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">graph </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> StateGraph</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">pass</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">parent_query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">parent_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init_research_team</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize skills</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> editor_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> EditorAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> writer_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> WriterAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> publisher_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PublisherAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">output_dir</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a Langchain StateGraph with the ResearchState</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add nodes for each agent</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"planner"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">plan_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"writer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> writer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"publisher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> publisher_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'browser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up start and end nodes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> workflow</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point.</p><p>Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="a-graph-within-a-graph-to-support-stateful-parallelization">A Graph within a Graph to support stateful Parallelization<a aria-hidden="true" class="hash-link" href="#a-graph-within-a-graph-to-support-stateful-parallelization" title="Direct link to heading"></a></h2><p>This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines.</p><p>Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised.</p><p>As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> topic</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> review</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> revision_notes</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_state</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_depth_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviewer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviewer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviser_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up edges researcher->reviewer->reviser->reviewer...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_conditional_edges</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="font-style:italic">lambda</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'review'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">is</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent.</p><p>Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-turbo"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in APA format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in spanish"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report.</p><p>Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx.</p><p>To download and run the example check out the GPT Researcher x LangGraph <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">open source page</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="whats-next">What’s Next?<a aria-hidden="true" class="hash-link" href="#whats-next" title="Direct link to heading"></a></h2><p>Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here.</p><p>In addition, having support for research about both web and local data would be key for many types of business and personal use cases.</p><p>Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline.</p><p>A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings!</p><p>To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/multi-skills">multi-skills</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to Build the Ultimate Research Multi-Agent Assistant" href="/blog/gptr-langgraph"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-09-22T00:00:00.000Z" itemprop="datePublished">September 22, 2023</time> · <!-- -->7 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After <a href="https://github.com/Significant-Gravitas/AutoGPT" target="_blank" rel="noopener noreferrer">AutoGPT</a> was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research.</p><p>But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task.</p><p>Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated.</p><p>The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> — an open source autonomous agent for online comprehensive research.</p><p>In this article, we will share the steps that guided me toward the proposed solution.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="moving-from-infinite-loops-to-deterministic-results">Moving from infinite loops to deterministic results<a aria-hidden="true" class="hash-link" href="#moving-from-infinite-loops-to-deterministic-results" title="Direct link to heading"></a></h3><p>The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference.</p><p>This is when we stumbled upon the recent paper <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan and Solve</a>. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan.</p><p><img alt="Planner-Excutor-Model" src="/assets/images/planner-d1137da59b1f7025e268a44bdcdfb9f2.jpeg"></p><p>As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research.</p><p>Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="aiming-for-objective-and-unbiased-results">Aiming for objective and unbiased results<a aria-hidden="true" class="hash-link" href="#aiming-for-objective-and-unbiased-results" title="Direct link to heading"></a></h3><p>The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias.</p><p>To tackle this challenges, we assumed the following:</p><ul><li>Law of large numbers — More content will lead to less biased results. Especially if gathered properly.</li><li>Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results.</li></ul><p>After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly.</p><p>In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers" target="_blank" rel="noopener noreferrer">law of large numbers</a>. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic.</p><p>Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="speeding-up-the-research-process">Speeding up the research process<a aria-hidden="true" class="hash-link" href="#speeding-up-the-research-process" title="Direct link to heading"></a></h3><p>Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work?</p><p>By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a list to hold the coroutine agent tasks</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tasks </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">async_browse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> url </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> new_search_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Gather the results as they become available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">responses </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">gather</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">tasks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> return_exceptions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="finalizing-the-research-report">Finalizing the research report<a aria-hidden="true" class="hash-link" href="#finalizing-the-research-report" title="Direct link to heading"></a></h3><p>Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it.</p><p>After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task.</p><p>The prompt is as follows:</p><div class="codeBlockContainer_J+bg language-commandline"><div class="codeBlockContent_csEI commandline"><pre tabindex="0" class="prism-code language-commandline codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">"{research_summary}" Using the above information, answer the following question or topic: "{question}" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-final-architecture">The final architecture<a aria-hidden="true" class="hash-link" href="#the-final-architecture" title="Direct link to heading"></a></h3><p>Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below:</p><div align="center"><img align="center" height="500" src="https://cowriter-images.s3.amazonaws.com/architecture.png"></div><p>More specifically:</p><ul><li>Generate an outline of research questions that form an objective opinion on any given task.</li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resource, keep track, filter, and summarize only if it includes relevant information.</li><li>Finally, aggregate all summarized sources and generate a final research report.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="going-forward">Going forward<a aria-hidden="true" class="hash-link" href="#going-forward" title="Direct link to heading"></a></h3><p>The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information.</p><p>Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds.</p><p>It’s all a matter of time and what <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is all about.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/autonomous-agent">autonomous-agent</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/opensource">opensource</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/github">github</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How we built GPT Researcher" href="/blog/building-gpt-researcher"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/hybrid-research.html b/blog/tags/hybrid-research.html index 086d64e9e..7032ed1bd 100644 --- a/blog/tags/hybrid-research.html +++ b/blog/tags/hybrid-research.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "hybrid-research" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "hybrid-research" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/hybrid-research"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/hybrid-research"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/hybrid-research" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/hybrid-research" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "hybrid-research"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about The Future of Research is Hybrid" href="/blog/gptr-hybrid"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/langchain.html b/blog/tags/langchain.html index e09acc57c..afd2a6c12 100644 --- a/blog/tags/langchain.html +++ b/blog/tags/langchain.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">2 posts tagged with "langchain" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="2 posts tagged with "langchain" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/langchain"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/langchain"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/langchain" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/langchain" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>2 posts tagged with "langchain"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about The Future of Research is Hybrid" href="/blog/gptr-hybrid"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2024</time> · <!-- -->10 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img alt="Header" src="/assets/images/blog-langgraph-eff5140e985f93f932d5d69baeb86e01.jpeg"></p><header><h1>Introducing the GPT Researcher Multi-Agent Assistant</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents<a aria-hidden="true" class="hash-link" href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" title="Direct link to heading"></a></h3><p>It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”).</p><p>Andrew Ng has <a href="https://www.deeplearning.ai/the-batch/how-agents-can-improve-llm-performance/" target="_blank" rel="noopener noreferrer">recently stated</a>, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.”</p><p>In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph.</p><p>To skip this tutorial, feel free to check out the Github repo of <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introducing-langgraph">Introducing LangGraph<a aria-hidden="true" class="hash-link" href="#introducing-langgraph" title="Direct link to heading"></a></h2><p>LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents.</p><p>LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so.</p><p>Enough with the smalltalk, let’s start building!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-ultimate-autonomous-research-agent">Building the Ultimate Autonomous Research Agent<a aria-hidden="true" class="hash-link" href="#building-the-ultimate-autonomous-research-agent" title="Direct link to heading"></a></h2><p>By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows.</p><p>Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-research-agent-team">The Research Agent Team<a aria-hidden="true" class="hash-link" href="#the-research-agent-team" title="Direct link to heading"></a></h3><p>The research team consists of seven LLM agents:</p><ul><li><strong>Chief Editor</strong> — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface.</li><li><strong>GPT Researcher</strong> — A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> — Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> — Validates the correctness of the research results given a set of criteria.</li><li><strong>Reviser</strong> — Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> — Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> — Responsible for publishing the final report in various formats.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><p>As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication:</p><p><img alt="Architecture" src="/assets/images/architecture-c650467192975ae0999e5b10ea82a958.jpeg"></p><p>More specifically the process is as follows:</p><ul><li><p><strong>Browser (gpt-researcher)</strong> — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic.</p></li><li><p><strong>Editor</strong> — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline.</p></li><li><p>For each outline topic (in parallel):</p><ul><li><strong>Researcher (gpt-researcher)</strong> — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report.</li><li><strong>Reviewer</strong> — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any).</li><li><strong>Reviser</strong> — Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li><p><strong>Writer</strong> — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</p></li><li><p><strong>Publisher</strong> — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</p></li><li><p>We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="define-the-graph-state">Define the Graph State<a aria-hidden="true" class="hash-link" href="#define-the-graph-state" title="Direct link to heading"></a></h2><p>One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction.</p><p>Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sections</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report layout</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> title</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> date</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> table_of_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> introduction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents.</p><p>We can then initialize the graph with the following:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langgraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">graph </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> StateGraph</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">pass</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">parent_query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">parent_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init_research_team</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize skills</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> editor_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> EditorAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> writer_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> WriterAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> publisher_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PublisherAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">output_dir</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a Langchain StateGraph with the ResearchState</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add nodes for each agent</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"planner"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">plan_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"writer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> writer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"publisher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> publisher_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'browser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up start and end nodes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> workflow</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point.</p><p>Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="a-graph-within-a-graph-to-support-stateful-parallelization">A Graph within a Graph to support stateful Parallelization<a aria-hidden="true" class="hash-link" href="#a-graph-within-a-graph-to-support-stateful-parallelization" title="Direct link to heading"></a></h2><p>This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines.</p><p>Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised.</p><p>As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> topic</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> review</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> revision_notes</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_state</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_depth_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviewer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviewer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviser_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up edges researcher->reviewer->reviser->reviewer...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_conditional_edges</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="font-style:italic">lambda</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'review'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">is</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent.</p><p>Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-turbo"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in APA format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in spanish"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report.</p><p>Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx.</p><p>To download and run the example check out the GPT Researcher x LangGraph <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">open source page</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="whats-next">What’s Next?<a aria-hidden="true" class="hash-link" href="#whats-next" title="Direct link to heading"></a></h2><p>Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here.</p><p>In addition, having support for research about both web and local data would be key for many types of business and personal use cases.</p><p>Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline.</p><p>A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings!</p><p>To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/multi-skills">multi-skills</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to Build the Ultimate Research Multi-Agent Assistant" href="/blog/gptr-langgraph"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/langgraph.html b/blog/tags/langgraph.html index 38c6b7545..04989ba94 100644 --- a/blog/tags/langgraph.html +++ b/blog/tags/langgraph.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">2 posts tagged with "langgraph" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="2 posts tagged with "langgraph" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/langgraph"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/langgraph"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/langgraph" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/langgraph" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>2 posts tagged with "langgraph"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about The Future of Research is Hybrid" href="/blog/gptr-hybrid"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2024</time> · <!-- -->10 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img alt="Header" src="/assets/images/blog-langgraph-eff5140e985f93f932d5d69baeb86e01.jpeg"></p><header><h1>Introducing the GPT Researcher Multi-Agent Assistant</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents<a aria-hidden="true" class="hash-link" href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" title="Direct link to heading"></a></h3><p>It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”).</p><p>Andrew Ng has <a href="https://www.deeplearning.ai/the-batch/how-agents-can-improve-llm-performance/" target="_blank" rel="noopener noreferrer">recently stated</a>, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.”</p><p>In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph.</p><p>To skip this tutorial, feel free to check out the Github repo of <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introducing-langgraph">Introducing LangGraph<a aria-hidden="true" class="hash-link" href="#introducing-langgraph" title="Direct link to heading"></a></h2><p>LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents.</p><p>LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so.</p><p>Enough with the smalltalk, let’s start building!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-ultimate-autonomous-research-agent">Building the Ultimate Autonomous Research Agent<a aria-hidden="true" class="hash-link" href="#building-the-ultimate-autonomous-research-agent" title="Direct link to heading"></a></h2><p>By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows.</p><p>Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-research-agent-team">The Research Agent Team<a aria-hidden="true" class="hash-link" href="#the-research-agent-team" title="Direct link to heading"></a></h3><p>The research team consists of seven LLM agents:</p><ul><li><strong>Chief Editor</strong> — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface.</li><li><strong>GPT Researcher</strong> — A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> — Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> — Validates the correctness of the research results given a set of criteria.</li><li><strong>Reviser</strong> — Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> — Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> — Responsible for publishing the final report in various formats.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><p>As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication:</p><p><img alt="Architecture" src="/assets/images/architecture-c650467192975ae0999e5b10ea82a958.jpeg"></p><p>More specifically the process is as follows:</p><ul><li><p><strong>Browser (gpt-researcher)</strong> — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic.</p></li><li><p><strong>Editor</strong> — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline.</p></li><li><p>For each outline topic (in parallel):</p><ul><li><strong>Researcher (gpt-researcher)</strong> — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report.</li><li><strong>Reviewer</strong> — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any).</li><li><strong>Reviser</strong> — Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li><p><strong>Writer</strong> — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</p></li><li><p><strong>Publisher</strong> — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</p></li><li><p>We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="define-the-graph-state">Define the Graph State<a aria-hidden="true" class="hash-link" href="#define-the-graph-state" title="Direct link to heading"></a></h2><p>One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction.</p><p>Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sections</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report layout</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> title</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> date</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> table_of_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> introduction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents.</p><p>We can then initialize the graph with the following:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langgraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">graph </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> StateGraph</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">pass</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">parent_query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">parent_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init_research_team</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize skills</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> editor_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> EditorAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> writer_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> WriterAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> publisher_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PublisherAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">output_dir</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a Langchain StateGraph with the ResearchState</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add nodes for each agent</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"planner"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">plan_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"writer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> writer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"publisher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> publisher_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'browser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up start and end nodes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> workflow</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point.</p><p>Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="a-graph-within-a-graph-to-support-stateful-parallelization">A Graph within a Graph to support stateful Parallelization<a aria-hidden="true" class="hash-link" href="#a-graph-within-a-graph-to-support-stateful-parallelization" title="Direct link to heading"></a></h2><p>This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines.</p><p>Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised.</p><p>As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> topic</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> review</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> revision_notes</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_state</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_depth_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviewer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviewer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviser_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up edges researcher->reviewer->reviser->reviewer...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_conditional_edges</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="font-style:italic">lambda</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'review'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">is</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent.</p><p>Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-turbo"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in APA format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in spanish"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report.</p><p>Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx.</p><p>To download and run the example check out the GPT Researcher x LangGraph <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">open source page</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="whats-next">What’s Next?<a aria-hidden="true" class="hash-link" href="#whats-next" title="Direct link to heading"></a></h2><p>Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here.</p><p>In addition, having support for research about both web and local data would be key for many types of business and personal use cases.</p><p>Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline.</p><p>A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings!</p><p>To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/multi-skills">multi-skills</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to Build the Ultimate Research Multi-Agent Assistant" href="/blog/gptr-langgraph"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/multi-skills.html b/blog/tags/multi-skills.html index dfa26c69d..b0a1e111d 100644 --- a/blog/tags/multi-skills.html +++ b/blog/tags/multi-skills.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "multi-skills" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "multi-skills" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/multi-skills"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/multi-skills"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/multi-skills" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/multi-skills" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "multi-skills"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-05-19T00:00:00.000Z" itemprop="datePublished">May 19, 2024</time> · <!-- -->10 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p><img alt="Header" src="/assets/images/blog-langgraph-eff5140e985f93f932d5d69baeb86e01.jpeg"></p><header><h1>Introducing the GPT Researcher Multi-Agent Assistant</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents">Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents<a aria-hidden="true" class="hash-link" href="#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents" title="Direct link to heading"></a></h3><p>It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”).</p><p>Andrew Ng has <a href="https://www.deeplearning.ai/the-batch/how-agents-can-improve-llm-performance/" target="_blank" rel="noopener noreferrer">recently stated</a>, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.”</p><p>In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph.</p><p>To skip this tutorial, feel free to check out the Github repo of <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introducing-langgraph">Introducing LangGraph<a aria-hidden="true" class="hash-link" href="#introducing-langgraph" title="Direct link to heading"></a></h2><p>LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents.</p><p>LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so.</p><p>Enough with the smalltalk, let’s start building!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-ultimate-autonomous-research-agent">Building the Ultimate Autonomous Research Agent<a aria-hidden="true" class="hash-link" href="#building-the-ultimate-autonomous-research-agent" title="Direct link to heading"></a></h2><p>By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows.</p><p>Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-research-agent-team">The Research Agent Team<a aria-hidden="true" class="hash-link" href="#the-research-agent-team" title="Direct link to heading"></a></h3><p>The research team consists of seven LLM agents:</p><ul><li><strong>Chief Editor</strong> — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface.</li><li><strong>GPT Researcher</strong> — A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> — Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> — Validates the correctness of the research results given a set of criteria.</li><li><strong>Reviser</strong> — Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> — Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> — Responsible for publishing the final report in various formats.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><p>As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication:</p><p><img alt="Architecture" src="/assets/images/architecture-c650467192975ae0999e5b10ea82a958.jpeg"></p><p>More specifically the process is as follows:</p><ul><li><p><strong>Browser (gpt-researcher)</strong> — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic.</p></li><li><p><strong>Editor</strong> — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline.</p></li><li><p>For each outline topic (in parallel):</p><ul><li><strong>Researcher (gpt-researcher)</strong> — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report.</li><li><strong>Reviewer</strong> — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any).</li><li><strong>Reviser</strong> — Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li><p><strong>Writer</strong> — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</p></li><li><p><strong>Publisher</strong> — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</p></li><li><p>We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.</p></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="define-the-graph-state">Define the Graph State<a aria-hidden="true" class="hash-link" href="#define-the-graph-state" title="Direct link to heading"></a></h2><p>One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction.</p><p>Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sections</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report layout</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> title</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> date</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> table_of_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> introduction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents.</p><p>We can then initialize the graph with the following:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langgraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">graph </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> StateGraph</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">pass</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">parent_query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">parent_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init_research_team</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize skills</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> editor_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> EditorAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> writer_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> WriterAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> publisher_agent </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PublisherAgent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">output_dir</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a Langchain StateGraph with the ResearchState</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ResearchState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add nodes for each agent</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_initial_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"planner"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">plan_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> editor_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"writer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> writer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"publisher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> publisher_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'browser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'planner'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'writer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up start and end nodes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"browser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'publisher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> workflow</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point.</p><p>Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="a-graph-within-a-graph-to-support-stateful-parallelization">A Graph within a Graph to support stateful Parallelization<a aria-hidden="true" class="hash-link" href="#a-graph-within-a-graph-to-support-stateful-parallelization" title="Direct link to heading"></a></h2><p>This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines.</p><p>Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised.</p><p>As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">TypedDict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> task</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> topic</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> review</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> revision_notes</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run_parallel_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_state</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> StateGraph</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">DraftState</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run_depth_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviewer"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviewer_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_node</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> reviser_agent</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set up edges researcher->reviewer->reviser->reviewer...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_entry_point</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"researcher"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'researcher'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_edge</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviser'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> workflow</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_conditional_edges</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'reviewer'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token keyword" style="font-style:italic">lambda</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> draft</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'review'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">is</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"accept"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> END</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"revise"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"reviser"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent.</p><p>Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-turbo"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in APA format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in spanish"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report.</p><p>Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx.</p><p>To download and run the example check out the GPT Researcher x LangGraph <a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">open source page</a>.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="whats-next">What’s Next?<a aria-hidden="true" class="hash-link" href="#whats-next" title="Direct link to heading"></a></h2><p>Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here.</p><p>In addition, having support for research about both web and local data would be key for many types of business and personal use cases.</p><p>Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline.</p><p>A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings!</p><p>To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/multi-skills">multi-skills</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to Build the Ultimate Research Multi-Agent Assistant" href="/blog/gptr-langgraph"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/openai.html b/blog/tags/openai.html index 35f887f84..2688fe8a4 100644 --- a/blog/tags/openai.html +++ b/blog/tags/openai.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "openai" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "openai" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/openai"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/openai"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/openai" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/openai" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "openai"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-11-12T00:00:00.000Z" itemprop="datePublished">November 12, 2023</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>OpenAI has done it again with a <a href="https://openai.com/blog/new-models-and-developer-products-announced-at-devday" target="_blank" rel="noopener noreferrer">groundbreaking DevDay</a> showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new <a href="https://platform.openai.com/docs/assistants/overview" target="_blank" rel="noopener noreferrer">Assistants API</a> that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools.</p><p>The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files.</p><p>This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool.</p><p>To skip the tutorial below, feel free to check out the full <a href="https://gist.github.com/assafelovic/579822cd42d52d80db1e1c1ff82ffffd" target="_blank" rel="noopener noreferrer">Github Gist here</a>.</p><p>At a high level, a typical integration of the Assistants API has the following steps:</p><ul><li>Create an <a href="https://platform.openai.com/docs/api-reference/assistants/createAssistant" target="_blank" rel="noopener noreferrer">Assistant</a> in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.</li><li>Create a <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank" rel="noopener noreferrer">Thread</a> when a user starts a conversation.</li><li>Add <a href="https://platform.openai.com/docs/api-reference/messages" target="_blank" rel="noopener noreferrer">Messages</a> to the Thread as the user ask questions.</li><li><a href="https://platform.openai.com/docs/api-reference/runs" target="_blank" rel="noopener noreferrer">Run</a> the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.</li></ul><p>As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread.</p><p><img alt="OpenAI Assistant Object" src="/assets/images/diagram-assistant-dc2f0898038aeab2cea7be34e9e528ed.jpeg"></p><p>Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">OpenAI Python SDK v1.2</a> and <a href="https://tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a>.</p><p>First things first, let’s define the assistant’s instructions:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Next, let’s finalize step 1 and create an assistant using the latest <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">GPT-4 Turbo model</a> (128K context), and the call function using the <a href="https://tavily.com/" target="_blank" rel="noopener noreferrer">Tavily web search API</a>:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Finally, we’ll run the assistant on the thread to trigger the function call and get the response:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually.</p><p><img alt="Status Diagram" src="/assets/images/diagram-1-6294e919a265f26a37175386003c5074.png"></p><p>To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’):</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call.</p><p>We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> json</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> time</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> tavily </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> TavilyClient</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize clients with API keys</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"OPENAI_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tavily_client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TavilyClient</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"TAVILY_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to perform a Tavily search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_search_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_depth</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"advanced"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> search_result</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to print messages from a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> msg </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">role</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">content</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string-interpolation interpolation number" style="color:rgb(247, 140, 108)">0</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">text</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">value</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> assistant</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Assistant ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">assistant_id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Thread: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">thread</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Ongoing conversation loop</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">lower</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'exit'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">break</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a message</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a run</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Run ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation builtin" style="color:rgb(130, 170, 255)">id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Wait for run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">continue</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Print messages from the thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter.</p><p>Feel free to drop a comment below if you have any further questions!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/search-api">search-api</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/openai">openai</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/assistant-api">assistant-api</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to build an OpenAI Assistant with Internet access" href="/blog/building-openai-assistant"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/opensource.html b/blog/tags/opensource.html index 22f64dc05..08ff693cc 100644 --- a/blog/tags/opensource.html +++ b/blog/tags/opensource.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "opensource" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "opensource" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/opensource"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/opensource"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/opensource" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/opensource" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "opensource"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-09-22T00:00:00.000Z" itemprop="datePublished">September 22, 2023</time> · <!-- -->7 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After <a href="https://github.com/Significant-Gravitas/AutoGPT" target="_blank" rel="noopener noreferrer">AutoGPT</a> was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research.</p><p>But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task.</p><p>Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated.</p><p>The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> — an open source autonomous agent for online comprehensive research.</p><p>In this article, we will share the steps that guided me toward the proposed solution.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="moving-from-infinite-loops-to-deterministic-results">Moving from infinite loops to deterministic results<a aria-hidden="true" class="hash-link" href="#moving-from-infinite-loops-to-deterministic-results" title="Direct link to heading"></a></h3><p>The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference.</p><p>This is when we stumbled upon the recent paper <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan and Solve</a>. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan.</p><p><img alt="Planner-Excutor-Model" src="/assets/images/planner-d1137da59b1f7025e268a44bdcdfb9f2.jpeg"></p><p>As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research.</p><p>Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="aiming-for-objective-and-unbiased-results">Aiming for objective and unbiased results<a aria-hidden="true" class="hash-link" href="#aiming-for-objective-and-unbiased-results" title="Direct link to heading"></a></h3><p>The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias.</p><p>To tackle this challenges, we assumed the following:</p><ul><li>Law of large numbers — More content will lead to less biased results. Especially if gathered properly.</li><li>Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results.</li></ul><p>After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly.</p><p>In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers" target="_blank" rel="noopener noreferrer">law of large numbers</a>. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic.</p><p>Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="speeding-up-the-research-process">Speeding up the research process<a aria-hidden="true" class="hash-link" href="#speeding-up-the-research-process" title="Direct link to heading"></a></h3><p>Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work?</p><p>By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a list to hold the coroutine agent tasks</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tasks </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">async_browse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> url </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> new_search_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Gather the results as they become available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">responses </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">gather</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">tasks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> return_exceptions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="finalizing-the-research-report">Finalizing the research report<a aria-hidden="true" class="hash-link" href="#finalizing-the-research-report" title="Direct link to heading"></a></h3><p>Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it.</p><p>After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task.</p><p>The prompt is as follows:</p><div class="codeBlockContainer_J+bg language-commandline"><div class="codeBlockContent_csEI commandline"><pre tabindex="0" class="prism-code language-commandline codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">"{research_summary}" Using the above information, answer the following question or topic: "{question}" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="the-final-architecture">The final architecture<a aria-hidden="true" class="hash-link" href="#the-final-architecture" title="Direct link to heading"></a></h3><p>Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below:</p><div align="center"><img align="center" height="500" src="https://cowriter-images.s3.amazonaws.com/architecture.png"></div><p>More specifically:</p><ul><li>Generate an outline of research questions that form an objective opinion on any given task.</li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resource, keep track, filter, and summarize only if it includes relevant information.</li><li>Finally, aggregate all summarized sources and generate a final research report.</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="going-forward">Going forward<a aria-hidden="true" class="hash-link" href="#going-forward" title="Direct link to heading"></a></h3><p>The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information.</p><p>Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds.</p><p>It’s all a matter of time and what <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is all about.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/autonomous-agent">autonomous-agent</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/opensource">opensource</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/github">github</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How we built GPT Researcher" href="/blog/building-gpt-researcher"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/search-api.html b/blog/tags/search-api.html index c6d1f1289..c4e181109 100644 --- a/blog/tags/search-api.html +++ b/blog/tags/search-api.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">One post tagged with "search-api" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="One post tagged with "search-api" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/search-api"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/search-api"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/search-api" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/search-api" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>One post tagged with "search-api"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-11-12T00:00:00.000Z" itemprop="datePublished">November 12, 2023</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>OpenAI has done it again with a <a href="https://openai.com/blog/new-models-and-developer-products-announced-at-devday" target="_blank" rel="noopener noreferrer">groundbreaking DevDay</a> showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new <a href="https://platform.openai.com/docs/assistants/overview" target="_blank" rel="noopener noreferrer">Assistants API</a> that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools.</p><p>The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files.</p><p>This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool.</p><p>To skip the tutorial below, feel free to check out the full <a href="https://gist.github.com/assafelovic/579822cd42d52d80db1e1c1ff82ffffd" target="_blank" rel="noopener noreferrer">Github Gist here</a>.</p><p>At a high level, a typical integration of the Assistants API has the following steps:</p><ul><li>Create an <a href="https://platform.openai.com/docs/api-reference/assistants/createAssistant" target="_blank" rel="noopener noreferrer">Assistant</a> in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.</li><li>Create a <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank" rel="noopener noreferrer">Thread</a> when a user starts a conversation.</li><li>Add <a href="https://platform.openai.com/docs/api-reference/messages" target="_blank" rel="noopener noreferrer">Messages</a> to the Thread as the user ask questions.</li><li><a href="https://platform.openai.com/docs/api-reference/runs" target="_blank" rel="noopener noreferrer">Run</a> the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.</li></ul><p>As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread.</p><p><img alt="OpenAI Assistant Object" src="/assets/images/diagram-assistant-dc2f0898038aeab2cea7be34e9e528ed.jpeg"></p><p>Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">OpenAI Python SDK v1.2</a> and <a href="https://tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a>.</p><p>First things first, let’s define the assistant’s instructions:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Next, let’s finalize step 1 and create an assistant using the latest <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">GPT-4 Turbo model</a> (128K context), and the call function using the <a href="https://tavily.com/" target="_blank" rel="noopener noreferrer">Tavily web search API</a>:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Finally, we’ll run the assistant on the thread to trigger the function call and get the response:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually.</p><p><img alt="Status Diagram" src="/assets/images/diagram-1-6294e919a265f26a37175386003c5074.png"></p><p>To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’):</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call.</p><p>We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> json</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> time</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> tavily </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> TavilyClient</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize clients with API keys</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"OPENAI_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tavily_client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TavilyClient</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"TAVILY_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to perform a Tavily search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_search_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_depth</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"advanced"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> search_result</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to print messages from a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> msg </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">role</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">content</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string-interpolation interpolation number" style="color:rgb(247, 140, 108)">0</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">text</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">value</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> assistant</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Assistant ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">assistant_id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Thread: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">thread</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Ongoing conversation loop</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">lower</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'exit'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">break</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a message</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a run</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Run ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation builtin" style="color:rgb(130, 170, 255)">id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Wait for run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">continue</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Print messages from the thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter.</p><p>Feel free to drop a comment below if you have any further questions!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/search-api">search-api</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/openai">openai</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/assistant-api">assistant-api</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to build an OpenAI Assistant with Internet access" href="/blog/building-openai-assistant"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/blog/tags/tavily.html b/blog/tags/tavily.html index 8217f628d..e1856ea27 100644 --- a/blog/tags/tavily.html +++ b/blog/tags/tavily.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">2 posts tagged with "tavily" | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="2 posts tagged with "tavily" | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/blog/tags/tavily"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_tags_posts"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/blog/tags/tavily"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/tavily" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/blog/tags/tavily" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-tags-post-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_q+wC thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_9G5K margin-bottom--md">Recent posts</div><ul class="sidebarItemList_6T4b"><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/gptr-langgraph">How to Build the Ultimate Research Multi-Agent Assistant</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></li><li class="sidebarItem_cjdF"><a class="sidebarItemLink_zyXk" href="/blog/building-gpt-researcher">How we built GPT Researcher</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><header class="margin-bottom--xl"><h1>2 posts tagged with "tavily"</h1><a href="/blog/tags">View All Tags</a></header><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/gptr-hybrid">The Future of Research is Hybrid</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2024-09-07T00:00:00.000Z" itemprop="datePublished">September 7, 2024</time> · <!-- -->8 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><meta itemprop="image" content="https://miro.medium.com/v2/resize:fit:1400/1*NgVIlZVSePqrK5EkB1wu4Q.png"><div class="markdown" itemprop="articleBody"><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*MaauY1ecsD05nL8JqW0Zdg.jpeg" alt="Hyrbrid Research with GPT Researcher"></p><p>Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like <a href="https://www.chatpdf.com/" target="_blank" rel="noopener noreferrer">ChatPDF</a> and <a href="https://consensus.app" target="_blank" rel="noopener noreferrer">Consensus</a>, focus on extracting insights from documents. Others, such as <a href="https://www.perplexity.ai/" target="_blank" rel="noopener noreferrer">Perplexity</a>, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline.</p><p>This is why I'm excited to introduce the latest advancements of <strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong> — now able to conduct hybrid research on any given task and documents.</p><p>Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions.</p><p>Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-hybrid-research-works-better">Why Hybrid Research Works Better<a aria-hidden="true" class="hash-link" href="#why-hybrid-research-works-better" title="Direct link to heading"></a></h2><p>By combining web and local sources, hybrid research addresses these limitations and offers several key advantages:</p><ol><li><p><strong>Grounded context</strong>: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology.</p><p><em>Example</em>: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web.</p></li><li><p><strong>Enhanced accuracy</strong>: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making.</p><p><em>Example</em>: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions.</p></li><li><p><strong>Reduced bias</strong>: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone.</p><p><em>Example</em>: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective.</p></li><li><p><strong>Improved planning and reasoning</strong>: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online.</p><p><em>Example</em>: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights.</p></li><li><p><strong>Customized insights</strong>: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights.</p><p><em>Example</em>: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions.</p></li></ol><p>These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="building-the-hybrid-research-assistant">Building the Hybrid Research Assistant<a aria-hidden="true" class="hash-link" href="#building-the-hybrid-research-assistant" title="Direct link to heading"></a></h2><p>Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood.</p><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-0d2d324e8638a1ceb0a9f776476daa42.png"></p><p>GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report.</p><p>We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="processing-local-documents-with-langchain">Processing Local Documents with Langchain<a aria-hidden="true" class="hash-link" href="#processing-local-documents-with-langchain" title="Direct link to heading"></a></h3><p>LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">document_loaders </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> UnstructuredWordDocumentLoader</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> RecursiveCharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">embeddings </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Chroma</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> file_path </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> file_paths</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PyMuPDFLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.txt'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TextLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredCSVLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.xlsx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredExcelLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.md'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredMarkdownLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.pptx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredPowerPointLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">endswith</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> loader </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> UnstructuredWordDocumentLoader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">file_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">else</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">raise</span><span class="token plain"> ValueError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Unsupported file type: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">file_path</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">extend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">loader</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">load</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> documents</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Use the function to load your local documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">local_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> load_local_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'company_report.pdf'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'meeting_notes.docx'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'data.csv'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Split the documents into smaller chunks for more efficient processing</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> RecursiveCharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">splits </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">local_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create embeddings and store them in a vector database for quick retrieval</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vectorstore </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Chroma</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">splits</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Example of how to perform a similarity search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What were the key points from our last strategy meeting?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">relevant_docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> vectorstore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">similarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> doc </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> relevant_docs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">doc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">page_content</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="conducting-web-research-with-gpt-researcher">Conducting Web Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#conducting-web-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood:</p><p><img src="https://miro.medium.com/v2/resize:fit:1400/1*yFtT43N0GxL0TMKvjtYjug.png" alt="GPT Researcher Architecture"></p><p>As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report.</p><p>GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-hybrid-research-with-gpt-researcher">Running the Hybrid Research with GPT Researcher<a aria-hidden="true" class="hash-link" href="#running-the-hybrid-research-with-gpt-researcher" title="Direct link to heading"></a></h3><p>Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-install-gpt-researcher-with-pip">Step 1: Install GPT Researcher with PIP<a aria-hidden="true" class="hash-link" href="#step-1-install-gpt-researcher-with-pip" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-2-setting-up-the-environment">Step 2: Setting up the environment<a aria-hidden="true" class="hash-link" href="#step-2-setting-up-the-environment" title="Direct link to heading"></a></h4><p>We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-openai-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-tavily-key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="step-3-initialize-gpt-researcher-with-hybrid-research-configuration">Step 3: Initialize GPT Researcher with hybrid research configuration<a aria-hidden="true" class="hash-link" href="#step-3-initialize-gpt-researcher-with-hybrid-research-configuration" title="Direct link to heading"></a></h4><p>GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more.</p><p>To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to "hybrid" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, we can run the research on the following example:</p><ul><li>Research task: "How does our product roadmap compare to emerging market trends in our industry?"</li><li>Web: Current market trends, competitor announcements, and industry forecasts</li><li>Local: Internal product roadmap documents and feature prioritization lists</li></ul><p>After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources.</p><p>But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights.</p><p>The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/hybrid-research">hybrid-research</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/gpt-researcher">gpt-researcher</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langchain">langchain</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/langgraph">langgraph</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about The Future of Research is Hybrid" href="/blog/gptr-hybrid"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_d4p0" itemprop="headline"><a itemprop="url" href="/blog/building-openai-assistant">How to build an OpenAI Assistant with Internet access</a></h2><div class="blogPostData_-Im+ margin-vert--md"><time datetime="2023-11-12T00:00:00.000Z" itemprop="datePublished">November 12, 2023</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_8c0z"><div class="avatar margin-bottom--sm"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_9q7L" src="https://lh3.googleusercontent.com/a/ACg8ocJtrLku69VG_2Y0sJa5mt66gIGNaEBX5r_mgE6CRPEb7A=s96-c" alt="Assaf Elovic"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/assafelovic" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Assaf Elovic</span></a></div><small class="avatar__subtitle" itemprop="description">Creator @ GPT Researcher and Tavily</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>OpenAI has done it again with a <a href="https://openai.com/blog/new-models-and-developer-products-announced-at-devday" target="_blank" rel="noopener noreferrer">groundbreaking DevDay</a> showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new <a href="https://platform.openai.com/docs/assistants/overview" target="_blank" rel="noopener noreferrer">Assistants API</a> that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools.</p><p>The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files.</p><p>This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool.</p><p>To skip the tutorial below, feel free to check out the full <a href="https://gist.github.com/assafelovic/579822cd42d52d80db1e1c1ff82ffffd" target="_blank" rel="noopener noreferrer">Github Gist here</a>.</p><p>At a high level, a typical integration of the Assistants API has the following steps:</p><ul><li>Create an <a href="https://platform.openai.com/docs/api-reference/assistants/createAssistant" target="_blank" rel="noopener noreferrer">Assistant</a> in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.</li><li>Create a <a href="https://platform.openai.com/docs/api-reference/threads" target="_blank" rel="noopener noreferrer">Thread</a> when a user starts a conversation.</li><li>Add <a href="https://platform.openai.com/docs/api-reference/messages" target="_blank" rel="noopener noreferrer">Messages</a> to the Thread as the user ask questions.</li><li><a href="https://platform.openai.com/docs/api-reference/runs" target="_blank" rel="noopener noreferrer">Run</a> the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.</li></ul><p>As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread.</p><p><img alt="OpenAI Assistant Object" src="/assets/images/diagram-assistant-dc2f0898038aeab2cea7be34e9e528ed.jpeg"></p><p>Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">OpenAI Python SDK v1.2</a> and <a href="https://tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a>.</p><p>First things first, let’s define the assistant’s instructions:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Next, let’s finalize step 1 and create an assistant using the latest <a href="https://github.com/openai/openai-python/tree/main#installation" target="_blank" rel="noopener noreferrer">GPT-4 Turbo model</a> (128K context), and the call function using the <a href="https://tavily.com/" target="_blank" rel="noopener noreferrer">Tavily web search API</a>:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Finally, we’ll run the assistant on the thread to trigger the function call and get the response:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually.</p><p><img alt="Status Diagram" src="/assets/images/diagram-1-6294e919a265f26a37175386003c5074.png"></p><p>To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’):</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call.</p><p>We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> json</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> time</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> tavily </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> TavilyClient</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize clients with API keys</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"OPENAI_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">tavily_client </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> TavilyClient</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">api_key</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"TAVILY_API_KEY"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_prompt_instruction </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""You are a finance expert. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Your goal is to provide answers based on information from the internet. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You must use the provided Tavily search API function to find relevant online information. </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should never use your own knowledge to answer questions.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Please include relevant url sources in the end of your answers.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to perform a Tavily search</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_search_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_depth</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"advanced"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> search_result</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to wait for a run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> time</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">sleep</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrieve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Current run status: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">status</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'completed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> run</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to handle tool output submission</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> tool </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> tools_to_call</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_call_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">name</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> function_args </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">function</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">arguments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> function_name </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> output </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> tavily_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">loads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">function_args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_output_array</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"tool_call_id"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> tool_call_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"output"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">run_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tool_outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tool_output_array</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Function to print messages from a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> msg </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">role</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">msg</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">content</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string-interpolation interpolation number" style="color:rgb(247, 140, 108)">0</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">text</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation">value</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an assistant</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">assistants</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> instructions</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_prompt_instruction</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4-1106-preview"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tools</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"function"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"tavily_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Get information on recent events from the web."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"parameters"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"object"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"properties"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"type"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"string"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"description"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The search query to use. For example: 'Latest news on Nvidia stock performance'"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"required"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">assistant_id </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> assistant</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Assistant ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">assistant_id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">thread </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Thread: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">thread</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Ongoing conversation loop</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">while</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> user_input </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"You: "</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">lower</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'exit'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">break</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a message</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> role</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">user_input</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a run</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">beta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">threads</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">runs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">create</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> thread_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> assistant_id</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">assistant_id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Run ID: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">run</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token string-interpolation interpolation builtin" style="color:rgb(130, 170, 255)">id</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Wait for run to complete</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'failed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">continue</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">elif</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">status </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'requires_action'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">required_action</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">submit_tool_outputs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">tool_calls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> run </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> wait_for_run_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Print messages from the thread</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> print_messages_from_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token builtin" style="color:rgb(130, 170, 255)">id</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter.</p><p>Feel free to drop a comment below if you have any further questions!</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_NBRY padding--none margin-left--sm"><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/tavily">tavily</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/search-api">search-api</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/openai">openai</a></li><li class="tag_F03v"><a class="tag_WK-t tagRegular_LXbV" href="/blog/tags/assistant-api">assistant-api</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about How to build an OpenAI Assistant with Internet access" href="/blog/building-openai-assistant"><b>Read More</b></a></div></footer></article></main></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/contribute.html b/docs/contribute.html index 2203ad007..aaff16274 100644 --- a/docs/contribute.html +++ b/docs/contribute.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Contribute | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/contribute"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Contribute | GPT Researcher"><meta data-react-helmet="true" name="description" content="We highly welcome contributions! Please check out contributing if you're interested."><meta data-react-helmet="true" property="og:description" content="We highly welcome contributions! Please check out contributing if you're interested."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/contribute"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/contribute" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/contribute" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Contribute</h1></header><p>We highly welcome contributions! Please check out <a href="https://github.com/assafelovic/gpt-researcher/blob/master/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">contributing</a> if you're interested.</p><p>Please check out our <a href="https://trello.com/b/3O7KBePw/gpt-researcher-roadmap" target="_blank" rel="noopener noreferrer">roadmap</a> page and reach out to us via our <a href="https://discord.gg/QgZXvJAccX" target="_blank" rel="noopener noreferrer">Discord community</a> if you're interested in joining our mission.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/contribute.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/examples/hybrid_research"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Hybrid Research</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/roadmap"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Roadmap<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/examples/detailed_report.html b/docs/examples/detailed_report.html index 472373b2b..2c62f2273 100644 --- a/docs/examples/detailed_report.html +++ b/docs/examples/detailed_report.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Detailed Report | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/examples/detailed_report"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Detailed Report | GPT Researcher"><meta data-react-helmet="true" name="description" content="Overview"><meta data-react-helmet="true" property="og:description" content="Overview"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/examples/detailed_report"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/examples/detailed_report" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/examples/detailed_report" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Examples</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/examples/detailed_report">Detailed Report</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/examples">Simple Run</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/hybrid_research">Hybrid Research</a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Detailed Report</h1></header><h2 class="anchor anchorWithStickyNavbar_y2LR" id="overview">Overview<a aria-hidden="true" class="hash-link" href="#overview" title="Direct link to heading"></a></h2><p>The <code>DetailedReport</code> class inspired by the recent STORM paper, is a powerful component of GPT Researcher, designed to generate comprehensive reports on complex topics. It's particularly useful for creating long-form content that exceeds the typical limits of LLM outputs. This class orchestrates the research process, breaking down the main query into subtopics, conducting in-depth research on each, and combining the results into a cohesive, detailed report.</p><p>Located in <code>backend/report_types/detailed_report.py</code> in the <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher GitHub repository</a>, this class leverages the capabilities of the <code>GPTResearcher</code> agent to perform targeted research and generate content.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="key-features">Key Features<a aria-hidden="true" class="hash-link" href="#key-features" title="Direct link to heading"></a></h2><ul><li>Breaks down complex topics into manageable subtopics</li><li>Conducts in-depth research on each subtopic</li><li>Generates a comprehensive report with introduction, table of contents, and body</li><li>Avoids redundancy by tracking previously written content</li><li>Supports asynchronous operations for improved performance</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="class-structure">Class Structure<a aria-hidden="true" class="hash-link" href="#class-structure" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="initialization">Initialization<a aria-hidden="true" class="hash-link" href="#initialization" title="Direct link to heading"></a></h3><p>The <code>DetailedReport</code> class is initialized with the following parameters:</p><ul><li><code>query</code>: The main research query</li><li><code>report_type</code>: Type of the report</li><li><code>report_source</code>: Source of the report</li><li><code>source_urls</code>: Initial list of source URLs</li><li><code>config_path</code>: Path to the configuration file</li><li><code>tone</code>: Tone of the report (using the <code>Tone</code> enum)</li><li><code>websocket</code>: WebSocket for real-time communication</li><li><code>subtopics</code>: Optional list of predefined subtopics</li><li><code>headers</code>: Optional headers for HTTP requests</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="how-it-works">How It Works<a aria-hidden="true" class="hash-link" href="#how-it-works" title="Direct link to heading"></a></h2><ol><li>The <code>DetailedReport</code> class starts by conducting initial research on the main query.</li><li>It then breaks down the topic into subtopics.</li><li>For each subtopic, it:<ul><li>Conducts focused research</li><li>Generates draft section titles</li><li>Retrieves relevant previously written content to avoid redundancy</li><li>Writes a report section</li></ul></li><li>Finally, it combines all subtopic reports, adds a table of contents, and includes source references to create the final detailed report.</li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="usage-example">Usage Example<a aria-hidden="true" class="hash-link" href="#usage-example" title="Direct link to heading"></a></h2><p>Here's how you can use the <code>DetailedReport</code> class in your project:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> fastapi </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> WebSocket</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">utils</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">enum </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Tone</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> backend</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">report_type </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> DetailedReport</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">generate_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> WebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> detailed_report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> DetailedReport</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"The impact of artificial intelligence on modern healthcare"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"web_search"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> source_urls</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># You can provide initial source URLs if available</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"path/to/config.yaml"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tone</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">Tone</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">FORMAL</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> websocket</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> subtopics</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># You can provide predefined subtopics if desired</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> headers</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add any necessary HTTP headers</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> final_report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> detailed_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> final_report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># In your FastAPI app</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">@app</span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"/generate_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">websocket_endpoint</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> WebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">accept</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> generate_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">send_text</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This example demonstrates how to create a <code>DetailedReport</code> instance and run it to generate a comprehensive report on the impact of AI on healthcare.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="conclusion">Conclusion<a aria-hidden="true" class="hash-link" href="#conclusion" title="Direct link to heading"></a></h2><p>The <code>DetailedReport</code> class is a sophisticated tool for generating in-depth, well-structured reports on complex topics. By breaking down the main query into subtopics and leveraging the power of GPT Researcher, it can produce content that goes beyond the typical limitations of LLM outputs. This makes it an invaluable asset for researchers, content creators, and anyone needing detailed, well-researched information on a given topic.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/examples/detailed_report.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/multi_agents/langgraph"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->LangGraph</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/examples/examples"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Simple Run<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#overview" class="table-of-contents__link toc-highlight">Overview</a></li><li><a href="#key-features" class="table-of-contents__link toc-highlight">Key Features</a></li><li><a href="#class-structure" class="table-of-contents__link toc-highlight">Class Structure</a><ul><li><a href="#initialization" class="table-of-contents__link toc-highlight">Initialization</a></li></ul></li><li><a href="#how-it-works" class="table-of-contents__link toc-highlight">How It Works</a></li><li><a href="#usage-example" class="table-of-contents__link toc-highlight">Usage Example</a></li><li><a href="#conclusion" class="table-of-contents__link toc-highlight">Conclusion</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/examples/examples.html b/docs/examples/examples.html index 658a00387..38c18e16a 100644 --- a/docs/examples/examples.html +++ b/docs/examples/examples.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Simple Run | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/examples/examples"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Simple Run | GPT Researcher"><meta data-react-helmet="true" name="description" content="Run PIP Package"><meta data-react-helmet="true" property="og:description" content="Run PIP Package"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/examples/examples"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/examples/examples" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/examples/examples" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Examples</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/detailed_report">Detailed Report</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/examples/examples">Simple Run</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/hybrid_research">Hybrid Research</a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Simple Run</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run-pip-package">Run PIP Package<a aria-hidden="true" class="hash-link" href="#run-pip-package" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">main</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> This is a sample script that shows how to run a research report.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> """</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What happened in the latest burning man floods?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Report Type</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the researcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research on the given query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">main</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/examples/examples.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/examples/detailed_report"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Detailed Report</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/examples/hybrid_research"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Hybrid Research<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#run-pip-package" class="table-of-contents__link toc-highlight">Run PIP Package</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/examples/hybrid_research.html b/docs/examples/hybrid_research.html index f235fefa6..c62d86816 100644 --- a/docs/examples/hybrid_research.html +++ b/docs/examples/hybrid_research.html @@ -7,17 +7,17 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Hybrid Research | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/examples/hybrid_research"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Hybrid Research | GPT Researcher"><meta data-react-helmet="true" name="description" content="Introduction"><meta data-react-helmet="true" property="og:description" content="Introduction"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/examples/hybrid_research"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/examples/hybrid_research" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/examples/hybrid_research" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> -<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Examples</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/detailed_report">Detailed Report</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/examples">Simple Run</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/examples/hybrid_research">Hybrid Research</a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Hybrid Research</h1></header><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introduction">Introduction<a aria-hidden="true" class="hash-link" href="#introduction" title="Direct link to heading"></a></h2><p>GPT Researcher can combine web search capabilities with local document analysis to provide comprehensive, context-aware research results. </p><p>This guide will walk you through the process of setting up and running hybrid research using GPT Researcher.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="prerequisites">Prerequisites<a aria-hidden="true" class="hash-link" href="#prerequisites" title="Direct link to heading"></a></h2><p>Before you begin, ensure you have the following:</p><ul><li>Python 3.10 or higher installed on your system</li><li>pip (Python package installer)</li><li>An OpenAI API key (you can also choose other supported <a href="/docs/gpt-researcher/llms/llms">LLMs</a>)</li><li>A Tavily API key (you can also choose other supported <a href="/docs/gpt-researcher/search-engines/retrievers">Retrievers</a>)</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="installation">Installation<a aria-hidden="true" class="hash-link" href="#installation" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="setting-up-the-environment">Setting Up the Environment<a aria-hidden="true" class="hash-link" href="#setting-up-the-environment" title="Direct link to heading"></a></h2><p>Export your API keys as environment variables:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">your_openai_api_key_here</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">your_tavily_api_key_here</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Alternatively, you can set these in your Python script:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'OPENAI_API_KEY'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'your_openai_api_key_here'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'TAVILY_API_KEY'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'your_tavily_api_key_here'</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="preparing-local-documents">Preparing Local Documents<a aria-hidden="true" class="hash-link" href="#preparing-local-documents" title="Direct link to heading"></a></h2><ol><li>Create a directory named <code>my-docs</code> in your project folder.</li><li>Place all relevant local documents (PDFs, TXTs, DOCXs, etc.) in this directory.</li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="running-hybrid-research">Running Hybrid Research<a aria-hidden="true" class="hash-link" href="#running-hybrid-research" title="Direct link to heading"></a></h2><p>Here's a basic script to run hybrid research:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>To run the script:</p><ol><li>Save it as <code>run_research.py</code></li><li>Execute it with: <code>python run_research.py</code></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="understanding-the-results">Understanding the Results<a aria-hidden="true" class="hash-link" href="#understanding-the-results" title="Direct link to heading"></a></h2><p>The output will be a comprehensive research report that combines insights from both web sources and your local documents. The report typically includes an executive summary, key findings, detailed analysis, comparisons between your internal data and external trends, and recommendations based on the combined insights.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="troubleshooting">Troubleshooting<a aria-hidden="true" class="hash-link" href="#troubleshooting" title="Direct link to heading"></a></h2><ol><li><strong>API Key Issues</strong>: Ensure your API keys are correctly set and have the necessary permissions.</li><li><strong>Document Loading Errors</strong>: Check that your local documents are in supported formats and are not corrupted.</li><li><strong>Memory Issues</strong>: For large documents or extensive research, you may need to increase your system's available memory or adjust the <code>chunk_size</code> in the document processing step.</li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="faq">FAQ<a aria-hidden="true" class="hash-link" href="#faq" title="Direct link to heading"></a></h2><p><strong>Q: How long does a typical research session take?</strong> +<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Examples</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/detailed_report">Detailed Report</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/examples/examples">Simple Run</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/examples/hybrid_research">Hybrid Research</a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Hybrid Research</h1></header><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introduction">Introduction<a aria-hidden="true" class="hash-link" href="#introduction" title="Direct link to heading"></a></h2><p>GPT Researcher can combine web search capabilities with local document analysis to provide comprehensive, context-aware research results. </p><p>This guide will walk you through the process of setting up and running hybrid research using GPT Researcher.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="prerequisites">Prerequisites<a aria-hidden="true" class="hash-link" href="#prerequisites" title="Direct link to heading"></a></h2><p>Before you begin, ensure you have the following:</p><ul><li>Python 3.10 or higher installed on your system</li><li>pip (Python package installer)</li><li>An OpenAI API key (you can also choose other supported <a href="/docs/gpt-researcher/llms/llms">LLMs</a>)</li><li>A Tavily API key (you can also choose other supported <a href="/docs/gpt-researcher/search-engines/retrievers">Retrievers</a>)</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="installation">Installation<a aria-hidden="true" class="hash-link" href="#installation" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="setting-up-the-environment">Setting Up the Environment<a aria-hidden="true" class="hash-link" href="#setting-up-the-environment" title="Direct link to heading"></a></h2><p>Export your API keys as environment variables:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">your_openai_api_key_here</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">your_tavily_api_key_here</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Alternatively, you can set these in your Python script:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'OPENAI_API_KEY'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'your_openai_api_key_here'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">os</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">environ</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'TAVILY_API_KEY'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'your_tavily_api_key_here'</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the environment variable REPORT_SOURCE to an empty string "" in default.py</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="preparing-documents">Preparing Documents<a aria-hidden="true" class="hash-link" href="#preparing-documents" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="1-local-documents">1. Local Documents<a aria-hidden="true" class="hash-link" href="#1-local-documents" title="Direct link to heading"></a></h3><ol><li>Create a directory named <code>my-docs</code> in your project folder.</li><li>Place all relevant local documents (PDFs, TXTs, DOCXs, etc.) in this directory.</li></ol><h3 class="anchor anchorWithStickyNavbar_y2LR" id="2-online-documents">2. Online Documents<a aria-hidden="true" class="hash-link" href="#2-online-documents" title="Direct link to heading"></a></h3><ol><li>Here is an example of your online document URL example: <a href="https://xxxx.xxx.pdf" target="_blank" rel="noopener noreferrer">https://xxxx.xxx.pdf</a> (supports file formats like PDFs, TXTs, DOCXs, etc.) </li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="running-hybrid-research-by-local-documents">Running Hybrid Research By "Local Documents"<a aria-hidden="true" class="hash-link" href="#running-hybrid-research-by-local-documents" title="Direct link to heading"></a></h2><p>Here's a basic script to run hybrid research:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="running-hybrid-research-by-online-documents">Running Hybrid Research By "Online Documents"<a aria-hidden="true" class="hash-link" href="#running-hybrid-research-by-online-documents" title="Direct link to heading"></a></h2><p>Here's a basic script to run hybrid research:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> document_urls</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">document_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"How does our product roadmap compare to emerging market trends in our industry?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"hybrid"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> document_urls </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"https://xxxx.xxx.pdf"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"https://xxxx.xxx.doc"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> document_urls</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">document_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>To run the script:</p><ol><li>Save it as <code>run_research.py</code></li><li>Execute it with: <code>python run_research.py</code></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="understanding-the-results">Understanding the Results<a aria-hidden="true" class="hash-link" href="#understanding-the-results" title="Direct link to heading"></a></h2><p>The output will be a comprehensive research report that combines insights from both web sources and your local documents. The report typically includes an executive summary, key findings, detailed analysis, comparisons between your internal data and external trends, and recommendations based on the combined insights.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="troubleshooting">Troubleshooting<a aria-hidden="true" class="hash-link" href="#troubleshooting" title="Direct link to heading"></a></h2><ol><li><strong>API Key Issues</strong>: Ensure your API keys are correctly set and have the necessary permissions.</li><li><strong>Document Loading Errors</strong>: Check that your local documents are in supported formats and are not corrupted.</li><li><strong>Memory Issues</strong>: For large documents or extensive research, you may need to increase your system's available memory or adjust the <code>chunk_size</code> in the document processing step.</li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="faq">FAQ<a aria-hidden="true" class="hash-link" href="#faq" title="Direct link to heading"></a></h2><p><strong>Q: How long does a typical research session take?</strong> A: The duration varies based on the complexity of the query and the amount of data to process. It can range from 1-5 minutes for very comprehensive research.</p><p><strong>Q: Can I use GPT Researcher with other language models?</strong> A: Currently, GPT Researcher is optimized for OpenAI's models. Support for other models can be found <a href="/docs/gpt-researcher/llms/llms">here</a>.</p><p><strong>Q: How does GPT Researcher handle conflicting information between local and web sources?</strong> A: The system attempts to reconcile differences by providing context and noting discrepancies in the final report. It prioritizes more recent or authoritative sources when conflicts arise.</p><p><strong>Q: Is my local data sent to external servers during the research process?</strong> -A: No, your local documents are processed on your machine. Only the generated queries and synthesized information (not raw data) are sent to external services for web research.</p><p>For more information and updates, please visit the <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher GitHub repository</a>.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/examples/hybrid_research.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/examples/examples"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Simple Run</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/contribute"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Contribute<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#introduction" class="table-of-contents__link toc-highlight">Introduction</a></li><li><a href="#prerequisites" class="table-of-contents__link toc-highlight">Prerequisites</a></li><li><a href="#installation" class="table-of-contents__link toc-highlight">Installation</a></li><li><a href="#setting-up-the-environment" class="table-of-contents__link toc-highlight">Setting Up the Environment</a></li><li><a href="#preparing-local-documents" class="table-of-contents__link toc-highlight">Preparing Local Documents</a></li><li><a href="#running-hybrid-research" class="table-of-contents__link toc-highlight">Running Hybrid Research</a></li><li><a href="#understanding-the-results" class="table-of-contents__link toc-highlight">Understanding the Results</a></li><li><a href="#troubleshooting" class="table-of-contents__link toc-highlight">Troubleshooting</a></li><li><a href="#faq" class="table-of-contents__link toc-highlight">FAQ</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +A: No, your local documents are processed on your machine. Only the generated queries and synthesized information (not raw data) are sent to external services for web research.</p><p>For more information and updates, please visit the <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher GitHub repository</a>.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/examples/hybrid_research.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/examples/examples"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Simple Run</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/contribute"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Contribute<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#introduction" class="table-of-contents__link toc-highlight">Introduction</a></li><li><a href="#prerequisites" class="table-of-contents__link toc-highlight">Prerequisites</a></li><li><a href="#installation" class="table-of-contents__link toc-highlight">Installation</a></li><li><a href="#setting-up-the-environment" class="table-of-contents__link toc-highlight">Setting Up the Environment</a></li><li><a href="#preparing-documents" class="table-of-contents__link toc-highlight">Preparing Documents</a><ul><li><a href="#1-local-documents" class="table-of-contents__link toc-highlight">1. Local Documents</a></li><li><a href="#2-online-documents" class="table-of-contents__link toc-highlight">2. Online Documents</a></li></ul></li><li><a href="#running-hybrid-research-by-local-documents" class="table-of-contents__link toc-highlight">Running Hybrid Research By "Local Documents"</a></li><li><a href="#running-hybrid-research-by-online-documents" class="table-of-contents__link toc-highlight">Running Hybrid Research By "Online Documents"</a></li><li><a href="#understanding-the-results" class="table-of-contents__link toc-highlight">Understanding the Results</a></li><li><a href="#troubleshooting" class="table-of-contents__link toc-highlight">Troubleshooting</a></li><li><a href="#faq" class="table-of-contents__link toc-highlight">FAQ</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/faq.html b/docs/faq.html index 39376a2a2..943693c4a 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">FAQ | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/faq"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="FAQ | GPT Researcher"><meta data-react-helmet="true" name="description" content="How do I get started?"><meta data-react-helmet="true" property="og:description" content="How do I get started?"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/faq"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/faq" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/faq" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>FAQ</h1></header><h3 class="anchor anchorWithStickyNavbar_y2LR" id="how-do-i-get-started">How do I get started?<a aria-hidden="true" class="hash-link" href="#how-do-i-get-started" title="Direct link to heading"></a></h3><p>It really depends on what you're aiming for. </p><p>If you're looking to connect your AI application to the internet with Tavily tailored API, check out the <a href="https://docs.tavily.com/docs/tavily-api/introductionn" target="_blank" rel="noopener noreferrer">Tavily API</a> documentation. If you're looking to build and deploy our open source autonomous research agent GPT Researcher, please see <a href="/docs/gpt-researcher/getting-started/introduction">GPT Researcher</a> documentation. You can also check out demos and examples for inspiration <a href="/docs/examples/examples">here</a>.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="what-is-gpt-researcher">What is GPT Researcher?<a aria-hidden="true" class="hash-link" href="#what-is-gpt-researcher" title="Direct link to heading"></a></h3><p>GPT Researcher is a popular open source autonomous research agent that takes care of the tedious task of research for you, by scraping, filtering and aggregating over 20+ web sources per a single research task.</p><p>GPT Researcher is built with best practices for leveraging LLMs (prompt engineering, RAG, chains, embeddings, etc), and is optimized for quick and efficient research. It is also fully customizable and can be tailored to your specific needs.</p><p>To learn more about GPT Researcher, check out the <a href="/docs/gpt-researcher/getting-started/introduction">documentation page</a>.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="how-much-does-each-research-run-cost">How much does each research run cost?<a aria-hidden="true" class="hash-link" href="#how-much-does-each-research-run-cost" title="Direct link to heading"></a></h3><p>A research task using GPT Researcher costs around $0.01 per a single run (for GPT-4 usage). We're constantly optimizing LLM calls to reduce costs and improve performance. </p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="how-do-you-ensure-the-report-is-factual-and-accurate">How do you ensure the report is factual and accurate?<a aria-hidden="true" class="hash-link" href="#how-do-you-ensure-the-report-is-factual-and-accurate" title="Direct link to heading"></a></h3><p>we do our best to ensure that the information we provide is factual and accurate. We do this by using multiple sources, and by using proprietary AI to score and rank the most relevant and accurate information. We also use proprietary AI to filter out irrelevant information and sources.</p><p>Lastly, by using RAG and other techniques, we ensure that the information is relevant to the context of the research task, leading to more accurate generative AI content and reduced hallucinations.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="what-are-your-plans-for-the-future">What are your plans for the future?<a aria-hidden="true" class="hash-link" href="#what-are-your-plans-for-the-future" title="Direct link to heading"></a></h3><p>We're constantly working on improving our products and services. We're currently working on improving our search API together with design partners, and adding more data sources to our search engine. We're also working on improving our research agent GPT Researcher, and adding more features to it while growing our amazing open source community.</p><p>If you're interested in our roadmap or looking to collaborate, check out our <a href="https://trello.com/b/3O7KBePw/gpt-researcher-roadmap" target="_blank" rel="noopener noreferrer">roadmap page</a>. </p><p>Feel free to <a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer">contact us</a> if you have any further questions or suggestions!</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/faq.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/roadmap"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Roadmap</div></a></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#how-do-i-get-started" class="table-of-contents__link toc-highlight">How do I get started?</a></li><li><a href="#what-is-gpt-researcher" class="table-of-contents__link toc-highlight">What is GPT Researcher?</a></li><li><a href="#how-much-does-each-research-run-cost" class="table-of-contents__link toc-highlight">How much does each research run cost?</a></li><li><a href="#how-do-you-ensure-the-report-is-factual-and-accurate" class="table-of-contents__link toc-highlight">How do you ensure the report is factual and accurate?</a></li><li><a href="#what-are-your-plans-for-the-future" class="table-of-contents__link toc-highlight">What are your plans for the future?</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/context/filtering-by-domain.html b/docs/gpt-researcher/context/filtering-by-domain.html index a53637656..c3f254690 100644 --- a/docs/gpt-researcher/context/filtering-by-domain.html +++ b/docs/gpt-researcher/context/filtering-by-domain.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Filtering by Domain | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/context/filtering-by-domain"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Filtering by Domain | GPT Researcher"><meta data-react-helmet="true" name="description" content="If you set Google as a Retriever, you can filter web results by site."><meta data-react-helmet="true" property="og:description" content="If you set Google as a Retriever, you can filter web results by site."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/context/filtering-by-domain"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/filtering-by-domain" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/filtering-by-domain" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Custom Context</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/tailored-research">Tailored Research</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/local-docs">Research on Local Documents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/context/filtering-by-domain">Filtering by Domain</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/vector-stores">Vector Stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Filtering by Domain</h1></header><p>If you set Google as a Retriever, you can filter web results by site.</p><p>For example, set in the query param you pass the GPTResearcher class instance: <code>query="site:linkedin.com a python web developer to implement my custom gpt-researcher flow"</code> will limit the results to linkedin.com</p><blockquote><p><strong>Step 1</strong> - Set these environment variables with a .env file in the root folder</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">LANGCHAIN_TRACING_V2</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">true</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">LANGCHAIN_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">DOC_PATH</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">./my-docs</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">google</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">GOOGLE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">GOOGLE_CX_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 2</strong> - from the root project run:</p></blockquote><p>docker-compose up -- build</p><blockquote><p><strong>Step 3</strong> - from the frontend input box in localhost:3000, you can append any google search filter (such as filtering by domain names)</p></blockquote></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/filtering-by-domain.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/local-docs"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Research on Local Documents</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/vector-stores"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Vector Stores<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/context/local-docs.html b/docs/gpt-researcher/context/local-docs.html index 887c28cda..787c22845 100644 --- a/docs/gpt-researcher/context/local-docs.html +++ b/docs/gpt-researcher/context/local-docs.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Research on Local Documents | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/context/local-docs"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Research on Local Documents | GPT Researcher"><meta data-react-helmet="true" name="description" content="Just Local Docs"><meta data-react-helmet="true" property="og:description" content="Just Local Docs"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/context/local-docs"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/local-docs" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/local-docs" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Custom Context</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/tailored-research">Tailored Research</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/context/local-docs">Research on Local Documents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/filtering-by-domain">Filtering by Domain</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/vector-stores">Vector Stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Research on Local Documents</h1></header><h2 class="anchor anchorWithStickyNavbar_y2LR" id="just-local-docs">Just Local Docs<a aria-hidden="true" class="hash-link" href="#just-local-docs" title="Direct link to heading"></a></h2><p>You can instruct the GPT Researcher to run research tasks based on your local documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents.</p><p>Step 1: Add the env variable <code>DOC_PATH</code> pointing to the folder where your documents are located.</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">DOC_PATH</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"./my-docs"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Step 2: </p><ul><li>If you're running the frontend app on localhost:8000, simply select "My Documents" from the "Report Source" Dropdown Options.</li><li>If you're running GPT Researcher with the <a href="https://docs.tavily.com/docs/gpt-researcher/gptr/pip-package" target="_blank" rel="noopener noreferrer">PIP package</a>, pass the <code>report_source</code> argument as "local" when you instantiate the <code>GPTResearcher</code> class <a href="https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research" target="_blank" rel="noopener noreferrer">code sample here</a>.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="local-docs--web-hybrid">Local Docs + Web (Hybrid)<a aria-hidden="true" class="hash-link" href="#local-docs--web-hybrid" title="Direct link to heading"></a></h2><p><img alt="GPT Researcher hybrid research" src="/assets/images/gptr-hybrid-7d8f7a340d2e32b38e1d3f55a0d10efc.png"></p><p>Check out the blog post on <a href="https://docs.gptr.dev/blog/gptr-hybrid" target="_blank" rel="noopener noreferrer">Hybrid Research</a> to learn more about how to combine local documents with web research.</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/local-docs.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/tailored-research"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Tailored Research</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/filtering-by-domain"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Filtering by Domain<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#just-local-docs" class="table-of-contents__link toc-highlight">Just Local Docs</a></li><li><a href="#local-docs--web-hybrid" class="table-of-contents__link toc-highlight">Local Docs + Web (Hybrid)</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/context/tailored-research.html b/docs/gpt-researcher/context/tailored-research.html index e833ffa34..1a6b2fd6d 100644 --- a/docs/gpt-researcher/context/tailored-research.html +++ b/docs/gpt-researcher/context/tailored-research.html @@ -7,16 +7,16 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Tailored Research | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Tailored Research | GPT Researcher"><meta data-react-helmet="true" name="description" content="The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted."><meta data-react-helmet="true" property="og:description" content="The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Custom Context</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/context/tailored-research">Tailored Research</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/local-docs">Research on Local Documents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/filtering-by-domain">Filtering by Domain</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/vector-stores">Vector Stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Tailored Research</h1></header><p>The GPT Researcher package allows you to tailor the research to your needs such as researching on specific sources (URLs) or local documents, and even specify the agent prompt instruction upon which the research is conducted.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="research-on-specific-sources-">Research on Specific Sources 📚<a aria-hidden="true" class="hash-link" href="#research-on-specific-sources-" title="Direct link to heading"></a></h3><p>You can specify the sources you want the GPT Researcher to research on by providing a list of URLs. The GPT Researcher will then conduct research on the provided sources via <code>source_urls</code>. </p><p>If you want GPT Researcher to perform additional research outside of the URLs you provided, i.e., conduct research on various other websites that it finds suitable for the query/sub-query, you can set the parameter <code>complement_source_urls</code> as <code>True</code>. Default value of <code>False</code> will only scour the websites you provide via <code>source_urls</code>.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> source_urls</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> complement_source_urls</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">False</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What are the biggest trends in AI lately?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"static"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sources </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"https://en.wikipedia.org/wiki/Artificial_intelligence"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"https://www.ibm.com/think/insights/artificial-intelligence-trends"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"https://www.forbes.com/advisor/business/ai-statistics"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> sources</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="specify-agent-prompt-">Specify Agent Prompt 📝<a aria-hidden="true" class="hash-link" href="#specify-agent-prompt-" title="Direct link to heading"></a></h3><p>You can specify the agent prompt instruction upon which the research is conducted. This allows you to guide the research in a specific direction and tailor the report layout. Simply pass the prompt as the <code>query</code> argument to the <code>GPTResearcher</code> class and the "custom_report" <code>report_type</code>.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">prompt</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">prompt</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"custom_report"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> prompt </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Research the latest advancements in AI and provide a detailed report in APA format including sources."</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">prompt</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">prompt</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="research-on-local-documents-">Research on Local Documents 📄<a aria-hidden="true" class="hash-link" href="#research-on-local-documents-" title="Direct link to heading"></a></h3><p>You can instruct the GPT Researcher to research on local documents by providing the path to those documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents.</p><p><em>Step 1</em>: Add the env variable <code>DOC_PATH</code> pointing to the folder where your documents are located.</p><p>For example:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">DOC_PATH</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"./my-docs"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p><em>Step 2</em>: When you create an instance of the <code>GPTResearcher</code> class, pass the <code>report_source</code> argument as <code>"local"</code>.</p><p>GPT Researcher will then conduct research on the provided documents.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What can you tell me about myself based on my documents?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"local"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># "local" or "web"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="hybrid-research-">Hybrid Research 🔄<a aria-hidden="true" class="hash-link" href="#hybrid-research-" title="Direct link to heading"></a></h3><p>You can combine the above methods to conduct hybrid research. For example, you can instruct the GPT Researcher to research on both web sources and local documents. Simply provide the sources and set the <code>report_source</code> argument as <code>"hybrid"</code> and watch the magic happen.</p><p>Please note! You should set the proper retrievers for the web sources and doc path for local documents for this to work. -To learn more about retrievers check out the <a href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers" target="_blank" rel="noopener noreferrer">Retrievers</a> documentation.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="research-on-langchain-documents-️">Research on LangChain Documents 🦜️🔗<a aria-hidden="true" class="hash-link" href="#research-on-langchain-documents-️" title="Direct link to heading"></a></h3><p>You can instruct the GPT Researcher to research on a list of langchain document instances.</p><p>For example:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_core</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">documents </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Document</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> typing </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> Dict</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_postgres</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> PGVector</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> sqlalchemy </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> create_engine</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">CONNECTION_STRING </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'postgresql://someuser:somepass@localhost:5432/somedatabase'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">collection_name</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_kwargs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> Dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> engine </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> create_engine</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">CONNECTION_STRING</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> index </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PGVector</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_existing_index</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> use_jsonb</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> collection_name</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">collection_name</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> connection</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">engine</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> index</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">as_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">search_kwargs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">search_kwargs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Document</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What can you tell me about blue cheese based on my documents?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"langchain_documents"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># using a LangChain retriever to get all the documents regarding cheese</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html#langchain_core.retrievers.BaseRetriever.invoke</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> langchain_retriever </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> get_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"cheese_collection"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"k"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> langchain_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">invoke</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"All the documents about cheese"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/tailored-research.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/playing-with-webhooks"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Playing with Webhooks</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/local-docs"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Research on Local Documents<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#research-on-specific-sources-" class="table-of-contents__link toc-highlight">Research on Specific Sources 📚</a></li><li><a href="#specify-agent-prompt-" class="table-of-contents__link toc-highlight">Specify Agent Prompt 📝</a></li><li><a href="#research-on-local-documents-" class="table-of-contents__link toc-highlight">Research on Local Documents 📄</a></li><li><a href="#hybrid-research-" class="table-of-contents__link toc-highlight">Hybrid Research 🔄</a></li><li><a href="#research-on-langchain-documents-️" class="table-of-contents__link toc-highlight">Research on LangChain Documents 🦜️🔗</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +To learn more about retrievers check out the <a href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers" target="_blank" rel="noopener noreferrer">Retrievers</a> documentation.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="research-on-langchain-documents-️">Research on LangChain Documents 🦜️🔗<a aria-hidden="true" class="hash-link" href="#research-on-langchain-documents-️" title="Direct link to heading"></a></h3><p>You can instruct the GPT Researcher to research on a list of langchain document instances.</p><p>For example:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_core</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">documents </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Document</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> typing </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> Dict</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_postgres</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> PGVector</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> sqlalchemy </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> create_engine</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">CONNECTION_STRING </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'postgresql://someuser:somepass@localhost:5432/somedatabase'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">collection_name</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> search_kwargs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> Dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> engine </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> create_engine</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">CONNECTION_STRING</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> embeddings </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> index </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PGVector</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_existing_index</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> use_jsonb</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">embeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> collection_name</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">collection_name</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> connection</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">engine</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> index</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">as_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">search_kwargs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">search_kwargs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> List</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Document</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What can you tell me about blue cheese based on my documents?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"langchain_documents"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># using a LangChain retriever to get all the documents regarding cheese</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html#langchain_core.retrievers.BaseRetriever.invoke</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> langchain_retriever </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> get_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"cheese_collection"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"k"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> documents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> langchain_retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">invoke</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"All the documents about cheese"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/tailored-research.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/logs"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Log Files</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/local-docs"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Research on Local Documents<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#research-on-specific-sources-" class="table-of-contents__link toc-highlight">Research on Specific Sources 📚</a></li><li><a href="#specify-agent-prompt-" class="table-of-contents__link toc-highlight">Specify Agent Prompt 📝</a></li><li><a href="#research-on-local-documents-" class="table-of-contents__link toc-highlight">Research on Local Documents 📄</a></li><li><a href="#hybrid-research-" class="table-of-contents__link toc-highlight">Hybrid Research 🔄</a></li><li><a href="#research-on-langchain-documents-️" class="table-of-contents__link toc-highlight">Research on LangChain Documents 🦜️🔗</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/context/vector-stores.html b/docs/gpt-researcher/context/vector-stores.html index c5ba514d6..57d27eae9 100644 --- a/docs/gpt-researcher/context/vector-stores.html +++ b/docs/gpt-researcher/context/vector-stores.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Vector Stores | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/context/vector-stores"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Vector Stores | GPT Researcher"><meta data-react-helmet="true" name="description" content="The GPT Researcher package allows you to integrate with existing langchain vector stores that have been populated."><meta data-react-helmet="true" property="og:description" content="The GPT Researcher package allows you to integrate with existing langchain vector stores that have been populated."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/context/vector-stores"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/vector-stores" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/context/vector-stores" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Custom Context</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/tailored-research">Tailored Research</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/local-docs">Research on Local Documents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/context/filtering-by-domain">Filtering by Domain</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/context/vector-stores">Vector Stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Vector Stores</h1></header><p>The GPT Researcher package allows you to integrate with existing langchain vector stores that have been populated. For a complete list of supported langchain vector stores, please refer to this <a href="https://python.langchain.com/v0.2/docs/integrations/vectorstores/" target="_blank" rel="noopener noreferrer">link</a>.</p><p>You can create a set of embeddings and langchain documents and store them in any supported vector store of your choosing. GPT-Researcher will work with any langchain vector store that implements the <code>asimilarity_search</code> method.</p><p><strong>If you want to use the existing knowledge in your vector store, make sure to set <code>report_source="langchain_vectorstore"</code>. Any other settings will add additional information from scraped data and might contaminate your vectordb (See <em>How to add scraped data to your vector store</em> for more context)</strong></p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="faiss">Faiss<a aria-hidden="true" class="hash-link" href="#faiss" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">text_splitter </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> CharacterTextSplitter</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> FAISS</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_core</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">documents </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Document</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># exerpt taken from - https://paulgraham.com/wealth.html</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">essay </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">May 2004</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">(This essay was originally published in Hackers & Painters.)</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">If you wanted to get rich, how would you do it? I think your best bet would be to start or join a startup.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">That's been a reliable way to get rich for hundreds of years. The word "startup" dates from the 1960s,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">but what happens in one is very similar to the venture-backed trading voyages of the Middle Ages.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Startups usually involve technology, so much so that the phrase "high-tech startup" is almost redundant.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">A startup is a small company that takes on a hard technical problem.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Lots of people get rich knowing nothing more than that. You don't have to know physics to be a good pitcher.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">But I think it could give you an edge to understand the underlying principles. Why do startups have to be small?</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Will a startup inevitably stop being a startup as it grows larger?</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">And why do they so often work on developing new technology? Why are there so many startups selling new drugs or computer software,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">and none selling corn oil or laundry detergent?</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">The Proposition</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Economically, you can think of a startup as a way to compress your whole working life into a few years.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Instead of working at a low intensity for forty years, you work as hard as you possibly can for four.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">This pays especially well in technology, where you earn a premium for working fast.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">Here is a brief sketch of the economic proposition. If you're a good hacker in your mid twenties,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">you can get a job paying about $80,000 per year. So on average such a hacker must be able to do at</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">least $80,000 worth of work per year for the company just to break even. You could probably work twice</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">as many hours as a corporate employee, and if you focus you can probably get three times as much done in an hour.[1]</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">You should get another multiple of two, at least, by eliminating the drag of the pointy-haired middle manager who</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">would be your boss in a big company. Then there is one more multiple: how much smarter are you than your job</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">description expects you to be? Suppose another multiple of three. Combine all these multipliers,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">and I'm claiming you could be 36 times more productive than you're expected to be in a random corporate job.[2]</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">If a fairly good hacker is worth $80,000 a year at a big company, then a smart hacker working very hard without </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">any corporate bullshit to slow him down should be able to do work worth about $3 million a year.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">...</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">...</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">...</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">document </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Document</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">page_content</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">essay</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">text_splitter </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> CharacterTextSplitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk_size</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">200</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> chunk_overlap</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">30</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> separator</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"\n"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">docs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> text_splitter</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">split_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">document</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vector_store </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> FAISS</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">documents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> Summarize the essay into 3 or 4 succinct sections.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> Make sure to include key points regarding wealth creation.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="display:inline-block;color:rgb(195, 232, 141)"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> Include some recommendations for entrepreneurs in the conclusion.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an instance of GPTResearcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"langchain_vectorstore"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> vector_store</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">vector_store</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research and write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="pgvector">PGVector<a aria-hidden="true" class="hash-link" href="#pgvector" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_postgres</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> PGVector</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">CONNECTION_STRING </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'postgresql://someuser:somepass@localhost:5432/somedatabase'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># assuming the vector store exists and contains the relevent documents</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># also assuming embeddings have been or will be generated</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vector_store </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> PGVector</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">from_existing_index</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> use_jsonb</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> collection_name</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">'some collection name'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> connection</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">CONNECTION_STRING</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> async_mode</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> Create a short report about apples.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> Include a section about which apples are considered best</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> during each season.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an instance of GPTResearcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"langchain_vectorstore"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> vector_store</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">vector_store</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research and write the report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="adding-scraped-data-to-your-vector-store">Adding Scraped Data to your vector store<a aria-hidden="true" class="hash-link" href="#adding-scraped-data-to-your-vector-store" title="Direct link to heading"></a></h2><p>In some cases in which you want to store the scraped data and documents into your own vector store for future usages, GPT-Researcher also allows you to do so seamlessly just by inputting your vector store (make sure to set <code>report_source</code> value to something other than <code>langchain_vectorstore</code>)</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_community</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vectorstores </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> InMemoryVectorStore</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> langchain_openai </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> OpenAIEmbeddings</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">vector_store </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> InMemoryVectorStore</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">embedding</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">OpenAIEmbeddings</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The best LLM"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create an instance of GPTResearcher</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"web"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> vector_store</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">vector_store</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research, the context will be chunked and stored in the vector_store</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Query the 5 most relevant context in our vector store</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">related_contexts </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> vector_store</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">asimilarity_search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"GPT-4"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> k </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">5</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">related_contexts</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">related_contexts</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">#Should be 5 </span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/context/vector-stores.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/filtering-by-domain"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Filtering by Domain</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/llms"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Configure LLM<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#faiss" class="table-of-contents__link toc-highlight">Faiss</a></li><li><a href="#pgvector" class="table-of-contents__link toc-highlight">PGVector</a></li><li><a href="#adding-scraped-data-to-your-vector-store" class="table-of-contents__link toc-highlight">Adding Scraped Data to your vector store</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/frontend/frontend.html b/docs/gpt-researcher/frontend/frontend.html index c1cb8e02c..0bcc4ca3a 100644 --- a/docs/gpt-researcher/frontend/frontend.html +++ b/docs/gpt-researcher/frontend/frontend.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Frontend Application | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/frontend/frontend"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Frontend Application | GPT Researcher"><meta data-react-helmet="true" name="description" content="This frontend project aims to enhance the user experience of GPT Researcher, providing an intuitive and efficient interface for automated research. It offers two deployment options to suit different needs and environments."><meta data-react-helmet="true" property="og:description" content="This frontend project aims to enhance the user experience of GPT Researcher, providing an intuitive and efficient interface for automated research. It offers two deployment options to suit different needs and environments."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/frontend"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/frontend" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/frontend" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> -<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Frontend</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/frontend/frontend">Frontend Application</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/playing-with-webhooks">Playing with Webhooks</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Frontend Application</h1></header><p>This frontend project aims to enhance the user experience of GPT Researcher, providing an intuitive and efficient interface for automated research. It offers two deployment options to suit different needs and environments.</p><p>View a Product Tutorial here: <a href="https://www.youtube.com/watch?v=hIZqA6lPusk" target="_blank" rel="noopener noreferrer">GPT-Researcher Frontend Tutorial</a></p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="nextjs-frontend-app">NextJS Frontend App<a aria-hidden="true" class="hash-link" href="#nextjs-frontend-app" title="Direct link to heading"></a></h2><p>The React app (located in the <code>frontend</code> directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well.</p><p>It comes with loads of added features, such as: </p><ul><li>a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher.</li><li>a GUI for setting your GPTR environment variables.</li><li>the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta).</li><li>stability fixes</li><li>and more coming soon!</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run-the-nextjs-react-app-with-docker">Run the NextJS React App with Docker<a aria-hidden="true" class="hash-link" href="#run-the-nextjs-react-app-with-docker" title="Direct link to heading"></a></h3><blockquote><p><strong>Step 1</strong> - <a href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker" target="_blank" rel="noopener noreferrer">Install Docker</a></p></blockquote><blockquote><p><strong>Step 2</strong> - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env'</p></blockquote><blockquote><p><strong>Step 3</strong> - Within the docker-compose file comment out services that you don't want to run with Docker.</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"> compose up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>If that doesn't work, try running it without the dash:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"> compose up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 4</strong> - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes:</p><ul><li>the Python server running on localhost:8000</li><li>the React app running on localhost:3000</li></ul></blockquote><p>Visit localhost:3000 on any browser and enjoy researching!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="other-options-1-static-frontend-fastapi">Other Options: 1: Static Frontend (FastAPI)<a aria-hidden="true" class="hash-link" href="#other-options-1-static-frontend-fastapi" title="Direct link to heading"></a></h2><p>A lightweight solution using FastAPI to serve static files.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="prerequisites">Prerequisites<a aria-hidden="true" class="hash-link" href="#prerequisites" title="Direct link to heading"></a></h4><ul><li>Python 3.11+</li><li>pip</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="setup-and-running">Setup and Running<a aria-hidden="true" class="hash-link" href="#setup-and-running" title="Direct link to heading"></a></h4><ol><li><p>Install required packages:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip install -r requirements.txt</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Start the server:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python -m uvicorn main:app</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Access at <code>http://localhost:8000</code></p></li></ol><h4 class="anchor anchorWithStickyNavbar_y2LR" id="demo">Demo<a aria-hidden="true" class="hash-link" href="#demo" title="Direct link to heading"></a></h4><iframe height="400" width="700" src="https://github.com/assafelovic/gpt-researcher/assets/13554167/dd6cf08f-b31e-40c6-9907-1915f52a7110" frameborder="0" allow="autoplay; encrypted-media"></iframe><h2 class="anchor anchorWithStickyNavbar_y2LR" id="yet-another-option-running-nextjs-frontend-via-cli">Yet Another Option: Running NextJS Frontend via CLI<a aria-hidden="true" class="hash-link" href="#yet-another-option-running-nextjs-frontend-via-cli" title="Direct link to heading"></a></h2><p>A more robust solution with enhanced features and performance.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="prerequisites-1">Prerequisites<a aria-hidden="true" class="hash-link" href="#prerequisites-1" title="Direct link to heading"></a></h4><ul><li>Node.js (v18.17.0 recommended)</li><li>npm</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="setup-and-running-1">Setup and Running<a aria-hidden="true" class="hash-link" href="#setup-and-running-1" title="Direct link to heading"></a></h4><ol><li><p>Navigate to NextJS directory:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">cd nextjs</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Set up Node.js:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">nvm install 18.17.0</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">nvm use v18.17.0</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Install dependencies:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">npm install --legacy-peer-deps</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Start development server:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">npm run dev</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Access at <code>http://localhost:3000</code></p></li></ol><p>Note: Requires backend server on <code>localhost:8000</code> as detailed in option 1.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="demo-1">Demo<a aria-hidden="true" class="hash-link" href="#demo-1" title="Direct link to heading"></a></h4><iframe height="400" width="700" src="https://github.com/user-attachments/assets/092e9e71-7e27-475d-8c4f-9dddd28934a3" frameborder="0" allow="autoplay; encrypted-media"></iframe><h2 class="anchor anchorWithStickyNavbar_y2LR" id="choosing-an-option">Choosing an Option<a aria-hidden="true" class="hash-link" href="#choosing-an-option" title="Direct link to heading"></a></h2><ul><li>Static Frontend: Quick setup, lightweight deployment.</li><li>NextJS Frontend: Feature-rich, scalable, better performance and SEO.</li></ul><p>For production, NextJS is recommended.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="frontend-features">Frontend Features<a aria-hidden="true" class="hash-link" href="#frontend-features" title="Direct link to heading"></a></h2><p>Our frontend enhances GPT-Researcher by providing:</p><ol><li>Intuitive Research Interface: Streamlined input for research queries.</li><li>Real-time Progress Tracking: Visual feedback on ongoing research tasks.</li><li>Interactive Results Display: Easy-to-navigate presentation of findings.</li><li>Customizable Settings: Adjust research parameters to suit specific needs.</li><li>Responsive Design: Optimal experience across various devices.</li></ol><p>These features aim to make the research process more efficient and user-friendly, complementing GPT-Researcher's powerful agent capabilities.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/frontend.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/troubleshooting"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Troubleshooting</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/playing-with-webhooks"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Playing with Webhooks<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#nextjs-frontend-app" class="table-of-contents__link toc-highlight">NextJS Frontend App</a><ul><li><a href="#run-the-nextjs-react-app-with-docker" class="table-of-contents__link toc-highlight">Run the NextJS React App with Docker</a></li></ul></li><li><a href="#other-options-1-static-frontend-fastapi" class="table-of-contents__link toc-highlight">Other Options: 1: Static Frontend (FastAPI)</a></li><li><a href="#yet-another-option-running-nextjs-frontend-via-cli" class="table-of-contents__link toc-highlight">Yet Another Option: Running NextJS Frontend via CLI</a></li><li><a href="#choosing-an-option" class="table-of-contents__link toc-highlight">Choosing an Option</a></li><li><a href="#frontend-features" class="table-of-contents__link toc-highlight">Frontend Features</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Frontend</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/frontend/frontend">Frontend Application</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/playing-with-webhooks">Playing with Webhooks</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/logs">Log Files</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Frontend Application</h1></header><p>This frontend project aims to enhance the user experience of GPT Researcher, providing an intuitive and efficient interface for automated research. It offers two deployment options to suit different needs and environments.</p><p>View a Product Tutorial here: <a href="https://www.youtube.com/watch?v=hIZqA6lPusk" target="_blank" rel="noopener noreferrer">GPT-Researcher Frontend Tutorial</a></p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="nextjs-frontend-app">NextJS Frontend App<a aria-hidden="true" class="hash-link" href="#nextjs-frontend-app" title="Direct link to heading"></a></h2><p>The React app (located in the <code>frontend</code> directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well.</p><p>It comes with loads of added features, such as: </p><ul><li>a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher.</li><li>a GUI for setting your GPTR environment variables.</li><li>the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta).</li><li>stability fixes</li><li>and more coming soon!</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run-the-nextjs-react-app-with-docker">Run the NextJS React App with Docker<a aria-hidden="true" class="hash-link" href="#run-the-nextjs-react-app-with-docker" title="Direct link to heading"></a></h3><blockquote><p><strong>Step 1</strong> - <a href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker" target="_blank" rel="noopener noreferrer">Install Docker</a></p></blockquote><blockquote><p><strong>Step 2</strong> - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env'</p></blockquote><blockquote><p><strong>Step 3</strong> - Within the docker-compose file comment out services that you don't want to run with Docker.</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"> compose up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>If that doesn't work, try running it without the dash:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"> compose up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 4</strong> - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes:</p><ul><li>the Python server running on localhost:8000</li><li>the React app running on localhost:3000</li></ul></blockquote><p>Visit localhost:3000 on any browser and enjoy researching!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="other-options-1-static-frontend-fastapi">Other Options: 1: Static Frontend (FastAPI)<a aria-hidden="true" class="hash-link" href="#other-options-1-static-frontend-fastapi" title="Direct link to heading"></a></h2><p>A lightweight solution using FastAPI to serve static files.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="prerequisites">Prerequisites<a aria-hidden="true" class="hash-link" href="#prerequisites" title="Direct link to heading"></a></h4><ul><li>Python 3.11+</li><li>pip</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="setup-and-running">Setup and Running<a aria-hidden="true" class="hash-link" href="#setup-and-running" title="Direct link to heading"></a></h4><ol><li><p>Install required packages:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip install -r requirements.txt</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Start the server:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python -m uvicorn main:app</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Access at <code>http://localhost:8000</code></p></li></ol><h4 class="anchor anchorWithStickyNavbar_y2LR" id="demo">Demo<a aria-hidden="true" class="hash-link" href="#demo" title="Direct link to heading"></a></h4><iframe height="400" width="700" src="https://github.com/assafelovic/gpt-researcher/assets/13554167/dd6cf08f-b31e-40c6-9907-1915f52a7110" frameborder="0" allow="autoplay; encrypted-media"></iframe><h2 class="anchor anchorWithStickyNavbar_y2LR" id="yet-another-option-running-nextjs-frontend-via-cli">Yet Another Option: Running NextJS Frontend via CLI<a aria-hidden="true" class="hash-link" href="#yet-another-option-running-nextjs-frontend-via-cli" title="Direct link to heading"></a></h2><p>A more robust solution with enhanced features and performance.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="prerequisites-1">Prerequisites<a aria-hidden="true" class="hash-link" href="#prerequisites-1" title="Direct link to heading"></a></h4><ul><li>Node.js (v18.17.0 recommended)</li><li>npm</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="setup-and-running-1">Setup and Running<a aria-hidden="true" class="hash-link" href="#setup-and-running-1" title="Direct link to heading"></a></h4><ol><li><p>Navigate to NextJS directory:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">cd nextjs</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Set up Node.js:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">nvm install 18.17.0</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">nvm use v18.17.0</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Install dependencies:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">npm install --legacy-peer-deps</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Start development server:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">npm run dev</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Access at <code>http://localhost:3000</code></p></li></ol><p>Note: Requires backend server on <code>localhost:8000</code> as detailed in option 1.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="demo-1">Demo<a aria-hidden="true" class="hash-link" href="#demo-1" title="Direct link to heading"></a></h4><iframe height="400" width="700" src="https://github.com/user-attachments/assets/092e9e71-7e27-475d-8c4f-9dddd28934a3" frameborder="0" allow="autoplay; encrypted-media"></iframe><h2 class="anchor anchorWithStickyNavbar_y2LR" id="choosing-an-option">Choosing an Option<a aria-hidden="true" class="hash-link" href="#choosing-an-option" title="Direct link to heading"></a></h2><ul><li>Static Frontend: Quick setup, lightweight deployment.</li><li>NextJS Frontend: Feature-rich, scalable, better performance and SEO.</li></ul><p>For production, NextJS is recommended.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="frontend-features">Frontend Features<a aria-hidden="true" class="hash-link" href="#frontend-features" title="Direct link to heading"></a></h2><p>Our frontend enhances GPT-Researcher by providing:</p><ol><li>Intuitive Research Interface: Streamlined input for research queries.</li><li>Real-time Progress Tracking: Visual feedback on ongoing research tasks.</li><li>Interactive Results Display: Easy-to-navigate presentation of findings.</li><li>Customizable Settings: Adjust research parameters to suit specific needs.</li><li>Responsive Design: Optimal experience across various devices.</li></ol><p>These features aim to make the research process more efficient and user-friendly, complementing GPT-Researcher's powerful agent capabilities.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/frontend.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/troubleshooting"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Troubleshooting</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/playing-with-webhooks"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Playing with Webhooks<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#nextjs-frontend-app" class="table-of-contents__link toc-highlight">NextJS Frontend App</a><ul><li><a href="#run-the-nextjs-react-app-with-docker" class="table-of-contents__link toc-highlight">Run the NextJS React App with Docker</a></li></ul></li><li><a href="#other-options-1-static-frontend-fastapi" class="table-of-contents__link toc-highlight">Other Options: 1: Static Frontend (FastAPI)</a></li><li><a href="#yet-another-option-running-nextjs-frontend-via-cli" class="table-of-contents__link toc-highlight">Yet Another Option: Running NextJS Frontend via CLI</a></li><li><a href="#choosing-an-option" class="table-of-contents__link toc-highlight">Choosing an Option</a></li><li><a href="#frontend-features" class="table-of-contents__link toc-highlight">Frontend Features</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/frontend/logs.html b/docs/gpt-researcher/frontend/logs.html new file mode 100644 index 000000000..7e7b0c0bc --- /dev/null +++ b/docs/gpt-researcher/frontend/logs.html @@ -0,0 +1,20 @@ +<!doctype html> +<html class="docs-version-current" lang="en" dir="ltr"> +<head> +<meta charset="UTF-8"> +<meta name="viewport" content="width=device-width,initial-scale=1"> +<meta name="generator" content="Docusaurus v0.0.0-4193"> +<link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> +<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Log Files | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/frontend/logs"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Log Files | GPT Researcher"><meta data-react-helmet="true" name="description" content="This document explains how to interpret the log files generated for each report. These logs provide a detailed record of the research process, from initial task planning to the gathering of information, and finally, the report writing process. Reports may change over time as new features are developed."><meta data-react-helmet="true" property="og:description" content="This document explains how to interpret the log files generated for each report. These logs provide a detailed record of the research process, from initial task planning to the gathering of information, and finally, the report writing process. Reports may change over time as new features are developed."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/logs"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/logs" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/logs" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> +</head> +<body> +<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> +<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Frontend</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/frontend">Frontend Application</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/playing-with-webhooks">Playing with Webhooks</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/frontend/logs">Log Files</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Log Files</h1></header><p>This document explains how to interpret the log files generated for each report. These logs provide a detailed record of the research process, from initial task planning to the gathering of information, and finally, the report writing process. Reports may change over time as new features are developed. </p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="log-file-overview">Log File Overview<a aria-hidden="true" class="hash-link" href="#log-file-overview" title="Direct link to heading"></a></h2><p>The log file is a JSON file that contains a list of events that happened during the research process. Each event is an object with a timestamp, type, and data. The data contains the specific information about the event.</p><p>You can find the log file in the <code>outputs</code> folder. </p><p>Or you can access the log file from the report page itself by clicking the "Download Logs" button.</p><p>For developers, there is an additional <code>logs</code> folder that may be useful. See description below for more details. </p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="key-components">Key Components:<a aria-hidden="true" class="hash-link" href="#key-components" title="Direct link to heading"></a></h2><ul><li><code>timestamp</code>: The timestamp is in the format <code>YYYY-MM-DDTHH:MM:SS.ffffff</code> which is an ISO format. The main timestamp is for the generation of the file itself. The timestamps for the events are when each specific event happened during the research process. </li><li><code>events</code>: This is an array containing all the logged events during the research task. Each event object has the following structure.</li><li><code>timestamp</code>: The specific time when the event occurred, allowing you to follow the sequence of actions.</li><li><code>type</code>: This will always be "event" for now.</li><li><code>data</code>: Contains specific information about the event. Includes:</li><li><code>type</code>: This indicates the general kind of event (e.g., "logs").</li><li><code>content</code>: A descriptor of what the tool is doing (e.g., "starting<!-- -->_<!-- -->research", "running<!-- -->_<!-- -->subquery<!-- -->_<!-- -->research", "scraping<!-- -->_<!-- -->content").</li><li><code>output</code>: A more detailed message, which often includes visual indicators (emojis), that is sent to the user when the tool performs the task</li><li><code>metadata</code>: Additional data related to the event. This can be <code>null</code> or contain an array of relevant information like URLs.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="types-of-events--their-significance">Types of Events & Their Significance<a aria-hidden="true" class="hash-link" href="#types-of-events--their-significance" title="Direct link to heading"></a></h2><p>Here's a complete breakdown of all the unique <code>content</code> types and what they mean. This is a comprehensive list of all the different actions the research tool will perform.</p><ol><li><strong><code>starting_research</code></strong>:</li></ol><ul><li>Indicates that the research process has begun for a given task.</li><li><code>output</code>: Includes the text of the research query.</li></ul><ol start="2"><li><strong><code>agent_generated</code></strong>:</li></ol><ul><li>This is an indicator of what the agent is used for this task</li><li><code>output</code>: Will show the name of the agent</li></ul><ol start="3"><li><strong><code>planning_research</code></strong>:</li></ol><ul><li>Shows the tool is initially browsing to understand the scope of the request and start planning.</li><li>The <code>output</code> indicates the tool is either browsing or doing initial planning.</li></ul><ol start="4"><li><strong><code>subqueries</code></strong>:</li></ol><ul><li>Indicates that the tool has created subqueries that it will use for research</li><li><code>output</code>: Lists out all of the subqueries that the tool will be running to perform the research</li><li><code>metadata</code>: An array of strings that contain the subqueries to be run</li></ul><ol start="5"><li><strong><code>running_subquery_research</code></strong>:</li></ol><ul><li>Indicates that a specific subquery research is being performed.</li><li><code>output</code>: Shows the specific subquery being run.</li></ul><ol start="6"><li><strong><code>added_source_url</code></strong>:</li></ol><ul><li>Signifies a URL that was identified as a relevant source of information.</li><li><code>output</code>: Provides the URL with a checkmark emoji to indicate success.</li><li><code>metadata</code>: Contains the actual URL added.</li></ul><ol start="7"><li><strong><code>researching</code></strong>:</li></ol><ul><li>Indicates the tool is actively searching across multiple sources for information.</li><li><code>output</code>: A general message indicating research across multiple sources is happening.</li></ul><ol start="8"><li><strong><code>scraping_urls</code></strong>:</li></ol><ul><li>Shows the tool is beginning to scrape content from a group of URLs.</li><li><code>output</code>: Indicates how many URLs the tool will be scraping from.</li></ul><ol start="9"><li><strong><code>scraping_content</code></strong>:</li></ol><ul><li>Indicates the tool successfully scraped the content from the URLs.</li><li><code>output</code>: Shows the number of pages that have been successfully scraped.</li></ul><ol start="10"><li><strong><code>scraping_images</code></strong>:</li></ol><ul><li>Signifies that images were identified and selected during the scraping process.</li><li><code>output</code>: Shows the number of new images selected and the total images found</li><li><code>metadata</code>: An array containing URLs of the selected images.</li></ul><ol start="11"><li><strong><code>scraping_complete</code></strong>:</li></ol><ul><li>Indicates that the scraping process is complete for the URLs.</li><li><code>output</code>: A message stating that the scraping process is complete</li></ul><ol start="12"><li><strong><code>fetching_query_content</code></strong>:</li></ol><ul><li>Indicates that the tool is fetching content based on a specific query.</li><li><code>output</code>: The specific query for which content is being fetched</li></ul><ol start="13"><li><strong><code>subquery_context_window</code></strong>:</li></ol><ul><li>Indicates the tool is creating a context window for a given subquery to help with more detailed research.</li><li><code>output</code>: A message stating the context window for the subquery is created.</li></ul><ol start="14"><li><strong><code>research_step_finalized</code></strong>:</li></ol><ul><li>Indicates that the research portion of a step is finalized.</li><li><code>output</code>: A message stating that the research is complete.</li></ul><ol start="15"><li><strong><code>generating_subtopics</code></strong>:</li></ol><ul><li>Signifies that the tool is generating subtopics to guide the report.</li><li><code>output</code>: A message indicating that the tool is generating subtopics.</li></ul><ol start="16"><li><strong><code>subtopics_generated</code></strong>:</li></ol><ul><li>Indicates that subtopics have been generated.</li><li><code>output</code>: A message that subtopics have been generated.</li></ul><ol start="17"><li><strong><code>writing_introduction</code></strong>:</li></ol><ul><li>Indicates the tool is beginning to write the introduction to the report.</li><li><code>output</code>: A message to the user that the introduction writing has started.</li></ul><ol start="18"><li><strong><code>introduction_written</code></strong>:</li></ol><ul><li>Indicates the introduction to the report is finished</li><li><code>output</code>: A message to the user that the introduction writing is complete</li></ul><ol start="19"><li><strong><code>generating_draft_sections</code></strong>:</li></ol><ul><li>Shows that the tool is generating draft sections for the report.</li><li><code>output</code>: A message that the report is generating draft sections.</li></ul><ol start="20"><li><strong><code>draft_sections_generated</code></strong>:</li></ol><ul><li>Indicates the draft sections of the report are generated.</li><li><code>output</code>: A message to the user that the draft sections have been generated.</li></ul><ol start="21"><li><strong><code>fetching_relevant_written_content</code></strong>:</li></ol><ul><li>Indicates the tool is fetching relevant written content for the report.</li><li><code>output</code>: A message to the user that relevant content is being fetched</li></ul><ol start="22"><li><strong><code>writing_report</code></strong>:</li></ol><ul><li>Indicates that the tool is starting to compile the research into a report.</li><li><code>output</code>: A message to the user that the report generation has started.</li></ul><ol start="23"><li><strong><code>report_written</code></strong>:</li></ol><ul><li>Signifies that the report generation is complete.</li><li><code>output</code>: A message that the report generation is finished.</li></ul><ol start="24"><li><strong><code>relevant_contents_context</code></strong>:</li></ol><ul><li>Indicates that a context window for relevant content has been created.</li><li><code>output</code>: A message indicating a context window for relevant content has been created.</li></ul><ol start="25"><li><strong><code>writing_conclusion</code></strong>:</li></ol><ul><li>Indicates the tool has started writing the conclusion for the report</li><li><code>output</code>: A message to the user that the conclusion is being written</li></ul><ol start="26"><li><strong><code>conclusion_written</code></strong>:</li></ol><ul><li>Indicates the conclusion of the report has been written</li><li><code>output</code>: A message to the user that the conclusion has been written</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="how-to-use-the-logs">How to Use the Logs<a aria-hidden="true" class="hash-link" href="#how-to-use-the-logs" title="Direct link to heading"></a></h2><ul><li><strong>Troubleshooting:</strong> If the research results are unexpected, the log files can help you understand the exact steps the tool took, including the queries used, the sources it visited, and how the report was generated.</li><li><strong>Transparency:</strong> The logs provide transparency into the research process. You can see exactly which URLs were visited, which images were selected, and how the report was built.</li><li><strong>Understanding the Process</strong>: The logs will provide an overview of what the tool does and what each of the steps look like.</li><li><strong>Reproducibility:</strong> The log files allow users to trace the exact process.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="example-usage">Example Usage<a aria-hidden="true" class="hash-link" href="#example-usage" title="Direct link to heading"></a></h2><p>By looking at the timestamps, you can see the flow of the research task. The logs will show you the subqueries used by the tool to approach the main query, all the URLs used, if images were selected for the research, and all the steps the tool took to generate the report.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="logs-for-developers">Logs for Developers<a aria-hidden="true" class="hash-link" href="#logs-for-developers" title="Direct link to heading"></a></h2><p>In addition to the user-facing log files (detailed and summary reports), the application also generates two types of log files specifically for developers:</p><ol><li>A <code>.log</code> file which is a basic log file format for logging events as they occur</li><li>A <code>.json</code> file which is more structured +Find the logs in the <code>logs</code> folder.</li></ol><h3 class="anchor anchorWithStickyNavbar_y2LR" id="basic-log-file-log">Basic Log File (.log)<a aria-hidden="true" class="hash-link" href="#basic-log-file-log" title="Direct link to heading"></a></h3><ul><li><strong>Format:</strong> Plain text format. Each line represents a log entry.</li><li><strong>Content:</strong><ul><li>Timestamps with millisecond precision.</li><li>Log level: Usually <code>INFO</code>, but could include <code>DEBUG</code>, <code>WARNING</code>, or <code>ERROR</code> in a more complex setup.</li><li>Module name (e.g., "research").</li><li>Descriptive messages about various processes.</li><li>Includes data about:<ul><li>Start and end of research tasks</li><li>Web searches being performed</li><li>Planning of the research</li><li>Subqueries generated and their results</li><li>The sizes of scraped data</li><li>The size of content found from subqueries</li><li>The final combined size of all context found</li></ul></li></ul></li><li><strong>Use Cases for Developers:</strong><ul><li><strong>Real-time Monitoring:</strong> Can be used to monitor the tool's activity in real time.</li><li><strong>Debugging:</strong> Helpful for pinpointing issues by seeing the chronological flow of operations, the size of content collected, etc.</li><li><strong>Performance Analysis:</strong> Timestamps can help in identifying bottlenecks by measuring how long certain operations take.</li><li><strong>High-level overview</strong>: Allows developers to easily see which steps of the tool were performed, and some basic information like sizes of collected content.</li></ul></li><li><strong>Key Differences from User Logs:</strong><ul><li>Less structured, more for developers to review in real-time.</li><li>Contains technical information not usually relevant to a non-developer user.</li><li>Does not have emojis or simplified language.</li><li>No information on the images collected</li></ul></li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="json-log-file-json">JSON Log File (.json)<a aria-hidden="true" class="hash-link" href="#json-log-file-json" title="Direct link to heading"></a></h3><ul><li><strong>Format</strong>: Structured JSON format</li><li><strong>Content</strong>:<ul><li>Timestamps, as in all log files<ul><li><code>type</code> field that can be:</li><li><code>sub_query</code>: which contains the subquery string along with <code>scraped_data_size</code></li><li><code>content_found</code>: which includes the <code>sub_query</code> and the <code>content_size</code></li><li>A <code>content</code> field which gives a snapshot of the overall research and can contain the final context and sources found from the research for that task</li></ul></li></ul></li><li><strong>Use Cases for Developers</strong>:<ul><li><strong>Detailed Analysis</strong>: Allows developers to view specific details of how the tool is running, particularly related to the subqueries and the results of the research.</li><li><strong>Process Understanding</strong>: Developers can see the different subqueries run and how much content each generated which can lead to better debugging and understanding of the tool.</li><li><strong>Data Inspection</strong>: Can be useful for reviewing the generated queries and content sizes.</li></ul></li><li><strong>Key Differences from User Logs</strong>:<ul><li>Highly structured and focused on subquery execution, and the results of this process, specifically the sizes of collected information.</li><li>Does not contain simplified language, emojis, or high-level explanations.</li><li>Does not contain information on the overall context or the images collected, it mainly focuses on the subquery process.</li></ul></li></ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/logs.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/playing-with-webhooks"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Playing with Webhooks</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/tailored-research"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Tailored Research<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#log-file-overview" class="table-of-contents__link toc-highlight">Log File Overview</a></li><li><a href="#key-components" class="table-of-contents__link toc-highlight">Key Components:</a></li><li><a href="#types-of-events--their-significance" class="table-of-contents__link toc-highlight">Types of Events & Their Significance</a></li><li><a href="#how-to-use-the-logs" class="table-of-contents__link toc-highlight">How to Use the Logs</a></li><li><a href="#example-usage" class="table-of-contents__link toc-highlight">Example Usage</a></li><li><a href="#logs-for-developers" class="table-of-contents__link toc-highlight">Logs for Developers</a><ul><li><a href="#basic-log-file-log" class="table-of-contents__link toc-highlight">Basic Log File (.log)</a></li><li><a href="#json-log-file-json" class="table-of-contents__link toc-highlight">JSON Log File (.json)</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/gpt-researcher/frontend/playing-with-webhooks.html b/docs/gpt-researcher/frontend/playing-with-webhooks.html index 249dea85c..ae684b789 100644 --- a/docs/gpt-researcher/frontend/playing-with-webhooks.html +++ b/docs/gpt-researcher/frontend/playing-with-webhooks.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Playing with Webhooks | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/frontend/playing-with-webhooks"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Playing with Webhooks | GPT Researcher"><meta data-react-helmet="true" name="description" content="The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend."><meta data-react-helmet="true" property="og:description" content="The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/playing-with-webhooks"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/playing-with-webhooks" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/frontend/playing-with-webhooks" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> -<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Frontend</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/frontend">Frontend Application</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/frontend/playing-with-webhooks">Playing with Webhooks</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Playing with Webhooks</h1></header><p>The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="inspecting-webhooks">Inspecting Webhooks<a aria-hidden="true" class="hash-link" href="#inspecting-webhooks" title="Direct link to heading"></a></h2><p>When running reports via the frontend, you can inspect the websocket messages in the Network Tab.</p><p>Here's how: </p><p><img src="https://github.com/user-attachments/assets/15fcb5a4-77ea-4b3b-87d7-55d4b6f80095" alt="image"></p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="am-i-polling-the-right-url">Am I polling the right URL?<a aria-hidden="true" class="hash-link" href="#am-i-polling-the-right-url" title="Direct link to heading"></a></h3><p>If you're concerned that your frontend isn't hitting the right API Endpoint, you can check the URL in the Network Tab.</p><p>Click into the WS request & go to the "Headers" tab</p><p><img src="https://github.com/user-attachments/assets/dbd58c1d-3506-411a-852b-e1b133b6f5c8" alt="image"></p><p>For debugging, have a look at the <a href="https://github.com/assafelovic/gpt-researcher/blob/master/frontend/nextjs/helpers/getHost.ts" target="_blank" rel="noopener noreferrer">getHost function.</a></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/playing-with-webhooks.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/frontend"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Frontend Application</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/tailored-research"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Tailored Research<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#inspecting-webhooks" class="table-of-contents__link toc-highlight">Inspecting Webhooks</a><ul><li><a href="#am-i-polling-the-right-url" class="table-of-contents__link toc-highlight">Am I polling the right URL?</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Frontend</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/frontend">Frontend Application</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/frontend/playing-with-webhooks">Playing with Webhooks</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/frontend/logs">Log Files</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Playing with Webhooks</h1></header><p>The GPTR Frontend is powered by Webhooks streaming back from the Backend. This allows for real-time updates on the status of your research tasks, as well as the ability to interact with the Backend directly from the Frontend.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="inspecting-webhooks">Inspecting Webhooks<a aria-hidden="true" class="hash-link" href="#inspecting-webhooks" title="Direct link to heading"></a></h2><p>When running reports via the frontend, you can inspect the websocket messages in the Network Tab.</p><p>Here's how: </p><p><img src="https://github.com/user-attachments/assets/15fcb5a4-77ea-4b3b-87d7-55d4b6f80095" alt="image"></p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="am-i-polling-the-right-url">Am I polling the right URL?<a aria-hidden="true" class="hash-link" href="#am-i-polling-the-right-url" title="Direct link to heading"></a></h3><p>If you're concerned that your frontend isn't hitting the right API Endpoint, you can check the URL in the Network Tab.</p><p>Click into the WS request & go to the "Headers" tab</p><p><img src="https://github.com/user-attachments/assets/dbd58c1d-3506-411a-852b-e1b133b6f5c8" alt="image"></p><p>For debugging, have a look at the <a href="https://github.com/assafelovic/gpt-researcher/blob/master/frontend/nextjs/helpers/getHost.ts" target="_blank" rel="noopener noreferrer">getHost function.</a></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/frontend/playing-with-webhooks.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/frontend"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Frontend Application</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/logs"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Log Files<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#inspecting-webhooks" class="table-of-contents__link toc-highlight">Inspecting Webhooks</a><ul><li><a href="#am-i-polling-the-right-url" class="table-of-contents__link toc-highlight">Am I polling the right URL?</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/getting-started/cli.html b/docs/gpt-researcher/getting-started/cli.html index 04dc75ebc..318280ffc 100644 --- a/docs/gpt-researcher/getting-started/cli.html +++ b/docs/gpt-researcher/getting-started/cli.html @@ -7,14 +7,14 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Run with CLI | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/getting-started/cli"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Run with CLI | GPT Researcher"><meta data-react-helmet="true" name="description" content="This command-line interface (CLI) tool allows you to generate research reports using the GPTResearcher class. It provides an easy way to conduct research on various topics and generate different types of reports."><meta data-react-helmet="true" property="og:description" content="This command-line interface (CLI) tool allows you to generate research reports using the GPTResearcher class. It provides an easy way to conduct research on various topics and generate different types of reports."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/cli"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/cli" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/cli" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Run with CLI</h1></header><p>This command-line interface (CLI) tool allows you to generate research reports using the GPTResearcher class. It provides an easy way to conduct research on various topics and generate different types of reports.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="installation">Installation<a aria-hidden="true" class="hash-link" href="#installation" title="Direct link to heading"></a></h2><ol><li><p>Clone the repository:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">git clone https://github.com/yourusername/gpt-researcher.git</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">cd gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Install the required dependencies:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip install -r requirements.txt</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Set up your environment variables: Create a <code>.env</code> file in the project root and add your API keys or other necessary configurations.</p></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="usage">Usage<a aria-hidden="true" class="hash-link" href="#usage" title="Direct link to heading"></a></h2><p>The basic syntax for using the CLI is:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python cli.py "<query>" --report_type <report_type></span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="arguments">Arguments<a aria-hidden="true" class="hash-link" href="#arguments" title="Direct link to heading"></a></h3><ul><li><code>query</code> (required): The research query you want to investigate.</li><li><code>--report_type</code> (required): The type of report to generate. Options include:<ul><li><code>research_report</code>: Summary - Short and fast (~2 min)</li><li><code>detailed_report</code>: Detailed - In depth and longer (~5 min)</li><li><code>resource_report</code></li><li><code>outline_report</code></li><li><code>custom_report</code></li><li><code>subtopic_report</code></li></ul></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="examples">Examples<a aria-hidden="true" class="hash-link" href="#examples" title="Direct link to heading"></a></h2><ol><li><p>Generate a quick research report on climate change:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python cli.py "What are the main causes of climate change?" --report_type research_report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Create a detailed report on artificial intelligence:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python cli.py "The impact of artificial intelligence on job markets" --report_type detailed_report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Generate an outline report on renewable energy:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python cli.py "Renewable energy sources and their potential" --report_type outline_report</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="output">Output<a aria-hidden="true" class="hash-link" href="#output" title="Direct link to heading"></a></h2><p>The generated report will be saved as a Markdown file in the <code>outputs</code> directory. The filename will be a unique UUID.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="note">Note<a aria-hidden="true" class="hash-link" href="#note" title="Direct link to heading"></a></h2><ul><li>The execution time may vary depending on the complexity of the query and the type of report requested.</li><li>Make sure you have the necessary API keys and permissions set up in your <code>.env</code> file for the tool to function correctly.</li></ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/cli.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/getting-started"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Getting Started</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/getting-started-with-docker"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Docker: Quickstart<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#installation" class="table-of-contents__link toc-highlight">Installation</a></li><li><a href="#usage" class="table-of-contents__link toc-highlight">Usage</a><ul><li><a href="#arguments" class="table-of-contents__link toc-highlight">Arguments</a></li></ul></li><li><a href="#examples" class="table-of-contents__link toc-highlight">Examples</a></li><li><a href="#output" class="table-of-contents__link toc-highlight">Output</a></li><li><a href="#note" class="table-of-contents__link toc-highlight">Note</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/getting-started/getting-started-with-docker.html b/docs/gpt-researcher/getting-started/getting-started-with-docker.html index 52514769f..56f825921 100644 --- a/docs/gpt-researcher/getting-started/getting-started-with-docker.html +++ b/docs/gpt-researcher/getting-started/getting-started-with-docker.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Docker: Quickstart | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Docker: Quickstart | GPT Researcher"><meta data-react-helmet="true" name="description" content="Step 1 - Install & Open Docker Desktop"><meta data-react-helmet="true" property="og:description" content="Step 1 - Install & Open Docker Desktop"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Docker: Quickstart</h1></header><blockquote><p><strong>Step 1</strong> - Install & Open Docker Desktop</p></blockquote><p>Follow instructions at <a href="https://www.docker.com/products/docker-desktop/" target="_blank" rel="noopener noreferrer">https://www.docker.com/products/docker-desktop/</a></p><blockquote><p><strong>Step 2</strong> - <a href="https://www.youtube.com/watch?v=x1gKFt_6Us4" target="_blank" rel="noopener noreferrer">Follow this flow</a></p></blockquote><p>This mainly includes cloning the '.env.example' file, adding your API Keys to the cloned file and saving the file as '.env'</p><blockquote><p><strong>Step 3</strong> - Within root, run with Docker.</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker-compose</span><span class="token plain"> up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>If that doesn't work, try running it without the dash:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"> compose up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 4</strong> - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes:</p><ul><li>the Python server running on localhost:8000</li><li>the React app running on localhost:3000</li></ul></blockquote><p>Visit localhost:3000 on any browser and enjoy researching!</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/getting-started-with-docker.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/cli"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Run with CLI</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/linux-deployment"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Running on Linux<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/getting-started/getting-started.html b/docs/gpt-researcher/getting-started/getting-started.html index ddd1cd26d..bdbeab952 100644 --- a/docs/gpt-researcher/getting-started/getting-started.html +++ b/docs/gpt-researcher/getting-started/getting-started.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Getting Started | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Getting Started | GPT Researcher"><meta data-react-helmet="true" name="description" content="Step 0 - Install Python 3.11 or later. See here for a step-by-step guide."><meta data-react-helmet="true" property="og:description" content="Step 0 - Install Python 3.11 or later. See here for a step-by-step guide."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Getting Started</h1></header><blockquote><p><strong>Step 0</strong> - Install Python 3.11 or later. <a href="https://www.tutorialsteacher.com/python/install-python" target="_blank" rel="noopener noreferrer">See here</a> for a step-by-step guide.</p></blockquote><blockquote><p><strong>Step 1</strong> - Download the project and navigate to its directory</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ </span><span class="token function" style="color:rgb(130, 170, 255)">git</span><span class="token plain"> clone https://github.com/assafelovic/gpt-researcher.git</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ </span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">cd</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 3</strong> - Set up API keys using two methods: exporting them directly or storing them in a <code>.env</code> file.</p></blockquote><p>For Linux/Temporary Windows Setup, use the export method:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">Your OpenAI API Key here</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">Your Tavily API Key here</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>For a more permanent setup, create a <code>.env</code> file in the current <code>gpt-researcher</code> directory and input the env vars (without <code>export</code>).</p><ul><li>For LLM provider, we recommend <strong><a href="https://platform.openai.com/docs/guides/gpt" target="_blank" rel="noopener noreferrer">OpenAI GPT</a></strong>, but you can use any other LLM model (including open sources). To learn how to change the LLM model, please refer to the <a href="https://docs.gptr.dev/docs/gpt-researcher/llms/llms" target="_blank" rel="noopener noreferrer">documentation</a> page. </li><li>For web search API, we recommend <strong><a href="https://app.tavily.com" target="_blank" rel="noopener noreferrer">Tavily Search API</a></strong>, but you can also refer to other search APIs of your choice by changing the search provider in config/config.py to <code>duckduckgo</code>, <code>google</code>, <code>bing</code>, <code>searchapi</code>, <code>serper</code>, <code>searx</code> and more. Then add the corresponding env API key.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="quickstart">Quickstart<a aria-hidden="true" class="hash-link" href="#quickstart" title="Direct link to heading"></a></h2><blockquote><p><strong>Step 1</strong> - Install dependencies</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> -r requirements.txt</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 2</strong> - Run the agent with FastAPI</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ uvicorn main:app --reload</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 3</strong> - Go to http://localhost:8000 on any browser and enjoy researching!</p></blockquote><h2 class="anchor anchorWithStickyNavbar_y2LR" id="using-virtual-environment-or-poetry">Using Virtual Environment or Poetry<a aria-hidden="true" class="hash-link" href="#using-virtual-environment-or-poetry" title="Direct link to heading"></a></h2><p>Select either based on your familiarity with each:</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="virtual-environment">Virtual Environment<a aria-hidden="true" class="hash-link" href="#virtual-environment" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_y2LR" id="establishing-the-virtual-environment-with-activatedeactivate-configuration"><em>Establishing the Virtual Environment with Activate/Deactivate configuration</em><a aria-hidden="true" class="hash-link" href="#establishing-the-virtual-environment-with-activatedeactivate-configuration" title="Direct link to heading"></a></h4><p>Create a virtual environment using the <code>venv</code> package with the environment name <code><your_name></code>, for example, <code>env</code>. Execute the following command in the PowerShell/CMD terminal:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python -m venv </span><span class="token function" style="color:rgb(130, 170, 255)">env</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>To activate the virtual environment, use the following activation script in PowerShell/CMD terminal:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">.</span><span class="token punctuation" style="color:rgb(199, 146, 234)">\</span><span class="token plain">env</span><span class="token punctuation" style="color:rgb(199, 146, 234)">\</span><span class="token plain">Scripts</span><span class="token punctuation" style="color:rgb(199, 146, 234)">\</span><span class="token plain">activate</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>To deactivate the virtual environment, run the following deactivation script in PowerShell/CMD terminal:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">deactivate</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="install-the-dependencies-for-a-virtual-environment"><em>Install the dependencies for a Virtual environment</em><a aria-hidden="true" class="hash-link" href="#install-the-dependencies-for-a-virtual-environment" title="Direct link to heading"></a></h4><p>After activating the <code>env</code> environment, install dependencies using the <code>requirements.txt</code> file with the following command:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python -m pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> -r requirements.txt</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><br><h3 class="anchor anchorWithStickyNavbar_y2LR" id="poetry">Poetry<a aria-hidden="true" class="hash-link" href="#poetry" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_y2LR" id="establishing-the-poetry-dependencies-and-virtual-environment-with-poetry-version-171"><em>Establishing the Poetry dependencies and virtual environment with Poetry version <code>~1.7.1</code></em><a aria-hidden="true" class="hash-link" href="#establishing-the-poetry-dependencies-and-virtual-environment-with-poetry-version-171" title="Direct link to heading"></a></h4><p>Install project dependencies and simultaneously create a virtual environment for the specified project. By executing this command, Poetry reads the project's "pyproject.toml" file to determine the required dependencies and their versions, ensuring a consistent and isolated development environment. The virtual environment allows for a clean separation of project-specific dependencies, preventing conflicts with system-wide packages and enabling more straightforward dependency management throughout the project's lifecycle.</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">poetry </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="activate-the-virtual-environment-associated-with-a-poetry-project"><em>Activate the virtual environment associated with a Poetry project</em><a aria-hidden="true" class="hash-link" href="#activate-the-virtual-environment-associated-with-a-poetry-project" title="Direct link to heading"></a></h4><p>By running this command, the user enters a shell session within the isolated environment associated with the project, providing a dedicated space for development and execution. This virtual environment ensures that the project dependencies are encapsulated, avoiding conflicts with system-wide packages. Activating the Poetry shell is essential for seamlessly working on a project, as it ensures that the correct versions of dependencies are used and provides a controlled environment conducive to efficient development and testing.</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">poetry shell</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run-the-app"><em>Run the app</em><a aria-hidden="true" class="hash-link" href="#run-the-app" title="Direct link to heading"></a></h3><blockquote><p>Launch the FastAPI application agent on a <em>Virtual Environment or Poetry</em> setup by executing the following command:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python -m uvicorn main:app --reload</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Visit http://localhost:8000 in any web browser and explore your research!</p></blockquote><br></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/getting-started.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/how-to-choose"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->How to Choose</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/cli"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Run with CLI<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#quickstart" class="table-of-contents__link toc-highlight">Quickstart</a></li><li><a href="#using-virtual-environment-or-poetry" class="table-of-contents__link toc-highlight">Using Virtual Environment or Poetry</a><ul><li><a href="#virtual-environment" class="table-of-contents__link toc-highlight">Virtual Environment</a></li><li><a href="#poetry" class="table-of-contents__link toc-highlight">Poetry</a></li><li><a href="#run-the-app" class="table-of-contents__link toc-highlight"><em>Run the app</em></a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/getting-started/how-to-choose.html b/docs/gpt-researcher/getting-started/how-to-choose.html index 4fc4a9ed5..5a0f3b15f 100644 --- a/docs/gpt-researcher/getting-started/how-to-choose.html +++ b/docs/gpt-researcher/getting-started/how-to-choose.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">How to Choose | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/getting-started/how-to-choose"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="How to Choose | GPT Researcher"><meta data-react-helmet="true" name="description" content="GPT Researcher is a powerful autonomous research agent designed to enhance and streamline your research processes. Whether you're a developer looking to integrate research capabilities into your project or an end-user seeking a comprehensive research solution, GPT Researcher offers flexible options to meet your needs."><meta data-react-helmet="true" property="og:description" content="GPT Researcher is a powerful autonomous research agent designed to enhance and streamline your research processes. Whether you're a developer looking to integrate research capabilities into your project or an end-user seeking a comprehensive research solution, GPT Researcher offers flexible options to meet your needs."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/how-to-choose"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/how-to-choose" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/how-to-choose" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>How to Choose</h1></header><p>GPT Researcher is a powerful autonomous research agent designed to enhance and streamline your research processes. Whether you're a developer looking to integrate research capabilities into your project or an end-user seeking a comprehensive research solution, GPT Researcher offers flexible options to meet your needs.</p><p>We envision a future where AI agents collaborate to complete complex tasks, with research being a critical step in the process. GPT Researcher aims to be your go-to agent for any research task, regardless of complexity. It can be easily integrated into existing agent workflows, eliminating the need to create your own research agent from scratch.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="options">Options<a aria-hidden="true" class="hash-link" href="#options" title="Direct link to heading"></a></h2><p>GPT Researcher offers multiple ways to leverage its capabilities:</p><img src="https://github.com/user-attachments/assets/305fa3b9-60fa-42b6-a4b0-84740ab6c665" alt="Logo" width="568"><br><ol><li><strong>GPT Researcher PIP agent</strong>: Ideal for integrating GPT Researcher into your existing projects and workflows.</li><li><strong>Backend</strong>: A backend service to interact with the frontend user interfaces, offering advanced features like detailed reports.</li><li><strong>Multi Agent System</strong>: An advanced setup using LangGraph, offering the most comprehensive research capabilities.</li><li><strong>Frontend</strong>: Several front-end solutions depending on your needs, including a simple HTML/JS version and a more advanced NextJS version.</li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="usage-options">Usage Options<a aria-hidden="true" class="hash-link" href="#usage-options" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="1-pip-package">1. PIP Package<a aria-hidden="true" class="hash-link" href="#1-pip-package" title="Direct link to heading"></a></h3><p>The PIP package is ideal for leveraging GPT Researcher as an agent in your preferred environment and code.</p><p><strong>Pros:</strong></p><ul><li>Easy integration into existing projects</li><li>Flexible usage in multi-agent systems, chains, or workflows</li><li>Optimized for production performance</li></ul><p><strong>Cons:</strong></p><ul><li>Requires some coding knowledge</li><li>May need additional setup for advanced features</li></ul><p><strong>Installation:</strong></p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip install gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p><strong>System Requirements:</strong></p><ul><li>Python 3.10+</li><li>pip package manager</li></ul><p><strong>Learn More:</strong> <a href="https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package" target="_blank" rel="noopener noreferrer">PIP Documentation</a></p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="2-end-to-end-application">2. End-to-End Application<a aria-hidden="true" class="hash-link" href="#2-end-to-end-application" title="Direct link to heading"></a></h3><p>For a complete out-of-the-box experience, including a sleek frontend, you can clone our repository.</p><p><strong>Pros:</strong></p><ul><li>Ready-to-use frontend and backend services</li><li>Includes advanced use cases like detailed report generation</li><li>Optimal user experience</li></ul><p><strong>Cons:</strong></p><ul><li>Less flexible than the PIP package for custom integrations</li><li>Requires setting up the entire application</li></ul><p><strong>Getting Started:</strong></p><ol><li>Clone the repository: <code>git clone https://github.com/assafelovic/gpt-researcher.git</code></li><li>Follow the <a href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started" target="_blank" rel="noopener noreferrer">installation instructions</a></li></ol><p><strong>System Requirements:</strong></p><ul><li>Git</li><li>Python 3.10+</li><li>Node.js and npm (for frontend)</li></ul><p><strong>Advanced Usage Example:</strong> <a href="https://github.com/assafelovic/gpt-researcher/tree/master/backend/report_type/detailed_report" target="_blank" rel="noopener noreferrer">Detailed Report Implementation</a></p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="3-multi-agent-system-with-langgraph">3. Multi Agent System with LangGraph<a aria-hidden="true" class="hash-link" href="#3-multi-agent-system-with-langgraph" title="Direct link to heading"></a></h3><p>We've collaborated with LangChain to support multi-agents with LangGraph and GPT Researcher, offering the most complex and comprehensive version of GPT Researcher.</p><p><strong>Pros:</strong></p><ul><li>Very detailed, customized research reports</li><li>Inner AI agent loops and reasoning</li></ul><p><strong>Cons:</strong></p><ul><li>More expensive and time-consuming</li><li>Heavyweight for production use</li></ul><p>This version is recommended for local, experimental, and educational use. We're working on providing a lighter version soon!</p><p><strong>System Requirements:</strong></p><ul><li>Python 3.10+</li><li>LangGraph library</li></ul><p><strong>Learn More:</strong> <a href="https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph" target="_blank" rel="noopener noreferrer">GPT Researcher x LangGraph</a></p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="comparison-table">Comparison Table<a aria-hidden="true" class="hash-link" href="#comparison-table" title="Direct link to heading"></a></h2><table><thead><tr><th>Feature</th><th>PIP Package</th><th>End-to-End Application</th><th>Multi Agent System</th></tr></thead><tbody><tr><td>Ease of Integration</td><td>High</td><td>Medium</td><td>Low</td></tr><tr><td>Customization</td><td>High</td><td>Medium</td><td>High</td></tr><tr><td>Out-of-the-box UI</td><td>No</td><td>Yes</td><td>No</td></tr><tr><td>Complexity</td><td>Low</td><td>Medium</td><td>High</td></tr><tr><td>Best for</td><td>Developers</td><td>End-users</td><td>Researchers/Experimenters</td></tr></tbody></table><p>Please note that all options have been optimized and refined for production use.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="deep-dive">Deep Dive<a aria-hidden="true" class="hash-link" href="#deep-dive" title="Direct link to heading"></a></h2><p>To learn more about each of the options, check out these docs and code snippets:</p><ol><li><p><strong>PIP Package</strong>: </p><ul><li>Install: <code>pip install gpt-researcher</code></li><li><a href="https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package" target="_blank" rel="noopener noreferrer">Integration guide</a></li></ul></li><li><p><strong>End-to-End Application</strong>: </p><ul><li>Clone the repository: <code>git clone https://github.com/assafelovic/gpt-researcher.git</code></li><li><a href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started" target="_blank" rel="noopener noreferrer">Installation instructions</a></li></ul></li><li><p><strong>Multi-Agent System</strong>: </p><ul><li><a href="https://github.com/assafelovic/gpt-researcher/tree/master/multi_agents" target="_blank" rel="noopener noreferrer">Multi-Agents code</a></li><li><a href="https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph" target="_blank" rel="noopener noreferrer">LangGraph documentation</a></li><li><a href="https://docs.gptr.dev/blog/gptr-langgraph" target="_blank" rel="noopener noreferrer">Blog</a></li></ul></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="versioning-and-updates">Versioning and Updates<a aria-hidden="true" class="hash-link" href="#versioning-and-updates" title="Direct link to heading"></a></h2><p>GPT Researcher is actively maintained and updated. To ensure you're using the latest version:</p><ul><li>For the PIP package: <code>pip install --upgrade gpt-researcher</code></li><li>For the End-to-End Application: Pull the latest changes from the GitHub repository</li><li>For the Multi-Agent System: Check the documentation for compatibility with the latest LangChain and LangGraph versions</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="troubleshooting-and-faqs">Troubleshooting and FAQs<a aria-hidden="true" class="hash-link" href="#troubleshooting-and-faqs" title="Direct link to heading"></a></h2><p>For common issues and questions, please refer to our <a href="https://docs.gptr.dev/docs/faq" target="_blank" rel="noopener noreferrer">FAQ section</a> in the documentation.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/how-to-choose.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/introduction"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Introduction</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/getting-started"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Getting Started<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#options" class="table-of-contents__link toc-highlight">Options</a></li><li><a href="#usage-options" class="table-of-contents__link toc-highlight">Usage Options</a><ul><li><a href="#1-pip-package" class="table-of-contents__link toc-highlight">1. PIP Package</a></li><li><a href="#2-end-to-end-application" class="table-of-contents__link toc-highlight">2. End-to-End Application</a></li><li><a href="#3-multi-agent-system-with-langgraph" class="table-of-contents__link toc-highlight">3. Multi Agent System with LangGraph</a></li></ul></li><li><a href="#comparison-table" class="table-of-contents__link toc-highlight">Comparison Table</a></li><li><a href="#deep-dive" class="table-of-contents__link toc-highlight">Deep Dive</a></li><li><a href="#versioning-and-updates" class="table-of-contents__link toc-highlight">Versioning and Updates</a></li><li><a href="#troubleshooting-and-faqs" class="table-of-contents__link toc-highlight">Troubleshooting and FAQs</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/getting-started/introduction.html b/docs/gpt-researcher/getting-started/introduction.html index 0a8b830fc..3bb663e62 100644 --- a/docs/gpt-researcher/getting-started/introduction.html +++ b/docs/gpt-researcher/getting-started/introduction.html @@ -7,8 +7,8 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Introduction | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/getting-started/introduction"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Introduction | GPT Researcher"><meta data-react-helmet="true" name="description" content="Official Website"><meta data-react-helmet="true" property="og:description" content="Official Website"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/introduction"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/introduction" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/introduction" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> @@ -17,8 +17,8 @@ <a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/twitter/follow/assaf_elovic?style=social" alt="Twitter Follow"></a> <a href="https://badge.fury.io/py/gpt-researcher" target="_blank" rel="noopener noreferrer"><img src="https://badge.fury.io/py/gpt-researcher.svg" alt="PyPI version"></a> <a href="https://colab.research.google.com/github/assafelovic/gpt-researcher/blob/master/docs/docs/examples/pip-run.ipynb" target="_blank" rel="noopener noreferrer"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></p><p><strong><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a> is an autonomous agent designed for comprehensive online research on a variety of tasks.</strong> </p><p>The agent can produce detailed, factual and unbiased research reports, with customization options for focusing on relevant resources, outlines, and lessons. Inspired by the recent <a href="https://arxiv.org/abs/2305.04091" target="_blank" rel="noopener noreferrer">Plan-and-Solve</a> and <a href="https://arxiv.org/abs/2005.11401" target="_blank" rel="noopener noreferrer">RAG</a> papers, GPT Researcher addresses issues of speed, determinism and reliability, offering a more stable performance and increased speed through parallelized agent work, as opposed to synchronous operations.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="why-gpt-researcher">Why GPT Researcher?<a aria-hidden="true" class="hash-link" href="#why-gpt-researcher" title="Direct link to heading"></a></h2><ul><li>To form objective conclusions for manual research tasks can take time, sometimes weeks to find the right resources and information.</li><li>Current LLMs are trained on past and outdated information, with heavy risks of hallucinations, making them almost irrelevant for research tasks.</li><li>Current LLMs are limited to short token outputs which are not sufficient for long detailed research reports (2k+ words).</li><li>Solutions that enable web search (such as ChatGPT + Web Plugin), only consider limited resources and content that in some cases result in superficial conclusions or biased answers.</li><li>Using only a selection of resources can create bias in determining the right conclusions for research questions or tasks. </li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h2><p>The main idea is to run "planner" and "execution" agents, whereas the planner generates questions to research, and the execution agents seek the most related information based on each generated research question. Finally, the planner filters and aggregates all related information and creates a research report. <br> <br> -The agents leverage both gpt-4o-mini and gpt-4o (128K context) to complete a research task. We optimize for costs using each only when necessary. <strong>The average research task takes around 3 minutes to complete, and costs ~$0.1.</strong></p><div align="center"><img align="center" height="600" src="https://github.com/assafelovic/gpt-researcher/assets/13554167/4ac896fd-63ab-4b77-9688-ff62aafcc527"></div><p>More specifically:</p><ul><li>Create a domain specific agent based on research query or task.</li><li>Generate a set of research questions that together form an objective opinion on any given task. </li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resources, summarize based on relevant information and keep track of its sources.</li><li>Finally, filter and aggregate all summarized sources and generate a final research report.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="demo">Demo<a aria-hidden="true" class="hash-link" href="#demo" title="Direct link to heading"></a></h2><iframe height="400" width="700" src="https://github.com/assafelovic/gpt-researcher/assets/13554167/a00c89a6-a295-4dd0-b58d-098a31c40fda" frameborder="0" allow="autoplay; encrypted-media"></iframe><h2 class="anchor anchorWithStickyNavbar_y2LR" id="tutorials">Tutorials<a aria-hidden="true" class="hash-link" href="#tutorials" title="Direct link to heading"></a></h2><ul><li><a href="https://medium.com/better-programming/how-i-built-an-autonomous-ai-agent-for-online-research-93435a97c6c" target="_blank" rel="noopener noreferrer">How it Works</a></li><li><a href="https://www.loom.com/share/04ebffb6ed2a4520a27c3e3addcdde20?sid=da1848e8-b1f1-42d1-93c3-5b0b9c3b24ea" target="_blank" rel="noopener noreferrer">How to Install</a></li><li><a href="https://www.loom.com/share/6a3385db4e8747a1913dd85a7834846f?sid=a740fd5b-2aa3-457e-8fb7-86976f59f9b8" target="_blank" rel="noopener noreferrer">Live Demo</a></li><li><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">Homepage</a></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="features">Features<a aria-hidden="true" class="hash-link" href="#features" title="Direct link to heading"></a></h2><ul><li>📝 Generate research, outlines, resources and lessons reports</li><li>📜 Can generate long and detailed research reports (over 2K words)</li><li>🌐 Aggregates over 20 web sources per research to form objective and factual conclusions</li><li>🖥️ Includes an easy-to-use web interface (HTML/CSS/JS)</li><li>🔍 Scrapes web sources with javascript support</li><li>📂 Keeps track and context of visited and used web sources</li><li>📄 Export research reports to PDF, Word and more...</li></ul><p>Let's get started <a href="/docs/gpt-researcher/getting-started/getting-started">here</a>!</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/introduction.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/welcome"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Welcome</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/how-to-choose"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">How to Choose<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#why-gpt-researcher" class="table-of-contents__link toc-highlight">Why GPT Researcher?</a></li><li><a href="#architecture" class="table-of-contents__link toc-highlight">Architecture</a></li><li><a href="#demo" class="table-of-contents__link toc-highlight">Demo</a></li><li><a href="#tutorials" class="table-of-contents__link toc-highlight">Tutorials</a></li><li><a href="#features" class="table-of-contents__link toc-highlight">Features</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +The agents leverage both gpt-4o-mini and gpt-4o (128K context) to complete a research task. We optimize for costs using each only when necessary. <strong>The average research task takes around 3 minutes to complete, and costs ~$0.1.</strong></p><div align="center"><img align="center" height="600" src="https://github.com/assafelovic/gpt-researcher/assets/13554167/4ac896fd-63ab-4b77-9688-ff62aafcc527"></div><p>More specifically:</p><ul><li>Create a domain specific agent based on research query or task.</li><li>Generate a set of research questions that together form an objective opinion on any given task. </li><li>For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task.</li><li>For each scraped resources, summarize based on relevant information and keep track of its sources.</li><li>Finally, filter and aggregate all summarized sources and generate a final research report.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="demo">Demo<a aria-hidden="true" class="hash-link" href="#demo" title="Direct link to heading"></a></h2><iframe height="400" width="700" src="https://github.com/assafelovic/gpt-researcher/assets/13554167/a00c89a6-a295-4dd0-b58d-098a31c40fda" frameborder="0" allow="autoplay; encrypted-media"></iframe><h2 class="anchor anchorWithStickyNavbar_y2LR" id="tutorials">Tutorials<a aria-hidden="true" class="hash-link" href="#tutorials" title="Direct link to heading"></a></h2><ul><li><a href="https://www.youtube.com/playlist?list=PLUGOUZPIB0F-qv6MvKq3HGr0M_b3U2ATv" target="_blank" rel="noopener noreferrer">Full Introduction Playlist</a></li><li><a href="https://medium.com/better-programming/how-i-built-an-autonomous-ai-agent-for-online-research-93435a97c6c" target="_blank" rel="noopener noreferrer">How it Works</a></li><li><a href="https://www.loom.com/share/04ebffb6ed2a4520a27c3e3addcdde20?sid=da1848e8-b1f1-42d1-93c3-5b0b9c3b24ea" target="_blank" rel="noopener noreferrer">How to Install</a></li><li><a href="https://www.loom.com/share/6a3385db4e8747a1913dd85a7834846f?sid=a740fd5b-2aa3-457e-8fb7-86976f59f9b8" target="_blank" rel="noopener noreferrer">Live Demo</a></li><li><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">Homepage</a></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="features">Features<a aria-hidden="true" class="hash-link" href="#features" title="Direct link to heading"></a></h2><ul><li>📝 Generate research, outlines, resources and lessons reports</li><li>📜 Can generate long and detailed research reports (over 2K words)</li><li>🌐 Aggregates over 20 web sources per research to form objective and factual conclusions</li><li>🖥️ Includes an easy-to-use web interface (HTML/CSS/JS)</li><li>🔍 Scrapes web sources with javascript support</li><li>📂 Keeps track and context of visited and used web sources</li><li>📄 Export research reports to PDF, Word and more...</li></ul><p>Let's get started <a href="/docs/gpt-researcher/getting-started/getting-started">here</a>!</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/introduction.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/welcome"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Welcome</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/how-to-choose"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">How to Choose<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#why-gpt-researcher" class="table-of-contents__link toc-highlight">Why GPT Researcher?</a></li><li><a href="#architecture" class="table-of-contents__link toc-highlight">Architecture</a></li><li><a href="#demo" class="table-of-contents__link toc-highlight">Demo</a></li><li><a href="#tutorials" class="table-of-contents__link toc-highlight">Tutorials</a></li><li><a href="#features" class="table-of-contents__link toc-highlight">Features</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/getting-started/linux-deployment.html b/docs/gpt-researcher/getting-started/linux-deployment.html index 98cc76da8..0ba8658b8 100644 --- a/docs/gpt-researcher/getting-started/linux-deployment.html +++ b/docs/gpt-researcher/getting-started/linux-deployment.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Running on Linux | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Running on Linux | GPT Researcher"><meta data-react-helmet="true" name="description" content="This guide will walk you through the process of deploying GPT Researcher on a Linux server."><meta data-react-helmet="true" property="og:description" content="This guide will walk you through the process of deploying GPT Researcher on a Linux server."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Running on Linux</h1></header><p>This guide will walk you through the process of deploying GPT Researcher on a Linux server.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="server-requirements">Server Requirements<a aria-hidden="true" class="hash-link" href="#server-requirements" title="Direct link to heading"></a></h2><p>The default Ubuntu droplet option on <a href="https://m.do.co/c/1a2af257efba" target="_blank" rel="noopener noreferrer">DigitalOcean</a> works well, but this setup should work on any hosting service with similar specifications:</p><ul><li>2 GB RAM</li><li>1 vCPU</li><li>50 GB SSD Storage</li></ul><p>Here's a screenshot of the recommended Ubuntu machine specifications:</p><p><img src="https://github.com/user-attachments/assets/035865c0-d1a2-4990-b7fb-544c229d5198" alt="Ubuntu Server Specifications"></p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="deployment-steps">Deployment Steps<a aria-hidden="true" class="hash-link" href="#deployment-steps" title="Direct link to heading"></a></h2><p>After setting up your server, follow these steps to install Docker, Docker Compose, and Nginx.</p><p>Some more commands to achieve that:</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="step-1-update-the-system">Step 1: Update the System<a aria-hidden="true" class="hash-link" href="#step-1-update-the-system" title="Direct link to heading"></a></h3><h3 class="anchor anchorWithStickyNavbar_y2LR" id="first-ensure-your-package-index-is-up-to-date">First, ensure your package index is up-to-date:<a aria-hidden="true" class="hash-link" href="#first-ensure-your-package-index-is-up-to-date" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">apt</span><span class="token plain"> update</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Step 2: Install Git</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Git is a version control system. Install it using:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">apt</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">git</span><span class="token plain"> -y</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Verify the installation by checking the Git version:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">git</span><span class="token plain"> --version</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Step 3: Install Docker</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Docker is a platform for developing, shipping, and running applications inside containers.</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Install prerequisites:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">apt</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> apt-transport-https ca-certificates </span><span class="token function" style="color:rgb(130, 170, 255)">curl</span><span class="token plain"> software-properties-common -y</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Add Docker’s official GPG key:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">curl</span><span class="token plain"> -fsSL https://download.docker.com/linux/ubuntu/gpg </span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Set up the stable repository:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">echo</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"deb [arch=</span><span class="token string variable" style="color:rgb(191, 199, 213)">$(</span><span class="token string variable" style="color:rgb(191, 199, 213)">dpkg --print-architecture</span><span class="token string variable" style="color:rgb(191, 199, 213)">)</span><span class="token string" style="color:rgb(195, 232, 141)"> signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu </span><span class="token string variable" style="color:rgb(191, 199, 213)">$(</span><span class="token string variable" style="color:rgb(191, 199, 213)">lsb_release -cs</span><span class="token string variable" style="color:rgb(191, 199, 213)">)</span><span class="token string" style="color:rgb(195, 232, 141)"> stable"</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">tee</span><span class="token plain"> /etc/apt/sources.list.d/docker.list </span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> /dev/null</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Update the package index again and install Docker:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">apt</span><span class="token plain"> update</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">apt</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> docker-ce -y</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Verify Docker installation:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> systemctl status </span><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Optionally, add your user to the docker group to run Docker without sudo:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">usermod</span><span class="token plain"> -aG </span><span class="token function" style="color:rgb(130, 170, 255)">docker</span><span class="token plain"> </span><span class="token variable" style="color:rgb(191, 199, 213)">${</span><span class="token variable environment constant" style="color:rgb(130, 170, 255)">USER</span><span class="token variable" style="color:rgb(191, 199, 213)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Log out and back in for the group change to take effect.</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">Step </span><span class="token number" style="color:rgb(247, 140, 108)">4</span><span class="token plain">: Install Nginx</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Nginx is a high-performance web server.</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Install Nginx:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">apt</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> nginx -y</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Start and enable Nginx:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> systemctl start nginx</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> systemctl </span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">enable</span><span class="token plain"> nginx</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Verify Nginx installation:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> systemctl status nginx</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Here's your nginx config file:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">events </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">http </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> server </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> listen </span><span class="token number" style="color:rgb(247, 140, 108)">80</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> server_name name.example</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> client_max_body_size 64M</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> location / </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_pass http://localhost:3000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_http_version </span><span class="token number" style="color:rgb(247, 140, 108)">1.1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Upgrade </span><span class="token variable" style="color:rgb(191, 199, 213)">$http_upgrade</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Connection </span><span class="token string" style="color:rgb(195, 232, 141)">'upgrade'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Host </span><span class="token variable" style="color:rgb(191, 199, 213)">$host</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_cache_bypass </span><span class="token variable" style="color:rgb(191, 199, 213)">$http_upgrade</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> location ~ ^/</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ws</span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain">upload</span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain">files</span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain">outputs</span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain">getConfig</span><span class="token operator" style="color:rgb(137, 221, 255)">|</span><span class="token plain">setConfig</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_pass http://localhost:8000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_http_version </span><span class="token number" style="color:rgb(247, 140, 108)">1.1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Upgrade </span><span class="token variable" style="color:rgb(191, 199, 213)">$http_upgrade</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Connection </span><span class="token string" style="color:rgb(195, 232, 141)">"Upgrade"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Host </span><span class="token variable" style="color:rgb(191, 199, 213)">$host</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>And if you're using SSL:</p><div class="codeBlockContainer_J+bg language-nginx"><div class="codeBlockContent_csEI nginx"><pre tabindex="0" class="prism-code language-nginx codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">server {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> server_name name.example;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> client_max_body_size 64M;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> location / {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_pass http://localhost:3000;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_http_version 1.1;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Upgrade $http_upgrade;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Connection 'upgrade';</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Host $host;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_cache_bypass $http_upgrade;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> }</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> location ~ ^/(ws|upload|files|outputs|getConfig|setConfig) {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_pass http://localhost:8000;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_http_version 1.1;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Upgrade $http_upgrade;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Connection "Upgrade";</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> proxy_set_header Host $host;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> }</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> listen 443 ssl; # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> ssl_certificate /etc/letsencrypt/live/name.example/fullchain.pem; # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> ssl_certificate_key /etc/letsencrypt/live/name.example/privkey.pem; # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">}</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">server {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> if ($host = name.example) {</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> return 301 https://$host$request_uri;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> } # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> listen 80;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> server_name name.example;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> return 404; # managed by Certbot</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>And the relevant commands:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">vim</span><span class="token plain"> /etc/nginx/nginx.conf</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">### Edit it to reflect above. Then verify all is good with:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> nginx -t</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># If there are no errors:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">sudo</span><span class="token plain"> systemctl restart nginx</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Clone .env.example as .env</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Run from root: </span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">docker-compose</span><span class="token plain"> up --build</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/getting-started/linux-deployment.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/getting-started-with-docker"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Docker: Quickstart</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/pip-package"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">PIP Package<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#server-requirements" class="table-of-contents__link toc-highlight">Server Requirements</a></li><li><a href="#deployment-steps" class="table-of-contents__link toc-highlight">Deployment Steps</a><ul><li><a href="#step-1-update-the-system" class="table-of-contents__link toc-highlight">Step 1: Update the System</a></li><li><a href="#first-ensure-your-package-index-is-up-to-date" class="table-of-contents__link toc-highlight">First, ensure your package index is up-to-date:</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/automated-tests.html b/docs/gpt-researcher/gptr/automated-tests.html index 1237c287b..8828a79af 100644 --- a/docs/gpt-researcher/gptr/automated-tests.html +++ b/docs/gpt-researcher/gptr/automated-tests.html @@ -7,14 +7,14 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Automated Tests | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/automated-tests"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Automated Tests | GPT Researcher"><meta data-react-helmet="true" name="description" content="Automated Testing with Github Actions"><meta data-react-helmet="true" property="og:description" content="Automated Testing with Github Actions"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/automated-tests"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/automated-tests" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/automated-tests" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Automated Tests</h1></header><h2 class="anchor anchorWithStickyNavbar_y2LR" id="automated-testing-with-github-actions">Automated Testing with Github Actions<a aria-hidden="true" class="hash-link" href="#automated-testing-with-github-actions" title="Direct link to heading"></a></h2><p>This repository contains the code for the automated testing of the GPT-Researcher Repo using Github Actions. </p><p>The tests are triggered in a docker container which runs the tests via the <code>pytest</code> module.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="running-the-tests">Running the Tests<a aria-hidden="true" class="hash-link" href="#running-the-tests" title="Direct link to heading"></a></h2><p>You can run the tests:</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="via-a-docker-command">Via a docker command<a aria-hidden="true" class="hash-link" href="#via-a-docker-command" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">docker-compose</span><span class="token plain"> --profile </span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">test</span><span class="token plain"> run --rm gpt-researcher-tests</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="via-a-github-action">Via a Github Action<a aria-hidden="true" class="hash-link" href="#via-a-github-action" title="Direct link to heading"></a></h3><p><img src="https://github.com/user-attachments/assets/721fca20-01bb-4c10-9cf9-19d823bebbb0" alt="image"></p><p>Attaching here the required settings & screenshots on the github repo level:</p><p>Step 1: Within the repo, press the "Settings" tab</p><p>Step 2: Create a new environment named "tests" (all lowercase)</p><p>Step 3: Click into the "tests" environment & add environment secrets of <code>OPENAI_API_KEY</code> & <code>TAVILY_API_KEY</code></p><p>Get the keys from here:</p><p><a href="https://app.tavily.com/sign-in" target="_blank" rel="noopener noreferrer">https://app.tavily.com/sign-in</a></p><p><a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener noreferrer">https://platform.openai.com/api-keys</a></p><p><img src="https://github.com/user-attachments/assets/7cd341c6-d8d4-461f-ab5e-325abc9fe509" alt="Screen Shot 2024-07-28 at 9 00 19"> <img src="https://github.com/user-attachments/assets/a3744f01-06a6-4c9d-8aa0-1fc742d3e866" alt="Screen Shot 2024-07-28 at 9 02 55"></p><p>If configured correctly, here's what the Github action should look like when opening a new PR or committing to an open PR:</p><p><img src="https://github.com/user-attachments/assets/30dbc668-4e6a-4b3b-a02e-dc859fc9bd3d" alt="Screen Shot 2024-07-28 at 8 57 02"></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/automated-tests.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/querying-the-backend"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Querying the Backend</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/troubleshooting"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Troubleshooting<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#automated-testing-with-github-actions" class="table-of-contents__link toc-highlight">Automated Testing with Github Actions</a></li><li><a href="#running-the-tests" class="table-of-contents__link toc-highlight">Running the Tests</a><ul><li><a href="#via-a-docker-command" class="table-of-contents__link toc-highlight">Via a docker command</a></li><li><a href="#via-a-github-action" class="table-of-contents__link toc-highlight">Via a Github Action</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/config.html b/docs/gpt-researcher/gptr/config.html index 3db93b65c..cff538c1d 100644 --- a/docs/gpt-researcher/gptr/config.html +++ b/docs/gpt-researcher/gptr/config.html @@ -7,17 +7,17 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Configuration | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/config"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Configuration | GPT Researcher"><meta data-react-helmet="true" name="description" content="The config.py enables you to customize GPT Researcher to your specific needs and preferences."><meta data-react-helmet="true" property="og:description" content="The config.py enables you to customize GPT Researcher to your specific needs and preferences."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/config"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/config" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/config" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Configuration</h1></header><p>The config.py enables you to customize GPT Researcher to your specific needs and preferences.</p><p>Thanks to our amazing community and contributions, GPT Researcher supports multiple LLMs and Retrievers. In addition, GPT Researcher can be tailored to various report formats (such as APA), word count, research iterations depth, etc.</p><p>GPT Researcher defaults to our recommended suite of integrations: <a href="https://platform.openai.com/docs/overview" target="_blank" rel="noopener noreferrer">OpenAI</a> for LLM calls and <a href="https://app.tavily.com" target="_blank" rel="noopener noreferrer">Tavily API</a> for retrieving real-time web information.</p><p>As seen below, OpenAI still stands as the superior LLM. We assume it will stay this way for some time, and that prices will only continue to decrease, while performance and speed increase over time.</p><div style="margin-bottom:10px"><img align="center" height="350" src="/img/leaderboard.png"></div><p>The default config.py file can be found in <code>/gpt_researcher/config/</code>. It supports various options for customizing GPT Researcher to your needs. -You can also include your own external JSON file <code>config.json</code> by adding the path in the <code>config_file</code> param. <strong>Please follow the config.py file for additional future support</strong>.</p><p>Below is a list of current supported options:</p><ul><li><strong><code>RETRIEVER</code></strong>: Web search engine used for retrieving sources. Defaults to <code>tavily</code>. Options: <code>duckduckgo</code>, <code>bing</code>, <code>google</code>, <code>searchapi</code>, <code>serper</code>, <code>searx</code>. <a href="https://github.com/assafelovic/gpt-researcher/tree/master/gpt_researcher/retrievers" target="_blank" rel="noopener noreferrer">Check here</a> for supported retrievers</li><li><strong><code>EMBEDDING</code></strong>: Embedding model. Defaults to <code>openai:text-embedding-3-small</code>. Options: <code>ollama</code>, <code>huggingface</code>, <code>azure_openai</code>, <code>custom</code>.</li><li><strong><code>FAST_LLM</code></strong>: Model name for fast LLM operations such summaries. Defaults to <code>openai:gpt-4o-mini</code>.</li><li><strong><code>SMART_LLM</code></strong>: Model name for smart operations like generating research reports and reasoning. Defaults to <code>openai:gpt-4o</code>.</li><li><strong><code>STRATEGIC_LLM</code></strong>: Model name for strategic operations like generating research plans and strategies. Defaults to <code>openai:o1-preview</code>.</li><li><strong><code>LANGUAGE</code></strong>: Language to be used for the final research report. Defaults to <code>english</code>.</li><li><strong><code>CURATE_SOURCES</code></strong>: Whether to curate sources for research. This step adds an LLM run which may increase costs and total run time but improves quality of source selection. Defaults to <code>True</code>.</li><li><strong><code>FAST_TOKEN_LIMIT</code></strong>: Maximum token limit for fast LLM responses. Defaults to <code>2000</code>.</li><li><strong><code>SMART_TOKEN_LIMIT</code></strong>: Maximum token limit for smart LLM responses. Defaults to <code>4000</code>.</li><li><strong><code>BROWSE_CHUNK_MAX_LENGTH</code></strong>: Maximum length of text chunks to browse in web sources. Defaults to <code>8192</code>.</li><li><strong><code>SUMMARY_TOKEN_LIMIT</code></strong>: Maximum token limit for generating summaries. Defaults to <code>700</code>.</li><li><strong><code>TEMPERATURE</code></strong>: Sampling temperature for LLM responses, typically between 0 and 1. A higher value results in more randomness and creativity, while a lower value results in more focused and deterministic responses. Defaults to <code>0.55</code>.</li><li><strong><code>TOTAL_WORDS</code></strong>: Total word count limit for document generation or processing tasks. Defaults to <code>800</code>.</li><li><strong><code>REPORT_FORMAT</code></strong>: Preferred format for report generation. Defaults to <code>APA</code>. Consider formats like <code>MLA</code>, <code>CMS</code>, <code>Harvard style</code>, <code>IEEE</code>, etc.</li><li><strong><code>MAX_ITERATIONS</code></strong>: Maximum number of iterations for processes like query expansion or search refinement. Defaults to <code>3</code>.</li><li><strong><code>AGENT_ROLE</code></strong>: Role of the agent. This might be used to customize the behavior of the agent based on its assigned roles. No default value.</li><li><strong><code>MAX_SUBTOPICS</code></strong>: Maximum number of subtopics to generate or consider. Defaults to <code>3</code>.</li><li><strong><code>SCRAPER</code></strong>: Web scraper to use for gathering information. Defaults to <code>bs</code> (BeautifulSoup). You can also use <a href="https://github.com/codelucas/newspaper" target="_blank" rel="noopener noreferrer">newspaper</a>.</li><li><strong><code>DOC_PATH</code></strong>: Path to read and research local documents. Defaults to an empty string indicating no path specified.</li><li><strong><code>USER_AGENT</code></strong>: Custom User-Agent string for web crawling and web requests.</li><li><strong><code>MEMORY_BACKEND</code></strong>: Backend used for memory operations, such as local storage of temporary data. Defaults to <code>local</code>.</li></ul><p>To change the default configurations, you can simply add env variables to your <code>.env</code> file as named above or export manually in your local project directory.</p><p>For example, to manually change the search engine and report format:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">bing</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">REPORT_FORMAT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">IEEE</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Please note that you might need to export additional env vars and obtain API keys for other supported search retrievers and LLM providers. Please follow your console logs for further assistance. +You can also include your own external JSON file <code>config.json</code> by adding the path in the <code>config_file</code> param. <strong>Please follow the config.py file for additional future support</strong>.</p><p>Below is a list of current supported options:</p><ul><li><strong><code>RETRIEVER</code></strong>: Web search engine used for retrieving sources. Defaults to <code>tavily</code>. Options: <code>duckduckgo</code>, <code>bing</code>, <code>google</code>, <code>searchapi</code>, <code>serper</code>, <code>searx</code>. <a href="https://github.com/assafelovic/gpt-researcher/tree/master/gpt_researcher/retrievers" target="_blank" rel="noopener noreferrer">Check here</a> for supported retrievers</li><li><strong><code>EMBEDDING</code></strong>: Embedding model. Defaults to <code>openai:text-embedding-3-small</code>. Options: <code>ollama</code>, <code>huggingface</code>, <code>azure_openai</code>, <code>custom</code>.</li><li><strong><code>FAST_LLM</code></strong>: Model name for fast LLM operations such summaries. Defaults to <code>openai:gpt-4o-mini</code>.</li><li><strong><code>SMART_LLM</code></strong>: Model name for smart operations like generating research reports and reasoning. Defaults to <code>openai:gpt-4o</code>.</li><li><strong><code>STRATEGIC_LLM</code></strong>: Model name for strategic operations like generating research plans and strategies. Defaults to <code>openai:o1-preview</code>.</li><li><strong><code>LANGUAGE</code></strong>: Language to be used for the final research report. Defaults to <code>english</code>.</li><li><strong><code>CURATE_SOURCES</code></strong>: Whether to curate sources for research. This step adds an LLM run which may increase costs and total run time but improves quality of source selection. Defaults to <code>True</code>.</li><li><strong><code>FAST_TOKEN_LIMIT</code></strong>: Maximum token limit for fast LLM responses. Defaults to <code>2000</code>.</li><li><strong><code>SMART_TOKEN_LIMIT</code></strong>: Maximum token limit for smart LLM responses. Defaults to <code>4000</code>.</li><li><strong><code>STRATEGIC_TOKEN_LIMIT</code></strong>: Maximum token limit for strategic LLM responses. Defaults to <code>4000</code>.</li><li><strong><code>BROWSE_CHUNK_MAX_LENGTH</code></strong>: Maximum length of text chunks to browse in web sources. Defaults to <code>8192</code>.</li><li><strong><code>SUMMARY_TOKEN_LIMIT</code></strong>: Maximum token limit for generating summaries. Defaults to <code>700</code>.</li><li><strong><code>TEMPERATURE</code></strong>: Sampling temperature for LLM responses, typically between 0 and 1. A higher value results in more randomness and creativity, while a lower value results in more focused and deterministic responses. Defaults to <code>0.55</code>.</li><li><strong><code>TOTAL_WORDS</code></strong>: Total word count limit for document generation or processing tasks. Defaults to <code>800</code>.</li><li><strong><code>REPORT_FORMAT</code></strong>: Preferred format for report generation. Defaults to <code>APA</code>. Consider formats like <code>MLA</code>, <code>CMS</code>, <code>Harvard style</code>, <code>IEEE</code>, etc.</li><li><strong><code>MAX_ITERATIONS</code></strong>: Maximum number of iterations for processes like query expansion or search refinement. Defaults to <code>3</code>.</li><li><strong><code>AGENT_ROLE</code></strong>: Role of the agent. This might be used to customize the behavior of the agent based on its assigned roles. No default value.</li><li><strong><code>MAX_SUBTOPICS</code></strong>: Maximum number of subtopics to generate or consider. Defaults to <code>3</code>.</li><li><strong><code>SCRAPER</code></strong>: Web scraper to use for gathering information. Defaults to <code>bs</code> (BeautifulSoup). You can also use <a href="https://github.com/codelucas/newspaper" target="_blank" rel="noopener noreferrer">newspaper</a>.</li><li><strong><code>DOC_PATH</code></strong>: Path to read and research local documents. Defaults to an empty string indicating no path specified.</li><li><strong><code>USER_AGENT</code></strong>: Custom User-Agent string for web crawling and web requests.</li><li><strong><code>MEMORY_BACKEND</code></strong>: Backend used for memory operations, such as local storage of temporary data. Defaults to <code>local</code>.</li></ul><p>To change the default configurations, you can simply add env variables to your <code>.env</code> file as named above or export manually in your local project directory.</p><p>For example, to manually change the search engine and report format:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">bing</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">REPORT_FORMAT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">IEEE</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Please note that you might need to export additional env vars and obtain API keys for other supported search retrievers and LLM providers. Please follow your console logs for further assistance. To learn more about additional LLM support you can check out the docs <a href="/docs/gpt-researcher/llms/llms">here</a>.</p><p>You can also include your own external JSON file <code>config.json</code> by adding the path in the <code>config_file</code> param.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="example-azure-openai-configuration">Example: Azure OpenAI Configuration<a aria-hidden="true" class="hash-link" href="#example-azure-openai-configuration" title="Direct link to heading"></a></h2><p>If you are not using OpenAI's models, but other model providers, besides the general configuration above, also additional environment variables are required. Check the <a href="https://python.langchain.com/v0.2/docs/integrations/platforms/" target="_blank" rel="noopener noreferrer">langchain documentation</a> about your model for the exact configuration of the API keys and endpoints.</p><p>Here is an example for <a href="https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models" target="_blank" rel="noopener noreferrer">Azure OpenAI</a> configuration:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_VERSION</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"2024-05-01-preview"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># or whatever you are using</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">AZURE_OPENAI_ENDPOINT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"https://CHANGEMEN.openai.azure.com/"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># change to the name of your deployment</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">AZURE_OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"[Your Key]"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># change to your API key</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"azure_openai:text-embedding-ada-002"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># change to the deployment of your embedding model</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"azure_openai:gpt-4o-mini"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># change to the name of your deployment (not model-name)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_TOKEN_LIMIT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">4000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"azure_openai:gpt-4o"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># change to the name of your deployment (not model-name)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_TOKEN_LIMIT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">4000</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bing"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># if you are using Bing as your search engine (which is likely if you use Azure)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">BING_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"[Your Key]"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/config.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/example"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Agent Example</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/scraping"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Scraping Options<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#example-azure-openai-configuration" class="table-of-contents__link toc-highlight">Example: Azure OpenAI Configuration</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/example.html b/docs/gpt-researcher/gptr/example.html index ce2e5f910..cf0a05999 100644 --- a/docs/gpt-researcher/gptr/example.html +++ b/docs/gpt-researcher/gptr/example.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Agent Example | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/example"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Agent Example | GPT Researcher"><meta data-react-helmet="true" name="description" content="If you're interested in using GPT Researcher as a standalone agent, you can easily import it into any existing Python project. Below, is an example of calling the agent to generate a research report:"><meta data-react-helmet="true" property="og:description" content="If you're interested in using GPT Researcher as a standalone agent, you can easily import it into any existing Python project. Below, is an example of calling the agent to generate a research report:"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/example"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/example" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/example" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Agent Example</h1></header><p>If you're interested in using GPT Researcher as a standalone agent, you can easily import it into any existing Python project. Below, is an example of calling the agent to generate a research report:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">fetch_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> Fetch a research report based on the provided query and report type.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> """</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">generate_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> This is a sample script that executes an async main function to run a research report.</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)"> """</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> fetch_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> QUERY </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What happened in the latest burning man floods?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">generate_research_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">QUERY</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>You can further enhance this example to use the returned report as context for generating valuable content such as news article, marketing content, email templates, newsletters, etc.</p><p>You can also use GPT Researcher to gather information about code documentation, business analysis, financial information and more. All of which can be used to complete much more complex tasks that require factual and high quality realtime information.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/example.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/pip-package"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->PIP Package</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/config"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Configuration<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/handling-logs-as-they-stream.html b/docs/gpt-researcher/gptr/handling-logs-as-they-stream.html index 1e707be0a..c8f5a4068 100644 --- a/docs/gpt-researcher/gptr/handling-logs-as-they-stream.html +++ b/docs/gpt-researcher/gptr/handling-logs-as-they-stream.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Handling Logs | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/handling-logs-as-they-stream"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Handling Logs | GPT Researcher"><meta data-react-helmet="true" name="description" content="Here is a snippet of code to help you handle the streaming logs of your Research tasks."><meta data-react-helmet="true" property="og:description" content="Here is a snippet of code to help you handle the streaming logs of your Research tasks."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/handling-logs-as-they-stream"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/handling-logs-as-they-stream" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/handling-logs-as-they-stream" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Handling Logs</h1></header><p>Here is a snippet of code to help you handle the streaming logs of your Research tasks.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> typing </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> Any</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">CustomLogsHandler</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""A custom Logs handler class to handle JSON data."""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">logs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize logs to store data</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">send_json</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> Dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> Any</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token triple-quoted-string string" style="color:rgb(195, 232, 141)">"""Send JSON data and log it."""</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">logs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">append</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Append data to logs</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"My custom Log: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">data</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># For demonstration, print the log</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define the necessary parameters with sample values</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"What happened in the latest burning man floods?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Type of report to generate</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"online"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Could specify source like 'online', 'books', etc.</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tone </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"informative"</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Tone of the report ('informative', 'casual', etc.)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> config_path </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Path to a config file, if needed</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize researcher with a custom WebSocket</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> custom_logs_handler </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> CustomLogsHandler</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">report_source</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tone</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tone</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> config_path</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">config_path</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> websocket</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">custom_logs_handler</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct the research</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Write the research report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Run the asynchronous function using asyncio</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The data from the research process will be logged and stored in the <code>CustomLogsHandler</code> instance. You can customize the logging behavior as needed for your application.</p><p>Here's a sample of the output:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">{</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> "type": "logs",</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> "content": "added_source_url",</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> "output": "✅ Added source url to research: https://www.npr.org/2023/09/28/1202110410/how-rumors-and-conspiracy-theories-got-in-the-way-of-mauis-fire-recovery\n",</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> "metadata": "https://www.npr.org/2023/09/28/1202110410/how-rumors-and-conspiracy-theories-got-in-the-way-of-mauis-fire-recovery"</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The <code>metadata</code> field will include whatever metadata is relevant to the log entry. Let the script above run to completion for the full logs output of a given research task.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/handling-logs-as-they-stream.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/scraping"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Scraping Options</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/querying-the-backend"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Querying the Backend<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/pip-package.html b/docs/gpt-researcher/gptr/pip-package.html index 6f556515b..360cef7c5 100644 --- a/docs/gpt-researcher/gptr/pip-package.html +++ b/docs/gpt-researcher/gptr/pip-package.html @@ -7,14 +7,14 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">PIP Package | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="PIP Package | GPT Researcher"><meta data-react-helmet="true" name="description" content="PyPI version"><meta data-react-helmet="true" property="og:description" content="PyPI version"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>PIP Package</h1></header><p><a href="https://badge.fury.io/py/gpt-researcher" target="_blank" rel="noopener noreferrer"><img src="https://badge.fury.io/py/gpt-researcher.svg" alt="PyPI version"></a> <a href="https://colab.research.google.com/github/assafelovic/gpt-researcher/blob/master/docs/docs/examples/pip-run.ipynb" target="_blank" rel="noopener noreferrer"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></p><p>🌟 <strong>Exciting News!</strong> Now, you can integrate <code>gpt-researcher</code> with your apps seamlessly!</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="steps-to-install-gpt-researcher">Steps to Install GPT Researcher<a aria-hidden="true" class="hash-link" href="#steps-to-install-gpt-researcher" title="Direct link to heading"></a></h2><p>Follow these easy steps to get started:</p><ol start="0"><li><strong>Pre-requisite</strong>: Ensure Python 3.10+ is installed on your machine 💻</li><li><strong>Install gpt-researcher</strong>: Grab the official package from <a href="https://pypi.org/project/gpt-researcher/" target="_blank" rel="noopener noreferrer">PyPi</a>.</li></ol><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> gpt-researcher</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><ol start="2"><li><strong>Environment Variables:</strong> Create a .env file with your OpenAI API key or simply export it</li></ol><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">Your OpenAI API Key here</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">Your Tavily API Key here</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><ol start="3"><li><strong>Start using GPT Researcher in your own codebase</strong></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="example-usage">Example Usage<a aria-hidden="true" class="hash-link" href="#example-usage" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Get additional information</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_context </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_costs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_images </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_sources </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> research_sources</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"what team may win the NBA finals?"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> sources </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"Report:"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"\nResearch Costs:"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"\nNumber of Research Images:"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"\nNumber of Research Sources:"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="specific-examples">Specific Examples<a aria-hidden="true" class="hash-link" href="#specific-examples" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="example-1-research-report">Example 1: Research Report<a aria-hidden="true" class="hash-link" href="#example-1-research-report" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Latest developments in renewable energy technologies"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="example-2-resource-report">Example 2: Resource Report<a aria-hidden="true" class="hash-link" href="#example-2-resource-report" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"List of top AI conferences in 2023"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"resource_report"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="example-3-outline-report">Example 3: Outline Report<a aria-hidden="true" class="hash-link" href="#example-3-outline-report" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Outline for an article on the impact of AI in education"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">report_type </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"outline_report"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="integration-with-web-frameworks">Integration with Web Frameworks<a aria-hidden="true" class="hash-link" href="#integration-with-web-frameworks" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="fastapi-example">FastAPI Example<a aria-hidden="true" class="hash-link" href="#fastapi-example" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> fastapi </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> FastAPI</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">app </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> FastAPI</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">@app</span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">get</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"/report/{report_type}"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> source_urls </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_source_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_costs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_images </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_sources </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"source_urls"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> source_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_costs"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> research_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"num_images"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"num_sources"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">research_sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Run the server</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># uvicorn main:app --reload</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="flask-example">Flask Example<a aria-hidden="true" class="hash-link" href="#flask-example" title="Direct link to heading"></a></h3><p><strong>Pre-requisite</strong>: Install flask with the async extra.</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'flask[async]'</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> flask </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Flask</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> request</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> jsonify</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GPTResearcher</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">app </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Flask</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">__name__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">@app</span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token decorator annotation punctuation" style="color:rgb(199, 146, 234)">route</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'/report/<report_type>'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> methods</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">'GET'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">get_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> request</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'query'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> report_type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> source_urls </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_source_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_costs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_images </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_sources </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">return</span><span class="token plain"> jsonify</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"source_urls"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> source_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"research_costs"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> research_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"num_images"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"num_sources"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">len</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">research_sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Run the server</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># flask run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p><strong>Run the server</strong></p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">flask run</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p><strong>Example Request</strong></p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">curl</span><span class="token plain"> -X GET </span><span class="token string" style="color:rgb(195, 232, 141)">"http://localhost:5000/report/research_report?query=what team may win the nba finals?"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="getters-and-setters">Getters and Setters<a aria-hidden="true" class="hash-link" href="#getters-and-setters" title="Direct link to heading"></a></h2><p>GPT Researcher provides several methods to retrieve additional information about the research process:</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="get-research-sources">Get Research Sources<a aria-hidden="true" class="hash-link" href="#get-research-sources" title="Direct link to heading"></a></h3><p>Sources are the URLs that were used to gather information for the research.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">source_urls </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_source_urls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="get-research-context">Get Research Context<a aria-hidden="true" class="hash-link" href="#get-research-context" title="Direct link to heading"></a></h3><p>Context is all the retrieved information from the research. It includes the sources and their corresponding content.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">research_context </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="get-research-costs">Get Research Costs<a aria-hidden="true" class="hash-link" href="#get-research-costs" title="Direct link to heading"></a></h3><p>Costs are the number of tokens consumed during the research process.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">research_costs </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="get-research-images">Get Research Images<a aria-hidden="true" class="hash-link" href="#get-research-images" title="Direct link to heading"></a></h3><p>Retrieves a list of images found during the research process.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">research_images </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_images</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="get-research-sources-1">Get Research Sources<a aria-hidden="true" class="hash-link" href="#get-research-sources-1" title="Direct link to heading"></a></h3><p>Retrieves a list of research sources, including title, content, and images.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">research_sources </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_sources</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="set-verbose">Set Verbose<a aria-hidden="true" class="hash-link" href="#set-verbose" title="Direct link to heading"></a></h3><p>You can set the verbose mode to get more detailed logs.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">set_verbose</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="add-costs">Add Costs<a aria-hidden="true" class="hash-link" href="#add-costs" title="Direct link to heading"></a></h3><p>You can also add costs to the research process if you want to track the costs from external usage.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">add_costs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token number" style="color:rgb(247, 140, 108)">0.22</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="advanced-usage">Advanced Usage<a aria-hidden="true" class="hash-link" href="#advanced-usage" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="customizing-the-research-process">Customizing the Research Process<a aria-hidden="true" class="hash-link" href="#customizing-the-research-process" title="Direct link to heading"></a></h3><p>You can customize various aspects of the research process by passing additional parameters when initializing the GPTResearcher:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> GPTResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> query</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"Your research query"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"research_report"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report_format</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"APA"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> tone</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"formal and objective"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> max_subtopics</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">5</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> verbose</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="handling-research-results">Handling Research Results<a aria-hidden="true" class="hash-link" href="#handling-research-results" title="Direct link to heading"></a></h3><p>After conducting research, you can process the results in various ways:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Conduct research</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">research_result </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">conduct_research</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Generate a report</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Generate a conclusion</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conclusion </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">write_report_conclusion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">report</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Get subtopics</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">subtopics </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_subtopics</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Get draft section titles for a subtopic</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">draft_titles </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_draft_section_titles</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"Subtopic name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="working-with-research-context">Working with Research Context<a aria-hidden="true" class="hash-link" href="#working-with-research-context" title="Direct link to heading"></a></h3><p>You can use the research context for further processing or analysis:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Get the full research context</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">context </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_research_context</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Get similar written contents based on draft section titles</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">similar_contents </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_similar_written_contents_by_draft_section_titles</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> current_subtopic</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"Subtopic name"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> draft_section_titles</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">"Title 1"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Title 2"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> written_contents</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">some_written_contents</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> max_results</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">10</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>This comprehensive documentation should help users understand and utilize the full capabilities of the GPT Researcher package.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/pip-package.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/linux-deployment"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Running on Linux</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/example"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Agent Example<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#steps-to-install-gpt-researcher" class="table-of-contents__link toc-highlight">Steps to Install GPT Researcher</a></li><li><a href="#example-usage" class="table-of-contents__link toc-highlight">Example Usage</a></li><li><a href="#specific-examples" class="table-of-contents__link toc-highlight">Specific Examples</a><ul><li><a href="#example-1-research-report" class="table-of-contents__link toc-highlight">Example 1: Research Report</a></li><li><a href="#example-2-resource-report" class="table-of-contents__link toc-highlight">Example 2: Resource Report</a></li><li><a href="#example-3-outline-report" class="table-of-contents__link toc-highlight">Example 3: Outline Report</a></li></ul></li><li><a href="#integration-with-web-frameworks" class="table-of-contents__link toc-highlight">Integration with Web Frameworks</a><ul><li><a href="#fastapi-example" class="table-of-contents__link toc-highlight">FastAPI Example</a></li><li><a href="#flask-example" class="table-of-contents__link toc-highlight">Flask Example</a></li></ul></li><li><a href="#getters-and-setters" class="table-of-contents__link toc-highlight">Getters and Setters</a><ul><li><a href="#get-research-sources" class="table-of-contents__link toc-highlight">Get Research Sources</a></li><li><a href="#get-research-context" class="table-of-contents__link toc-highlight">Get Research Context</a></li><li><a href="#get-research-costs" class="table-of-contents__link toc-highlight">Get Research Costs</a></li><li><a href="#get-research-images" class="table-of-contents__link toc-highlight">Get Research Images</a></li><li><a href="#get-research-sources-1" class="table-of-contents__link toc-highlight">Get Research Sources</a></li><li><a href="#set-verbose" class="table-of-contents__link toc-highlight">Set Verbose</a></li><li><a href="#add-costs" class="table-of-contents__link toc-highlight">Add Costs</a></li></ul></li><li><a href="#advanced-usage" class="table-of-contents__link toc-highlight">Advanced Usage</a><ul><li><a href="#customizing-the-research-process" class="table-of-contents__link toc-highlight">Customizing the Research Process</a></li><li><a href="#handling-research-results" class="table-of-contents__link toc-highlight">Handling Research Results</a></li><li><a href="#working-with-research-context" class="table-of-contents__link toc-highlight">Working with Research Context</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/querying-the-backend.html b/docs/gpt-researcher/gptr/querying-the-backend.html index 7cb68c7bd..6e2bd514a 100644 --- a/docs/gpt-researcher/gptr/querying-the-backend.html +++ b/docs/gpt-researcher/gptr/querying-the-backend.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Querying the Backend | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/querying-the-backend"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Querying the Backend | GPT Researcher"><meta data-react-helmet="true" name="description" content="Introduction"><meta data-react-helmet="true" property="og:description" content="Introduction"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/querying-the-backend"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/querying-the-backend" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/querying-the-backend" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Querying the Backend</h1></header><h2 class="anchor anchorWithStickyNavbar_y2LR" id="introduction">Introduction<a aria-hidden="true" class="hash-link" href="#introduction" title="Direct link to heading"></a></h2><p>In this section, we will discuss how to query the GPTR backend server. The GPTR backend server is a Python server that runs the GPTR Python package. The server listens for WebSocket connections and processes incoming messages to generate reports, streaming back logs and results to the client.</p><p>An example WebSocket client is implemented in the <code>gptr-webhook.js</code> file below.</p><p>This function sends a Webhook Message to the GPTR Python backend running on localhost:8000, but this example can also be modified to query a <a href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment" target="_blank" rel="noopener noreferrer">GPTR Server hosted on Linux</a>.</p><p>// gptr-webhook.js</p><div class="codeBlockContainer_J+bg language-javascript"><div class="codeBlockContent_csEI javascript"><pre tabindex="0" class="prism-code language-javascript codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> </span><span class="token maybe-class-name">WebSocket</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">require</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'ws'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">let</span><span class="token plain"> socket </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword null nil" style="font-style:italic">null</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">let</span><span class="token plain"> responseCallback </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword null nil" style="font-style:italic">null</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">initializeWebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">!</span><span class="token plain">socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> host </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'localhost:8000'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> ws_uri </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token template-string template-punctuation string" style="color:rgb(195, 232, 141)">`</span><span class="token template-string string" style="color:rgb(195, 232, 141)">ws://</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(199, 146, 234)">${</span><span class="token template-string interpolation">host</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token template-string string" style="color:rgb(195, 232, 141)">/ws</span><span class="token template-string template-punctuation string" style="color:rgb(195, 232, 141)">`</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">WebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">ws_uri</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method-variable function-variable method function property-access" style="color:rgb(130, 170, 255)">onopen</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'WebSocket connection established'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method-variable function-variable method function property-access" style="color:rgb(130, 170, 255)">onmessage</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token parameter">event</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> data </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token known-class-name class-name" style="color:rgb(255, 203, 107)">JSON</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">parse</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">event</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'WebSocket data received:'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">content</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">===</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'dev_team_result'</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">&&</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">rubber_ducker_thoughts</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">!=</span><span class="token plain"> </span><span class="token keyword nil" style="font-style:italic">undefined</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">&&</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">tech_lead_review</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">!=</span><span class="token plain"> </span><span class="token keyword nil" style="font-style:italic">undefined</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">responseCallback</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">responseCallback</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">output</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> responseCallback </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword null nil" style="font-style:italic">null</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">// Clear callback after use</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">else</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'Received data:'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method-variable function-variable method function property-access" style="color:rgb(130, 170, 255)">onclose</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'WebSocket connection closed'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword null nil" style="font-style:italic">null</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method-variable function-variable method function property-access" style="color:rgb(130, 170, 255)">onerror</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token parameter">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'WebSocket error:'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> error</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">sendWebhookMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token parameter">message</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">return</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">Promise</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token parameter">resolve</span><span class="token parameter punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token parameter"> reject</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token operator" style="color:rgb(137, 221, 255)">!</span><span class="token plain">socket </span><span class="token operator" style="color:rgb(137, 221, 255)">||</span><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">readyState</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">!==</span><span class="token plain"> </span><span class="token maybe-class-name">WebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token constant" style="color:rgb(130, 170, 255)">OPEN</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">initializeWebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> data </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token literal-property property">task</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> message</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token literal-property property">report_type</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'dev_team'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token literal-property property">report_source</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'web'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token literal-property property">tone</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'Objective'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token literal-property property">headers</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token literal-property property">repo_name</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'elishakay/gpt-researcher'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> payload </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"start "</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">+</span><span class="token plain"> </span><span class="token known-class-name class-name" style="color:rgb(255, 203, 107)">JSON</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">stringify</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(130, 170, 255)">responseCallback</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token parameter">response</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">resolve</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">response</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic">// Resolve the promise with the WebSocket response</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">readyState</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">===</span><span class="token plain"> </span><span class="token maybe-class-name">WebSocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token constant" style="color:rgb(130, 170, 255)">OPEN</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">send</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">payload</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'Message sent:'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> payload</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">else</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method-variable function-variable method function property-access" style="color:rgb(130, 170, 255)">onopen</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:rgb(137, 221, 255)">=></span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> socket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">send</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">payload</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'Message sent after connection:'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> payload</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">module</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token property-access">exports</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sendWebhookMessage</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>And here's how you can leverage this helper function:</p><div class="codeBlockContainer_J+bg language-javascript"><div class="codeBlockContent_csEI javascript"><pre tabindex="0" class="prism-code language-javascript codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"> sendWebhookMessage </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">require</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'./gptr-webhook'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">main</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> message </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">'How do I get started with GPT-Researcher Websockets?'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">const</span><span class="token plain"> response </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword control-flow" style="font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">sendWebhookMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">message</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token console class-name" style="color:rgb(255, 203, 107)">console</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token method function property-access" style="color:rgb(130, 170, 255)">log</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">'Response:'</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> response</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/querying-the-backend.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Handling Logs</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/automated-tests"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Automated Tests<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#introduction" class="table-of-contents__link toc-highlight">Introduction</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/scraping.html b/docs/gpt-researcher/gptr/scraping.html index 936028ed4..1d725d069 100644 --- a/docs/gpt-researcher/gptr/scraping.html +++ b/docs/gpt-researcher/gptr/scraping.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Scraping Options | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/scraping"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Scraping Options | GPT Researcher"><meta data-react-helmet="true" name="description" content="GPT Researcher now offers two methods for web scraping: static scraping with BeautifulSoup and dynamic scraping with Selenium. This document explains how to switch between these methods and the benefits of each approach."><meta data-react-helmet="true" property="og:description" content="GPT Researcher now offers two methods for web scraping: static scraping with BeautifulSoup and dynamic scraping with Selenium. This document explains how to switch between these methods and the benefits of each approach."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/scraping"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/scraping" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/scraping" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">GPT Researcher</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/pip-package">PIP Package</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/example">Agent Example</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/config">Configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/gptr/scraping">Scraping Options</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream">Handling Logs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/querying-the-backend">Querying the Backend</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/automated-tests">Automated Tests</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/gptr/troubleshooting">Troubleshooting</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Scraping Options</h1></header><p>GPT Researcher now offers two methods for web scraping: static scraping with BeautifulSoup and dynamic scraping with Selenium. This document explains how to switch between these methods and the benefits of each approach.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="configuring-scraping-method">Configuring Scraping Method<a aria-hidden="true" class="hash-link" href="#configuring-scraping-method" title="Direct link to heading"></a></h2><p>You can choose your preferred scraping method by setting the <code>SCRAPER</code> environment variable:</p><ol><li><p>For BeautifulSoup (static scraping):</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">export SCRAPER="bs"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>For Selenium (dynamic browser scraping):</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">export SCRAPER="browser"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li></ol><p>Note: If not set, GPT Researcher will default to BeautifulSoup for scraping.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="scraping-methods-explained">Scraping Methods Explained<a aria-hidden="true" class="hash-link" href="#scraping-methods-explained" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="beautifulsoup-static-scraping">BeautifulSoup (Static Scraping)<a aria-hidden="true" class="hash-link" href="#beautifulsoup-static-scraping" title="Direct link to heading"></a></h3><p>When <code>SCRAPER="bs"</code>, GPT Researcher uses BeautifulSoup for static scraping. This method:</p><ul><li>Sends a single HTTP request to fetch the page content</li><li>Parses the static HTML content</li><li>Extracts text and data from the parsed HTML</li></ul><p>Benefits:</p><ul><li>Faster and more lightweight</li><li>Doesn't require additional setup</li><li>Works well for simple, static websites</li></ul><p>Limitations:</p><ul><li>Cannot handle dynamic content loaded by JavaScript</li><li>May miss content that requires user interaction to display</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="selenium-browser-scraping">Selenium (Browser Scraping)<a aria-hidden="true" class="hash-link" href="#selenium-browser-scraping" title="Direct link to heading"></a></h3><p>When <code>SCRAPER="browser"</code>, GPT Researcher uses Selenium for dynamic scraping. This method:</p><ul><li>Opens a real browser instance (Chrome by default)</li><li>Loads the page and executes JavaScript</li><li>Waits for dynamic content to load</li><li>Extracts text and data from the fully rendered page</li></ul><p>Benefits:</p><ul><li>Can scrape dynamically loaded content</li><li>Simulates real user interactions (scrolling, clicking, etc.)</li><li>Works well for complex, JavaScript-heavy websites</li></ul><p>Limitations:</p><ul><li>Slower than static scraping</li><li>Requires more system resources</li><li>Requires additional setup (Selenium and WebDriver installation)</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="additional-setup-for-selenium">Additional Setup for Selenium<a aria-hidden="true" class="hash-link" href="#additional-setup-for-selenium" title="Direct link to heading"></a></h2><p>If you choose to use Selenium (SCRAPER="browser"), you'll need to:</p><ol><li><p>Install the Selenium package:</p><div class="codeBlockContainer_J+bg"><div class="codeBlockContent_csEI"><pre tabindex="0" class="prism-code language-undefined codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip install selenium</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li><p>Download the appropriate WebDriver for your browser:</p><ul><li>For Chrome: <a href="https://sites.google.com/a/chromium.org/chromedriver/downloads" target="_blank" rel="noopener noreferrer">ChromeDriver</a></li><li>For Firefox: <a href="https://github.com/mozilla/geckodriver/releases" target="_blank" rel="noopener noreferrer">GeckoDriver</a></li><li>For Safari: Built-in, no download required</li></ul><p>Ensure the WebDriver is in your system's PATH.</p></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="choosing-the-right-method">Choosing the Right Method<a aria-hidden="true" class="hash-link" href="#choosing-the-right-method" title="Direct link to heading"></a></h2><ul><li><p>Use BeautifulSoup (static) for:</p><ul><li>Simple websites with mostly static content</li><li>Scenarios where speed is a priority</li><li>When you don't need to interact with the page</li></ul></li><li><p>Use Selenium (dynamic) for:</p><ul><li>Websites with content loaded via JavaScript</li><li>Sites that require scrolling or clicking to load more content</li><li>When you need to simulate user interactions</li></ul></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="troubleshooting">Troubleshooting<a aria-hidden="true" class="hash-link" href="#troubleshooting" title="Direct link to heading"></a></h2><ul><li>If Selenium fails to start, ensure you have the correct WebDriver installed and it's in your system's PATH.</li><li>If you encounter an <code>ImportError</code> related to Selenium, make sure you've installed the Selenium package.</li><li>If the scraper misses expected content, try switching between static and dynamic scraping to see which works better for your target website.</li></ul><p>Remember, the choice between static and dynamic scraping can significantly impact the quality and completeness of the data GPT Researcher can gather. Choose the method that best suits your research needs and the websites you're targeting.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/scraping.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/config"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Configuration</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/handling-logs-as-they-stream"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Handling Logs<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#configuring-scraping-method" class="table-of-contents__link toc-highlight">Configuring Scraping Method</a></li><li><a href="#scraping-methods-explained" class="table-of-contents__link toc-highlight">Scraping Methods Explained</a><ul><li><a href="#beautifulsoup-static-scraping" class="table-of-contents__link toc-highlight">BeautifulSoup (Static Scraping)</a></li><li><a href="#selenium-browser-scraping" class="table-of-contents__link toc-highlight">Selenium (Browser Scraping)</a></li></ul></li><li><a href="#additional-setup-for-selenium" class="table-of-contents__link toc-highlight">Additional Setup for Selenium</a></li><li><a href="#choosing-the-right-method" class="table-of-contents__link toc-highlight">Choosing the Right Method</a></li><li><a href="#troubleshooting" class="table-of-contents__link toc-highlight">Troubleshooting</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/gptr/troubleshooting.html b/docs/gpt-researcher/gptr/troubleshooting.html index 0e73c7649..7301cb917 100644 --- a/docs/gpt-researcher/gptr/troubleshooting.html +++ b/docs/gpt-researcher/gptr/troubleshooting.html @@ -7,8 +7,8 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Troubleshooting | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/gptr/troubleshooting"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Troubleshooting | GPT Researcher"><meta data-react-helmet="true" name="description" content="We're constantly working to provide a more stable version. If you're running into any issues, please first check out the resolved issues or ask us via our Discord community."><meta data-react-helmet="true" property="og:description" content="We're constantly working to provide a more stable version. If you're running into any issues, please first check out the resolved issues or ask us via our Discord community."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/troubleshooting"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/troubleshooting" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/gptr/troubleshooting" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> @@ -24,7 +24,7 @@ <code>python3.11 -m uvicorn main:app --reload</code></li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="error-processing-the-url">Error processing the url<a aria-hidden="true" class="hash-link" href="#error-processing-the-url" title="Direct link to heading"></a></h3><p>We're using <a href="https://www.selenium.dev" target="_blank" rel="noopener noreferrer">Selenium</a> for site scraping. Some sites fail to be scraped. In these cases, restart and try running again.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="chrome-version-issues">Chrome version issues<a aria-hidden="true" class="hash-link" href="#chrome-version-issues" title="Direct link to heading"></a></h3><p>Many users have an issue with their chromedriver because the latest chrome browser version doesn't have a compatible chrome driver yet.</p><p>To downgrade your Chrome web browser using <a href="https://www.slimjet.com/chrome/google-chrome-old-version.php" target="_blank" rel="noopener noreferrer">slimjet</a>, follow these steps. First, visit the website and scroll down to find the list of available older Chrome versions. Choose the version you wish to install making sure it's compatible with your operating system. Once you've selected the desired version, click on the corresponding link to download the installer. Before proceeding with the installation, it's crucial to uninstall your current version of Chrome to avoid conflicts.</p><p>It's important to check if the version you downgrade to, has a chromedriver available in the official <a href="https://chromedriver.chromium.org/downloads" target="_blank" rel="noopener noreferrer">chrome driver website</a></p><p><strong>If none of the above work, you can <a href="https://app.tavily.com" target="_blank" rel="noopener noreferrer">try out our hosted beta</a></strong></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/gptr/troubleshooting.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/gptr/automated-tests"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Automated Tests</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/frontend/frontend"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Frontend Application<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#model-gpt-4-does-not-exist" class="table-of-contents__link toc-highlight">model: gpt-4 does not exist</a></li><li><a href="#cannot-load-library-gobject-20-0" class="table-of-contents__link toc-highlight">cannot load library 'gobject-2.0-0'</a></li><li><a href="#cannot-load-library-pango" class="table-of-contents__link toc-highlight">cannot load library 'pango'</a></li><li><a href="#error-processing-the-url" class="table-of-contents__link toc-highlight">Error processing the url</a></li><li><a href="#chrome-version-issues" class="table-of-contents__link toc-highlight">Chrome version issues</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/llms/llms.html b/docs/gpt-researcher/llms/llms.html index 50a11fcee..d586d2784 100644 --- a/docs/gpt-researcher/llms/llms.html +++ b/docs/gpt-researcher/llms/llms.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Configure LLM | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/llms/llms"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Configure LLM | GPT Researcher"><meta data-react-helmet="true" name="description" content="As described in the introduction, the default LLM and embedding is OpenAI due to its superior performance and speed."><meta data-react-helmet="true" property="og:description" content="As described in the introduction, the default LLM and embedding is OpenAI due to its superior performance and speed."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/llms/llms"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/llms/llms" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/llms/llms" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">LLM Providers</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/llms/llms">Configure LLM</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/llms/running-with-ollama">Running with Ollama</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/llms/testing-your-llm">Testing your LLM</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Configure LLM</h1></header><p>As described in the <a href="/docs/gpt-researcher/gptr/config">introduction</a>, the default LLM and embedding is OpenAI due to its superior performance and speed. -With that said, GPT Researcher supports various open/closed source LLMs and embeddings, and you can easily switch between them by updating the <code>SMART_LLM</code>, <code>FAST_LLM</code> and <code>EMBEDDING</code> env variables. You might also need to include the provider API key and corresponding configuration params.</p><p>Current supported LLMs are <code>openai</code>, <code>anthropic</code>, <code>azure_openai</code>, <code>cohere</code>, <code>google_vertexai</code>, <code>google_genai</code>, <code>fireworks</code>, <code>ollama</code>, <code>together</code>, <code>mistralai</code>, <code>huggingface</code>, <code>groq</code> and <code>bedrock</code>.</p><p>Current supported embeddings are <code>openai</code>, <code>azure_openai</code>, <code>cohere</code>, <code>google_vertexai</code>, <code>google_genai</code>, <code>fireworks</code>, <code>ollama</code>, <code>together</code>, <code>mistralai</code>, <code>huggingface</code>, <code>nomic</code> and <code>voyageai</code>.</p><p>To learn more about support customization options see <a href="/gpt-researcher/config">here</a>.</p><p><strong>Please note</strong>: GPT Researcher is optimized and heavily tested on GPT models. Some other models might run into context limit errors, and unexpected responses. +With that said, GPT Researcher supports various open/closed source LLMs and embeddings, and you can easily switch between them by updating the <code>SMART_LLM</code>, <code>FAST_LLM</code> and <code>EMBEDDING</code> env variables. You might also need to include the provider API key and corresponding configuration params.</p><p>Current supported LLMs are <code>openai</code>, <code>anthropic</code>, <code>azure_openai</code>, <code>cohere</code>, <code>google_vertexai</code>, <code>google_genai</code>, <code>fireworks</code>, <code>ollama</code>, <code>together</code>, <code>mistralai</code>, <code>huggingface</code>, <code>groq</code> and <code>bedrock</code>.</p><p>Current supported embeddings are <code>openai</code>, <code>azure_openai</code>, <code>cohere</code>, <code>google_vertexai</code>, <code>google_genai</code>, <code>fireworks</code>, <code>ollama</code>, <code>together</code>, <code>mistralai</code>, <code>huggingface</code>, <code>nomic</code> ,<code>voyageai</code> and <code>bedrock</code>.</p><p>To learn more about support customization options see <a href="/gpt-researcher/config">here</a>.</p><p><strong>Please note</strong>: GPT Researcher is optimized and heavily tested on GPT models. Some other models might run into context limit errors, and unexpected responses. Please provide any feedback in our <a href="https://discord.gg/DUmbTebB" target="_blank" rel="noopener noreferrer">Discord community</a> channel, so we can better improve the experience and performance.</p><p>Below you can find examples for how to configure the various supported LLMs.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="openai">OpenAI<a aria-hidden="true" class="hash-link" href="#openai" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set the custom OpenAI API key</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your Key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># specify llms</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:gpt-4o-mini"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:gpt-4o"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:o1-preview"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># specify embedding</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:text-embedding-3-small"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="custom-llm">Custom LLM<a aria-hidden="true" class="hash-link" href="#custom-llm" title="Direct link to heading"></a></h2><p>Create a local OpenAI API using <a href="https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md#quick-start" target="_blank" rel="noopener noreferrer">llama.cpp Server</a>.</p><p>For custom LLM, specify "openai:{your-llm}"</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set the custom OpenAI API url</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_BASE_URL</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"http://localhost:1234/v1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set the custom OpenAI API key</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"dummy_key"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># specify custom llms </span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:your_fast_llm"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:your_smart_llm"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:your_strategic_llm"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>For custom embedding, set "custom:{your-embedding}"</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set the custom OpenAI API url</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_BASE_URL</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"http://localhost:1234/v1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># set the custom OpenAI API key</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"dummy_key"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># specify the custom embedding model </span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"custom:your_embedding"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="azure-openai">Azure OpenAI<a aria-hidden="true" class="hash-link" href="#azure-openai" title="Direct link to heading"></a></h2><p>See also the documentation in the Langchain <a href="https://api.python.langchain.com/en/latest/chat_models/langchain_openai.chat_models.azure.AzureChatOpenAI.html" target="_blank" rel="noopener noreferrer">Azure OpenAI</a> page.</p><p>On Azure OpenAI you will need to create deployments for each model you want to use. Please also specify the model names/deployment names in your <code>.env</code> file:</p><p>Required Embedding Model: To ensure optimal performance, GPT Researcher requires the text-embedding-3-large model. Please deploy this specific model to your Azure Endpoint.</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">AZURE_OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your Key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">AZURE_OPENAI_ENDPOINT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">https://</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">your-endpoint</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain">.openai.azure.com/</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_VERSION</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">2024</span><span class="token plain">-05-01-preview</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># note that the deployment name must be the same as the model name</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">azure_openai:gpt-4o-mini </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">azure_openai:gpt-4o</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">azure_openai:o1-preview</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="ollama">Ollama<a aria-hidden="true" class="hash-link" href="#ollama" title="Direct link to heading"></a></h2><p>GPT Researcher supports both Ollama LLMs and embeddings. You can choose each or both. To use <a href="http://www.ollama.com" target="_blank" rel="noopener noreferrer">Ollama</a> you can set the following environment variables</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OLLAMA_BASE_URL</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">http://localhost:11434</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:llama3"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:llama3"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:llama3"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:nomic-embed-text"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="groq">Groq<a aria-hidden="true" class="hash-link" href="#groq" title="Direct link to heading"></a></h2><p>GroqCloud provides advanced AI hardware and software solutions designed to deliver amazingly fast AI inference performance. @@ -21,8 +21,8 @@ <code>GROQ_API_KEY="*********************"</code></p></li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="update-env-vars">Update env vars<a aria-hidden="true" class="hash-link" href="#update-env-vars" title="Direct link to heading"></a></h3><p>And finally, you will need to configure the GPT-Researcher Provider and Model variables:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">GROQ_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your Key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Set one of the LLM models supported by Groq</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"groq:Mixtral-8x7b-32768"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"groq:Mixtral-8x7b-32768"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"groq:Mixtral-8x7b-32768"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p><strong>NOTE:</strong> As of the writing of this Doc (May 2024), the available Language Models from Groq are:</p><ul><li>Llama3-70b-8192</li><li>Llama3-8b-8192</li><li>Mixtral-8x7b-32768</li><li>Gemma-7b-it</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="anthropic">Anthropic<a aria-hidden="true" class="hash-link" href="#anthropic" title="Direct link to heading"></a></h2><p>Refer to Anthropic <a href="https://docs.anthropic.com/en/api/getting-started" target="_blank" rel="noopener noreferrer">Getting started page</a> to obtain Anthropic API key. Update the corresponding env vars, for example:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">ANTHROPIC_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"anthropic:claude-2.1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"anthropic:claude-3-opus-20240229"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"anthropic:claude-3-opus-20240229"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Anthropic does not offer its own embedding model. </p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="mistral-ai">Mistral AI<a aria-hidden="true" class="hash-link" href="#mistral-ai" title="Direct link to heading"></a></h2><p>Sign up for a <a href="https://console.mistral.ai/users/api-keys/" target="_blank" rel="noopener noreferrer">Mistral API key</a>. Then update the corresponding env vars, for example:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">MISTRAL_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"mistralai:open-mistral-7b"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"mistralai:mistral-large-latest"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"mistralai:mistral-large-latest"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"mistralai:mistral-embed"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="together-ai">Together AI<a aria-hidden="true" class="hash-link" href="#together-ai" title="Direct link to heading"></a></h2><p><a href="https://www.together.ai/" target="_blank" rel="noopener noreferrer">Together AI</a> offers an API to query <a href="https://docs.together.ai/docs/inference-models" target="_blank" rel="noopener noreferrer">50+ leading open-source models</a> in a couple lines of code. Then update corresponding env vars, for example:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TOGETHER_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"together:meta-llama/Llama-3-8b-chat-hf"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"together:meta-llama/Llama-3-70b-chat-hf"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"together:meta-llama/Llama-3-70b-chat-hf"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"mistralai:nomic-ai/nomic-embed-text-v1.5"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="huggingface">HuggingFace<a aria-hidden="true" class="hash-link" href="#huggingface" title="Direct link to heading"></a></h2><p>This integration requires a bit of extra work. Follow <a href="https://python.langchain.com/v0.1/docs/integrations/chat/huggingface/" target="_blank" rel="noopener noreferrer">this guide</a> to learn more. -After you've followed the tutorial above, update the env vars:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">HUGGINGFACE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"huggingface:HuggingFaceH4/zephyr-7b-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"huggingface:HuggingFaceH4/zephyr-7b-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"huggingface:HuggingFaceH4/zephyr-7b-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"sentence-transformers/all-MiniLM-L6-v2"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="google-gemini">Google Gemini<a aria-hidden="true" class="hash-link" href="#google-gemini" title="Direct link to heading"></a></h2><p>Sign up <a href="https://ai.google.dev/gemini-api/docs/api-key" target="_blank" rel="noopener noreferrer">here</a> for obtaining a Google Gemini API Key and update the following env vars:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">GOOGLE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:gemini-1.5-flash"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:gemini-1.5-pro"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:gemini-1.5-pro"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:models/text-embedding-004"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="google-vertexai">Google VertexAI<a aria-hidden="true" class="hash-link" href="#google-vertexai" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:gemini-1.5-flash-001"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:gemini-1.5-pro-001"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:gemini-1.5-pro-001"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:text-embedding-004"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="cohere">Cohere<a aria-hidden="true" class="hash-link" href="#cohere" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">COHERE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:command"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:command-nightly"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:command-nightly"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:embed-english-v3.0"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="fireworks">Fireworks<a aria-hidden="true" class="hash-link" href="#fireworks" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FIREWORKS_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">base_url</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"https://api.fireworks.ai/inference/v1/completions"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:nomic-ai/nomic-embed-text-v1.5"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="bedrock">Bedrock<a aria-hidden="true" class="hash-link" href="#bedrock" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:anthropic.claude-3-sonnet-20240229-v1:0"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:anthropic.claude-3-sonnet-20240229-v1:0"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:anthropic.claude-3-sonnet-20240229-v1:0"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="xai">xAI<a aria-hidden="true" class="hash-link" href="#xai" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"xai:grok-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"xai:grok-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"xai:grok-beta"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="other-embedding-models">Other Embedding Models<a aria-hidden="true" class="hash-link" href="#other-embedding-models" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="nomic">Nomic<a aria-hidden="true" class="hash-link" href="#nomic" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"nomic:nomic-embed-text-v1.5"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="voyageai">VoyageAI<a aria-hidden="true" class="hash-link" href="#voyageai" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">VOYAGE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your Key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"voyageai:voyage-law-2"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/llms/llms.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/vector-stores"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Vector Stores</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/running-with-ollama"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Running with Ollama<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#openai" class="table-of-contents__link toc-highlight">OpenAI</a></li><li><a href="#custom-llm" class="table-of-contents__link toc-highlight">Custom LLM</a></li><li><a href="#azure-openai" class="table-of-contents__link toc-highlight">Azure OpenAI</a></li><li><a href="#ollama" class="table-of-contents__link toc-highlight">Ollama</a></li><li><a href="#groq" class="table-of-contents__link toc-highlight">Groq</a><ul><li><a href="#sign-up" class="table-of-contents__link toc-highlight">Sign up</a></li><li><a href="#update-env-vars" class="table-of-contents__link toc-highlight">Update env vars</a></li></ul></li><li><a href="#anthropic" class="table-of-contents__link toc-highlight">Anthropic</a></li><li><a href="#mistral-ai" class="table-of-contents__link toc-highlight">Mistral AI</a></li><li><a href="#together-ai" class="table-of-contents__link toc-highlight">Together AI</a></li><li><a href="#huggingface" class="table-of-contents__link toc-highlight">HuggingFace</a></li><li><a href="#google-gemini" class="table-of-contents__link toc-highlight">Google Gemini</a></li><li><a href="#google-vertexai" class="table-of-contents__link toc-highlight">Google VertexAI</a></li><li><a href="#cohere" class="table-of-contents__link toc-highlight">Cohere</a></li><li><a href="#fireworks" class="table-of-contents__link toc-highlight">Fireworks</a></li><li><a href="#bedrock" class="table-of-contents__link toc-highlight">Bedrock</a></li><li><a href="#xai" class="table-of-contents__link toc-highlight">xAI</a></li><li><a href="#other-embedding-models" class="table-of-contents__link toc-highlight">Other Embedding Models</a><ul><li><a href="#nomic" class="table-of-contents__link toc-highlight">Nomic</a></li><li><a href="#voyageai" class="table-of-contents__link toc-highlight">VoyageAI</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +After you've followed the tutorial above, update the env vars:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">HUGGINGFACE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"huggingface:HuggingFaceH4/zephyr-7b-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"huggingface:HuggingFaceH4/zephyr-7b-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"huggingface:HuggingFaceH4/zephyr-7b-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"sentence-transformers/all-MiniLM-L6-v2"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="google-gemini">Google Gemini<a aria-hidden="true" class="hash-link" href="#google-gemini" title="Direct link to heading"></a></h2><p>Sign up <a href="https://ai.google.dev/gemini-api/docs/api-key" target="_blank" rel="noopener noreferrer">here</a> for obtaining a Google Gemini API Key and update the following env vars:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">GOOGLE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:gemini-1.5-flash"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:gemini-1.5-pro"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:gemini-1.5-pro"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_genai:models/text-embedding-004"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="google-vertexai">Google VertexAI<a aria-hidden="true" class="hash-link" href="#google-vertexai" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:gemini-1.5-flash-001"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:gemini-1.5-pro-001"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:gemini-1.5-pro-001"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"google_vertexai:text-embedding-004"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="cohere">Cohere<a aria-hidden="true" class="hash-link" href="#cohere" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">COHERE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:command"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:command-nightly"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:command-nightly"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"cohere:embed-english-v3.0"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="fireworks">Fireworks<a aria-hidden="true" class="hash-link" href="#fireworks" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FIREWORKS_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">base_url</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"https://api.fireworks.ai/inference/v1/completions"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"fireworks:nomic-ai/nomic-embed-text-v1.5"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="bedrock">Bedrock<a aria-hidden="true" class="hash-link" href="#bedrock" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:anthropic.claude-3-sonnet-20240229-v1:0"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:anthropic.claude-3-sonnet-20240229-v1:0"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:anthropic.claude-3-sonnet-20240229-v1:0"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"bedrock:amazon.titan-embed-text-v2:0"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="xai">xAI<a aria-hidden="true" class="hash-link" href="#xai" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"xai:grok-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"xai:grok-beta"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">STRATEGIC_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"xai:grok-beta"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="other-embedding-models">Other Embedding Models<a aria-hidden="true" class="hash-link" href="#other-embedding-models" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_y2LR" id="nomic">Nomic<a aria-hidden="true" class="hash-link" href="#nomic" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"nomic:nomic-embed-text-v1.5"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="voyageai">VoyageAI<a aria-hidden="true" class="hash-link" href="#voyageai" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">VOYAGE_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">Your Key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"voyageai:voyage-law-2"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/llms/llms.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/context/vector-stores"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Vector Stores</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/running-with-ollama"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Running with Ollama<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#openai" class="table-of-contents__link toc-highlight">OpenAI</a></li><li><a href="#custom-llm" class="table-of-contents__link toc-highlight">Custom LLM</a></li><li><a href="#azure-openai" class="table-of-contents__link toc-highlight">Azure OpenAI</a></li><li><a href="#ollama" class="table-of-contents__link toc-highlight">Ollama</a></li><li><a href="#groq" class="table-of-contents__link toc-highlight">Groq</a><ul><li><a href="#sign-up" class="table-of-contents__link toc-highlight">Sign up</a></li><li><a href="#update-env-vars" class="table-of-contents__link toc-highlight">Update env vars</a></li></ul></li><li><a href="#anthropic" class="table-of-contents__link toc-highlight">Anthropic</a></li><li><a href="#mistral-ai" class="table-of-contents__link toc-highlight">Mistral AI</a></li><li><a href="#together-ai" class="table-of-contents__link toc-highlight">Together AI</a></li><li><a href="#huggingface" class="table-of-contents__link toc-highlight">HuggingFace</a></li><li><a href="#google-gemini" class="table-of-contents__link toc-highlight">Google Gemini</a></li><li><a href="#google-vertexai" class="table-of-contents__link toc-highlight">Google VertexAI</a></li><li><a href="#cohere" class="table-of-contents__link toc-highlight">Cohere</a></li><li><a href="#fireworks" class="table-of-contents__link toc-highlight">Fireworks</a></li><li><a href="#bedrock" class="table-of-contents__link toc-highlight">Bedrock</a></li><li><a href="#xai" class="table-of-contents__link toc-highlight">xAI</a></li><li><a href="#other-embedding-models" class="table-of-contents__link toc-highlight">Other Embedding Models</a><ul><li><a href="#nomic" class="table-of-contents__link toc-highlight">Nomic</a></li><li><a href="#voyageai" class="table-of-contents__link toc-highlight">VoyageAI</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/llms/running-with-ollama.html b/docs/gpt-researcher/llms/running-with-ollama.html index c80158ff7..fdf246e91 100644 --- a/docs/gpt-researcher/llms/running-with-ollama.html +++ b/docs/gpt-researcher/llms/running-with-ollama.html @@ -7,14 +7,14 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Running with Ollama | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/llms/running-with-ollama"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Running with Ollama | GPT Researcher"><meta data-react-helmet="true" name="description" content="Ollama is a platform that allows you to deploy and manage custom language models. This guide will walk you through deploying a custom language model on Ollama."><meta data-react-helmet="true" property="og:description" content="Ollama is a platform that allows you to deploy and manage custom language models. This guide will walk you through deploying a custom language model on Ollama."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/llms/running-with-ollama"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/llms/running-with-ollama" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/llms/running-with-ollama" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">LLM Providers</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/llms/llms">Configure LLM</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/llms/running-with-ollama">Running with Ollama</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/llms/testing-your-llm">Testing your LLM</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Running with Ollama</h1></header><p>Ollama is a platform that allows you to deploy and manage custom language models. This guide will walk you through deploying a custom language model on Ollama.</p><p>Read on to understand how to install a Custom LLM with the Ollama WebUI, and how to query it with GPT-Researcher.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="fetching-the-desired-llm-models">Fetching the Desired LLM Models<a aria-hidden="true" class="hash-link" href="#fetching-the-desired-llm-models" title="Direct link to heading"></a></h2><p>After deploying Ollama WebUI, you'll want to enter the <a href="https://github.com/open-webui/open-webui/tree/main" target="_blank" rel="noopener noreferrer">Open WebUI Admin App</a> & download a custom LLM.</p><p>Choose a model from <a href="https://ollama.com/library?sort=popular" target="_blank" rel="noopener noreferrer">Ollama's Library of LLM's</a></p><p>Paste the model name & size into the Web UI:</p><img width="1511" alt="Screen Shot 2024-08-27 at 23 26 28" src="https://github.com/user-attachments/assets/32abd048-745c-4232-9f1f-6af265cff250"><p>For our example, let's choose to download the <code>qwen2:1.5b</code> model.</p><p>This model now automatically becomes available via your Server's out-of-the-box API - we'll leverage it within our GPT-Researcher .env file in the next step.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="querying-your-custom-llm-with-gpt-researcher">Querying your Custom LLM with GPT-Researcher<a aria-hidden="true" class="hash-link" href="#querying-your-custom-llm-with-gpt-researcher" title="Direct link to heading"></a></h2><p>If you deploy ollama locally, a .env like so, should enable powering GPT-Researcher with Ollama:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"123"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_BASE</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"http://127.0.0.1:11434/v1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OLLAMA_BASE_URL</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"http://127.0.0.1:11434/"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:qwen2:1.5b"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:qwen2:1.5b"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:all-minilm:22m"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Replace <code>FAST_LLM</code> & <code>SMART_LLM</code> with the model you downloaded from the Elestio Web UI in the previous step.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="run-llm-test-script-for-gptr">Run LLM Test Script for GPTR<a aria-hidden="true" class="hash-link" href="#run-llm-test-script-for-gptr" title="Direct link to heading"></a></h2><p>And here's a custom python script you can use to query your custom LLM:</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> os</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> logging</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">logging</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">basicConfig</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">level</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">logging</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">DEBUG</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">llm_provider</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">generic </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> GenericLLMProvider</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">utils</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">llm </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> get_llm</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">OLLAMA_BASE_URL </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"https://ollama-ug3qr-u21899.vm.elestio.app:57987"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">LLM_MODEL </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"llama3.1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create the GenericLLMProvider instance</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">llm_provider </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> get_llm</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"ollama"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> base_url</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">OLLAMA_BASE_URL</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">LLM_MODEL</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> temperature</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">0.7</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">2000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> verify_ssl</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">False</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Add this line</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Test the connection with a simple query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"role"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"content"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"sup?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">test_ollama</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">try</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> response </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> llm_provider</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">get_chat_response</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">messages</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> stream</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">False</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"Ollama response:"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> response</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">except</span><span class="token plain"> Exception </span><span class="token keyword" style="font-style:italic">as</span><span class="token plain"> e</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Error: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">e</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Run the async function</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">test_ollama</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Replace <code>OLLAMA_BASE_URL</code> with the URL of your Ollama instance, and <code>LLM_MODEL</code> with the model you downloaded from the Ollama Web UI.</p><p>Run the script to test the connection with your custom LLM.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="deploy-ollama-on-elestio">Deploy Ollama on Elestio<a aria-hidden="true" class="hash-link" href="#deploy-ollama-on-elestio" title="Direct link to heading"></a></h2><p>Elestio is a platform that allows you to deploy and manage custom language models. This guide will walk you through deploying a custom language model on Elestio.</p><p>You can deploy an <a href="https://github.com/open-webui/open-webui/tree/main" target="_blank" rel="noopener noreferrer">Open WebUI</a> server with <a href="https://elest.io/open-source/ollama" target="_blank" rel="noopener noreferrer">Elestio</a></p><p>Here's an example .env file that will enable powering GPT-Researcher with Elestio:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"123"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_BASE</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"https://<your_custom_elestio_project>.vm.elestio.app:57987/v1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OLLAMA_BASE_URL</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"https://<your_custom_elestio_project>.vm.elestio.app:57987/"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">FAST_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:qwen2:1.5b"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">SMART_LLM</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"openai:qwen2:1.5b"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">EMBEDDING</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token string" style="color:rgb(195, 232, 141)">"ollama:all-minilm:22m"</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h4 class="anchor anchorWithStickyNavbar_y2LR" id="disable-elestio-authentication-or-add-auth-headers">Disable Elestio Authentication or Add Auth Headers<a aria-hidden="true" class="hash-link" href="#disable-elestio-authentication-or-add-auth-headers" title="Direct link to heading"></a></h4><p>To remove the basic auth you have to follow the below steps: Go to your service -> Security -> at last Nginx -> in that find the below code:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">auth_basic </span><span class="token string" style="color:rgb(195, 232, 141)">"Authentication"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">auth_basic_user_file /etc/nginx/conf.d/.htpasswd</span><span class="token punctuation" style="color:rgb(199, 146, 234)">;</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Comment these both these lines out and click the button "Update & Restart" to reflect the changes.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/llms/running-with-ollama.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/llms"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Configure LLM</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/testing-your-llm"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Testing your LLM<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#fetching-the-desired-llm-models" class="table-of-contents__link toc-highlight">Fetching the Desired LLM Models</a></li><li><a href="#querying-your-custom-llm-with-gpt-researcher" class="table-of-contents__link toc-highlight">Querying your Custom LLM with GPT-Researcher</a></li><li><a href="#run-llm-test-script-for-gptr" class="table-of-contents__link toc-highlight">Run LLM Test Script for GPTR</a></li><li><a href="#deploy-ollama-on-elestio" class="table-of-contents__link toc-highlight">Deploy Ollama on Elestio</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/llms/testing-your-llm.html b/docs/gpt-researcher/llms/testing-your-llm.html index 422b01102..7be3e01bb 100644 --- a/docs/gpt-researcher/llms/testing-your-llm.html +++ b/docs/gpt-researcher/llms/testing-your-llm.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Testing your LLM | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/llms/testing-your-llm"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Testing your LLM | GPT Researcher"><meta data-react-helmet="true" name="description" content="Here is a snippet of code to help you verify that your LLM-related environment variables are set up correctly."><meta data-react-helmet="true" property="og:description" content="Here is a snippet of code to help you verify that your LLM-related environment variables are set up correctly."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/llms/testing-your-llm"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/llms/testing-your-llm" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/llms/testing-your-llm" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">LLM Providers</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/llms/llms">Configure LLM</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/llms/running-with-ollama">Running with Ollama</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/llms/testing-your-llm">Testing your LLM</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Testing your LLM</h1></header><p>Here is a snippet of code to help you verify that your LLM-related environment variables are set up correctly.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">config</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">config </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Config</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">utils</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">llm </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> create_chat_completion</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> dotenv </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> load_dotenv</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">load_dotenv</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">main</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> cfg </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Config</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">try</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> report </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> create_chat_completion</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> model</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">smart_llm_model</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> messages </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string" style="color:rgb(195, 232, 141)">"role"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"user"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"content"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"sup?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> temperature</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">0.35</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> llm_provider</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">smart_llm_provider</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> stream</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> max_tokens</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">smart_token_limit</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> llm_kwargs</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">llm_kwargs</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">except</span><span class="token plain"> Exception </span><span class="token keyword" style="font-style:italic">as</span><span class="token plain"> e</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">f"Error in calling LLM: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token string-interpolation interpolation">e</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token string-interpolation string" style="color:rgb(195, 232, 141)">"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Run the async function</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">main</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/llms/testing-your-llm.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/running-with-ollama"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Running with Ollama</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/search-engines/retrievers"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Retrievers<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/multi_agents/langgraph.html b/docs/gpt-researcher/multi_agents/langgraph.html index 724031001..cdfb810a3 100644 --- a/docs/gpt-researcher/multi_agents/langgraph.html +++ b/docs/gpt-researcher/multi_agents/langgraph.html @@ -7,15 +7,15 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">LangGraph | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="LangGraph | GPT Researcher"><meta data-react-helmet="true" name="description" content="LangGraph is a library for building stateful, multi-actor applications with LLMs."><meta data-react-helmet="true" property="og:description" content="LangGraph is a library for building stateful, multi-actor applications with LLMs."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Multi-Agent Frameworks</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/multi_agents/langgraph">LangGraph</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>LangGraph</h1></header><p><a href="https://python.langchain.com/docs/langgraph" target="_blank" rel="noopener noreferrer">LangGraph</a> is a library for building stateful, multi-actor applications with LLMs. This example uses Langgraph to automate the process of an in depth research on any given topic.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="use-case">Use case<a aria-hidden="true" class="hash-link" href="#use-case" title="Direct link to heading"></a></h2><p>By using Langgraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Inspired by the recent <a href="https://arxiv.org/abs/2402.14207" target="_blank" rel="noopener noreferrer">STORM</a> paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication.</p><p>An average run generates a 5-6 page research report in multiple formats such as PDF, Docx and Markdown.</p><p>Please note: This example uses the OpenAI API only for optimized performance.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="the-multi-agent-team">The Multi Agent Team<a aria-hidden="true" class="hash-link" href="#the-multi-agent-team" title="Direct link to heading"></a></h2><p>The research team is made up of 7 AI agents:</p><ul><li><strong>Human</strong> - The human in the loop that oversees the process and provides feedback to the agents.</li><li><strong>Chief Editor</strong> - Oversees the research process and manages the team. This is the "master" agent that coordinates the other agents using Langgraph.</li><li><strong>Researcher</strong> (gpt-researcher) - A specialized autonomous agent that conducts in depth research on a given topic.</li><li><strong>Editor</strong> - Responsible for planning the research outline and structure.</li><li><strong>Reviewer</strong> - Validates the correctness of the research results given a set of criteria.</li><li><strong>Revisor</strong> - Revises the research results based on the feedback from the reviewer.</li><li><strong>Writer</strong> - Responsible for compiling and writing the final report.</li><li><strong>Publisher</strong> - Responsible for publishing the final report in various formats.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="how-it-works">How it works<a aria-hidden="true" class="hash-link" href="#how-it-works" title="Direct link to heading"></a></h2><p>Generally, the process is based on the following stages: </p><ol><li>Planning stage</li><li>Data collection and analysis</li><li>Review and revision</li><li>Writing and submission</li><li>Publication</li></ol><h3 class="anchor anchorWithStickyNavbar_y2LR" id="architecture">Architecture<a aria-hidden="true" class="hash-link" href="#architecture" title="Direct link to heading"></a></h3><div align="center"><img align="center" height="600" src="https://cowriter-images.s3.amazonaws.com/multi-agents-gptr.png"></div><br clear="all"><h3 class="anchor anchorWithStickyNavbar_y2LR" id="steps">Steps<a aria-hidden="true" class="hash-link" href="#steps" title="Direct link to heading"></a></h3><p>More specifically (as seen in the architecture diagram) the process is as follows:</p><ul><li>Browser (gpt-researcher) - Browses the internet for initial research based on the given research task.</li><li>Editor - Plans the report outline and structure based on the initial research.</li><li>For each outline topic (in parallel):<ul><li>Researcher (gpt-researcher) - Runs an in depth research on the subtopics and writes a draft.</li><li>Reviewer - Validates the correctness of the draft given a set of criteria and provides feedback.</li><li>Revisor - Revises the draft until it is satisfactory based on the reviewer feedback.</li></ul></li><li>Writer - Compiles and writes the final report including an introduction, conclusion and references section from the given research findings.</li><li>Publisher - Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.</li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="how-to-run">How to run<a aria-hidden="true" class="hash-link" href="#how-to-run" title="Direct link to heading"></a></h2><ol><li>Install required packages:<div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> -r requirements.txt</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li>Update env variables<div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">OPENAI_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">Your OpenAI API Key here</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">TAVILY_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain">Your Tavily API Key here</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li><li>Run the application:<div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">python main.py</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></li></ol><h2 class="anchor anchorWithStickyNavbar_y2LR" id="usage">Usage<a aria-hidden="true" class="hash-link" href="#usage" title="Direct link to heading"></a></h2><p>To change the research query and customize the report, edit the <code>task.json</code> file in the main directory.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="taskjson-contains-the-following-fields">Task.json contains the following fields:<a aria-hidden="true" class="hash-link" href="#taskjson-contains-the-following-fields" title="Direct link to heading"></a></h4><ul><li><code>query</code> - The research query or task.</li><li><code>model</code> - The OpenAI LLM to use for the agents.</li><li><code>max_sections</code> - The maximum number of sections in the report. Each section is a subtopic of the research query.</li><li><code>include_human_feedback</code> - If true, the user can provide feedback to the agents. If false, the agents will work autonomously.</li><li><code>publish_formats</code> - The formats to publish the report in. The reports will be written in the <code>output</code> directory.</li><li><code>source</code> - The location from which to conduct the research. Options: <code>web</code> or <code>local</code>. For local, please add <code>DOC_PATH</code> env var.</li><li><code>follow_guidelines</code> - If true, the research report will follow the guidelines below. It will take longer to complete. If false, the report will be generated faster but may not follow the guidelines.</li><li><code>guidelines</code> - A list of guidelines that the report must follow.</li><li><code>verbose</code> - If true, the application will print detailed logs to the console.</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="for-example">For example:<a aria-hidden="true" class="hash-link" href="#for-example" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"query"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Is AI in a hype cycle?"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"model"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"gpt-4o"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"max_sections"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">3</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"publish_formats"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"markdown"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"pdf"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"docx"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"include_human_feedback"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"source"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"web"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"follow_guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"guidelines"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST fully answer the original question"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in apa format"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"The report MUST be written in english"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"verbose"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">true</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h2 class="anchor anchorWithStickyNavbar_y2LR" id="to-deploy">To Deploy<a aria-hidden="true" class="hash-link" href="#to-deploy" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-shell"><div class="codeBlockContent_csEI shell"><pre tabindex="0" class="prism-code language-shell codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">pip </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> langgraph-cli</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">langgraph up</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>From there, see documentation <a href="https://github.com/langchain-ai/langgraph-example" target="_blank" rel="noopener noreferrer">here</a> on how to use the streaming and async endpoints, as well as the playground.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="nextjs-frontend-app">NextJS Frontend App<a aria-hidden="true" class="hash-link" href="#nextjs-frontend-app" title="Direct link to heading"></a></h2><p>The React app (located in <code>frontend</code> directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well.</p><p>It comes with loads of added features, such as: </p><ul><li>a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher.</li><li>a GUI for setting your GPTR environment variables.</li><li>the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta).</li><li>stability fixes</li><li>and more coming soon!</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run-the-nextjs-react-app-with-docker">Run the NextJS React App with Docker<a aria-hidden="true" class="hash-link" href="#run-the-nextjs-react-app-with-docker" title="Direct link to heading"></a></h3><blockquote><p><strong>Step 1</strong> - <a href="https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker" target="_blank" rel="noopener noreferrer">Install Docker</a></p></blockquote><blockquote><p><strong>Step 2</strong> - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env'</p></blockquote><blockquote><p><strong>Step 3</strong> - Within the docker-compose file comment out services that you don't want to run with Docker.</p></blockquote><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ </span><span class="token function" style="color:rgb(130, 170, 255)">docker-compose</span><span class="token plain"> up --build</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><blockquote><p><strong>Step 4</strong> - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes:</p><ul><li>the Python server running on localhost:8000</li><li>the React app running on localhost:3000</li></ul></blockquote><p>Visit localhost:3000 on any browser and enjoy researching!</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="run-the-nextjs-react-app-with-npm">Run the NextJS React App with NPM<a aria-hidden="true" class="hash-link" href="#run-the-nextjs-react-app-with-npm" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token builtin class-name" style="color:rgb(255, 203, 107)">cd</span><span class="token plain"> frontend</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">nvm </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">18.17</span><span class="token plain">.0</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">nvm use v18.17.0</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">npm</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">install</span><span class="token plain"> --legacy-peer-deps</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token function" style="color:rgb(130, 170, 255)">npm</span><span class="token plain"> run dev</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/multi_agents/langgraph.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/search-engines/test-your-retriever"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Testing your Retriever</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/examples/detailed_report"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Detailed Report<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#use-case" class="table-of-contents__link toc-highlight">Use case</a></li><li><a href="#the-multi-agent-team" class="table-of-contents__link toc-highlight">The Multi Agent Team</a></li><li><a href="#how-it-works" class="table-of-contents__link toc-highlight">How it works</a><ul><li><a href="#architecture" class="table-of-contents__link toc-highlight">Architecture</a></li><li><a href="#steps" class="table-of-contents__link toc-highlight">Steps</a></li></ul></li><li><a href="#how-to-run" class="table-of-contents__link toc-highlight">How to run</a></li><li><a href="#usage" class="table-of-contents__link toc-highlight">Usage</a></li><li><a href="#to-deploy" class="table-of-contents__link toc-highlight">To Deploy</a></li><li><a href="#nextjs-frontend-app" class="table-of-contents__link toc-highlight">NextJS Frontend App</a><ul><li><a href="#run-the-nextjs-react-app-with-docker" class="table-of-contents__link toc-highlight">Run the NextJS React App with Docker</a></li><li><a href="#run-the-nextjs-react-app-with-npm" class="table-of-contents__link toc-highlight">Run the NextJS React App with NPM</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/search-engines/retrievers.html b/docs/gpt-researcher/search-engines/retrievers.html index 9ae10e3b4..4c124d7e2 100644 --- a/docs/gpt-researcher/search-engines/retrievers.html +++ b/docs/gpt-researcher/search-engines/retrievers.html @@ -7,8 +7,8 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Retrievers | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Retrievers | GPT Researcher"><meta data-react-helmet="true" name="description" content="Retrievers are search engines used to find the most relevant documents for a given research task."><meta data-react-helmet="true" property="og:description" content="Retrievers are search engines used to find the most relevant documents for a given research task."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> @@ -17,7 +17,7 @@ But you can also use other search engines by specifying the <code>RETRIEVER</code> env var. Please note that each search engine has its own API Key requirements and usage limits.</p><p>For example:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">bing</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>You can also specify multiple retrievers by separating them with commas. The system will use each specified retriever in sequence. For example:</p><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">tavily, arxiv</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Thanks to our community, we have integrated the following web search engines:</p><ul><li><a href="https://app.tavily.com" target="_blank" rel="noopener noreferrer">Tavily</a> - Default</li><li><a href="https://www.microsoft.com/en-us/bing/apis/bing-web-search-api" target="_blank" rel="noopener noreferrer">Bing</a> - Env: <code>RETRIEVER=bing</code></li><li><a href="https://developers.google.com/custom-search/v1/overview" target="_blank" rel="noopener noreferrer">Google</a> - Env: <code>RETRIEVER=google</code></li><li><a href="https://www.searchapi.io/" target="_blank" rel="noopener noreferrer">SearchApi</a> - Env: <code>RETRIEVER=searchapi</code></li><li><a href="https://serpapi.com/" target="_blank" rel="noopener noreferrer">Serp API</a> - Env: <code>RETRIEVER=serpapi</code></li><li><a href="https://serper.dev/" target="_blank" rel="noopener noreferrer">Serper</a> - Env: <code>RETRIEVER=serper</code></li><li><a href="https://searx.github.io/searx/" target="_blank" rel="noopener noreferrer">Searx</a> - Env: <code>RETRIEVER=searx</code></li><li><a href="https://pypi.org/project/duckduckgo-search/" target="_blank" rel="noopener noreferrer">Duckduckgo</a> - Env: <code>RETRIEVER=duckduckgo</code></li><li><a href="https://info.arxiv.org/help/api/index.html" target="_blank" rel="noopener noreferrer">Arxiv</a> - Env: <code>RETRIEVER=arxiv</code></li><li><a href="https://docs.exa.ai/reference/getting-started" target="_blank" rel="noopener noreferrer">Exa</a> - Env: <code>RETRIEVER=exa</code></li><li><a href="https://www.ncbi.nlm.nih.gov/home/develop/api/" target="_blank" rel="noopener noreferrer">PubMedCentral</a> - Env: <code>RETRIEVER=pubmed_central</code></li></ul><h2 class="anchor anchorWithStickyNavbar_y2LR" id="custom-retrievers">Custom Retrievers<a aria-hidden="true" class="hash-link" href="#custom-retrievers" title="Direct link to heading"></a></h2><p>You can also use any custom retriever of your choice by specifying the <code>RETRIEVER=custom</code> env var. Custom retrievers allow you to use any search engine that provides an API to retrieve documents and is widely used for enterprise research tasks.</p><p>In addition to setting the <code>RETRIEVER</code> env, you also need to set the following env vars:</p><ul><li><code>RETRIEVER_ENDPOINT</code>: The endpoint URL of the custom retriever.</li><li>Additional arguments required by the retriever should be prefixed with <code>RETRIEVER_ARG_</code> (e.g., RETRIEVER_ARG_API_KEY).</li></ul><h3 class="anchor anchorWithStickyNavbar_y2LR" id="example">Example<a aria-hidden="true" class="hash-link" href="#example" title="Direct link to heading"></a></h3><div class="codeBlockContainer_J+bg language-bash"><div class="codeBlockContent_csEI bash"><pre tabindex="0" class="prism-code language-bash codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">custom</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER_ENDPOINT</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">https://api.myretriever.com</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token assign-left variable" style="color:rgb(191, 199, 213)">RETRIEVER_ARG_API_KEY</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">YOUR_API_KEY</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><h3 class="anchor anchorWithStickyNavbar_y2LR" id="response-format">Response Format<a aria-hidden="true" class="hash-link" href="#response-format" title="Direct link to heading"></a></h3><p>For the custom retriever to work correctly, the response from the endpoint should be in the following format:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"url"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"http://example.com/page1"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"raw_content"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Content of page 1"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"url"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"http://example.com/page2"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"raw_content"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Content of page 2"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The system assumes this response format and processes the list of sources accordingly.</p><p>Missing a retriever? Feel free to contribute to this project by submitting issues or pull requests on our <a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GitHub</a> page.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/search-engines/retrievers.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/llms/testing-your-llm"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Testing your LLM</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/search-engines/test-your-retriever"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Testing your Retriever<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#web-search-engines" class="table-of-contents__link toc-highlight">Web Search Engines</a></li><li><a href="#custom-retrievers" class="table-of-contents__link toc-highlight">Custom Retrievers</a><ul><li><a href="#example" class="table-of-contents__link toc-highlight">Example</a></li><li><a href="#response-format" class="table-of-contents__link toc-highlight">Response Format</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/gpt-researcher/search-engines/test-your-retriever.html b/docs/gpt-researcher/search-engines/test-your-retriever.html index 334b1163d..b2c446b47 100644 --- a/docs/gpt-researcher/search-engines/test-your-retriever.html +++ b/docs/gpt-researcher/search-engines/test-your-retriever.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Testing your Retriever | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/gpt-researcher/search-engines/test-your-retriever"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Testing your Retriever | GPT Researcher"><meta data-react-helmet="true" name="description" content="To test your retriever, you can use the following code snippet. The script will search for a sub-query and display the search results."><meta data-react-helmet="true" property="og:description" content="To test your retriever, you can use the following code snippet. The script will search for a sub-query and display the search results."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/test-your-retriever"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/test-your-retriever" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/gpt-researcher/search-engines/test-your-retriever" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#">Search Engines</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/search-engines/retrievers">Retrievers</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/gpt-researcher/search-engines/test-your-retriever">Testing your Retriever</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Testing your Retriever</h1></header><p>To test your retriever, you can use the following code snippet. The script will search for a sub-query and display the search results.</p><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> asyncio</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> dotenv </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> load_dotenv</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">config</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">config </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> Config</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">actions</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retriever </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> get_retrievers</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">from</span><span class="token plain"> gpt_researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">skills</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">researcher </span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> ResearchConductor</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">import</span><span class="token plain"> pprint</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Load environment variables from .env file</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">load_dotenv</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">test_scrape_data_by_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Initialize the Config object</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> config </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> Config</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Retrieve the retrievers based on the current configuration</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> retrievers </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> get_retrievers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> config</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"Retrievers:"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> retrievers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Create a mock researcher object with necessary attributes</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">MockResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">init</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">retrievers </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> retrievers</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">cfg </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> config</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">verbose </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">True</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">websocket </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">scraper_manager </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Mock or implement scraper manager</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> self</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">vector_store </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Mock or implement vector store</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> researcher </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> MockResearcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> research_conductor </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> ResearchConductor</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">researcher</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># print('research_conductor',dir(research_conductor))</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># print('MockResearcher',dir(researcher))</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Define a sub-query to test</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> sub_query </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"design patterns for autonomous ai agents"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Iterate through all retrievers</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">for</span><span class="token plain"> retriever_class </span><span class="token keyword" style="font-style:italic">in</span><span class="token plain"> retrievers</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Instantiate the retriever with the sub-query</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> retriever </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> retriever_class</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">sub_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token comment" style="color:rgb(105, 112, 152);font-style:italic"># Perform the search using the current retriever</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> search_results </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token keyword" style="font-style:italic">await</span><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">to_thread</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> retriever</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">search</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> max_results</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">10</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token keyword" style="font-style:italic">print</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token string" style="color:rgb(195, 232, 141)">"\033[35mSearch results:\033[0m"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> pprint</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">pprint</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">search_results</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> indent</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">4</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> width</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token number" style="color:rgb(247, 140, 108)">80</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token keyword" style="font-style:italic">if</span><span class="token plain"> __name__ </span><span class="token operator" style="color:rgb(137, 221, 255)">==</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"__main__"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> asyncio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">run</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">test_scrape_data_by_query</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>The output of the search results will include the title, body, and href of each search result. For example:</p><div class="codeBlockContainer_J+bg language-json"><div class="codeBlockContent_csEI json"><pre tabindex="0" class="prism-code language-json codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"body"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Jun 5, 2024 ... Three AI Design Patterns of Autonomous "</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Agents. Overview of the Three Patterns. Three notable AI "</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"design patterns for autonomous agents include:."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"href"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"https://accredianpublication.medium.com/building-smarter-systems-the-role-of-agentic-design-patterns-in-genai-13617492f5df"</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">"title"</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Building Smarter Systems: The Role of Agentic Design "</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">"Patterns in ..."</span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> ...</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/gpt-researcher/search-engines/test-your-retriever.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/gpt-researcher/search-engines/retrievers"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Retrievers</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/multi_agents/langgraph"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">LangGraph<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/reference/config/config.html b/docs/reference/config/config.html index 4f1dc34f7..23034ca92 100644 --- a/docs/reference/config/config.html +++ b/docs/reference/config/config.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">config.config | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/reference/config/config"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="config.config | GPT Researcher"><meta data-react-helmet="true" name="description" content="Configuration class to store the state of bools for different scripts access."><meta data-react-helmet="true" property="og:description" content="Configuration class to store the state of bools for different scripts access."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/reference/config/config"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/config/config" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/config/config" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><main class="docMainContainer_r8cw docMainContainerEnhanced_SOUu"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>config.config</h1></header><p>Configuration class to store the state of bools for different scripts access.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="config-objects">Config Objects<a aria-hidden="true" class="hash-link" href="#config-objects" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">Config</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">metaclass</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">Singleton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Configuration class to store the state of bools for different scripts access.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="__init__">_<!-- -->_<!-- -->init<!-- -->_<!-- -->_<a aria-hidden="true" class="hash-link" href="#__init__" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__init__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Initialize the Config class</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_fast_llm_model">set<!-- -->_<!-- -->fast<!-- -->_<!-- -->llm<!-- -->_<!-- -->model<a aria-hidden="true" class="hash-link" href="#set_fast_llm_model" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_fast_llm_model</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the fast LLM model value.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_smart_llm_model">set<!-- -->_<!-- -->smart<!-- -->_<!-- -->llm<!-- -->_<!-- -->model<a aria-hidden="true" class="hash-link" href="#set_smart_llm_model" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_smart_llm_model</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the smart LLM model value.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_fast_token_limit">set<!-- -->_<!-- -->fast<!-- -->_<!-- -->token<!-- -->_<!-- -->limit<a aria-hidden="true" class="hash-link" href="#set_fast_token_limit" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_fast_token_limit</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">int</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the fast token limit value.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_smart_token_limit">set<!-- -->_<!-- -->smart<!-- -->_<!-- -->token<!-- -->_<!-- -->limit<a aria-hidden="true" class="hash-link" href="#set_smart_token_limit" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_smart_token_limit</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">int</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the smart token limit value.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_browse_chunk_max_length">set<!-- -->_<!-- -->browse<!-- -->_<!-- -->chunk<!-- -->_<!-- -->max<!-- -->_<!-- -->length<a aria-hidden="true" class="hash-link" href="#set_browse_chunk_max_length" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_browse_chunk_max_length</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">int</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the browse_website command chunk max length value.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_openai_api_key">set<!-- -->_<!-- -->openai<!-- -->_<!-- -->api<!-- -->_<!-- -->key<a aria-hidden="true" class="hash-link" href="#set_openai_api_key" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_openai_api_key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the OpenAI API key value.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="set_debug_mode">set<!-- -->_<!-- -->debug<!-- -->_<!-- -->mode<a aria-hidden="true" class="hash-link" href="#set_debug_mode" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">set_debug_mode</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">value</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">bool</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Set the debug mode value.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="apikeyerror-objects">APIKeyError Objects<a aria-hidden="true" class="hash-link" href="#apikeyerror-objects" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">APIKeyError</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">Exception</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Exception raised when an API key is not set in config.py or as an environment variable.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="check_openai_api_key">check<!-- -->_<!-- -->openai<!-- -->_<!-- -->api<!-- -->_<!-- -->key<a aria-hidden="true" class="hash-link" href="#check_openai_api_key" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">check_openai_api_key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Check if the OpenAI API key is set in config.py or as an environment variable.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="check_tavily_api_key">check<!-- -->_<!-- -->tavily<!-- -->_<!-- -->api<!-- -->_<!-- -->key<a aria-hidden="true" class="hash-link" href="#check_tavily_api_key" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">check_tavily_api_key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Check if the Tavily Search API key is set in config.py or as an environment variable.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="check_google_api_key">check<!-- -->_<!-- -->google<!-- -->_<!-- -->api<!-- -->_<!-- -->key<a aria-hidden="true" class="hash-link" href="#check_google_api_key" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">check_google_api_key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Check if the Google API key is set in config.py or as an environment variable.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="check_serp_api_key">check<!-- -->_<!-- -->serp<!-- -->_<!-- -->api<!-- -->_<!-- -->key<a aria-hidden="true" class="hash-link" href="#check_serp_api_key" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">check_serp_api_key</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Check if the SERP API key is set in config.py or as an environment variable.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="check_searx_url">check<!-- -->_<!-- -->searx<!-- -->_<!-- -->url<a aria-hidden="true" class="hash-link" href="#check_searx_url" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">check_searx_url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">cfg</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Check if the Searx URL is set in config.py or as an environment variable.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/reference/config/config.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#config-objects" class="table-of-contents__link toc-highlight">Config Objects</a></li><li><a href="#apikeyerror-objects" class="table-of-contents__link toc-highlight">APIKeyError Objects</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/reference/config/singleton.html b/docs/reference/config/singleton.html index eba3c712c..4f03b7560 100644 --- a/docs/reference/config/singleton.html +++ b/docs/reference/config/singleton.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">config.singleton | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/reference/config/singleton"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="config.singleton | GPT Researcher"><meta data-react-helmet="true" name="description" content="The singleton metaclass for ensuring only one instance of a class."><meta data-react-helmet="true" property="og:description" content="The singleton metaclass for ensuring only one instance of a class."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/reference/config/singleton"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/config/singleton" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/config/singleton" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><main class="docMainContainer_r8cw docMainContainerEnhanced_SOUu"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>config.singleton</h1></header><p>The singleton metaclass for ensuring only one instance of a class.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="singleton-objects">Singleton Objects<a aria-hidden="true" class="hash-link" href="#singleton-objects" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">Singleton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">abc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">ABCMeta</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">type</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Singleton metaclass for ensuring only one instance of a class.</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="__call__">_<!-- -->_<!-- -->call<!-- -->_<!-- -->_<a aria-hidden="true" class="hash-link" href="#__call__" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">__call__</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">cls</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">*</span><span class="token plain">args</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">**</span><span class="token plain">kwargs</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Call method for the singleton metaclass.</p><h2 class="anchor anchorWithStickyNavbar_y2LR" id="abstractsingleton-objects">AbstractSingleton Objects<a aria-hidden="true" class="hash-link" href="#abstractsingleton-objects" title="Direct link to heading"></a></h2><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">class</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(255, 203, 107)">AbstractSingleton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">abc</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">ABC</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> metaclass</span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain">Singleton</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Abstract singleton class for ensuring only one instance of a class.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/reference/config/singleton.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#singleton-objects" class="table-of-contents__link toc-highlight">Singleton Objects</a></li><li><a href="#abstractsingleton-objects" class="table-of-contents__link toc-highlight">AbstractSingleton Objects</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/reference/processing/html.html b/docs/reference/processing/html.html index f22942a76..3da48154c 100644 --- a/docs/reference/processing/html.html +++ b/docs/reference/processing/html.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">processing.html | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/reference/processing/html"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="processing.html | GPT Researcher"><meta data-react-helmet="true" name="description" content="HTML processing functions"><meta data-react-helmet="true" property="og:description" content="HTML processing functions"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/reference/processing/html"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/processing/html" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/processing/html" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><main class="docMainContainer_r8cw docMainContainerEnhanced_SOUu"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>processing.html</h1></header><p>HTML processing functions</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="extract_hyperlinks">extract<!-- -->_<!-- -->hyperlinks<a aria-hidden="true" class="hash-link" href="#extract_hyperlinks" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">extract_hyperlinks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">soup</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> BeautifulSoup</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> base_url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">tuple</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Extract hyperlinks from a BeautifulSoup object</p><p><strong>Arguments</strong>:</p><ul><li><code>soup</code> <em>BeautifulSoup</em> - The BeautifulSoup object</li><li><code>base_url</code> <em>str</em> - The base URL</li></ul><p><strong>Returns</strong>:</p><p> List[Tuple<!-- -->[str, str]<!-- -->]: The extracted hyperlinks</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="format_hyperlinks">format<!-- -->_<!-- -->hyperlinks<a aria-hidden="true" class="hash-link" href="#format_hyperlinks" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">format_hyperlinks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">hyperlinks</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">tuple</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">list</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Format hyperlinks to be displayed to the user</p><p><strong>Arguments</strong>:</p><ul><li><code>hyperlinks</code> <em>List[Tuple<!-- -->[str, str]<!-- -->]</em> - The hyperlinks to format</li></ul><p><strong>Returns</strong>:</p><ul><li><code>List[str]</code> - The formatted hyperlinks</li></ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/reference/processing/html.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/reference/processing/text.html b/docs/reference/processing/text.html index 4a9ca33b7..e9f285ccd 100644 --- a/docs/reference/processing/text.html +++ b/docs/reference/processing/text.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">processing.text | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/reference/processing/text"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="processing.text | GPT Researcher"><meta data-react-helmet="true" name="description" content="Text processing functions"><meta data-react-helmet="true" property="og:description" content="Text processing functions"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/reference/processing/text"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/processing/text" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/reference/processing/text" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><main class="docMainContainer_r8cw docMainContainerEnhanced_SOUu"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>processing.text</h1></header><p>Text processing functions</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="split_text">split<!-- -->_<!-- -->text<a aria-hidden="true" class="hash-link" href="#split_text" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">split_text</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">text</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> max_length</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">int</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">8192</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> Generator</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Split text into chunks of a maximum length</p><p><strong>Arguments</strong>:</p><ul><li><code>text</code> <em>str</em> - The text to split</li><li><code>max_length</code> <em>int, optional</em> - The maximum length of each chunk. Defaults to 8192.</li></ul><p><strong>Yields</strong>:</p><ul><li><code>str</code> - The next chunk of text</li></ul><p><strong>Raises</strong>:</p><ul><li><code>ValueError</code> - If the text is longer than the maximum length</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="summarize_text">summarize<!-- -->_<!-- -->text<a aria-hidden="true" class="hash-link" href="#summarize_text" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">summarize_text</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">url</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> text</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> question</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> driver</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> Optional</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token plain">WebDriver</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Summarize text using the OpenAI API</p><p><strong>Arguments</strong>:</p><ul><li><code>url</code> <em>str</em> - The url of the text</li><li><code>text</code> <em>str</em> - The text to summarize</li><li><code>question</code> <em>str</em> - The question to ask the model</li><li><code>driver</code> <em>WebDriver</em> - The webdriver to use to scroll the page</li></ul><p><strong>Returns</strong>:</p><ul><li><code>str</code> - The summary of the text</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="scroll_to_percentage">scroll<!-- -->_<!-- -->to<!-- -->_<!-- -->percentage<a aria-hidden="true" class="hash-link" href="#scroll_to_percentage" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">scroll_to_percentage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">driver</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> WebDriver</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> ratio</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">float</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Scroll to a percentage of the page</p><p><strong>Arguments</strong>:</p><ul><li><code>driver</code> <em>WebDriver</em> - The webdriver to use</li><li><code>ratio</code> <em>float</em> - The percentage to scroll to</li></ul><p><strong>Raises</strong>:</p><ul><li><code>ValueError</code> - If the ratio is not between 0 and 1</li></ul><h4 class="anchor anchorWithStickyNavbar_y2LR" id="create_message">create<!-- -->_<!-- -->message<a aria-hidden="true" class="hash-link" href="#create_message" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">create_message</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">chunk</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> question</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> Dict</span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Create a message for the chat completion</p><p><strong>Arguments</strong>:</p><ul><li><code>chunk</code> <em>str</em> - The chunk of text to summarize</li><li><code>question</code> <em>str</em> - The question to answer</li></ul><p><strong>Returns</strong>:</p><p> Dict<!-- -->[str, str]<!-- -->: The message to send to the chat completion</p><h4 class="anchor anchorWithStickyNavbar_y2LR" id="write_to_file">write<!-- -->_<!-- -->to<!-- -->_<!-- -->file<a aria-hidden="true" class="hash-link" href="#write_to_file" title="Direct link to heading"></a></h4><div class="codeBlockContainer_J+bg language-python"><div class="codeBlockContent_csEI python"><pre tabindex="0" class="prism-code language-python codeBlock_rtdJ thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_1zSZ"><span class="token-line" style="color:#bfc7d5"><span class="token keyword" style="font-style:italic">def</span><span class="token plain"> </span><span class="token function" style="color:rgb(130, 170, 255)">write_to_file</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">filename</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> text</span><span class="token punctuation" style="color:rgb(199, 146, 234)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(130, 170, 255)">str</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">-</span><span class="token operator" style="color:rgb(137, 221, 255)">></span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">None</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_M3SB clean-btn">Copy</button></div></div><p>Write text to a file</p><p><strong>Arguments</strong>:</p><ul><li><code>text</code> <em>str</em> - The text to write</li><li><code>filename</code> <em>str</em> - The filename to write to</li></ul></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/reference/processing/text.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/roadmap.html b/docs/roadmap.html index fb52312ab..2fd8d2f0a 100644 --- a/docs/roadmap.html +++ b/docs/roadmap.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Roadmap | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/roadmap"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Roadmap | GPT Researcher"><meta data-react-helmet="true" name="description" content="We're constantly working on additional features and improvements to our products and services. We're also working on new products and services to help you build better AI applications using GPT Researcher."><meta data-react-helmet="true" property="og:description" content="We're constantly working on additional features and improvements to our products and services. We're also working on new products and services to help you build better AI applications using GPT Researcher."><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/roadmap"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/roadmap" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/roadmap" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="theme-doc-markdown markdown"><header><h1>Roadmap</h1></header><p>We're constantly working on additional features and improvements to our products and services. We're also working on new products and services to help you build better AI applications using <a href="https://gptr.dev" target="_blank" rel="noopener noreferrer">GPT Researcher</a>.</p><p>Our vision is to build the #1 autonomous research agent for AI developers and researchers, and we're excited to have you join us on this journey!</p><p>The roadmap is prioritized based on the following goals: Performance, Quality, Modularity and Conversational flexibility. The roadmap is public and can be found <a href="https://trello.com/b/3O7KBePw/gpt-researcher-roadmap" target="_blank" rel="noopener noreferrer">here</a>. </p><p>Interested in collaborating or contributing? Check out our <a href="/docs/contribute">contributing page</a> for more information.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/roadmap.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/contribute"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« <!-- -->Contribute</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/faq"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">FAQ<!-- --> »</div></a></div></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/docs/welcome.html b/docs/welcome.html index 1de5f99d4..d9eb8671e 100644 --- a/docs/welcome.html +++ b/docs/welcome.html @@ -7,14 +7,14 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Welcome | GPT Researcher</title><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/docs/welcome"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Welcome | GPT Researcher"><meta data-react-helmet="true" name="description" content="Hey there! 👋"><meta data-react-helmet="true" property="og:description" content="Hey there! 👋"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/docs/welcome"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/welcome" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/docs/welcome" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docs-wrapper docs-doc-page"><div class="docPage_lDyR"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_i9tI" type="button"></button><aside class="docSidebarContainer_0YBq"><div class="sidebar_a3j0"><nav class="menu thin-scrollbar menu_cyFh"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" href="/docs/welcome">Welcome</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><a class="menu__link menu__link--sublist" href="#">Getting Started</a><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/introduction">Introduction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/how-to-choose">How to Choose</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/cli">Run with CLI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/getting-started-with-docker">Docker: Quickstart</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/gpt-researcher/getting-started/linux-deployment">Running on Linux</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">GPT Researcher</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Frontend</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Custom Context</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">LLM Providers</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Search Engines</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Multi-Agent Frameworks</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#">Examples</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/contribute">Contribute</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/roadmap">Roadmap</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs/faq">FAQ</a></li></ul></nav></div></aside><main class="docMainContainer_r8cw"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_zHA2"><div class="docItemContainer_oiyr"><article><div class="tocCollapsible_aw-L theme-doc-toc-mobile tocMobile_Tx6Y"><button type="button" class="clean-btn tocCollapsibleButton_zr6a">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Welcome</h1></header><p>Hey there! 👋</p><p>We're a team of AI researchers and developers who are passionate about building the next generation of AI assistants. Our mission is to empower individuals and organizations with accurate, unbiased, and factual information.</p><h3 class="anchor anchorWithStickyNavbar_y2LR" id="gpt-researcher">GPT Researcher<a aria-hidden="true" class="hash-link" href="#gpt-researcher" title="Direct link to heading"></a></h3><p>Quickly accessing relevant and trustworthy information is more crucial than ever. However, we've learned that none of today's search engines provide a suitable tool that provides factual, explicit and objective answers without the need to continuously click and explore multiple sites for a given research task. </p><p>This is why we've built the trending open source <strong><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer">GPT Researcher</a></strong>. GPT Researcher is an autonomous agent that takes care of the tedious task of research for you, by scraping, filtering and aggregating over 20+ web sources per a single research task. </p><p>To learn more about GPT Researcher, check out the <a href="/docs/gpt-researcher/getting-started/introduction">documentation page</a>.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/assafelovic/gpt-researcher/tree/master/docs/docs/welcome.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_mS5F" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mt2f"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/gpt-researcher/getting-started/introduction"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Introduction<!-- --> »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_vrFS thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#gpt-researcher" class="table-of-contents__link toc-highlight">GPT Researcher</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/index.html b/index.html index 9be82c5d2..70098c8db 100644 --- a/index.html +++ b/index.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Documentation | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="Documentation | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" name="description" content="GPT Researcher is the leading autonomous agent designed for comprehensive online research on a variety of tasks."><meta data-react-helmet="true" property="og:description" content="GPT Researcher is the leading autonomous agent designed for comprehensive online research on a variety of tasks."><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/" hreflang="x-default"><script data-react-helmet="true">function maybeInsertBanner(){window.__DOCUSAURUS_INSERT_BASEURL_BANNER&&insertBanner()}function insertBanner(){var n=document.getElementById("docusaurus-base-url-issue-banner-container");if(n){n.innerHTML='\n<div id="docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">/</span> (default value)</p>\n <p>We suggest trying baseUrl = <span id="docusaurus-base-url-issue-banner-suggestion-container" style="font-weight: bold; color: green;"></span></p>\n</div>\n';var e=document.getElementById("docusaurus-base-url-issue-banner-suggestion-container"),s=window.location.pathname,r="/"===s.substr(-1)?s:s+"/";e.innerHTML=r}}window.__DOCUSAURUS_INSERT_BASEURL_BANNER=!0,document.addEventListener("DOMContentLoaded",maybeInsertBanner)</script><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div id="docusaurus-base-url-issue-banner-container"></div><div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><header class="hero hero--primary heroBanner_etFc" style="background-image:linear-gradient(to right, #f472b6, #a78bfa, #22d3ee)"><div class="container"><h1 class="hero__title">GPT Researcher</h1><p class="hero__subtitle">The leading autonomous AI research agent</p><div class="buttons_+YzY"><a class="button button--secondary button--lg" href="/docs/gpt-researcher/getting-started/getting-started">Getting Started - 5 min ⏱️</a></div></div></header><main><section class="features_n4mZ"><div class="container" style="margin-top:30px"><div class="row" style="justify-content:center"><div class="col col--4"><div class="text--center"><img src="/assets/images/gptr-logo-fe0cb5ec26a99d8c216255b89c5b0de9.png" alt="GPT Researcher" height="60"></div><div class="text--center padding-horiz--md"><a href="/docs/gpt-researcher/getting-started/getting-started"><h3>GPT Researcher</h3></a><p>GPT Researcher is an open source autonomous agent designed for comprehensive online research on a variety of tasks.</p></div></div><div class="col col--4"><div class="text--center"><img src="/assets/images/multi-agent-5971cbd7624631be7284b345e975fb0d.png" alt="Multi-Agent Assistant" height="60"></div><div class="text--center padding-horiz--md"><a href="/docs/gpt-researcher/multi_agents/langgraph"><h3>Multi-Agent Assistant</h3></a><p>Learn how a team of AI agents can work together to conduct research on a given topic, from planning to publication.</p></div></div><div class="col col--4"><div class="text--center"><img src="/assets/images/examples-a494ee559b2bdb4169d8e63eb5512c9a.png" alt="Examples and Demos" height="60"></div><div class="text--center padding-horiz--md"><a href="/docs/examples/examples"><h3>Examples and Demos</h3></a><p>Check out GPT Researcher in action across multiple frameworks and use cases such as hybrid research and long detailed reports.</p></div></div></div></div></section></main></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/search-index.json b/search-index.json index 554cffce9..2278bf2fc 100644 --- a/search-index.json +++ b/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":1,"t":"How we built GPT Researcher","u":"/blog/building-gpt-researcher","b":["Blog"]},{"i":15,"t":"","u":"/blog/archive","b":["Blog"]},{"i":16,"t":"How to Build the Ultimate Research Multi-Agent Assistant","u":"/blog/gptr-langgraph","b":["Blog"]},{"i":35,"t":"How to build an OpenAI Assistant with Internet access","u":"/blog/building-openai-assistant","b":["Blog"]},{"i":37,"t":"Contribute","u":"/docs/contribute","b":["Docs"]},{"i":39,"t":"The Future of Research is Hybrid","u":"/blog/gptr-hybrid","b":["Blog"]},{"i":53,"t":"Simple Run","u":"/docs/examples/examples","b":["Docs","Examples"]},{"i":57,"t":"Detailed Report","u":"/docs/examples/detailed_report","b":["Docs","Examples"]},{"i":72,"t":"Hybrid Research","u":"/docs/examples/hybrid_research","b":["Docs","Examples"]},{"i":92,"t":"FAQ","u":"/docs/faq","b":["Docs"]},{"i":104,"t":"Research on Local Documents","u":"/docs/gpt-researcher/context/local-docs","b":["Docs","Custom Context"]},{"i":110,"t":"Filtering by Domain","u":"/docs/gpt-researcher/context/filtering-by-domain","b":["Docs","Custom Context"]},{"i":112,"t":"Frontend Application","u":"/docs/gpt-researcher/frontend/frontend","b":["Docs","Frontend"]},{"i":126,"t":"Playing with Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","b":["Docs","Frontend"]},{"i":132,"t":"Tailored Research","u":"/docs/gpt-researcher/context/tailored-research","b":["Docs","Custom Context"]},{"i":144,"t":"Run with CLI","u":"/docs/gpt-researcher/getting-started/cli","b":["Docs","Getting Started"]},{"i":158,"t":"Vector Stores","u":"/docs/gpt-researcher/context/vector-stores","b":["Docs","Custom Context"]},{"i":166,"t":"Getting Started","u":"/docs/gpt-researcher/getting-started/getting-started","b":["Docs","Getting Started"]},{"i":178,"t":"How to Choose","u":"/docs/gpt-researcher/getting-started/how-to-choose","b":["Docs","Getting Started"]},{"i":197,"t":"Automated Tests","u":"/docs/gpt-researcher/gptr/automated-tests","b":["Docs","GPT Researcher"]},{"i":207,"t":"Docker: Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started-with-docker","b":["Docs","Getting Started"]},{"i":209,"t":"Running on Linux","u":"/docs/gpt-researcher/getting-started/linux-deployment","b":["Docs","Getting Started"]},{"i":218,"t":"Introduction","u":"/docs/gpt-researcher/getting-started/introduction","b":["Docs","Getting Started"]},{"i":229,"t":"Configuration","u":"/docs/gpt-researcher/gptr/config","b":["Docs","GPT Researcher"]},{"i":233,"t":"Agent Example","u":"/docs/gpt-researcher/gptr/example","b":["Docs","GPT Researcher"]},{"i":235,"t":"Scraping Options","u":"/docs/gpt-researcher/gptr/scraping","b":["Docs","GPT Researcher"]},{"i":250,"t":"Handling Logs","u":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream","b":["Docs","GPT Researcher"]},{"i":252,"t":"Troubleshooting","u":"/docs/gpt-researcher/gptr/troubleshooting","b":["Docs","GPT Researcher"]},{"i":264,"t":"Querying the Backend","u":"/docs/gpt-researcher/gptr/querying-the-backend","b":["Docs","GPT Researcher"]},{"i":268,"t":"PIP Package","u":"/docs/gpt-researcher/gptr/pip-package","b":["Docs","GPT Researcher"]},{"i":309,"t":"Configure LLM","u":"/docs/gpt-researcher/llms/llms","b":["Docs","LLM Providers"]},{"i":350,"t":"Running with Ollama","u":"/docs/gpt-researcher/llms/running-with-ollama","b":["Docs","LLM Providers"]},{"i":360,"t":"Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","b":["Docs","Search Engines"]},{"i":370,"t":"LangGraph","u":"/docs/gpt-researcher/multi_agents/langgraph","b":["Docs","Multi-Agent Frameworks"]},{"i":393,"t":"Testing your LLM","u":"/docs/gpt-researcher/llms/testing-your-llm","b":["Docs","LLM Providers"]},{"i":395,"t":"processing.html","u":"/docs/reference/processing/html","b":[]},{"i":397,"t":"config.singleton","u":"/docs/reference/config/singleton","b":[]},{"i":403,"t":"config.config","u":"/docs/reference/config/config","b":[]},{"i":409,"t":"Roadmap","u":"/docs/roadmap","b":["Docs"]},{"i":411,"t":"Testing your Retriever","u":"/docs/gpt-researcher/search-engines/test-your-retriever","b":["Docs","Search Engines"]},{"i":413,"t":"processing.text","u":"/docs/reference/processing/text","b":[]},{"i":415,"t":"Welcome","u":"/docs/welcome","b":["Docs"]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/1",[0,2.681,1,2.681,2,1.509]],["t/15",[]],["t/16",[2,0.988,3,1.487,4,1.755,5,1.755,6,1.487,7,1.487]],["t/35",[3,1.681,7,1.681,8,1.983,9,1.983,10,1.983]],["t/37",[11,4.137]],["t/39",[2,1.509,12,2.681,13,2.273]],["t/53",[14,3.253,15,2.188]],["t/57",[16,3.253,17,3.253]],["t/72",[2,1.832,13,2.758]],["t/92",[18,4.137]],["t/104",[2,1.509,19,2.681,20,2.681]],["t/110",[21,3.253,22,3.253]],["t/112",[23,3.253,24,3.253]],["t/126",[25,3.253,26,3.253]],["t/132",[2,1.832,27,3.253]],["t/144",[15,2.188,28,3.253]],["t/158",[29,3.253,30,3.253]],["t/166",[31,3.253,32,3.253]],["t/178",[33,4.137]],["t/197",[34,3.253,35,2.432]],["t/207",[36,3.253,37,3.253]],["t/209",[15,2.188,38,3.253]],["t/218",[39,4.137]],["t/229",[40,3.507]],["t/233",[6,2.758,41,3.253]],["t/235",[42,3.253,43,3.253]],["t/250",[44,3.253,45,3.253]],["t/252",[46,4.137]],["t/264",[47,3.253,48,3.253]],["t/268",[49,3.253,50,3.253]],["t/309",[40,2.758,51,2.758]],["t/350",[15,2.188,52,3.253]],["t/360",[53,3.507]],["t/370",[54,4.137]],["t/393",[35,2.432,51,2.758]],["t/395",[55,4.137]],["t/397",[56,4.137]],["t/403",[57,4.137]],["t/409",[58,4.137]],["t/411",[35,2.432,53,2.758]],["t/413",[59,4.137]],["t/415",[60,4.137]]],"invertedIndex":[["access",{"_index":10,"t":{"35":{"position":[[47,6]]}}}],["agent",{"_index":6,"t":{"16":{"position":[[41,5]]},"233":{"position":[[0,5]]}}}],["applic",{"_index":24,"t":{"112":{"position":[[9,11]]}}}],["assist",{"_index":7,"t":{"16":{"position":[[47,9]]},"35":{"position":[[23,9]]}}}],["autom",{"_index":34,"t":{"197":{"position":[[0,9]]}}}],["backend",{"_index":48,"t":{"264":{"position":[[13,7]]}}}],["build",{"_index":3,"t":{"16":{"position":[[7,5]]},"35":{"position":[[7,5]]}}}],["built",{"_index":0,"t":{"1":{"position":[[7,5]]}}}],["choos",{"_index":33,"t":{"178":{"position":[[7,6]]}}}],["cli",{"_index":28,"t":{"144":{"position":[[9,3]]}}}],["config.config",{"_index":57,"t":{"403":{"position":[[0,13]]}}}],["config.singleton",{"_index":56,"t":{"397":{"position":[[0,16]]}}}],["configur",{"_index":40,"t":{"229":{"position":[[0,13]]},"309":{"position":[[0,9]]}}}],["contribut",{"_index":11,"t":{"37":{"position":[[0,10]]}}}],["detail",{"_index":16,"t":{"57":{"position":[[0,8]]}}}],["docker",{"_index":36,"t":{"207":{"position":[[0,7]]}}}],["document",{"_index":20,"t":{"104":{"position":[[18,9]]}}}],["domain",{"_index":22,"t":{"110":{"position":[[13,6]]}}}],["exampl",{"_index":41,"t":{"233":{"position":[[6,7]]}}}],["faq",{"_index":18,"t":{"92":{"position":[[0,3]]}}}],["filter",{"_index":21,"t":{"110":{"position":[[0,9]]}}}],["frontend",{"_index":23,"t":{"112":{"position":[[0,8]]}}}],["futur",{"_index":12,"t":{"39":{"position":[[4,6]]}}}],["get",{"_index":31,"t":{"166":{"position":[[0,7]]}}}],["gpt",{"_index":1,"t":{"1":{"position":[[13,3]]}}}],["handl",{"_index":44,"t":{"250":{"position":[[0,8]]}}}],["hybrid",{"_index":13,"t":{"39":{"position":[[26,6]]},"72":{"position":[[0,6]]}}}],["internet",{"_index":9,"t":{"35":{"position":[[38,8]]}}}],["introduct",{"_index":39,"t":{"218":{"position":[[0,12]]}}}],["langgraph",{"_index":54,"t":{"370":{"position":[[0,9]]}}}],["linux",{"_index":38,"t":{"209":{"position":[[11,5]]}}}],["llm",{"_index":51,"t":{"309":{"position":[[10,3]]},"393":{"position":[[13,3]]}}}],["local",{"_index":19,"t":{"104":{"position":[[12,5]]}}}],["log",{"_index":45,"t":{"250":{"position":[[9,4]]}}}],["multi",{"_index":5,"t":{"16":{"position":[[35,5]]}}}],["ollama",{"_index":52,"t":{"350":{"position":[[13,6]]}}}],["openai",{"_index":8,"t":{"35":{"position":[[16,6]]}}}],["option",{"_index":43,"t":{"235":{"position":[[9,7]]}}}],["packag",{"_index":50,"t":{"268":{"position":[[4,7]]}}}],["pip",{"_index":49,"t":{"268":{"position":[[0,3]]}}}],["play",{"_index":25,"t":{"126":{"position":[[0,7]]}}}],["processing.html",{"_index":55,"t":{"395":{"position":[[0,15]]}}}],["processing.text",{"_index":59,"t":{"413":{"position":[[0,15]]}}}],["queri",{"_index":47,"t":{"264":{"position":[[0,8]]}}}],["quickstart",{"_index":37,"t":{"207":{"position":[[8,10]]}}}],["report",{"_index":17,"t":{"57":{"position":[[9,6]]}}}],["research",{"_index":2,"t":{"1":{"position":[[17,10]]},"16":{"position":[[26,8]]},"39":{"position":[[14,8]]},"72":{"position":[[7,8]]},"104":{"position":[[0,8]]},"132":{"position":[[9,8]]}}}],["retriev",{"_index":53,"t":{"360":{"position":[[0,10]]},"411":{"position":[[13,9]]}}}],["roadmap",{"_index":58,"t":{"409":{"position":[[0,7]]}}}],["run",{"_index":15,"t":{"53":{"position":[[7,3]]},"144":{"position":[[0,3]]},"209":{"position":[[0,7]]},"350":{"position":[[0,7]]}}}],["scrape",{"_index":42,"t":{"235":{"position":[[0,8]]}}}],["simpl",{"_index":14,"t":{"53":{"position":[[0,6]]}}}],["start",{"_index":32,"t":{"166":{"position":[[8,7]]}}}],["store",{"_index":30,"t":{"158":{"position":[[7,6]]}}}],["tailor",{"_index":27,"t":{"132":{"position":[[0,8]]}}}],["test",{"_index":35,"t":{"197":{"position":[[10,5]]},"393":{"position":[[0,7]]},"411":{"position":[[0,7]]}}}],["troubleshoot",{"_index":46,"t":{"252":{"position":[[0,15]]}}}],["ultim",{"_index":4,"t":{"16":{"position":[[17,8]]}}}],["vector",{"_index":29,"t":{"158":{"position":[[0,6]]}}}],["webhook",{"_index":26,"t":{"126":{"position":[[13,8]]}}}],["welcom",{"_index":60,"t":{"415":{"position":[[0,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3,"t":"Moving from infinite loops to deterministic results","u":"/blog/building-gpt-researcher","h":"#moving-from-infinite-loops-to-deterministic-results","p":1},{"i":5,"t":"Aiming for objective and unbiased results","u":"/blog/building-gpt-researcher","h":"#aiming-for-objective-and-unbiased-results","p":1},{"i":7,"t":"Speeding up the research process","u":"/blog/building-gpt-researcher","h":"#speeding-up-the-research-process","p":1},{"i":9,"t":"Finalizing the research report","u":"/blog/building-gpt-researcher","h":"#finalizing-the-research-report","p":1},{"i":11,"t":"The final architecture","u":"/blog/building-gpt-researcher","h":"#the-final-architecture","p":1},{"i":13,"t":"Going forward","u":"/blog/building-gpt-researcher","h":"#going-forward","p":1},{"i":18,"t":"Introducing the GPT Researcher Multi-Agent Assistant","u":"/blog/gptr-langgraph","h":"","p":16},{"i":19,"t":"Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents","u":"/blog/gptr-langgraph","h":"#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents","p":16},{"i":21,"t":"Introducing LangGraph","u":"/blog/gptr-langgraph","h":"#introducing-langgraph","p":16},{"i":23,"t":"Building the Ultimate Autonomous Research Agent","u":"/blog/gptr-langgraph","h":"#building-the-ultimate-autonomous-research-agent","p":16},{"i":25,"t":"The Research Agent Team","u":"/blog/gptr-langgraph","h":"#the-research-agent-team","p":16},{"i":27,"t":"Architecture","u":"/blog/gptr-langgraph","h":"#architecture","p":16},{"i":29,"t":"Define the Graph State","u":"/blog/gptr-langgraph","h":"#define-the-graph-state","p":16},{"i":31,"t":"A Graph within a Graph to support stateful Parallelization","u":"/blog/gptr-langgraph","h":"#a-graph-within-a-graph-to-support-stateful-parallelization","p":16},{"i":33,"t":"What’s Next?","u":"/blog/gptr-langgraph","h":"#whats-next","p":16},{"i":41,"t":"Why Hybrid Research Works Better","u":"/blog/gptr-hybrid","h":"#why-hybrid-research-works-better","p":39},{"i":43,"t":"Building the Hybrid Research Assistant","u":"/blog/gptr-hybrid","h":"#building-the-hybrid-research-assistant","p":39},{"i":45,"t":"Processing Local Documents with Langchain","u":"/blog/gptr-hybrid","h":"#processing-local-documents-with-langchain","p":39},{"i":47,"t":"Conducting Web Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#conducting-web-research-with-gpt-researcher","p":39},{"i":49,"t":"Running the Hybrid Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#running-the-hybrid-research-with-gpt-researcher","p":39},{"i":51,"t":"Conclusion","u":"/blog/gptr-hybrid","h":"#conclusion","p":39},{"i":55,"t":"Run PIP Package","u":"/docs/examples/examples","h":"#run-pip-package","p":53},{"i":59,"t":"Overview","u":"/docs/examples/detailed_report","h":"#overview","p":57},{"i":61,"t":"Key Features","u":"/docs/examples/detailed_report","h":"#key-features","p":57},{"i":63,"t":"Class Structure","u":"/docs/examples/detailed_report","h":"#class-structure","p":57},{"i":64,"t":"Initialization","u":"/docs/examples/detailed_report","h":"#initialization","p":57},{"i":66,"t":"How It Works","u":"/docs/examples/detailed_report","h":"#how-it-works","p":57},{"i":68,"t":"Usage Example","u":"/docs/examples/detailed_report","h":"#usage-example","p":57},{"i":70,"t":"Conclusion","u":"/docs/examples/detailed_report","h":"#conclusion","p":57},{"i":74,"t":"Introduction","u":"/docs/examples/hybrid_research","h":"#introduction","p":72},{"i":76,"t":"Prerequisites","u":"/docs/examples/hybrid_research","h":"#prerequisites","p":72},{"i":78,"t":"Installation","u":"/docs/examples/hybrid_research","h":"#installation","p":72},{"i":80,"t":"Setting Up the Environment","u":"/docs/examples/hybrid_research","h":"#setting-up-the-environment","p":72},{"i":82,"t":"Preparing Local Documents","u":"/docs/examples/hybrid_research","h":"#preparing-local-documents","p":72},{"i":84,"t":"Running Hybrid Research","u":"/docs/examples/hybrid_research","h":"#running-hybrid-research","p":72},{"i":86,"t":"Understanding the Results","u":"/docs/examples/hybrid_research","h":"#understanding-the-results","p":72},{"i":88,"t":"Troubleshooting","u":"/docs/examples/hybrid_research","h":"#troubleshooting","p":72},{"i":90,"t":"FAQ","u":"/docs/examples/hybrid_research","h":"#faq","p":72},{"i":94,"t":"How do I get started?","u":"/docs/faq","h":"#how-do-i-get-started","p":92},{"i":96,"t":"What is GPT Researcher?","u":"/docs/faq","h":"#what-is-gpt-researcher","p":92},{"i":98,"t":"How much does each research run cost?","u":"/docs/faq","h":"#how-much-does-each-research-run-cost","p":92},{"i":100,"t":"How do you ensure the report is factual and accurate?","u":"/docs/faq","h":"#how-do-you-ensure-the-report-is-factual-and-accurate","p":92},{"i":102,"t":"What are your plans for the future?","u":"/docs/faq","h":"#what-are-your-plans-for-the-future","p":92},{"i":106,"t":"Just Local Docs","u":"/docs/gpt-researcher/context/local-docs","h":"#just-local-docs","p":104},{"i":108,"t":"Local Docs + Web (Hybrid)","u":"/docs/gpt-researcher/context/local-docs","h":"#local-docs--web-hybrid","p":104},{"i":114,"t":"NextJS Frontend App","u":"/docs/gpt-researcher/frontend/frontend","h":"#nextjs-frontend-app","p":112},{"i":116,"t":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/frontend/frontend","h":"#run-the-nextjs-react-app-with-docker","p":112},{"i":118,"t":"Other Options: 1: Static Frontend (FastAPI)","u":"/docs/gpt-researcher/frontend/frontend","h":"#other-options-1-static-frontend-fastapi","p":112},{"i":120,"t":"Yet Another Option: Running NextJS Frontend via CLI","u":"/docs/gpt-researcher/frontend/frontend","h":"#yet-another-option-running-nextjs-frontend-via-cli","p":112},{"i":122,"t":"Choosing an Option","u":"/docs/gpt-researcher/frontend/frontend","h":"#choosing-an-option","p":112},{"i":124,"t":"Frontend Features","u":"/docs/gpt-researcher/frontend/frontend","h":"#frontend-features","p":112},{"i":128,"t":"Inspecting Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#inspecting-webhooks","p":126},{"i":130,"t":"Am I polling the right URL?","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#am-i-polling-the-right-url","p":126},{"i":134,"t":"Research on Specific Sources 📚","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-specific-sources-","p":132},{"i":136,"t":"Specify Agent Prompt 📝","u":"/docs/gpt-researcher/context/tailored-research","h":"#specify-agent-prompt-","p":132},{"i":138,"t":"Research on Local Documents 📄","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-local-documents-","p":132},{"i":140,"t":"Hybrid Research 🔄","u":"/docs/gpt-researcher/context/tailored-research","h":"#hybrid-research-","p":132},{"i":142,"t":"Research on LangChain Documents 🦜️🔗","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-langchain-documents-️","p":132},{"i":146,"t":"Installation","u":"/docs/gpt-researcher/getting-started/cli","h":"#installation","p":144},{"i":148,"t":"Usage","u":"/docs/gpt-researcher/getting-started/cli","h":"#usage","p":144},{"i":150,"t":"Arguments","u":"/docs/gpt-researcher/getting-started/cli","h":"#arguments","p":144},{"i":152,"t":"Examples","u":"/docs/gpt-researcher/getting-started/cli","h":"#examples","p":144},{"i":154,"t":"Output","u":"/docs/gpt-researcher/getting-started/cli","h":"#output","p":144},{"i":156,"t":"Note","u":"/docs/gpt-researcher/getting-started/cli","h":"#note","p":144},{"i":160,"t":"Faiss","u":"/docs/gpt-researcher/context/vector-stores","h":"#faiss","p":158},{"i":162,"t":"PGVector","u":"/docs/gpt-researcher/context/vector-stores","h":"#pgvector","p":158},{"i":164,"t":"Adding Scraped Data to your vector store","u":"/docs/gpt-researcher/context/vector-stores","h":"#adding-scraped-data-to-your-vector-store","p":158},{"i":168,"t":"Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#quickstart","p":166},{"i":170,"t":"Using Virtual Environment or Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#using-virtual-environment-or-poetry","p":166},{"i":172,"t":"Virtual Environment","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#virtual-environment","p":166},{"i":174,"t":"Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#poetry","p":166},{"i":176,"t":"Run the app","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#run-the-app","p":166},{"i":180,"t":"Options","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#options","p":178},{"i":182,"t":"Usage Options","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#usage-options","p":178},{"i":183,"t":"1. PIP Package","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#1-pip-package","p":178},{"i":185,"t":"2. End-to-End Application","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#2-end-to-end-application","p":178},{"i":187,"t":"3. Multi Agent System with LangGraph","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#3-multi-agent-system-with-langgraph","p":178},{"i":189,"t":"Comparison Table","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#comparison-table","p":178},{"i":191,"t":"Deep Dive","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#deep-dive","p":178},{"i":193,"t":"Versioning and Updates","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#versioning-and-updates","p":178},{"i":195,"t":"Troubleshooting and FAQs","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#troubleshooting-and-faqs","p":178},{"i":199,"t":"Automated Testing with Github Actions","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#automated-testing-with-github-actions","p":197},{"i":201,"t":"Running the Tests","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#running-the-tests","p":197},{"i":203,"t":"Via a docker command","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-docker-command","p":197},{"i":205,"t":"Via a Github Action","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-github-action","p":197},{"i":211,"t":"Server Requirements","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#server-requirements","p":209},{"i":213,"t":"Deployment Steps","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#deployment-steps","p":209},{"i":215,"t":"Step 1: Update the System","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#step-1-update-the-system","p":209},{"i":216,"t":"First, ensure your package index is up-to-date:","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#first-ensure-your-package-index-is-up-to-date","p":209},{"i":220,"t":"Why GPT Researcher?","u":"/docs/gpt-researcher/getting-started/introduction","h":"#why-gpt-researcher","p":218},{"i":222,"t":"Architecture","u":"/docs/gpt-researcher/getting-started/introduction","h":"#architecture","p":218},{"i":224,"t":"Demo","u":"/docs/gpt-researcher/getting-started/introduction","h":"#demo","p":218},{"i":225,"t":"Tutorials","u":"/docs/gpt-researcher/getting-started/introduction","h":"#tutorials","p":218},{"i":227,"t":"Features","u":"/docs/gpt-researcher/getting-started/introduction","h":"#features","p":218},{"i":231,"t":"Example: Azure OpenAI Configuration","u":"/docs/gpt-researcher/gptr/config","h":"#example-azure-openai-configuration","p":229},{"i":237,"t":"Configuring Scraping Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#configuring-scraping-method","p":235},{"i":239,"t":"Scraping Methods Explained","u":"/docs/gpt-researcher/gptr/scraping","h":"#scraping-methods-explained","p":235},{"i":240,"t":"BeautifulSoup (Static Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#beautifulsoup-static-scraping","p":235},{"i":242,"t":"Selenium (Browser Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#selenium-browser-scraping","p":235},{"i":244,"t":"Additional Setup for Selenium","u":"/docs/gpt-researcher/gptr/scraping","h":"#additional-setup-for-selenium","p":235},{"i":246,"t":"Choosing the Right Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#choosing-the-right-method","p":235},{"i":248,"t":"Troubleshooting","u":"/docs/gpt-researcher/gptr/scraping","h":"#troubleshooting","p":235},{"i":254,"t":"model: gpt-4 does not exist","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#model-gpt-4-does-not-exist","p":252},{"i":256,"t":"cannot load library 'gobject-2.0-0'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-gobject-20-0","p":252},{"i":258,"t":"cannot load library 'pango'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-pango","p":252},{"i":260,"t":"Error processing the url","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#error-processing-the-url","p":252},{"i":262,"t":"Chrome version issues","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#chrome-version-issues","p":252},{"i":266,"t":"Introduction","u":"/docs/gpt-researcher/gptr/querying-the-backend","h":"#introduction","p":264},{"i":270,"t":"Steps to Install GPT Researcher","u":"/docs/gpt-researcher/gptr/pip-package","h":"#steps-to-install-gpt-researcher","p":268},{"i":272,"t":"Example Usage","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-usage","p":268},{"i":274,"t":"Specific Examples","u":"/docs/gpt-researcher/gptr/pip-package","h":"#specific-examples","p":268},{"i":275,"t":"Example 1: Research Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-1-research-report","p":268},{"i":277,"t":"Example 2: Resource Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-2-resource-report","p":268},{"i":279,"t":"Example 3: Outline Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-3-outline-report","p":268},{"i":281,"t":"Integration with Web Frameworks","u":"/docs/gpt-researcher/gptr/pip-package","h":"#integration-with-web-frameworks","p":268},{"i":282,"t":"FastAPI Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#fastapi-example","p":268},{"i":284,"t":"Flask Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#flask-example","p":268},{"i":286,"t":"Getters and Setters","u":"/docs/gpt-researcher/gptr/pip-package","h":"#getters-and-setters","p":268},{"i":288,"t":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources","p":268},{"i":290,"t":"Get Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-context","p":268},{"i":292,"t":"Get Research Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-costs","p":268},{"i":294,"t":"Get Research Images","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-images","p":268},{"i":296,"t":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources-1","p":268},{"i":298,"t":"Set Verbose","u":"/docs/gpt-researcher/gptr/pip-package","h":"#set-verbose","p":268},{"i":300,"t":"Add Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#add-costs","p":268},{"i":302,"t":"Advanced Usage","u":"/docs/gpt-researcher/gptr/pip-package","h":"#advanced-usage","p":268},{"i":303,"t":"Customizing the Research Process","u":"/docs/gpt-researcher/gptr/pip-package","h":"#customizing-the-research-process","p":268},{"i":305,"t":"Handling Research Results","u":"/docs/gpt-researcher/gptr/pip-package","h":"#handling-research-results","p":268},{"i":307,"t":"Working with Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#working-with-research-context","p":268},{"i":311,"t":"OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#openai","p":309},{"i":313,"t":"Custom LLM","u":"/docs/gpt-researcher/llms/llms","h":"#custom-llm","p":309},{"i":315,"t":"Azure OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#azure-openai","p":309},{"i":317,"t":"Ollama","u":"/docs/gpt-researcher/llms/llms","h":"#ollama","p":309},{"i":319,"t":"Groq","u":"/docs/gpt-researcher/llms/llms","h":"#groq","p":309},{"i":321,"t":"Sign up","u":"/docs/gpt-researcher/llms/llms","h":"#sign-up","p":309},{"i":323,"t":"Update env vars","u":"/docs/gpt-researcher/llms/llms","h":"#update-env-vars","p":309},{"i":325,"t":"Anthropic","u":"/docs/gpt-researcher/llms/llms","h":"#anthropic","p":309},{"i":327,"t":"Mistral AI","u":"/docs/gpt-researcher/llms/llms","h":"#mistral-ai","p":309},{"i":329,"t":"Together AI","u":"/docs/gpt-researcher/llms/llms","h":"#together-ai","p":309},{"i":331,"t":"HuggingFace","u":"/docs/gpt-researcher/llms/llms","h":"#huggingface","p":309},{"i":333,"t":"Google Gemini","u":"/docs/gpt-researcher/llms/llms","h":"#google-gemini","p":309},{"i":335,"t":"Google VertexAI","u":"/docs/gpt-researcher/llms/llms","h":"#google-vertexai","p":309},{"i":337,"t":"Cohere","u":"/docs/gpt-researcher/llms/llms","h":"#cohere","p":309},{"i":339,"t":"Fireworks","u":"/docs/gpt-researcher/llms/llms","h":"#fireworks","p":309},{"i":341,"t":"Bedrock","u":"/docs/gpt-researcher/llms/llms","h":"#bedrock","p":309},{"i":343,"t":"xAI","u":"/docs/gpt-researcher/llms/llms","h":"#xai","p":309},{"i":345,"t":"Other Embedding Models","u":"/docs/gpt-researcher/llms/llms","h":"#other-embedding-models","p":309},{"i":346,"t":"Nomic","u":"/docs/gpt-researcher/llms/llms","h":"#nomic","p":309},{"i":348,"t":"VoyageAI","u":"/docs/gpt-researcher/llms/llms","h":"#voyageai","p":309},{"i":352,"t":"Fetching the Desired LLM Models","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#fetching-the-desired-llm-models","p":350},{"i":354,"t":"Querying your Custom LLM with GPT-Researcher","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#querying-your-custom-llm-with-gpt-researcher","p":350},{"i":356,"t":"Run LLM Test Script for GPTR","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#run-llm-test-script-for-gptr","p":350},{"i":358,"t":"Deploy Ollama on Elestio","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#deploy-ollama-on-elestio","p":350},{"i":362,"t":"Web Search Engines","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#web-search-engines","p":360},{"i":364,"t":"Custom Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#custom-retrievers","p":360},{"i":366,"t":"Example","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#example","p":360},{"i":368,"t":"Response Format","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#response-format","p":360},{"i":372,"t":"Use case","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#use-case","p":370},{"i":374,"t":"The Multi Agent Team","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#the-multi-agent-team","p":370},{"i":376,"t":"How it works","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-it-works","p":370},{"i":378,"t":"Architecture","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#architecture","p":370},{"i":379,"t":"Steps","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#steps","p":370},{"i":381,"t":"How to run","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-to-run","p":370},{"i":383,"t":"Usage","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#usage","p":370},{"i":385,"t":"To Deploy","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#to-deploy","p":370},{"i":387,"t":"NextJS Frontend App","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#nextjs-frontend-app","p":370},{"i":389,"t":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-docker","p":370},{"i":391,"t":"Run the NextJS React App with NPM","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-npm","p":370},{"i":399,"t":"Singleton Objects","u":"/docs/reference/config/singleton","h":"#singleton-objects","p":397},{"i":401,"t":"AbstractSingleton Objects","u":"/docs/reference/config/singleton","h":"#abstractsingleton-objects","p":397},{"i":405,"t":"Config Objects","u":"/docs/reference/config/config","h":"#config-objects","p":403},{"i":407,"t":"APIKeyError Objects","u":"/docs/reference/config/config","h":"#apikeyerror-objects","p":403},{"i":417,"t":"GPT Researcher","u":"/docs/welcome","h":"#gpt-researcher","p":415}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3",[0,3.421,1,3.421,2,3.421,3,3.421,4,2.63]],["t/5",[4,2.972,5,3.865,6,2.809,7,3.865]],["t/7",[8,3.865,9,2.972,10,1.416,11,2.972]],["t/9",[10,1.627,12,3.965,13,3.228]],["t/11",[12,4.66,14,4.015]],["t/13",[15,5.221,16,5.221]],["t/18",[10,1.124,17,2.738,18,1.877,19,2.521,20,2.029,21,2.521]],["t/19",[10,0.742,20,1.339,21,1.663,22,2.024,23,1.663,24,1.807,25,1.663,26,1.663,27,1.663,28,2.024,29,1.663]],["t/21",[17,4.66,26,4.291]],["t/23",[10,1.253,20,2.262,23,2.811,24,3.053,30,3.421]],["t/25",[10,1.627,20,2.938,27,3.65]],["t/27",[14,4.869]],["t/29",[31,4.442,32,3.965,33,3.965]],["t/31",[32,4.234,33,2.738,34,3.068,35,3.068,36,3.068]],["t/33",[37,5.221,38,5.221]],["t/41",[10,1.416,39,2.673,40,2.972,41,3.865]],["t/43",[10,1.416,21,3.176,23,3.176,39,2.673]],["t/45",[11,2.972,42,2.809,43,2.972,44,3.45]],["t/47",[10,1.888,18,2.092,45,3.421,46,2.63]],["t/49",[10,1.888,18,2.092,39,2.365,47,1.895]],["t/51",[48,5.652]],["t/55",[47,2.461,49,3.965,50,3.65]],["t/59",[51,6.332]],["t/61",[52,5.221,53,4.291]],["t/63",[54,5.221,55,5.221]],["t/64",[56,6.332]],["t/66",[40,4.869]],["t/68",[57,3.611,58,2.984]],["t/70",[48,5.652]],["t/74",[59,5.652]],["t/76",[60,6.332]],["t/78",[61,5.204]],["t/80",[9,3.415,62,3.965,63,3.65]],["t/82",[42,3.228,43,3.415,64,4.442]],["t/84",[10,1.627,39,3.072,47,2.461]],["t/86",[4,4.015,65,5.221]],["t/88",[66,5.204]],["t/90",[67,5.652]],["t/94",[68,6.332]],["t/96",[10,1.913,18,3.194]],["t/98",[10,1.253,47,1.895,69,3.421,70,3.421,71,2.811]],["t/100",[13,2.809,72,3.45,73,3.865,74,3.865]],["t/102",[75,5.221,76,5.221]],["t/106",[42,3.794,77,4.66]],["t/108",[39,2.365,42,2.486,46,2.63,77,3.053,78,2.365]],["t/114",[79,3.072,80,3.228,81,3.072]],["t/116",[47,1.895,79,2.365,81,2.365,82,2.811,83,2.811]],["t/118",[80,2.486,84,2.486,85,2.63,86,3.053,87,3.053]],["t/120",[47,1.541,79,1.923,80,2.021,84,2.021,88,2.781,89,2.285,90,2.781]],["t/122",[84,3.794,91,4.66]],["t/124",[53,4.291,80,3.794]],["t/128",[92,5.221,93,5.221]],["t/130",[94,4.442,95,3.965,96,3.965]],["t/134",[10,1.416,78,2.673,97,3.45,98,3.176]],["t/136",[20,2.556,78,2.673,99,3.865,100,3.865]],["t/138",[10,1.416,42,2.809,43,2.972,78,2.673]],["t/140",[10,1.627,39,3.072,78,3.072]],["t/142",[10,1.416,43,2.972,44,3.45,78,2.673]],["t/146",[61,5.204]],["t/148",[57,4.379]],["t/150",[101,6.332]],["t/152",[58,3.619]],["t/154",[102,6.332]],["t/156",[103,6.332]],["t/160",[104,6.332]],["t/162",[105,6.332]],["t/164",[106,3.421,107,2.486,108,3.421,109,3.421,110,3.421]],["t/168",[111,6.332]],["t/170",[25,3.176,63,3.176,112,3.45,113,3.45]],["t/172",[63,4.291,112,4.66]],["t/174",[113,5.652]],["t/176",[47,2.892,81,3.611]],["t/180",[84,4.602]],["t/182",[57,3.611,84,3.794]],["t/183",[49,3.965,50,3.65,85,3.415]],["t/185",[114,3.45,115,5.644,116,3.865]],["t/187",[19,2.811,20,2.262,26,2.811,117,3.053,118,3.053]],["t/189",[119,5.221,120,5.221]],["t/191",[121,5.221,122,5.221]],["t/193",[123,4.66,124,4.291]],["t/195",[66,4.291,67,4.66]],["t/199",[125,3.865,126,3.176,127,3.45,128,3.45]],["t/201",[47,2.892,126,4.291]],["t/203",[83,3.65,89,3.65,129,4.442]],["t/205",[89,3.65,127,3.965,128,3.965]],["t/211",[130,5.221,131,5.221]],["t/213",[132,4.291,133,4.015]],["t/215",[85,2.972,118,3.45,124,3.176,133,2.972]],["t/216",[9,2.359,50,2.521,72,2.738,134,3.068,135,3.068,136,3.068]],["t/220",[10,1.913,18,3.194]],["t/222",[14,4.869]],["t/224",[137,6.332]],["t/225",[138,6.332]],["t/227",[53,5.204]],["t/231",[58,2.209,139,3.45,140,3.176,141,3.45]],["t/237",[107,3.228,141,3.965,142,3.65]],["t/239",[107,3.228,142,3.65,143,4.442]],["t/240",[86,3.965,107,3.228,144,4.442]],["t/242",[107,3.228,145,3.965,146,4.442]],["t/244",[145,3.965,147,4.442,148,4.442]],["t/246",[91,3.965,95,3.965,142,3.65]],["t/248",[66,5.204]],["t/254",[18,2.364,149,3.176,150,3.865,151,3.865]],["t/256",[152,3.053,153,3.053,154,3.421,155,3.421,156,3.421]],["t/258",[152,3.965,153,3.965,157,4.442]],["t/260",[11,3.415,96,3.965,158,4.442]],["t/262",[123,3.965,159,4.442,160,4.442]],["t/266",[59,5.652]],["t/270",[10,1.416,18,2.364,61,3.176,133,2.972]],["t/272",[57,3.611,58,2.984]],["t/274",[58,2.984,97,4.66]],["t/275",[10,1.416,13,2.809,58,2.209,85,2.972]],["t/277",[13,2.809,58,2.209,114,3.45,161,3.865]],["t/279",[13,2.809,58,2.209,117,3.45,162,3.865]],["t/281",[46,3.415,163,4.442,164,4.442]],["t/282",[58,2.984,87,4.66]],["t/284",[58,2.984,165,5.221]],["t/286",[166,5.221,167,5.221]],["t/288",[10,1.913,98,4.291]],["t/290",[10,1.913,168,4.66]],["t/292",[10,1.913,71,4.291]],["t/294",[10,1.913,169,5.221]],["t/296",[10,1.913,98,4.291]],["t/298",[62,4.66,170,5.221]],["t/300",[71,4.291,171,5.221]],["t/302",[57,3.611,172,5.221]],["t/303",[10,1.627,11,3.415,173,3.415]],["t/305",[4,3.415,10,1.627,174,4.442]],["t/307",[10,1.627,40,3.415,168,3.965]],["t/311",[140,5.204]],["t/313",[173,4.015,175,4.015]],["t/315",[139,4.66,140,4.291]],["t/317",[176,5.652]],["t/319",[177,6.332]],["t/321",[9,4.015,178,5.221]],["t/323",[124,3.65,179,4.442,180,4.442]],["t/325",[181,6.332]],["t/327",[29,4.291,182,5.221]],["t/329",[29,4.291,183,5.221]],["t/331",[184,6.332]],["t/333",[185,4.66,186,5.221]],["t/335",[185,4.66,187,5.221]],["t/337",[188,6.332]],["t/339",[189,6.332]],["t/341",[190,6.332]],["t/343",[191,6.332]],["t/345",[149,4.291,192,5.221]],["t/346",[193,6.332]],["t/348",[194,6.332]],["t/352",[149,3.176,175,2.972,195,3.865,196,3.865]],["t/354",[10,1.253,18,2.092,173,2.63,175,2.63,197,3.421]],["t/356",[47,1.895,126,2.811,175,2.63,198,3.421,199,3.421]],["t/358",[132,3.65,176,3.965,200,4.442]],["t/362",[46,3.415,201,4.442,202,4.442]],["t/364",[173,4.015,203,5.221]],["t/366",[58,3.619]],["t/368",[204,5.221,205,5.221]],["t/372",[25,4.291,206,5.221]],["t/374",[19,3.65,20,2.938,27,3.65]],["t/376",[40,4.869]],["t/378",[14,4.869]],["t/379",[133,4.869]],["t/381",[47,3.508]],["t/383",[57,4.379]],["t/385",[132,5.204]],["t/387",[79,3.072,80,3.228,81,3.072]],["t/389",[47,1.895,79,2.365,81,2.365,82,2.811,83,2.811]],["t/391",[47,1.895,79,2.365,81,2.365,82,2.811,207,3.421]],["t/399",[6,3.794,208,5.221]],["t/401",[6,3.794,209,5.221]],["t/405",[6,3.794,210,5.221]],["t/407",[6,3.794,211,5.221]],["t/417",[10,1.913,18,3.194]]],"invertedIndex":[["",{"_index":78,"t":{"108":{"position":[[11,1]]},"134":{"position":[[29,2]]},"136":{"position":[[21,2]]},"138":{"position":[[28,2]]},"140":{"position":[[16,2]]},"142":{"position":[[32,5]]}}}],["0",{"_index":156,"t":{"256":{"position":[[33,2]]}}}],["1",{"_index":85,"t":{"118":{"position":[[15,2]]},"183":{"position":[[0,2]]},"215":{"position":[[5,2]]},"275":{"position":[[8,2]]}}}],["2",{"_index":114,"t":{"185":{"position":[[0,2]]},"277":{"position":[[8,2]]}}}],["2.0",{"_index":155,"t":{"256":{"position":[[29,3]]}}}],["3",{"_index":117,"t":{"187":{"position":[[0,2]]},"279":{"position":[[8,2]]}}}],["4",{"_index":150,"t":{"254":{"position":[[11,1]]}}}],["abstractsingleton",{"_index":209,"t":{"401":{"position":[[0,17]]}}}],["accur",{"_index":74,"t":{"100":{"position":[[44,9]]}}}],["action",{"_index":128,"t":{"199":{"position":[[30,7]]},"205":{"position":[[13,6]]}}}],["ad",{"_index":106,"t":{"164":{"position":[[0,6]]}}}],["add",{"_index":171,"t":{"300":{"position":[[0,3]]}}}],["addit",{"_index":147,"t":{"244":{"position":[[0,10]]}}}],["advanc",{"_index":172,"t":{"302":{"position":[[0,8]]}}}],["agent",{"_index":20,"t":{"18":{"position":[[37,5]]},"19":{"position":[[98,6]]},"23":{"position":[[42,5]]},"25":{"position":[[13,5]]},"136":{"position":[[8,5]]},"187":{"position":[[9,5]]},"374":{"position":[[10,5]]}}}],["ai",{"_index":29,"t":{"19":{"position":[[95,2]]},"327":{"position":[[8,2]]},"329":{"position":[[9,2]]}}}],["aim",{"_index":5,"t":{"5":{"position":[[0,6]]}}}],["anoth",{"_index":88,"t":{"120":{"position":[[4,7]]}}}],["anthrop",{"_index":181,"t":{"325":{"position":[[0,9]]}}}],["apikeyerror",{"_index":211,"t":{"407":{"position":[[0,11]]}}}],["app",{"_index":81,"t":{"114":{"position":[[16,3]]},"116":{"position":[[21,3]]},"176":{"position":[[8,3]]},"387":{"position":[[16,3]]},"389":{"position":[[21,3]]},"391":{"position":[[21,3]]}}}],["applic",{"_index":116,"t":{"185":{"position":[[14,11]]}}}],["architectur",{"_index":14,"t":{"11":{"position":[[10,12]]},"27":{"position":[[0,12]]},"222":{"position":[[0,12]]},"378":{"position":[[0,12]]}}}],["argument",{"_index":101,"t":{"150":{"position":[[0,9]]}}}],["assist",{"_index":21,"t":{"18":{"position":[[43,9]]},"19":{"position":[[42,9]]},"43":{"position":[[29,9]]}}}],["autom",{"_index":125,"t":{"199":{"position":[[0,9]]}}}],["autonom",{"_index":24,"t":{"19":{"position":[[22,10]]},"23":{"position":[[22,10]]}}}],["azur",{"_index":139,"t":{"231":{"position":[[9,5]]},"315":{"position":[[0,5]]}}}],["beautifulsoup",{"_index":144,"t":{"240":{"position":[[0,13]]}}}],["bedrock",{"_index":190,"t":{"341":{"position":[[0,7]]}}}],["better",{"_index":41,"t":{"41":{"position":[[26,6]]}}}],["browser",{"_index":146,"t":{"242":{"position":[[9,8]]}}}],["build",{"_index":23,"t":{"19":{"position":[[13,5]]},"23":{"position":[[0,8]]},"43":{"position":[[0,8]]}}}],["case",{"_index":206,"t":{"372":{"position":[[4,4]]}}}],["choos",{"_index":91,"t":{"122":{"position":[[0,8]]},"246":{"position":[[0,8]]}}}],["chrome",{"_index":159,"t":{"262":{"position":[[0,6]]}}}],["class",{"_index":54,"t":{"63":{"position":[[0,5]]}}}],["cli",{"_index":90,"t":{"120":{"position":[[48,3]]}}}],["coher",{"_index":188,"t":{"337":{"position":[[0,6]]}}}],["command",{"_index":129,"t":{"203":{"position":[[13,7]]}}}],["comparison",{"_index":119,"t":{"189":{"position":[[0,10]]}}}],["conclus",{"_index":48,"t":{"51":{"position":[[0,10]]},"70":{"position":[[0,10]]}}}],["conduct",{"_index":45,"t":{"47":{"position":[[0,10]]}}}],["config",{"_index":210,"t":{"405":{"position":[[0,6]]}}}],["configur",{"_index":141,"t":{"231":{"position":[[22,13]]},"237":{"position":[[0,11]]}}}],["context",{"_index":168,"t":{"290":{"position":[[13,7]]},"307":{"position":[[22,7]]}}}],["cost",{"_index":71,"t":{"98":{"position":[[32,5]]},"292":{"position":[[13,5]]},"300":{"position":[[4,5]]}}}],["custom",{"_index":173,"t":{"303":{"position":[[0,11]]},"313":{"position":[[0,6]]},"354":{"position":[[14,6]]},"364":{"position":[[0,6]]}}}],["data",{"_index":108,"t":{"164":{"position":[[15,4]]}}}],["date",{"_index":136,"t":{"216":{"position":[[42,5]]}}}],["deep",{"_index":121,"t":{"191":{"position":[[0,4]]}}}],["defin",{"_index":31,"t":{"29":{"position":[[0,6]]}}}],["demo",{"_index":137,"t":{"224":{"position":[[0,4]]}}}],["deploy",{"_index":132,"t":{"213":{"position":[[0,10]]},"358":{"position":[[0,6]]},"385":{"position":[[3,6]]}}}],["desir",{"_index":196,"t":{"352":{"position":[[13,7]]}}}],["determinist",{"_index":3,"t":{"3":{"position":[[30,13]]}}}],["dive",{"_index":122,"t":{"191":{"position":[[5,4]]}}}],["doc",{"_index":77,"t":{"106":{"position":[[11,4]]},"108":{"position":[[6,4]]}}}],["docker",{"_index":83,"t":{"116":{"position":[[30,6]]},"203":{"position":[[6,6]]},"389":{"position":[[30,6]]}}}],["document",{"_index":43,"t":{"45":{"position":[[17,9]]},"82":{"position":[[16,9]]},"138":{"position":[[18,9]]},"142":{"position":[[22,9]]}}}],["each",{"_index":70,"t":{"98":{"position":[[14,4]]}}}],["elestio",{"_index":200,"t":{"358":{"position":[[17,7]]}}}],["embed",{"_index":192,"t":{"345":{"position":[[6,9]]}}}],["end",{"_index":115,"t":{"185":{"position":[[3,3],[10,3]]}}}],["engin",{"_index":202,"t":{"362":{"position":[[11,7]]}}}],["ensur",{"_index":72,"t":{"100":{"position":[[11,6]]},"216":{"position":[[7,6]]}}}],["env",{"_index":179,"t":{"323":{"position":[[7,3]]}}}],["environ",{"_index":63,"t":{"80":{"position":[[15,11]]},"170":{"position":[[14,11]]},"172":{"position":[[8,11]]}}}],["error",{"_index":158,"t":{"260":{"position":[[0,5]]}}}],["exampl",{"_index":58,"t":{"68":{"position":[[6,7]]},"152":{"position":[[0,8]]},"231":{"position":[[0,8]]},"272":{"position":[[0,7]]},"274":{"position":[[9,8]]},"275":{"position":[[0,7]]},"277":{"position":[[0,7]]},"279":{"position":[[0,7]]},"282":{"position":[[8,7]]},"284":{"position":[[6,7]]},"366":{"position":[[0,7]]}}}],["exist",{"_index":151,"t":{"254":{"position":[[22,5]]}}}],["explain",{"_index":143,"t":{"239":{"position":[[17,9]]}}}],["factual",{"_index":73,"t":{"100":{"position":[[32,7]]}}}],["faiss",{"_index":104,"t":{"160":{"position":[[0,5]]}}}],["faq",{"_index":67,"t":{"90":{"position":[[0,3]]},"195":{"position":[[20,4]]}}}],["fastapi",{"_index":87,"t":{"118":{"position":[[34,9]]},"282":{"position":[[0,7]]}}}],["featur",{"_index":53,"t":{"61":{"position":[[4,8]]},"124":{"position":[[9,8]]},"227":{"position":[[0,8]]}}}],["fetch",{"_index":195,"t":{"352":{"position":[[0,8]]}}}],["final",{"_index":12,"t":{"9":{"position":[[0,10]]},"11":{"position":[[4,5]]}}}],["firework",{"_index":189,"t":{"339":{"position":[[0,9]]}}}],["first",{"_index":134,"t":{"216":{"position":[[0,6]]}}}],["flask",{"_index":165,"t":{"284":{"position":[[0,5]]}}}],["format",{"_index":205,"t":{"368":{"position":[[9,6]]}}}],["forward",{"_index":16,"t":{"13":{"position":[[6,7]]}}}],["framework",{"_index":164,"t":{"281":{"position":[[21,10]]}}}],["frontend",{"_index":80,"t":{"114":{"position":[[7,8]]},"118":{"position":[[25,8]]},"120":{"position":[[35,8]]},"124":{"position":[[0,8]]},"387":{"position":[[7,8]]}}}],["futur",{"_index":76,"t":{"102":{"position":[[28,7]]}}}],["gemini",{"_index":186,"t":{"333":{"position":[[7,6]]}}}],["getter",{"_index":166,"t":{"286":{"position":[[0,7]]}}}],["github",{"_index":127,"t":{"199":{"position":[[23,6]]},"205":{"position":[[6,6]]}}}],["go",{"_index":15,"t":{"13":{"position":[[0,5]]}}}],["gobject",{"_index":154,"t":{"256":{"position":[[20,8]]}}}],["googl",{"_index":185,"t":{"333":{"position":[[0,6]]},"335":{"position":[[0,6]]}}}],["gpt",{"_index":18,"t":{"18":{"position":[[16,3]]},"47":{"position":[[29,3]]},"49":{"position":[[33,3]]},"96":{"position":[[8,3]]},"220":{"position":[[4,3]]},"254":{"position":[[7,3]]},"270":{"position":[[17,3]]},"354":{"position":[[30,3]]},"417":{"position":[[0,3]]}}}],["gptr",{"_index":199,"t":{"356":{"position":[[24,4]]}}}],["graph",{"_index":32,"t":{"29":{"position":[[11,5]]},"31":{"position":[[2,5],[17,5]]}}}],["groq",{"_index":177,"t":{"319":{"position":[[0,4]]}}}],["handl",{"_index":174,"t":{"305":{"position":[[0,8]]}}}],["huggingfac",{"_index":184,"t":{"331":{"position":[[0,11]]}}}],["hybrid",{"_index":39,"t":{"41":{"position":[[4,6]]},"43":{"position":[[13,6]]},"49":{"position":[[12,6]]},"84":{"position":[[8,6]]},"108":{"position":[[17,8]]},"140":{"position":[[0,6]]}}}],["imag",{"_index":169,"t":{"294":{"position":[[13,6]]}}}],["index",{"_index":135,"t":{"216":{"position":[[27,5]]}}}],["infinit",{"_index":1,"t":{"3":{"position":[[12,8]]}}}],["initi",{"_index":56,"t":{"64":{"position":[[0,14]]}}}],["inspect",{"_index":92,"t":{"128":{"position":[[0,10]]}}}],["instal",{"_index":61,"t":{"78":{"position":[[0,12]]},"146":{"position":[[0,12]]},"270":{"position":[[9,7]]}}}],["integr",{"_index":163,"t":{"281":{"position":[[0,11]]}}}],["introduc",{"_index":17,"t":{"18":{"position":[[0,11]]},"21":{"position":[[0,11]]}}}],["introduct",{"_index":59,"t":{"74":{"position":[[0,12]]},"266":{"position":[[0,12]]}}}],["issu",{"_index":160,"t":{"262":{"position":[[15,6]]}}}],["key",{"_index":52,"t":{"61":{"position":[[0,3]]}}}],["langchain",{"_index":44,"t":{"45":{"position":[[32,9]]},"142":{"position":[[12,9]]}}}],["langgraph",{"_index":26,"t":{"19":{"position":[[58,9]]},"21":{"position":[[12,9]]},"187":{"position":[[27,9]]}}}],["learn",{"_index":22,"t":{"19":{"position":[[0,5]]}}}],["librari",{"_index":153,"t":{"256":{"position":[[12,7]]},"258":{"position":[[12,7]]}}}],["llm",{"_index":175,"t":{"313":{"position":[[7,3]]},"352":{"position":[[21,3]]},"354":{"position":[[21,3]]},"356":{"position":[[4,3]]}}}],["load",{"_index":152,"t":{"256":{"position":[[7,4]]},"258":{"position":[[7,4]]}}}],["local",{"_index":42,"t":{"45":{"position":[[11,5]]},"82":{"position":[[10,5]]},"106":{"position":[[5,5]]},"108":{"position":[[0,5]]},"138":{"position":[[12,5]]}}}],["loop",{"_index":2,"t":{"3":{"position":[[21,5]]}}}],["method",{"_index":142,"t":{"237":{"position":[[21,6]]},"239":{"position":[[9,7]]},"246":{"position":[[19,6]]}}}],["mistral",{"_index":182,"t":{"327":{"position":[[0,7]]}}}],["model",{"_index":149,"t":{"254":{"position":[[0,6]]},"345":{"position":[[16,6]]},"352":{"position":[[25,6]]}}}],["move",{"_index":0,"t":{"3":{"position":[[0,6]]}}}],["much",{"_index":69,"t":{"98":{"position":[[4,4]]}}}],["multi",{"_index":19,"t":{"18":{"position":[[31,5]]},"187":{"position":[[3,5]]},"374":{"position":[[4,5]]}}}],["next",{"_index":38,"t":{"33":{"position":[[7,5]]}}}],["nextj",{"_index":79,"t":{"114":{"position":[[0,6]]},"116":{"position":[[8,6]]},"120":{"position":[[28,6]]},"387":{"position":[[0,6]]},"389":{"position":[[8,6]]},"391":{"position":[[8,6]]}}}],["nomic",{"_index":193,"t":{"346":{"position":[[0,5]]}}}],["note",{"_index":103,"t":{"156":{"position":[[0,4]]}}}],["npm",{"_index":207,"t":{"391":{"position":[[30,3]]}}}],["object",{"_index":6,"t":{"5":{"position":[[11,9]]},"399":{"position":[[10,7]]},"401":{"position":[[18,7]]},"405":{"position":[[7,7]]},"407":{"position":[[12,7]]}}}],["ollama",{"_index":176,"t":{"317":{"position":[[0,6]]},"358":{"position":[[7,6]]}}}],["openai",{"_index":140,"t":{"231":{"position":[[15,6]]},"311":{"position":[[0,6]]},"315":{"position":[[6,6]]}}}],["option",{"_index":84,"t":{"118":{"position":[[6,8]]},"120":{"position":[[12,7]]},"122":{"position":[[12,6]]},"180":{"position":[[0,7]]},"182":{"position":[[6,7]]}}}],["outlin",{"_index":162,"t":{"279":{"position":[[11,7]]}}}],["output",{"_index":102,"t":{"154":{"position":[[0,6]]}}}],["overview",{"_index":51,"t":{"59":{"position":[[0,8]]}}}],["packag",{"_index":50,"t":{"55":{"position":[[8,7]]},"183":{"position":[[7,7]]},"216":{"position":[[19,7]]}}}],["pango",{"_index":157,"t":{"258":{"position":[[20,7]]}}}],["parallel",{"_index":36,"t":{"31":{"position":[[43,15]]}}}],["pgvector",{"_index":105,"t":{"162":{"position":[[0,8]]}}}],["pip",{"_index":49,"t":{"55":{"position":[[4,3]]},"183":{"position":[[3,3]]}}}],["plan",{"_index":75,"t":{"102":{"position":[[14,5]]}}}],["poetri",{"_index":113,"t":{"170":{"position":[[29,6]]},"174":{"position":[[0,6]]}}}],["poll",{"_index":94,"t":{"130":{"position":[[5,7]]}}}],["prepar",{"_index":64,"t":{"82":{"position":[[0,9]]}}}],["prerequisit",{"_index":60,"t":{"76":{"position":[[0,13]]}}}],["process",{"_index":11,"t":{"7":{"position":[[25,7]]},"45":{"position":[[0,10]]},"260":{"position":[[6,10]]},"303":{"position":[[25,7]]}}}],["prompt",{"_index":100,"t":{"136":{"position":[[14,6]]}}}],["queri",{"_index":197,"t":{"354":{"position":[[0,8]]}}}],["quickstart",{"_index":111,"t":{"168":{"position":[[0,10]]}}}],["react",{"_index":82,"t":{"116":{"position":[[15,5]]},"389":{"position":[[15,5]]},"391":{"position":[[15,5]]}}}],["report",{"_index":13,"t":{"9":{"position":[[24,6]]},"100":{"position":[[22,6]]},"275":{"position":[[20,6]]},"277":{"position":[[20,6]]},"279":{"position":[[19,6]]}}}],["requir",{"_index":131,"t":{"211":{"position":[[7,12]]}}}],["research",{"_index":10,"t":{"7":{"position":[[16,8]]},"9":{"position":[[15,8]]},"18":{"position":[[20,10]]},"19":{"position":[[33,8]]},"23":{"position":[[33,8]]},"25":{"position":[[4,8]]},"41":{"position":[[11,8]]},"43":{"position":[[20,8]]},"47":{"position":[[15,8],[33,10]]},"49":{"position":[[19,8],[37,10]]},"84":{"position":[[15,8]]},"96":{"position":[[12,11]]},"98":{"position":[[19,8]]},"134":{"position":[[0,8]]},"138":{"position":[[0,8]]},"140":{"position":[[7,8]]},"142":{"position":[[0,8]]},"220":{"position":[[8,11]]},"270":{"position":[[21,10]]},"275":{"position":[[11,8]]},"288":{"position":[[4,8]]},"290":{"position":[[4,8]]},"292":{"position":[[4,8]]},"294":{"position":[[4,8]]},"296":{"position":[[4,8]]},"303":{"position":[[16,8]]},"305":{"position":[[9,8]]},"307":{"position":[[13,8]]},"354":{"position":[[34,10]]},"417":{"position":[[4,10]]}}}],["resourc",{"_index":161,"t":{"277":{"position":[[11,8]]}}}],["respons",{"_index":204,"t":{"368":{"position":[[0,8]]}}}],["result",{"_index":4,"t":{"3":{"position":[[44,7]]},"5":{"position":[[34,7]]},"86":{"position":[[18,7]]},"305":{"position":[[18,7]]}}}],["retriev",{"_index":203,"t":{"364":{"position":[[7,10]]}}}],["right",{"_index":95,"t":{"130":{"position":[[17,5]]},"246":{"position":[[13,5]]}}}],["run",{"_index":47,"t":{"49":{"position":[[0,7]]},"55":{"position":[[0,3]]},"84":{"position":[[0,7]]},"98":{"position":[[28,3]]},"116":{"position":[[0,3]]},"120":{"position":[[20,7]]},"176":{"position":[[0,3]]},"201":{"position":[[0,7]]},"356":{"position":[[0,3]]},"381":{"position":[[7,3]]},"389":{"position":[[0,3]]},"391":{"position":[[0,3]]}}}],["scrape",{"_index":107,"t":{"164":{"position":[[7,7]]},"237":{"position":[[12,8]]},"239":{"position":[[0,8]]},"240":{"position":[[22,9]]},"242":{"position":[[18,9]]}}}],["script",{"_index":198,"t":{"356":{"position":[[13,6]]}}}],["search",{"_index":201,"t":{"362":{"position":[[4,6]]}}}],["selenium",{"_index":145,"t":{"242":{"position":[[0,8]]},"244":{"position":[[21,8]]}}}],["server",{"_index":130,"t":{"211":{"position":[[0,6]]}}}],["set",{"_index":62,"t":{"80":{"position":[[0,7]]},"298":{"position":[[0,3]]}}}],["setter",{"_index":167,"t":{"286":{"position":[[12,7]]}}}],["setup",{"_index":148,"t":{"244":{"position":[[11,5]]}}}],["sign",{"_index":178,"t":{"321":{"position":[[0,4]]}}}],["singleton",{"_index":208,"t":{"399":{"position":[[0,9]]}}}],["sourc",{"_index":98,"t":{"134":{"position":[[21,7]]},"288":{"position":[[13,7]]},"296":{"position":[[13,7]]}}}],["special",{"_index":28,"t":{"19":{"position":[[83,11]]}}}],["specif",{"_index":97,"t":{"134":{"position":[[12,8]]},"274":{"position":[[0,8]]}}}],["specifi",{"_index":99,"t":{"136":{"position":[[0,7]]}}}],["speed",{"_index":8,"t":{"7":{"position":[[0,8]]}}}],["start",{"_index":68,"t":{"94":{"position":[[13,8]]}}}],["state",{"_index":33,"t":{"29":{"position":[[17,5]]},"31":{"position":[[34,8]]}}}],["static",{"_index":86,"t":{"118":{"position":[[18,6]]},"240":{"position":[[14,7]]}}}],["step",{"_index":133,"t":{"213":{"position":[[11,5]]},"215":{"position":[[0,4]]},"270":{"position":[[0,5]]},"379":{"position":[[0,5]]}}}],["store",{"_index":110,"t":{"164":{"position":[[35,5]]}}}],["structur",{"_index":55,"t":{"63":{"position":[[6,9]]}}}],["support",{"_index":35,"t":{"31":{"position":[[26,7]]}}}],["system",{"_index":118,"t":{"187":{"position":[[15,6]]},"215":{"position":[[19,6]]}}}],["tabl",{"_index":120,"t":{"189":{"position":[[11,5]]}}}],["team",{"_index":27,"t":{"19":{"position":[[75,4]]},"25":{"position":[[19,4]]},"374":{"position":[[16,4]]}}}],["test",{"_index":126,"t":{"199":{"position":[[10,7]]},"201":{"position":[[12,5]]},"356":{"position":[[8,4]]}}}],["togeth",{"_index":183,"t":{"329":{"position":[[0,8]]}}}],["troubleshoot",{"_index":66,"t":{"88":{"position":[[0,15]]},"195":{"position":[[0,15]]},"248":{"position":[[0,15]]}}}],["tutori",{"_index":138,"t":{"225":{"position":[[0,9]]}}}],["ultim",{"_index":30,"t":{"23":{"position":[[13,8]]}}}],["unbias",{"_index":7,"t":{"5":{"position":[[25,8]]}}}],["understand",{"_index":65,"t":{"86":{"position":[[0,13]]}}}],["up",{"_index":9,"t":{"7":{"position":[[9,2]]},"80":{"position":[[8,2]]},"216":{"position":[[36,2]]},"321":{"position":[[5,2]]}}}],["updat",{"_index":124,"t":{"193":{"position":[[15,7]]},"215":{"position":[[8,6]]},"323":{"position":[[0,6]]}}}],["url",{"_index":96,"t":{"130":{"position":[[23,4]]},"260":{"position":[[21,3]]}}}],["us",{"_index":25,"t":{"19":{"position":[[52,5]]},"170":{"position":[[0,5]]},"372":{"position":[[0,3]]}}}],["usag",{"_index":57,"t":{"68":{"position":[[0,5]]},"148":{"position":[[0,5]]},"182":{"position":[[0,5]]},"272":{"position":[[8,5]]},"302":{"position":[[9,5]]},"383":{"position":[[0,5]]}}}],["var",{"_index":180,"t":{"323":{"position":[[11,4]]}}}],["vector",{"_index":109,"t":{"164":{"position":[[28,6]]}}}],["verbos",{"_index":170,"t":{"298":{"position":[[4,7]]}}}],["version",{"_index":123,"t":{"193":{"position":[[0,10]]},"262":{"position":[[7,7]]}}}],["vertexai",{"_index":187,"t":{"335":{"position":[[7,8]]}}}],["via",{"_index":89,"t":{"120":{"position":[[44,3]]},"203":{"position":[[0,3]]},"205":{"position":[[0,3]]}}}],["virtual",{"_index":112,"t":{"170":{"position":[[6,7]]},"172":{"position":[[0,7]]}}}],["voyageai",{"_index":194,"t":{"348":{"position":[[0,8]]}}}],["web",{"_index":46,"t":{"47":{"position":[[11,3]]},"108":{"position":[[13,3]]},"281":{"position":[[17,3]]},"362":{"position":[[0,3]]}}}],["webhook",{"_index":93,"t":{"128":{"position":[[11,8]]}}}],["what’",{"_index":37,"t":{"33":{"position":[[0,6]]}}}],["within",{"_index":34,"t":{"31":{"position":[[8,6]]}}}],["work",{"_index":40,"t":{"41":{"position":[[20,5]]},"66":{"position":[[7,5]]},"307":{"position":[[0,7]]},"376":{"position":[[7,5]]}}}],["xai",{"_index":191,"t":{"343":{"position":[[0,3]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2,"t":"After AutoGPT was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research. But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task. Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated. The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created GPT Researcher — an open source autonomous agent for online comprehensive research. In this article, we will share the steps that guided me toward the proposed solution.","s":"How we built GPT Researcher","u":"/blog/building-gpt-researcher","h":"","p":1},{"i":4,"t":"The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference. This is when we stumbled upon the recent paper Plan and Solve. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan. As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research. Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?","s":"Moving from infinite loops to deterministic results","u":"/blog/building-gpt-researcher","h":"#moving-from-infinite-loops-to-deterministic-results","p":1},{"i":6,"t":"The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias. To tackle this challenges, we assumed the following: Law of large numbers — More content will lead to less biased results. Especially if gathered properly. Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results. After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly. In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The law of large numbers. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic. Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?","s":"Aiming for objective and unbiased results","u":"/blog/building-gpt-researcher","h":"#aiming-for-objective-and-unbiased-results","p":1},{"i":8,"t":"Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work? By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research. # Create a list to hold the coroutine agent taskstasks = [async_browse(url, query, self.websocket) for url in await new_search_urls]# Gather the results as they become availableresponses = await asyncio.gather(*tasks, return_exceptions=True) Copy In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.","s":"Speeding up the research process","u":"/blog/building-gpt-researcher","h":"#speeding-up-the-research-process","p":1},{"i":10,"t":"Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it. After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task. The prompt is as follows: \"{research_summary}\" Using the above information, answer the following question or topic: \"{question}\" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else. Copy The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.","s":"Finalizing the research report","u":"/blog/building-gpt-researcher","h":"#finalizing-the-research-report","p":1},{"i":12,"t":"Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below: More specifically: Generate an outline of research questions that form an objective opinion on any given task. For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task. For each scraped resource, keep track, filter, and summarize only if it includes relevant information. Finally, aggregate all summarized sources and generate a final research report.","s":"The final architecture","u":"/blog/building-gpt-researcher","h":"#the-final-architecture","p":1},{"i":14,"t":"The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information. Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds. It’s all a matter of time and what GPT Researcher is all about.","s":"Going forward","u":"/blog/building-gpt-researcher","h":"#going-forward","p":1},{"i":17,"t":"Introducing the GPT Researcher Multi-Agent Assistant","s":"How to Build the Ultimate Research Multi-Agent Assistant","u":"/blog/gptr-langgraph","h":"","p":16},{"i":20,"t":"It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”). Andrew Ng has recently stated, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.” In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph. To skip this tutorial, feel free to check out the Github repo of GPT Researcher x LangGraph.","s":"Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents","u":"/blog/gptr-langgraph","h":"#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents","p":16},{"i":22,"t":"LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents. LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so. Enough with the smalltalk, let’s start building!","s":"Introducing LangGraph","u":"/blog/gptr-langgraph","h":"#introducing-langgraph","p":16},{"i":24,"t":"By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows. Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.","s":"Building the Ultimate Autonomous Research Agent","u":"/blog/gptr-langgraph","h":"#building-the-ultimate-autonomous-research-agent","p":16},{"i":26,"t":"The research team consists of seven LLM agents: Chief Editor — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface. GPT Researcher — A specialized autonomous agent that conducts in depth research on a given topic. Editor — Responsible for planning the research outline and structure. Reviewer — Validates the correctness of the research results given a set of criteria. Reviser — Revises the research results based on the feedback from the reviewer. Writer — Responsible for compiling and writing the final report. Publisher — Responsible for publishing the final report in various formats.","s":"The Research Agent Team","u":"/blog/gptr-langgraph","h":"#the-research-agent-team","p":16},{"i":28,"t":"As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication: More specifically the process is as follows: Browser (gpt-researcher) — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic. Editor — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline. For each outline topic (in parallel): Researcher (gpt-researcher) — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report. Reviewer — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any). Reviser — Revises the draft until it is satisfactory based on the reviewer feedback. Writer — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings. Publisher — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc. We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.","s":"Architecture","u":"/blog/gptr-langgraph","h":"#architecture","p":16},{"i":30,"t":"One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction. Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so: class ResearchState(TypedDict): task: dict initial_research: str sections: List[str] research_data: List[dict] # Report layout title: str headers: dict date: str table_of_contents: str introduction: str conclusion: str sources: List[str] report: str Copy As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents. We can then initialize the graph with the following: from langgraph.graph import StateGraphworkflow = StateGraph(ResearchState) Copy Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package: from gpt_researcher import GPTResearcherclass ResearchAgent: def __init__(self): pass async def research(self, query: str): # Initialize the researcher researcher = GPTResearcher(parent_query=parent_query, query=query, report_type=research_report, config_path=None) # Conduct research on the given query await researcher.conduct_research() # Write the report report = await researcher.write_report() return report Copy As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph: def init_research_team(self): # Initialize skills editor_agent = EditorAgent(self.task) research_agent = ResearchAgent() writer_agent = WriterAgent() publisher_agent = PublisherAgent(self.output_dir) # Define a Langchain StateGraph with the ResearchState workflow = StateGraph(ResearchState) # Add nodes for each agent workflow.add_node(\"browser\", research_agent.run_initial_research) workflow.add_node(\"planner\", editor_agent.plan_research) workflow.add_node(\"researcher\", editor_agent.run_parallel_research) workflow.add_node(\"writer\", writer_agent.run) workflow.add_node(\"publisher\", publisher_agent.run) workflow.add_edge('browser', 'planner') workflow.add_edge('planner', 'researcher') workflow.add_edge('researcher', 'writer') workflow.add_edge('writer', 'publisher') # set up start and end nodes workflow.set_entry_point(\"browser\") workflow.add_edge('publisher', END) return workflow Copy As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point. Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!","s":"Define the Graph State","u":"/blog/gptr-langgraph","h":"#define-the-graph-state","p":16},{"i":32,"t":"This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines. Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised. As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information: class DraftState(TypedDict): task: dict topic: str draft: dict review: str revision_notes: str Copy As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges: async def run_parallel_research(self, research_state: dict): workflow = StateGraph(DraftState) workflow.add_node(\"researcher\", research_agent.run_depth_research) workflow.add_node(\"reviewer\", reviewer_agent.run) workflow.add_node(\"reviser\", reviser_agent.run) # set up edges researcher->reviewer->reviser->reviewer... workflow.set_entry_point(\"researcher\") workflow.add_edge('researcher', 'reviewer') workflow.add_edge('reviser', 'reviewer') workflow.add_conditional_edges('reviewer', (lambda draft: \"accept\" if draft['review'] is None else \"revise\"), {\"accept\": END, \"revise\": \"reviser\"}) Copy By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent. Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file: { \"query\": \"Is AI in a hype cycle?\", \"max_sections\": 3, \"publish_formats\": { \"markdown\": true, \"pdf\": true, \"docx\": true }, \"follow_guidelines\": false, \"model\": \"gpt-4-turbo\", \"guidelines\": [ \"The report MUST be written in APA format\", \"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section\", \"The report MUST be written in spanish\" ]} Copy The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report. Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx. To download and run the example check out the GPT Researcher x LangGraph open source page.","s":"A Graph within a Graph to support stateful Parallelization","u":"/blog/gptr-langgraph","h":"#a-graph-within-a-graph-to-support-stateful-parallelization","p":16},{"i":34,"t":"Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here. In addition, having support for research about both web and local data would be key for many types of business and personal use cases. Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline. A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings! To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!","s":"What’s Next?","u":"/blog/gptr-langgraph","h":"#whats-next","p":16},{"i":36,"t":"OpenAI has done it again with a groundbreaking DevDay showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new Assistants API that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools. The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files. This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool. To skip the tutorial below, feel free to check out the full Github Gist here. At a high level, a typical integration of the Assistants API has the following steps: Create an Assistant in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling. Create a Thread when a user starts a conversation. Add Messages to the Thread as the user ask questions. Run the Assistant on the Thread to trigger responses. This automatically calls the relevant tools. As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread. Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the OpenAI Python SDK v1.2 and Tavily Search API. First things first, let’s define the assistant’s instructions: assistant_prompt_instruction = \"\"\"You are a finance expert. Your goal is to provide answers based on information from the internet. You must use the provided Tavily search API function to find relevant online information. You should never use your own knowledge to answer questions.Please include relevant url sources in the end of your answers.\"\"\" Copy Next, let’s finalize step 1 and create an assistant using the latest GPT-4 Turbo model (128K context), and the call function using the Tavily web search API: # Create an assistantassistant = client.beta.assistants.create( instructions=assistant_prompt_instruction, model=\"gpt-4-1106-preview\", tools=[{ \"type\": \"function\", \"function\": { \"name\": \"tavily_search\", \"description\": \"Get information on recent events from the web.\", \"parameters\": { \"type\": \"object\", \"properties\": { \"query\": {\"type\": \"string\", \"description\": \"The search query to use. For example: 'Latest news on Nvidia stock performance'\"}, }, \"required\": [\"query\"] } } }]) Copy Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message: thread = client.beta.threads.create()user_input = input(\"You: \")message = client.beta.threads.messages.create( thread_id=thread.id, role=\"user\", content=user_input,) Copy Finally, we’ll run the assistant on the thread to trigger the function call and get the response: run = client.beta.threads.runs.create( thread_id=thread.id, assistant_id=assistant_id,) Copy So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually. To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’): # Function to wait for a run to completedef wait_for_run_completion(thread_id, run_id): while True: time.sleep(1) run = client.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run_id) print(f\"Current run status: {run.status}\") if run.status in ['completed', 'failed', 'requires_action']: return run Copy This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call. We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API: # Function to handle tool output submissiondef submit_tool_outputs(thread_id, run_id, tools_to_call): tool_output_array = [] for tool in tools_to_call: output = None tool_call_id = tool.id function_name = tool.function.name function_args = tool.function.arguments if function_name == \"tavily_search\": output = tavily_search(query=json.loads(function_args)[\"query\"]) if output: tool_output_array.append({\"tool_call_id\": tool_call_id, \"output\": output}) return client.beta.threads.runs.submit_tool_outputs( thread_id=thread_id, run_id=run_id, tool_outputs=tool_output_array ) Copy As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below: if run.status == 'requires_action': run = submit_tool_outputs(thread.id, run.id, run.required_action.submit_tool_outputs.tool_calls) run = wait_for_run_completion(thread.id, run.id) Copy That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code: import osimport jsonimport timefrom openai import OpenAIfrom tavily import TavilyClient# Initialize clients with API keysclient = OpenAI(api_key=os.environ[\"OPENAI_API_KEY\"])tavily_client = TavilyClient(api_key=os.environ[\"TAVILY_API_KEY\"])assistant_prompt_instruction = \"\"\"You are a finance expert. Your goal is to provide answers based on information from the internet. You must use the provided Tavily search API function to find relevant online information. You should never use your own knowledge to answer questions.Please include relevant url sources in the end of your answers.\"\"\"# Function to perform a Tavily searchdef tavily_search(query): search_result = tavily_client.get_search_context(query, search_depth=\"advanced\", max_tokens=8000) return search_result# Function to wait for a run to completedef wait_for_run_completion(thread_id, run_id): while True: time.sleep(1) run = client.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run_id) print(f\"Current run status: {run.status}\") if run.status in ['completed', 'failed', 'requires_action']: return run# Function to handle tool output submissiondef submit_tool_outputs(thread_id, run_id, tools_to_call): tool_output_array = [] for tool in tools_to_call: output = None tool_call_id = tool.id function_name = tool.function.name function_args = tool.function.arguments if function_name == \"tavily_search\": output = tavily_search(query=json.loads(function_args)[\"query\"]) if output: tool_output_array.append({\"tool_call_id\": tool_call_id, \"output\": output}) return client.beta.threads.runs.submit_tool_outputs( thread_id=thread_id, run_id=run_id, tool_outputs=tool_output_array )# Function to print messages from a threaddef print_messages_from_thread(thread_id): messages = client.beta.threads.messages.list(thread_id=thread_id) for msg in messages: print(f\"{msg.role}: {msg.content[0].text.value}\")# Create an assistantassistant = client.beta.assistants.create( instructions=assistant_prompt_instruction, model=\"gpt-4-1106-preview\", tools=[{ \"type\": \"function\", \"function\": { \"name\": \"tavily_search\", \"description\": \"Get information on recent events from the web.\", \"parameters\": { \"type\": \"object\", \"properties\": { \"query\": {\"type\": \"string\", \"description\": \"The search query to use. For example: 'Latest news on Nvidia stock performance'\"}, }, \"required\": [\"query\"] } } }])assistant_id = assistant.idprint(f\"Assistant ID: {assistant_id}\")# Create a threadthread = client.beta.threads.create()print(f\"Thread: {thread}\")# Ongoing conversation loopwhile True: user_input = input(\"You: \") if user_input.lower() == 'exit': break # Create a message message = client.beta.threads.messages.create( thread_id=thread.id, role=\"user\", content=user_input, ) # Create a run run = client.beta.threads.runs.create( thread_id=thread.id, assistant_id=assistant_id, ) print(f\"Run ID: {run.id}\") # Wait for run to complete run = wait_for_run_completion(thread.id, run.id) if run.status == 'failed': print(run.error) continue elif run.status == 'requires_action': run = submit_tool_outputs(thread.id, run.id, run.required_action.submit_tool_outputs.tool_calls) run = wait_for_run_completion(thread.id, run.id) # Print messages from the thread print_messages_from_thread(thread.id) Copy The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter. Feel free to drop a comment below if you have any further questions!","s":"How to build an OpenAI Assistant with Internet access","u":"/blog/building-openai-assistant","h":"","p":35},{"i":38,"t":"Contribute We highly welcome contributions! Please check out contributing if you're interested. Please check out our roadmap page and reach out to us via our Discord community if you're interested in joining our mission.","s":"Contribute","u":"/docs/contribute","h":"","p":37},{"i":40,"t":"Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like ChatPDF and Consensus, focus on extracting insights from documents. Others, such as Perplexity, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline. This is why I'm excited to introduce the latest advancements of GPT Researcher — now able to conduct hybrid research on any given task and documents. Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions. Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.","s":"The Future of Research is Hybrid","u":"/blog/gptr-hybrid","h":"","p":39},{"i":42,"t":"By combining web and local sources, hybrid research addresses these limitations and offers several key advantages: Grounded context: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology. Example: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web. Enhanced accuracy: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making. Example: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions. Reduced bias: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone. Example: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective. Improved planning and reasoning: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online. Example: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights. Customized insights: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights. Example: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions. These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!","s":"Why Hybrid Research Works Better","u":"/blog/gptr-hybrid","h":"#why-hybrid-research-works-better","p":39},{"i":44,"t":"Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood. GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report. We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.","s":"Building the Hybrid Research Assistant","u":"/blog/gptr-hybrid","h":"#building-the-hybrid-research-assistant","p":39},{"i":46,"t":"LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up: from langchain_community.document_loaders import ( PyMuPDFLoader, TextLoader, UnstructuredCSVLoader, UnstructuredExcelLoader, UnstructuredMarkdownLoader, UnstructuredPowerPointLoader, UnstructuredWordDocumentLoader)from langchain.text_splitter import RecursiveCharacterTextSplitterfrom langchain.embeddings import OpenAIEmbeddingsfrom langchain.vectorstores import Chromadef load_local_documents(file_paths): documents = [] for file_path in file_paths: if file_path.endswith('.pdf'): loader = PyMuPDFLoader(file_path) elif file_path.endswith('.txt'): loader = TextLoader(file_path) elif file_path.endswith('.csv'): loader = UnstructuredCSVLoader(file_path) elif file_path.endswith('.xlsx'): loader = UnstructuredExcelLoader(file_path) elif file_path.endswith('.md'): loader = UnstructuredMarkdownLoader(file_path) elif file_path.endswith('.pptx'): loader = UnstructuredPowerPointLoader(file_path) elif file_path.endswith('.docx'): loader = UnstructuredWordDocumentLoader(file_path) else: raise ValueError(f\"Unsupported file type: {file_path}\") documents.extend(loader.load()) return documents# Use the function to load your local documentslocal_docs = load_local_documents(['company_report.pdf', 'meeting_notes.docx', 'data.csv'])# Split the documents into smaller chunks for more efficient processingtext_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)splits = text_splitter.split_documents(local_docs)# Create embeddings and store them in a vector database for quick retrievalembeddings = OpenAIEmbeddings()vectorstore = Chroma.from_documents(documents=splits, embedding=embeddings)# Example of how to perform a similarity searchquery = \"What were the key points from our last strategy meeting?\"relevant_docs = vectorstore.similarity_search(query, k=3)for doc in relevant_docs: print(doc.page_content) Copy","s":"Processing Local Documents with Langchain","u":"/blog/gptr-hybrid","h":"#processing-local-documents-with-langchain","p":39},{"i":48,"t":"Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood: As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report. GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!","s":"Conducting Web Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#conducting-web-research-with-gpt-researcher","p":39},{"i":50,"t":"Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher. Step 1: Install GPT Researcher with PIP pip install gpt-researcher Copy Step 2: Setting up the environment We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows: export OPENAI_API_KEY={your-openai-key}export TAVILY_API_KEY={your-tavily-key} Copy Step 3: Initialize GPT Researcher with hybrid research configuration GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more. To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to \"hybrid\" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it. from gpt_researcher import GPTResearcherimport asyncioasync def get_research_report(query: str, report_type: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source) research = await researcher.conduct_research() report = await researcher.write_report() return report if __name__ == \"__main__\": query = \"How does our product roadmap compare to emerging market trends in our industry?\" report_source = \"hybrid\" report = asyncio.run(get_research_report(query=query, report_type=\"research_report\", report_source=report_source)) print(report) Copy As seen above, we can run the research on the following example: Research task: \"How does our product roadmap compare to emerging market trends in our industry?\" Web: Current market trends, competitor announcements, and industry forecasts Local: Internal product roadmap documents and feature prioritization lists After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources. But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.","s":"Running the Hybrid Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#running-the-hybrid-research-with-gpt-researcher","p":39},{"i":52,"t":"Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like GPT Researcher, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights. The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.","s":"Conclusion","u":"/blog/gptr-hybrid","h":"#conclusion","p":39},{"i":54,"t":"On this page","s":"Simple Run","u":"/docs/examples/examples","h":"","p":53},{"i":56,"t":"from gpt_researcher import GPTResearcherimport asyncioasync def main(): \"\"\" This is a sample script that shows how to run a research report. \"\"\" # Query query = \"What happened in the latest burning man floods?\" # Report Type report_type = \"research_report\" # Initialize the researcher researcher = GPTResearcher(query=query, report_type=report_type, config_path=None) # Conduct research on the given query await researcher.conduct_research() # Write the report report = await researcher.write_report() return reportif __name__ == \"__main__\": asyncio.run(main()) Copy","s":"Run PIP Package","u":"/docs/examples/examples","h":"#run-pip-package","p":53},{"i":58,"t":"On this page","s":"Detailed Report","u":"/docs/examples/detailed_report","h":"","p":57},{"i":60,"t":"The DetailedReport class inspired by the recent STORM paper, is a powerful component of GPT Researcher, designed to generate comprehensive reports on complex topics. It's particularly useful for creating long-form content that exceeds the typical limits of LLM outputs. This class orchestrates the research process, breaking down the main query into subtopics, conducting in-depth research on each, and combining the results into a cohesive, detailed report. Located in backend/report_types/detailed_report.py in the GPT Researcher GitHub repository, this class leverages the capabilities of the GPTResearcher agent to perform targeted research and generate content.","s":"Overview","u":"/docs/examples/detailed_report","h":"#overview","p":57},{"i":62,"t":"Breaks down complex topics into manageable subtopics Conducts in-depth research on each subtopic Generates a comprehensive report with introduction, table of contents, and body Avoids redundancy by tracking previously written content Supports asynchronous operations for improved performance","s":"Key Features","u":"/docs/examples/detailed_report","h":"#key-features","p":57},{"i":65,"t":"The DetailedReport class is initialized with the following parameters: query: The main research query report_type: Type of the report report_source: Source of the report source_urls: Initial list of source URLs config_path: Path to the configuration file tone: Tone of the report (using the Tone enum) websocket: WebSocket for real-time communication subtopics: Optional list of predefined subtopics headers: Optional headers for HTTP requests","s":"Initialization","u":"/docs/examples/detailed_report","h":"#initialization","p":57},{"i":67,"t":"The DetailedReport class starts by conducting initial research on the main query. It then breaks down the topic into subtopics. For each subtopic, it: Conducts focused research Generates draft section titles Retrieves relevant previously written content to avoid redundancy Writes a report section Finally, it combines all subtopic reports, adds a table of contents, and includes source references to create the final detailed report.","s":"How It Works","u":"/docs/examples/detailed_report","h":"#how-it-works","p":57},{"i":69,"t":"Here's how you can use the DetailedReport class in your project: import asynciofrom fastapi import WebSocketfrom gpt_researcher.utils.enum import Tonefrom backend.report_type import DetailedReportasync def generate_report(websocket: WebSocket): detailed_report = DetailedReport( query=\"The impact of artificial intelligence on modern healthcare\", report_type=\"research_report\", report_source=\"web_search\", source_urls=[], # You can provide initial source URLs if available config_path=\"path/to/config.yaml\", tone=Tone.FORMAL, websocket=websocket, subtopics=[], # You can provide predefined subtopics if desired headers={} # Add any necessary HTTP headers ) final_report = await detailed_report.run() return final_report# In your FastAPI app@app.websocket(\"/generate_report\")async def websocket_endpoint(websocket: WebSocket): await websocket.accept() report = await generate_report(websocket) await websocket.send_text(report) Copy This example demonstrates how to create a DetailedReport instance and run it to generate a comprehensive report on the impact of AI on healthcare.","s":"Usage Example","u":"/docs/examples/detailed_report","h":"#usage-example","p":57},{"i":71,"t":"The DetailedReport class is a sophisticated tool for generating in-depth, well-structured reports on complex topics. By breaking down the main query into subtopics and leveraging the power of GPT Researcher, it can produce content that goes beyond the typical limitations of LLM outputs. This makes it an invaluable asset for researchers, content creators, and anyone needing detailed, well-researched information on a given topic.","s":"Conclusion","u":"/docs/examples/detailed_report","h":"#conclusion","p":57},{"i":73,"t":"On this page","s":"Hybrid Research","u":"/docs/examples/hybrid_research","h":"","p":72},{"i":75,"t":"GPT Researcher can combine web search capabilities with local document analysis to provide comprehensive, context-aware research results. This guide will walk you through the process of setting up and running hybrid research using GPT Researcher.","s":"Introduction","u":"/docs/examples/hybrid_research","h":"#introduction","p":72},{"i":77,"t":"Before you begin, ensure you have the following: Python 3.10 or higher installed on your system pip (Python package installer) An OpenAI API key (you can also choose other supported LLMs) A Tavily API key (you can also choose other supported Retrievers)","s":"Prerequisites","u":"/docs/examples/hybrid_research","h":"#prerequisites","p":72},{"i":79,"t":"pip install gpt-researcher Copy","s":"Installation","u":"/docs/examples/hybrid_research","h":"#installation","p":72},{"i":81,"t":"Export your API keys as environment variables: export OPENAI_API_KEY=your_openai_api_key_hereexport TAVILY_API_KEY=your_tavily_api_key_here Copy Alternatively, you can set these in your Python script: import osos.environ['OPENAI_API_KEY'] = 'your_openai_api_key_here'os.environ['TAVILY_API_KEY'] = 'your_tavily_api_key_here' Copy","s":"Setting Up the Environment","u":"/docs/examples/hybrid_research","h":"#setting-up-the-environment","p":72},{"i":83,"t":"Create a directory named my-docs in your project folder. Place all relevant local documents (PDFs, TXTs, DOCXs, etc.) in this directory.","s":"Preparing Local Documents","u":"/docs/examples/hybrid_research","h":"#preparing-local-documents","p":72},{"i":85,"t":"Here's a basic script to run hybrid research: from gpt_researcher import GPTResearcherimport asyncioasync def get_research_report(query: str, report_type: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source) research = await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"How does our product roadmap compare to emerging market trends in our industry?\" report_source = \"hybrid\" report = asyncio.run(get_research_report(query=query, report_type=\"research_report\", report_source=report_source)) print(report) Copy To run the script: Save it as run_research.py Execute it with: python run_research.py","s":"Running Hybrid Research","u":"/docs/examples/hybrid_research","h":"#running-hybrid-research","p":72},{"i":87,"t":"The output will be a comprehensive research report that combines insights from both web sources and your local documents. The report typically includes an executive summary, key findings, detailed analysis, comparisons between your internal data and external trends, and recommendations based on the combined insights.","s":"Understanding the Results","u":"/docs/examples/hybrid_research","h":"#understanding-the-results","p":72},{"i":89,"t":"API Key Issues: Ensure your API keys are correctly set and have the necessary permissions. Document Loading Errors: Check that your local documents are in supported formats and are not corrupted. Memory Issues: For large documents or extensive research, you may need to increase your system's available memory or adjust the chunk_size in the document processing step.","s":"Troubleshooting","u":"/docs/examples/hybrid_research","h":"#troubleshooting","p":72},{"i":91,"t":"Q: How long does a typical research session take? A: The duration varies based on the complexity of the query and the amount of data to process. It can range from 1-5 minutes for very comprehensive research. Q: Can I use GPT Researcher with other language models? A: Currently, GPT Researcher is optimized for OpenAI's models. Support for other models can be found here. Q: How does GPT Researcher handle conflicting information between local and web sources? A: The system attempts to reconcile differences by providing context and noting discrepancies in the final report. It prioritizes more recent or authoritative sources when conflicts arise. Q: Is my local data sent to external servers during the research process? A: No, your local documents are processed on your machine. Only the generated queries and synthesized information (not raw data) are sent to external services for web research. For more information and updates, please visit the GPT Researcher GitHub repository.","s":"FAQ","u":"/docs/examples/hybrid_research","h":"#faq","p":72},{"i":93,"t":"On this page","s":"FAQ","u":"/docs/faq","h":"","p":92},{"i":95,"t":"It really depends on what you're aiming for. If you're looking to connect your AI application to the internet with Tavily tailored API, check out the Tavily API documentation. If you're looking to build and deploy our open source autonomous research agent GPT Researcher, please see GPT Researcher documentation. You can also check out demos and examples for inspiration here.","s":"How do I get started?","u":"/docs/faq","h":"#how-do-i-get-started","p":92},{"i":97,"t":"GPT Researcher is a popular open source autonomous research agent that takes care of the tedious task of research for you, by scraping, filtering and aggregating over 20+ web sources per a single research task. GPT Researcher is built with best practices for leveraging LLMs (prompt engineering, RAG, chains, embeddings, etc), and is optimized for quick and efficient research. It is also fully customizable and can be tailored to your specific needs. To learn more about GPT Researcher, check out the documentation page.","s":"What is GPT Researcher?","u":"/docs/faq","h":"#what-is-gpt-researcher","p":92},{"i":99,"t":"A research task using GPT Researcher costs around $0.01 per a single run (for GPT-4 usage). We're constantly optimizing LLM calls to reduce costs and improve performance.","s":"How much does each research run cost?","u":"/docs/faq","h":"#how-much-does-each-research-run-cost","p":92},{"i":101,"t":"we do our best to ensure that the information we provide is factual and accurate. We do this by using multiple sources, and by using proprietary AI to score and rank the most relevant and accurate information. We also use proprietary AI to filter out irrelevant information and sources. Lastly, by using RAG and other techniques, we ensure that the information is relevant to the context of the research task, leading to more accurate generative AI content and reduced hallucinations.","s":"How do you ensure the report is factual and accurate?","u":"/docs/faq","h":"#how-do-you-ensure-the-report-is-factual-and-accurate","p":92},{"i":103,"t":"We're constantly working on improving our products and services. We're currently working on improving our search API together with design partners, and adding more data sources to our search engine. We're also working on improving our research agent GPT Researcher, and adding more features to it while growing our amazing open source community. If you're interested in our roadmap or looking to collaborate, check out our roadmap page. Feel free to contact us if you have any further questions or suggestions!","s":"What are your plans for the future?","u":"/docs/faq","h":"#what-are-your-plans-for-the-future","p":92},{"i":105,"t":"On this page","s":"Research on Local Documents","u":"/docs/gpt-researcher/context/local-docs","h":"","p":104},{"i":107,"t":"You can instruct the GPT Researcher to run research tasks based on your local documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents. Step 1: Add the env variable DOC_PATH pointing to the folder where your documents are located. export DOC_PATH=\"./my-docs\" Copy Step 2: If you're running the frontend app on localhost:8000, simply select \"My Documents\" from the \"Report Source\" Dropdown Options. If you're running GPT Researcher with the PIP package, pass the report_source argument as \"local\" when you instantiate the GPTResearcher class code sample here.","s":"Just Local Docs","u":"/docs/gpt-researcher/context/local-docs","h":"#just-local-docs","p":104},{"i":109,"t":"Check out the blog post on Hybrid Research to learn more about how to combine local documents with web research. Copy","s":"Local Docs + Web (Hybrid)","u":"/docs/gpt-researcher/context/local-docs","h":"#local-docs--web-hybrid","p":104},{"i":111,"t":"Filtering by Domain If you set Google as a Retriever, you can filter web results by site. For example, set in the query param you pass the GPTResearcher class instance: query=\"site:linkedin.com a python web developer to implement my custom gpt-researcher flow\" will limit the results to linkedin.com Step 1 - Set these environment variables with a .env file in the root folder TAVILY_API_KEY=LANGCHAIN_TRACING_V2=trueLANGCHAIN_API_KEY=OPENAI_API_KEY=DOC_PATH=./my-docsRETRIEVER=googleGOOGLE_API_KEY=GOOGLE_CX_KEY= Copy Step 2 - from the root project run: docker-compose up -- build Step 3 - from the frontend input box in localhost:3000, you can append any google search filter (such as filtering by domain names)","s":"Filtering by Domain","u":"/docs/gpt-researcher/context/filtering-by-domain","h":"","p":110},{"i":113,"t":"On this page","s":"Frontend Application","u":"/docs/gpt-researcher/frontend/frontend","h":"","p":112},{"i":115,"t":"The React app (located in the frontend directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well. It comes with loads of added features, such as: a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher. a GUI for setting your GPTR environment variables. the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta). stability fixes and more coming soon!","s":"NextJS Frontend App","u":"/docs/gpt-researcher/frontend/frontend","h":"#nextjs-frontend-app","p":112},{"i":117,"t":"Step 1 - Install Docker Step 2 - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env' Step 3 - Within the docker-compose file comment out services that you don't want to run with Docker. docker compose up --build Copy If that doesn't work, try running it without the dash: docker compose up --build Copy Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes: the Python server running on localhost:8000 the React app running on localhost:3000 Visit localhost:3000 on any browser and enjoy researching!","s":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/frontend/frontend","h":"#run-the-nextjs-react-app-with-docker","p":112},{"i":119,"t":"A lightweight solution using FastAPI to serve static files. Prerequisites Python 3.11+ pip Setup and Running Install required packages: pip install -r requirements.txt Copy Start the server: python -m uvicorn main:app Copy Access at http://localhost:8000 Demo","s":"Other Options: 1: Static Frontend (FastAPI)","u":"/docs/gpt-researcher/frontend/frontend","h":"#other-options-1-static-frontend-fastapi","p":112},{"i":121,"t":"A more robust solution with enhanced features and performance. Prerequisites Node.js (v18.17.0 recommended) npm Setup and Running Navigate to NextJS directory: cd nextjs Copy Set up Node.js: nvm install 18.17.0nvm use v18.17.0 Copy Install dependencies: npm install --legacy-peer-deps Copy Start development server: npm run dev Copy Access at http://localhost:3000 Note: Requires backend server on localhost:8000 as detailed in option 1. Demo","s":"Yet Another Option: Running NextJS Frontend via CLI","u":"/docs/gpt-researcher/frontend/frontend","h":"#yet-another-option-running-nextjs-frontend-via-cli","p":112},{"i":123,"t":"Static Frontend: Quick setup, lightweight deployment. NextJS Frontend: Feature-rich, scalable, better performance and SEO. For production, NextJS is recommended.","s":"Choosing an Option","u":"/docs/gpt-researcher/frontend/frontend","h":"#choosing-an-option","p":112},{"i":125,"t":"Our frontend enhances GPT-Researcher by providing: Intuitive Research Interface: Streamlined input for research queries. Real-time Progress Tracking: Visual feedback on ongoing research tasks. Interactive Results Display: Easy-to-navigate presentation of findings. Customizable Settings: Adjust research parameters to suit specific needs. Responsive Design: Optimal experience across various devices. These features aim to make the research process more efficient and user-friendly, complementing GPT-Researcher's powerful agent capabilities.","s":"Frontend Features","u":"/docs/gpt-researcher/frontend/frontend","h":"#frontend-features","p":112},{"i":127,"t":"On this page","s":"Playing with Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"","p":126},{"i":129,"t":"When running reports via the frontend, you can inspect the websocket messages in the Network Tab. Here's how:","s":"Inspecting Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#inspecting-webhooks","p":126},{"i":131,"t":"If you're concerned that your frontend isn't hitting the right API Endpoint, you can check the URL in the Network Tab. Click into the WS request & go to the \"Headers\" tab For debugging, have a look at the getHost function.","s":"Am I polling the right URL?","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#am-i-polling-the-right-url","p":126},{"i":133,"t":"On this page","s":"Tailored Research","u":"/docs/gpt-researcher/context/tailored-research","h":"","p":132},{"i":135,"t":"You can specify the sources you want the GPT Researcher to research on by providing a list of URLs. The GPT Researcher will then conduct research on the provided sources via source_urls. If you want GPT Researcher to perform additional research outside of the URLs you provided, i.e., conduct research on various other websites that it finds suitable for the query/sub-query, you can set the parameter complement_source_urls as True. Default value of False will only scour the websites you provide via source_urls. from gpt_researcher import GPTResearcherimport asyncioasync def get_report(query: str, report_type: str, sources: list) -> str: researcher = GPTResearcher(query=query, report_type=report_type, source_urls=sources, complement_source_urls=False) await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"What are the biggest trends in AI lately?\" report_source = \"static\" sources = [ \"https://en.wikipedia.org/wiki/Artificial_intelligence\", \"https://www.ibm.com/think/insights/artificial-intelligence-trends\", \"https://www.forbes.com/advisor/business/ai-statistics\" ] report = asyncio.run(get_report(query=query, report_source=report_source, sources=sources)) print(report) Copy","s":"Research on Specific Sources 📚","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-specific-sources-","p":132},{"i":137,"t":"You can specify the agent prompt instruction upon which the research is conducted. This allows you to guide the research in a specific direction and tailor the report layout. Simply pass the prompt as the query argument to the GPTResearcher class and the \"custom_report\" report_type. from gpt_researcher import GPTResearcherimport asyncioasync def get_report(prompt: str, report_type: str) -> str: researcher = GPTResearcher(query=prompt, report_type=report_type) await researcher.conduct_research() report = await researcher.write_report() return report if __name__ == \"__main__\": report_type = \"custom_report\" prompt = \"Research the latest advancements in AI and provide a detailed report in APA format including sources.\" report = asyncio.run(get_report(prompt=prompt, report_type=report_type)) print(report) Copy","s":"Specify Agent Prompt 📝","u":"/docs/gpt-researcher/context/tailored-research","h":"#specify-agent-prompt-","p":132},{"i":139,"t":"You can instruct the GPT Researcher to research on local documents by providing the path to those documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents. Step 1: Add the env variable DOC_PATH pointing to the folder where your documents are located. For example: export DOC_PATH=\"./my-docs\" Copy Step 2: When you create an instance of the GPTResearcher class, pass the report_source argument as \"local\". GPT Researcher will then conduct research on the provided documents. from gpt_researcher import GPTResearcherimport asyncioasync def get_report(query: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_source=report_source) await researcher.conduct_research() report = await researcher.write_report() return report if __name__ == \"__main__\": query = \"What can you tell me about myself based on my documents?\" report_source = \"local\" # \"local\" or \"web\" report = asyncio.run(get_report(query=query, report_source=report_source)) print(report) Copy","s":"Research on Local Documents 📄","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-local-documents-","p":132},{"i":141,"t":"You can combine the above methods to conduct hybrid research. For example, you can instruct the GPT Researcher to research on both web sources and local documents. Simply provide the sources and set the report_source argument as \"hybrid\" and watch the magic happen. Please note! You should set the proper retrievers for the web sources and doc path for local documents for this to work. To learn more about retrievers check out the Retrievers documentation.","s":"Hybrid Research 🔄","u":"/docs/gpt-researcher/context/tailored-research","h":"#hybrid-research-","p":132},{"i":143,"t":"You can instruct the GPT Researcher to research on a list of langchain document instances. For example: from langchain_core.documents import Documentfrom typing import List, Dictfrom gpt_researcher import GPTResearcherfrom langchain_postgres.vectorstores import PGVectorfrom langchain_openai import OpenAIEmbeddingsfrom sqlalchemy import create_engineimport asyncioCONNECTION_STRING = 'postgresql://someuser:somepass@localhost:5432/somedatabase'def get_retriever(collection_name: str, search_kwargs: Dict[str, str]): engine = create_engine(CONNECTION_STRING) embeddings = OpenAIEmbeddings() index = PGVector.from_existing_index( use_jsonb=True, embedding=embeddings, collection_name=collection_name, connection=engine, ) return index.as_retriever(search_kwargs=search_kwargs)async def get_report(query: str, report_type: str, report_source: str, documents: List[Document]) -> str: researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source, documents=documents) await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"What can you tell me about blue cheese based on my documents?\" report_type = \"research_report\" report_source = \"langchain_documents\" # using a LangChain retriever to get all the documents regarding cheese # https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html#langchain_core.retrievers.BaseRetriever.invoke langchain_retriever = get_retriever(\"cheese_collection\", { \"k\": 3 }) documents = langchain_retriever.invoke(\"All the documents about cheese\") report = asyncio.run(get_report(query=query, report_type=report_type, report_source=report_source, documents=documents)) print(report) Copy","s":"Research on LangChain Documents 🦜️🔗","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-langchain-documents-️","p":132},{"i":145,"t":"On this page","s":"Run with CLI","u":"/docs/gpt-researcher/getting-started/cli","h":"","p":144},{"i":147,"t":"Clone the repository: git clone https://github.com/yourusername/gpt-researcher.gitcd gpt-researcher Copy Install the required dependencies: pip install -r requirements.txt Copy Set up your environment variables: Create a .env file in the project root and add your API keys or other necessary configurations.","s":"Installation","u":"/docs/gpt-researcher/getting-started/cli","h":"#installation","p":144},{"i":149,"t":"The basic syntax for using the CLI is: python cli.py \"<query>\" --report_type <report_type> Copy","s":"Usage","u":"/docs/gpt-researcher/getting-started/cli","h":"#usage","p":144},{"i":151,"t":"query (required): The research query you want to investigate. --report_type (required): The type of report to generate. Options include: research_report: Summary - Short and fast (~2 min) detailed_report: Detailed - In depth and longer (~5 min) resource_report outline_report custom_report subtopic_report","s":"Arguments","u":"/docs/gpt-researcher/getting-started/cli","h":"#arguments","p":144},{"i":153,"t":"Generate a quick research report on climate change: python cli.py \"What are the main causes of climate change?\" --report_type research_report Copy Create a detailed report on artificial intelligence: python cli.py \"The impact of artificial intelligence on job markets\" --report_type detailed_report Copy Generate an outline report on renewable energy: python cli.py \"Renewable energy sources and their potential\" --report_type outline_report Copy","s":"Examples","u":"/docs/gpt-researcher/getting-started/cli","h":"#examples","p":144},{"i":155,"t":"The generated report will be saved as a Markdown file in the outputs directory. The filename will be a unique UUID.","s":"Output","u":"/docs/gpt-researcher/getting-started/cli","h":"#output","p":144},{"i":157,"t":"The execution time may vary depending on the complexity of the query and the type of report requested. Make sure you have the necessary API keys and permissions set up in your .env file for the tool to function correctly.","s":"Note","u":"/docs/gpt-researcher/getting-started/cli","h":"#note","p":144},{"i":159,"t":"On this page","s":"Vector Stores","u":"/docs/gpt-researcher/context/vector-stores","h":"","p":158},{"i":161,"t":"from gpt_researcher import GPTResearcherfrom langchain.text_splitter import CharacterTextSplitterfrom langchain_openai import OpenAIEmbeddingsfrom langchain_community.vectorstores import FAISSfrom langchain_core.documents import Document# exerpt taken from - https://paulgraham.com/wealth.htmlessay = \"\"\"May 2004(This essay was originally published in Hackers & Painters.)If you wanted to get rich, how would you do it? I think your best bet would be to start or join a startup.That's been a reliable way to get rich for hundreds of years. The word \"startup\" dates from the 1960s,but what happens in one is very similar to the venture-backed trading voyages of the Middle Ages.Startups usually involve technology, so much so that the phrase \"high-tech startup\" is almost redundant.A startup is a small company that takes on a hard technical problem.Lots of people get rich knowing nothing more than that. You don't have to know physics to be a good pitcher.But I think it could give you an edge to understand the underlying principles. Why do startups have to be small?Will a startup inevitably stop being a startup as it grows larger?And why do they so often work on developing new technology? Why are there so many startups selling new drugs or computer software,and none selling corn oil or laundry detergent?The PropositionEconomically, you can think of a startup as a way to compress your whole working life into a few years.Instead of working at a low intensity for forty years, you work as hard as you possibly can for four.This pays especially well in technology, where you earn a premium for working fast.Here is a brief sketch of the economic proposition. If you're a good hacker in your mid twenties,you can get a job paying about $80,000 per year. So on average such a hacker must be able to do atleast $80,000 worth of work per year for the company just to break even. You could probably work twiceas many hours as a corporate employee, and if you focus you can probably get three times as much done in an hour.[1]You should get another multiple of two, at least, by eliminating the drag of the pointy-haired middle manager whowould be your boss in a big company. Then there is one more multiple: how much smarter are you than your jobdescription expects you to be? Suppose another multiple of three. Combine all these multipliers,and I'm claiming you could be 36 times more productive than you're expected to be in a random corporate job.[2]If a fairly good hacker is worth $80,000 a year at a big company, then a smart hacker working very hard without any corporate bullshit to slow him down should be able to do work worth about $3 million a year..........\"\"\"document = [Document(page_content=essay)]text_splitter = CharacterTextSplitter(chunk_size=200, chunk_overlap=30, separator=\"\\n\")docs = text_splitter.split_documents(documents=document)vector_store = FAISS.from_documents(documents, OpenAIEmbeddings())query = \"\"\" Summarize the essay into 3 or 4 succinct sections. Make sure to include key points regarding wealth creation. Include some recommendations for entrepreneurs in the conclusion.\"\"\"# Create an instance of GPTResearcherresearcher = GPTResearcher( query=query, report_type=\"research_report\", report_source=\"langchain_vectorstore\", vector_store=vector_store,)# Conduct research and write the reportawait researcher.conduct_research()report = await researcher.write_report() Copy","s":"Faiss","u":"/docs/gpt-researcher/context/vector-stores","h":"#faiss","p":158},{"i":163,"t":"from gpt_researcher import GPTResearcherfrom langchain_postgres.vectorstores import PGVectorfrom langchain_openai import OpenAIEmbeddingsCONNECTION_STRING = 'postgresql://someuser:somepass@localhost:5432/somedatabase'# assuming the vector store exists and contains the relevent documents# also assuming embeddings have been or will be generatedvector_store = PGVector.from_existing_index( use_jsonb=True, embedding=OpenAIEmbeddings(), collection_name='some collection name', connection=CONNECTION_STRING, async_mode=True,)query = \"\"\" Create a short report about apples. Include a section about which apples are considered best during each season.\"\"\"# Create an instance of GPTResearcherresearcher = GPTResearcher( query=query, report_type=\"research_report\", report_source=\"langchain_vectorstore\", vector_store=vector_store, )# Conduct research and write the reportawait researcher.conduct_research()report = await researcher.write_report() Copy","s":"PGVector","u":"/docs/gpt-researcher/context/vector-stores","h":"#pgvector","p":158},{"i":165,"t":"In some cases in which you want to store the scraped data and documents into your own vector store for future usages, GPT-Researcher also allows you to do so seamlessly just by inputting your vector store (make sure to set report_source value to something other than langchain_vectorstore) from gpt_researcher import GPTResearcherfrom langchain_community.vectorstores import InMemoryVectorStorefrom langchain_openai import OpenAIEmbeddingsvector_store = InMemoryVectorStore(embedding=OpenAIEmbeddings())query = \"The best LLM\"# Create an instance of GPTResearcherresearcher = GPTResearcher( query=query, report_type=\"research_report\", report_source=\"web\", vector_store=vector_store, )# Conduct research, the context will be chunked and stored in the vector_storeawait researcher.conduct_research()# Query the 5 most relevant context in our vector storerelated_contexts = await vector_store.asimilarity_search(\"GPT-4\", k = 5) print(related_contexts)print(len(related_contexts)) #Should be 5 Copy","s":"Adding Scraped Data to your vector store","u":"/docs/gpt-researcher/context/vector-stores","h":"#adding-scraped-data-to-your-vector-store","p":158},{"i":167,"t":"On this page","s":"Getting Started","u":"/docs/gpt-researcher/getting-started/getting-started","h":"","p":166},{"i":169,"t":"Step 1 - Install dependencies $ pip install -r requirements.txt Copy Step 2 - Run the agent with FastAPI $ uvicorn main:app --reload Copy Step 3 - Go to http://localhost:8000 on any browser and enjoy researching!","s":"Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#quickstart","p":166},{"i":171,"t":"Select either based on your familiarity with each:","s":"Using Virtual Environment or Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#using-virtual-environment-or-poetry","p":166},{"i":173,"t":"Establishing the Virtual Environment with Activate/Deactivate configuration Create a virtual environment using the venv package with the environment name <your_name>, for example, env. Execute the following command in the PowerShell/CMD terminal: python -m venv env Copy To activate the virtual environment, use the following activation script in PowerShell/CMD terminal: .\\env\\Scripts\\activate Copy To deactivate the virtual environment, run the following deactivation script in PowerShell/CMD terminal: deactivate Copy Install the dependencies for a Virtual environment After activating the env environment, install dependencies using the requirements.txt file with the following command: python -m pip install -r requirements.txt Copy","s":"Virtual Environment","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#virtual-environment","p":166},{"i":175,"t":"Establishing the Poetry dependencies and virtual environment with Poetry version ~1.7.1 Install project dependencies and simultaneously create a virtual environment for the specified project. By executing this command, Poetry reads the project's \"pyproject.toml\" file to determine the required dependencies and their versions, ensuring a consistent and isolated development environment. The virtual environment allows for a clean separation of project-specific dependencies, preventing conflicts with system-wide packages and enabling more straightforward dependency management throughout the project's lifecycle. poetry install Copy Activate the virtual environment associated with a Poetry project By running this command, the user enters a shell session within the isolated environment associated with the project, providing a dedicated space for development and execution. This virtual environment ensures that the project dependencies are encapsulated, avoiding conflicts with system-wide packages. Activating the Poetry shell is essential for seamlessly working on a project, as it ensures that the correct versions of dependencies are used and provides a controlled environment conducive to efficient development and testing. poetry shell Copy","s":"Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#poetry","p":166},{"i":177,"t":"Launch the FastAPI application agent on a Virtual Environment or Poetry setup by executing the following command: python -m uvicorn main:app --reload Copy Visit http://localhost:8000 in any web browser and explore your research!","s":"Run the app","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#run-the-app","p":166},{"i":179,"t":"On this page","s":"How to Choose","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"","p":178},{"i":181,"t":"GPT Researcher offers multiple ways to leverage its capabilities: GPT Researcher PIP agent: Ideal for integrating GPT Researcher into your existing projects and workflows. Backend: A backend service to interact with the frontend user interfaces, offering advanced features like detailed reports. Multi Agent System: An advanced setup using LangGraph, offering the most comprehensive research capabilities. Frontend: Several front-end solutions depending on your needs, including a simple HTML/JS version and a more advanced NextJS version.","s":"Options","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#options","p":178},{"i":184,"t":"The PIP package is ideal for leveraging GPT Researcher as an agent in your preferred environment and code. Pros: Easy integration into existing projects Flexible usage in multi-agent systems, chains, or workflows Optimized for production performance Cons: Requires some coding knowledge May need additional setup for advanced features Installation: pip install gpt-researcher Copy System Requirements: Python 3.10+ pip package manager Learn More: PIP Documentation","s":"1. PIP Package","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#1-pip-package","p":178},{"i":186,"t":"For a complete out-of-the-box experience, including a sleek frontend, you can clone our repository. Pros: Ready-to-use frontend and backend services Includes advanced use cases like detailed report generation Optimal user experience Cons: Less flexible than the PIP package for custom integrations Requires setting up the entire application Getting Started: Clone the repository: git clone https://github.com/assafelovic/gpt-researcher.git Follow the installation instructions System Requirements: Git Python 3.10+ Node.js and npm (for frontend) Advanced Usage Example: Detailed Report Implementation","s":"2. End-to-End Application","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#2-end-to-end-application","p":178},{"i":188,"t":"We've collaborated with LangChain to support multi-agents with LangGraph and GPT Researcher, offering the most complex and comprehensive version of GPT Researcher. Pros: Very detailed, customized research reports Inner AI agent loops and reasoning Cons: More expensive and time-consuming Heavyweight for production use This version is recommended for local, experimental, and educational use. We're working on providing a lighter version soon! System Requirements: Python 3.10+ LangGraph library Learn More: GPT Researcher x LangGraph","s":"3. Multi Agent System with LangGraph","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#3-multi-agent-system-with-langgraph","p":178},{"i":190,"t":"Feature PIP Package End-to-End Application Multi Agent System Ease of Integration High Medium Low Customization High Medium High Out-of-the-box UI No Yes No Complexity Low Medium High Best for Developers End-users Researchers/Experimenters Please note that all options have been optimized and refined for production use.","s":"Comparison Table","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#comparison-table","p":178},{"i":192,"t":"To learn more about each of the options, check out these docs and code snippets: PIP Package: Install: pip install gpt-researcher Integration guide End-to-End Application: Clone the repository: git clone https://github.com/assafelovic/gpt-researcher.git Installation instructions Multi-Agent System: Multi-Agents code LangGraph documentation Blog","s":"Deep Dive","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#deep-dive","p":178},{"i":194,"t":"GPT Researcher is actively maintained and updated. To ensure you're using the latest version: For the PIP package: pip install --upgrade gpt-researcher For the End-to-End Application: Pull the latest changes from the GitHub repository For the Multi-Agent System: Check the documentation for compatibility with the latest LangChain and LangGraph versions","s":"Versioning and Updates","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#versioning-and-updates","p":178},{"i":196,"t":"For common issues and questions, please refer to our FAQ section in the documentation.","s":"Troubleshooting and FAQs","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#troubleshooting-and-faqs","p":178},{"i":198,"t":"On this page","s":"Automated Tests","u":"/docs/gpt-researcher/gptr/automated-tests","h":"","p":197},{"i":200,"t":"This repository contains the code for the automated testing of the GPT-Researcher Repo using Github Actions. The tests are triggered in a docker container which runs the tests via the pytest module.","s":"Automated Testing with Github Actions","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#automated-testing-with-github-actions","p":197},{"i":202,"t":"You can run the tests:","s":"Running the Tests","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#running-the-tests","p":197},{"i":204,"t":"docker-compose --profile test run --rm gpt-researcher-tests Copy","s":"Via a docker command","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-docker-command","p":197},{"i":206,"t":"Attaching here the required settings & screenshots on the github repo level: Step 1: Within the repo, press the \"Settings\" tab Step 2: Create a new environment named \"tests\" (all lowercase) Step 3: Click into the \"tests\" environment & add environment secrets of OPENAI_API_KEY & TAVILY_API_KEY Get the keys from here: https://app.tavily.com/sign-in https://platform.openai.com/api-keys If configured correctly, here's what the Github action should look like when opening a new PR or committing to an open PR:","s":"Via a Github Action","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-github-action","p":197},{"i":208,"t":"Docker: Quickstart Step 1 - Install & Open Docker Desktop Follow instructions at https://www.docker.com/products/docker-desktop/ Step 2 - Follow this flow This mainly includes cloning the '.env.example' file, adding your API Keys to the cloned file and saving the file as '.env' Step 3 - Within root, run with Docker. docker-compose up --build Copy If that doesn't work, try running it without the dash: docker compose up --build Copy Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes: the Python server running on localhost:8000 the React app running on localhost:3000 Visit localhost:3000 on any browser and enjoy researching!","s":"Docker: Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started-with-docker","h":"","p":207},{"i":210,"t":"On this page","s":"Running on Linux","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"","p":209},{"i":212,"t":"The default Ubuntu droplet option on DigitalOcean works well, but this setup should work on any hosting service with similar specifications: 2 GB RAM 1 vCPU 50 GB SSD Storage Here's a screenshot of the recommended Ubuntu machine specifications:","s":"Server Requirements","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#server-requirements","p":209},{"i":214,"t":"After setting up your server, follow these steps to install Docker, Docker Compose, and Nginx. Some more commands to achieve that:","s":"Deployment Steps","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#deployment-steps","p":209},{"i":217,"t":"sudo apt update### Step 2: Install Git### Git is a version control system. Install it using:sudo apt install git -y### Verify the installation by checking the Git version:git --version### Step 3: Install Docker### Docker is a platform for developing, shipping, and running applications inside containers.### Install prerequisites:sudo apt install apt-transport-https ca-certificates curl software-properties-common -y### Add Docker’s official GPG key:curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg### Set up the stable repository:echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null### Update the package index again and install Docker:sudo apt updatesudo apt install docker-ce -y### Verify Docker installation:sudo systemctl status docker### Optionally, add your user to the docker group to run Docker without sudo:sudo usermod -aG docker ${USER}### Log out and back in for the group change to take effect.Step 4: Install Nginx### Nginx is a high-performance web server.### Install Nginx:sudo apt install nginx -y### Start and enable Nginx:sudo systemctl start nginxsudo systemctl enable nginx### Verify Nginx installation:sudo systemctl status nginx Copy Here's your nginx config file: events {}http { server { listen 80; server_name name.example; client_max_body_size 64M; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location ~ ^/(ws|upload|files|outputs|getConfig|setConfig) { proxy_pass http://localhost:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection \"Upgrade\"; proxy_set_header Host $host; } }} Copy And if you're using SSL: server { server_name name.example; client_max_body_size 64M; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location ~ ^/(ws|upload|files|outputs|getConfig|setConfig) { proxy_pass http://localhost:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection \"Upgrade\"; proxy_set_header Host $host; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/name.example/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/name.example/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot}server { if ($host = name.example) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name name.example; return 404; # managed by Certbot} Copy And the relevant commands: vim /etc/nginx/nginx.conf### Edit it to reflect above. Then verify all is good with:sudo nginx -t# If there are no errors:sudo systemctl restart nginx# Clone .env.example as .env# Run from root: docker-compose up --build Copy","s":"First, ensure your package index is up-to-date:","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#first-ensure-your-package-index-is-up-to-date","p":209},{"i":219,"t":"On this page","s":"Introduction","u":"/docs/gpt-researcher/getting-started/introduction","h":"","p":218},{"i":221,"t":"To form objective conclusions for manual research tasks can take time, sometimes weeks to find the right resources and information. Current LLMs are trained on past and outdated information, with heavy risks of hallucinations, making them almost irrelevant for research tasks. Current LLMs are limited to short token outputs which are not sufficient for long detailed research reports (2k+ words). Solutions that enable web search (such as ChatGPT + Web Plugin), only consider limited resources and content that in some cases result in superficial conclusions or biased answers. Using only a selection of resources can create bias in determining the right conclusions for research questions or tasks.","s":"Why GPT Researcher?","u":"/docs/gpt-researcher/getting-started/introduction","h":"#why-gpt-researcher","p":218},{"i":223,"t":"The main idea is to run \"planner\" and \"execution\" agents, whereas the planner generates questions to research, and the execution agents seek the most related information based on each generated research question. Finally, the planner filters and aggregates all related information and creates a research report. The agents leverage both gpt-4o-mini and gpt-4o (128K context) to complete a research task. We optimize for costs using each only when necessary. The average research task takes around 3 minutes to complete, and costs ~$0.1. More specifically: Create a domain specific agent based on research query or task. Generate a set of research questions that together form an objective opinion on any given task. For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task. For each scraped resources, summarize based on relevant information and keep track of its sources. Finally, filter and aggregate all summarized sources and generate a final research report.","s":"Architecture","u":"/docs/gpt-researcher/getting-started/introduction","h":"#architecture","p":218},{"i":226,"t":"How it Works How to Install Live Demo Homepage","s":"Tutorials","u":"/docs/gpt-researcher/getting-started/introduction","h":"#tutorials","p":218},{"i":228,"t":"📝 Generate research, outlines, resources and lessons reports 📜 Can generate long and detailed research reports (over 2K words) 🌐 Aggregates over 20 web sources per research to form objective and factual conclusions 🖥️ Includes an easy-to-use web interface (HTML/CSS/JS) 🔍 Scrapes web sources with javascript support 📂 Keeps track and context of visited and used web sources 📄 Export research reports to PDF, Word and more... Let's get started here!","s":"Features","u":"/docs/gpt-researcher/getting-started/introduction","h":"#features","p":218},{"i":230,"t":"On this page","s":"Configuration","u":"/docs/gpt-researcher/gptr/config","h":"","p":229},{"i":232,"t":"If you are not using OpenAI's models, but other model providers, besides the general configuration above, also additional environment variables are required. Check the langchain documentation about your model for the exact configuration of the API keys and endpoints. Here is an example for Azure OpenAI configuration: OPENAI_API_VERSION=\"2024-05-01-preview\" # or whatever you are usingAZURE_OPENAI_ENDPOINT=\"https://CHANGEMEN.openai.azure.com/\" # change to the name of your deploymentAZURE_OPENAI_API_KEY=\"[Your Key]\" # change to your API keyEMBEDDING=\"azure_openai:text-embedding-ada-002\" # change to the deployment of your embedding modelFAST_LLM=\"azure_openai:gpt-4o-mini\" # change to the name of your deployment (not model-name)FAST_TOKEN_LIMIT=4000SMART_LLM=\"azure_openai:gpt-4o\" # change to the name of your deployment (not model-name)SMART_TOKEN_LIMIT=4000RETRIEVER=\"bing\" # if you are using Bing as your search engine (which is likely if you use Azure)BING_API_KEY=\"[Your Key]\" Copy","s":"Example: Azure OpenAI Configuration","u":"/docs/gpt-researcher/gptr/config","h":"#example-azure-openai-configuration","p":229},{"i":234,"t":"Agent Example If you're interested in using GPT Researcher as a standalone agent, you can easily import it into any existing Python project. Below, is an example of calling the agent to generate a research report: from gpt_researcher import GPTResearcherimport asyncioasync def fetch_report(query): \"\"\" Fetch a research report based on the provided query and report type. \"\"\" researcher = GPTResearcher(query=query) await researcher.conduct_research() report = await researcher.write_report() return reportasync def generate_research_report(query): \"\"\" This is a sample script that executes an async main function to run a research report. \"\"\" report = await fetch_report(query) print(report)if __name__ == \"__main__\": QUERY = \"What happened in the latest burning man floods?\" asyncio.run(generate_research_report(query=QUERY)) Copy You can further enhance this example to use the returned report as context for generating valuable content such as news article, marketing content, email templates, newsletters, etc. You can also use GPT Researcher to gather information about code documentation, business analysis, financial information and more. All of which can be used to complete much more complex tasks that require factual and high quality realtime information.","s":"Agent Example","u":"/docs/gpt-researcher/gptr/example","h":"","p":233},{"i":236,"t":"On this page","s":"Scraping Options","u":"/docs/gpt-researcher/gptr/scraping","h":"","p":235},{"i":238,"t":"You can choose your preferred scraping method by setting the SCRAPER environment variable: For BeautifulSoup (static scraping): export SCRAPER=\"bs\" Copy For Selenium (dynamic browser scraping): export SCRAPER=\"browser\" Copy Note: If not set, GPT Researcher will default to BeautifulSoup for scraping.","s":"Configuring Scraping Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#configuring-scraping-method","p":235},{"i":241,"t":"When SCRAPER=\"bs\", GPT Researcher uses BeautifulSoup for static scraping. This method: Sends a single HTTP request to fetch the page content Parses the static HTML content Extracts text and data from the parsed HTML Benefits: Faster and more lightweight Doesn't require additional setup Works well for simple, static websites Limitations: Cannot handle dynamic content loaded by JavaScript May miss content that requires user interaction to display","s":"BeautifulSoup (Static Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#beautifulsoup-static-scraping","p":235},{"i":243,"t":"When SCRAPER=\"browser\", GPT Researcher uses Selenium for dynamic scraping. This method: Opens a real browser instance (Chrome by default) Loads the page and executes JavaScript Waits for dynamic content to load Extracts text and data from the fully rendered page Benefits: Can scrape dynamically loaded content Simulates real user interactions (scrolling, clicking, etc.) Works well for complex, JavaScript-heavy websites Limitations: Slower than static scraping Requires more system resources Requires additional setup (Selenium and WebDriver installation)","s":"Selenium (Browser Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#selenium-browser-scraping","p":235},{"i":245,"t":"If you choose to use Selenium (SCRAPER=\"browser\"), you'll need to: Install the Selenium package: pip install selenium Copy Download the appropriate WebDriver for your browser: For Chrome: ChromeDriver For Firefox: GeckoDriver For Safari: Built-in, no download required Ensure the WebDriver is in your system's PATH.","s":"Additional Setup for Selenium","u":"/docs/gpt-researcher/gptr/scraping","h":"#additional-setup-for-selenium","p":235},{"i":247,"t":"Use BeautifulSoup (static) for: Simple websites with mostly static content Scenarios where speed is a priority When you don't need to interact with the page Use Selenium (dynamic) for: Websites with content loaded via JavaScript Sites that require scrolling or clicking to load more content When you need to simulate user interactions","s":"Choosing the Right Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#choosing-the-right-method","p":235},{"i":249,"t":"If Selenium fails to start, ensure you have the correct WebDriver installed and it's in your system's PATH. If you encounter an ImportError related to Selenium, make sure you've installed the Selenium package. If the scraper misses expected content, try switching between static and dynamic scraping to see which works better for your target website. Remember, the choice between static and dynamic scraping can significantly impact the quality and completeness of the data GPT Researcher can gather. Choose the method that best suits your research needs and the websites you're targeting.","s":"Troubleshooting","u":"/docs/gpt-researcher/gptr/scraping","h":"#troubleshooting","p":235},{"i":251,"t":"Handling Logs Here is a snippet of code to help you handle the streaming logs of your Research tasks. from typing import Dict, Anyimport asynciofrom gpt_researcher import GPTResearcherclass CustomLogsHandler: \"\"\"A custom Logs handler class to handle JSON data.\"\"\" def __init__(self): self.logs = [] # Initialize logs to store data async def send_json(self, data: Dict[str, Any]) -> None: \"\"\"Send JSON data and log it.\"\"\" self.logs.append(data) # Append data to logs print(f\"My custom Log: {data}\") # For demonstration, print the logasync def run(): # Define the necessary parameters with sample values query = \"What happened in the latest burning man floods?\" report_type = \"research_report\" # Type of report to generate report_source = \"online\" # Could specify source like 'online', 'books', etc. tone = \"informative\" # Tone of the report ('informative', 'casual', etc.) config_path = None # Path to a config file, if needed # Initialize researcher with a custom WebSocket custom_logs_handler = CustomLogsHandler() researcher = GPTResearcher( query=query, report_type=report_type, report_source=report_source, tone=tone, config_path=config_path, websocket=custom_logs_handler ) await researcher.conduct_research() # Conduct the research report = await researcher.write_report() # Write the research report return report# Run the asynchronous function using asyncioif __name__ == \"__main__\": asyncio.run(run()) Copy The data from the research process will be logged and stored in the CustomLogsHandler instance. You can customize the logging behavior as needed for your application. Here's a sample of the output: { \"type\": \"logs\", \"content\": \"added_source_url\", \"output\": \"✅ Added source url to research: https://www.npr.org/2023/09/28/1202110410/how-rumors-and-conspiracy-theories-got-in-the-way-of-mauis-fire-recovery\\n\", \"metadata\": \"https://www.npr.org/2023/09/28/1202110410/how-rumors-and-conspiracy-theories-got-in-the-way-of-mauis-fire-recovery\"} Copy The metadata field will include whatever metadata is relevant to the log entry. Let the script above run to completion for the full logs output of a given research task.","s":"Handling Logs","u":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream","h":"","p":250},{"i":253,"t":"On this page","s":"Troubleshooting","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"","p":252},{"i":255,"t":"This relates to not having permission to use gpt-4 yet. Based on OpenAI, it will be widely available for all by end of July.","s":"model: gpt-4 does not exist","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#model-gpt-4-does-not-exist","p":252},{"i":257,"t":"The issue relates to the library WeasyPrint (which is used to generate PDFs from the research report). Please follow this guide to resolve it: https://doc.courtbouillon.org/weasyprint/stable/first_steps.html Or you can install this package manually In case of MacOS you can install this lib using brew install glib pango If you face an issue with linking afterward, you can try running brew link glib In case of Linux you can install this lib using sudo apt install libglib2.0-dev","s":"cannot load library 'gobject-2.0-0'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-gobject-20-0","p":252},{"i":259,"t":"In case of MacOS you can install this lib using brew install pango In case of Linux you can install this lib using sudo apt install libpango-1.0-0 Workaround for Mac M chip users If the above solutions don't work, you can try the following: Install a fresh version of Python 3.11 pointed to brew: brew install python@3.11 Install the required libraries: brew install pango glib gobject-introspection Install the required GPT Researcher Python packages: pip3.11 install -r requirements.txt Run the app with Python 3.11 (using brew): python3.11 -m uvicorn main:app --reload","s":"cannot load library 'pango'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-pango","p":252},{"i":261,"t":"We're using Selenium for site scraping. Some sites fail to be scraped. In these cases, restart and try running again.","s":"Error processing the url","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#error-processing-the-url","p":252},{"i":263,"t":"Many users have an issue with their chromedriver because the latest chrome browser version doesn't have a compatible chrome driver yet. To downgrade your Chrome web browser using slimjet, follow these steps. First, visit the website and scroll down to find the list of available older Chrome versions. Choose the version you wish to install making sure it's compatible with your operating system. Once you've selected the desired version, click on the corresponding link to download the installer. Before proceeding with the installation, it's crucial to uninstall your current version of Chrome to avoid conflicts. It's important to check if the version you downgrade to, has a chromedriver available in the official chrome driver website If none of the above work, you can try out our hosted beta","s":"Chrome version issues","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#chrome-version-issues","p":252},{"i":265,"t":"On this page","s":"Querying the Backend","u":"/docs/gpt-researcher/gptr/querying-the-backend","h":"","p":264},{"i":267,"t":"In this section, we will discuss how to query the GPTR backend server. The GPTR backend server is a Python server that runs the GPTR Python package. The server listens for WebSocket connections and processes incoming messages to generate reports, streaming back logs and results to the client. An example WebSocket client is implemented in the gptr-webhook.js file below. This function sends a Webhook Message to the GPTR Python backend running on localhost:8000, but this example can also be modified to query a GPTR Server hosted on Linux. // gptr-webhook.js const WebSocket = require('ws');let socket = null;let responseCallback = null;async function initializeWebSocket() { if (!socket) { const host = 'localhost:8000'; const ws_uri = `ws://${host}/ws`; socket = new WebSocket(ws_uri); socket.onopen = () => { console.log('WebSocket connection established'); }; socket.onmessage = (event) => { const data = JSON.parse(event.data); console.log('WebSocket data received:', data); if (data.content === 'dev_team_result' && data.output.rubber_ducker_thoughts != undefined && data.output.tech_lead_review != undefined) { if (responseCallback) { responseCallback(data.output); responseCallback = null; // Clear callback after use } } else { console.log('Received data:', data); } }; socket.onclose = () => { console.log('WebSocket connection closed'); socket = null; }; socket.onerror = (error) => { console.error('WebSocket error:', error); }; }}async function sendWebhookMessage(message) { return new Promise((resolve, reject) => { if (!socket || socket.readyState !== WebSocket.OPEN) { initializeWebSocket(); } const data = { task: message, report_type: 'dev_team', report_source: 'web', tone: 'Objective', headers: {}, repo_name: 'elishakay/gpt-researcher' }; const payload = \"start \" + JSON.stringify(data); responseCallback = (response) => { resolve(response); // Resolve the promise with the WebSocket response }; if (socket.readyState === WebSocket.OPEN) { socket.send(payload); console.log('Message sent:', payload); } else { socket.onopen = () => { socket.send(payload); console.log('Message sent after connection:', payload); }; } });}module.exports = { sendWebhookMessage}; Copy And here's how you can leverage this helper function: const { sendWebhookMessage } = require('./gptr-webhook');async function main() { const message = 'How do I get started with GPT-Researcher Websockets?'; const response = await sendWebhookMessage(message); console.log('Response:', response);} Copy","s":"Introduction","u":"/docs/gpt-researcher/gptr/querying-the-backend","h":"#introduction","p":264},{"i":269,"t":"On this page","s":"PIP Package","u":"/docs/gpt-researcher/gptr/pip-package","h":"","p":268},{"i":271,"t":"Follow these easy steps to get started: Pre-requisite: Ensure Python 3.10+ is installed on your machine 💻 Install gpt-researcher: Grab the official package from PyPi. pip install gpt-researcher Copy Environment Variables: Create a .env file with your OpenAI API key or simply export it export OPENAI_API_KEY={Your OpenAI API Key here} Copy export TAVILY_API_KEY={Your Tavily API Key here} Copy Start using GPT Researcher in your own codebase","s":"Steps to Install GPT Researcher","u":"/docs/gpt-researcher/gptr/pip-package","h":"#steps-to-install-gpt-researcher","p":268},{"i":273,"t":"from gpt_researcher import GPTResearcherimport asyncioasync def get_report(query: str, report_type: str): researcher = GPTResearcher(query, report_type) research_result = await researcher.conduct_research() report = await researcher.write_report() # Get additional information research_context = researcher.get_research_context() research_costs = researcher.get_costs() research_images = researcher.get_research_images() research_sources = researcher.get_research_sources() return report, research_context, research_costs, research_images, research_sourcesif __name__ == \"__main__\": query = \"what team may win the NBA finals?\" report_type = \"research_report\" report, context, costs, images, sources = asyncio.run(get_report(query, report_type)) print(\"Report:\") print(report) print(\"\\nResearch Costs:\") print(costs) print(\"\\nNumber of Research Images:\") print(len(images)) print(\"\\nNumber of Research Sources:\") print(len(sources)) Copy","s":"Example Usage","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-usage","p":268},{"i":276,"t":"query = \"Latest developments in renewable energy technologies\"report_type = \"research_report\" Copy","s":"Example 1: Research Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-1-research-report","p":268},{"i":278,"t":"query = \"List of top AI conferences in 2023\"report_type = \"resource_report\" Copy","s":"Example 2: Resource Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-2-resource-report","p":268},{"i":280,"t":"query = \"Outline for an article on the impact of AI in education\"report_type = \"outline_report\" Copy","s":"Example 3: Outline Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-3-outline-report","p":268},{"i":283,"t":"from fastapi import FastAPIfrom gpt_researcher import GPTResearcherimport asyncioapp = FastAPI()@app.get(\"/report/{report_type}\")async def get_report(query: str, report_type: str) -> dict: researcher = GPTResearcher(query, report_type) research_result = await researcher.conduct_research() report = await researcher.write_report() source_urls = researcher.get_source_urls() research_costs = researcher.get_costs() research_images = researcher.get_research_images() research_sources = researcher.get_research_sources() return { \"report\": report, \"source_urls\": source_urls, \"research_costs\": research_costs, \"num_images\": len(research_images), \"num_sources\": len(research_sources) }# Run the server# uvicorn main:app --reload Copy","s":"FastAPI Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#fastapi-example","p":268},{"i":285,"t":"Pre-requisite: Install flask with the async extra. pip install 'flask[async]' Copy from flask import Flask, request, jsonifyfrom gpt_researcher import GPTResearcherapp = Flask(__name__)@app.route('/report/<report_type>', methods=['GET'])async def get_report(report_type): query = request.args.get('query') researcher = GPTResearcher(query, report_type) research_result = await researcher.conduct_research() report = await researcher.write_report() source_urls = researcher.get_source_urls() research_costs = researcher.get_costs() research_images = researcher.get_research_images() research_sources = researcher.get_research_sources() return jsonify({ \"report\": report, \"source_urls\": source_urls, \"research_costs\": research_costs, \"num_images\": len(research_images), \"num_sources\": len(research_sources) })# Run the server# flask run Copy Run the server flask run Copy Example Request curl -X GET \"http://localhost:5000/report/research_report?query=what team may win the nba finals?\" Copy","s":"Flask Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#flask-example","p":268},{"i":287,"t":"GPT Researcher provides several methods to retrieve additional information about the research process:","s":"Getters and Setters","u":"/docs/gpt-researcher/gptr/pip-package","h":"#getters-and-setters","p":268},{"i":289,"t":"Sources are the URLs that were used to gather information for the research. source_urls = researcher.get_source_urls() Copy","s":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources","p":268},{"i":291,"t":"Context is all the retrieved information from the research. It includes the sources and their corresponding content. research_context = researcher.get_research_context() Copy","s":"Get Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-context","p":268},{"i":293,"t":"Costs are the number of tokens consumed during the research process. research_costs = researcher.get_costs() Copy","s":"Get Research Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-costs","p":268},{"i":295,"t":"Retrieves a list of images found during the research process. research_images = researcher.get_research_images() Copy","s":"Get Research Images","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-images","p":268},{"i":297,"t":"Retrieves a list of research sources, including title, content, and images. research_sources = researcher.get_research_sources() Copy","s":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources-1","p":268},{"i":299,"t":"You can set the verbose mode to get more detailed logs. researcher.set_verbose(True) Copy","s":"Set Verbose","u":"/docs/gpt-researcher/gptr/pip-package","h":"#set-verbose","p":268},{"i":301,"t":"You can also add costs to the research process if you want to track the costs from external usage. researcher.add_costs(0.22) Copy","s":"Add Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#add-costs","p":268},{"i":304,"t":"You can customize various aspects of the research process by passing additional parameters when initializing the GPTResearcher: researcher = GPTResearcher( query=\"Your research query\", report_type=\"research_report\", report_format=\"APA\", tone=\"formal and objective\", max_subtopics=5, verbose=True) Copy","s":"Customizing the Research Process","u":"/docs/gpt-researcher/gptr/pip-package","h":"#customizing-the-research-process","p":268},{"i":306,"t":"After conducting research, you can process the results in various ways: # Conduct researchresearch_result = await researcher.conduct_research()# Generate a reportreport = await researcher.write_report()# Generate a conclusionconclusion = await researcher.write_report_conclusion(report)# Get subtopicssubtopics = await researcher.get_subtopics()# Get draft section titles for a subtopicdraft_titles = await researcher.get_draft_section_titles(\"Subtopic name\") Copy","s":"Handling Research Results","u":"/docs/gpt-researcher/gptr/pip-package","h":"#handling-research-results","p":268},{"i":308,"t":"You can use the research context for further processing or analysis: # Get the full research contextcontext = researcher.get_research_context()# Get similar written contents based on draft section titlessimilar_contents = await researcher.get_similar_written_contents_by_draft_section_titles( current_subtopic=\"Subtopic name\", draft_section_titles=[\"Title 1\", \"Title 2\"], written_contents=some_written_contents, max_results=10) Copy This comprehensive documentation should help users understand and utilize the full capabilities of the GPT Researcher package.","s":"Working with Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#working-with-research-context","p":268},{"i":310,"t":"On this page","s":"Configure LLM","u":"/docs/gpt-researcher/llms/llms","h":"","p":309},{"i":312,"t":"# set the custom OpenAI API keyOPENAI_API_KEY=[Your Key]# specify llmsFAST_LLM=\"openai:gpt-4o-mini\"SMART_LLM=\"openai:gpt-4o\"STRATEGIC_LLM=\"openai:o1-preview\"# specify embeddingEMBEDDING=\"openai:text-embedding-3-small\" Copy","s":"OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#openai","p":309},{"i":314,"t":"Create a local OpenAI API using llama.cpp Server. For custom LLM, specify \"openai:{your-llm}\" # set the custom OpenAI API urlOPENAI_BASE_URL=\"http://localhost:1234/v1\"# set the custom OpenAI API keyOPENAI_API_KEY=\"dummy_key\"# specify custom llms FAST_LLM=\"openai:your_fast_llm\"SMART_LLM=\"openai:your_smart_llm\"STRATEGIC_LLM=\"openai:your_strategic_llm\" Copy For custom embedding, set \"custom:{your-embedding}\" # set the custom OpenAI API urlOPENAI_BASE_URL=\"http://localhost:1234/v1\"# set the custom OpenAI API keyOPENAI_API_KEY=\"dummy_key\"# specify the custom embedding model EMBEDDING=\"custom:your_embedding\" Copy","s":"Custom LLM","u":"/docs/gpt-researcher/llms/llms","h":"#custom-llm","p":309},{"i":316,"t":"See also the documentation in the Langchain Azure OpenAI page. On Azure OpenAI you will need to create deployments for each model you want to use. Please also specify the model names/deployment names in your .env file: Required Embedding Model: To ensure optimal performance, GPT Researcher requires the text-embedding-3-large model. Please deploy this specific model to your Azure Endpoint. AZURE_OPENAI_API_KEY=[Your Key]AZURE_OPENAI_ENDPOINT=https://{your-endpoint}.openai.azure.com/OPENAI_API_VERSION=2024-05-01-preview# note that the deployment name must be the same as the model nameFAST_LLM=azure_openai:gpt-4o-mini SMART_LLM=azure_openai:gpt-4oSTRATEGIC_LLM=azure_openai:o1-preview Copy","s":"Azure OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#azure-openai","p":309},{"i":318,"t":"GPT Researcher supports both Ollama LLMs and embeddings. You can choose each or both. To use Ollama you can set the following environment variables OLLAMA_BASE_URL=http://localhost:11434FAST_LLM=\"ollama:llama3\"SMART_LLM=\"ollama:llama3\"STRATEGIC_LLM=\"ollama:llama3\"EMBEDDING=\"ollama:nomic-embed-text\" Copy","s":"Ollama","u":"/docs/gpt-researcher/llms/llms","h":"#ollama","p":309},{"i":320,"t":"GroqCloud provides advanced AI hardware and software solutions designed to deliver amazingly fast AI inference performance. To leverage Groq in GPT-Researcher, you will need a GroqCloud account and an API Key. (NOTE: Groq has a very generous free tier.)","s":"Groq","u":"/docs/gpt-researcher/llms/llms","h":"#groq","p":309},{"i":322,"t":"You can signup here: https://console.groq.com/login Once you are logged in, you can get an API Key here: https://console.groq.com/keys Once you have an API key, you will need to add it to your systems environment using the variable name: GROQ_API_KEY=\"*********************\"","s":"Sign up","u":"/docs/gpt-researcher/llms/llms","h":"#sign-up","p":309},{"i":324,"t":"And finally, you will need to configure the GPT-Researcher Provider and Model variables: GROQ_API_KEY=[Your Key]# Set one of the LLM models supported by GroqFAST_LLM=\"groq:Mixtral-8x7b-32768\"SMART_LLM=\"groq:Mixtral-8x7b-32768\"STRATEGIC_LLM=\"groq:Mixtral-8x7b-32768\" Copy NOTE: As of the writing of this Doc (May 2024), the available Language Models from Groq are: Llama3-70b-8192 Llama3-8b-8192 Mixtral-8x7b-32768 Gemma-7b-it","s":"Update env vars","u":"/docs/gpt-researcher/llms/llms","h":"#update-env-vars","p":309},{"i":326,"t":"Refer to Anthropic Getting started page to obtain Anthropic API key. Update the corresponding env vars, for example: ANTHROPIC_API_KEY=[Your key]FAST_LLM=\"anthropic:claude-2.1\"SMART_LLM=\"anthropic:claude-3-opus-20240229\"STRATEGIC_LLM=\"anthropic:claude-3-opus-20240229\" Copy Anthropic does not offer its own embedding model.","s":"Anthropic","u":"/docs/gpt-researcher/llms/llms","h":"#anthropic","p":309},{"i":328,"t":"Sign up for a Mistral API key. Then update the corresponding env vars, for example: MISTRAL_API_KEY=[Your key]FAST_LLM=\"mistralai:open-mistral-7b\"SMART_LLM=\"mistralai:mistral-large-latest\"STRATEGIC_LLM=\"mistralai:mistral-large-latest\"EMBEDDING=\"mistralai:mistral-embed\" Copy","s":"Mistral AI","u":"/docs/gpt-researcher/llms/llms","h":"#mistral-ai","p":309},{"i":330,"t":"Together AI offers an API to query 50+ leading open-source models in a couple lines of code. Then update corresponding env vars, for example: TOGETHER_API_KEY=[Your key]FAST_LLM=\"together:meta-llama/Llama-3-8b-chat-hf\"SMART_LLM=\"together:meta-llama/Llama-3-70b-chat-hf\"STRATEGIC_LLM=\"together:meta-llama/Llama-3-70b-chat-hf\"EMBEDDING=\"mistralai:nomic-ai/nomic-embed-text-v1.5\" Copy","s":"Together AI","u":"/docs/gpt-researcher/llms/llms","h":"#together-ai","p":309},{"i":332,"t":"This integration requires a bit of extra work. Follow this guide to learn more. After you've followed the tutorial above, update the env vars: HUGGINGFACE_API_KEY=[Your key]FAST_LLM=\"huggingface:HuggingFaceH4/zephyr-7b-beta\"SMART_LLM=\"huggingface:HuggingFaceH4/zephyr-7b-beta\"STRATEGIC_LLM=\"huggingface:HuggingFaceH4/zephyr-7b-beta\"EMBEDDING=\"sentence-transformers/all-MiniLM-L6-v2\" Copy","s":"HuggingFace","u":"/docs/gpt-researcher/llms/llms","h":"#huggingface","p":309},{"i":334,"t":"Sign up here for obtaining a Google Gemini API Key and update the following env vars: GOOGLE_API_KEY=[Your key]FAST_LLM=\"google_genai:gemini-1.5-flash\"SMART_LLM=\"google_genai:gemini-1.5-pro\"STRATEGIC_LLM=\"google_genai:gemini-1.5-pro\"EMBEDDING=\"google_genai:models/text-embedding-004\" Copy","s":"Google Gemini","u":"/docs/gpt-researcher/llms/llms","h":"#google-gemini","p":309},{"i":336,"t":"FAST_LLM=\"google_vertexai:gemini-1.5-flash-001\"SMART_LLM=\"google_vertexai:gemini-1.5-pro-001\"STRATEGIC_LLM=\"google_vertexai:gemini-1.5-pro-001\"EMBEDDING=\"google_vertexai:text-embedding-004\" Copy","s":"Google VertexAI","u":"/docs/gpt-researcher/llms/llms","h":"#google-vertexai","p":309},{"i":338,"t":"COHERE_API_KEY=[Your key]FAST_LLM=\"cohere:command\"SMART_LLM=\"cohere:command-nightly\"STRATEGIC_LLM=\"cohere:command-nightly\"EMBEDDING=\"cohere:embed-english-v3.0\" Copy","s":"Cohere","u":"/docs/gpt-researcher/llms/llms","h":"#cohere","p":309},{"i":340,"t":"FIREWORKS_API_KEY=[Your key]base_url=\"https://api.fireworks.ai/inference/v1/completions\"FAST_LLM=\"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct\"SMART_LLM=\"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct\"STRATEGIC_LLM=\"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct\"EMBEDDING=\"fireworks:nomic-ai/nomic-embed-text-v1.5\" Copy","s":"Fireworks","u":"/docs/gpt-researcher/llms/llms","h":"#fireworks","p":309},{"i":342,"t":"FAST_LLM=\"bedrock:anthropic.claude-3-sonnet-20240229-v1:0\"SMART_LLM=\"bedrock:anthropic.claude-3-sonnet-20240229-v1:0\"STRATEGIC_LLM=\"bedrock:anthropic.claude-3-sonnet-20240229-v1:0\" Copy","s":"Bedrock","u":"/docs/gpt-researcher/llms/llms","h":"#bedrock","p":309},{"i":344,"t":"FAST_LLM=\"xai:grok-beta\"SMART_LLM=\"xai:grok-beta\"STRATEGIC_LLM=\"xai:grok-beta\" Copy","s":"xAI","u":"/docs/gpt-researcher/llms/llms","h":"#xai","p":309},{"i":347,"t":"EMBEDDING=\"nomic:nomic-embed-text-v1.5\" Copy","s":"Nomic","u":"/docs/gpt-researcher/llms/llms","h":"#nomic","p":309},{"i":349,"t":"VOYAGE_API_KEY=[Your Key]EMBEDDING=\"voyageai:voyage-law-2\" Copy","s":"VoyageAI","u":"/docs/gpt-researcher/llms/llms","h":"#voyageai","p":309},{"i":351,"t":"On this page","s":"Running with Ollama","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"","p":350},{"i":353,"t":"After deploying Ollama WebUI, you'll want to enter the Open WebUI Admin App & download a custom LLM. Choose a model from Ollama's Library of LLM's Paste the model name & size into the Web UI: For our example, let's choose to download the qwen2:1.5b model. This model now automatically becomes available via your Server's out-of-the-box API - we'll leverage it within our GPT-Researcher .env file in the next step.","s":"Fetching the Desired LLM Models","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#fetching-the-desired-llm-models","p":350},{"i":355,"t":"If you deploy ollama locally, a .env like so, should enable powering GPT-Researcher with Ollama: OPENAI_API_KEY=\"123\"OPENAI_API_BASE=\"http://127.0.0.1:11434/v1\"OLLAMA_BASE_URL=\"http://127.0.0.1:11434/\"FAST_LLM=\"ollama:qwen2:1.5b\"SMART_LLM=\"ollama:qwen2:1.5b\"EMBEDDING=\"ollama:all-minilm:22m\" Copy Replace FAST_LLM & SMART_LLM with the model you downloaded from the Elestio Web UI in the previous step.","s":"Querying your Custom LLM with GPT-Researcher","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#querying-your-custom-llm-with-gpt-researcher","p":350},{"i":357,"t":"And here's a custom python script you can use to query your custom LLM: import osimport asyncioimport logginglogging.basicConfig(level=logging.DEBUG)from gpt_researcher.llm_provider.generic import GenericLLMProviderfrom gpt_researcher.utils.llm import get_llmOLLAMA_BASE_URL = \"https://ollama-ug3qr-u21899.vm.elestio.app:57987\"LLM_MODEL = \"llama3.1\"# Create the GenericLLMProvider instancellm_provider = get_llm( \"ollama\", base_url=OLLAMA_BASE_URL, model=LLM_MODEL, temperature=0.7, max_tokens=2000, verify_ssl=False # Add this line)# Test the connection with a simple querymessages = [{\"role\": \"user\", \"content\": \"sup?\"}]async def test_ollama(): try: response = await llm_provider.get_chat_response(messages, stream=False) print(\"Ollama response:\", response) except Exception as e: print(f\"Error: {e}\")# Run the async functionasyncio.run(test_ollama()) Copy Replace OLLAMA_BASE_URL with the URL of your Ollama instance, and LLM_MODEL with the model you downloaded from the Ollama Web UI. Run the script to test the connection with your custom LLM.","s":"Run LLM Test Script for GPTR","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#run-llm-test-script-for-gptr","p":350},{"i":359,"t":"Elestio is a platform that allows you to deploy and manage custom language models. This guide will walk you through deploying a custom language model on Elestio. You can deploy an Open WebUI server with Elestio Here's an example .env file that will enable powering GPT-Researcher with Elestio: OPENAI_API_KEY=\"123\"OPENAI_API_BASE=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/v1\"OLLAMA_BASE_URL=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/\"FAST_LLM=\"openai:qwen2:1.5b\"SMART_LLM=\"openai:qwen2:1.5b\"EMBEDDING=\"ollama:all-minilm:22m\" Copy Disable Elestio Authentication or Add Auth Headers To remove the basic auth you have to follow the below steps: Go to your service -> Security -> at last Nginx -> in that find the below code: auth_basic \"Authentication\"; auth_basic_user_file /etc/nginx/conf.d/.htpasswd; Copy Comment these both these lines out and click the button \"Update & Restart\" to reflect the changes.","s":"Deploy Ollama on Elestio","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#deploy-ollama-on-elestio","p":350},{"i":361,"t":"On this page","s":"Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","h":"","p":360},{"i":363,"t":"GPT Researcher defaults to using the Tavily search engine for retrieving search results. But you can also use other search engines by specifying the RETRIEVER env var. Please note that each search engine has its own API Key requirements and usage limits. For example: RETRIEVER=bing Copy You can also specify multiple retrievers by separating them with commas. The system will use each specified retriever in sequence. For example: RETRIEVER=tavily, arxiv Copy Thanks to our community, we have integrated the following web search engines: Tavily - Default Bing - Env: RETRIEVER=bing Google - Env: RETRIEVER=google SearchApi - Env: RETRIEVER=searchapi Serp API - Env: RETRIEVER=serpapi Serper - Env: RETRIEVER=serper Searx - Env: RETRIEVER=searx Duckduckgo - Env: RETRIEVER=duckduckgo Arxiv - Env: RETRIEVER=arxiv Exa - Env: RETRIEVER=exa PubMedCentral - Env: RETRIEVER=pubmed_central","s":"Web Search Engines","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#web-search-engines","p":360},{"i":365,"t":"You can also use any custom retriever of your choice by specifying the RETRIEVER=custom env var. Custom retrievers allow you to use any search engine that provides an API to retrieve documents and is widely used for enterprise research tasks. In addition to setting the RETRIEVER env, you also need to set the following env vars: RETRIEVER_ENDPOINT: The endpoint URL of the custom retriever. Additional arguments required by the retriever should be prefixed with RETRIEVER_ARG_ (e.g., RETRIEVER_ARG_API_KEY).","s":"Custom Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#custom-retrievers","p":360},{"i":367,"t":"RETRIEVER=customRETRIEVER_ENDPOINT=https://api.myretriever.comRETRIEVER_ARG_API_KEY=YOUR_API_KEY Copy","s":"Example","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#example","p":360},{"i":369,"t":"For the custom retriever to work correctly, the response from the endpoint should be in the following format: [ { \"url\": \"http://example.com/page1\", \"raw_content\": \"Content of page 1\" }, { \"url\": \"http://example.com/page2\", \"raw_content\": \"Content of page 2\" }] Copy The system assumes this response format and processes the list of sources accordingly. Missing a retriever? Feel free to contribute to this project by submitting issues or pull requests on our GitHub page.","s":"Response Format","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#response-format","p":360},{"i":371,"t":"On this page","s":"LangGraph","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"","p":370},{"i":373,"t":"By using Langgraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. An average run generates a 5-6 page research report in multiple formats such as PDF, Docx and Markdown. Please note: This example uses the OpenAI API only for optimized performance.","s":"Use case","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#use-case","p":370},{"i":375,"t":"The research team is made up of 7 AI agents: Human - The human in the loop that oversees the process and provides feedback to the agents. Chief Editor - Oversees the research process and manages the team. This is the \"master\" agent that coordinates the other agents using Langgraph. Researcher (gpt-researcher) - A specialized autonomous agent that conducts in depth research on a given topic. Editor - Responsible for planning the research outline and structure. Reviewer - Validates the correctness of the research results given a set of criteria. Revisor - Revises the research results based on the feedback from the reviewer. Writer - Responsible for compiling and writing the final report. Publisher - Responsible for publishing the final report in various formats.","s":"The Multi Agent Team","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#the-multi-agent-team","p":370},{"i":377,"t":"Generally, the process is based on the following stages: Planning stage Data collection and analysis Review and revision Writing and submission Publication","s":"How it works","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-it-works","p":370},{"i":380,"t":"More specifically (as seen in the architecture diagram) the process is as follows: Browser (gpt-researcher) - Browses the internet for initial research based on the given research task. Editor - Plans the report outline and structure based on the initial research. For each outline topic (in parallel): Researcher (gpt-researcher) - Runs an in depth research on the subtopics and writes a draft. Reviewer - Validates the correctness of the draft given a set of criteria and provides feedback. Revisor - Revises the draft until it is satisfactory based on the reviewer feedback. Writer - Compiles and writes the final report including an introduction, conclusion and references section from the given research findings. Publisher - Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.","s":"Steps","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#steps","p":370},{"i":382,"t":"Install required packages: pip install -r requirements.txt Copy Update env variables export OPENAI_API_KEY={Your OpenAI API Key here}export TAVILY_API_KEY={Your Tavily API Key here} Copy Run the application: python main.py Copy","s":"How to run","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-to-run","p":370},{"i":384,"t":"To change the research query and customize the report, edit the task.json file in the main directory. Task.json contains the following fields: query - The research query or task. model - The OpenAI LLM to use for the agents. max_sections - The maximum number of sections in the report. Each section is a subtopic of the research query. include_human_feedback - If true, the user can provide feedback to the agents. If false, the agents will work autonomously. publish_formats - The formats to publish the report in. The reports will be written in the output directory. source - The location from which to conduct the research. Options: web or local. For local, please add DOC_PATH env var. follow_guidelines - If true, the research report will follow the guidelines below. It will take longer to complete. If false, the report will be generated faster but may not follow the guidelines. guidelines - A list of guidelines that the report must follow. verbose - If true, the application will print detailed logs to the console. For example: { \"query\": \"Is AI in a hype cycle?\", \"model\": \"gpt-4o\", \"max_sections\": 3, \"publish_formats\": { \"markdown\": true, \"pdf\": true, \"docx\": true }, \"include_human_feedback\": false, \"source\": \"web\", \"follow_guidelines\": true, \"guidelines\": [ \"The report MUST fully answer the original question\", \"The report MUST be written in apa format\", \"The report MUST be written in english\" ], \"verbose\": true} Copy","s":"Usage","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#usage","p":370},{"i":386,"t":"pip install langgraph-clilanggraph up Copy From there, see documentation here on how to use the streaming and async endpoints, as well as the playground.","s":"To Deploy","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#to-deploy","p":370},{"i":388,"t":"The React app (located in frontend directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well. It comes with loads of added features, such as: a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher. a GUI for setting your GPTR environment variables. the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta). stability fixes and more coming soon!","s":"NextJS Frontend App","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#nextjs-frontend-app","p":370},{"i":390,"t":"Step 1 - Install Docker Step 2 - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env' Step 3 - Within the docker-compose file comment out services that you don't want to run with Docker. $ docker-compose up --build Copy Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes: the Python server running on localhost:8000 the React app running on localhost:3000 Visit localhost:3000 on any browser and enjoy researching!","s":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-docker","p":370},{"i":392,"t":"cd frontendnvm install 18.17.0nvm use v18.17.0npm install --legacy-peer-depsnpm run dev Copy","s":"Run the NextJS React App with NPM","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-npm","p":370},{"i":394,"t":"Testing your LLM Here is a snippet of code to help you verify that your LLM-related environment variables are set up correctly. from gpt_researcher.config.config import Configfrom gpt_researcher.utils.llm import create_chat_completionimport asynciofrom dotenv import load_dotenvload_dotenv()async def main(): cfg = Config() try: report = await create_chat_completion( model=cfg.smart_llm_model, messages = [{\"role\": \"user\", \"content\": \"sup?\"}], temperature=0.35, llm_provider=cfg.smart_llm_provider, stream=True, max_tokens=cfg.smart_token_limit, llm_kwargs=cfg.llm_kwargs ) except Exception as e: print(f\"Error in calling LLM: {e}\")# Run the async functionasyncio.run(main()) Copy","s":"Testing your LLM","u":"/docs/gpt-researcher/llms/testing-your-llm","h":"","p":393},{"i":396,"t":"On this page","s":"processing.html","u":"/docs/reference/processing/html","h":"","p":395},{"i":398,"t":"On this page","s":"config.singleton","u":"/docs/reference/config/singleton","h":"","p":397},{"i":400,"t":"class Singleton(abc.ABCMeta, type) Copy Singleton metaclass for ensuring only one instance of a class. __call__ def __call__(cls, *args, **kwargs) Copy Call method for the singleton metaclass.","s":"Singleton Objects","u":"/docs/reference/config/singleton","h":"#singleton-objects","p":397},{"i":402,"t":"class AbstractSingleton(abc.ABC, metaclass=Singleton) Copy Abstract singleton class for ensuring only one instance of a class.","s":"AbstractSingleton Objects","u":"/docs/reference/config/singleton","h":"#abstractsingleton-objects","p":397},{"i":404,"t":"On this page","s":"config.config","u":"/docs/reference/config/config","h":"","p":403},{"i":406,"t":"class Config(metaclass=Singleton) Copy Configuration class to store the state of bools for different scripts access. __init__ def __init__() -> None Copy Initialize the Config class set_fast_llm_model def set_fast_llm_model(value: str) -> None Copy Set the fast LLM model value. set_smart_llm_model def set_smart_llm_model(value: str) -> None Copy Set the smart LLM model value. set_fast_token_limit def set_fast_token_limit(value: int) -> None Copy Set the fast token limit value. set_smart_token_limit def set_smart_token_limit(value: int) -> None Copy Set the smart token limit value. set_browse_chunk_max_length def set_browse_chunk_max_length(value: int) -> None Copy Set the browse_website command chunk max length value. set_openai_api_key def set_openai_api_key(value: str) -> None Copy Set the OpenAI API key value. set_debug_mode def set_debug_mode(value: bool) -> None Copy Set the debug mode value.","s":"Config Objects","u":"/docs/reference/config/config","h":"#config-objects","p":403},{"i":408,"t":"class APIKeyError(Exception) Copy Exception raised when an API key is not set in config.py or as an environment variable. check_openai_api_key def check_openai_api_key(cfg) -> None Copy Check if the OpenAI API key is set in config.py or as an environment variable. check_tavily_api_key def check_tavily_api_key(cfg) -> None Copy Check if the Tavily Search API key is set in config.py or as an environment variable. check_google_api_key def check_google_api_key(cfg) -> None Copy Check if the Google API key is set in config.py or as an environment variable. check_serp_api_key def check_serp_api_key(cfg) -> None Copy Check if the SERP API key is set in config.py or as an environment variable. check_searx_url def check_searx_url(cfg) -> None Copy Check if the Searx URL is set in config.py or as an environment variable.","s":"APIKeyError Objects","u":"/docs/reference/config/config","h":"#apikeyerror-objects","p":403},{"i":410,"t":"Roadmap We're constantly working on additional features and improvements to our products and services. We're also working on new products and services to help you build better AI applications using GPT Researcher. Our vision is to build the #1 autonomous research agent for AI developers and researchers, and we're excited to have you join us on this journey! The roadmap is prioritized based on the following goals: Performance, Quality, Modularity and Conversational flexibility. The roadmap is public and can be found here. Interested in collaborating or contributing? Check out our contributing page for more information.","s":"Roadmap","u":"/docs/roadmap","h":"","p":409},{"i":412,"t":"Testing your Retriever To test your retriever, you can use the following code snippet. The script will search for a sub-query and display the search results. import asynciofrom dotenv import load_dotenvfrom gpt_researcher.config.config import Configfrom gpt_researcher.actions.retriever import get_retrieversfrom gpt_researcher.skills.researcher import ResearchConductorimport pprint# Load environment variables from .env fileload_dotenv()async def test_scrape_data_by_query(): # Initialize the Config object config = Config() # Retrieve the retrievers based on the current configuration retrievers = get_retrievers({}, config) print(\"Retrievers:\", retrievers) # Create a mock researcher object with necessary attributes class MockResearcher: def init(self): self.retrievers = retrievers self.cfg = config self.verbose = True self.websocket = None self.scraper_manager = None # Mock or implement scraper manager self.vector_store = None # Mock or implement vector store researcher = MockResearcher() research_conductor = ResearchConductor(researcher) # print('research_conductor',dir(research_conductor)) # print('MockResearcher',dir(researcher)) # Define a sub-query to test sub_query = \"design patterns for autonomous ai agents\" # Iterate through all retrievers for retriever_class in retrievers: # Instantiate the retriever with the sub-query retriever = retriever_class(sub_query) # Perform the search using the current retriever search_results = await asyncio.to_thread( retriever.search, max_results=10 ) print(\"\\033[35mSearch results:\\033[0m\") pprint.pprint(search_results, indent=4, width=80)if __name__ == \"__main__\": asyncio.run(test_scrape_data_by_query()) Copy The output of the search results will include the title, body, and href of each search result. For example: [{ \"body\": \"Jun 5, 2024 ... Three AI Design Patterns of Autonomous \" \"Agents. Overview of the Three Patterns. Three notable AI \" \"design patterns for autonomous agents include:.\", \"href\": \"https://accredianpublication.medium.com/building-smarter-systems-the-role-of-agentic-design-patterns-in-genai-13617492f5df\", \"title\": \"Building Smarter Systems: The Role of Agentic Design \" \"Patterns in ...\"}, ...] Copy","s":"Testing your Retriever","u":"/docs/gpt-researcher/search-engines/test-your-retriever","h":"","p":411},{"i":414,"t":"On this page","s":"processing.text","u":"/docs/reference/processing/text","h":"","p":413},{"i":416,"t":"On this page","s":"Welcome","u":"/docs/welcome","h":"","p":415},{"i":418,"t":"Quickly accessing relevant and trustworthy information is more crucial than ever. However, we've learned that none of today's search engines provide a suitable tool that provides factual, explicit and objective answers without the need to continuously click and explore multiple sites for a given research task. This is why we've built the trending open source GPT Researcher. GPT Researcher is an autonomous agent that takes care of the tedious task of research for you, by scraping, filtering and aggregating over 20+ web sources per a single research task. To learn more about GPT Researcher, check out the documentation page.","s":"GPT Researcher","u":"/docs/welcome","h":"#gpt-researcher","p":415}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2",[0,5.689,1,2.171,2,3.478,3,3.478,4,3.478,5,2.558,6,1.123,7,1.977,8,3.478,9,3.478,10,2.992,11,4.76,12,1.116,13,2.171,14,1.923,15,2.25,16,2.701,17,2.836,18,1.825,19,1.825,20,4.716,21,3.117,22,1.977,23,2.701,24,2.44,25,2.147,26,2.171,27,2.036,28,1.968,29,1.977,30,2.701,31,2.878,32,2.558,33,2.271,34,1.472,35,2.909,36,3.478,37,2.701,38,3.117,39,3.117,40,3.478,41,4.716,42,1.977,43,2.701,44,1.501,45,2.701,46,3.117,47,2.228,48,2.701,49,5.263,50,3.405,51,2.701,52,3.478,53,2.171,54,3.478,55,1.739,56,2.339,57,2.558,58,1.825,59,2.558,60,1.873,61,2.44,62,3.478,63,1.662,64,1.977,65,2.339,66,3.478,67,3.117,68,2.036,69,2.701,70,4.716,71,1.394,72,2.878,73,0.762,74,0.794,75,1.872,76,1.218,77,2.558,78,2.171,79,2.878,80,3.478,81,2.25]],["t/4",[5,4.857,12,1.02,17,3.402,19,1.948,28,1.389,29,2.111,45,2.883,46,3.328,47,2.34,53,4.567,69,4.292,76,2.313,81,3.576,82,2.403,83,3.328,84,1.204,85,5.465,86,3.328,87,3.714,88,2.243,89,3.073,90,3.714,91,2.605,92,3.714,93,3.328,94,2.497,95,4.066,96,3.554,97,2.732,98,1.462,99,2.319,100,4.575,101,2.605,102,1.948,103,2.883,104,2.883,105,2.605,106,2.883,107,2.883,108,3.073,109,3.714,110,3.328,111,3.073,112,3.328,113,5.528,114,3.714,115,1.515,116,3.714,117,3.717,118,3.339,119,2.243,120,3.714,121,2.883,122,3.328,123,3.714,124,2.403,125,3.714,126,1.261,127,2.605,128,3.328,129,1.437,130,2.883,131,2.83,132,3.328,133,3.714,134,2.174,135,2.403,136,2.732]],["t/6",[12,0.41,13,1.964,14,1.739,17,1.26,19,1.65,25,2.74,28,1.176,31,2.603,32,2.314,38,2.819,56,2.115,61,3.419,63,1.503,73,0.69,74,0.718,84,1.02,85,2.603,99,1.964,100,4.033,103,3.783,104,2.442,107,2.442,115,1.283,126,1.068,129,1.217,131,1.61,134,1.841,136,2.314,137,2.819,138,3.142,139,2.819,140,4.887,141,6.512,142,1.9,143,2.603,144,2.314,145,4.033,146,1.65,147,3.146,148,3.146,149,3.146,150,2.207,151,1.537,152,2.819,153,2.442,154,2.442,155,3.146,156,3.419,157,4.366,158,3.783,159,3.783,160,3.329,161,2.207,162,2.603,163,4.033,164,3.21,165,2.819,166,2.819,167,4.387,168,3.419,169,2.603,170,2.115,171,2.603,172,2.603,173,1.537,174,2.442,175,4.366,176,2.79,177,2.819,178,1.841,179,3.277,180,1.693,181,4.033,182,4.033,183,2.819,184,2.557,185,3.146,186,2.035,187,4.033,188,3.419,189,1.537,190,2.557,191,2.442,192,3.146,193,2.207,194,3.146,195,1.788]],["t/8",[0,4.832,12,0.938,17,3.244,18,3.396,19,1.885,28,2.016,29,2.042,44,1.55,56,2.415,58,1.885,71,2.594,74,1.642,76,2.268,82,2.324,102,1.885,103,2.789,127,2.52,151,1.755,156,2.52,164,1.717,167,2.642,168,2.52,169,2.973,179,2.415,181,2.973,188,3.783,190,2.829,196,3.219,197,3.219,198,1.885,199,3.157,200,4.188,201,2.52,202,2.324,203,4.186,204,1.645,205,4.462,206,5.026,207,3.219,208,4.462,209,3.219,210,5.026,211,3.592,212,1.521,213,2.642,214,3.592,215,3.592,216,3.592,217,3.592,218,3.592,219,1.239,220,3.219,221,2.981,222,2.326,223,3.592,224,3.219,225,3.592,226,3.592,227,3.592,228,0.57,229,1.414,230,2.243,231,2.52,232,2.789,233,1.492,234,2.52,235,2.169,236,2.789,237,2.642,238,3.592,239,2.789]],["t/10",[6,0.754,12,0.695,17,2.568,19,1.854,25,3.123,27,2.069,35,1.954,42,2.009,55,1.767,60,1.896,61,2.479,73,1.405,74,1.215,75,1.902,98,1.391,99,2.206,100,2.925,102,1.854,104,2.744,119,3.871,128,3.167,129,2.061,131,1.809,146,1.854,156,2.479,159,2.744,164,3.064,170,2.377,173,1.727,176,2.998,184,1.854,186,2.286,191,2.744,207,3.167,221,1.954,228,0.561,233,1.468,240,1.689,241,3.582,242,2.744,243,3.945,244,2.287,245,2.744,246,1.854,247,2.6,248,3.167,249,2.134,250,2.925,251,3.118,252,3.167,253,3.167,254,2.663,255,2.925,256,2.6,257,3.534,258,3.918,259,2.377,260,2.377,261,2.069,262,3.534,263,2.377,264,3.534,265,2.206,266,3.167,267,4.136,268,2.944,269,3.167,270,3.534,271,3.534,272,2.479,273,2.6,274,2.6,275,2.744,276,3.534,277,2.377]],["t/12",[11,3.273,12,1.08,13,3.039,14,2.691,17,2.689,24,4.709,25,2.738,47,2.061,50,3.149,59,3.581,60,1.733,73,1.067,76,1.705,84,1.578,118,2.94,119,4.054,124,3.149,134,2.85,167,4.938,176,3.14,178,2.85,182,4.029,189,3.28,190,3.522,201,3.415,204,3.075,230,3.039,240,3.672,241,3.273,244,1.384,278,4.029,279,3.149,280,3.149,281,3.581,282,4.868,283,3.039,284,2.62,285,2.597,286,4.362,287,3.415,288,2.185]],["t/14",[11,4.455,12,1.071,13,2.332,15,2.416,17,1.496,19,3.476,25,2.265,33,3.382,35,2.065,37,2.9,73,0.819,74,0.852,76,1.308,79,3.091,84,1.211,88,3.353,131,2.842,140,2.511,141,3.347,151,1.825,160,1.711,171,3.091,178,2.186,179,2.511,186,2.416,204,1.711,206,2.9,232,2.9,241,2.511,242,2.9,244,1.062,247,2.747,256,2.747,275,2.9,289,2.9,290,3.347,291,3.347,292,4.594,293,5.552,294,2.416,295,1.912,296,5.552,297,1.825,298,3.347,299,3.735,300,3.735,301,3.735,302,3.347,303,3.735,304,3.735,305,3.347,306,2.9,307,6.626,308,5.552,309,2.747,310,4.594,311,3.735,312,2.9,313,2.9,314,3.091,315,2.186,316,3.735,317,1.96,318,3.347,319,3.735,320,2.62,321,2.62,322,2.416,323,1.912,324,3.091,325,3.347,326,2.186,327,3.347,328,3.735]],["t/17",[12,1.008,73,1.694,76,2.707,329,6.924,330,4.271,331,5.684]],["t/20",[6,0.793,10,2.111,12,0.861,30,2.883,33,3.374,51,4.292,71,1.488,73,1.212,74,0.847,76,2.872,77,2.732,84,1.204,94,2.497,101,2.605,105,2.605,115,1.515,134,2.174,136,2.732,146,2.9,151,1.815,168,2.605,172,3.073,173,1.815,208,3.073,235,2.243,240,1.775,247,2.732,249,2.243,256,2.732,273,2.732,285,1.437,330,3.056,331,2.732,332,4.575,333,1.999,334,3.328,335,2.403,336,3.056,337,2.403,338,3.328,339,4.953,340,3.714,341,1.815,342,3.714,343,5.528,344,3.328,345,2.319,346,2.497,347,3.073,348,4.857,349,3.714,350,2.319,351,2.243,352,3.714,353,3.714,354,3.714,355,3.714,356,3.714,357,3.073,358,1.515,359,2.403,360,3.714,361,3.714,362,3.328,363,3.714,364,2.111,365,3.714,366,2.83,367,3.328,368,3.073,369,2.883,370,2.732,371,1.701,372,2.403,373,3.073,374,2.883]],["t/22",[6,1.002,7,2.669,28,3.206,68,2.748,69,3.645,74,1.071,76,3.111,79,3.885,97,3.453,98,2.577,170,3.157,187,3.885,195,2.669,201,3.293,284,2.527,330,2.595,336,2.595,341,2.294,350,4.705,358,2.67,366,3.858,375,4.207,376,2.835,377,2.347,378,3.645,379,4.695,380,3.885,381,4.207,382,3.293,383,4.207,384,3.618,385,3.293,386,4.695,387,3.645,388,3.602,389,4.695,390,2.595,391,3.885,392,3.453,393,4.695,394,4.207,395,4.695,396,4.695]],["t/24",[10,2.809,12,1.087,33,2.132,34,2.092,63,3.701,71,1.98,73,1.083,76,2.919,94,3.323,95,3.635,96,2.66,99,3.085,131,2.53,135,3.197,161,3.467,168,3.467,176,2.311,184,2.592,193,3.467,229,2.67,259,3.323,261,2.893,284,2.66,306,3.836,366,2.53,384,2.731,397,1.945,398,3.323,399,4.988,400,5.612,401,3.836,402,2.809,403,4.089,404,4.428,405,4.089,406,3.323,407,4.942,408,2.984,409,3.836,410,4.089,411,4.089,412,3.323,413,3.467]],["t/26",[1,3.82,6,0.911,10,2.426,12,1.156,34,1.807,73,0.936,74,2.023,76,2.898,96,2.297,106,3.314,118,2.578,126,1.449,138,1.996,142,4.32,153,3.314,164,2.925,176,2.862,178,3.582,184,2.239,198,2.239,233,1.773,240,2.925,243,2.359,244,1.739,260,2.87,261,2.499,268,2.359,366,3.133,397,1.68,399,3.139,412,4.115,414,4.268,415,3.824,416,4.751,417,3.824,418,2.499,419,3.824,420,3.824,421,4.268,422,2.994,423,3.314,424,2.665,425,3.959,426,2.87,427,3.139,428,3.314,429,2.761]],["t/28",[1,2.775,12,1.155,15,1.81,17,2.216,22,1.59,25,1.141,47,1.184,58,1.468,63,1.337,65,1.881,70,2.507,73,1.212,74,1.75,76,0.98,84,0.907,96,3.39,98,1.101,118,3.34,126,0.95,129,1.72,138,1.309,140,1.881,142,1.69,144,2.058,145,2.315,150,1.963,151,1.367,176,2.946,178,3.237,184,2.332,189,1.367,204,1.281,210,3.451,212,1.184,230,1.747,233,3.04,240,2.643,243,3.057,244,1.953,248,2.507,259,1.881,260,1.881,261,2.602,265,1.747,268,1.547,283,1.747,284,1.506,288,1.256,289,2.172,322,1.81,330,1.547,333,2.392,397,2.177,413,1.963,416,3.451,423,2.172,424,1.747,425,4.075,426,2.989,427,2.058,428,2.172,430,1.69,431,2.507,432,2.124,433,2.172,434,1.638,435,2.507,436,2.172,437,1.256,438,2.507,439,2.798,440,2.315,441,0.935,442,1.69,443,3.88,444,1.281,445,2.172,446,2.315,447,2.315,448,2.507,449,2.507,450,2.172,451,2.058,452,1.59,453,1.69,454,1.963,455,1.881,456,2.315,457,1.547,458,2.798,459,2.798,460,2.315,461,2.058,462,2.507,463,2.507]],["t/30",[1,1.064,5,1.253,6,0.364,7,0.968,12,0.845,15,1.102,17,1.179,18,0.894,26,1.064,28,1.453,31,1.41,34,0.721,42,1.673,55,0.852,60,0.606,73,0.373,74,1.849,76,2.548,101,4.3,102,2.741,106,1.323,107,1.323,110,1.527,111,1.41,121,1.323,126,0.999,129,1.139,134,0.997,142,1.029,144,1.253,156,1.195,160,0.78,166,1.527,171,1.41,176,0.797,178,0.997,198,2.039,200,1.904,201,2.726,204,2.393,212,0.721,219,1.015,222,1.27,228,0.735,229,0.671,231,1.195,233,1.223,237,1.253,240,0.814,243,0.942,244,1.625,259,1.146,260,1.146,272,1.195,278,2.436,280,1.102,281,1.253,285,0.659,313,5.031,326,0.997,330,0.942,333,3.077,336,0.942,339,1.527,341,1.899,345,1.838,348,2.165,358,1.201,366,2.674,371,0.78,376,1.029,377,1.472,384,1.627,397,0.671,399,1.253,400,2.436,402,0.968,406,1.146,418,0.997,425,1.102,427,1.253,430,1.778,432,1.857,437,0.765,444,0.78,450,1.323,452,0.968,456,1.41,457,0.942,464,1.704,465,0.917,466,1.704,467,2.285,468,2.858,469,1.704,470,1.527,471,1.673,472,4.146,473,1.527,474,1.102,475,1.195,476,1.527,477,1.146,478,1.41,479,1.704,480,1.41,481,0.648,482,1.41,483,2.944,484,0.852,485,1.704,486,2.285,487,1.704,488,3.793,489,2.944,490,1.704,491,1.704,492,2.637,493,1.195,494,1.195,495,1.704,496,1.704,497,1.704,498,1.102,499,0.917,500,1.704,501,1.704,502,1.704,503,2.944,504,1.323,505,1.704,506,0.872,507,1.527,508,2.944,509,1.78,510,1.527,511,1.146,512,1.064,513,1.704,514,1.704,515,1.253,516,1.704,517,1.527,518,0.894,519,0.872,520,1.438,521,0.894,522,1.41,523,1.704,524,1.704,525,1.704,526,1.704,527,1.704,528,1.704,529,1.704,530,1.704,531,1.704,532,1.704,533,1.704,534,1.704,535,1.704,536,1.704,537,1.704,538,1.527,539,1.704,540,1.704,541,1.704,542,1.704,543,1.704,544,1.704,545,1.527,546,1.704,547,1.527,548,1.704,549,1.704,550,1.704,551,1.527,552,1.323,553,1.704,554,1.704,555,1.704,556,1.253,557,1.41,558,1.195,559,1.704,560,1.527,561,1.527,562,1.253]],["t/32",[6,0.356,10,0.949,12,0.911,14,0.923,17,1.533,18,0.876,19,0.876,25,0.681,26,1.042,28,1.081,33,0.72,42,1.644,47,0.707,58,0.876,60,1.029,63,0.798,69,2.245,71,1.828,73,0.634,74,1.384,75,0.898,76,1.807,82,1.08,88,1.008,101,3.619,115,0.681,126,0.982,136,1.228,143,2.393,151,0.816,162,1.381,164,0.798,170,1.122,173,0.816,175,1.496,176,0.781,178,4.088,181,1.381,184,1.517,198,1.517,200,1.08,201,1.171,204,2.09,210,4.005,219,0.575,228,0.608,229,0.657,230,1.805,231,1.171,233,0.693,234,1.171,240,2.465,244,1.724,251,0.977,265,1.805,267,1.296,268,1.598,275,1.296,278,2.393,285,0.646,288,0.749,294,1.08,313,4.708,317,0.876,323,0.854,331,3.794,346,1.122,348,1.228,358,0.681,366,2.641,371,0.765,374,1.296,382,1.171,388,0.798,397,0.657,401,2.245,425,4.347,430,1.008,432,0.798,437,0.749,441,2.027,442,1.008,443,3.619,445,1.296,447,3.166,452,2.175,453,1.746,454,2.029,460,1.381,462,2.591,465,0.898,468,3.794,472,1.496,481,0.635,482,2.393,484,0.834,486,2.97,488,2.24,498,1.871,509,0.765,512,1.042,521,0.876,522,1.381,538,1.496,547,1.496,557,3.166,560,1.496,561,1.496,563,2.245,564,1.381,565,1.496,566,1.669,567,4.563,568,1.669,569,4.622,570,1.381,571,1.296,572,1.669,573,1.669,574,1.669,575,1.296,576,1.496,577,1.644,578,1.08,579,1.228,580,1.669,581,1.296,582,1.381,583,1.669,584,1.669,585,1.669,586,1.669,587,1.669,588,1.669,589,1.669,590,1.669,591,1.669,592,1.669,593,1.669,594,1.669,595,1.669,596,2.892,597,1.669,598,1.746,599,1.496,600,2.591,601,1.08,602,1.228,603,0.923,604,1.669,605,1.496,606,1.496,607,0.681,608,1.496,609,2.591,610,0.816,611,1.496,612,2.814,613,2.591,614,2.393,615,1.496,616,2.127,617,1.669,618,1.669,619,1.496,620,1.669,621,1.669,622,1.669,623,1.669,624,0.923,625,1.496,626,1.381,627,1.669,628,1.669,629,1.171,630,0.525]],["t/34",[6,0.613,7,1.632,12,0.734,17,1.818,23,2.229,26,1.792,30,2.229,33,2.427,37,2.229,43,2.229,45,4.367,47,1.215,50,1.857,51,2.229,59,2.112,60,1.022,72,2.376,73,0.629,75,1.545,76,1.589,77,2.112,84,0.931,85,2.376,96,3.027,97,2.112,115,1.171,118,1.734,119,1.734,130,2.229,131,1.47,135,2.935,151,2.217,164,1.372,169,2.376,170,3.051,176,2.631,180,1.545,184,1.506,191,2.229,195,1.632,231,2.014,233,1.885,234,2.014,240,1.372,244,0.816,259,1.931,283,1.792,285,1.755,292,2.376,294,1.857,313,3.522,317,2.38,323,1.47,326,2.656,327,2.573,330,1.587,331,4.137,338,2.573,350,1.792,366,2.322,382,2.014,387,2.229,401,3.522,402,1.632,406,1.931,424,1.792,425,1.857,426,1.931,430,1.734,432,1.372,438,2.573,474,1.857,480,2.376,481,1.725,499,1.545,504,2.229,552,4.367,563,2.229,578,1.857,601,1.857,624,2.508,631,2.871,632,1.931,633,2.014,634,2.871,635,1.587,636,2.871,637,2.871,638,2.014,639,1.47,640,1.171,641,1.263,642,1.681,643,2.376,644,2.871,645,2.376,646,2.871,647,1.435,648,2.014,649,2.871,650,2.229,651,4.065,652,2.573,653,1.857,654,2.871,655,2.871,656,2.376,657,2.871,658,2.573,659,2.871,660,2.014,661,1.857,662,2.573,663,1.857,664,2.871,665,2.871,666,2.376,667,2.229,668,2.573,669,2.871,670,2.112]],["t/36",[5,1.039,6,1.14,7,0.43,11,1.986,14,1.1,16,0.587,18,0.397,19,0.397,22,0.803,25,1.893,26,0.472,28,1.518,33,0.326,41,1.266,42,0.803,44,1.274,47,1.058,53,1.56,55,0.378,58,1.311,60,0.503,63,0.361,71,0.303,73,0.436,74,2.068,84,0.645,94,0.95,98,1.163,102,0.397,104,0.587,115,0.308,119,1.51,124,0.489,129,0.292,131,0.723,134,0.827,142,1.202,146,0.397,173,0.972,176,0.354,180,0.407,189,1.443,197,0.677,200,1.287,201,2.072,204,0.346,208,0.626,212,0.32,219,1.159,221,0.781,228,0.645,229,0.783,230,1.242,231,0.53,232,0.587,233,0.587,237,0.556,240,0.951,246,1.55,247,0.556,251,1.165,253,0.677,258,2.742,275,0.587,283,1.844,288,0.893,291,0.677,295,1.019,298,1.783,315,0.443,317,1.044,321,0.53,323,0.723,326,1.729,331,4.677,333,0.761,334,0.677,336,1.1,341,0.369,345,4.342,346,3.29,357,0.626,358,0.812,367,0.677,368,0.626,369,1.097,370,1.039,371,0.346,372,0.489,377,0.707,384,0.418,385,0.53,388,0.675,390,0.418,402,0.43,406,0.95,411,0.626,418,0.443,429,0.489,430,0.853,432,0.361,436,1.097,441,2.212,457,1.382,468,1.039,482,1.17,499,0.407,504,0.587,511,0.508,520,1.821,551,0.677,552,0.587,575,0.587,579,0.556,598,0.853,601,0.914,602,0.556,603,0.781,605,0.677,607,0.308,612,1.464,615,0.677,632,0.508,639,0.387,640,1.02,642,2.182,645,0.626,647,1.477,660,0.53,666,0.626,670,0.556,671,0.626,672,0.756,673,0.756,674,1.784,675,0.626,676,3.727,677,0.443,678,2.144,679,0.457,680,1.783,681,1.99,682,0.756,683,0.626,684,2.078,685,0.677,686,0.677,687,0.677,688,0.626,689,0.626,690,0.587,691,1.17,692,0.756,693,0.677,694,0.556,695,0.472,696,0.882,697,0.756,698,0.457,699,4.893,700,1.221,701,1.783,702,3.387,703,0.677,704,0.508,705,1.839,706,0.626,707,0.756,708,1.413,709,0.53,710,0.556,711,1.17,712,0.756,713,0.756,714,2.098,715,0.756,716,0.756,717,1.413,718,1.039,719,1.413,720,0.387,721,0.677,722,1.413,723,1.413,724,1.413,725,1.413,726,1.413,727,1.097,728,2.5,729,2.5,730,1.17,731,0.991,732,1.266,733,1.413,734,1.413,735,1.413,736,0.756,737,0.756,738,1.413,739,1.413,740,2.5,741,1.413,742,1.413,743,1.413,744,1.413,745,0.756,746,0.626,747,0.626,748,0.677,749,0.756,750,0.756,751,0.756,752,0.756,753,2.647,754,0.626,755,0.626,756,0.756,757,0.626,758,1.413,759,0.677,760,0.677,761,0.756,762,2.069,763,2.954,764,1.413,765,1.413,766,2.5,767,1.413,768,1.413,769,2.5,770,1.413,771,3.728,772,1.647,773,0.756,774,0.556,775,0.756,776,3.201,777,1.413,778,1.413,779,2.5,780,1.413,781,2.5,782,1.413,783,2.5,784,1.413,785,1.413,786,1.413,787,1.413,788,1.413,789,1.413,790,1.413,791,1.413,792,0.587,793,0.626,794,1.413,795,0.756,796,1.413,797,3.361,798,1.413,799,1.99,800,0.556,801,0.677,802,0.756,803,0.756,804,0.756,805,0.756,806,0.677,807,0.756,808,0.756,809,0.756,810,0.756,811,0.756,812,1.266,813,0.756,814,0.756,815,0.756,816,1.097,817,0.756,818,0.756,819,0.756,820,0.756,821,0.756,822,0.756,823,1.413,824,0.756,825,1.413,826,0.756,827,0.756,828,0.756,829,0.756,830,0.756,831,0.756,832,0.756,833,0.756,834,0.677,835,0.756,836,0.756,837,0.626,838,0.587]],["t/38",[67,5.716,115,3.58,325,5.716,371,3.675,461,5.901,578,4.127,624,4.435,630,2.007,667,4.952,668,5.716,839,7.263,840,6.379,841,6.379,842,4.845,843,4.475,844,4.127]],["t/40",[6,0.665,12,1.077,17,1.248,25,2.419,28,1.165,32,2.292,33,1.344,34,2.51,42,1.771,55,1.558,58,1.635,64,1.771,72,2.579,73,0.683,74,1.353,78,1.945,84,1.01,88,1.882,115,1.271,121,2.419,134,1.824,139,2.792,150,2.186,161,2.186,163,2.579,174,2.419,176,1.457,183,2.792,189,1.522,195,3.37,249,1.882,259,2.095,273,2.292,277,2.095,284,1.677,288,1.398,292,2.579,305,2.792,320,2.186,323,1.595,326,1.824,329,2.792,332,2.579,359,2.016,364,1.771,378,2.419,430,1.882,432,2.312,477,2.095,498,2.016,504,2.419,562,2.292,563,2.419,598,1.882,601,2.016,640,2.726,641,2.608,674,1.882,676,3.253,684,1.595,698,1.882,710,4.361,718,2.292,792,2.419,845,2.419,846,2.292,847,3.116,848,3.116,849,3.116,850,2.145,851,3.116,852,3.116,853,2.792,854,1.771,855,2.921,856,3.116,857,3.116,858,2.792,859,2.095,860,2.921,861,4.334,862,2.579,863,2.792,864,3.116,865,3.116,866,2.792,867,3.116,868,3.116,869,3.116,870,2.186,871,2.579,872,2.792,873,2.579,874,3.116,875,3.116,876,2.419,877,2.419,878,3.116,879,2.095,880,2.095,881,3.116,882,2.419,883,3.116]],["t/42",[1,1.364,6,0.996,7,1.242,11,1.469,12,0.944,19,1.146,22,1.242,25,2.464,27,1.279,33,0.943,55,2.333,60,1.936,63,1.737,64,1.242,74,0.498,78,1.364,84,1.513,95,1.607,96,1.956,98,1.431,99,1.364,130,2.822,131,1.118,138,1.022,144,1.607,146,1.146,151,1.067,154,2.822,161,1.533,164,1.044,172,1.808,178,1.279,179,2.444,187,1.808,189,1.067,190,1.146,195,1.242,229,2.566,233,0.908,245,1.696,273,1.607,284,2.512,302,1.958,310,1.808,321,2.55,322,3.019,323,1.861,326,2.128,336,1.208,359,3.019,384,1.208,388,1.737,390,1.208,402,2.066,413,1.533,432,3.115,437,0.98,465,1.176,481,0.831,499,1.176,581,1.696,633,1.533,635,1.208,640,2.819,641,2.657,643,1.808,656,1.808,674,1.319,676,1.469,677,1.279,684,1.118,695,1.364,710,3.433,711,1.808,718,1.607,774,1.607,800,1.607,843,1.533,845,1.696,850,1.688,855,3.285,860,2.819,862,3.008,866,3.257,870,3.816,871,3.008,877,2.822,884,1.958,885,2.55,886,3.257,887,1.808,888,3.635,889,1.696,890,2.185,891,2.185,892,2.185,893,2.185,894,1.808,895,2.185,896,2.185,897,3.257,898,1.958,899,2.185,900,3.008,901,2.185,902,2.185,903,2.185,904,2.185,905,2.185,906,1.958,907,1.958,908,2.185,909,1.958,910,2.185,911,2.185,912,2.185,913,2.185,914,2.185,915,2.185,916,2.185,917,1.958,918,1.808,919,2.185,920,1.469,921,1.469,922,1.696,923,2.185,924,2.185,925,1.533,926,2.185,927,2.185,928,1.958,929,1.958,930,1.808,931,2.185,932,3.635,933,1.958,934,2.185,935,1.696,936,2.185,937,1.808,938,2.185,939,1.607]],["t/44",[6,0.882,12,1.145,18,2.169,25,1.686,34,2.974,63,1.976,71,1.656,73,1.688,96,2.225,102,2.169,108,3.421,115,1.686,189,2.02,195,2.35,233,2.485,240,1.976,244,1.175,254,2.067,281,3.041,285,1.599,294,2.674,309,3.041,376,2.497,391,3.421,397,2.354,430,2.497,432,1.976,445,3.21,446,3.421,456,3.421,481,1.572,577,2.35,581,3.21,601,2.674,638,2.9,640,2.866,641,3.387,647,2.067,663,2.674,684,2.116,705,3.041,718,3.041,850,2.786,855,2.497,860,3.612,879,2.78,940,3.21,941,3.704,942,2.9,943,4.134,944,4.134,945,4.134,946,4.134,947,5.359,948,3.421,949,3.704,950,3.704]],["t/46",[6,0.653,28,1.143,74,2.146,84,0.991,98,1.204,112,2.74,126,1.038,130,2.374,150,2.145,228,0.486,229,1.204,295,1.565,345,1.909,358,2.699,376,1.847,392,2.249,397,1.204,402,1.738,437,1.372,481,1.163,520,1.494,558,2.145,570,2.531,582,2.531,607,1.945,641,2.097,642,2.791,704,2.056,759,2.74,834,6.808,850,2.595,854,1.738,935,2.374,951,3.058,952,8.208,953,3.058,954,3.058,955,3.058,956,3.058,957,3.058,958,3.058,959,3.058,960,3.058,961,3.058,962,2.74,963,3.058,964,3.058,965,2.531,966,3.058,967,3.058,968,3.058,969,5.859,970,3.058,971,3.058,972,3.058,973,3.058,974,3.058,975,3.058,976,3.058,977,3.058,978,3.058,979,3.058,980,3.058,981,3.058,982,3.058,983,3.058,984,3.058,985,3.058,986,1.978,987,3.058,988,3.058,989,3.058,990,3.058,991,3.058,992,2.374,993,2.374,994,3.058,995,3.058,996,3.058,997,3.058,998,1.738,999,2.249,1000,2.74,1001,2.249,1002,3.058,1003,3.058,1004,3.058,1005,2.74,1006,2.374,1007,3.058,1008,3.058,1009,3.058,1010,3.058,1011,1.978,1012,3.058,1013,3.058]],["t/48",[6,1.185,12,1.185,14,2.065,17,2.224,18,1.96,22,2.123,25,1.524,28,1.397,32,2.747,34,1.581,47,1.581,65,2.511,71,2.224,73,1.608,96,2.01,98,1.47,102,1.96,117,3.733,127,2.62,131,1.912,134,2.186,164,3.166,176,1.747,180,2.01,184,1.96,189,1.825,190,1.96,204,1.711,219,1.914,233,1.552,240,3.166,244,1.062,277,2.511,285,2.563,294,2.416,317,1.96,351,2.256,364,2.123,376,2.256,424,2.332,430,2.256,433,2.9,445,2.9,446,3.091,578,2.416,641,2.442,647,2.775,663,2.416,684,1.912,709,2.62,714,2.332,846,4.083,850,2.008,860,3.353,918,3.091,939,2.747,992,4.31,999,2.747,1000,3.347,1001,2.747,1014,3.735,1015,3.347,1016,2.62,1017,3.347,1018,3.091,1019,3.347,1020,3.735,1021,3.347]],["t/50",[6,0.693,12,1.172,13,1.193,17,0.766,25,0.78,28,0.715,34,0.809,42,1.087,47,1.793,60,1.156,61,1.341,65,1.285,71,0.766,73,1.562,74,1.559,84,1.373,96,1.029,99,2.028,101,1.341,102,1.704,115,0.78,126,1.438,127,1.341,129,1.257,131,1.663,134,1.119,135,1.237,138,1.519,146,1.003,164,0.914,189,1.587,195,1.087,199,1.119,219,0.659,222,1.402,228,0.673,229,0.752,234,1.341,244,1.42,246,1.704,250,1.582,277,1.285,283,1.193,288,1.901,290,1.713,294,1.237,297,1.587,309,1.406,321,1.341,323,0.979,333,1.748,351,1.154,358,0.78,359,2.741,364,1.847,371,0.876,390,2.342,402,1.087,424,1.193,429,1.237,430,1.962,437,0.858,441,2.034,465,1.029,481,1.235,488,2.924,498,2.741,506,0.979,509,0.876,518,1.003,519,0.979,520,0.934,521,1.003,552,1.484,578,1.237,607,0.78,610,0.934,625,1.713,630,1.022,632,1.285,640,1.325,641,1.429,663,1.237,678,0.74,679,1.154,684,0.979,690,1.484,714,2.028,720,0.979,762,1.582,793,1.582,838,1.484,843,2.972,846,1.406,850,2.202,860,4.126,870,2.972,871,1.582,872,1.713,877,1.484,882,1.484,894,3.506,900,1.582,918,1.582,939,1.406,1011,2.102,1021,1.713,1022,1.406,1023,1.257,1024,1.553,1025,1.003,1026,1.553,1027,1.912,1028,1.582,1029,2.102,1030,0.934,1031,1.713,1032,1.582,1033,1.912,1034,1.582,1035,1.193,1036,2.911,1037,1.912,1038,2.184,1039,1.406,1040,2.48,1041,1.193,1042,1.237,1043,1.713,1044,1.003,1045,1.285,1046,1.285,1047,2.279,1048,1.119,1049,1.119,1050,2.911,1051,2.911,1052,1.713,1053,1.285,1054,1.285,1055,1.912,1056,1.912,1057,1.582,1058,1.713,1059,1.582,1060,1.912,1061,1.912,1062,1.713,1063,1.713,1064,1.484,1065,1.912,1066,1.484]],["t/52",[6,0.961,12,1.044,25,1.836,34,1.906,35,2.488,55,3.178,56,3.027,58,2.362,60,1.602,63,2.151,64,2.559,73,0.987,84,2.06,86,4.034,96,2.423,121,3.495,131,2.305,134,2.635,154,3.495,179,3.027,239,3.495,289,3.495,310,3.725,321,3.158,323,3.254,388,2.151,390,2.488,412,4.274,432,3.038,474,2.912,581,3.495,633,4.459,640,1.836,641,1.98,676,3.027,698,2.719,710,3.311,774,3.311,859,3.027,860,3.839,861,4.034,873,3.725,877,4.935,884,4.034,885,4.459,886,4.034,906,4.034,1067,4.502,1068,4.502,1069,4.034,1070,3.725,1071,4.502,1072,4.502,1073,4.502,1074,4.502]],["t/54",[630,2.583]],["t/56",[12,1.073,34,2.031,74,2.233,176,2.244,198,2.517,219,2.629,222,2.867,228,0.762,243,2.652,244,2.339,274,3.529,333,2.582,358,1.957,441,1.603,506,2.456,509,2.197,517,4.299,518,2.517,519,2.456,520,2.344,642,2.808,674,2.897,950,4.299,1041,2.995,1042,3.104,1044,2.517,1045,3.226,1046,3.226,1048,2.808,1049,2.808,1075,2.995,1076,3.529,1077,3.97,1078,3.97,1079,3.97,1080,3.226,1081,3.725,1082,4.797]],["t/58",[630,2.583]],["t/60",[6,0.995,12,1.115,13,2.91,28,1.743,34,1.973,35,2.577,63,2.228,64,2.65,73,1.428,76,1.633,94,3.134,95,3.429,108,3.857,124,3.016,138,2.18,160,2.983,164,2.228,184,2.445,198,2.445,204,2.135,219,1.607,244,1.851,254,2.33,261,2.729,280,3.016,285,2.52,295,2.386,372,3.016,397,1.835,409,3.619,410,3.857,442,2.815,477,3.134,484,3.753,660,3.27,694,3.429,776,2.91,855,2.815,925,3.27,940,3.619,942,3.27,1083,3.429,1084,2.91,1085,4.661,1086,4.661,1087,4.661,1088,4.661,1089,3.134,1090,4.661,1091,3.134,1092,2.65,1093,4.177]],["t/62",[12,0.793,34,2.575,35,3.363,50,3.936,124,3.936,131,3.114,160,3.566,184,3.192,204,2.787,244,1.729,261,3.561,280,3.936,285,2.354,295,3.114,314,5.035,317,3.192,418,3.561,442,4.702,450,4.723,616,4.475,754,5.035,755,5.035,1084,3.798,1094,5.451,1095,4.723,1096,5.451,1097,5.451]],["t/65",[6,1.131,12,0.691,19,2.78,60,2.531,129,2.05,198,2.78,199,4.163,219,2.452,221,2.929,244,2.281,333,3.828,442,4.295,484,2.649,494,4.989,564,4.386,578,3.429,607,2.162,642,3.102,731,3.718,800,3.898,920,3.564,1035,3.309,1040,3.102,1044,2.78,1083,3.898,1098,3.718,1099,4.749,1100,3.718,1101,6.643,1102,5.3,1103,5.231,1104,4.44,1105,4.115]],["t/67",[12,0.927,28,1.982,34,3.01,60,1.886,124,3.429,160,3.257,184,2.78,189,2.59,198,2.78,204,2.427,219,1.827,240,3.399,243,2.929,244,2.281,254,2.649,280,3.429,285,2.05,288,2.378,314,4.386,333,2.852,341,2.59,377,2.649,442,4.848,443,3.718,451,3.898,452,4.043,484,2.649,493,3.718,616,3.898,647,2.649,855,3.201,1083,3.898,1095,4.115,1096,4.749,1097,4.749,1106,5.3]],["t/69",[6,0.855,28,1.499,33,1.729,35,2.216,60,1.427,74,1.985,98,2.302,221,2.216,222,3.274,228,0.637,229,1.578,244,1.662,263,2.695,279,2.593,285,1.551,333,2.157,358,3.096,377,2.004,408,2.421,441,1.34,442,3.531,484,2.004,494,4.102,509,2.678,520,1.958,521,2.103,564,3.317,690,3.112,854,2.278,1053,2.695,1083,5.078,1098,2.812,1103,4.301,1105,3.112,1107,3.112,1108,4.301,1109,4.008,1110,4.008,1111,4.008,1112,4.008,1113,4.008,1114,5.848,1115,3.317,1116,4.008,1117,4.54,1118,3.591,1119,3.317,1120,4.008,1121,5.848,1122,4.008,1123,4.008,1124,4.008,1125,4.008,1126,3.591,1127,5.848,1128,4.008,1129,4.008,1130,4.008,1131,4.008,1132,4.008]],["t/71",[12,1.06,25,2.215,27,4.232,63,2.595,64,3.087,73,1.19,124,3.513,138,2.54,160,3.311,176,2.54,184,3.793,198,2.849,219,1.873,244,1.543,254,2.715,260,3.652,261,3.179,280,3.513,285,2.101,297,2.654,323,2.78,442,3.28,484,2.715,676,3.652,694,3.995,776,3.39,925,3.81,1083,3.995,1084,3.39,1133,5.431,1134,5.431,1135,5.431,1136,5.431,1137,5.431,1138,5.431,1139,5.431,1140,5.431]],["t/73",[630,2.583]],["t/75",[6,1.323,12,1.188,35,3.426,55,3.099,73,1.727,78,3.87,98,2.44,126,2.104,164,2.962,322,4.01,397,2.44,437,2.782,441,2.072,467,4.812,640,2.529,641,2.727,684,3.173,850,2.242,855,3.743,860,3.743,942,4.349,1069,5.554,1141,5.554]],["t/77",[129,2.444,138,2.955,212,3.375,246,3.314,294,4.087,317,4.183,444,2.894,481,3.032,635,3.492,647,3.158,653,5.159,678,3.085,714,3.944,1023,3.085,1024,3.019,1142,6.318,1143,4.647,1144,6.318,1145,3.158]],["t/79",[12,1.02,73,1.714,228,1.242,1023,3.025,1024,3.737]],["t/81",[74,1.876,126,2.253,212,2.809,228,1.306,358,2.707,481,2.524,678,2.567,1026,3.171,1029,5.32,1030,3.243,1075,4.143,1146,6.636,1147,6.636,1148,6.636,1149,6.636,1150,6.636,1151,6.636]],["t/83",[28,2.613,189,3.415,408,4.221,453,4.221,454,4.903,455,4.699,603,3.863,641,3.074,850,2.528,1011,4.521,1038,5.708,1152,5.426,1153,6.989,1154,6.989]],["t/85",[12,0.975,29,2.631,74,2.113,212,1.959,219,1.596,222,2.796,228,0.735,244,1.842,358,1.888,359,2.994,390,2.558,441,2.166,488,4.744,506,2.369,509,2.12,518,2.428,519,2.369,520,2.262,571,3.594,843,3.247,854,2.631,860,3.914,870,3.247,894,3.83,1016,3.247,1040,3.794,1041,2.89,1042,2.994,1043,4.147,1044,2.428,1045,3.112,1046,3.112,1047,4.547,1048,2.71,1049,2.71,1050,4.147,1051,4.147,1052,4.147,1053,3.112,1054,3.112,1075,4.046,1081,3.594,1155,6.481]],["t/87",[12,0.786,22,3.427,29,3.427,35,3.332,60,2.146,195,3.427,233,2.504,244,2.2,254,3.014,288,2.705,322,3.9,359,3.9,432,2.881,481,2.292,579,4.434,640,2.459,641,2.652,694,4.434,710,5.693,776,3.763,850,2.181,855,4.674,900,4.989,922,4.68,1156,5.401,1157,6.028,1158,4.229]],["t/89",[12,0.752,47,2.44,82,4.864,126,1.956,158,4.475,263,3.876,268,3.186,279,3.729,297,2.816,317,3.024,371,2.64,375,5.165,381,6.737,397,2.269,481,2.859,635,3.186,641,2.536,678,2.908,850,3.208,986,3.729,1159,4.24,1160,4.77,1161,5.165,1162,5.764,1163,5.764,1164,4.77,1165,5.165,1166,5.764]],["t/91",[6,0.797,12,1.14,18,1.96,25,2.703,35,2.065,55,1.867,57,2.747,60,1.976,65,2.511,73,1.608,84,1.8,94,2.511,98,1.47,146,1.96,151,1.825,173,3.237,202,2.416,206,2.9,219,1.914,233,1.552,240,1.785,244,1.062,272,2.62,285,1.445,317,1.96,372,2.416,397,2.608,432,3.166,499,2.01,577,2.123,579,2.747,624,2.065,639,1.912,640,2.265,641,2.915,660,2.62,677,2.186,687,3.347,694,2.747,705,2.747,706,3.091,720,1.912,850,1.351,922,4.31,935,2.9,1057,3.091,1084,2.332,1091,2.511,1145,1.867,1167,7.335,1168,3.735,1169,3.347,1170,3.735,1171,3.735,1172,2.747,1173,3.091,1174,3.347,1175,4.594,1176,3.735,1177,3.735,1178,3.735,1179,3.735,1180,3.735,1181,4.974,1182,2.065,1183,3.091,1184,3.735]],["t/93",[630,2.583]],["t/95",[10,3.139,12,1.068,26,3.447,33,2.382,60,1.966,73,1.602,75,2.972,76,1.934,97,4.062,115,2.982,229,2.174,336,3.052,337,3.572,371,3.348,409,4.287,436,4.287,471,3.139,556,4.062,624,3.052,639,2.827,663,4.729,678,2.828,714,4.563,842,4.948,850,2.644,1185,5.522,1186,3.572,1187,4.57,1188,4.287]],["t/97",[10,2.809,12,1.205,17,2.717,18,2.592,60,2.414,63,2.362,73,1.697,75,2.66,76,1.731,84,1.602,115,2.016,138,2.311,151,2.414,190,2.592,203,3.836,241,3.323,249,2.984,256,3.635,277,3.323,284,2.66,287,3.467,297,2.414,320,3.467,347,4.089,351,2.984,364,2.809,371,2.263,382,3.467,405,4.089,455,3.323,575,3.836,630,1.554,640,2.016,850,1.788,876,3.836,930,4.089,993,3.836,998,2.809,1001,3.635,1187,4.089,1189,4.942,1190,4.428,1191,3.635,1192,4.942]],["t/99",[6,1.375,12,1.053,17,2.581,48,5.001,73,1.769,131,3.297,138,3.013,151,3.147,179,4.331,205,5.33,251,3.771,295,3.297,320,4.519,346,4.331,441,2.153,879,4.331,921,4.331,1191,4.738,1193,5.937,1194,6.441]],["t/101",[6,1.843,12,0.702,17,2.158,25,3.522,33,3.491,55,2.693,60,2.559,61,3.779,84,1.746,98,2.12,115,2.197,140,3.622,160,2.467,161,3.779,179,3.622,189,3.513,249,3.253,285,2.084,287,3.779,347,4.458,398,3.622,635,3.974,645,4.458,907,7.251,928,6.442,1195,5.387,1196,5.387,1197,4.827,1198,5.387]],["t/103",[12,0.898,48,3.925,60,2.452,71,3.139,73,1.108,75,2.721,76,1.771,84,2.233,115,2.062,119,3.053,131,4.011,146,2.652,193,3.547,306,3.925,351,3.053,369,3.925,370,3.718,371,2.315,390,2.794,406,3.399,432,2.416,461,3.718,465,2.721,477,3.399,578,3.27,630,1.59,650,3.925,663,3.27,677,2.959,678,1.956,684,3.526,842,3.053,843,4.833,879,5.269,1199,5.055,1200,5.067,1201,5.055,1202,5.055,1203,5.055]],["t/105",[630,2.583]],["t/107",[12,0.964,17,1.816,47,2.704,60,1.613,73,1.4,146,2.378,174,3.519,186,2.932,228,0.72,233,1.883,244,1.288,265,2.83,268,2.506,274,3.334,315,2.654,317,2.378,377,2.266,441,2.472,444,2.076,453,2.737,457,2.506,484,2.266,511,3.048,558,3.18,607,1.849,639,2.32,641,2.81,679,2.737,688,3.751,696,2.83,720,2.32,842,3.857,850,2.905,1011,2.932,1024,2.166,1025,2.378,1029,2.932,1030,2.215,1040,2.654,1089,3.048,1092,2.577,1104,2.83,1152,3.519,1204,4.062,1205,4.062,1206,1.919,1207,3.751,1208,4.062,1209,2.737,1210,3.18,1211,3.519,1212,3.519,1213,4.533,1214,3.334,1215,4.062]],["t/109",[12,1.114,84,2.29,115,2.881,228,1.122,364,4.015,371,3.235,640,2.881,641,3.107,689,5.846,850,2.555,855,4.266,860,4.266,1216,7.064]],["t/111",[12,0.599,47,3.154,58,2.411,64,2.613,73,1.007,126,2.529,164,3.082,188,3.224,212,1.946,219,1.585,228,0.73,229,1.809,287,5.667,336,2.541,350,2.869,384,2.541,388,2.197,408,2.776,437,2.063,441,1.536,484,2.298,511,3.091,521,2.411,603,2.541,607,1.875,610,2.246,638,3.224,640,2.631,647,2.298,684,2.353,709,3.224,720,2.353,793,3.804,1025,2.411,1026,2.197,1030,2.246,1092,2.613,1152,3.568,1206,1.946,1209,2.776,1217,5.779,1218,5.007,1219,4.596,1220,4.596,1221,5.007,1222,4.596,1223,4.596,1224,2.973,1225,3.091,1226,3.804,1227,3.568,1228,4.118]],["t/113",[630,2.583]],["t/115",[6,1.055,27,2.893,58,2.592,84,1.602,89,4.089,126,1.677,146,2.592,230,3.085,350,3.085,366,2.53,378,3.836,380,5.612,422,3.467,465,2.66,607,2.016,641,2.174,679,2.984,698,2.984,700,2.414,838,3.836,844,3.197,850,1.788,986,3.197,1026,2.362,1030,2.414,1038,3.323,1066,3.836,1089,3.323,1092,2.809,1200,3.635,1209,4.676,1229,3.635,1230,4.428,1231,4.428,1232,3.635,1233,4.089,1234,4.758,1235,4.428,1236,4.428,1237,4.428,1238,4.428,1239,4.089,1240,4.428,1241,4.089,1242,4.428,1243,3.467,1244,4.089,1245,3.836,1246,4.428,1247,4.089]],["t/117",[12,0.568,47,3.338,68,2.548,71,1.744,88,2.629,91,3.054,115,1.776,202,2.816,212,1.843,228,0.986,251,2.548,336,3.43,341,2.127,350,2.717,377,2.176,397,1.713,434,2.548,437,2.785,441,2.635,481,1.655,607,3.4,610,2.127,670,3.202,677,2.548,678,1.684,679,2.629,720,2.228,1016,3.054,1023,1.684,1025,3.256,1039,3.202,1182,2.406,1206,1.843,1210,3.054,1224,5.606,1225,5.302,1227,4.818,1229,3.202,1248,4.173,1249,3.38,1250,3.202,1251,2.717,1252,3.9,1253,2.816,1254,3.602,1255,3.602,1256,3.602,1257,3.38]],["t/119",[6,1.275,44,2.577,81,3.864,212,3.257,228,1.222,341,2.919,441,1.996,444,2.736,607,2.437,1023,2.976,1024,3.677,1108,4.394,1182,3.302,1188,4.638,1258,4.943,1259,5.974,1260,3.864,1261,5.352,1262,5.352,1263,3.729,1264,4.191,1265,4.191,1266,4.638,1267,4.394,1268,4.394,1269,4.638,1270,4.638]],["t/121",[6,1.055,44,2.132,81,3.197,84,1.602,126,1.677,228,1.324,254,2.47,295,2.53,341,2.414,384,2.731,437,2.218,441,2.267,465,2.66,577,2.809,633,3.467,720,2.53,1023,2.996,1038,3.323,1064,5.265,1104,3.085,1158,3.467,1182,3.749,1186,3.197,1188,3.836,1210,3.467,1233,4.089,1234,3.467,1261,4.428,1263,3.085,1269,3.836,1271,6.077,1272,6.782,1273,6.938,1274,4.428,1275,4.428,1276,4.942,1277,4.428,1278,4.428,1279,4.428,1280,4.942,1281,4.089,1282,4.428]],["t/123",[99,4.272,295,3.503,337,4.427,390,3.783,465,3.683,1001,5.034,1064,6.506,1158,4.801,1209,5.061,1258,5.663,1260,4.427,1263,4.272,1283,6.132,1284,6.844,1285,6.844]],["t/125",[12,1.169,17,1.936,19,2.535,22,2.747,50,3.126,51,3.752,73,1.464,76,1.693,84,1.566,97,3.555,98,1.902,126,1.64,142,2.918,151,2.361,164,2.309,170,3.249,219,1.666,284,2.601,297,2.361,323,2.474,394,4.33,397,1.902,405,3.999,422,3.39,426,3.249,429,3.126,465,2.601,475,3.39,477,3.249,633,3.39,656,3.999,666,3.999,675,3.999,700,2.361,731,3.39,800,3.555,925,3.39,942,3.39,949,4.33,993,3.752,1022,3.555,1165,4.33,1209,2.918,1226,3.999,1232,3.555,1274,4.33,1286,4.833,1287,4.833,1288,4.833,1289,4.833,1290,4.833]],["t/127",[630,2.583]],["t/129",[244,2.098,441,2.467,702,5.73,844,4.775,854,4.195,1103,5.429,1209,4.457,1291,7.381,1292,6.613,1293,6.108]],["t/131",[23,5.001,74,1.47,221,3.56,345,4.021,371,2.95,404,5.772,494,4.519,601,4.167,663,4.167,678,2.492,842,3.89,920,4.331,1209,3.89,1292,5.772,1293,6.68,1294,6.441,1295,6.441,1296,4.519,1297,4.331,1298,6.441,1299,5.772,1300,6.441]],["t/133",[630,2.583]],["t/135",[12,1.128,22,2.053,33,1.558,34,2.292,60,2.568,73,1.424,74,2.056,98,2.84,126,1.226,137,3.237,180,1.944,199,3.17,219,1.867,221,2.993,222,2.336,228,0.574,244,1.539,295,1.849,324,2.989,358,1.473,359,3.503,429,2.337,488,3.802,506,1.849,509,1.654,518,1.895,519,1.849,520,1.765,612,2.657,614,2.989,731,2.534,844,3.503,853,3.237,1040,2.114,1041,2.255,1042,2.337,1044,1.895,1045,2.429,1046,2.429,1047,2.534,1048,2.114,1049,2.114,1054,2.429,1081,2.804,1098,3.798,1119,2.989,1251,3.38,1253,2.337,1260,2.337,1301,2.255,1302,3.612,1303,3.612,1304,3.798,1305,3.612,1306,3.612,1307,2.804,1308,2.657,1309,3.612,1310,3.612,1311,3.612,1312,3.612,1313,3.612,1314,3.612,1315,3.612,1316,2.989,1317,3.612]],["t/137",[12,1.028,33,1.878,34,1.843,60,1.549,74,2.035,76,1.525,78,2.717,93,3.9,98,1.713,219,1.501,222,2.678,228,0.691,244,2.369,254,2.176,256,5.32,267,3.38,268,2.406,284,2.343,288,1.953,358,1.776,402,2.474,484,2.176,488,4.234,492,3.9,506,2.228,509,1.994,511,2.927,518,2.284,519,2.228,520,2.127,599,3.9,674,2.629,696,2.717,859,2.927,1041,2.717,1042,2.816,1044,3.794,1046,4.173,1048,2.548,1049,2.548,1054,2.927,1092,2.474,1187,3.602,1211,3.38,1214,3.202,1301,2.717,1318,5.561,1319,4.353,1320,4.353,1321,4.353]],["t/139",[12,1.02,28,1.389,34,1.572,47,2.34,73,1.212,74,1.991,98,2.176,146,1.948,174,2.883,186,2.403,219,1.281,222,2.385,228,0.878,229,1.462,233,1.543,244,1.877,265,2.319,268,2.053,315,2.174,317,1.948,358,1.515,377,1.857,453,2.243,484,1.857,488,3.866,506,1.901,509,1.701,511,2.497,518,1.948,519,1.901,520,1.815,521,1.948,558,2.605,607,1.515,640,1.515,641,3.218,688,3.073,696,2.319,720,1.901,850,2.966,1011,2.403,1025,1.948,1029,2.403,1030,1.815,1040,3.866,1041,2.319,1042,2.403,1045,2.497,1047,3.878,1048,2.174,1049,2.174,1054,2.497,1089,2.497,1092,2.111,1100,2.605,1152,2.883,1204,3.328,1205,3.328,1206,1.572,1207,3.073,1208,3.328,1214,2.732,1308,2.732,1316,3.073,1322,3.714,1323,3.328,1324,3.714]],["t/141",[12,1.047,34,2.243,60,2.857,71,2.123,73,1.162,84,1.718,98,2.086,102,2.78,115,2.162,126,2.414,195,3.012,229,2.086,335,3.429,364,3.012,371,2.427,577,3.012,624,2.929,640,2.901,641,3.129,647,4.013,696,3.309,850,2.904,855,3.201,860,4.295,1011,3.429,1040,3.102,1076,3.898,1100,3.718,1211,4.115,1214,3.898,1325,5.3,1326,5.3,1327,5.3]],["t/143",[6,0.698,12,0.797,73,0.717,74,2.199,199,2.94,219,1.128,222,2.167,228,0.519,229,1.287,233,1.359,244,1.427,351,1.975,358,3.185,376,3.033,488,4.571,506,1.674,509,1.498,518,1.716,519,1.674,520,2.454,521,1.716,610,1.598,642,1.915,647,1.635,696,2.042,850,2.825,965,2.707,998,1.859,1005,2.931,1018,2.707,1040,2.94,1044,2.635,1045,2.199,1046,3.377,1047,3.523,1048,1.915,1049,1.915,1054,2.199,1080,2.199,1081,2.539,1308,2.406,1316,2.707,1323,2.931,1328,2.931,1329,3.271,1330,3.271,1331,2.539,1332,2.931,1333,2.931,1334,2.539,1335,3.271,1336,3.271,1337,3.271,1338,3.271,1339,3.271,1340,3.271,1341,2.931,1342,3.271,1343,3.271,1344,2.931,1345,2.931,1346,2.931,1347,3.271,1348,3.271,1349,3.271,1350,3.271,1351,5.022,1352,3.271,1353,6.113,1354,3.271,1355,2.931,1356,3.271,1357,3.271,1358,3.271,1359,3.271]],["t/145",[630,2.583]],["t/147",[12,0.779,28,2.234,44,2.577,73,1.309,126,2.028,228,1.222,279,3.864,377,2.986,408,3.607,437,2.681,481,2.272,607,2.437,678,2.311,1023,2.976,1024,2.855,1026,2.855,1030,2.919,1035,3.729,1091,4.017,1186,3.864,1206,2.529,1221,4.638,1248,5.174,1264,4.191,1265,4.191,1360,4.638,1361,5.974,1362,5.974]],["t/149",[6,1.575,212,3.124,219,2.545,228,1.172,266,6.613,571,5.73,1031,6.613,1044,4.602,1363,6.613]],["t/151",[12,0.793,44,3.359,219,2.684,244,1.729,254,3.042,261,3.561,285,2.354,288,2.73,642,3.561,1025,3.192,1044,3.192,1080,4.091,1104,3.798,1115,5.035,1156,5.451,1172,4.475,1251,3.798,1318,5.451,1364,6.084,1365,5.035,1366,5.035,1367,7.785,1368,5.451,1369,5.451,1370,5.035,1371,6.084]],["t/153",[12,0.697,28,1.998,32,3.93,60,1.902,118,3.227,143,4.421,198,2.803,212,3.412,228,1.28,244,2.291,254,2.671,285,2.766,870,3.748,880,4.808,1001,3.93,1044,4.228,1080,3.592,1115,4.421,1117,4.148,1118,6.407,1119,5.917,1363,7.222,1370,4.421,1372,7.151,1373,4.787,1374,6.407,1375,6.407]],["t/155",[244,2.098,265,4.608,285,2.855,607,3.011,776,4.608,929,6.613,1016,5.178,1038,4.963,1376,7.381,1377,7.381]],["t/157",[19,3.413,29,3.698,126,2.208,219,2.243,244,1.849,279,4.208,323,3.33,345,4.061,437,2.919,481,2.474,607,2.654,642,3.808,648,4.563,676,4.374,678,2.516,920,4.374,1084,4.061,1159,4.785,1160,5.383,1169,5.829,1186,4.208,1206,2.754]],["t/159",[630,2.583]],["t/161",[1,1.122,12,0.234,15,1.162,18,0.943,19,1.617,27,1.052,28,0.672,30,3.141,34,0.761,39,1.61,58,0.943,71,2.781,74,1.642,84,1.311,91,1.261,107,1.395,122,1.61,124,1.162,132,1.61,144,1.322,165,1.61,167,1.322,186,1.162,191,1.395,196,2.761,200,1.993,209,1.61,222,0.775,228,0.285,231,1.261,234,2.162,236,1.395,237,2.266,242,3.141,243,0.993,247,1.322,249,1.085,251,1.052,255,1.487,259,1.208,269,1.61,272,2.162,273,1.322,280,1.162,288,1.383,306,1.395,309,1.322,318,1.61,323,0.92,326,1.804,332,4.465,341,0.878,358,2.201,362,2.761,384,0.993,385,1.261,390,0.993,391,1.487,398,2.72,418,1.052,452,1.021,476,1.61,481,0.683,506,0.92,515,1.322,519,0.92,521,0.943,557,1.487,558,1.261,565,2.761,598,1.085,602,1.322,610,1.506,648,1.261,651,1.61,667,1.395,683,2.55,746,3.348,837,1.487,842,1.861,850,0.65,855,1.085,858,1.61,897,4.297,898,1.61,909,1.61,917,1.61,933,1.61,937,1.487,941,3.625,962,1.61,965,1.487,1006,1.395,1019,1.61,1053,1.208,1066,1.395,1076,1.322,1092,1.021,1158,1.261,1191,2.266,1250,1.322,1251,1.122,1283,3.625,1328,1.61,1331,1.395,1334,1.395,1355,1.61,1373,1.61,1378,1.797,1379,1.61,1380,1.797,1381,1.797,1382,1.797,1383,1.797,1384,1.797,1385,3.081,1386,5.396,1387,1.797,1388,1.797,1389,1.797,1390,2.392,1391,6.643,1392,1.797,1393,1.797,1394,1.797,1395,3.081,1396,1.797,1397,4.045,1398,1.797,1399,1.797,1400,4.045,1401,1.797,1402,1.797,1403,1.797,1404,1.797,1405,1.797,1406,1.797,1407,1.797,1408,1.797,1409,1.797,1410,1.797,1411,3.081,1412,1.797,1413,1.797,1414,1.797,1415,1.797,1416,1.797,1417,1.797,1418,1.797,1419,1.797,1420,1.797,1421,1.797,1422,1.61,1423,1.797,1424,1.797,1425,1.797,1426,1.797,1427,1.797,1428,1.797,1429,1.797,1430,1.797,1431,1.797,1432,1.797,1433,1.797,1434,4.045,1435,1.797,1436,3.081,1437,1.797,1438,1.797,1439,4.045,1440,1.797,1441,1.797,1442,1.797,1443,1.797,1444,1.797,1445,1.797,1446,3.081,1447,1.797,1448,1.797,1449,1.797,1450,1.797,1451,1.797,1452,1.797,1453,1.797,1454,1.797,1455,1.61,1456,1.797,1457,1.797,1458,1.797,1459,1.797,1460,1.797,1461,1.797,1462,1.797,1463,1.797,1464,1.797,1465,1.797,1466,1.797,1467,1.797,1468,1.797,1469,1.797,1470,1.797,1471,1.487,1472,1.61,1473,1.487,1474,1.61,1475,1.61]],["t/163",[12,0.604,28,2.423,34,1.959,57,3.404,74,2.071,156,4.547,189,2.262,204,2.12,222,1.997,228,0.735,243,2.558,244,1.315,249,2.795,288,2.077,358,3.051,433,3.594,452,2.631,478,3.83,498,2.994,506,2.369,515,3.404,519,2.369,521,2.428,603,2.558,704,3.112,850,1.674,998,2.631,999,3.404,1053,3.112,1092,2.631,1331,3.594,1332,4.147,1333,4.147,1334,3.594,1345,4.147,1346,4.147,1365,3.83,1471,3.83,1472,4.147,1473,3.83,1474,4.147,1475,4.147,1476,4.629,1477,4.629,1478,3.594,1479,4.629,1480,4.629,1481,4.629,1482,4.629,1483,4.629,1484,6.481,1485,4.629]],["t/165",[7,2.491,12,0.813,28,1.638,34,1.855,37,3.402,55,3.117,73,0.96,74,1.982,126,1.487,138,2.05,189,2.141,190,2.299,219,1.511,222,1.891,228,0.696,249,2.646,251,2.565,323,2.243,358,2.961,402,2.491,432,2.094,506,2.243,515,3.223,518,2.299,521,2.299,648,3.074,704,5.318,850,1.585,921,2.946,992,3.402,999,5.339,1018,3.626,1040,2.565,1053,2.946,1092,2.491,1172,5.339,1226,3.626,1251,2.736,1307,3.402,1331,3.402,1334,3.402,1379,3.926,1471,3.626,1473,3.626,1486,3.926,1487,4.382,1488,4.382,1489,4.382,1490,4.382,1491,4.382,1492,4.382,1493,4.382,1494,4.382,1495,4.382,1496,4.382]],["t/167",[630,2.583]],["t/169",[12,0.808,47,3.666,74,1.798,76,2.171,228,1.251,434,3.629,441,2.072,601,4.01,610,3.029,720,3.173,1023,3.048,1024,2.962,1025,3.252,1108,4.559,1186,4.01,1257,4.812,1264,4.349,1265,4.349,1267,4.559,1268,4.559,1270,4.812,1497,4.812]],["t/171",[204,3.625,233,3.288,1212,6.144,1498,7.914]],["t/173",[6,1.561,28,1.661,29,2.524,129,3.078,212,2.665,228,1.264,229,1.748,441,1.484,444,2.034,603,2.455,607,1.812,889,3.448,1023,2.829,1024,2.122,1026,4.287,1035,2.772,1075,3.93,1186,4.073,1206,3.096,1264,3.116,1265,4.416,1266,4.888,1499,6.951,1500,4.441,1501,6.295,1502,4.441,1503,4.416,1504,7.313,1505,7.313,1506,6.052,1507,4.441,1508,7.313]],["t/175",[6,0.735,28,1.287,29,2.968,44,1.485,71,1.379,84,1.116,88,2.079,98,2.055,106,2.672,228,0.829,235,2.079,252,3.084,284,1.852,384,3.487,387,2.672,402,1.956,403,2.848,408,4.999,418,2.015,424,2.149,441,1.15,444,2.391,470,3.084,480,2.848,607,1.404,635,3.487,658,3.084,661,4.081,698,2.079,700,1.682,706,2.848,760,3.084,873,4.321,889,2.672,993,2.672,1023,2.02,1026,4.075,1095,2.672,1145,2.61,1175,4.321,1186,5.355,1301,2.149,1486,3.084,1499,6.263,1503,3.663,1506,4.321,1509,7.417,1510,3.442,1511,3.442,1512,3.442,1513,5.221,1514,3.442,1515,3.084,1516,3.442,1517,3.442,1518,4.321,1519,5.221,1520,3.084,1521,6.308,1522,3.442,1523,3.442,1524,3.442]],["t/177",[12,0.84,29,3.661,76,2.256,129,2.492,202,4.167,212,2.727,228,1.023,434,3.771,471,3.661,640,2.628,662,5.772,948,5.33,1026,3.078,1108,4.738,1263,4.021,1266,5.001,1267,4.738,1268,4.738,1270,5.001,1497,5.001,1499,5.33,1503,4.519,1509,5.772]],["t/179",[630,2.583]],["t/181",[6,1.039,12,1.08,35,2.691,42,2.767,63,2.327,73,1.684,76,2.351,81,3.149,84,1.578,105,3.415,244,1.384,245,3.78,254,2.434,288,2.185,297,2.379,330,2.691,348,3.581,366,2.492,398,3.273,408,2.94,422,3.415,465,2.62,475,3.415,498,3.149,661,4.343,677,2.85,695,3.039,700,2.379,859,5.166,885,5.39,942,4.709,1024,2.327,1063,4.362,1064,3.78,1145,2.434,1186,3.149,1209,4.054,1234,4.709,1263,3.039,1390,3.78,1525,4.362,1526,4.868]],["t/184",[12,0.898,44,2.972,63,2.416,73,1.51,76,2.413,84,1.639,151,2.47,180,2.721,212,2.14,228,0.803,295,2.588,297,2.47,330,2.794,348,3.718,364,2.874,390,2.794,392,3.718,408,3.053,418,2.959,444,3.155,457,3.808,465,2.721,498,3.27,695,3.156,718,3.718,850,1.829,859,3.399,921,3.399,930,4.184,1022,3.718,1023,2.665,1024,4.021,1026,2.416,1143,3.718,1145,3.444,1263,3.156,1525,4.53,1527,4.53,1528,3.925,1529,4.184]],["t/186",[6,1.39,7,2.65,44,2.81,53,2.91,111,3.857,115,1.901,126,1.582,129,1.803,151,2.278,162,3.857,170,4.38,212,1.973,229,1.835,244,1.851,254,3.256,285,1.803,288,2.923,341,2.278,388,2.228,392,3.429,437,2.092,444,2.135,471,2.65,638,3.27,677,2.729,695,2.91,696,2.91,700,2.278,709,3.27,747,3.857,859,4.38,921,3.134,1023,1.803,1024,2.228,1062,4.177,1091,4.38,1143,3.429,1145,2.33,1209,4.534,1234,3.27,1248,5.048,1271,4.177,1273,4.177,1360,5.057,1528,3.619,1529,3.857,1530,4.661,1531,4.177,1532,4.177]],["t/188",[6,1.418,12,1.073,19,2.517,33,2.07,35,2.652,43,3.725,44,2.07,71,1.922,73,1.671,76,2.328,84,2.154,98,1.888,212,2.031,213,3.529,244,1.363,254,2.398,272,3.365,317,2.517,321,3.365,330,2.652,364,2.727,366,3.903,374,3.725,376,2.897,388,2.293,390,2.652,641,2.11,650,3.725,661,4.932,846,3.529,879,3.226,885,3.365,1084,2.995,1143,3.529,1145,2.398,1158,3.365,1247,3.97,1528,3.725,1529,3.97,1533,4.797,1534,4.797,1535,4.299,1536,4.797,1537,4.797,1538,4.797,1539,4.797]],["t/190",[6,1.199,42,4.696,76,1.967,115,2.291,151,2.744,249,3.392,330,3.105,384,3.105,385,6.159,388,2.684,390,3.105,444,2.572,465,3.023,471,3.193,577,3.193,624,3.105,638,3.94,695,3.506,700,2.744,1024,2.684,1084,3.506,1104,3.506,1145,2.808,1422,6.623,1540,5.617,1541,8.262,1542,4.361,1543,5.617,1544,5.617,1545,5.617]],["t/192",[12,0.732,42,4.202,73,1.231,76,2.589,78,3.506,84,1.821,115,2.291,204,2.572,330,4.086,364,3.193,366,2.875,371,2.572,444,2.572,457,4.086,471,3.193,689,4.648,695,3.506,696,3.506,850,2.032,1011,3.633,1023,3.196,1024,3.532,1091,3.777,1104,3.506,1145,2.808,1248,4.97,1360,4.361,1531,5.033,1532,5.033,1546,4.361]],["t/194",[6,1.23,12,0.98,42,4.274,73,1.648,76,2.019,330,3.186,366,2.951,371,2.64,372,3.729,376,3.481,444,2.64,471,3.276,499,3.102,635,3.186,661,4.864,674,5.053,842,3.481,850,2.085,880,3.876,1023,2.23,1024,3.593,1091,3.876,1145,2.882,1506,4.77,1547,5.764,1548,5.165,1549,5.165,1550,5.165]],["t/196",[82,4.884,119,4.56,451,5.553,452,4.292,624,4.173,850,2.731,1551,6.765,1552,7.55]],["t/198",[630,2.583]],["t/200",[6,1.416,12,0.865,73,1.455,230,4.143,235,5.396,289,5.152,372,4.293,373,5.492,441,2.218,457,3.668,774,4.881,844,4.293,1091,4.462,1224,4.293,1241,5.492,1478,6.384,1553,6.636]],["t/202",[235,4.897,441,2.71]],["t/204",[12,0.963,73,1.618,228,1.172,235,5.297,441,2.467,1224,4.775,1225,4.963,1554,7.381,1555,7.381]],["t/206",[28,1.862,44,2.148,47,3.291,74,1.774,75,3.669,88,3.007,126,2.314,235,4.117,326,3.991,372,4.41,373,5.642,377,2.489,481,2.592,603,2.752,610,2.433,639,3.49,663,3.221,693,4.461,720,2.549,774,3.662,854,2.83,1025,2.612,1026,3.715,1035,3.108,1159,3.662,1293,4.12,1297,3.348,1556,4.979,1557,4.461,1558,4.979,1559,4.979,1560,4.979,1561,4.979,1562,4.979,1563,4.979,1564,4.979,1565,6.817,1566,4.979]],["t/208",[12,0.546,47,3.279,68,2.451,71,1.677,74,0.955,75,2.253,88,2.528,91,2.937,129,2.335,202,2.708,212,1.772,228,0.958,251,2.451,288,1.879,336,3.336,341,2.046,350,3.768,397,1.648,434,2.451,437,2.709,441,2.589,481,1.592,607,3.16,610,2.046,678,1.62,679,2.528,696,2.614,720,2.143,1016,2.937,1023,1.62,1025,3.166,1039,3.079,1182,2.314,1200,3.079,1206,1.772,1210,2.937,1221,3.251,1224,5.533,1225,4.759,1227,4.686,1229,3.079,1248,4.058,1249,3.251,1252,3.751,1253,2.708,1254,3.465,1255,3.465,1256,3.465,1257,3.251,1567,4.187,1568,6.036,1569,4.187,1570,4.187]],["t/210",[630,2.583]],["t/212",[27,3.595,71,3.138,284,4.215,677,3.595,720,3.143,854,3.49,1006,4.768,1025,3.222,1059,5.082,1104,3.834,1158,4.308,1183,5.082,1243,4.308,1253,3.973,1263,3.834,1557,5.502,1571,7.832,1572,6.141,1573,6.141,1574,7.832,1575,6.141,1576,6.141,1577,6.141,1578,6.141]],["t/214",[47,3.023,84,2.315,126,2.424,129,2.762,250,5.909,437,3.204,1023,2.762,1182,3.947,1224,5.563,1225,4.801,1503,5.009,1579,5.909]],["t/217",[6,0.341,18,0.839,47,1.18,74,2.069,91,1.123,102,0.839,115,0.653,126,0.543,189,0.782,228,0.704,251,0.937,281,1.177,288,0.718,295,0.819,336,0.884,341,1.362,371,0.733,377,1.394,384,0.884,385,1.123,387,1.242,418,3.472,437,1.251,441,1.238,444,0.733,471,0.91,499,1.5,520,1.362,556,3.26,602,1.177,607,0.653,610,0.782,640,0.653,661,1.803,671,1.324,698,1.683,700,1.362,730,1.324,732,1.434,746,1.324,753,2.498,816,1.242,842,0.966,854,0.91,880,1.076,887,3.668,1023,2.826,1025,0.839,1089,2.98,1104,0.999,1105,2.164,1145,0.8,1182,2.047,1206,0.677,1221,1.242,1224,4.265,1225,1.076,1243,4.625,1248,1.076,1249,1.242,1270,2.164,1282,2.498,1344,1.434,1360,3.441,1478,1.242,1503,1.123,1548,5.633,1551,1.434,1579,5.456,1580,3.065,1581,4.909,1582,1.6,1583,4.432,1584,1.6,1585,1.434,1586,1.6,1587,1.6,1588,1.6,1589,1.6,1590,1.6,1591,1.6,1592,1.434,1593,1.434,1594,1.6,1595,1.324,1596,2.788,1597,1.6,1598,1.6,1599,1.6,1600,1.6,1601,1.6,1602,1.6,1603,2.788,1604,2.788,1605,2.788,1606,1.6,1607,1.6,1608,1.6,1609,1.324,1610,1.6,1611,1.6,1612,1.6,1613,1.6,1614,1.6,1615,1.6,1616,1.6,1617,1.6,1618,1.6,1619,1.6,1620,2.788,1621,5.025,1622,2.788,1623,1.6,1624,1.6,1625,1.6,1626,1.123,1627,1.6,1628,2.788,1629,1.6,1630,1.177,1631,3.319,1632,2.788,1633,3.704,1634,4.432,1635,2.788,1636,2.788,1637,4.432,1638,4.432,1639,4.432,1640,7.305,1641,5.517,1642,2.788,1643,2.788,1644,3.704,1645,1.6,1646,5.517,1647,1.6,1648,1.6,1649,1.6,1650,1.6,1651,1.6,1652,1.6,1653,1.6,1654,1.6,1655,1.6,1656,1.6,1657,1.6,1658,1.6,1659,1.6,1660,1.6,1661,1.6,1662,1.434,1663,1.434,1664,1.6,1665,1.6,1666,1.6,1667,1.324]],["t/219",[630,2.583]],["t/221",[6,0.941,7,2.507,12,1.034,13,2.754,14,2.438,15,4.714,16,3.425,17,2.919,18,2.314,19,2.314,20,3.953,21,3.953,22,2.507,23,4.864,24,5.111,25,2.556,28,1.649,58,2.314,61,3.095,64,3.561,74,1.007,81,2.854,119,2.664,138,2.93,145,3.651,146,3.287,154,3.425,160,2.02,163,3.651,164,2.108,186,2.854,244,1.254,254,2.205,258,3.245,323,2.258,478,3.651,640,2.556,660,3.095,684,2.258,685,3.953,686,3.953,698,2.664,776,2.754,845,3.425,862,3.651,863,3.953,1197,3.953,1212,3.425,1365,3.651,1515,3.953,1668,3.953,1669,3.651,1670,4.411,1671,3.953,1672,4.411]],["t/223",[6,0.742,11,2.339,12,1.142,13,2.171,14,1.923,17,3.046,18,1.825,24,3.692,25,2.888,28,1.968,29,2.992,50,2.25,53,3.286,55,1.739,59,2.558,60,1.873,63,1.662,73,1.154,76,2.663,83,3.117,84,1.128,103,2.701,117,3.539,119,4.275,126,1.181,151,1.7,167,3.871,176,2.462,182,2.878,189,2.572,190,2.761,193,2.44,195,1.977,198,1.825,204,3.242,205,2.878,206,2.701,219,1.199,230,2.171,233,2.638,236,2.701,240,3.034,241,3.539,244,1.496,279,2.25,284,2.833,285,2.738,286,3.117,287,3.692,441,1.162,545,5.689,610,1.7,721,3.117,1193,3.871,1217,3.117,1673,3.478,1674,3.871,1675,2.878,1676,3.478]],["t/226",[71,3.133,1023,3.025,1188,6.071,1677,7.82,1678,7.82]],["t/228",[6,1.411,12,1.07,13,2.973,14,2.633,15,3.081,24,3.341,50,3.081,55,2.381,59,3.503,60,2.703,74,2.088,84,1.544,118,2.876,140,3.202,186,4.277,190,2.499,202,3.081,203,3.698,241,3.202,244,2.158,254,2.381,277,4.446,285,2.558,288,2.137,317,2.499,341,2.327,422,3.341,453,2.876,639,2.438,640,3.347,660,3.341,939,3.503,1022,3.503,1029,3.081,1191,3.503,1671,4.267,1679,4.763,1680,4.763,1681,3.698]],["t/230",[630,2.583]],["t/232",[6,1.527,44,1.841,74,2.023,98,1.68,102,2.239,152,3.824,173,4.042,180,2.297,228,0.678,229,1.68,246,2.239,285,1.651,337,4.628,351,2.578,371,1.955,376,2.578,481,2.721,603,3.954,639,2.185,678,2.367,684,2.185,727,3.314,850,1.544,880,5.563,998,3.479,1026,2.04,1030,2.086,1035,4.466,1174,3.824,1296,2.994,1674,4.501,1675,3.532,1682,4.268,1683,3.824,1684,4.268,1685,3.824,1686,3.824,1687,3.824,1688,4.268,1689,4.268,1690,4.268,1691,4.268,1692,4.268,1693,4.268,1694,4.268,1695,4.268,1696,3.824,1697,4.268]],["t/234",[6,1.467,12,1.02,17,1.317,25,2.501,29,1.868,44,1.418,53,2.052,55,1.643,56,2.21,58,1.725,73,1.105,74,1.966,76,2.148,77,2.418,84,1.634,98,1.294,135,2.127,140,2.21,160,2.309,198,1.725,212,1.391,219,1.738,222,2.645,228,0.522,229,2.414,233,1.366,242,2.552,244,2.315,274,2.418,283,2.052,285,1.95,322,2.127,326,1.924,345,2.052,346,2.21,358,2.056,385,2.306,406,2.21,408,1.985,441,1.099,455,2.21,457,1.817,461,2.418,463,2.945,498,2.127,506,1.683,509,2.309,512,2.052,518,1.725,519,1.683,520,2.463,633,2.306,642,1.924,643,2.72,674,1.985,711,2.72,757,2.72,842,1.985,850,1.189,870,2.306,1036,2.945,1041,2.052,1042,2.127,1045,2.21,1048,1.924,1049,1.924,1075,2.052,1076,2.418,1077,2.72,1078,2.72,1079,2.72,1084,2.052,1698,3.287,1699,5.041,1700,3.287,1701,3.287,1702,3.287,1703,3.287,1704,3.287,1705,3.287,1706,3.287,1707,3.287]],["t/236",[630,2.583]],["t/238",[12,0.801,73,1.346,126,2.658,190,4.765,228,1.244,335,3.973,434,3.595,474,3.973,577,3.49,653,3.973,1026,2.935,1029,5.066,1030,3,1253,3.973,1260,3.973,1527,5.502,1708,5.082,1709,6.481,1710,5.502,1711,4.308,1712,5.082]],["t/241",[6,1.096,12,0.67,27,3.006,44,3.003,64,2.918,71,2.057,73,1.125,84,1.664,105,3.602,160,3.879,180,2.763,190,2.694,239,3.986,315,3.006,320,3.602,335,3.321,432,2.454,474,3.321,475,3.602,562,3.776,630,1.615,700,2.509,705,3.776,757,4.249,792,3.986,920,3.452,986,3.321,1039,3.776,1070,4.249,1105,3.986,1232,3.776,1258,4.249,1260,5.11,1263,3.205,1304,3.602,1681,3.986,1709,4.249,1710,4.601,1713,4.249,1714,6.962,1715,6.962]],["t/243",[6,1.009,12,0.617,24,3.317,27,2.768,29,2.688,44,2.838,64,2.688,71,1.894,73,1.036,75,2.545,84,1.533,160,3.013,180,2.545,190,3.969,315,2.768,335,3.059,432,2.26,434,2.768,455,3.179,474,4.894,475,3.317,521,2.481,630,2.069,700,2.31,762,3.913,792,3.671,800,4.839,876,3.671,986,4.894,1023,1.829,1070,3.913,1084,2.952,1145,2.364,1253,3.059,1260,3.059,1263,2.952,1297,3.179,1304,3.317,1668,4.237,1681,5.108,1711,4.615,1712,3.913,1716,3.913,1717,4.728,1718,4.237,1719,3.913,1720,4.728,1721,3.913]],["t/245",[6,1.298,44,2.625,228,0.966,297,2.973,382,4.268,434,3.561,444,2.787,629,5.462,635,3.363,653,3.936,882,4.723,1023,3.012,1024,2.908,1100,4.268,1164,5.035,1711,6.023,1712,5.035,1716,5.035,1721,6.443,1722,6.084,1723,5.451,1724,6.084,1725,6.084,1726,6.084]],["t/247",[6,1.614,44,2.509,84,1.885,105,4.079,136,4.277,160,3.849,188,4.079,297,3.695,460,4.812,474,3.762,475,5.305,630,1.829,700,2.841,844,3.762,986,4.892,1250,4.277,1260,4.892,1297,3.91,1304,5.305,1681,4.515,1709,4.812,1711,4.079,1718,5.21,1719,4.812,1727,5.815,1728,5.815]],["t/249",[12,0.867,26,2.995,53,2.995,56,3.226,68,2.808,71,1.922,73,1.052,99,2.995,117,3.226,135,3.104,160,2.197,168,3.365,190,3.486,249,2.897,297,2.344,323,2.456,335,3.104,341,2.344,424,2.995,432,2.293,444,2.197,474,4.299,562,3.529,579,4.888,635,2.652,648,3.365,653,3.104,675,3.97,683,3.97,772,3.97,842,2.897,940,3.725,1023,2.571,1093,5.954,1100,3.365,1117,3.725,1164,3.97,1260,4.299,1304,4.662,1708,3.97,1711,5.348,1721,3.97,1729,4.797,1730,4.797,1731,3.97,1732,4.797,1733,4.797,1734,4.299]],["t/251",[6,0.479,11,2.499,12,0.954,17,1.489,25,1.516,34,0.95,53,1.401,60,1.323,74,2.15,102,1.177,160,1.028,176,1.05,177,3.33,189,1.097,219,0.774,221,1.241,222,1.604,228,0.59,243,1.241,244,1.742,274,2.734,279,1.452,285,0.868,288,1.007,297,1.816,333,2,345,1.401,358,1.516,388,2.643,397,0.883,432,3.343,441,1.59,455,2.499,457,1.241,468,1.651,471,1.276,484,1.122,486,1.742,506,1.149,507,2.011,509,2.179,510,2.011,512,1.401,515,1.651,518,1.177,519,1.149,520,1.097,521,1.177,598,2.245,607,0.915,626,1.857,632,1.509,639,1.149,642,2.785,674,1.355,690,1.742,691,1.857,704,2.499,705,3.499,731,1.574,754,1.857,776,2.97,816,1.742,854,1.276,1040,1.314,1044,1.177,1046,1.509,1047,1.574,1048,1.314,1049,1.314,1075,1.401,1076,1.651,1077,1.857,1078,1.857,1079,1.857,1080,1.509,1092,1.276,1099,2.011,1100,1.574,1101,3.076,1103,1.651,1107,1.742,1200,1.651,1228,2.011,1301,1.401,1307,1.742,1341,2.011,1390,2.886,1546,1.742,1626,5.753,1630,1.651,1687,2.011,1713,1.857,1735,1.857,1736,2.244,1737,4.757,1738,2.244,1739,3.717,1740,2.244,1741,2.244,1742,2.244,1743,2.244,1744,2.244,1745,2.244,1746,2.244,1747,2.244,1748,2.244,1749,2.244,1750,2.244,1751,2.244,1752,2.244,1753,2.244,1754,2.244,1755,3.717,1756,3.717,1757,3.717,1758,3.717,1759,3.717,1760,2.244,1761,4.757,1762,2.244,1763,2.244]],["t/253",[630,2.583]],["t/255",[6,1.541,42,4.103,73,1.582,117,4.854,233,2.999,246,3.787,251,4.226,263,4.854,401,5.605,1160,5.974,1518,5.974,1764,7.219]],["t/257",[6,1.713,7,4.043,12,0.691,16,4.115,68,3.102,78,3.309,82,4.601,117,3.564,129,2.05,213,3.898,244,1.506,285,2.05,441,1.771,444,2.427,453,3.201,624,2.929,1023,3.461,1281,4.386,1580,4.386,1581,4.386,1765,5.3,1766,4.749,1767,5.3,1768,4.749,1769,6.373,1770,6.373,1771,6.373,1772,4.749,1773,5.3,1774,6.373,1775,5.3,1776,4.386,1777,5.3]],["t/259",[6,1.555,7,3.561,12,0.575,44,2.703,68,2.582,71,1.767,73,0.967,81,2.854,102,2.314,129,1.706,212,3.084,213,3.245,441,1.474,444,2.02,558,3.095,661,2.854,679,2.664,700,2.155,1023,3.651,1250,3.245,1262,5.614,1264,3.095,1265,3.095,1266,4.864,1267,3.245,1268,3.245,1497,3.425,1580,3.651,1581,3.651,1768,3.953,1769,5.614,1770,7.507,1771,3.953,1772,5.614,1776,3.651,1778,4.411,1779,4.411,1780,4.411,1781,4.411,1782,4.411,1783,4.411,1784,4.411,1785,4.411,1786,4.411,1787,4.411,1788,4.411,1789,4.411]],["t/261",[6,1.524,7,4.059,68,4.18,188,6.033,190,4.512,441,2.386,671,5.909,772,5.909,879,4.801,1667,5.909,1711,5.009]],["t/263",[5,3.041,6,0.882,22,2.35,47,1.75,68,2.42,71,1.656,82,2.674,102,2.169,115,1.686,127,2.9,129,1.599,146,2.169,150,2.9,199,2.42,202,2.674,234,2.9,263,4.021,280,2.674,294,2.674,323,2.116,358,1.686,371,1.894,434,3.501,598,2.497,629,2.9,640,1.686,648,2.9,653,2.674,661,5.509,674,2.497,700,2.02,755,3.421,940,5.455,1023,2.718,1039,3.041,1095,3.21,1126,3.704,1145,2.067,1175,3.421,1212,3.21,1243,2.9,1245,3.21,1297,2.78,1304,4.196,1550,5.359,1595,3.421,1716,7.048,1719,3.421,1723,5.359,1731,3.421,1774,3.704,1790,5.981,1791,5.981,1792,4.134,1793,4.134,1794,4.134,1795,3.041,1796,4.134,1797,4.134]],["t/265",[630,2.583]],["t/267",[6,0.406,12,0.422,14,1.051,17,0.761,63,0.908,73,0.417,74,2.328,142,3.006,164,0.908,198,0.997,212,1.786,219,1.115,222,0.82,228,0.513,229,1.272,244,0.54,283,1.187,285,0.735,326,1.892,341,1.58,345,3.483,397,0.748,432,2.9,441,1.08,444,0.871,452,1.08,473,1.703,494,1.333,512,1.187,520,0.929,556,3.661,576,1.703,602,1.398,607,0.775,640,0.775,702,3.864,709,1.333,730,1.573,806,2.897,854,1.08,889,1.476,1040,1.113,1044,0.997,1101,1.573,1103,4.103,1161,3.78,1181,2.897,1182,3.084,1210,2.268,1234,2.959,1239,5.357,1243,2.268,1244,1.573,1626,1.333,1631,1.703,1713,1.573,1735,1.573,1766,1.703,1776,1.573,1798,1.901,1799,3.233,1800,1.901,1801,7.107,1802,1.901,1803,5.579,1804,1.901,1805,4.977,1806,1.901,1807,3.233,1808,1.901,1809,1.901,1810,1.901,1811,3.233,1812,4.218,1813,1.901,1814,1.901,1815,1.901,1816,1.901,1817,1.901,1818,1.901,1819,3.233,1820,1.901,1821,1.901,1822,3.233,1823,1.901,1824,1.901,1825,1.901,1826,1.901,1827,1.901,1828,1.901,1829,3.233,1830,1.901,1831,1.901,1832,3.233,1833,3.233,1834,1.901,1835,1.901,1836,1.901,1837,4.218,1838,1.901,1839,1.901,1840,1.901,1841,3.233,1842,3.233,1843,1.901,1844,3.233,1845,1.901,1846,1.901,1847,1.901,1848,1.901]],["t/269",[630,2.583]],["t/271",[6,1.063,12,1.014,28,1.862,47,2.108,73,1.704,74,1.136,129,1.926,212,2.108,228,1.235,246,3.577,341,3.331,440,4.12,444,2.28,481,2.956,607,2.031,635,2.752,639,3.49,678,3.007,714,3.108,1022,3.662,1023,3.007,1024,2.379,1026,2.379,1029,5.029,1030,2.433,1032,4.12,1034,4.12,1143,3.662,1183,4.12,1206,2.108,1211,3.866,1595,4.12,1849,4.461,1850,4.979,1851,4.979,1852,4.979]],["t/273",[12,0.93,25,1.73,55,2.12,60,2.168,74,2.184,180,2.282,219,1.462,222,2.628,228,0.673,240,2.027,244,2.026,312,4.729,358,1.73,412,2.851,488,3.566,506,2.171,509,1.942,518,2.225,519,2.171,520,2.072,1041,2.647,1042,2.743,1044,4.088,1048,2.482,1049,2.482,1054,2.851,1080,2.851,1193,4.48,1308,3.119,1853,3.509,1854,3.509,1855,5.458,1856,3.509,1857,4.729,1858,3.292,1859,4.729,1860,3.292,1861,3.292,1862,3.292,1863,4.241,1864,3.8,1865,3.8,1866,4.241,1867,4.241,1868,4.241,1869,4.241,1870,6.091,1871,4.241,1872,4.241]],["t/276",[74,2.001,219,2.545,228,1.172,384,4.08,674,4.457,1080,4.963,1374,6.613,1375,6.613,1873,7.381]],["t/278",[33,3.184,74,2.001,199,4.321,219,2.545,228,1.172,1017,6.613,1369,6.613,1874,7.381,1875,7.381]],["t/280",[33,3.184,74,2.001,77,5.429,118,4.457,219,2.545,228,1.172,1117,5.73,1370,6.108,1876,7.381]],["t/283",[12,0.621,74,2.211,222,2.852,228,0.756,244,2.158,358,2.697,441,1.592,486,3.698,488,3.87,506,2.438,509,2.181,518,2.499,519,2.438,520,2.327,1041,2.973,1044,3.469,1098,5.328,1108,3.503,1182,2.633,1267,3.503,1268,3.503,1308,3.503,1497,3.698,1853,3.941,1854,3.941,1857,5.896,1858,3.698,1859,3.698,1860,3.698,1861,3.698,1862,3.698,1877,4.763,1878,4.763,1879,4.763,1880,3.941,1881,4.267,1882,4.267,1883,4.267,1884,4.267]],["t/285",[12,0.529,74,2.114,219,1.399,222,2.545,228,1.212,229,1.597,240,1.939,244,1.976,358,2.407,374,3.15,412,2.728,440,3.358,441,2.551,506,2.077,509,1.858,512,2.533,518,2.129,519,2.077,520,1.983,920,3.967,1023,2.282,1024,1.939,1044,2.129,1098,4.877,1182,3.261,1592,3.636,1849,3.636,1853,3.358,1854,3.358,1857,5.398,1858,3.15,1859,3.15,1860,3.15,1861,3.15,1862,3.15,1864,3.636,1865,3.636,1880,3.358,1881,3.636,1882,3.636,1883,3.636,1884,3.636,1885,8.11,1886,3.636,1887,4.058,1888,4.058,1889,4.058,1890,4.058,1891,4.058,1892,4.058,1893,4.058,1894,4.058,1895,4.058]],["t/287",[12,1.144,25,3.011,73,1.618,98,2.905,180,3.972,245,5.73,335,4.775,397,2.905,647,3.69]],["t/289",[6,1.575,12,0.963,25,3.011,56,4.963,60,2.627,74,1.684,221,4.08,228,1.172,1098,5.178,1880,6.108]],["t/291",[12,0.941,25,2.945,55,3.609,60,2.569,74,1.647,160,3.306,228,1.146,288,3.24,647,3.609,1795,5.31,1855,6.468,1856,5.974]],["t/293",[12,0.952,57,5.369,74,1.665,159,5.667,228,1.159,397,2.873,1193,5.369,1535,6.54,1669,6.04,1857,5.667,1858,5.667]],["t/295",[12,0.952,57,5.369,65,4.908,74,1.665,199,4.273,228,1.159,312,5.667,397,2.873,647,3.649,1859,5.667,1860,5.667]],["t/297",[12,0.941,60,2.569,74,1.647,160,3.306,199,4.226,228,1.146,288,3.24,312,5.605,493,5.064,647,3.609,1861,5.605,1862,5.605]],["t/299",[84,2.447,126,2.563,228,1.199,254,3.775,1626,5.297,1896,6.765,1897,6.765,1898,7.55]],["t/301",[12,0.952,50,4.722,228,1.159,377,3.649,397,2.873,921,4.908,922,5.667,1193,6.409,1251,4.557,1899,7.299]],["t/304",[12,1.15,14,3.56,74,1.47,180,3.467,219,2.221,228,1.023,333,3.467,388,3.078,397,2.536,429,4.167,511,4.331,731,4.519,1053,4.331,1092,4.588,1900,6.441,1901,6.441,1902,6.441,1903,6.441,1904,6.441,1905,6.441]],["t/306",[12,0.752,34,3.182,74,2.152,164,2.755,222,3.968,228,0.915,285,2.908,397,2.269,429,3.729,443,4.044,452,3.276,493,4.044,518,3.024,519,2.951,603,3.186,1390,4.475,1906,5.764,1907,5.764,1908,5.764,1909,5.764,1910,5.764,1911,5.764,1912,5.764,1913,5.764]],["t/308",[6,1.159,12,1.06,35,3.002,55,2.715,73,1.19,74,1.854,160,2.488,222,2.343,228,0.862,233,2.256,309,3.995,322,3.513,397,2.138,406,3.652,443,3.81,444,2.488,452,3.087,493,3.81,603,3.002,616,3.995,632,3.652,691,5.982,700,2.654,720,2.78,850,1.965,942,3.81,1006,4.217,1025,2.849,1856,4.494,1914,5.431,1915,5.431,1916,5.431,1917,5.431,1918,5.431,1919,5.431,1920,4.866,1921,5.431]],["t/310",[630,2.583]],["t/312",[74,1.53,126,2.275,228,1.065,246,3.517,388,3.204,481,2.549,610,3.276,678,2.593,727,5.205,937,5.548,998,3.811,1301,5.166,1674,4.931,1922,6.704,1923,6.704,1924,6.704,1925,6.704,1926,6.704]],["t/314",[6,1.087,28,1.905,74,1.58,126,2.996,138,3.68,173,2.489,228,1.1,246,4.631,388,4.53,641,2.241,678,3.415,998,4.472,1182,2.816,1301,4.911,1927,5.095,1928,5.095,1929,6.925,1930,6.925,1931,5.095,1932,5.095,1933,5.095]],["t/316",[6,1.009,12,0.617,26,2.952,28,1.768,44,2.838,73,1.036,151,2.31,158,3.671,173,4.349,204,2.166,228,0.751,246,3.451,284,2.545,295,2.42,297,2.31,315,2.768,337,4.894,376,2.856,522,3.913,577,2.688,603,3.636,607,1.929,610,2.31,624,3.636,630,1.487,635,2.614,727,5.108,850,1.711,998,3.739,1206,2.001,1251,2.952,1296,3.317,1301,2.952,1674,3.478,1675,3.913,1683,6.779,1685,4.237,1686,4.237,1934,4.728,1935,4.728,1936,4.728,1937,4.728,1938,4.728,1939,4.728,1940,4.728]],["t/318",[6,1.416,12,0.865,73,1.455,126,2.253,129,2.567,138,3.104,195,4.674,204,3.04,228,1.054,315,3.885,317,3.482,653,4.293,998,3.772,1026,3.171,1030,3.243,1941,6.384,1942,6.636,1943,4.881]],["t/320",[12,0.793,33,3.359,63,2.908,73,1.334,81,3.936,98,2.395,272,4.268,285,2.354,295,3.114,297,2.973,370,4.475,477,4.091,481,2.314,577,3.458,678,2.354,859,4.091,1366,5.035,1593,5.451,1944,7.785,1945,6.084,1946,6.084,1947,6.084,1948,6.084,1949,6.976,1950,6.084,1951,6.084]],["t/322",[6,1.416,127,5.769,297,3.243,377,3.318,481,3.127,603,3.668,639,4.209,678,3.181,1026,3.171,1030,3.243,1145,3.318,1626,4.656,1952,6.636,1953,6.636,1954,6.636,1955,6.636]],["t/324",[12,0.708,73,1.19,98,2.138,126,1.843,138,2.54,173,3.971,200,3.513,228,0.862,240,2.595,243,3.002,263,3.652,297,2.654,317,2.849,481,2.065,577,3.087,1011,3.513,1030,2.654,1035,3.39,1173,4.494,1949,4.866,1956,5.431,1957,5.431,1958,7.763,1959,5.431,1960,5.431,1961,7.229,1962,4.866,1963,7.229,1964,4.866,1965,7.229,1966,4.866,1967,5.431,1968,5.431,1969,4.866]],["t/326",[173,3,228,0.975,229,2.417,341,3,451,4.517,481,2.335,499,3.305,610,3.827,630,1.932,678,2.375,747,5.082,885,4.308,998,3.49,1028,5.082,1206,2.599,1795,4.517,1970,8.623,1971,3.973,1972,6.141,1973,6.141,1974,6.141,1975,7.832,1976,6.141,1977,5.502]],["t/328",[158,6.384,228,1.054,229,2.612,437,2.978,481,2.524,499,3.572,678,2.567,1206,2.809,1609,5.492,1795,4.881,1943,4.881,1971,4.293,1978,8.223,1979,6.636,1980,6.636,1981,6.636,1982,6.636,1983,6.636]],["t/330",[33,2.382,60,1.966,75,2.972,161,3.874,173,2.698,193,3.874,219,1.904,228,0.877,229,2.174,315,3.233,457,3.052,499,2.972,610,4.003,678,2.136,885,3.874,1059,4.57,1206,2.337,1795,4.062,1943,4.062,1964,6.55,1966,4.948,1971,3.572,1984,5.522,1985,4.57,1986,5.522,1987,5.522,1988,8.194,1989,8.194,1990,5.522,1991,5.522,1992,5.522,1993,4.948,1994,4.57]],["t/332",[44,2.625,71,2.438,78,3.798,84,1.972,102,3.192,129,3.012,228,0.966,364,3.458,368,5.035,499,3.274,695,3.798,748,5.451,1206,2.575,1731,5.035,1886,5.451,1969,7.693,1971,3.936,1995,6.084,1996,6.084,1997,6.084,1998,6.084,1999,6.084,2000,6.084,2001,6.084,2002,6.084,2003,6.084]],["t/334",[129,2.492,228,1.023,437,2.891,481,2.449,499,3.467,639,3.297,678,2.492,998,3.661,1028,5.33,1206,2.727,1218,5.001,1609,5.33,1971,4.167,2004,6.441,2005,6.441,2006,6.441,2007,7.899,2008,6.441,2009,6.441,2010,6.441,2011,5.772]],["t/336",[228,1.134,998,4.059,1528,6.676,2007,8.269,2011,6.398,2012,7.141,2013,7.141,2014,7.141,2015,7.141,2016,7.141]],["t/338",[228,1.213,2017,7.638,2018,7.638,2019,7.638,2020,7.638,2021,6.844,2022,7.638]],["t/340",[228,1.134,315,4.18,1943,5.252,1958,8.269,1993,6.398,1994,5.909,2023,7.141,2024,7.141,2025,7.141,2026,7.141,2027,7.141]],["t/342",[228,1.122,610,4.488,1977,8.23,2028,7.064,2029,9.185,2030,7.064,2031,7.064,2032,7.064]],["t/344",[228,1.242,1245,6.071,2033,7.82,2034,7.82,2035,7.82]],["t/347",[228,1.242,315,4.577,1943,5.752,1994,6.471,2036,7.82]],["t/349",[157,7.007,228,1.242,1025,4.102,2037,7.82,2038,7.82]],["t/351",[630,2.583]],["t/353",[12,0.659,47,2.14,63,2.416,73,1.108,74,1.572,75,2.721,88,3.053,115,2.062,134,2.959,138,2.364,173,4.111,213,3.718,224,4.53,229,1.99,263,3.399,337,3.27,357,4.184,388,2.416,603,2.794,607,2.062,629,4.833,638,3.547,640,2.062,653,4.456,678,1.956,679,3.053,703,4.53,844,3.27,845,3.925,882,3.925,939,3.718,947,4.53,1206,2.14,1251,3.156,1520,4.53,1542,3.925,1941,3.925,2039,6.172,2040,5.055,2041,5.055,2042,5.055,2043,5.055,2044,5.055,2045,5.055]],["t/355",[12,0.84,47,2.727,73,1.412,74,1.47,173,3.147,228,1.023,337,4.167,619,5.772,629,4.519,640,2.628,641,2.834,698,3.89,925,4.519,1206,2.727,1542,5.001,1941,6.267,2046,6.441,2047,5.772,2048,5.772,2049,6.441,2050,6.441,2051,5.772]],["t/357",[6,0.861,28,1.508,68,2.361,74,1.927,105,2.829,138,2.747,142,4.184,160,1.847,173,1.97,212,1.707,219,1.39,221,2.229,222,1.74,228,0.64,235,3.547,358,2.826,377,2.016,388,3.311,441,1.963,509,1.847,512,2.518,521,2.116,556,4.32,629,2.829,640,1.645,700,1.97,801,3.613,854,2.292,1075,3.667,1542,3.131,1941,5.379,1985,3.337,2048,3.613,2052,4.033,2053,4.033,2054,4.033,2055,4.033,2056,3.613,2057,4.033,2058,4.033,2059,4.033,2060,4.033,2061,4.033,2062,4.033,2063,4.033,2064,4.033,2065,4.033,2066,4.033,2067,4.033,2068,4.033,2069,4.033,2070,4.033,2071,3.337,2072,4.033,2073,4.033,2074,4.033,2075,4.033,2076,4.033,2077,4.861,2078,5.263,2079,3.613,2080,4.033,2081,4.033,2082,4.033]],["t/359",[12,0.568,22,2.474,47,1.843,73,0.954,74,1.799,75,2.343,78,2.717,115,1.776,129,1.684,173,3.032,195,2.474,228,0.986,229,1.713,283,3.874,337,4.679,377,2.176,388,2.966,402,2.474,418,2.548,457,2.406,467,3.38,494,3.054,499,2.343,571,3.38,582,3.602,601,2.816,607,1.776,670,3.202,677,2.548,698,2.629,854,2.474,880,2.927,925,3.054,1058,3.9,1141,3.9,1173,5.136,1182,2.406,1206,1.843,1297,2.927,1579,3.602,1585,3.9,1663,3.9,1667,3.602,1985,3.602,2039,3.9,2047,3.9,2051,7.469,2083,4.353,2084,4.353,2085,6.206,2086,6.206,2087,4.353,2088,4.353,2089,4.353,2090,4.353,2091,4.353]],["t/361",[630,2.583]],["t/363",[6,1.473,12,0.523,44,1.729,64,2.278,73,0.879,129,1.551,164,1.915,204,2.678,228,0.929,229,2.302,351,4.583,398,2.695,403,3.317,481,1.524,577,2.278,578,2.593,624,2.216,640,1.635,647,3.794,678,2.262,684,4.131,695,2.502,714,3.651,921,2.695,1145,2.004,1206,3.964,1218,3.112,1253,3.783,1301,4.31,1696,3.591,1971,2.593,2092,5.848,2093,4.008,2094,4.008,2095,4.008,2096,5.848,2097,4.008,2098,4.008,2099,4.008,2100,4.008,2101,3.591,2102,4.008,2103,4.008,2104,4.008,2105,3.591,2106,4.008,2107,4.008,2108,4.008,2109,4.008,2110,4.008,2111,4.008,2112,4.008,2113,4.008]],["t/365",[6,1.713,12,0.691,17,2.123,44,2.286,98,2.086,126,2.414,129,2.05,180,3.828,221,2.929,297,2.59,351,3.201,388,3.836,402,3.012,647,4.605,678,2.05,684,2.713,850,1.917,1206,3.398,1214,3.898,1296,3.718,1301,3.309,1518,4.386,1734,4.749,1971,4.601,2114,5.3,2115,5.3,2116,5.3,2117,5.3,2118,5.3,2119,5.3,2120,5.3]],["t/367",[228,1.288,2121,8.109]],["t/369",[60,1.871,71,2.106,74,2.036,82,3.401,129,2.034,142,4.272,156,3.688,160,3.24,199,3.078,221,3.91,228,0.835,268,3.91,369,4.082,370,3.867,372,3.401,388,2.512,397,2.069,408,3.175,562,3.867,630,2.515,647,3.536,720,2.691,839,4.351,920,3.535,1025,2.758,1145,2.628,1159,3.867,1296,3.688,1549,4.711,2122,5.257,2123,7.074,2124,5.257,2125,5.257,2126,5.257]],["t/371",[630,2.583]],["t/373",[6,1.462,12,1.018,33,2.164,34,2.124,58,2.632,63,2.398,71,2.01,76,2.4,94,3.373,95,3.69,96,2.7,131,2.568,135,3.246,151,2.451,168,3.519,176,2.346,184,2.632,193,3.519,229,2.697,236,3.895,244,1.426,246,2.632,261,2.937,265,3.132,268,2.773,285,1.941,295,2.568,366,2.568,397,1.975,398,4.608,399,3.69,400,4.152,409,3.895,410,4.152,411,4.152,412,3.373,413,3.519,441,1.677,453,3.03,454,3.519,577,2.852,624,2.773,630,1.578,678,1.941,1172,3.69,2127,5.017]],["t/375",[1,3.856,6,0.923,10,2.458,12,1.187,33,1.866,34,1.83,43,3.357,45,4.796,73,0.948,76,2.912,96,2.327,98,1.702,118,2.611,126,1.468,142,4.352,153,3.357,164,2.952,176,2.889,178,3.616,184,2.269,233,1.797,240,2.952,243,2.39,244,1.756,260,2.908,261,2.531,268,2.39,366,2.214,397,2.431,399,3.181,412,4.153,415,3.875,416,4.796,417,5.535,418,2.531,419,3.875,420,3.875,423,3.357,424,2.7,425,2.798,426,4.153,427,3.181,428,3.357,429,2.798,437,1.941,2128,4.324,2129,4.324,2130,3.875]],["t/377",[96,3.761,129,2.704,178,4.091,233,2.904,243,3.863,285,2.704,322,4.521,397,2.751,413,4.903,425,4.521,431,7.606,432,3.34,433,5.426,2131,6.989]],["t/380",[1,3.734,12,1.173,15,2.674,17,1.656,22,2.35,58,2.169,73,1.311,84,1.34,96,2.225,98,1.627,118,3.612,126,1.403,129,1.599,153,3.21,176,3.286,178,3.501,184,2.169,204,1.894,210,3.21,233,2.919,240,2.858,243,3.306,244,1.997,260,2.78,261,2.42,265,2.581,268,2.285,281,3.041,284,2.225,288,1.855,330,2.285,333,3.219,397,1.627,416,3.21,423,3.21,424,2.581,425,2.674,426,4.021,427,3.041,428,3.21,430,2.497,434,2.42,435,3.704,436,3.21,441,1.382,442,2.497,443,4.929,448,3.704,449,3.704,450,3.21,451,3.041,452,2.35,453,2.497,454,2.9,455,2.78,2130,3.704,2132,4.134]],["t/382",[44,2.649,212,2.599,228,1.369,246,3.222,441,2.052,444,2.813,471,3.49,481,2.978,499,3.305,639,3.143,678,3.03,714,3.834,1023,3.03,1024,2.935,1029,3.973,1030,3,1032,5.082,1034,5.082,1206,2.599,1264,4.308,1265,4.308,2133,6.141,2134,6.141]],["t/384",[1,1.909,6,0.653,10,1.738,12,0.935,17,1.225,18,1.604,33,1.319,34,1.294,53,1.909,60,1.697,71,1.225,73,0.67,74,1.637,76,2.052,98,1.204,119,1.847,129,2.559,138,1.43,159,2.374,173,2.329,198,1.604,199,1.79,204,1.401,219,2.473,228,0.486,229,1.204,239,2.374,244,2.451,246,1.604,254,1.529,255,2.531,258,2.249,265,1.909,267,2.374,268,2.635,283,1.909,285,1.183,377,1.529,388,1.461,426,2.056,442,1.847,447,5.935,452,2.71,453,1.847,454,2.145,471,1.738,600,2.74,606,4.271,607,1.247,608,2.74,609,4.271,610,1.494,611,4.271,612,6.037,613,4.271,614,4.848,616,4.309,624,1.69,626,2.531,640,1.945,641,2.097,700,1.494,776,1.909,816,2.374,876,2.374,880,2.056,1038,3.205,1089,2.056,1104,1.909,1206,1.294,1207,2.531,1368,2.74,1478,2.374,1626,2.145,1662,2.74,1674,2.249,1896,4.271,1971,1.978,2021,2.74,2135,3.058,2136,4.767,2137,3.058]],["t/386",[6,1.492,26,4.363,27,4.091,228,1.11,366,3.578,437,3.136,512,4.363,639,3.578,850,2.528,1023,2.704,1024,3.34,1296,4.903,1735,5.784,2138,6.989,2139,6.989]],["t/388",[6,1.055,27,2.893,58,2.592,84,1.602,89,4.089,126,1.677,146,2.592,230,3.085,350,3.085,366,2.53,378,3.836,380,5.612,422,3.467,465,2.66,607,2.016,641,2.174,679,2.984,698,2.984,700,2.414,838,3.836,844,3.197,850,1.788,986,3.197,1026,2.362,1030,2.414,1038,3.323,1066,3.836,1089,3.323,1092,2.809,1200,3.635,1209,4.676,1229,3.635,1230,4.428,1231,4.428,1232,3.635,1233,4.089,1234,4.758,1235,4.428,1236,4.428,1237,4.428,1238,4.428,1239,4.089,1240,4.428,1241,4.089,1242,4.428,1243,3.467,1244,4.089,1245,3.836,1246,4.428,1247,4.089]],["t/390",[12,0.608,47,3.441,74,1.064,88,2.815,115,1.901,202,3.016,212,1.973,228,0.74,251,2.729,336,2.577,341,2.278,350,2.91,377,2.33,397,1.835,434,2.729,437,2.092,441,2.509,481,1.773,607,3.489,610,2.278,670,3.429,677,2.729,678,1.803,679,2.815,720,2.386,1016,3.27,1023,1.803,1025,3.417,1182,2.577,1206,1.973,1210,3.27,1224,5.533,1225,5.048,1227,5.057,1229,3.429,1248,4.38,1249,3.619,1250,3.429,1251,2.91,1253,3.016,1254,3.857,1255,3.857,1256,3.857,1257,3.619]],["t/392",[6,1.524,228,1.134,441,2.386,1023,3.327,1275,6.398,1277,6.398,1278,6.398,1279,6.398,1281,5.909,2140,7.141,2141,7.141,2142,7.141]],["t/394",[68,2.808,74,1.878,117,3.226,126,1.628,138,3.566,160,2.197,198,2.517,222,2.07,228,0.762,235,2.897,244,1.363,346,3.226,358,3.11,437,2.153,441,1.603,457,2.652,509,2.197,512,2.995,632,3.226,639,2.456,700,2.344,702,3.725,887,3.97,1026,2.293,1030,2.344,1107,3.725,1159,3.529,1546,3.725,1630,3.529,2056,4.299,2071,3.97,2077,5.499,2078,5.954,2079,4.299,2143,4.299,2144,4.299,2145,4.797,2146,4.299,2147,4.797,2148,4.797,2149,4.797,2150,4.797,2151,4.797,2152,4.797,2153,4.797,2154,4.797,2155,4.797,2156,4.797,2157,4.797]],["t/396",[630,2.583]],["t/398",[630,2.583]],["t/400",[200,4.293,228,1.306,335,4.293,346,4.462,484,4.111,509,3.04,521,3.482,635,3.668,642,3.885,2158,6.636,2159,7.368,2160,8.223,2161,6.636,2162,6.636,2163,6.636,2164,6.636]],["t/402",[200,4.722,228,1.159,484,4.657,521,3.829,635,4.035,2159,6.54,2165,7.299,2166,7.299,2167,7.299]],["t/404",[630,2.583]],["t/406",[64,3.053,74,1.968,101,2.506,126,2.845,138,2.512,173,2.624,228,1.401,246,1.874,333,1.923,481,1.359,484,3.226,488,3.777,509,3.95,598,5.208,678,1.382,704,2.402,935,2.774,992,2.774,1035,2.23,1075,2.23,1269,2.774,1299,3.201,1307,6.508,1366,4.444,1455,4.812,1503,2.506,1630,2.628,1669,4.444,1897,3.201,2168,3.573,2169,5.37,2170,5.37,2171,3.573,2172,3.573,2173,3.573,2174,3.573,2175,3.573,2176,3.573,2177,6.452,2178,3.573,2179,3.573,2180,3.573,2181,3.573,2182,3.573,2183,3.573,2184,3.573,2185,3.573,2186,3.573,2187,3.573,2188,3.573]],["t/408",[74,1.86,126,2.884,221,2.271,228,1.35,246,2.155,371,3.733,481,3.099,484,2.054,509,3.733,570,3.4,598,4.922,678,3.153,684,2.103,714,2.565,1026,4.061,1030,4.152,1218,3.19,2077,3.4,2101,3.681,2105,3.681,2189,4.108,2190,8.498,2191,4.108,2192,4.108,2193,4.108,2194,4.108,2195,4.108,2196,4.108,2197,4.108,2198,4.108,2199,4.108,2200,4.108]],["t/410",[6,1.024,10,2.727,12,0.994,25,1.957,33,2.867,48,3.725,65,3.226,71,2.662,73,1.052,76,1.68,84,1.555,99,2.995,115,1.957,129,1.856,131,2.456,135,3.104,180,2.582,233,1.993,295,2.456,326,2.808,336,3.673,371,2.197,384,2.652,390,3.673,392,3.529,413,3.365,461,3.529,465,2.582,471,2.727,563,3.725,630,1.509,632,3.226,639,2.456,650,3.725,652,4.299,667,3.725,677,3.89,680,4.299,701,4.299,720,2.456,839,5.499,843,5.348,879,5.126,1057,3.97,2201,4.797,2202,4.797]],["t/412",[6,0.798,10,2.717,12,0.487,14,2.066,28,0.845,33,2.062,74,2.212,76,2.155,129,0.874,146,1.961,164,2.284,204,1.035,219,1.648,220,2.025,222,0.975,228,0.594,229,0.889,233,0.939,235,2.887,237,3.516,279,1.462,288,1.677,295,1.157,333,1.216,336,1.249,358,2.51,383,2.025,418,1.323,457,1.249,467,1.754,468,1.662,477,4.137,484,1.13,493,2.622,509,1.712,569,4.283,598,2.887,612,1.662,647,4.108,684,3.15,704,1.519,709,2.622,776,1.411,812,2.025,837,3.093,986,1.462,999,1.662,1015,2.025,1026,1.08,1030,1.104,1035,1.411,1048,1.323,1049,1.323,1075,1.411,1094,3.349,1107,1.754,1145,1.869,1172,1.662,1206,0.957,1215,2.025,1232,1.662,1546,1.754,1630,4.526,1708,1.87,1920,2.025,1962,2.025,2071,3.093,2143,2.025,2144,2.025,2146,2.025,2203,2.26,2204,2.26,2205,2.26,2206,2.26,2207,2.26,2208,2.26,2209,2.26,2210,2.26,2211,2.26,2212,2.26,2213,4.78,2214,3.738,2215,2.26,2216,2.26,2217,2.26,2218,2.26,2219,2.26,2220,2.26,2221,2.26,2222,2.26,2223,2.26,2224,2.26,2225,2.26,2226,6.629,2227,2.26,2228,2.26,2229,2.26,2230,2.26,2231,2.26,2232,2.26,2233,2.26,2234,2.26,2235,2.26,2236,2.26,2237,2.26,2238,3.738,2239,2.26,2240,2.26,2241,2.26,2242,2.26,2243,2.26]],["t/414",[630,2.583]],["t/416",[630,2.583]],["t/418",[10,2.577,12,1.145,14,2.506,17,2.963,18,2.378,25,1.849,60,2.273,73,1.621,75,2.44,76,1.588,84,2.07,91,3.18,98,2.514,115,1.849,140,3.048,150,3.18,176,2.12,188,3.18,189,2.215,190,2.378,203,3.519,232,3.519,241,3.048,258,3.334,277,3.048,287,3.18,297,2.215,320,3.18,324,3.751,344,4.062,351,2.737,359,2.932,364,3.63,371,2.076,382,3.18,398,3.048,575,3.519,598,2.737,630,1.426,640,1.849,676,3.048,684,2.32,846,4.698,850,1.64,948,3.751,1190,4.062,1191,3.334,1269,3.519,1297,3.048,2244,4.533,2245,4.533,2246,4.533]]],"invertedIndex":[["",{"_index":74,"t":{"2":{"position":[[1020,1]]},"6":{"position":[[379,1]]},"8":{"position":[[559,1],[614,1],[746,1],[998,5]]},"10":{"position":[[316,1],[611,1]]},"14":{"position":[[546,1]]},"20":{"position":[[492,1]]},"22":{"position":[[165,1]]},"26":{"position":[[61,1],[257,1],[347,1],[419,1],[504,1],[583,1],[651,1]]},"28":{"position":[[260,1],[517,1],[759,1],[957,1],[1079,1],[1163,1],[1307,1]]},"30":{"position":[[617,1],[1166,1],[1577,1],[1616,1],[1719,1],[1793,1],[1819,1],[2116,1],[2149,1],[2189,1],[2220,1],[2252,1],[2286,1],[2350,1],[2378,1],[2860,1]]},"32":{"position":[[1375,1],[1565,1],[2405,1],[2480,1],[2526,2],[2595,1],[2839,2]]},"36":{"position":[[1780,1],[2263,1],[2294,1],[2439,1],[2545,1],[2579,1],[2708,2],[2733,1],[2735,1],[2737,3],[2853,1],[2894,1],[2918,1],[3119,1],[3662,1],[3780,1],[4221,1],[4341,1],[4343,2],[4380,1],[4400,1],[4424,1],[4459,1],[4502,2],[4529,1],[4793,1],[5039,2],[5065,1],[5162,1],[5506,1],[5566,1],[5647,1],[6043,1],[6265,1],[6571,1],[6573,2],[6610,1],[6630,1],[6654,1],[6689,1],[6732,2],[6759,1],[7023,2],[7118,1],[7276,1],[7421,1],[7527,1],[7561,1],[7690,2],[7715,1],[7717,1],[7735,1],[7811,1],[7917,1],[7931,2],[7956,2],[7973,1],[8000,1],[8093,1],[8095,1],[8114,1],[8197,1],[8226,1],[8257,1],[8316,2],[8371,2],[8397,1],[8494,1],[8539,1]]},"40":{"position":[[455,1],[1143,1],[1159,1]]},"42":{"position":[[2159,1]]},"46":{"position":[[241,1],[611,1],[613,2],[683,1],[750,1],[814,1],[890,1],[966,1],[1047,1],[1130,1],[1342,1],[1507,1],[1582,1],[1711,1],[1743,1],[1859,1],[1933,1]]},"50":{"position":[[1327,1],[1345,1],[1437,1],[1482,1],[1542,2],[1563,1],[1661,1],[1679,1]]},"56":{"position":[[72,3],[141,3],[145,1],[159,1],[211,1],[237,1],[257,1],[296,1],[368,1],[442,1],[468,1],[527,2]]},"69":{"position":[[261,1],[422,1],[561,1],[622,1],[655,1],[670,1],[858,1]]},"81":{"position":[[239,1],[296,1]]},"85":{"position":[[181,1],[199,1],[291,1],[336,1],[395,2],[416,1],[514,1],[532,1]]},"131":{"position":[[145,1]]},"135":{"position":[[636,1],[654,1],[802,1],[861,2],[882,1],[942,1],[961,1],[963,1],[1147,1],[1156,1]]},"137":{"position":[[391,1],[409,1],[507,1],[567,2],[594,1],[619,1],[732,1]]},"139":{"position":[[644,1],[662,1],[763,1],[823,2],[844,1],[919,1],[929,1],[955,1]]},"143":{"position":[[383,1],[524,1],[570,1],[597,1],[719,1],[874,1],[892,1],[1039,1],[1098,2],[1119,1],[1197,1],[1231,1],[1255,1],[1327,1],[1495,1],[1532,1],[1541,2],[1554,1],[1624,1]]},"161":{"position":[[299,1],[360,1],[2684,1],[2730,1],[2808,1],[2872,1],[2931,1],[2933,3],[3163,1],[3371,1]]},"163":{"position":[[155,1],[357,1],[528,1],[530,3],[697,1],[824,2],[906,1]]},"165":{"position":[[452,1],[509,1],[573,1],[682,2],[868,1],[919,1]]},"169":{"position":[[30,1],[105,1]]},"206":{"position":[[37,1],[233,1],[277,1]]},"208":{"position":[[36,1]]},"217":{"position":[[507,1],[781,1],[828,1],[1459,1],[1468,1],[1542,1],[1544,1],[1746,1],[1757,1],[1807,1],[1975,1],[1977,2],[2017,1],[2080,1],[2082,1],[2284,1],[2295,1],[2345,1],[2513,1],[2531,1],[2618,1],[2707,1],[2777,1],[2845,1],[2873,1],[2885,1],[2901,1],[2941,1],[2943,1],[3013,1]]},"221":{"position":[[448,1]]},"228":{"position":[[0,2],[62,2],[129,2],[218,3],[274,2],[321,2],[380,2]]},"232":{"position":[[359,1],[446,1],[519,1],[591,1],[677,1],[786,1],[881,1]]},"234":{"position":[[299,3],[372,3],[387,1],[459,1],[549,3],[640,3],[651,1],[704,2],[725,1]]},"251":{"position":[[294,1],[296,2],[299,1],[380,1],[444,1],[498,1],[549,1],[608,1],[672,1],[692,1],[735,1],[746,1],[803,1],[819,1],[884,1],[891,1],[926,1],[994,1],[1027,1],[1177,1],[1215,1],[1245,1],[1279,1],[1377,2],[1614,1],[1673,2]]},"267":{"position":[[542,2],[577,1],[604,1],[632,1],[676,1],[691,1],[704,1],[737,1],[765,1],[804,1],[806,2],[809,2],[812,1],[863,2],[883,1],[893,2],[896,1],[909,1],[999,3],[1021,2],[1059,2],[1072,2],[1104,2],[1118,1],[1142,1],[1192,1],[1200,2],[1228,1],[1230,1],[1237,1],[1276,1],[1278,2],[1296,1],[1298,2],[1301,2],[1304,1],[1357,1],[1365,2],[1383,1],[1393,2],[1396,1],[1440,2],[1488,1],[1527,2],[1530,1],[1544,2],[1565,3],[1585,1],[1610,1],[1623,1],[1625,1],[1717,3],[1759,2],[1776,1],[1785,1],[1787,1],[1828,1],[1841,2],[1844,1],[1865,2],[1916,2],[1941,3],[1961,1],[2024,1],[2031,1],[2047,1],[2049,2],[2052,2],[2055,1],[2135,2],[2138,1],[2159,1],[2161,1],[2249,1],[2270,1],[2272,1],[2322,1],[2338,1],[2411,1]]},"271":{"position":[[104,2]]},"273":{"position":[[117,1],[169,1],[214,1],[248,1],[294,1],[345,1],[386,1],[438,1],[568,2],[589,1],[639,1],[699,1]]},"276":{"position":[[6,1],[74,1]]},"278":{"position":[[6,1],[56,1]]},"280":{"position":[[6,1],[77,1]]},"283":{"position":[[85,1],[181,1],[200,1],[252,1],[297,1],[343,1],[389,1],[430,1],[482,1],[525,1],[680,2]]},"285":{"position":[[168,1],[278,1],[317,1],[369,1],[414,1],[460,1],[506,1],[547,1],[599,1],[805,3]]},"289":{"position":[[88,1]]},"291":{"position":[[134,1]]},"293":{"position":[[84,1]]},"295":{"position":[[78,1]]},"297":{"position":[[93,1]]},"304":{"position":[[139,1]]},"306":{"position":[[72,1],[106,1],[169,1],[236,1],[311,1],[399,1]]},"308":{"position":[[69,1],[108,1],[220,1]]},"312":{"position":[[0,1]]},"314":{"position":[[94,1],[409,1]]},"353":{"position":[[76,1],[168,1]]},"355":{"position":[[314,1]]},"357":{"position":[[275,1],[337,1],[402,1],[517,1],[583,1],[661,1]]},"359":{"position":[[699,1],[711,1],[728,1],[907,1]]},"369":{"position":[[110,1],[112,1],[184,2],[187,1],[259,2]]},"384":{"position":[[1041,1],[1135,1],[1181,2],[1275,1],[1415,2]]},"390":{"position":[[230,1]]},"394":{"position":[[313,1],[336,1],[404,1],[573,1]]},"406":{"position":[[143,1],[239,1],[339,1],[442,1],[548,1],[667,1],[790,1],[881,1]]},"408":{"position":[[175,1],[319,1],[470,1],[610,1],[742,1]]},"412":{"position":[[478,1],[516,1],[527,1],[599,1],[661,1],[775,1],[797,1],[819,1],[841,1],[869,1],[876,1],[930,1],[937,1],[981,1],[1019,1],[1051,1],[1105,1],[1147,1],[1186,1],[1231,1],[1299,1],[1356,1],[1385,1],[1449,1],[1509,1],[1612,2],[1781,2],[1805,3],[1848,1],[1908,1],[2158,1],[2173,6],[2180,4]]}}}],["0",{"_index":1780,"t":{"259":{"position":[[145,1]]}}}],["0.01",{"_index":1194,"t":{"99":{"position":[[50,5]]}}}],["0.1",{"_index":1676,"t":{"223":{"position":[[530,6]]}}}],["001\"embedding=\"google_vertexai:text",{"_index":2016,"t":{"336":{"position":[[139,35]]}}}],["001\"smart_llm=\"google_vertexai:gemini",{"_index":2014,"t":{"336":{"position":[[43,37]]}}}],["001\"strategic_llm=\"google_vertexai:gemini",{"_index":2015,"t":{"336":{"position":[[89,41]]}}}],["002",{"_index":1692,"t":{"232":{"position":[[586,4]]}}}],["004",{"_index":2011,"t":{"334":{"position":[[279,4]]},"336":{"position":[[185,4]]}}}],["01",{"_index":1686,"t":{"232":{"position":[[347,2]]},"316":{"position":[[513,2]]}}}],["05",{"_index":1685,"t":{"232":{"position":[[344,2]]},"316":{"position":[[510,2]]}}}],["1",{"_index":720,"t":{"36":{"position":[[2131,1]]},"50":{"position":[[145,2]]},"91":{"position":[[163,1]]},"107":{"position":[[203,2]]},"111":{"position":[[305,1]]},"117":{"position":[[5,1]]},"121":{"position":[[437,2]]},"139":{"position":[[223,2]]},"169":{"position":[[5,1]]},"206":{"position":[[82,2]]},"208":{"position":[[24,1]]},"212":{"position":[[150,1]]},"308":{"position":[[356,3]]},"369":{"position":[[181,2]]},"390":{"position":[[5,1]]},"410":{"position":[[241,2]]}}}],["1,200",{"_index":264,"t":{"10":{"position":[[768,5]]}}}],["1.0",{"_index":1779,"t":{"259":{"position":[[141,3]]}}}],["1.1",{"_index":1639,"t":{"217":{"position":[[1599,4],[1862,4],[2137,4],[2400,4]]}}}],["1.5",{"_index":2007,"t":{"334":{"position":[[141,3],[182,3],[225,3]]},"336":{"position":[[33,3],[81,3],[131,3]]}}}],["1.7.1",{"_index":1510,"t":{"175":{"position":[[81,7]]}}}],["100",{"_index":133,"t":{"4":{"position":[[967,5]]}}}],["1106",{"_index":726,"t":{"36":{"position":[[2383,4],[7365,4]]}}}],["128k",{"_index":721,"t":{"36":{"position":[[2192,5]]},"223":{"position":[[360,5]]}}}],["13617492f5df",{"_index":2243,"t":{"412":{"position":[[2080,14]]}}}],["18.17.0nvm",{"_index":1277,"t":{"121":{"position":[[205,10]]},"392":{"position":[[23,10]]}}}],["1960s,but",{"_index":1392,"t":{"161":{"position":[[574,9]]}}}],["2",{"_index":1025,"t":{"50":{"position":[[218,2]]},"107":{"position":[[331,2]]},"111":{"position":[[524,1]]},"117":{"position":[[29,1],[454,1]]},"139":{"position":[[364,2]]},"151":{"position":[[179,3]]},"169":{"position":[[74,1]]},"206":{"position":[[132,2]]},"208":{"position":[[134,1],[542,1]]},"212":{"position":[[141,1]]},"217":{"position":[[24,2]]},"308":{"position":[[367,4]]},"349":{"position":[[56,2]]},"369":{"position":[[256,2]]},"390":{"position":[[29,1],[370,1]]}}}],["2+3",{"_index":736,"t":{"36":{"position":[[2751,3]]}}}],["2.0",{"_index":1230,"t":{"115":{"position":[[66,3]]},"388":{"position":[[62,3]]}}}],["2.1\"smart_llm=\"anthropic:claud",{"_index":1974,"t":{"326":{"position":[[172,31]]}}}],["20",{"_index":203,"t":{"8":{"position":[[194,2],[317,3]]},"97":{"position":[[167,3]]},"228":{"position":[[148,2]]},"418":{"position":[[516,3]]}}}],["2004(thi",{"_index":1384,"t":{"161":{"position":[[308,9]]}}}],["2021",{"_index":148,"t":{"6":{"position":[[179,6]]}}}],["2023\"report_typ",{"_index":1875,"t":{"278":{"position":[[39,16]]}}}],["2024",{"_index":1962,"t":{"324":{"position":[[312,6]]},"412":{"position":[[1800,4]]}}}],["20240229",{"_index":1977,"t":{"326":{"position":[[259,9]]},"342":{"position":[[44,8],[103,8],[166,8]]}}}],["20240229\"strategic_llm=\"anthropic:claud",{"_index":1976,"t":{"326":{"position":[[211,40]]}}}],["2k",{"_index":1671,"t":{"221":{"position":[[385,4]]},"228":{"position":[[119,2]]}}}],["3",{"_index":610,"t":{"32":{"position":[[2458,2]]},"50":{"position":[[554,2]]},"111":{"position":[[587,1]]},"117":{"position":[[134,1]]},"143":{"position":[[1539,1]]},"161":{"position":[[2645,2],[2962,1]]},"169":{"position":[[143,1]]},"206":{"position":[[195,2]]},"208":{"position":[[284,1]]},"217":{"position":[[193,2]]},"223":{"position":[[497,1]]},"312":{"position":[[209,1]]},"316":{"position":[[319,1]]},"326":{"position":[[204,1],[252,1]]},"330":{"position":[[205,1],[255,1],[310,1]]},"342":{"position":[[35,1],[94,1],[157,1]]},"384":{"position":[[1113,2]]},"390":{"position":[[134,1]]}}}],["3.10",{"_index":1143,"t":{"77":{"position":[[56,4]]},"184":{"position":[[409,5]]},"186":{"position":[[509,5]]},"188":{"position":[[472,5]]},"271":{"position":[[69,5]]}}}],["3.11",{"_index":1262,"t":{"119":{"position":[[82,5]]},"259":{"position":[[275,4],[513,4]]}}}],["301",{"_index":1657,"t":{"217":{"position":[[2910,3]]}}}],["32768",{"_index":1961,"t":{"324":{"position":[[259,6],[408,5]]}}}],["32768\"smart_llm=\"groq:mixtr",{"_index":1959,"t":{"324":{"position":[[185,29]]}}}],["32768\"strategic_llm=\"groq:mixtr",{"_index":1960,"t":{"324":{"position":[[220,33]]}}}],["36",{"_index":1451,"t":{"161":{"position":[[2374,2]]}}}],["4",{"_index":251,"t":{"10":{"position":[[285,2],[330,1]]},"32":{"position":[[2571,1]]},"36":{"position":[[2178,1],[2381,1],[7363,1]]},"99":{"position":[[82,1]]},"117":{"position":[[352,1]]},"161":{"position":[[2967,1]]},"165":{"position":[[913,3]]},"208":{"position":[[440,1]]},"217":{"position":[[1169,2]]},"255":{"position":[[49,1]]},"390":{"position":[[268,1]]}}}],["40",{"_index":1021,"t":{"48":{"position":[[914,4]]},"50":{"position":[[2254,3]]}}}],["404",{"_index":1659,"t":{"217":{"position":[[3008,4]]}}}],["443",{"_index":1645,"t":{"217":{"position":[[2522,3]]}}}],["4o",{"_index":1674,"t":{"223":{"position":[[341,2],[357,2]]},"232":{"position":[[668,2],[782,3]]},"312":{"position":[[91,2]]},"316":{"position":[[615,2]]},"384":{"position":[[1092,4]]}}}],["4o\"strategic_llm=\"openai:o1",{"_index":1925,"t":{"312":{"position":[[121,27]]}}}],["4ostrategic_llm=azure_openai:o1",{"_index":1940,"t":{"316":{"position":[[650,31]]}}}],["5",{"_index":1172,"t":{"91":{"position":[[165,1]]},"151":{"position":[[236,3]]},"165":{"position":[[808,1],[921,2],[987,1]]},"373":{"position":[[343,1]]},"412":{"position":[[1797,2]]}}}],["50",{"_index":1059,"t":{"50":{"position":[[2287,4]]},"212":{"position":[[157,2]]},"330":{"position":[[35,3]]}}}],["6",{"_index":2127,"t":{"373":{"position":[[345,1]]}}}],["64m",{"_index":1636,"t":{"217":{"position":[[1528,4],[2066,4]]}}}],["7",{"_index":2129,"t":{"375":{"position":[[32,1]]}}}],["70b",{"_index":1964,"t":{"324":{"position":[[371,3]]},"330":{"position":[[257,3],[312,3]]}}}],["7b",{"_index":1969,"t":{"324":{"position":[[420,2]]},"332":{"position":[[216,2],[268,2],[324,2]]}}}],["7b\"smart_llm=\"mistralai:mistr",{"_index":1981,"t":{"328":{"position":[[143,31]]}}}],["80",{"_index":1632,"t":{"217":{"position":[[1477,3],[2971,3]]}}}],["80,000",{"_index":1434,"t":{"161":{"position":[[1742,7],[1815,7],[2488,7]]}}}],["8192",{"_index":1965,"t":{"324":{"position":[[375,4],[390,4]]}}}],["85",{"_index":238,"t":{"8":{"position":[[1011,3]]}}}],["8b",{"_index":1966,"t":{"324":{"position":[[387,2]]},"330":{"position":[[207,2]]}}}],["8x7b",{"_index":1958,"t":{"324":{"position":[[180,4],[215,4],[254,4],[403,4]]},"340":{"position":[[142,4],[211,4],[284,4]]}}}],["95",{"_index":303,"t":{"14":{"position":[[344,3]]}}}],["__call__",{"_index":2161,"t":{"400":{"position":[[103,9]]}}}],["__call__(cl",{"_index":2162,"t":{"400":{"position":[[117,13]]}}}],["__init__",{"_index":2170,"t":{"406":{"position":[[117,9],[131,10]]}}}],["__init__(self",{"_index":510,"t":{"30":{"position":[[1518,15]]},"251":{"position":[[268,15]]}}}],["__main__",{"_index":1049,"t":{"50":{"position":[[1545,11]]},"56":{"position":[[530,11]]},"85":{"position":[[398,11]]},"135":{"position":[[864,11]]},"137":{"position":[[570,11]]},"139":{"position":[[826,11]]},"143":{"position":[[1101,11]]},"234":{"position":[[707,11]]},"251":{"position":[[1380,11]]},"273":{"position":[[571,11]]},"412":{"position":[[1615,11]]}}}],["__name__",{"_index":1048,"t":{"50":{"position":[[1533,8]]},"56":{"position":[[518,8]]},"85":{"position":[[386,8]]},"135":{"position":[[852,8]]},"137":{"position":[[558,8]]},"139":{"position":[[814,8]]},"143":{"position":[[1089,8]]},"234":{"position":[[695,8]]},"251":{"position":[[1368,8]]},"273":{"position":[[559,8]]},"412":{"position":[[1603,8]]}}}],["abil",{"_index":378,"t":{"22":{"position":[[101,7]]},"40":{"position":[[954,7]]},"115":{"position":[[379,7]]},"388":{"position":[[375,7]]}}}],["abov",{"_index":102,"t":{"4":{"position":[[330,6]]},"8":{"position":[[821,6]]},"10":{"position":[[518,5]]},"30":{"position":[[769,6],[1247,6],[1887,6],[2990,6],[3410,6]]},"36":{"position":[[4808,6]]},"44":{"position":[[394,6]]},"48":{"position":[[133,6]]},"50":{"position":[[1814,6],[2311,6]]},"141":{"position":[[20,5]]},"217":{"position":[[3115,6]]},"232":{"position":[[99,6]]},"251":{"position":[[2055,5]]},"259":{"position":[[186,5]]},"263":{"position":[[755,5]]},"332":{"position":[[115,6]]}}}],["abstract",{"_index":2167,"t":{"402":{"position":[[59,8]]}}}],["abstractsingleton(abc.abc",{"_index":2165,"t":{"402":{"position":[[6,26]]}}}],["academia",{"_index":300,"t":{"14":{"position":[[275,9]]}}}],["accept",{"_index":596,"t":{"32":{"position":[[1805,8],[1857,10]]}}}],["access",{"_index":1269,"t":{"119":{"position":[[225,6]]},"121":{"position":[[335,6]]},"406":{"position":[[109,7]]},"418":{"position":[[8,9]]}}}],["accord",{"_index":116,"t":{"4":{"position":[[500,9]]}}}],["accordingli",{"_index":2125,"t":{"369":{"position":[[341,12]]}}}],["account",{"_index":1950,"t":{"320":{"position":[[186,7]]}}}],["accur",{"_index":907,"t":{"42":{"position":[[758,8]]},"101":{"position":[[72,9],[188,8],[426,8]]}}}],["accuraci",{"_index":906,"t":{"42":{"position":[[623,9]]},"52":{"position":[[352,9]]}}}],["achiev",{"_index":250,"t":{"10":{"position":[[267,8]]},"50":{"position":[[110,8]]},"214":{"position":[[117,7]]}}}],["act",{"_index":421,"t":{"26":{"position":[[204,4]]}}}],["action",{"_index":774,"t":{"36":{"position":[[4092,6]]},"42":{"position":[[1693,10]]},"52":{"position":[[194,10]]},"200":{"position":[[100,8]]},"206":{"position":[[434,6]]}}}],["activ",{"_index":1506,"t":{"173":{"position":[[275,8],[327,10],[580,10]]},"175":{"position":[[635,8],[1006,10]]},"194":{"position":[[18,8]]}}}],["activate/deactiv",{"_index":1500,"t":{"173":{"position":[[42,19]]}}}],["actual",{"_index":52,"t":{"2":{"position":[[648,8]]}}}],["ad",{"_index":1200,"t":{"103":{"position":[[152,6],[270,6]]},"115":{"position":[[189,5]]},"208":{"position":[[209,6]]},"251":{"position":[[1676,5]]},"388":{"position":[[185,5]]}}}],["ada",{"_index":1691,"t":{"232":{"position":[[582,3]]}}}],["add",{"_index":377,"t":{"22":{"position":[[89,4]]},"30":{"position":[[2380,3],[3169,3]]},"36":{"position":[[1131,3],[8773,3]]},"67":{"position":[[341,4]]},"69":{"position":[[624,3]]},"107":{"position":[[206,3]]},"117":{"position":[[64,3]]},"139":{"position":[[226,3]]},"147":{"position":[[255,3]]},"206":{"position":[[235,3]]},"217":{"position":[[421,3],[1012,3]]},"301":{"position":[[13,3]]},"322":{"position":[[178,3]]},"357":{"position":[[519,3]]},"359":{"position":[[600,3]]},"384":{"position":[[669,3]]},"390":{"position":[[64,3]]}}}],["add_edg",{"_index":554,"t":{"30":{"position":[[3099,8]]}}}],["add_nod",{"_index":553,"t":{"30":{"position":[[3089,9]]}}}],["added_source_url",{"_index":1754,"t":{"251":{"position":[[1643,19]]}}}],["addit",{"_index":180,"t":{"6":{"position":[[894,9]]},"34":{"position":[[499,9]]},"36":{"position":[[8674,10]]},"48":{"position":[[654,10]]},"135":{"position":[[225,10]]},"184":{"position":[[296,10]]},"232":{"position":[[111,10]]},"241":{"position":[[270,10]]},"243":{"position":[[503,10]]},"273":{"position":[[254,10]]},"287":{"position":[[52,10]]},"304":{"position":[[69,10]]},"365":{"position":[[246,8],[392,10]]},"410":{"position":[[36,10]]}}}],["address",{"_index":884,"t":{"42":{"position":[[52,9]]},"52":{"position":[[229,9]]}}}],["adjust",{"_index":1165,"t":{"89":{"position":[[313,6]]},"125":{"position":[[288,6]]}}}],["admin",{"_index":2040,"t":{"353":{"position":[[66,5]]}}}],["advanc",{"_index":859,"t":{"40":{"position":[[424,12]]},"52":{"position":[[41,11]]},"137":{"position":[[642,12]]},"181":{"position":[[255,8],[319,8],[515,8]]},"184":{"position":[[317,8]]},"186":{"position":[[158,8],[546,8]]},"320":{"position":[[19,8]]}}}],["advantag",{"_index":581,"t":{"32":{"position":[[1226,9]]},"42":{"position":[[103,11]]},"44":{"position":[[723,10]]},"52":{"position":[[590,9]]}}}],["afterward",{"_index":1775,"t":{"257":{"position":[[355,10]]}}}],["ag",{"_index":1625,"t":{"217":{"position":[[1087,2]]}}}],["again",{"_index":671,"t":{"36":{"position":[[19,5]]},"217":{"position":[[868,5]]},"261":{"position":[[111,6]]}}}],["agent",{"_index":76,"t":{"2":{"position":[[1048,5]]},"4":{"position":[[658,5],[764,5],[852,5]]},"8":{"position":[[394,5],[456,5],[597,5]]},"12":{"position":[[277,5]]},"14":{"position":[[145,6]]},"17":{"position":[[37,5]]},"20":{"position":[[121,6],[304,5],[348,7],[435,5],[689,5],[790,5]]},"22":{"position":[[57,5],[73,5],[206,7],[319,6],[348,6],[504,7]]},"24":{"position":[[120,6],[165,5],[405,6],[562,5]]},"26":{"position":[[40,7],[136,5],[169,6],[198,5],[284,5]]},"28":{"position":[[829,5]]},"30":{"position":[[904,7],[917,5],[1058,7],[1290,5],[1325,5],[1410,5],[1936,6],[2003,6],[2036,7],[2399,5],[3369,6]]},"32":{"position":[[367,5],[385,6],[772,7],[2198,6],[2257,7]]},"34":{"position":[[814,5],[996,6]]},"60":{"position":[[610,5]]},"95":{"position":[[250,5]]},"97":{"position":[[60,5]]},"103":{"position":[[244,5]]},"125":{"position":[[523,5]]},"137":{"position":[[20,5]]},"169":{"position":[[86,5]]},"177":{"position":[[31,5]]},"181":{"position":[[85,6],[302,5]]},"184":{"position":[[61,5],[177,5]]},"188":{"position":[[51,6],[222,5]]},"190":{"position":[[49,5]]},"192":{"position":[[286,5],[306,6]]},"194":{"position":[[249,5]]},"223":{"position":[[50,7],[129,6],[316,6],[581,5],[762,5]]},"234":{"position":[[0,5],[75,6],[177,5]]},"373":{"position":[[115,6],[223,6]]},"375":{"position":[[37,7],[130,7],[226,5],[259,6],[338,5]]},"384":{"position":[[218,7],[408,7],[430,6]]},"410":{"position":[[264,5]]},"412":{"position":[[1223,7],[1850,8],[1942,6],[2047,7],[2143,7]]},"418":{"position":[[409,5]]}}}],["ages.startup",{"_index":1396,"t":{"161":{"position":[[672,13]]}}}],["aggreg",{"_index":241,"t":{"10":{"position":[[15,11],[356,10]]},"12":{"position":[[469,9]]},"14":{"position":[[680,10]]},"97":{"position":[[150,11]]},"223":{"position":[[246,10],[961,9]]},"228":{"position":[[132,10]]},"418":{"position":[[499,11]]}}}],["ahead",{"_index":708,"t":{"36":{"position":[[1484,5],[8763,5]]}}}],["ai",{"_index":33,"t":{"2":{"position":[[373,2],[853,2]]},"14":{"position":[[82,2],[142,2],[226,2],[478,2],[745,2]]},"20":{"position":[[118,2],[212,2],[432,2],[470,2],[620,2]]},"24":{"position":[[402,2]]},"32":{"position":[[2420,2]]},"34":{"position":[[102,2],[344,2],[1186,2]]},"36":{"position":[[260,2]]},"40":{"position":[[56,2]]},"42":{"position":[[1537,2]]},"69":{"position":[[1061,2]]},"95":{"position":[[79,2]]},"101":{"position":[[145,2],[234,2],[446,2]]},"135":{"position":[[916,2]]},"137":{"position":[[658,2]]},"188":{"position":[[219,2]]},"278":{"position":[[21,2]]},"280":{"position":[[49,2]]},"320":{"position":[[28,2],[98,2]]},"330":{"position":[[9,2]]},"373":{"position":[[220,2]]},"375":{"position":[[34,2]]},"384":{"position":[[1056,2]]},"410":{"position":[[176,2],[274,2]]},"412":{"position":[[1220,2],[1815,2],[1905,2]]}}}],["ai/nom",{"_index":1993,"t":{"330":{"position":[[351,8]]},"340":{"position":[[325,8]]}}}],["aim",{"_index":97,"t":{"4":{"position":[[270,4]]},"22":{"position":[[39,5]]},"34":{"position":[[288,6]]},"95":{"position":[[33,6]]},"125":{"position":[[416,3]]}}}],["aka",{"_index":349,"t":{"20":{"position":[[366,4]]}}}],["allow",{"_index":402,"t":{"24":{"position":[[215,6]]},"30":{"position":[[268,8]]},"34":{"position":[[952,5]]},"36":{"position":[[3382,6]]},"42":{"position":[[742,6],[1751,6]]},"46":{"position":[[54,5]]},"50":{"position":[[2377,8]]},"137":{"position":[[88,6]]},"165":{"position":[[138,6]]},"175":{"position":[[412,6]]},"359":{"position":[[27,6]]},"365":{"position":[[115,5]]}}}],["alon",{"_index":916,"t":{"42":{"position":[[1137,6]]}}}],["alreadi",{"_index":338,"t":{"20":{"position":[[133,7]]},"34":{"position":[[445,7]]}}}],["altern",{"_index":1148,"t":{"81":{"position":[[145,14]]}}}],["although",{"_index":682,"t":{"36":{"position":[[430,8]]}}}],["alway",{"_index":669,"t":{"34":{"position":[[1422,7]]}}}],["amaz",{"_index":1201,"t":{"103":{"position":[[315,7]]}}}],["amazingli",{"_index":1947,"t":{"320":{"position":[[83,9]]}}}],["amount",{"_index":1170,"t":{"91":{"position":[[118,6]]}}}],["analysi",{"_index":322,"t":{"14":{"position":[[788,9]]},"28":{"position":[[115,9]]},"42":{"position":[[773,8],[958,8],[1298,9]]},"75":{"position":[[71,8]]},"87":{"position":[[197,9]]},"234":{"position":[[1105,9]]},"308":{"position":[[59,9]]},"377":{"position":[[92,8]]}}}],["analyz",{"_index":310,"t":{"14":{"position":[[511,7],[638,7]]},"42":{"position":[[838,9]]},"52":{"position":[[603,9]]}}}],["andrew",{"_index":352,"t":{"20":{"position":[[392,6]]}}}],["announc",{"_index":1055,"t":{"50":{"position":[[2007,14]]}}}],["anoth",{"_index":196,"t":{"8":{"position":[[0,7]]},"161":{"position":[[2042,7],[2287,7]]}}}],["answer",{"_index":258,"t":{"10":{"position":[[537,6],[644,6]]},"36":{"position":[[1835,7],[2016,6],[2088,11],[5282,6],[5702,7],[5883,6],[5955,12]]},"221":{"position":[[570,8]]},"384":{"position":[[1300,6]]},"418":{"position":[[211,7]]}}}],["anthrop",{"_index":1970,"t":{"326":{"position":[[9,9],[50,9],[274,9]]}}}],["anthropic_api_key=[your",{"_index":1972,"t":{"326":{"position":[[117,23]]}}}],["anyimport",{"_index":1736,"t":{"251":{"position":[[127,9]]}}}],["anyon",{"_index":1140,"t":{"71":{"position":[[361,6]]}}}],["anyth",{"_index":1256,"t":{"117":{"position":[[395,8]]},"208":{"position":[[483,8]]},"390":{"position":[[311,8]]}}}],["apa",{"_index":267,"t":{"10":{"position":[[809,3],[871,3]]},"32":{"position":[[2628,3]]},"137":{"position":[[694,3]]},"384":{"position":[[1362,3]]}}}],["api",{"_index":678,"t":{"36":{"position":[[191,3],[334,3],[531,4],[686,3],[882,3],[938,3],[1683,4],[1923,3],[2258,4],[3291,5],[3312,3],[4216,4],[5491,3],[5790,3]]},"50":{"position":[[361,3]]},"77":{"position":[[137,3],[197,3]]},"81":{"position":[[12,3]]},"89":{"position":[[0,3],[28,3]]},"95":{"position":[[131,4],[157,3]]},"103":{"position":[[113,3]]},"117":{"position":[[73,3]]},"131":{"position":[[63,3]]},"147":{"position":[[264,3]]},"157":{"position":[[136,3]]},"208":{"position":[[221,3]]},"232":{"position":[[244,3],[536,3]]},"271":{"position":[[259,3],[322,3],[376,3]]},"312":{"position":[[24,3]]},"314":{"position":[[22,3],[118,3],[191,3],[433,3],[506,3]]},"320":{"position":[[201,3]]},"322":{"position":[[91,3],[152,3]]},"326":{"position":[[60,3]]},"328":{"position":[[22,3]]},"330":{"position":[[22,3]]},"334":{"position":[[43,3]]},"353":{"position":[[336,3]]},"363":{"position":[[216,3],[656,3]]},"365":{"position":[[167,3]]},"373":{"position":[[462,3]]},"382":{"position":[[120,3],[168,3]]},"390":{"position":[[73,3]]},"406":{"position":[[817,3]]},"408":{"position":[[59,3],[207,3],[358,3],[502,3],[640,3]]}}}],["apikeyerror(except",{"_index":2189,"t":{"408":{"position":[[6,22]]}}}],["app",{"_index":679,"t":{"36":{"position":[[263,4]]},"50":{"position":[[2528,3]]},"107":{"position":[[365,3]]},"115":{"position":[[10,3]]},"117":{"position":[[521,3]]},"208":{"position":[[609,3]]},"259":{"position":[[497,3]]},"353":{"position":[[72,3]]},"388":{"position":[[10,3]]},"390":{"position":[[437,3]]}}}],["app@app.websocket(\"/generate_report\")async",{"_index":1129,"t":{"69":{"position":[[737,42]]}}}],["append",{"_index":1228,"t":{"111":{"position":[[646,6]]},"251":{"position":[[446,6]]}}}],["appl",{"_index":1484,"t":{"163":{"position":[[562,7],[600,6]]}}}],["applic",{"_index":471,"t":{"30":{"position":[[209,12],[435,11]]},"95":{"position":[[82,11]]},"177":{"position":[[19,11]]},"186":{"position":[[329,11]]},"190":{"position":[[31,11]]},"192":{"position":[[159,12]]},"194":{"position":[[171,12]]},"217":{"position":[[273,12]]},"251":{"position":[[1570,12]]},"382":{"position":[[195,12]]},"384":{"position":[[974,11]]},"410":{"position":[[179,12]]}}}],["appreci",{"_index":944,"t":{"44":{"position":[[151,10]]}}}],["approach",{"_index":121,"t":{"4":{"position":[[693,8]]},"30":{"position":[[121,8]]},"40":{"position":[[860,11]]},"52":{"position":[[220,8]]}}}],["appropri",{"_index":1722,"t":{"245":{"position":[[136,11]]}}}],["apt",{"_index":1581,"t":{"217":{"position":[[5,3],[97,3],[335,3],[347,3],[898,3],[913,3],[1251,3]]},"257":{"position":[[454,3]]},"259":{"position":[[120,3]]}}}],["arbitrari",{"_index":393,"t":{"22":{"position":[[483,9]]}}}],["arch=$(dpkg",{"_index":1608,"t":{"217":{"position":[[620,12]]}}}],["architectur",{"_index":281,"t":{"12":{"position":[[90,13]]},"30":{"position":[[3302,12]]},"44":{"position":[[381,12]]},"217":{"position":[[641,13]]},"380":{"position":[[34,12]]}}}],["archiv",{"_index":1603,"t":{"217":{"position":[[558,7],[692,7]]}}}],["area",{"_index":171,"t":{"6":{"position":[[661,5]]},"14":{"position":[[250,5]]},"30":{"position":[[811,6]]}}}],["arg",{"_index":2163,"t":{"400":{"position":[[131,6]]}}}],["argument",{"_index":1214,"t":{"107":{"position":[[538,8]]},"137":{"position":[[211,8]]},"139":{"position":[[446,8]]},"141":{"position":[[217,8]]},"365":{"position":[[403,9]]}}}],["aris",{"_index":1180,"t":{"91":{"position":[[642,6]]}}}],["around",{"_index":205,"t":{"8":{"position":[[224,6],[977,6]]},"99":{"position":[[43,6]]},"223":{"position":[[490,6]]}}}],["articl",{"_index":77,"t":{"2":{"position":[[1097,8]]},"20":{"position":[[656,7]]},"34":{"position":[[1097,7]]},"234":{"position":[[953,8]]},"280":{"position":[[24,7]]}}}],["artifici",{"_index":1118,"t":{"69":{"position":[[300,10]]},"153":{"position":[[175,10],[229,10]]}}}],["arxiv",{"_index":2096,"t":{"363":{"position":[[450,5],[784,5]]}}}],["ask",{"_index":253,"t":{"10":{"position":[[384,3]]},"36":{"position":[[1170,3]]}}}],["aspect",{"_index":1900,"t":{"304":{"position":[[26,7]]}}}],["asset",{"_index":1138,"t":{"71":{"position":[[316,5]]}}}],["assist",{"_index":331,"t":{"17":{"position":[[43,9]]},"20":{"position":[[796,9]]},"32":{"position":[[113,9],[2226,9],[2314,10],[2361,9],[3149,9]]},"34":{"position":[[142,9],[860,10],[958,10]]},"36":{"position":[[180,10],[250,9],[323,10],[675,10],[871,10],[921,9],[1193,9],[1309,9],[1402,9],[1452,9],[2147,9],[3040,9],[3301,10],[3424,11],[4177,9],[4822,9],[5252,9],[8619,9],[8809,9]]}}}],["assistant.idprint(f\"assist",{"_index":824,"t":{"36":{"position":[[7737,29]]}}}],["assistant_id",{"_index":823,"t":{"36":{"position":[[7719,15],[7771,17]]}}}],["assistant_id=assistant_id",{"_index":744,"t":{"36":{"position":[[3175,27],[8170,26]]}}}],["assistant_prompt_instruct",{"_index":716,"t":{"36":{"position":[[1751,28]]}}}],["assistantassist",{"_index":722,"t":{"36":{"position":[[2275,18],[7257,18]]}}}],["assistant’",{"_index":715,"t":{"36":{"position":[[1725,11]]}}}],["associ",{"_index":1519,"t":{"175":{"position":[[668,10],[791,10]]}}}],["assum",{"_index":156,"t":{"6":{"position":[[335,7],[904,8]]},"8":{"position":[[337,8]]},"10":{"position":[[1074,6]]},"30":{"position":[[1953,6]]},"163":{"position":[[219,8],[294,8]]},"369":{"position":[[278,7]]}}}],["async",{"_index":512,"t":{"30":{"position":[[1539,5]]},"32":{"position":[[1305,5]]},"234":{"position":[[594,5]]},"251":{"position":[[331,5]]},"267":{"position":[[1443,7]]},"285":{"position":[[38,5]]},"357":{"position":[[813,5]]},"386":{"position":[[110,5]]},"394":{"position":[[643,5]]}}}],["async_browse(url",{"_index":218,"t":{"8":{"position":[[616,18]]}}}],["async_mode=true,)queri",{"_index":1483,"t":{"163":{"position":[[505,22]]}}}],["asynchron",{"_index":754,"t":{"36":{"position":[[3393,12]]},"62":{"position":[[243,12]]},"251":{"position":[[1330,12]]}}}],["asyncio",{"_index":214,"t":{"8":{"position":[[443,8]]}}}],["asyncio.gather(*task",{"_index":226,"t":{"8":{"position":[[754,22]]}}}],["asyncio.run(generate_research_report(query=queri",{"_index":1703,"t":{"234":{"position":[[777,50]]}}}],["asyncio.run(get_report(prompt=prompt",{"_index":1321,"t":{"137":{"position":[[734,37]]}}}],["asyncio.run(get_report(queri",{"_index":1866,"t":{"273":{"position":[[701,29]]}}}],["asyncio.run(get_report(query=queri",{"_index":1316,"t":{"135":{"position":[[1158,35]]},"139":{"position":[[957,35]]},"143":{"position":[[1626,35]]}}}],["asyncio.run(get_research_report(query=queri",{"_index":1052,"t":{"50":{"position":[[1681,44]]},"85":{"position":[[534,44]]}}}],["asyncio.run(main",{"_index":1082,"t":{"56":{"position":[[542,19]]}}}],["asyncio.run(run",{"_index":1752,"t":{"251":{"position":[[1392,18]]}}}],["asyncio.run(test_scrape_data_by_queri",{"_index":2237,"t":{"412":{"position":[[1627,40]]}}}],["asyncio.to_thread",{"_index":2230,"t":{"412":{"position":[[1457,18]]}}}],["asyncioapp",{"_index":1878,"t":{"283":{"position":[[74,10]]}}}],["asyncioasync",{"_index":1042,"t":{"50":{"position":[[1239,12]]},"56":{"position":[[47,12]]},"85":{"position":[[93,12]]},"135":{"position":[[562,12]]},"137":{"position":[[331,12]]},"139":{"position":[[583,12]]},"234":{"position":[[261,12]]},"273":{"position":[[47,12]]}}}],["asyncioconnection_str",{"_index":1337,"t":{"143":{"position":[[358,24]]}}}],["asynciofrom",{"_index":1107,"t":{"69":{"position":[[72,11]]},"251":{"position":[[137,11]]},"394":{"position":[[241,11]]},"412":{"position":[[165,11]]}}}],["asyncioif",{"_index":1751,"t":{"251":{"position":[[1358,9]]}}}],["asyncioimport",{"_index":2052,"t":{"357":{"position":[[88,13]]}}}],["atleast",{"_index":1435,"t":{"161":{"position":[[1807,7]]}}}],["attach",{"_index":1556,"t":{"206":{"position":[[0,9]]}}}],["attempt",{"_index":1176,"t":{"91":{"position":[[474,8]]}}}],["attent",{"_index":363,"t":{"20":{"position":[[630,9]]}}}],["attribut",{"_index":383,"t":{"22":{"position":[[182,10]]},"412":{"position":[[710,10]]}}}],["audio",{"_index":316,"t":{"14":{"position":[[595,6]]}}}],["auth",{"_index":2086,"t":{"359":{"position":[[604,4],[638,4]]}}}],["auth_bas",{"_index":2088,"t":{"359":{"position":[[759,10]]}}}],["auth_basic_user_fil",{"_index":2089,"t":{"359":{"position":[[788,20]]}}}],["authent",{"_index":2085,"t":{"359":{"position":[[582,14],[770,17]]}}}],["authorit",{"_index":1179,"t":{"91":{"position":[[605,13]]}}}],["auto",{"_index":946,"t":{"44":{"position":[[324,4]]}}}],["autogpt",{"_index":0,"t":{"2":{"position":[[6,7],[282,7],[484,7]]},"8":{"position":[[19,7],[1027,8]]}}}],["autom",{"_index":289,"t":{"14":{"position":[[30,10]]},"28":{"position":[[19,10]]},"52":{"position":[[438,10]]},"200":{"position":[[42,9]]}}}],["automat",{"_index":703,"t":{"36":{"position":[[1244,13]]},"353":{"position":[[271,13]]}}}],["autonom",{"_index":10,"t":{"2":{"position":[[105,10],[1037,10]]},"20":{"position":[[764,10]]},"24":{"position":[[542,10]]},"26":{"position":[[273,10]]},"32":{"position":[[102,10]]},"95":{"position":[[230,10]]},"97":{"position":[[40,10]]},"375":{"position":[[327,10]]},"384":{"position":[[447,13]]},"410":{"position":[[244,10]]},"412":{"position":[[1209,10],[1837,10],[1931,10]]},"418":{"position":[[398,10]]}}}],["avail",{"_index":263,"t":{"10":{"position":[[744,10]]},"69":{"position":[[463,9]]},"89":{"position":[[293,9]]},"255":{"position":[[91,9]]},"263":{"position":[[269,9],[692,9]]},"324":{"position":[[323,9]]},"353":{"position":[[293,9]]}}}],["availablerespons",{"_index":225,"t":{"8":{"position":[[727,18]]}}}],["averag",{"_index":236,"t":{"8":{"position":[[949,7]]},"161":{"position":[[1766,7]]},"223":{"position":[[462,7]]},"373":{"position":[[319,7]]}}}],["avoid",{"_index":1095,"t":{"62":{"position":[[177,6]]},"67":{"position":[[257,5]]},"175":{"position":[[960,8]]},"263":{"position":[[599,5]]}}}],["await",{"_index":222,"t":{"8":{"position":[[669,5],[748,5]]},"30":{"position":[[1757,5],[1821,5]]},"50":{"position":[[1439,5],[1484,5]]},"56":{"position":[[406,5],[470,5]]},"69":{"position":[[672,5],[826,5],[860,5],[893,5]]},"85":{"position":[[293,5],[338,5]]},"135":{"position":[[759,5],[804,5]]},"137":{"position":[[464,5],[509,5]]},"139":{"position":[[720,5],[765,5]]},"143":{"position":[[996,5],[1041,5]]},"161":{"position":[[3373,5]]},"163":{"position":[[908,5]]},"165":{"position":[[870,5]]},"234":{"position":[[416,5],[461,5],[653,5]]},"251":{"position":[[1179,5],[1247,5]]},"267":{"position":[[2413,5]]},"273":{"position":[[171,5],[216,5]]},"283":{"position":[[254,5],[299,5]]},"285":{"position":[[371,5],[416,5]]},"306":{"position":[[108,5],[171,5],[238,5],[313,5],[401,5]]},"308":{"position":[[222,5]]},"357":{"position":[[663,5]]},"394":{"position":[[338,5]]},"412":{"position":[[1451,5]]}}}],["awar",{"_index":1069,"t":{"52":{"position":[[183,6]]},"75":{"position":[[114,5]]}}}],["azur",{"_index":1683,"t":{"232":{"position":[[291,5]]},"316":{"position":[[44,5],[66,5],[376,5]]}}}],["azure)bing_api_key=\"[your",{"_index":1697,"t":{"232":{"position":[[955,25]]}}}],["azure_openai_api_key=[your",{"_index":1935,"t":{"316":{"position":[[392,26]]}}}],["back",{"_index":602,"t":{"32":{"position":[[2070,4]]},"36":{"position":[[4937,4]]},"161":{"position":[[635,6]]},"217":{"position":[[1120,4]]},"267":{"position":[[257,4]]}}}],["backend",{"_index":1234,"t":{"115":{"position":[[132,7],[428,7]]},"121":{"position":[[382,7]]},"181":{"position":[[172,8],[183,7]]},"186":{"position":[[132,7]]},"267":{"position":[[55,7],[80,7],[429,7]]},"388":{"position":[[128,7],[424,7]]}}}],["backend.report_typ",{"_index":1112,"t":{"69":{"position":[[155,19]]}}}],["backend/report_types/detailed_report.pi",{"_index":1090,"t":{"60":{"position":[[470,39]]}}}],["balanc",{"_index":919,"t":{"42":{"position":[[1203,7]]}}}],["base",{"_index":233,"t":{"8":{"position":[[925,5]]},"10":{"position":[[917,5]]},"26":{"position":[[535,5]]},"28":{"position":[[41,5],[304,5],[397,5],[558,5],[663,5],[1124,5]]},"30":{"position":[[299,5],[956,5]]},"32":{"position":[[207,5]]},"34":{"position":[[912,5],[1044,5]]},"36":{"position":[[1843,5],[5710,5]]},"42":{"position":[[516,5]]},"44":{"position":[[312,5],[783,5]]},"48":{"position":[[179,5]]},"87":{"position":[[287,5]]},"91":{"position":[[73,5]]},"107":{"position":[[58,5]]},"139":{"position":[[881,5]]},"143":{"position":[[1161,5]]},"171":{"position":[[14,5]]},"223":{"position":[[170,5],[587,5],[880,5]]},"234":{"position":[[327,5]]},"255":{"position":[[56,5]]},"308":{"position":[[174,5]]},"375":{"position":[[589,5]]},"377":{"position":[[26,5]]},"380":{"position":[[152,5],[234,5],[546,5]]},"410":{"position":[[387,5]]},"412":{"position":[[553,5]]}}}],["base_url=ollama_base_url",{"_index":2065,"t":{"357":{"position":[[423,25]]}}}],["basic",{"_index":571,"t":{"32":{"position":[[801,9]]},"85":{"position":[[9,5]]},"149":{"position":[[4,5]]},"359":{"position":[[632,5]]}}}],["be",{"_index":1409,"t":{"161":{"position":[[1100,5]]}}}],["beautifulsoup",{"_index":1709,"t":{"238":{"position":[[95,13],[273,13]]},"241":{"position":[[39,13]]},"247":{"position":[[4,13]]}}}],["becom",{"_index":224,"t":{"8":{"position":[[720,6]]},"353":{"position":[[285,7]]}}}],["befor",{"_index":294,"t":{"14":{"position":[[135,6]]},"32":{"position":[[723,7]]},"34":{"position":[[1213,6]]},"44":{"position":[[0,6]]},"48":{"position":[[728,6]]},"50":{"position":[[379,6]]},"77":{"position":[[0,6]]},"263":{"position":[[498,6]]}}}],["begin",{"_index":1142,"t":{"77":{"position":[[11,6]]}}}],["behavior",{"_index":1753,"t":{"251":{"position":[[1542,8]]}}}],["below",{"_index":283,"t":{"12":{"position":[[113,6]]},"28":{"position":[[8,6]]},"34":{"position":[[1492,6]]},"36":{"position":[[768,6],[1299,6],[5018,6],[5345,5],[8861,5]]},"50":{"position":[[995,6]]},"234":{"position":[[141,6]]},"267":{"position":[[365,6]]},"359":{"position":[[666,5],[747,5]]},"384":{"position":[[767,6]]}}}],["benefit",{"_index":1070,"t":{"52":{"position":[[308,8]]},"241":{"position":[[216,9]]},"243":{"position":[[263,9]]}}}],["besid",{"_index":1682,"t":{"232":{"position":[[65,7]]}}}],["best",{"_index":249,"t":{"10":{"position":[[240,4]]},"20":{"position":[[721,4]]},"40":{"position":[[1123,4]]},"97":{"position":[[240,4]]},"101":{"position":[[10,4]]},"161":{"position":[[433,4]]},"163":{"position":[[622,4]]},"165":{"position":[[516,4]]},"190":{"position":[[184,4]]},"249":{"position":[[524,4]]}}}],["bet",{"_index":1388,"t":{"161":{"position":[[438,3]]}}}],["beta",{"_index":1245,"t":{"115":{"position":[[488,6]]},"263":{"position":[[794,4]]},"344":{"position":[[73,5]]},"388":{"position":[[484,6]]}}}],["beta\"embedding=\"sent",{"_index":1999,"t":{"332":{"position":[[327,24]]}}}],["beta\"smart_llm=\"huggingface:huggingfaceh4/zephyr",{"_index":1997,"t":{"332":{"position":[[219,48]]}}}],["beta\"smart_llm=\"xai:grok",{"_index":2034,"t":{"344":{"position":[[19,24]]}}}],["beta\"strategic_llm=\"huggingface:huggingfaceh4/zephyr",{"_index":1998,"t":{"332":{"position":[[271,52]]}}}],["beta\"strategic_llm=\"xai:grok",{"_index":2035,"t":{"344":{"position":[[44,28]]}}}],["better",{"_index":99,"t":{"4":{"position":[[288,6]]},"6":{"position":[[560,6]]},"10":{"position":[[1135,7]]},"24":{"position":[[226,6]]},"42":{"position":[[1432,6]]},"50":{"position":[[20,6],[2397,6]]},"123":{"position":[[95,6]]},"249":{"position":[[319,6]]},"410":{"position":[[169,6]]}}}],["between",{"_index":579,"t":{"32":{"position":[[1121,7]]},"36":{"position":[[1390,7]]},"87":{"position":[[219,7]]},"91":{"position":[[429,7]]},"249":{"position":[[264,7],[372,7]]}}}],["beyond",{"_index":1136,"t":{"71":{"position":[[241,6]]}}}],["bia",{"_index":154,"t":{"6":{"position":[[299,5]]},"42":{"position":[[1019,5],[1093,4]]},"52":{"position":[[370,5]]},"221":{"position":[[626,4]]}}}],["bias",{"_index":163,"t":{"6":{"position":[[412,6],[1212,6]]},"40":{"position":[[922,6]]},"221":{"position":[[563,6]]}}}],["big",{"_index":1446,"t":{"161":{"position":[[2164,3],[2508,3]]}}}],["biggest",{"_index":137,"t":{"6":{"position":[[4,7]]},"135":{"position":[[898,7]]}}}],["bing",{"_index":1696,"t":{"232":{"position":[[900,4]]},"363":{"position":[[556,4]]}}}],["bit",{"_index":748,"t":{"36":{"position":[[3252,3]]},"332":{"position":[[28,3]]}}}],["blog",{"_index":689,"t":{"36":{"position":[[626,4]]},"109":{"position":[[14,4]]},"192":{"position":[[342,4]]}}}],["blue",{"_index":1352,"t":{"143":{"position":[[1149,4]]}}}],["bodi",{"_index":1094,"t":{"62":{"position":[[172,4]]},"412":{"position":[[1730,5],[1784,7]]}}}],["book",{"_index":1745,"t":{"251":{"position":[[784,8]]}}}],["bool",{"_index":2169,"t":{"406":{"position":[[81,5],[874,5]]}}}],["boss",{"_index":1445,"t":{"161":{"position":[[2154,4]]}}}],["both",{"_index":195,"t":{"6":{"position":[[1412,4]]},"22":{"position":[[167,4]]},"34":{"position":[[543,4]]},"40":{"position":[[295,4],[855,4],[1131,4]]},"42":{"position":[[1041,4]]},"44":{"position":[[445,4]]},"50":{"position":[[374,4]]},"87":{"position":[[79,4]]},"141":{"position":[[126,4]]},"223":{"position":[[332,4]]},"318":{"position":[[24,4],[80,5]]},"359":{"position":[[857,4]]}}}],["box",{"_index":638,"t":{"34":{"position":[[478,3]]},"44":{"position":[[128,4]]},"111":{"position":[[615,3]]},"186":{"position":[[26,3]]},"190":{"position":[[140,3]]},"353":{"position":[[332,3]]}}}],["break",{"_index":124,"t":{"4":{"position":[[751,8]]},"12":{"position":[[69,5]]},"36":{"position":[[7967,5]]},"60":{"position":[[316,8]]},"62":{"position":[[0,6]]},"67":{"position":[[90,6]]},"71":{"position":[[120,8]]},"161":{"position":[[1870,5]]}}}],["brew",{"_index":1770,"t":{"257":{"position":[[297,4],[386,4]]},"259":{"position":[[48,4],[291,5],[297,4],[354,4],[525,6]]}}}],["brief",{"_index":1429,"t":{"161":{"position":[[1624,5]]}}}],["bring",{"_index":664,"t":{"34":{"position":[[1311,7]]}}}],["broad",{"_index":1014,"t":{"48":{"position":[[291,5]]}}}],["brows",{"_index":435,"t":{"28":{"position":[[262,7]]},"380":{"position":[[110,7]]}}}],["browse_websit",{"_index":2182,"t":{"406":{"position":[[687,14]]}}}],["browser",{"_index":434,"t":{"28":{"position":[[235,7]]},"117":{"position":[[579,7]]},"169":{"position":[[182,7]]},"177":{"position":[[194,7]]},"208":{"position":[[667,7]]},"238":{"position":[[175,7]]},"243":{"position":[[101,7]]},"245":{"position":[[167,8]]},"263":{"position":[[75,7],[165,7]]},"380":{"position":[[83,7]]},"390":{"position":[[495,7]]}}}],["build",{"_index":336,"t":{"20":{"position":[[85,9],[746,5]]},"22":{"position":[[615,9]]},"30":{"position":[[1311,8]]},"36":{"position":[[234,5],[1553,5],[3556,5]]},"42":{"position":[[2167,6]]},"95":{"position":[[197,5]]},"111":{"position":[[576,5]]},"117":{"position":[[250,5],[336,5]]},"208":{"position":[[338,5],[424,5]]},"217":{"position":[[3282,5]]},"390":{"position":[[252,5]]},"410":{"position":[[163,5],[231,5]]},"412":{"position":[[2104,9]]}}}],["built",{"_index":382,"t":{"22":{"position":[[156,5]]},"32":{"position":[[2099,6]]},"34":{"position":[[744,5]]},"97":{"position":[[229,5]]},"245":{"position":[[238,5]]},"418":{"position":[[330,5]]}}}],["bullshit",{"_index":1456,"t":{"161":{"position":[[2581,8]]}}}],["burn",{"_index":1077,"t":{"56":{"position":[[190,7]]},"234":{"position":[[756,7]]},"251":{"position":[[639,7]]}}}],["busi",{"_index":643,"t":{"34":{"position":[[598,8]]},"42":{"position":[[2074,8]]},"234":{"position":[[1096,8]]}}}],["button",{"_index":2091,"t":{"359":{"position":[[892,6]]}}}],["by=/usr/share/keyrings/dock",{"_index":1610,"t":{"217":{"position":[[662,29]]}}}],["ca",{"_index":1590,"t":{"217":{"position":[[367,2]]}}}],["call",{"_index":346,"t":{"20":{"position":[[319,8]]},"32":{"position":[[2176,6]]},"36":{"position":[[292,4],[421,8],[733,7],[1071,8],[1258,5],[2216,4],[3088,4],[4115,5],[4196,4],[4861,4],[4991,4]]},"99":{"position":[[124,5]]},"234":{"position":[[165,7]]},"394":{"position":[[615,7]]},"400":{"position":[[153,4]]}}}],["callback",{"_index":1824,"t":{"267":{"position":[[1209,8]]}}}],["came",{"_index":8,"t":{"2":{"position":[[88,4]]}}}],["campaign",{"_index":927,"t":{"42":{"position":[[1594,8]]}}}],["capabl",{"_index":942,"t":{"44":{"position":[[79,10]]},"60":{"position":[[576,12]]},"75":{"position":[[38,12]]},"125":{"position":[[529,13]]},"181":{"position":[[52,13],[392,13]]},"308":{"position":[[516,12]]}}}],["care",{"_index":575,"t":{"32":{"position":[[1033,4]]},"36":{"position":[[4160,4]]},"97":{"position":[[77,4]]},"418":{"position":[[426,4]]}}}],["carri",{"_index":114,"t":{"4":{"position":[[474,8]]}}}],["case",{"_index":7,"t":{"2":{"position":[[78,4]]},"22":{"position":[[409,4]]},"30":{"position":[[463,4]]},"34":{"position":[[624,6]]},"36":{"position":[[4050,5]]},"42":{"position":[[2087,5]]},"165":{"position":[[8,5]]},"186":{"position":[[171,5]]},"221":{"position":[[520,5]]},"257":{"position":[[252,4],[404,4]]},"259":{"position":[[3,4],[70,4]]},"261":{"position":[[80,6]]}}}],["casual",{"_index":1746,"t":{"251":{"position":[[856,9]]}}}],["catch",{"_index":795,"t":{"36":{"position":[[4969,5]]}}}],["caus",{"_index":143,"t":{"6":{"position":[[81,6]]},"32":{"position":[[427,5],[2951,5]]},"153":{"position":[[85,6]]}}}],["cd",{"_index":1275,"t":{"121":{"position":[[162,2]]},"392":{"position":[[0,2]]}}}],["ce",{"_index":1619,"t":{"217":{"position":[[932,2]]}}}],["certbot",{"_index":1646,"t":{"217":{"position":[[2544,7],[2631,7],[2720,7],[2790,7],[2956,7],[3026,8]]}}}],["certbot}serv",{"_index":1656,"t":{"217":{"position":[[2858,14]]}}}],["certif",{"_index":1591,"t":{"217":{"position":[[370,12]]}}}],["cfg",{"_index":2148,"t":{"394":{"position":[[309,3]]}}}],["chain",{"_index":930,"t":{"42":{"position":[[1892,5]]},"97":{"position":[[301,7]]},"184":{"position":[[192,7]]}}}],["challeng",{"_index":100,"t":{"4":{"position":[[312,10],[981,9]]},"6":{"position":[[12,9],[320,11]]},"10":{"position":[[92,9]]}}}],["chamber",{"_index":869,"t":{"40":{"position":[[784,8]]}}}],["chang",{"_index":880,"t":{"40":{"position":[[1018,6]]},"153":{"position":[[44,7],[103,8]]},"194":{"position":[[200,7]]},"217":{"position":[[1142,6]]},"232":{"position":[[448,6],[521,6],[593,6],[679,6],[788,6]]},"359":{"position":[[933,8]]},"384":{"position":[[3,6]]}}}],["charactertextsplitter(chunk_size=200",{"_index":1461,"t":{"161":{"position":[[2732,37]]}}}],["charactertextsplitterfrom",{"_index":1378,"t":{"161":{"position":[[76,25]]}}}],["chat",{"_index":1989,"t":{"330":{"position":[[210,4],[261,4],[316,4]]}}}],["chatgpt",{"_index":685,"t":{"36":{"position":[[542,7]]},"221":{"position":[[440,7]]}}}],["chatpdf",{"_index":848,"t":{"40":{"position":[[106,7]]}}}],["check",{"_index":371,"t":{"20":{"position":[[859,5]]},"30":{"position":[[3257,6]]},"32":{"position":[[3273,5]]},"36":{"position":[[788,5]]},"38":{"position":[[51,5],[103,5]]},"50":{"position":[[2590,5]]},"89":{"position":[[116,5]]},"95":{"position":[[136,5],[326,5]]},"97":{"position":[[488,5]]},"103":{"position":[[409,5]]},"109":{"position":[[0,5]]},"131":{"position":[[85,5]]},"141":{"position":[[418,5]]},"192":{"position":[[41,5]]},"194":{"position":[[263,5]]},"217":{"position":[[146,8]]},"232":{"position":[[158,5]]},"263":{"position":[[634,5]]},"408":{"position":[[187,5],[331,5],[482,5],[622,5],[754,5]]},"410":{"position":[[572,5]]},"418":{"position":[[596,5]]}}}],["check_google_api_key",{"_index":2195,"t":{"408":{"position":[[417,21]]}}}],["check_google_api_key(cfg",{"_index":2196,"t":{"408":{"position":[[443,25]]}}}],["check_openai_api_key",{"_index":2191,"t":{"408":{"position":[[122,21]]}}}],["check_openai_api_key(cfg",{"_index":2192,"t":{"408":{"position":[[148,25]]}}}],["check_searx_url",{"_index":2199,"t":{"408":{"position":[[699,16]]}}}],["check_searx_url(cfg",{"_index":2200,"t":{"408":{"position":[[720,20]]}}}],["check_serp_api_key",{"_index":2197,"t":{"408":{"position":[[561,19]]}}}],["check_serp_api_key(cfg",{"_index":2198,"t":{"408":{"position":[[585,23]]}}}],["check_tavily_api_key",{"_index":2193,"t":{"408":{"position":[[266,21]]}}}],["check_tavily_api_key(cfg",{"_index":2194,"t":{"408":{"position":[[292,25]]}}}],["chees",{"_index":1353,"t":{"143":{"position":[[1154,6],[1320,6],[1608,8]]}}}],["chief",{"_index":415,"t":{"26":{"position":[[48,5]]},"375":{"position":[[138,5]]}}}],["chiefeditor",{"_index":604,"t":{"32":{"position":[[2186,11]]}}}],["chip",{"_index":1783,"t":{"259":{"position":[[168,4]]}}}],["choic",{"_index":1734,"t":{"249":{"position":[[365,6]]},"365":{"position":[[46,6]]}}}],["choos",{"_index":653,"t":{"34":{"position":[[972,6]]},"77":{"position":[[159,6],[219,6]]},"238":{"position":[[8,6]]},"245":{"position":[[7,6]]},"249":{"position":[[501,6]]},"263":{"position":[[302,6]]},"318":{"position":[[65,6]]},"353":{"position":[[101,6],[215,6]]}}}],["chroma.from_documents(documents=split",{"_index":1004,"t":{"46":{"position":[[1745,39]]}}}],["chromadef",{"_index":967,"t":{"46":{"position":[[557,9]]}}}],["chrome",{"_index":1716,"t":{"243":{"position":[[118,7]]},"245":{"position":[[180,7]]},"263":{"position":[[68,6],[117,6],[154,6],[285,6],[589,6],[718,6]]}}}],["chromedriv",{"_index":1723,"t":{"245":{"position":[[188,12]]},"263":{"position":[[36,12],[679,12]]}}}],["chunk",{"_index":992,"t":{"46":{"position":[[1457,6]]},"48":{"position":[[503,6],[673,8]]},"165":{"position":[[723,7]]},"406":{"position":[[710,5]]}}}],["chunk_overlap=200)split",{"_index":996,"t":{"46":{"position":[[1557,24]]}}}],["chunk_overlap=30",{"_index":1462,"t":{"161":{"position":[[2770,17]]}}}],["chunk_siz",{"_index":1166,"t":{"89":{"position":[[324,10]]}}}],["circul",{"_index":496,"t":{"30":{"position":[[875,10]]}}}],["circular",{"_index":580,"t":{"32":{"position":[[1196,8]]}}}],["claim",{"_index":1450,"t":{"161":{"position":[[2352,8]]}}}],["class",{"_index":484,"t":{"30":{"position":[[506,5]]},"32":{"position":[[896,5]]},"60":{"position":[[19,5],[275,5],[556,5]]},"65":{"position":[[19,5]]},"67":{"position":[[19,5]]},"69":{"position":[[42,5]]},"71":{"position":[[19,5]]},"107":{"position":[[597,5]]},"111":{"position":[[153,5]]},"137":{"position":[[241,5]]},"139":{"position":[[416,6]]},"251":{"position":[[234,5]]},"400":{"position":[[0,5],[96,6]]},"402":{"position":[[0,5],[78,5],[120,6]]},"406":{"position":[[0,5],[53,5],[177,5]]},"408":{"position":[[0,5]]},"412":{"position":[[721,5]]}}}],["clean",{"_index":1516,"t":{"175":{"position":[[425,5]]}}}],["clear",{"_index":1823,"t":{"267":{"position":[[1203,5]]}}}],["cli",{"_index":1031,"t":{"50":{"position":[[449,3]]},"149":{"position":[[31,3]]}}}],["cli.pi",{"_index":1363,"t":{"149":{"position":[[46,6]]},"153":{"position":[[59,6],[207,6],[359,6]]}}}],["click",{"_index":1297,"t":{"131":{"position":[[119,5]]},"206":{"position":[[198,5]]},"243":{"position":[[356,9]]},"247":{"position":[[261,8]]},"263":{"position":[[439,5]]},"359":{"position":[[882,5]]},"418":{"position":[[252,5]]}}}],["client",{"_index":806,"t":{"36":{"position":[[5478,7]]},"267":{"position":[[286,7],[315,6]]}}}],["client.beta.assistants.cr",{"_index":723,"t":{"36":{"position":[[2296,30],[7278,30]]}}}],["client.beta.threads.create()print(f\"thread",{"_index":827,"t":{"36":{"position":[[7813,43]]}}}],["client.beta.threads.create()user_input",{"_index":737,"t":{"36":{"position":[[2855,38]]}}}],["client.beta.threads.messages.cr",{"_index":739,"t":{"36":{"position":[[2920,36],[8002,36]]}}}],["client.beta.threads.messages.list(thread_id=thread_id",{"_index":819,"t":{"36":{"position":[[7120,54]]}}}],["client.beta.threads.runs.cr",{"_index":743,"t":{"36":{"position":[[3121,32],[8116,32]]}}}],["client.beta.threads.runs.retrieve(thread_id=thread_id",{"_index":768,"t":{"36":{"position":[[3782,54],[6267,54]]}}}],["client.beta.threads.runs.submit_tool_output",{"_index":789,"t":{"36":{"position":[[4680,45],[6910,45]]}}}],["client_max_body_s",{"_index":1635,"t":{"217":{"position":[[1507,20],[2045,20]]}}}],["clilanggraph",{"_index":2138,"t":{"386":{"position":[[22,12]]}}}],["climat",{"_index":1372,"t":{"153":{"position":[[36,7],[95,7]]}}}],["clinic",{"_index":901,"t":{"42":{"position":[[491,8]]}}}],["clone",{"_index":1248,"t":{"117":{"position":[[33,5],[89,6]]},"147":{"position":[[0,5],[26,5]]},"186":{"position":[[78,5],[358,5],[384,5]]},"192":{"position":[[172,5],[198,5]]},"208":{"position":[[176,7],[237,6]]},"217":{"position":[[3219,5]]},"390":{"position":[[33,5],[89,6]]}}}],["close",{"_index":1244,"t":{"115":{"position":[[481,6]]},"267":{"position":[[1340,9]]},"388":{"position":[[477,6]]}}}],["cloud",{"_index":1242,"t":{"115":{"position":[[456,5]]},"388":{"position":[[452,5]]}}}],["code",{"_index":457,"t":{"28":{"position":[[1417,4]]},"30":{"position":[[3293,4]]},"36":{"position":[[379,4],[1029,4],[5372,5],[8717,6]]},"107":{"position":[[603,4]]},"184":{"position":[[101,5],[270,6]]},"192":{"position":[[66,4],[313,4]]},"200":{"position":[[29,4]]},"234":{"position":[[1076,4]]},"251":{"position":[[35,4]]},"330":{"position":[[87,5]]},"359":{"position":[[753,5]]},"394":{"position":[[38,4]]},"412":{"position":[[73,4]]}}}],["codebas",{"_index":1852,"t":{"271":{"position":[[434,8]]}}}],["cohere_api_key=[your",{"_index":2017,"t":{"338":{"position":[[0,20]]}}}],["cohes",{"_index":1088,"t":{"60":{"position":[[432,9]]}}}],["collabor",{"_index":650,"t":{"34":{"position":[[820,13]]},"103":{"position":[[396,12]]},"188":{"position":[[6,12]]},"410":{"position":[[541,13]]}}}],["collect",{"_index":433,"t":{"28":{"position":[[100,10]]},"48":{"position":[[253,12]]},"163":{"position":[[457,10]]},"377":{"position":[[77,10]]}}}],["collection_name='som",{"_index":1481,"t":{"163":{"position":[[435,21]]}}}],["collection_name=collection_nam",{"_index":1347,"t":{"143":{"position":[[667,32]]}}}],["combin",{"_index":855,"t":{"40":{"position":[[287,7],[1110,8]]},"42":{"position":[[3,9],[730,11],[866,7],[1902,7]]},"44":{"position":[[709,9]]},"60":{"position":[[403,9]]},"67":{"position":[[310,8]]},"75":{"position":[[19,7]]},"87":{"position":[[56,8],[300,8]]},"109":{"position":[[70,7]]},"141":{"position":[[8,7]]},"161":{"position":[[2314,7]]}}}],["come",{"_index":380,"t":{"22":{"position":[[138,5]]},"115":{"position":[[169,5],[520,6]]},"388":{"position":[[165,5],[516,6]]}}}],["comma",{"_index":2093,"t":{"363":{"position":[[353,7]]}}}],["command",{"_index":1503,"t":{"173":{"position":[[208,7],[684,8]]},"175":{"position":[[211,8],[718,8]]},"177":{"position":[[105,8]]},"214":{"position":[[105,8]]},"217":{"position":[[3057,9]]},"406":{"position":[[702,7]]}}}],["comment",{"_index":670,"t":{"34":{"position":[[1484,7]]},"36":{"position":[[8853,7]]},"117":{"position":[[169,7]]},"359":{"position":[[843,7]]},"390":{"position":[[169,7]]}}}],["commit",{"_index":1566,"t":{"206":{"position":[[483,10]]}}}],["common",{"_index":1551,"t":{"196":{"position":[[4,6]]},"217":{"position":[[408,6]]}}}],["commun",{"_index":578,"t":{"32":{"position":[[1109,11]]},"34":{"position":[[1404,10]]},"38":{"position":[[166,9]]},"48":{"position":[[820,10]]},"50":{"position":[[2134,9]]},"65":{"position":[[337,13]]},"103":{"position":[[335,10]]},"363":{"position":[[475,10]]}}}],["compani",{"_index":897,"t":{"42":{"position":[[395,7],[1160,7]]},"161":{"position":[[802,7],[1854,7],[2168,8],[2512,8]]}}}],["company'",{"_index":926,"t":{"42":{"position":[[1579,9]]}}}],["compar",{"_index":1050,"t":{"50":{"position":[[1595,7],[1916,7]]},"85":{"position":[[448,7]]}}}],["comparison",{"_index":1157,"t":{"87":{"position":[[207,11]]}}}],["compat",{"_index":1550,"t":{"194":{"position":[[291,13]]},"263":{"position":[[106,10],[358,10]]}}}],["competit",{"_index":1071,"t":{"52":{"position":[[578,11]]}}}],["competitor",{"_index":871,"t":{"40":{"position":[[837,10]]},"42":{"position":[[1287,10],[1942,10]]},"50":{"position":[[1996,10]]}}}],["compil",{"_index":428,"t":{"26":{"position":[[601,9]]},"28":{"position":[[1165,8]]},"375":{"position":[[655,9]]},"380":{"position":[[587,8]]}}}],["complement",{"_index":1290,"t":{"125":{"position":[[483,13]]}}}],["complement_source_url",{"_index":1306,"t":{"135":{"position":[[402,22]]}}}],["complement_source_urls=fals",{"_index":1310,"t":{"135":{"position":[[729,29]]}}}],["complet",{"_index":53,"t":{"2":{"position":[[657,9]]},"4":{"position":[[113,10],[737,10],[837,10],[938,10]]},"36":{"position":[[3912,13],[4067,9],[6397,13],[8244,8]]},"186":{"position":[[6,8]]},"223":{"position":[[378,8],[510,9]]},"234":{"position":[[1175,8]]},"249":{"position":[[449,12]]},"251":{"position":[[2068,10]]},"384":{"position":[[797,9]]}}}],["completedef",{"_index":764,"t":{"36":{"position":[[3694,11],[6179,11]]}}}],["complex",{"_index":1084,"t":{"60":{"position":[[150,7]]},"62":{"position":[[12,7]]},"71":{"position":[[101,7]]},"91":{"position":[[86,10]]},"157":{"position":[[45,10]]},"188":{"position":[[111,7]]},"190":{"position":[[157,10]]},"234":{"position":[[1194,7]]},"243":{"position":[[387,8]]}}}],["compon",{"_index":108,"t":{"4":{"position":[[382,11]]},"44":{"position":[[580,9]]},"60":{"position":[[75,9]]}}}],["compos",{"_index":1225,"t":{"111":{"position":[[562,7]]},"117":{"position":[[156,7],[237,7],[323,7],[419,7]]},"204":{"position":[[7,7]]},"208":{"position":[[325,7],[411,7],[507,7]]},"214":{"position":[[75,8]]},"217":{"position":[[3269,7]]},"390":{"position":[[156,7],[239,7],[335,7]]}}}],["comprehens",{"_index":35,"t":{"2":{"position":[[387,13],[1065,13]]},"10":{"position":[[116,13]]},"14":{"position":[[164,13]]},"52":{"position":[[160,14]]},"60":{"position":[[125,13]]},"62":{"position":[[109,13]]},"69":{"position":[[1023,13]]},"75":{"position":[[91,14]]},"87":{"position":[[21,13]]},"91":{"position":[[184,13]]},"181":{"position":[[369,13]]},"188":{"position":[[123,13]]},"308":{"position":[[438,13]]}}}],["compress",{"_index":1419,"t":{"161":{"position":[[1380,8]]}}}],["comput",{"_index":1412,"t":{"161":{"position":[[1247,8]]}}}],["con",{"_index":1529,"t":{"184":{"position":[[250,5]]},"186":{"position":[[233,5]]},"188":{"position":[[248,5]]}}}],["concept",{"_index":892,"t":{"42":{"position":[[310,8]]}}}],["concern",{"_index":404,"t":{"24":{"position":[[247,9]]},"131":{"position":[[10,9]]}}}],["conclud",{"_index":128,"t":{"4":{"position":[[858,9]]},"10":{"position":[[221,9]]}}}],["conclus",{"_index":15,"t":{"2":{"position":[[151,11]]},"14":{"position":[[868,12]]},"28":{"position":[[1229,10]]},"30":{"position":[[709,11]]},"161":{"position":[[3101,15]]},"221":{"position":[[18,11],[548,11],[656,11]]},"228":{"position":[[206,11]]},"380":{"position":[[651,10]]}}}],["conclusionconclus",{"_index":1908,"t":{"306":{"position":[[215,20]]}}}],["condit",{"_index":567,"t":{"32":{"position":[[438,10],[1205,9],[1286,11],[1916,11]]}}}],["conduc",{"_index":1524,"t":{"175":{"position":[[1187,9]]}}}],["conduct",{"_index":34,"t":{"2":{"position":[[379,7]]},"24":{"position":[[433,7]]},"26":{"position":[[295,8]]},"30":{"position":[[1721,7]]},"40":{"position":[[469,7],[1081,7],[1177,7]]},"44":{"position":[[93,7],[290,8],[684,7]]},"48":{"position":[[803,9]]},"50":{"position":[[721,7]]},"52":{"position":[[147,7]]},"56":{"position":[[370,7]]},"60":{"position":[[361,10]]},"62":{"position":[[53,8]]},"67":{"position":[[35,10],[151,8]]},"135":{"position":[[129,7],[285,7]]},"137":{"position":[[72,10]]},"139":{"position":[[492,7]]},"141":{"position":[[37,7]]},"161":{"position":[[3292,7]]},"163":{"position":[[827,7]]},"165":{"position":[[685,7]]},"251":{"position":[[1217,7]]},"306":{"position":[[6,10],[74,7]]},"373":{"position":[[251,7]]},"375":{"position":[[349,8]]},"384":{"position":[[606,7]]}}}],["confer",{"_index":1874,"t":{"278":{"position":[[24,11]]}}}],["config",{"_index":1630,"t":{"217":{"position":[[1432,6]]},"251":{"position":[[903,6]]},"394":{"position":[[315,8]]},"406":{"position":[[170,6]]},"412":{"position":[[495,6],[509,6],[518,8],[620,7],[799,6]]}}}],["config(metaclass=singleton",{"_index":2168,"t":{"406":{"position":[[6,27]]}}}],["config.pi",{"_index":2190,"t":{"408":{"position":[[81,9],[225,9],[376,9],[520,9],[658,9],[787,9]]}}}],["config_path",{"_index":1099,"t":{"65":{"position":[[211,12]]},"251":{"position":[[872,11]]}}}],["config_path=\"path/to/config.yaml",{"_index":1123,"t":{"69":{"position":[[473,34]]}}}],["config_path=config_path",{"_index":1749,"t":{"251":{"position":[[1122,24]]}}}],["config_path=non",{"_index":517,"t":{"30":{"position":[[1701,17]]},"56":{"position":[[350,17]]}}}],["configfrom",{"_index":2144,"t":{"394":{"position":[[169,10]]},"412":{"position":[[243,10]]}}}],["configur",{"_index":1035,"t":{"50":{"position":[[604,14]]},"65":{"position":[[236,13]]},"147":{"position":[[292,15]]},"173":{"position":[[62,14]]},"206":{"position":[[389,10]]},"232":{"position":[[85,13],[223,13],[304,14]]},"324":{"position":[[30,9]]},"406":{"position":[[39,13]]},"412":{"position":[[574,13]]}}}],["conflict",{"_index":1175,"t":{"91":{"position":[[405,11],[632,9]]},"175":{"position":[[487,9],[969,9]]},"263":{"position":[[605,10]]}}}],["connect",{"_index":556,"t":{"30":{"position":[[3197,7]]},"95":{"position":[[66,7]]},"217":{"position":[[1661,10],[1924,10],[2199,10],[2462,10]]},"267":{"position":[[182,11],[837,10],[1329,10],[2111,13]]},"357":{"position":[[544,10],[1016,10]]}}}],["connection=connection_str",{"_index":1482,"t":{"163":{"position":[[475,29]]}}}],["connection=engin",{"_index":1348,"t":{"143":{"position":[[700,18]]}}}],["consensu",{"_index":849,"t":{"40":{"position":[[118,10]]}}}],["consid",{"_index":478,"t":{"30":{"position":[[392,11]]},"163":{"position":[[611,10]]},"221":{"position":[[468,8]]}}}],["consist",{"_index":106,"t":{"4":{"position":[[366,8]]},"26":{"position":[[18,8]]},"30":{"position":[[3055,8]]},"175":{"position":[[339,10]]}}}],["consol",{"_index":2137,"t":{"384":{"position":[[1018,8]]}}}],["console.error('websocket",{"_index":1828,"t":{"267":{"position":[[1398,24]]}}}],["console.log('messag",{"_index":1842,"t":{"267":{"position":[[1985,20],[2079,20]]}}}],["console.log('receiv",{"_index":1825,"t":{"267":{"position":[[1239,21]]}}}],["console.log('respons",{"_index":1848,"t":{"267":{"position":[[2448,24]]}}}],["console.log('websocket",{"_index":1812,"t":{"267":{"position":[[814,22],[935,22],[1306,22]]}}}],["conspiraci",{"_index":1757,"t":{"251":{"position":[[1763,10],[1895,10]]}}}],["const",{"_index":1801,"t":{"267":{"position":[[561,5],[693,5],[724,5],[898,5],[1612,5],[1762,5],[2243,5],[2324,5],[2396,5]]}}}],["constantli",{"_index":48,"t":{"2":{"position":[[592,10]]},"99":{"position":[[98,10]]},"103":{"position":[[6,10]]},"410":{"position":[[14,10]]}}}],["consum",{"_index":1535,"t":{"188":{"position":[[278,9]]},"293":{"position":[[31,8]]}}}],["contact",{"_index":1202,"t":{"103":{"position":[[450,7]]}}}],["contain",{"_index":1478,"t":{"163":{"position":[[256,8]]},"200":{"position":[[16,8],[145,9]]},"217":{"position":[[293,14]]},"384":{"position":[[112,8]]}}}],["content",{"_index":160,"t":{"6":{"position":[[386,7],[745,8],[795,7],[923,7],[1070,7]]},"14":{"position":[[538,7]]},"30":{"position":[[858,8]]},"60":{"position":[[214,7],[658,8]]},"62":{"position":[[158,9],[226,7]]},"67":{"position":[[246,7],[357,9]]},"71":{"position":[[223,7],[339,7]]},"101":{"position":[[449,7]]},"221":{"position":[[499,7]]},"234":{"position":[[932,7],[972,8]]},"241":{"position":[[133,7],[164,7],[361,7],[399,7]]},"243":{"position":[[195,7],[303,7]]},"247":{"position":[[67,7],[199,7],[283,7]]},"249":{"position":[[241,8]]},"251":{"position":[[1632,10]]},"291":{"position":[[108,8]]},"297":{"position":[[55,8]]},"308":{"position":[[165,8]]},"357":{"position":[[603,10]]},"369":{"position":[[164,8],[239,8]]},"394":{"position":[[424,10]]}}}],["content=user_input",{"_index":742,"t":{"36":{"position":[[2991,20],[8073,19]]}}}],["context",{"_index":55,"t":{"2":{"position":[[710,7]]},"10":{"position":[[335,7]]},"30":{"position":[[321,7]]},"36":{"position":[[2198,9]]},"40":{"position":[[567,8]]},"42":{"position":[[124,8],[716,8],[1400,7]]},"52":{"position":[[175,7],[334,8]]},"75":{"position":[[106,7]]},"91":{"position":[[521,7]]},"101":{"position":[[380,7]]},"165":{"position":[[707,7],[824,7]]},"223":{"position":[[366,8]]},"228":{"position":[[340,7]]},"234":{"position":[[900,7]]},"273":{"position":[[667,8]]},"291":{"position":[[0,7]]},"308":{"position":[[25,7]]}}}],["contextcontext",{"_index":1914,"t":{"308":{"position":[[93,14]]}}}],["contextu",{"_index":856,"t":{"40":{"position":[[346,10]]}}}],["continu",{"_index":232,"t":{"8":{"position":[[901,8]]},"14":{"position":[[85,9]]},"36":{"position":[[8346,8]]},"418":{"position":[[239,12]]}}}],["contribut",{"_index":839,"t":{"38":{"position":[[0,10],[29,14],[61,12]]},"369":{"position":[[388,10]]},"410":{"position":[[558,13],[586,12]]}}}],["control",{"_index":387,"t":{"22":{"position":[[266,15]]},"34":{"position":[[382,7]]},"175":{"position":[[1164,10]]},"217":{"position":[[59,7]]}}}],["convers",{"_index":701,"t":{"36":{"position":[[1117,13],[1368,12],[7877,12]]},"410":{"position":[[454,14]]}}}],["coordin",{"_index":420,"t":{"26":{"position":[[147,11]]},"375":{"position":[[237,11]]}}}],["copi",{"_index":228,"t":{"8":{"position":[[801,4]]},"10":{"position":[[966,4]]},"30":{"position":[[756,4],[1194,4],[1867,4],[2977,4]]},"32":{"position":[[991,4],[1895,4],[2842,4]]},"36":{"position":[[2100,4],[2741,4],[3012,4],[3203,4],[3967,4],[4795,4],[5207,4],[8610,4]]},"46":{"position":[[2026,4]]},"50":{"position":[[208,4],[544,4],[1801,4]]},"56":{"position":[[562,4]]},"69":{"position":[[927,4]]},"79":{"position":[[27,4]]},"81":{"position":[[140,4],[325,4]]},"85":{"position":[[654,4]]},"107":{"position":[[321,4]]},"109":{"position":[[113,4]]},"111":{"position":[[514,4]]},"117":{"position":[[256,4],[342,4]]},"119":{"position":[[170,4],[220,4]]},"121":{"position":[[172,4],[229,4],[287,4],[330,4]]},"135":{"position":[[1255,4]]},"137":{"position":[[812,4]]},"139":{"position":[[354,4],[1037,4]]},"143":{"position":[[1752,4]]},"147":{"position":[[100,4],[172,4]]},"149":{"position":[[91,4]]},"153":{"position":[[142,4],[299,4],[442,4]]},"161":{"position":[[3405,4]]},"163":{"position":[[940,4]]},"165":{"position":[[989,4]]},"169":{"position":[[64,4],[133,4]]},"173":{"position":[[267,4],[396,4],[517,4],[735,4]]},"175":{"position":[[630,4],[1248,4]]},"177":{"position":[[150,4]]},"184":{"position":[[376,4]]},"204":{"position":[[60,4]]},"208":{"position":[[344,4],[430,4]]},"217":{"position":[[1409,4],[1980,4],[3035,4],[3288,4]]},"232":{"position":[[987,4]]},"234":{"position":[[828,4]]},"238":{"position":[[148,4],[219,4]]},"245":{"position":[[118,4]]},"251":{"position":[[1411,4],[1955,4]]},"267":{"position":[[2184,4],[2485,4]]},"271":{"position":[[195,4],[336,4],[390,4]]},"273":{"position":[[932,4]]},"276":{"position":[[94,4]]},"278":{"position":[[76,4]]},"280":{"position":[[96,4]]},"283":{"position":[[725,4]]},"285":{"position":[[78,4],[835,4],[865,4],[985,4]]},"289":{"position":[[119,4]]},"291":{"position":[[170,4]]},"293":{"position":[[109,4]]},"295":{"position":[[113,4]]},"297":{"position":[[129,4]]},"299":{"position":[[85,4]]},"301":{"position":[[126,4]]},"304":{"position":[[297,4]]},"306":{"position":[[460,4]]},"308":{"position":[[428,4]]},"312":{"position":[[218,4]]},"314":{"position":[[352,4],[610,4]]},"316":{"position":[[690,4]]},"318":{"position":[[300,4]]},"324":{"position":[[266,4]]},"326":{"position":[[269,4]]},"328":{"position":[[270,4]]},"330":{"position":[[377,4]]},"332":{"position":[[383,4]]},"334":{"position":[[284,4]]},"336":{"position":[[190,4]]},"338":{"position":[[160,4]]},"340":{"position":[[351,4]]},"342":{"position":[[181,4]]},"344":{"position":[[79,4]]},"347":{"position":[[40,4]]},"349":{"position":[[59,4]]},"355":{"position":[[292,4]]},"357":{"position":[[854,4]]},"359":{"position":[[561,4],[838,4]]},"363":{"position":[[283,4],[456,4]]},"367":{"position":[[97,4]]},"369":{"position":[[262,4]]},"382":{"position":[[59,4],[182,4],[223,4]]},"384":{"position":[[1435,4]]},"386":{"position":[[38,4]]},"390":{"position":[[258,4]]},"392":{"position":[[88,4]]},"394":{"position":[[677,4]]},"400":{"position":[[35,4],[148,4]]},"402":{"position":[[54,4]]},"406":{"position":[[34,4],[150,4],[246,4],[346,4],[449,4],[555,4],[674,4],[797,4],[888,4]]},"408":{"position":[[29,4],[182,4],[326,4],[477,4],[617,4],[749,4]]},"412":{"position":[[1668,4],[2185,4]]}}}],["core",{"_index":891,"t":{"42":{"position":[[305,4]]}}}],["corn",{"_index":1414,"t":{"161":{"position":[[1282,4]]}}}],["coroutin",{"_index":216,"t":{"8":{"position":[[587,9]]}}}],["corpor",{"_index":1439,"t":{"161":{"position":[[1930,9],[2438,9],[2571,9]]}}}],["correct",{"_index":424,"t":{"26":{"position":[[435,11]]},"28":{"position":[[973,11]]},"34":{"position":[[360,12]]},"48":{"position":[[877,11]]},"50":{"position":[[2222,11]]},"175":{"position":[[1107,7]]},"249":{"position":[[48,7]]},"375":{"position":[[489,11]]},"380":{"position":[[421,11]]}}}],["correctli",{"_index":1159,"t":{"89":{"position":[[41,9]]},"157":{"position":[[211,10]]},"206":{"position":[[400,10]]},"369":{"position":[[33,10]]},"394":{"position":[[117,10]]}}}],["correspond",{"_index":1795,"t":{"263":{"position":[[452,13]]},"291":{"position":[[94,13]]},"326":{"position":[[80,13]]},"328":{"position":[[47,13]]},"330":{"position":[[105,13]]}}}],["corrupt",{"_index":1162,"t":{"89":{"position":[[185,10]]}}}],["cost",{"_index":1193,"t":{"99":{"position":[[37,5],[140,5]]},"223":{"position":[[420,5],[524,5]]},"273":{"position":[[676,6],[794,8]]},"293":{"position":[[0,5]]},"301":{"position":[[17,5],[72,5]]}}}],["coupl",{"_index":1984,"t":{"330":{"position":[[71,6]]}}}],["crawler",{"_index":286,"t":{"12":{"position":[[269,7]]},"223":{"position":[[754,7]]}}}],["creat",{"_index":28,"t":{"2":{"position":[[290,7],[997,7]]},"4":{"position":[[556,6]]},"6":{"position":[[1405,6]]},"8":{"position":[[85,6],[561,6]]},"22":{"position":[[48,8],[112,6],[197,8],[303,8],[476,6]]},"30":{"position":[[1900,7],[2016,8],[2997,8]]},"32":{"position":[[518,6],[1185,6]]},"36":{"position":[[911,6],[1080,6],[2137,6],[2265,6],[7247,6],[7789,6],[7975,6],[8097,6]]},"40":{"position":[[755,8]]},"46":{"position":[[1627,6]]},"48":{"position":[[155,7]]},"50":{"position":[[907,7]]},"60":{"position":[[195,8]]},"67":{"position":[[401,6]]},"69":{"position":[[965,6]]},"83":{"position":[[0,6]]},"139":{"position":[[376,6]]},"147":{"position":[[212,6]]},"153":{"position":[[147,6]]},"161":{"position":[[3117,6]]},"163":{"position":[[534,6],[651,6]]},"165":{"position":[[527,6]]},"173":{"position":[[77,6]]},"175":{"position":[[137,6]]},"206":{"position":[[135,6]]},"221":{"position":[[619,6]]},"223":{"position":[[285,7],[556,6]]},"271":{"position":[[223,6]]},"314":{"position":[[0,6]]},"316":{"position":[[96,6]]},"357":{"position":[[351,6]]},"412":{"position":[[663,6]]}}}],["create_chat_complet",{"_index":2149,"t":{"394":{"position":[[344,23]]}}}],["create_chat_completionimport",{"_index":2145,"t":{"394":{"position":[[212,28]]}}}],["create_engine(connection_str",{"_index":1342,"t":{"143":{"position":[[526,32]]}}}],["create_engineimport",{"_index":1336,"t":{"143":{"position":[[338,19]]}}}],["creation",{"_index":1469,"t":{"161":{"position":[[3037,9]]}}}],["creator",{"_index":1139,"t":{"71":{"position":[[347,9]]}}}],["criteria",{"_index":153,"t":{"6":{"position":[[274,9]]},"26":{"position":[[486,9]]},"375":{"position":[[540,9]]},"380":{"position":[[461,8]]}}}],["crucial",{"_index":150,"t":{"6":{"position":[[234,7]]},"28":{"position":[[351,7]]},"40":{"position":[[812,7]]},"46":{"position":[[116,7]]},"263":{"position":[[544,7]]},"418":{"position":[[63,7]]}}}],["cs",{"_index":1613,"t":{"217":{"position":[[769,3]]}}}],["csv",{"_index":688,"t":{"36":{"position":[[610,3]]},"107":{"position":[[144,4]]},"139":{"position":[[164,4]]}}}],["curl",{"_index":1592,"t":{"217":{"position":[[383,4]]},"285":{"position":[[886,4]]}}}],["current",{"_index":146,"t":{"6":{"position":[[144,9]]},"10":{"position":[[257,9]]},"20":{"position":[[204,7],[713,7]]},"36":{"position":[[338,9]]},"42":{"position":[[1636,7]]},"50":{"position":[[1973,7]]},"91":{"position":[[267,10]]},"103":{"position":[[71,9]]},"107":{"position":[[89,9]]},"115":{"position":[[467,10]]},"139":{"position":[[109,9]]},"221":{"position":[[132,7],[277,7]]},"263":{"position":[[570,7]]},"388":{"position":[[463,10]]},"412":{"position":[[566,7],[1416,7]]}}}],["current_subtopic=\"subtop",{"_index":1917,"t":{"308":{"position":[[293,26]]}}}],["custom",{"_index":388,"t":{"22":{"position":[[312,6],[373,10],[493,10]]},"32":{"position":[[2346,10]]},"36":{"position":[[958,6],[8644,10]]},"42":{"position":[[1266,8],[1714,10]]},"52":{"position":[[413,10]]},"111":{"position":[[233,6]]},"186":{"position":[[278,6]]},"188":{"position":[[185,10]]},"190":{"position":[[98,13]]},"251":{"position":[[214,6],[477,6],[957,6],[1520,9]]},"304":{"position":[[8,9]]},"312":{"position":[[10,6]]},"314":{"position":[[54,6],[104,6],[177,6],[234,6],[361,6],[419,6],[492,6],[553,6]]},"353":{"position":[[89,6]]},"357":{"position":[[13,6],[60,6],[1037,6]]},"359":{"position":[[59,6],[128,6]]},"365":{"position":[[21,6],[97,6],[374,6]]},"369":{"position":[[8,6]]},"384":{"position":[[33,9]]}}}],["custom:{your",{"_index":1932,"t":{"314":{"position":[[383,13]]}}}],["custom_logs_handl",{"_index":1747,"t":{"251":{"position":[[974,19]]}}}],["custom_report",{"_index":1318,"t":{"137":{"position":[[255,15],[596,15]]},"151":{"position":[[276,13]]}}}],["customiz",{"_index":405,"t":{"24":{"position":[[257,16]]},"97":{"position":[[395,12]]},"125":{"position":[[265,12]]}}}],["customlogshandl",{"_index":1737,"t":{"251":{"position":[[190,18],[996,19],[1484,17]]}}}],["cycl",{"_index":600,"t":{"32":{"position":[[2022,5],[2433,8]]},"384":{"position":[[1069,8]]}}}],["cyclic",{"_index":379,"t":{"22":{"position":[[119,8]]}}}],["dash",{"_index":1252,"t":{"117":{"position":[[310,5]]},"208":{"position":[[398,5]]}}}],["data",{"_index":432,"t":{"28":{"position":[[95,4],[478,4]]},"30":{"position":[[408,4],[870,4],[951,4]]},"32":{"position":[[482,4]]},"34":{"position":[[562,4]]},"36":{"position":[[581,4]]},"40":{"position":[[643,5],[714,4]]},"42":{"position":[[506,4],[899,4],[1247,4],[1603,4],[1817,5],[1920,4]]},"44":{"position":[[464,4]]},"52":{"position":[[56,4],[506,4]]},"87":{"position":[[241,4]]},"91":{"position":[[128,4],[664,4],[846,5]]},"103":{"position":[[164,4]]},"165":{"position":[[53,4]]},"241":{"position":[[190,4]]},"243":{"position":[[229,4]]},"249":{"position":[[469,4]]},"251":{"position":[[255,8],[326,4],[357,5],[401,4],[453,4],[489,8],[1420,4]]},"267":{"position":[[904,4],[958,4],[975,6],[1261,7],[1269,6],[1618,4]]},"377":{"position":[[72,4]]}}}],["data.cont",{"_index":1816,"t":{"267":{"position":[[985,13]]}}}],["data.csv",{"_index":990,"t":{"46":{"position":[[1410,13]]}}}],["data.output.rubber_ducker_thought",{"_index":1818,"t":{"267":{"position":[[1024,34]]}}}],["data.output.tech_lead_review",{"_index":1820,"t":{"267":{"position":[[1075,28]]}}}],["databas",{"_index":1000,"t":{"46":{"position":[[1672,8]]},"48":{"position":[[474,9]]}}}],["dataset",{"_index":147,"t":{"6":{"position":[[165,8]]}}}],["date",{"_index":144,"t":{"6":{"position":[[117,4]]},"28":{"position":[[412,4]]},"30":{"position":[[658,5]]},"42":{"position":[[657,4]]},"161":{"position":[[559,5]]}}}],["day",{"_index":296,"t":{"14":{"position":[[208,3],[215,3]]}}}],["deactiv",{"_index":1508,"t":{"173":{"position":[[404,10],[458,12],[506,10]]}}}],["deal",{"_index":759,"t":{"36":{"position":[[3489,7]]},"46":{"position":[[129,7]]}}}],["dearmor",{"_index":1600,"t":{"217":{"position":[[520,7]]}}}],["deb",{"_index":1607,"t":{"217":{"position":[[615,4]]}}}],["debug",{"_index":1299,"t":{"131":{"position":[[175,10]]},"406":{"position":[[901,5]]}}}],["decis",{"_index":877,"t":{"40":{"position":[[985,10]]},"42":{"position":[[786,8],[1000,10]]},"50":{"position":[[2404,9]]},"52":{"position":[[75,8],[518,10]]}}}],["dedic",{"_index":1522,"t":{"175":{"position":[[832,9]]}}}],["deeper",{"_index":945,"t":{"44":{"position":[[195,6]]}}}],["def",{"_index":509,"t":{"30":{"position":[[1514,3],[1545,3],[2086,3]]},"32":{"position":[[1311,3]]},"50":{"position":[[1252,3]]},"56":{"position":[[60,3]]},"69":{"position":[[202,3],[780,3]]},"85":{"position":[[106,3]]},"135":{"position":[[575,3]]},"137":{"position":[[344,3]]},"139":{"position":[[596,3]]},"143":{"position":[[781,3]]},"234":{"position":[[274,3],[512,3]]},"251":{"position":[[264,3],[337,3],[538,3]]},"273":{"position":[[60,3]]},"283":{"position":[[135,3]]},"285":{"position":[[243,3]]},"357":{"position":[[628,3]]},"394":{"position":[[297,3]]},"400":{"position":[[113,3]]},"406":{"position":[[127,3],[203,3],[302,3],[404,3],[509,3],[622,3],[754,3],[848,3]]},"408":{"position":[[144,3],[288,3],[439,3],[581,3],[716,3]]},"412":{"position":[[445,3],[743,3]]}}}],["default",{"_index":1253,"t":{"117":{"position":[[359,8]]},"135":{"position":[[434,7]]},"208":{"position":[[447,8]]},"212":{"position":[[4,7]]},"238":{"position":[[262,7]]},"243":{"position":[[129,8]]},"363":{"position":[[15,8],[548,7]]},"390":{"position":[[275,8]]}}}],["defin",{"_index":468,"t":{"30":{"position":[[147,6],[474,6],[2288,6]]},"32":{"position":[[737,6],[855,6],[1903,8],[2999,7],[3048,7]]},"36":{"position":[[945,8],[1714,6]]},"251":{"position":[[551,6]]},"412":{"position":[[1149,6]]}}}],["degre",{"_index":386,"t":{"22":{"position":[[256,6]]}}}],["delet",{"_index":1237,"t":{"115":{"position":[[261,8]]},"388":{"position":[[257,8]]}}}],["deliv",{"_index":1946,"t":{"320":{"position":[[75,7]]}}}],["demo",{"_index":1188,"t":{"95":{"position":[[336,5]]},"119":{"position":[[257,5]]},"121":{"position":[[440,5]]},"226":{"position":[[33,4]]}}}],["demonstr",{"_index":690,"t":{"36":{"position":[[636,11]]},"50":{"position":[[77,11]]},"69":{"position":[[945,12]]},"251":{"position":[[504,14]]}}}],["dep",{"_index":1280,"t":{"121":{"position":[[282,4]]}}}],["depend",{"_index":1186,"t":{"95":{"position":[[10,7]]},"121":{"position":[[242,13]]},"147":{"position":[[126,13]]},"157":{"position":[[28,9]]},"169":{"position":[[17,12]]},"173":{"position":[[534,12],[620,12]]},"175":{"position":[[24,12],[105,12],[295,12],[462,13],[557,10],[929,12],[1127,12]]},"181":{"position":[[444,9]]}}}],["deploy",{"_index":337,"t":{"20":{"position":[[108,9]]},"95":{"position":[[207,6]]},"123":{"position":[[42,11]]},"232":{"position":[[607,10],[706,10],[815,10]]},"316":{"position":[[103,11],[341,6],[539,10]]},"353":{"position":[[6,9]]},"355":{"position":[[7,6]]},"359":{"position":[[41,6],[116,9],[170,6]]}}}],["deploymentazure_openai_api_key=\"[your",{"_index":1689,"t":{"232":{"position":[[475,37]]}}}],["depsnpm",{"_index":2142,"t":{"392":{"position":[[72,7]]}}}],["depth",{"_index":261,"t":{"10":{"position":[[711,6]]},"24":{"position":[[79,5]]},"26":{"position":[[307,5]]},"28":{"position":[[772,5],[913,5]]},"60":{"position":[[375,5]]},"62":{"position":[[65,5]]},"71":{"position":[[67,6]]},"151":{"position":[[219,5]]},"373":{"position":[[74,5]]},"375":{"position":[[361,5]]},"380":{"position":[[344,5]]}}}],["descript",{"_index":729,"t":{"36":{"position":[[2466,14],[2609,14],[7448,14],[7591,14]]}}}],["design",{"_index":477,"t":{"30":{"position":[[384,7]]},"40":{"position":[[65,8]]},"60":{"position":[[104,8]]},"103":{"position":[[131,6]]},"125":{"position":[[350,7]]},"320":{"position":[[63,8]]},"412":{"position":[[1188,7],[1818,6],[1910,7],[2055,6],[2151,6]]}}}],["desir",{"_index":1126,"t":{"69":{"position":[[603,7]]},"263":{"position":[[422,7]]}}}],["desktop",{"_index":1568,"t":{"208":{"position":[[50,7],[120,8]]}}}],["detail",{"_index":254,"t":{"10":{"position":[[402,8],[595,8]]},"44":{"position":[[24,8]]},"60":{"position":[[442,8]]},"67":{"position":[[418,8]]},"71":{"position":[[376,9]]},"87":{"position":[[188,8]]},"121":{"position":[[418,8]]},"137":{"position":[[675,8]]},"151":{"position":[[205,8]]},"153":{"position":[[156,8]]},"181":{"position":[[278,8]]},"186":{"position":[[182,8],[570,8]]},"188":{"position":[[175,9]]},"221":{"position":[[359,8]]},"228":{"position":[[87,8]]},"299":{"position":[[41,8]]},"384":{"position":[[997,8]]}}}],["detailed_report",{"_index":1115,"t":{"69":{"position":[[245,15]]},"151":{"position":[[188,16]]},"153":{"position":[[283,15]]}}}],["detailed_report.run",{"_index":1128,"t":{"69":{"position":[[678,21]]}}}],["detailedreport",{"_index":1083,"t":{"60":{"position":[[4,14]]},"65":{"position":[[4,14]]},"67":{"position":[[4,14]]},"69":{"position":[[27,14],[263,15],[974,14]]},"71":{"position":[[4,14]]}}}],["detailedreportasync",{"_index":1113,"t":{"69":{"position":[[182,19]]}}}],["detergent?th",{"_index":1417,"t":{"161":{"position":[[1302,13]]}}}],["determin",{"_index":1515,"t":{"175":{"position":[[272,9]]},"221":{"position":[[634,11]]}}}],["determinist",{"_index":85,"t":{"4":{"position":[[58,13],[629,17],[783,13]]},"6":{"position":[[1417,14]]},"34":{"position":[[394,13]]}}}],["dev",{"_index":1281,"t":{"121":{"position":[[326,3]]},"257":{"position":[[477,3]]},"392":{"position":[[84,3]]}}}],["dev/nul",{"_index":1616,"t":{"217":{"position":[[830,12]]}}}],["dev_team",{"_index":1834,"t":{"267":{"position":[[1655,11]]}}}],["dev_team_result",{"_index":1817,"t":{"267":{"position":[[1003,17]]}}}],["devday",{"_index":673,"t":{"36":{"position":[[47,6]]}}}],["develop",{"_index":384,"t":{"22":{"position":[[233,10],[541,9]]},"24":{"position":[[286,11]]},"30":{"position":[[136,10],[1296,11]]},"36":{"position":[[220,10]]},"42":{"position":[[426,11]]},"111":{"position":[[207,9]]},"121":{"position":[[298,11]]},"161":{"position":[[1168,10]]},"175":{"position":[[363,11],[852,11],[1210,11]]},"190":{"position":[[193,10]]},"217":{"position":[[239,11]]},"276":{"position":[[16,12]]},"410":{"position":[[277,10]]}}}],["devic",{"_index":1288,"t":{"125":{"position":[[392,8]]}}}],["devis",{"_index":109,"t":{"4":{"position":[[401,8]]}}}],["dhparams.pem",{"_index":1655,"t":{"217":{"position":[[2831,13]]}}}],["diagram",{"_index":2132,"t":{"380":{"position":[[47,8]]}}}],["dict",{"_index":486,"t":{"30":{"position":[[544,4],[653,4]]},"32":{"position":[[931,4],[954,4],[1359,6]]},"251":{"position":[[121,5]]},"283":{"position":[[183,5]]}}}],["dict[str",{"_index":1341,"t":{"143":{"position":[[500,9]]},"251":{"position":[[363,9]]}}}],["dictfrom",{"_index":1330,"t":{"143":{"position":[[174,8]]}}}],["differ",{"_index":935,"t":{"42":{"position":[[2021,9]]},"46":{"position":[[74,9]]},"91":{"position":[[496,11]]},"406":{"position":[[91,9]]}}}],["digitalocean",{"_index":1573,"t":{"212":{"position":[[37,12]]}}}],["direct",{"_index":599,"t":{"32":{"position":[[1951,6]]},"137":{"position":[[135,9]]}}}],["directori",{"_index":1038,"t":{"50":{"position":[[897,9],[1106,9]]},"83":{"position":[[9,9],[126,10]]},"115":{"position":[[39,10]]},"121":{"position":[[151,10]]},"155":{"position":[[69,10]]},"384":{"position":[[91,10],[559,10]]},"388":{"position":[[35,10]]}}}],["disabl",{"_index":2084,"t":{"359":{"position":[[566,7]]}}}],["discord",{"_index":668,"t":{"34":{"position":[[1396,7]]},"38":{"position":[[158,7]]}}}],["discrep",{"_index":1178,"t":{"91":{"position":[[540,13]]}}}],["discuss",{"_index":576,"t":{"32":{"position":[[1054,10]]},"267":{"position":[[25,7]]}}}],["display",{"_index":1232,"t":{"115":{"position":[[102,7]]},"125":{"position":[[213,8]]},"241":{"position":[[441,7]]},"388":{"position":[[98,7]]},"412":{"position":[[130,7]]}}}],["disrupt",{"_index":292,"t":{"14":{"position":[[67,11],[242,7]]},"34":{"position":[[1226,10]]},"40":{"position":[[77,7]]}}}],["dive",{"_index":456,"t":{"28":{"position":[[1399,4]]},"30":{"position":[[3423,4]]},"44":{"position":[[10,4]]}}}],["divers",{"_index":953,"t":{"46":{"position":[[142,7]]}}}],["divid",{"_index":110,"t":{"4":{"position":[[420,6]]},"30":{"position":[[789,7]]}}}],["do",{"_index":395,"t":{"22":{"position":[[566,5]]}}}],["doc",{"_index":1011,"t":{"46":{"position":[[1980,3]]},"50":{"position":[[892,4],[1101,4]]},"83":{"position":[[28,4]]},"107":{"position":[[315,5]]},"139":{"position":[[348,5]]},"141":{"position":[[340,3]]},"192":{"position":[[57,4]]},"324":{"position":[[303,3]]}}}],["doc_path",{"_index":1207,"t":{"107":{"position":[[227,8]]},"139":{"position":[[247,8]]},"384":{"position":[[673,8]]}}}],["doc_path=\"./mi",{"_index":1208,"t":{"107":{"position":[[300,14]]},"139":{"position":[[333,14]]}}}],["docker",{"_index":1224,"t":{"111":{"position":[[555,6]]},"117":{"position":[[17,6],[149,6],[222,7],[230,6],[316,6],[412,6]]},"200":{"position":[[138,6]]},"204":{"position":[[0,6]]},"208":{"position":[[0,7],[43,6],[310,7],[318,6],[404,6],[500,6]]},"214":{"position":[[60,7],[68,6]]},"217":{"position":[[204,9],[214,6],[925,6],[948,6],[990,9],[1033,6],[1053,6],[1090,6],[3262,6]]},"390":{"position":[[17,6],[149,6],[222,7],[232,6],[328,6]]}}}],["docker:sudo",{"_index":1617,"t":{"217":{"position":[[886,11]]}}}],["docker’",{"_index":1594,"t":{"217":{"position":[[425,8]]}}}],["docsretriever=googlegoogle_api_key=google_cx_key",{"_index":1223,"t":{"111":{"position":[[464,49]]}}}],["document",{"_index":850,"t":{"40":{"position":[[163,10],[314,8],[515,10]]},"42":{"position":[[139,9],[687,9],[1419,9]]},"44":{"position":[[355,10],[524,9],[610,8],[764,8]]},"46":{"position":[[32,8],[156,10],[601,9],[1275,10],[1434,9]]},"48":{"position":[[46,10],[688,9]]},"50":{"position":[[765,13],[1081,9],[1156,9],[2077,9],[2604,13],[2661,9]]},"75":{"position":[[62,8]]},"83":{"position":[[82,9]]},"87":{"position":[[111,10]]},"89":{"position":[[91,8],[138,9],[221,9],[342,8]]},"91":{"position":[[741,9]]},"95":{"position":[[161,14],[298,14]]},"97":{"position":[[502,13]]},"107":{"position":[[78,10],[187,10],[270,9],[406,10]]},"109":{"position":[[84,9]]},"115":{"position":[[296,9]]},"139":{"position":[[57,9],[98,10],[207,10],[290,9],[525,10],[893,11]]},"141":{"position":[[153,10],[359,9],[443,14]]},"143":{"position":[[71,8],[846,10],[1173,11],[1300,9],[1544,9],[1592,9]]},"161":{"position":[[229,9]]},"163":{"position":[[278,10]]},"165":{"position":[[62,9]]},"184":{"position":[[451,13]]},"192":{"position":[[328,13]]},"194":{"position":[[273,13]]},"196":{"position":[[72,14]]},"232":{"position":[[178,13]]},"234":{"position":[[1081,14]]},"308":{"position":[[452,13]]},"316":{"position":[[13,13]]},"365":{"position":[[183,9]]},"386":{"position":[[59,13]]},"388":{"position":[[292,9]]},"418":{"position":[[610,13]]}}}],["document(page_content=essay)]text_splitt",{"_index":1460,"t":{"161":{"position":[[2686,43]]}}}],["documentfrom",{"_index":1329,"t":{"143":{"position":[[141,12]]}}}],["documents.extend(loader.load",{"_index":985,"t":{"46":{"position":[[1236,31]]}}}],["documents=docu",{"_index":1351,"t":{"143":{"position":[[975,20],[1716,21]]}}}],["documentslocal_doc",{"_index":987,"t":{"46":{"position":[[1322,19]]}}}],["docx",{"_index":454,"t":{"28":{"position":[[1366,5]]},"32":{"position":[[2513,7],[3235,5]]},"83":{"position":[[105,6]]},"373":{"position":[[401,4]]},"380":{"position":[[788,5]]},"384":{"position":[[1168,7]]}}}],["doesn't",{"_index":1039,"t":{"50":{"position":[[924,7]]},"117":{"position":[[269,7]]},"208":{"position":[[357,7]]},"241":{"position":[[254,7]]},"263":{"position":[[91,7]]}}}],["doesn’t",{"_index":752,"t":{"36":{"position":[[3316,7]]}}}],["domain",{"_index":1217,"t":{"111":{"position":[[13,6],[700,6]]},"223":{"position":[[565,6]]}}}],["don't",{"_index":1250,"t":{"117":{"position":[[199,5]]},"161":{"position":[[909,5]]},"247":{"position":[[120,5]]},"259":{"position":[[202,5]]},"390":{"position":[[199,5]]}}}],["done",{"_index":231,"t":{"8":{"position":[[895,5]]},"30":{"position":[[1966,4]]},"32":{"position":[[718,4]]},"34":{"position":[[659,4]]},"36":{"position":[[11,4]]},"161":{"position":[[2008,4]]}}}],["dotenv",{"_index":2146,"t":{"394":{"position":[[253,6]]},"412":{"position":[[177,6]]}}}],["down",{"_index":280,"t":{"12":{"position":[[75,4]]},"30":{"position":[[1032,4]]},"60":{"position":[[325,4]]},"62":{"position":[[7,4]]},"67":{"position":[[97,4]]},"71":{"position":[[129,4]]},"161":{"position":[[2602,4]]},"263":{"position":[[244,4]]}}}],["downgrad",{"_index":1791,"t":{"263":{"position":[[139,9],[659,9]]}}}],["download",{"_index":629,"t":{"32":{"position":[[3244,8]]},"245":{"position":[[123,8],[251,8]]},"263":{"position":[[474,8]]},"353":{"position":[[78,8],[225,8]]},"355":{"position":[[345,10]]},"357":{"position":[[954,10]]}}}],["draft",{"_index":443,"t":{"28":{"position":[[817,6],[992,5],[1093,5]]},"32":{"position":[[842,6],[877,5],[947,6],[1798,6],[2053,6]]},"67":{"position":[[187,5]]},"306":{"position":[[351,5]]},"308":{"position":[[183,5]]},"380":{"position":[[389,6],[440,5],[515,5]]}}}],["draft['review",{"_index":597,"t":{"32":{"position":[[1817,15]]}}}],["draft_section_titles=[\"titl",{"_index":1918,"t":{"308":{"position":[[327,28]]}}}],["draftstat",{"_index":574,"t":{"32":{"position":[[1011,11]]}}}],["draftstate(typeddict",{"_index":572,"t":{"32":{"position":[[902,22]]}}}],["drag",{"_index":1066,"t":{"50":{"position":[[2643,4]]},"115":{"position":[[216,4]]},"161":{"position":[[2096,4]]},"388":{"position":[[212,4]]}}}],["draw",{"_index":914,"t":{"42":{"position":[[1028,7]]}}}],["drive",{"_index":354,"t":{"20":{"position":[[456,5]]}}}],["driven",{"_index":861,"t":{"40":{"position":[[530,6],[673,6]]},"52":{"position":[[511,6]]}}}],["driver",{"_index":1790,"t":{"263":{"position":[[124,6],[725,6]]}}}],["drop",{"_index":838,"t":{"36":{"position":[[8846,4]]},"50":{"position":[[2652,4]]},"115":{"position":[[223,4]]},"388":{"position":[[219,4]]}}}],["dropdown",{"_index":1213,"t":{"107":{"position":[[442,8]]}}}],["droplet",{"_index":1572,"t":{"212":{"position":[[19,7]]}}}],["drug",{"_index":898,"t":{"42":{"position":[[421,4]]},"161":{"position":[[1238,5]]}}}],["duckduckgo",{"_index":2107,"t":{"363":{"position":[[745,10]]}}}],["durat",{"_index":1168,"t":{"91":{"position":[[57,8]]}}}],["dure",{"_index":57,"t":{"2":{"position":[[727,6]]},"91":{"position":[[694,6]]},"163":{"position":[[627,6]]},"293":{"position":[[40,6]]},"295":{"position":[[33,6]]}}}],["dynam",{"_index":474,"t":{"30":{"position":[[281,7]]},"34":{"position":[[900,11]]},"52":{"position":[[651,7]]},"238":{"position":[[166,8]]},"241":{"position":[[353,7]]},"243":{"position":[[57,7],[187,7],[284,11]]},"247":{"position":[[170,9]]},"249":{"position":[[283,7],[391,7]]}}}],["e",{"_index":2078,"t":{"357":{"position":[[780,2],[798,6]]},"394":{"position":[[595,2],[628,6]]}}}],["e.g",{"_index":2119,"t":{"365":{"position":[[478,6]]}}}],["each",{"_index":204,"t":{"8":{"position":[[208,4]]},"12":{"position":[[235,4],[361,4]]},"14":{"position":[[327,4]]},"28":{"position":[[697,4]]},"30":{"position":[[222,4],[912,4],[1320,4],[1984,4],[2394,4]]},"32":{"position":[[152,4],[640,4],[1129,4],[2641,5]]},"36":{"position":[[3502,4]]},"48":{"position":[[428,4]]},"60":{"position":[[393,5]]},"62":{"position":[[83,4]]},"67":{"position":[[132,4]]},"163":{"position":[[634,4]]},"171":{"position":[[45,5]]},"192":{"position":[[20,4]]},"223":{"position":[[179,4],[432,4],[720,4],[846,4]]},"316":{"position":[[119,4]]},"318":{"position":[[72,4]]},"363":{"position":[[185,4],[381,4]]},"380":{"position":[[269,4]]},"384":{"position":[[287,4]]},"412":{"position":[[1748,4]]}}}],["earn",{"_index":1426,"t":{"161":{"position":[[1582,4]]}}}],["eas",{"_index":1540,"t":{"190":{"position":[[62,4]]}}}],["easi",{"_index":1022,"t":{"50":{"position":[[93,4]]},"125":{"position":[[222,4]]},"184":{"position":[[113,4]]},"228":{"position":[[234,4]]},"271":{"position":[[13,4]]}}}],["easier",{"_index":605,"t":{"32":{"position":[[2336,6]]},"36":{"position":[[209,6]]}}}],["easili",{"_index":1036,"t":{"50":{"position":[[641,6],[2632,6]]},"234":{"position":[[90,6]]}}}],["echo",{"_index":868,"t":{"40":{"position":[[779,4]]}}}],["econom",{"_index":933,"t":{"42":{"position":[[1965,8]]},"161":{"position":[[1644,8]]}}}],["edg",{"_index":557,"t":{"30":{"position":[[3209,5]]},"32":{"position":[[1298,6],[1574,5],[1928,6]]},"161":{"position":[[990,4]]}}}],["edit",{"_index":1662,"t":{"217":{"position":[[3096,4]]},"384":{"position":[[55,4]]}}}],["editor",{"_index":416,"t":{"26":{"position":[[54,6],[340,6]]},"28":{"position":[[510,6],[593,6]]},"375":{"position":[[144,6],[394,6]]},"380":{"position":[[186,6]]}}}],["editor_ag",{"_index":526,"t":{"30":{"position":[[2136,12]]}}}],["editor_agent.plan_research",{"_index":537,"t":{"30":{"position":[[2500,27]]}}}],["editor_agent.run_parallel_research",{"_index":539,"t":{"30":{"position":[[2560,35]]}}}],["editoragent(self.task",{"_index":527,"t":{"30":{"position":[[2151,22]]}}}],["educ",{"_index":1538,"t":{"188":{"position":[[376,11]]}}}],["education\"report_typ",{"_index":1876,"t":{"280":{"position":[[55,21]]}}}],["effect.step",{"_index":1627,"t":{"217":{"position":[[1157,11]]}}}],["effici",{"_index":993,"t":{"46":{"position":[[1473,9]]},"97":{"position":[[358,9]]},"125":{"position":[[454,9]]},"175":{"position":[[1200,9]]}}}],["effort",{"_index":646,"t":{"34":{"position":[[644,7]]}}}],["elestio",{"_index":2051,"t":{"355":{"position":[[365,7]]},"359":{"position":[[0,7],[153,8],[203,7],[285,8],[574,7]]}}}],["elif",{"_index":834,"t":{"36":{"position":[[8355,4]]},"46":{"position":[[710,4],[774,4],[849,4],[927,4],[1006,4],[1089,4]]}}}],["elimin",{"_index":122,"t":{"4":{"position":[[702,10]]},"161":{"position":[[2080,11]]}}}],["elishakay/gpt",{"_index":1836,"t":{"267":{"position":[[1732,14]]}}}],["email",{"_index":1704,"t":{"234":{"position":[[981,5]]}}}],["emb",{"_index":1943,"t":{"318":{"position":[[288,5]]},"328":{"position":[[263,6]]},"330":{"position":[[360,5]]},"340":{"position":[[334,5]]},"347":{"position":[[23,5]]}}}],["embed",{"_index":998,"t":{"46":{"position":[[1634,10]]},"97":{"position":[[309,11]]},"143":{"position":[[559,10]]},"163":{"position":[[303,10]]},"232":{"position":[[572,9],[626,9]]},"312":{"position":[[199,9]]},"314":{"position":[[368,10],[397,11],[560,9]]},"316":{"position":[[228,9],[309,9]]},"318":{"position":[[45,11]]},"326":{"position":[[307,9]]},"334":{"position":[[269,9]]},"336":{"position":[[175,9]]}}}],["embedding=\"custom:your_embed",{"_index":1933,"t":{"314":{"position":[[576,33]]}}}],["embedding=\"nomic:nom",{"_index":2036,"t":{"347":{"position":[[0,22]]}}}],["embedding=embed",{"_index":1005,"t":{"46":{"position":[[1785,22]]},"143":{"position":[[645,21]]}}}],["embedding=openaiembed",{"_index":1480,"t":{"163":{"position":[[405,29]]}}}],["embeddingembedding=\"openai:text",{"_index":1926,"t":{"312":{"position":[[167,31]]}}}],["emerg",{"_index":1051,"t":{"50":{"position":[[1606,8],[1927,8]]},"85":{"position":[[459,8]]}}}],["employe",{"_index":1440,"t":{"161":{"position":[[1940,9]]}}}],["enabl",{"_index":698,"t":{"36":{"position":[[1011,6]]},"40":{"position":[[1161,8]]},"52":{"position":[[472,6]]},"115":{"position":[[89,6]]},"175":{"position":[[527,8]]},"217":{"position":[[1285,6],[1339,6]]},"221":{"position":[[413,6]]},"355":{"position":[[53,6]]},"359":{"position":[[249,6]]},"388":{"position":[[85,6]]}}}],["encapsul",{"_index":470,"t":{"30":{"position":[[172,12]]},"175":{"position":[[946,13]]}}}],["encount",{"_index":1729,"t":{"249":{"position":[[115,9]]}}}],["end",{"_index":42,"t":{"2":{"position":[[527,6]]},"10":{"position":[[850,3]]},"30":{"position":[[2879,3],[2956,4]]},"32":{"position":[[1868,4],[2034,3]]},"36":{"position":[[2076,3],[5943,3]]},"40":{"position":[[1042,3]]},"50":{"position":[[2524,3]]},"181":{"position":[[430,3]]},"190":{"position":[[20,3],[27,3],[204,3]]},"192":{"position":[[148,3],[155,3]]},"194":{"position":[[160,3],[167,3]]},"255":{"position":[[112,3]]}}}],["endpoint",{"_index":1296,"t":{"131":{"position":[[67,9]]},"232":{"position":[[257,10]]},"316":{"position":[[382,9]]},"365":{"position":[[354,8]]},"369":{"position":[[66,8]]},"386":{"position":[[116,10]]}}}],["endpoint}.openai.azure.com/openai_api_version=2024",{"_index":1937,"t":{"316":{"position":[[459,50]]}}}],["energi",{"_index":1375,"t":{"153":{"position":[[344,7],[377,6]]},"276":{"position":[[42,6]]}}}],["engin",{"_index":351,"t":{"20":{"position":[[377,14]]},"48":{"position":[[383,6]]},"50":{"position":[[331,7]]},"97":{"position":[[283,12]]},"103":{"position":[[191,7]]},"143":{"position":[[517,6]]},"232":{"position":[[920,6]]},"363":{"position":[[51,6],[123,7],[197,6],[530,8]]},"365":{"position":[[143,6]]},"418":{"position":[[133,7]]}}}],["english",{"_index":2021,"t":{"338":{"position":[[146,7]]},"384":{"position":[[1406,8]]}}}],["enhanc",{"_index":633,"t":{"34":{"position":[[228,7]]},"42":{"position":[[614,8]]},"52":{"position":[[343,8],[540,9]]},"121":{"position":[[28,8]]},"125":{"position":[[13,8]]},"234":{"position":[[849,7]]}}}],["enjoy",{"_index":1257,"t":{"117":{"position":[[591,5]]},"169":{"position":[[194,5]]},"208":{"position":[[679,5]]},"390":{"position":[[507,5]]}}}],["enough",{"_index":187,"t":{"6":{"position":[[1136,6],[1284,6]]},"22":{"position":[[576,6]]},"42":{"position":[[2132,6]]}}}],["ensur",{"_index":635,"t":{"34":{"position":[[352,7]]},"42":{"position":[[1308,8]]},"77":{"position":[[18,6]]},"89":{"position":[[16,6]]},"101":{"position":[[18,6],[333,6]]},"175":{"position":[[328,8],[904,7],[1090,7]]},"194":{"position":[[54,6]]},"245":{"position":[[269,6]]},"249":{"position":[[28,6]]},"271":{"position":[[55,6]]},"316":{"position":[[248,6]]},"400":{"position":[[64,8]]},"402":{"position":[[88,8]]}}}],["enter",{"_index":1520,"t":{"175":{"position":[[736,6]]},"353":{"position":[[45,5]]}}}],["enterpris",{"_index":2115,"t":{"365":{"position":[[216,10]]}}}],["entir",{"_index":111,"t":{"4":{"position":[[431,6]]},"30":{"position":[[189,6]]},"186":{"position":[[322,6]]}}}],["entrepreneur",{"_index":1470,"t":{"161":{"position":[[3080,13]]}}}],["entri",{"_index":1763,"t":{"251":{"position":[[2033,6]]}}}],["enum",{"_index":1102,"t":{"65":{"position":[[296,5]]}}}],["env",{"_index":1206,"t":{"107":{"position":[[214,3]]},"111":{"position":[[348,4]]},"117":{"position":[[122,6]]},"139":{"position":[[234,3]]},"147":{"position":[[221,4]]},"157":{"position":[[176,4]]},"173":{"position":[[181,4],[263,3],[595,3]]},"208":{"position":[[272,6]]},"217":{"position":[[3241,5]]},"271":{"position":[[232,4]]},"316":{"position":[[208,4]]},"326":{"position":[[94,3]]},"328":{"position":[[61,3]]},"330":{"position":[[119,3]]},"332":{"position":[[133,3]]},"334":{"position":[[76,3]]},"353":{"position":[[386,4]]},"355":{"position":[[32,4]]},"359":{"position":[[229,4]]},"363":{"position":[[159,3],[563,4],[592,4],[626,4],[662,4],[694,4],[724,4],[758,4],[792,4],[819,4],[854,4]]},"365":{"position":[[88,3],[280,4],[320,3]]},"382":{"position":[[71,3]]},"384":{"position":[[682,3]]},"390":{"position":[[122,6]]},"412":{"position":[[417,4]]}}}],["env.exampl",{"_index":1249,"t":{"117":{"position":[[43,14]]},"208":{"position":[[188,14]]},"217":{"position":[[3225,12]]},"390":{"position":[[43,14]]}}}],["env\\scripts\\activ",{"_index":1507,"t":{"173":{"position":[[373,22]]}}}],["environ",{"_index":1026,"t":{"50":{"position":[[236,12],[419,11]]},"81":{"position":[[24,11]]},"111":{"position":[[319,11]]},"115":{"position":[[352,11]]},"147":{"position":[[189,11]]},"173":{"position":[[25,11],[94,11],[138,11],[296,12],[427,12],[561,12],[599,12]]},"175":{"position":[[49,11],[154,11],[375,12],[400,11],[656,11],[779,11],[892,11],[1175,11]]},"177":{"position":[[50,11]]},"184":{"position":[[85,11]]},"206":{"position":[[148,11],[221,11],[239,11]]},"232":{"position":[[122,11]]},"238":{"position":[[69,11]]},"271":{"position":[[200,11]]},"318":{"position":[[126,11]]},"322":{"position":[[201,11]]},"388":{"position":[[348,11]]},"394":{"position":[[84,11]]},"408":{"position":[[100,11],[244,11],[395,11],[539,11],[677,11],[806,11]]},"412":{"position":[[390,11]]}}}],["eras",{"_index":618,"t":{"32":{"position":[[2724,5]]}}}],["error",{"_index":1161,"t":{"89":{"position":[[108,7]]},"267":{"position":[[1385,7],[1423,8],[1432,7]]}}}],["errors:sudo",{"_index":1666,"t":{"217":{"position":[[3182,11]]}}}],["especi",{"_index":165,"t":{"6":{"position":[[428,10]]},"161":{"position":[[1541,10]]}}}],["essay",{"_index":1385,"t":{"161":{"position":[[318,5],[2951,5]]}}}],["essenti",{"_index":1523,"t":{"175":{"position":[[1037,9]]}}}],["establish",{"_index":889,"t":{"42":{"position":[[247,11]]},"173":{"position":[[0,12]]},"175":{"position":[[0,12]]},"267":{"position":[[848,14]]}}}],["etc",{"_index":455,"t":{"28":{"position":[[1382,4]]},"83":{"position":[[112,5]]},"97":{"position":[[321,5]]},"234":{"position":[[1011,4]]},"243":{"position":[[366,5]]},"251":{"position":[[793,4],[866,5]]},"380":{"position":[[804,4]]}}}],["etc/apt/sources.list.d/docker.list",{"_index":1615,"t":{"217":{"position":[[792,35]]}}}],["etc/letsencrypt/live/name.example/fullchain.pem",{"_index":1648,"t":{"217":{"position":[[2568,49]]}}}],["etc/letsencrypt/live/name.example/privkey.pem",{"_index":1650,"t":{"217":{"position":[[2659,47]]}}}],["etc/letsencrypt/opt",{"_index":1651,"t":{"217":{"position":[[2736,24]]}}}],["etc/letsencrypt/ssl",{"_index":1654,"t":{"217":{"position":[[2810,20]]}}}],["etc/nginx/conf.d/.htpasswd",{"_index":2090,"t":{"359":{"position":[[809,28]]}}}],["etc/nginx/nginx.conf",{"_index":1661,"t":{"217":{"position":[[3071,24]]}}}],["evalu",{"_index":918,"t":{"42":{"position":[[1168,10]]},"48":{"position":[[791,11]]},"50":{"position":[[2144,11]]}}}],["even",{"_index":247,"t":{"10":{"position":[[198,4]]},"14":{"position":[[727,4]]},"20":{"position":[[502,4]]},"36":{"position":[[8819,4]]},"161":{"position":[[1876,5]]}}}],["event",{"_index":730,"t":{"36":{"position":[[2508,6],[7490,6]]},"217":{"position":[[1445,6]]},"267":{"position":[[885,7]]}}}],["eventu",{"_index":308,"t":{"14":{"position":[[485,10],[752,10]]}}}],["everyon",{"_index":361,"t":{"20":{"position":[[598,8]]}}}],["evolv",{"_index":339,"t":{"20":{"position":[[141,7],[293,7]]},"30":{"position":[[312,8]]}}}],["exa",{"_index":2110,"t":{"363":{"position":[[813,3]]}}}],["exact",{"_index":152,"t":{"6":{"position":[[264,5]]},"232":{"position":[[217,5]]}}}],["exampl",{"_index":229,"t":{"8":{"position":[[813,7]]},"24":{"position":[[370,7],[503,7]]},"30":{"position":[[1384,7]]},"32":{"position":[[3265,7]]},"36":{"position":[[1536,8],[2654,8],[7636,8]]},"42":{"position":[[369,8],[803,8],[1144,8],[1525,8],[1874,8],[2061,8]]},"46":{"position":[[1808,7]]},"50":{"position":[[1862,8]]},"69":{"position":[[937,7]]},"95":{"position":[[346,8]]},"111":{"position":[[94,8]]},"139":{"position":[[317,8]]},"141":{"position":[[66,8]]},"143":{"position":[[95,8]]},"173":{"position":[[172,8]]},"186":{"position":[[561,8]]},"232":{"position":[[279,7]]},"234":{"position":[[6,7],[154,7],[862,7]]},"267":{"position":[[297,7],[473,7]]},"285":{"position":[[870,7]]},"326":{"position":[[108,8]]},"328":{"position":[[75,8]]},"330":{"position":[[133,8]]},"353":{"position":[[200,8]]},"359":{"position":[[221,7]]},"363":{"position":[[259,8],[423,8]]},"373":{"position":[[188,7],[438,7]]},"384":{"position":[[1031,9]]},"412":{"position":[[1772,8]]}}}],["exce",{"_index":1086,"t":{"60":{"position":[[227,7]]}}}],["excel",{"_index":174,"t":{"6":{"position":[[691,5]]},"40":{"position":[[202,5]]},"107":{"position":[[149,6]]},"139":{"position":[[169,6]]}}}],["except",{"_index":2077,"t":{"357":{"position":[[760,6],[767,9]]},"394":{"position":[[575,6],[582,9]]},"408":{"position":[[34,9]]}}}],["excit",{"_index":563,"t":{"32":{"position":[[18,8],[77,8]]},"34":{"position":[[31,8]]},"40":{"position":[[392,7]]},"410":{"position":[[315,7]]}}}],["execut",{"_index":29,"t":{"2":{"position":[[308,8]]},"4":{"position":[[647,7]]},"8":{"position":[[117,7]]},"85":{"position":[[705,7]]},"87":{"position":[[155,9]]},"157":{"position":[[4,9]]},"173":{"position":[[186,7]]},"175":{"position":[[196,9],[868,10]]},"177":{"position":[[81,9]]},"223":{"position":[[38,11],[119,9]]},"234":{"position":[[582,8]]},"243":{"position":[[157,8]]}}}],["exerpt",{"_index":1381,"t":{"161":{"position":[[239,6]]}}}],["exist",{"_index":498,"t":{"30":{"position":[[969,8]]},"32":{"position":[[1978,6],[2717,6]]},"40":{"position":[[723,8]]},"50":{"position":[[932,7],[1072,8],[1166,6]]},"163":{"position":[[245,6]]},"181":{"position":[[139,8]]},"184":{"position":[[135,8]]},"234":{"position":[[116,8]]}}}],["exit",{"_index":831,"t":{"36":{"position":[[7959,7]]}}}],["expand",{"_index":1072,"t":{"52":{"position":[[616,9]]}}}],["expect",{"_index":683,"t":{"36":{"position":[[449,6]]},"161":{"position":[[2260,7],[2411,8]]},"249":{"position":[[232,8]]}}}],["expens",{"_index":1534,"t":{"188":{"position":[[259,9]]}}}],["experi",{"_index":170,"t":{"6":{"position":[[596,13]]},"10":{"position":[[153,13]]},"22":{"position":[[551,10]]},"32":{"position":[[38,10]]},"34":{"position":[[105,12],[260,11]]},"125":{"position":[[366,10]]},"186":{"position":[[30,11],[222,10]]}}}],["experiment",{"_index":1537,"t":{"188":{"position":[[358,13]]}}}],["expert",{"_index":717,"t":{"36":{"position":[[1803,7],[5670,7]]}}}],["explanatori",{"_index":623,"t":{"32":{"position":[[2878,12]]}}}],["explicit",{"_index":2246,"t":{"418":{"position":[[188,8]]}}}],["explor",{"_index":948,"t":{"44":{"position":[[506,7]]},"177":{"position":[[206,7]]},"418":{"position":[[262,7]]}}}],["explos",{"_index":847,"t":{"40":{"position":[[39,9]]}}}],["export",{"_index":1029,"t":{"50":{"position":[[408,6],[465,6]]},"81":{"position":[[0,6],[47,6]]},"107":{"position":[[293,6]]},"139":{"position":[[326,6]]},"228":{"position":[[383,6]]},"238":{"position":[[128,6],[194,6]]},"271":{"position":[[277,6],[287,6],[341,6]]},"382":{"position":[[85,6]]}}}],["extens",{"_index":375,"t":{"22":{"position":[[16,9]]},"89":{"position":[[234,9]]}}}],["extern",{"_index":922,"t":{"42":{"position":[[1257,8]]},"87":{"position":[[250,8]]},"91":{"position":[[677,8],[864,8]]},"301":{"position":[[83,8]]}}}],["extra",{"_index":1886,"t":{"285":{"position":[[44,6]]},"332":{"position":[[35,5]]}}}],["extract",{"_index":792,"t":{"36":{"position":[[4885,7]]},"40":{"position":[[138,10]]},"241":{"position":[[172,8]]},"243":{"position":[[211,8]]}}}],["face",{"_index":1773,"t":{"257":{"position":[[328,4]]}}}],["facilit",{"_index":466,"t":{"30":{"position":[[88,11]]}}}],["fact",{"_index":262,"t":{"10":{"position":[[723,5]]}}}],["factual",{"_index":140,"t":{"6":{"position":[[47,10],[284,10],[502,7],[567,10],[1432,8]]},"14":{"position":[[369,7]]},"28":{"position":[[923,7]]},"101":{"position":[[60,7]]},"228":{"position":[[198,7]]},"234":{"position":[[1221,7]]},"418":{"position":[[179,8]]}}}],["fail",{"_index":772,"t":{"36":{"position":[[3926,9],[6411,9],[8319,9]]},"249":{"position":[[12,5]]},"261":{"position":[[51,4]]}}}],["fair",{"_index":276,"t":{"10":{"position":[[1066,4]]}}}],["fairli",{"_index":1454,"t":{"161":{"position":[[2460,6]]}}}],["faiss.from_documents(docu",{"_index":1465,"t":{"161":{"position":[[2874,31]]}}}],["faissfrom",{"_index":1380,"t":{"161":{"position":[[187,9]]}}}],["fals",{"_index":614,"t":{"32":{"position":[[2550,6],[2939,5]]},"135":{"position":[[451,5]]},"384":{"position":[[419,6],[810,6],[1210,6]]}}}],["familiar",{"_index":1498,"t":{"171":{"position":[[28,11]]}}}],["faq",{"_index":1552,"t":{"196":{"position":[[53,3]]}}}],["far",{"_index":745,"t":{"36":{"position":[[3211,3]]}}}],["fast",{"_index":1366,"t":{"151":{"position":[[174,4]]},"320":{"position":[[93,4]]},"406":{"position":[[259,4],[462,4]]}}}],["fast.her",{"_index":1428,"t":{"161":{"position":[[1609,9]]}}}],["fast_llm",{"_index":2049,"t":{"355":{"position":[[305,8]]}}}],["fast_llm=\"bedrock:anthropic.claud",{"_index":2028,"t":{"342":{"position":[[0,34]]}}}],["fast_llm=\"google_vertexai:gemini",{"_index":2012,"t":{"336":{"position":[[0,32]]}}}],["fast_llm=\"openai:your_fast_llm\"smart_llm=\"openai:your_smart_llm\"strategic_llm=\"openai:your_strategic_llm",{"_index":1931,"t":{"314":{"position":[[246,105]]}}}],["fast_llm=\"xai:grok",{"_index":2033,"t":{"344":{"position":[[0,18]]}}}],["fastapi",{"_index":1108,"t":{"69":{"position":[[84,7],[729,7]]},"119":{"position":[[29,7]]},"169":{"position":[[97,7]]},"177":{"position":[[11,7]]},"283":{"position":[[5,7]]}}}],["fastapi()@app.get(\"/report/{report_type}\")async",{"_index":1879,"t":{"283":{"position":[[87,47]]}}}],["fastapifrom",{"_index":1877,"t":{"283":{"position":[[20,11]]}}}],["faster",{"_index":239,"t":{"8":{"position":[[1015,6]]},"52":{"position":[[493,7]]},"241":{"position":[[226,6]]},"384":{"position":[[846,6]]}}}],["favorit",{"_index":464,"t":{"30":{"position":[[10,8]]}}}],["featur",{"_index":465,"t":{"30":{"position":[[19,8]]},"32":{"position":[[86,7]]},"42":{"position":[[1220,7]]},"50":{"position":[[2091,7]]},"103":{"position":[[282,8]]},"115":{"position":[[195,9]]},"121":{"position":[[37,8]]},"123":{"position":[[71,7]]},"125":{"position":[[407,8]]},"181":{"position":[[264,8]]},"184":{"position":[[326,8]]},"190":{"position":[[0,7]]},"388":{"position":[[191,9]]},"410":{"position":[[47,8]]}}}],["feedback",{"_index":426,"t":{"26":{"position":[[548,8]]},"28":{"position":[[1037,8],[1146,9]]},"34":{"position":[[1446,8]]},"125":{"position":[[157,8]]},"375":{"position":[[114,8],[602,8]]},"380":{"position":[[483,9],[568,9]]},"384":{"position":[[392,8]]}}}],["feel",{"_index":369,"t":{"20":{"position":[[846,4]]},"36":{"position":[[775,4],[8833,4]]},"103":{"position":[[437,4]]},"369":{"position":[[375,4]]}}}],["fetch",{"_index":757,"t":{"36":{"position":[[3467,8]]},"234":{"position":[[303,5]]},"241":{"position":[[118,5]]}}}],["fetch_report(queri",{"_index":1699,"t":{"234":{"position":[[278,20],[659,19]]}}}],["few",{"_index":273,"t":{"10":{"position":[[1044,3]]},"20":{"position":[[261,3]]},"40":{"position":[[14,3]]},"42":{"position":[[2057,3]]},"161":{"position":[[1420,3]]}}}],["field",{"_index":626,"t":{"32":{"position":[[3042,5]]},"251":{"position":[[1973,5]]},"384":{"position":[[135,8]]}}}],["file",{"_index":607,"t":{"32":{"position":[[2399,5]]},"36":{"position":[[614,6]]},"46":{"position":[[84,4],[1211,4]]},"50":{"position":[[880,5]]},"65":{"position":[[250,4]]},"107":{"position":[[109,4]]},"111":{"position":[[353,4]]},"115":{"position":[[270,5]]},"117":{"position":[[58,5],[96,4],[114,4],[164,4],[427,5]]},"119":{"position":[[53,6]]},"139":{"position":[[129,4]]},"147":{"position":[[226,4]]},"155":{"position":[[49,4]]},"157":{"position":[[181,4]]},"173":{"position":[[660,4]]},"175":{"position":[[264,4]]},"208":{"position":[[203,5],[244,4],[264,4],[515,5]]},"217":{"position":[[1439,5]]},"251":{"position":[[910,5]]},"267":{"position":[[360,4]]},"271":{"position":[[237,4]]},"316":{"position":[[213,5]]},"353":{"position":[[391,4]]},"359":{"position":[[234,4]]},"384":{"position":[[74,4]]},"388":{"position":[[266,5]]},"390":{"position":[[58,5],[96,4],[114,4],[164,4],[343,5]]}}}],["file_path",{"_index":969,"t":{"46":{"position":[[620,9],[633,11],[1222,13]]}}}],["file_path.endswith('.csv",{"_index":974,"t":{"46":{"position":[[779,27]]}}}],["file_path.endswith('.docx",{"_index":982,"t":{"46":{"position":[[1094,28]]}}}],["file_path.endswith('.md",{"_index":978,"t":{"46":{"position":[[932,26]]}}}],["file_path.endswith('.pdf",{"_index":970,"t":{"46":{"position":[[648,27]]}}}],["file_path.endswith('.pptx",{"_index":980,"t":{"46":{"position":[[1011,28]]}}}],["file_path.endswith('.txt",{"_index":972,"t":{"46":{"position":[[715,27]]}}}],["file_path.endswith('.xlsx",{"_index":976,"t":{"46":{"position":[[854,28]]}}}],["fileload_dotenv()async",{"_index":2209,"t":{"412":{"position":[[422,22]]}}}],["filenam",{"_index":1376,"t":{"155":{"position":[[84,8]]}}}],["filter",{"_index":287,"t":{"12":{"position":[[396,7]]},"97":{"position":[[136,9]]},"101":{"position":[[240,6]]},"111":{"position":[[0,9],[62,6],[671,6],[687,9]]},"223":{"position":[[234,7],[950,6]]},"418":{"position":[[485,9]]}}}],["final",{"_index":240,"t":{"10":{"position":[[0,8]]},"12":{"position":[[84,5],[460,8],[517,5]]},"20":{"position":[[340,7]]},"26":{"position":[[627,5],[684,5]]},"28":{"position":[[169,7],[1189,5],[1323,5]]},"30":{"position":[[3219,7]]},"32":{"position":[[476,5],[1143,8],[2047,5],[2242,10],[3176,5]]},"34":{"position":[[728,5]]},"36":{"position":[[2117,8],[3017,8],[4029,9]]},"44":{"position":[[477,5]]},"48":{"position":[[484,8],[572,5],[892,5]]},"67":{"position":[[298,8],[412,5]]},"91":{"position":[[561,5]]},"223":{"position":[[213,8],[941,8],[1009,5]]},"273":{"position":[[618,8]]},"285":{"position":[[976,8]]},"324":{"position":[[4,8]]},"375":{"position":[[681,5],[738,5]]},"380":{"position":[[611,5],[745,5]]}}}],["final_report",{"_index":1127,"t":{"69":{"position":[[657,12],[707,13]]}}}],["financ",{"_index":298,"t":{"14":{"position":[[259,8]]},"36":{"position":[[1561,7],[1795,7],[5662,7]]}}}],["financi",{"_index":711,"t":{"36":{"position":[[1605,9],[5289,9]]},"42":{"position":[[814,9]]},"234":{"position":[[1115,9]]}}}],["find",{"_index":22,"t":{"2":{"position":[[224,4]]},"28":{"position":[[1287,9]]},"36":{"position":[[1939,4],[5806,4]]},"42":{"position":[[1512,4]]},"48":{"position":[[405,4]]},"87":{"position":[[178,9]]},"125":{"position":[[255,9]]},"135":{"position":[[336,5]]},"221":{"position":[[90,4]]},"263":{"position":[[252,4]]},"359":{"position":[[738,4]]},"380":{"position":[[709,9]]}}}],["finit",{"_index":125,"t":{"4":{"position":[[797,6]]}}}],["fire",{"_index":1759,"t":{"251":{"position":[[1807,4],[1939,4]]}}}],["firefox",{"_index":1724,"t":{"245":{"position":[[205,8]]}}}],["fireworks_api_key=[your",{"_index":2023,"t":{"340":{"position":[[0,23]]}}}],["firm",{"_index":908,"t":{"42":{"position":[[833,4]]}}}],["first",{"_index":5,"t":{"2":{"position":[[68,5]]},"4":{"position":[[4,5],[394,6],[550,5]]},"30":{"position":[[3163,5]]},"36":{"position":[[1688,5],[1701,6]]},"263":{"position":[[208,6]]}}}],["fix",{"_index":89,"t":{"4":{"position":[[151,5]]},"115":{"position":[[505,5]]},"388":{"position":[[501,5]]}}}],["flash",{"_index":2013,"t":{"336":{"position":[[37,5]]}}}],["flash\"smart_llm=\"google_genai:gemini",{"_index":2008,"t":{"334":{"position":[[145,36]]}}}],["flask",{"_index":1885,"t":{"285":{"position":[[23,5],[88,5],[101,6],[825,5],[855,5]]}}}],["flask(__name__)@app.route('/report/<report_typ",{"_index":1890,"t":{"285":{"position":[[170,50]]}}}],["flask[async",{"_index":1887,"t":{"285":{"position":[[63,14]]}}}],["flexibl",{"_index":392,"t":{"22":{"position":[[461,11]]},"46":{"position":[[101,11]]},"184":{"position":[[153,8]]},"186":{"position":[[244,8]]},"410":{"position":[[469,12]]}}}],["flip",{"_index":865,"t":{"40":{"position":[[656,4]]}}}],["flood",{"_index":1079,"t":{"56":{"position":[[202,8]]},"234":{"position":[[768,8]]},"251":{"position":[[651,8]]}}}],["flow",{"_index":350,"t":{"20":{"position":[[371,5]]},"22":{"position":[[79,6],[128,5],[330,6]]},"34":{"position":[[347,4]]},"111":{"position":[[255,5]]},"115":{"position":[[415,4]]},"117":{"position":[[438,4]]},"208":{"position":[[150,4],[526,4]]},"388":{"position":[[411,4]]},"390":{"position":[[354,4]]}}}],["focu",{"_index":259,"t":{"10":{"position":[[631,5]]},"24":{"position":[[171,5]]},"28":{"position":[[1453,5]]},"30":{"position":[[3251,5]]},"34":{"position":[[163,5]]},"40":{"position":[[129,5]]},"161":{"position":[[1961,5]]}}}],["focus",{"_index":1106,"t":{"67":{"position":[[160,7]]}}}],["folder",{"_index":1152,"t":{"83":{"position":[[49,7]]},"107":{"position":[[252,6]]},"111":{"position":[[370,6]]},"139":{"position":[[272,6]]}}}],["follow",{"_index":129,"t":{"4":{"position":[[882,9]]},"6":{"position":[[347,10]]},"10":{"position":[[478,8],[548,9]]},"28":{"position":[[54,9],[226,8]]},"30":{"position":[[1108,10],[3279,9]]},"36":{"position":[[894,9]]},"50":{"position":[[456,8],[1852,9]]},"65":{"position":[[49,9]]},"77":{"position":[[38,10]]},"173":{"position":[[198,9],[317,9],[448,9],[674,9]]},"177":{"position":[[95,9]]},"186":{"position":[[440,6]]},"208":{"position":[[58,6],[138,6]]},"214":{"position":[[30,6]]},"257":{"position":[[110,6]]},"259":{"position":[[230,10]]},"263":{"position":[[188,6]]},"271":{"position":[[0,6]]},"318":{"position":[[116,9]]},"332":{"position":[[47,6],[93,8]]},"334":{"position":[[66,9]]},"359":{"position":[[655,6]]},"363":{"position":[[509,9]]},"365":{"position":[[310,9]]},"369":{"position":[[92,9]]},"377":{"position":[[39,9]]},"380":{"position":[[74,8]]},"384":{"position":[[125,9],[745,6],[865,6],[943,7]]},"410":{"position":[[400,9]]},"412":{"position":[[63,9]]}}}],["follow_guidelin",{"_index":613,"t":{"32":{"position":[[2529,20],[2918,17]]},"384":{"position":[[691,17],[1234,20]]}}}],["forecast",{"_index":1056,"t":{"50":{"position":[[2035,9]]}}}],["form",{"_index":13,"t":{"2":{"position":[[133,7]]},"6":{"position":[[1309,4]]},"12":{"position":[[186,4]]},"14":{"position":[[523,4]]},"50":{"position":[[734,5]]},"60":{"position":[[209,4]]},"221":{"position":[[3,4]]},"223":{"position":[[671,4]]},"228":{"position":[[179,4]]}}}],["format",{"_index":268,"t":{"10":{"position":[[813,7],[875,7]]},"26":{"position":[[708,8]]},"28":{"position":[[1345,7]]},"32":{"position":[[2632,8],[3201,7]]},"89":{"position":[[165,7]]},"107":{"position":[[114,7]]},"137":{"position":[[698,6]]},"139":{"position":[[134,7]]},"369":{"position":[[102,7],[300,6]]},"373":{"position":[[380,7]]},"375":{"position":[[762,8]]},"380":{"position":[[767,7]]},"384":{"position":[[483,7],[1366,8]]}}}],["forti",{"_index":1424,"t":{"161":{"position":[[1472,5]]}}}],["forward",{"_index":552,"t":{"30":{"position":[[3043,7]]},"34":{"position":[[6,8],[783,7],[1284,7]]},"36":{"position":[[2774,8]]},"50":{"position":[[393,8]]}}}],["found",{"_index":65,"t":{"2":{"position":[[898,5]]},"28":{"position":[[1496,5]]},"48":{"position":[[837,5]]},"50":{"position":[[2162,5]]},"91":{"position":[[359,5]]},"295":{"position":[[27,5]]},"410":{"position":[[515,5]]}}}],["foundat",{"_index":172,"t":{"6":{"position":[[673,10]]},"20":{"position":[[540,10]]},"42":{"position":[[159,10]]}}}],["four.thi",{"_index":1425,"t":{"161":{"position":[[1526,9]]}}}],["frame",{"_index":90,"t":{"4":{"position":[[162,6]]}}}],["free",{"_index":370,"t":{"20":{"position":[[851,4]]},"36":{"position":[[780,4],[8838,4]]},"103":{"position":[[442,4]]},"320":{"position":[[242,4]]},"369":{"position":[[380,4]]}}}],["fresh",{"_index":1784,"t":{"259":{"position":[[251,5]]}}}],["friendli",{"_index":1289,"t":{"125":{"position":[[473,9]]}}}],["front",{"_index":1063,"t":{"50":{"position":[[2518,5]]},"181":{"position":[[424,5]]}}}],["frontend",{"_index":1209,"t":{"107":{"position":[[356,8]]},"111":{"position":[[600,8]]},"115":{"position":[[30,8],[57,8],[147,9]]},"123":{"position":[[7,9],[61,9]]},"125":{"position":[[4,8]]},"129":{"position":[[29,9]]},"131":{"position":[[30,8]]},"181":{"position":[[220,8],[406,9]]},"186":{"position":[[60,9],[119,8],[536,9]]},"388":{"position":[[26,8],[53,8],[143,9]]}}}],["frontendnvm",{"_index":2140,"t":{"392":{"position":[[3,11]]}}}],["fssl",{"_index":1598,"t":{"217":{"position":[[457,4]]}}}],["full",{"_index":691,"t":{"36":{"position":[[802,4],[5358,4]]},"251":{"position":[[2087,4]]},"308":{"position":[[79,4],[511,4]]}}}],["fulli",{"_index":876,"t":{"40":{"position":[[970,5]]},"97":{"position":[[389,5]]},"243":{"position":[[243,5]]},"384":{"position":[[1294,5]]}}}],["function",{"_index":345,"t":{"20":{"position":[[310,8]]},"30":{"position":[[3078,10],[3145,9]]},"36":{"position":[[412,8],[724,8],[1062,8],[1927,8],[2221,8],[2415,11],[2427,11],[3079,8],[3564,8],[3664,8],[3977,8],[4106,8],[4223,8],[4852,8],[4912,8],[5000,9],[5794,8],[5968,8],[6149,8],[6453,8],[7026,8],[7397,11],[7409,11],[8782,8]]},"46":{"position":[[1294,8]]},"131":{"position":[[213,9]]},"157":{"position":[[202,8]]},"234":{"position":[[605,8]]},"251":{"position":[[1343,8]]},"267":{"position":[[377,8],[645,8],[1451,8],[2233,9],[2306,8]]}}}],["function_arg",{"_index":785,"t":{"36":{"position":[[4445,13],[6675,13]]}}}],["function_nam",{"_index":783,"t":{"36":{"position":[[4410,13],[4488,13],[6640,13],[6718,13]]}}}],["functionasyncio.run(main",{"_index":2157,"t":{"394":{"position":[[649,27]]}}}],["functionasyncio.run(test_ollama",{"_index":2080,"t":{"357":{"position":[[819,34]]}}}],["fundament",{"_index":655,"t":{"34":{"position":[[1063,12]]}}}],["further",{"_index":406,"t":{"24":{"position":[[278,7]]},"30":{"position":[[1024,7]]},"34":{"position":[[1458,7]]},"36":{"position":[[8636,7],[8883,7]]},"103":{"position":[[477,7]]},"234":{"position":[[841,7]]},"308":{"position":[[37,7]]}}}],["futur",{"_index":37,"t":{"2":{"position":[[436,6]]},"14":{"position":[[4,6]]},"34":{"position":[[1304,6]]},"165":{"position":[[103,6]]}}}],["game",{"_index":881,"t":{"40":{"position":[[1029,5]]}}}],["gather",{"_index":56,"t":{"2":{"position":[[718,8]]},"6":{"position":[[442,8]]},"8":{"position":[[693,6]]},"52":{"position":[[61,9]]},"234":{"position":[[1051,6]]},"249":{"position":[[493,7]]},"289":{"position":[[39,6]]}}}],["gb",{"_index":1574,"t":{"212":{"position":[[143,2],[160,2]]}}}],["geckodriv",{"_index":1725,"t":{"245":{"position":[[214,11]]}}}],["gemini",{"_index":2004,"t":{"334":{"position":[[36,6]]}}}],["gemma",{"_index":1968,"t":{"324":{"position":[[414,5]]}}}],["genai",{"_index":2242,"t":{"412":{"position":[[2074,5]]}}}],["gener",{"_index":285,"t":{"12":{"position":[[139,8],[506,8]]},"20":{"position":[[526,10]]},"30":{"position":[[938,8]]},"32":{"position":[[3110,8]]},"34":{"position":[[277,10],[884,8]]},"44":{"position":[[329,9]]},"48":{"position":[[206,10],[343,10],[561,8]]},"60":{"position":[[116,8],[649,8]]},"62":{"position":[[97,9]]},"67":{"position":[[177,9]]},"69":{"position":[[1012,8]]},"71":{"position":[[53,10]]},"91":{"position":[[791,9]]},"101":{"position":[[435,10]]},"151":{"position":[[110,9]]},"153":{"position":[[0,8],[304,8]]},"155":{"position":[[4,9]]},"186":{"position":[[198,10]]},"223":{"position":[[78,9],[184,9],[620,8],[998,8]]},"228":{"position":[[3,8],[69,8]]},"232":{"position":[[77,7]]},"234":{"position":[[186,8],[912,10]]},"251":{"position":[[712,8]]},"257":{"position":[[62,8]]},"267":{"position":[[229,8]]},"306":{"position":[[145,8],[204,8]]},"320":{"position":[[233,8]]},"373":{"position":[[331,9]]},"377":{"position":[[0,10]]},"384":{"position":[[836,9]]}}}],["generate_report(websocket",{"_index":1114,"t":{"69":{"position":[[206,26],[866,26]]}}}],["generate_research_report(queri",{"_index":1701,"t":{"234":{"position":[[516,32]]}}}],["generatedvector_stor",{"_index":1479,"t":{"163":{"position":[[335,21]]}}}],["genericllmprovid",{"_index":2062,"t":{"357":{"position":[[362,18]]}}}],["genericllmproviderfrom",{"_index":2055,"t":{"357":{"position":[[197,22]]}}}],["get",{"_index":747,"t":{"36":{"position":[[3245,4]]},"186":{"position":[[341,7]]},"326":{"position":[[19,7]]}}}],["get_llm",{"_index":2064,"t":{"357":{"position":[[404,8]]}}}],["get_llmollama_base_url",{"_index":2057,"t":{"357":{"position":[[252,22]]}}}],["get_report(prompt",{"_index":1319,"t":{"137":{"position":[[348,18]]}}}],["get_report(queri",{"_index":1308,"t":{"135":{"position":[[579,17]]},"139":{"position":[[600,17]]},"143":{"position":[[785,17]]},"273":{"position":[[64,17]]},"283":{"position":[[139,17]]}}}],["get_report(report_typ",{"_index":1892,"t":{"285":{"position":[[247,24]]}}}],["get_research_report(queri",{"_index":1043,"t":{"50":{"position":[[1256,26]]},"85":{"position":[[110,26]]}}}],["get_retriev",{"_index":2211,"t":{"412":{"position":[[601,18]]}}}],["get_retriever(\"cheese_collect",{"_index":1358,"t":{"143":{"position":[[1497,34]]}}}],["get_retriever(collection_nam",{"_index":1339,"t":{"143":{"position":[[449,30]]}}}],["get_retrieversfrom",{"_index":2205,"t":{"412":{"position":[[294,18]]}}}],["gethost",{"_index":1300,"t":{"131":{"position":[[205,7]]}}}],["gist",{"_index":692,"t":{"36":{"position":[[814,4]]}}}],["git",{"_index":1360,"t":{"147":{"position":[[22,3]]},"186":{"position":[[380,3],[498,3]]},"192":{"position":[[194,3]]},"217":{"position":[[35,6],[42,3],[109,3],[159,3]]}}}],["github",{"_index":372,"t":{"20":{"position":[[873,6]]},"36":{"position":[[807,6]]},"60":{"position":[[532,6]]},"91":{"position":[[966,6]]},"194":{"position":[[217,6]]},"200":{"position":[[93,6]]},"206":{"position":[[58,6],[427,6]]},"369":{"position":[[460,6]]}}}],["give",{"_index":391,"t":{"22":{"position":[[447,5]]},"44":{"position":[[184,4]]},"161":{"position":[[978,4]]}}}],["given",{"_index":176,"t":{"6":{"position":[[739,5],[789,5],[917,5]]},"10":{"position":[[67,5],[427,5],[930,5]]},"12":{"position":[[219,5],[345,5]]},"24":{"position":[[455,5]]},"26":{"position":[[327,5],[471,5]]},"28":{"position":[[317,5],[489,5],[998,5],[1272,5]]},"30":{"position":[[1745,5]]},"32":{"position":[[2383,5]]},"34":{"position":[[921,5],[1009,5],[1150,5]]},"36":{"position":[[4897,5]]},"40":{"position":[[500,5]]},"48":{"position":[[192,5]]},"56":{"position":[[394,5]]},"71":{"position":[[419,5]]},"223":{"position":[[704,5],[830,5]]},"251":{"position":[[2109,5]]},"373":{"position":[[273,5]]},"375":{"position":[[381,5],[525,5]]},"380":{"position":[[165,5],[446,5],[694,5]]},"418":{"position":[[291,5]]}}}],["glib",{"_index":1771,"t":{"257":{"position":[[310,4],[396,4]]},"259":{"position":[[373,4]]}}}],["go",{"_index":601,"t":{"32":{"position":[[2067,2]]},"34":{"position":[[0,5]]},"36":{"position":[[1481,2],[8760,2]]},"40":{"position":[[1009,5]]},"44":{"position":[[238,5]]},"131":{"position":[[147,2]]},"169":{"position":[[147,2]]},"359":{"position":[[679,2]]}}}],["goal",{"_index":680,"t":{"36":{"position":[[278,5],[1816,4],[5683,4]]},"410":{"position":[[410,6]]}}}],["gobject",{"_index":1786,"t":{"259":{"position":[[378,7]]}}}],["goe",{"_index":1135,"t":{"71":{"position":[[236,4]]}}}],["good",{"_index":746,"t":{"36":{"position":[[3218,5]]},"161":{"position":[[944,4],[1678,4],[2467,4]]},"217":{"position":[[3141,4]]}}}],["googl",{"_index":1218,"t":{"111":{"position":[[31,6],[657,6]]},"334":{"position":[[29,6]]},"363":{"position":[[583,6]]},"408":{"position":[[495,6]]}}}],["google_api_key=[your",{"_index":2005,"t":{"334":{"position":[[86,20]]}}}],["gpg",{"_index":1596,"t":{"217":{"position":[[443,3],[514,3]]}}}],["gpt",{"_index":73,"t":{"2":{"position":[[1005,3]]},"6":{"position":[[136,4]]},"10":{"position":[[281,3],[326,3],[1089,3]]},"12":{"position":[[47,3]]},"14":{"position":[[972,3]]},"17":{"position":[[16,3]]},"20":{"position":[[53,3],[888,3]]},"24":{"position":[[568,3]]},"26":{"position":[[242,3]]},"28":{"position":[[243,4],[742,4],[849,3]]},"30":{"position":[[1422,3]]},"32":{"position":[[2566,4],[3287,3]]},"34":{"position":[[1248,3]]},"36":{"position":[[1569,3],[2174,3],[3287,3]]},"40":{"position":[[440,3]]},"44":{"position":[[56,3],[275,3],[593,3],[666,3]]},"48":{"position":[[88,3],[140,3],[354,3],[595,3]]},"50":{"position":[[124,3],[156,3],[193,3],[261,3],[568,3],[619,3],[806,3],[1043,3],[2481,3]]},"52":{"position":[[117,3]]},"60":{"position":[[88,3],[517,3]]},"71":{"position":[[192,3]]},"75":{"position":[[0,3],[231,3]]},"79":{"position":[[12,3]]},"91":{"position":[[221,3],[278,3],[383,3],[951,3]]},"95":{"position":[[256,3],[283,3]]},"97":{"position":[[0,3],[211,3],[472,3]]},"99":{"position":[[22,3],[78,3]]},"103":{"position":[[250,3]]},"107":{"position":[[21,3],[478,3]]},"111":{"position":[[240,3]]},"125":{"position":[[22,3],[497,3]]},"135":{"position":[[41,3],[104,3],[199,3]]},"139":{"position":[[21,3],[467,3]]},"141":{"position":[[96,3]]},"143":{"position":[[21,3]]},"147":{"position":[[85,3]]},"165":{"position":[[118,3]]},"181":{"position":[[0,3],[66,3],[114,3]]},"184":{"position":[[40,3],[361,3]]},"188":{"position":[[77,3],[148,3],[508,3]]},"192":{"position":[[115,3]]},"194":{"position":[[0,3],[137,3]]},"200":{"position":[[67,3]]},"204":{"position":[[39,3]]},"223":{"position":[[337,3],[353,3]]},"234":{"position":[[44,3],[1033,3]]},"238":{"position":[[242,3]]},"241":{"position":[[19,3]]},"243":{"position":[[24,3]]},"249":{"position":[[474,3]]},"255":{"position":[[45,3]]},"259":{"position":[[421,3]]},"267":{"position":[[2367,3]]},"271":{"position":[[115,3],[180,3],[407,3]]},"287":{"position":[[0,3]]},"308":{"position":[[536,3]]},"316":{"position":[[276,3]]},"318":{"position":[[0,3]]},"320":{"position":[[144,3]]},"324":{"position":[[44,3]]},"353":{"position":[[371,3]]},"355":{"position":[[69,3]]},"359":{"position":[[265,3]]},"363":{"position":[[0,3]]},"375":{"position":[[294,4]]},"380":{"position":[[91,4],[314,4]]},"384":{"position":[[1087,4]]},"410":{"position":[[198,3]]},"418":{"position":[[361,3],[377,3],[580,3]]}}}],["gpt_research",{"_index":506,"t":{"30":{"position":[[1458,14]]},"50":{"position":[[1197,14]]},"56":{"position":[[5,14]]},"85":{"position":[[51,14]]},"135":{"position":[[520,14]]},"137":{"position":[[289,14]]},"139":{"position":[[541,14]]},"143":{"position":[[183,14]]},"161":{"position":[[5,14]]},"163":{"position":[[5,14]]},"165":{"position":[[295,14]]},"234":{"position":[[219,14]]},"251":{"position":[[149,14]]},"273":{"position":[[5,14]]},"283":{"position":[[32,14]]},"285":{"position":[[129,14]]}}}],["gpt_researcher.actions.retriev",{"_index":2204,"t":{"412":{"position":[[254,32]]}}}],["gpt_researcher.config.config",{"_index":2143,"t":{"394":{"position":[[133,28]]},"412":{"position":[[207,28]]}}}],["gpt_researcher.llm_provider.gener",{"_index":2054,"t":{"357":{"position":[[154,35]]}}}],["gpt_researcher.skills.research",{"_index":2206,"t":{"412":{"position":[[313,32]]}}}],["gpt_researcher.utils.enum",{"_index":1110,"t":{"69":{"position":[[113,25]]}}}],["gpt_researcher.utils.llm",{"_index":2056,"t":{"357":{"position":[[220,24]]},"394":{"position":[[180,24]]}}}],["gptr",{"_index":1239,"t":{"115":{"position":[[347,4]]},"267":{"position":[[50,4],[75,4],[128,4],[344,4],[417,4],[513,4],[545,4]]},"388":{"position":[[343,4]]}}}],["gptresearch",{"_index":1092,"t":{"60":{"position":[[596,13]]},"107":{"position":[[583,13]]},"111":{"position":[[139,13]]},"115":{"position":[[309,14]]},"137":{"position":[[227,13]]},"139":{"position":[[402,13]]},"161":{"position":[[3165,14]]},"163":{"position":[[699,14]]},"165":{"position":[[575,14]]},"251":{"position":[[1029,14]]},"304":{"position":[[113,14],[141,14]]},"388":{"position":[[305,14]]}}}],["gptresearcher(parent_query=parent_queri",{"_index":514,"t":{"30":{"position":[[1618,40]]}}}],["gptresearcher(queri",{"_index":1853,"t":{"273":{"position":[[119,20]]},"283":{"position":[[202,20]]},"285":{"position":[[319,20]]}}}],["gptresearcher(query=prompt",{"_index":1320,"t":{"137":{"position":[[411,27]]}}}],["gptresearcher(query=queri",{"_index":1045,"t":{"50":{"position":[[1347,26]]},"56":{"position":[[298,26]]},"85":{"position":[[201,26]]},"135":{"position":[[656,26]]},"139":{"position":[[664,26]]},"143":{"position":[[894,26]]},"234":{"position":[[389,26]]}}}],["gptresearcherapp",{"_index":1889,"t":{"285":{"position":[[151,16]]}}}],["gptresearcherclass",{"_index":507,"t":{"30":{"position":[[1480,18]]},"251":{"position":[[171,18]]}}}],["gptresearcherfrom",{"_index":1331,"t":{"143":{"position":[[205,17]]},"161":{"position":[[27,17]]},"163":{"position":[[27,17]]},"165":{"position":[[317,17]]}}}],["gptresearcherimport",{"_index":1041,"t":{"50":{"position":[[1219,19]]},"56":{"position":[[27,19]]},"85":{"position":[[73,19]]},"135":{"position":[[542,19]]},"137":{"position":[[311,19]]},"139":{"position":[[563,19]]},"234":{"position":[[241,19]]},"273":{"position":[[27,19]]},"283":{"position":[[54,19]]}}}],["gptresearcherresearch",{"_index":1471,"t":{"161":{"position":[[3139,23]]},"163":{"position":[[673,23]]},"165":{"position":[[549,23]]}}}],["grab",{"_index":1850,"t":{"271":{"position":[[131,4]]}}}],["graph",{"_index":313,"t":{"14":{"position":[[564,7]]},"30":{"position":[[239,5],[898,5],[1041,5],[1093,5],[1216,5],[2064,5],[3020,5],[3190,6]]},"32":{"position":[[531,6],[605,5],[795,5],[1939,5],[2087,5],[2276,7],[2961,5]]},"34":{"position":[[893,6],[1057,5]]}}}],["graphstat",{"_index":469,"t":{"30":{"position":[[156,10]]}}}],["great",{"_index":31,"t":{"2":{"position":[[348,5]]},"6":{"position":[[1349,6]]},"30":{"position":[[1265,5]]}}}],["greatli",{"_index":192,"t":{"6":{"position":[[1239,8]]}}}],["groq",{"_index":1949,"t":{"320":{"position":[[136,4],[217,4]]},"324":{"position":[[354,4]]}}}],["groq_api_key",{"_index":1955,"t":{"322":{"position":[[238,36]]}}}],["groq_api_key=[your",{"_index":1956,"t":{"324":{"position":[[89,18]]}}}],["groqcloud",{"_index":1944,"t":{"320":{"position":[[0,9],[176,9]]}}}],["groqfast_llm=\"groq:mixtr",{"_index":1957,"t":{"324":{"position":[[153,26]]}}}],["ground",{"_index":886,"t":{"42":{"position":[[115,8],[223,7]]},"52":{"position":[[325,8]]}}}],["groundbreak",{"_index":672,"t":{"36":{"position":[[32,14]]}}}],["group",{"_index":1622,"t":{"217":{"position":[[1040,5],[1136,5]]}}}],["grow",{"_index":306,"t":{"14":{"position":[[436,7]]},"24":{"position":[[322,6]]},"103":{"position":[[303,7]]},"161":{"position":[[1122,5]]}}}],["guarante",{"_index":87,"t":{"4":{"position":[[103,9]]}}}],["gui",{"_index":1238,"t":{"115":{"position":[[326,3]]},"388":{"position":[[322,3]]}}}],["guid",{"_index":78,"t":{"2":{"position":[[1135,6]]},"40":{"position":[[1054,6]]},"42":{"position":[[1611,5]]},"75":{"position":[[143,5]]},"137":{"position":[[102,5]]},"192":{"position":[[142,5]]},"257":{"position":[[122,5]]},"332":{"position":[[59,5]]},"359":{"position":[[88,5]]}}}],["guidelin",{"_index":447,"t":{"28":{"position":[[1013,10]]},"32":{"position":[[236,11],[2581,13],[3007,11]]},"384":{"position":[[756,10],[876,11],[888,10],[911,10],[1261,13]]}}}],["hacker",{"_index":1386,"t":{"161":{"position":[[352,7],[1683,6],[1781,6],[2472,6],[2534,6]]}}}],["hair",{"_index":1443,"t":{"161":{"position":[[2115,6]]}}}],["hallucin",{"_index":61,"t":{"2":{"position":[[812,13]]},"6":{"position":[[91,14],[861,14]]},"10":{"position":[[1021,14]]},"50":{"position":[[2269,14]]},"101":{"position":[[469,15]]},"221":{"position":[[211,15]]}}}],["hamper",{"_index":875,"t":{"40":{"position":[[939,9]]}}}],["handl",{"_index":705,"t":{"36":{"position":[[1359,8],[3596,7],[4235,6],[6465,6]]},"44":{"position":[[619,9]]},"91":{"position":[[398,6]]},"241":{"position":[[346,6]]},"251":{"position":[[0,8],[52,6],[243,6]]}}}],["handler",{"_index":1738,"t":{"251":{"position":[[226,7]]}}}],["happen",{"_index":1076,"t":{"56":{"position":[[167,8]]},"141":{"position":[[258,7]]},"161":{"position":[[589,7]]},"234":{"position":[[733,8]]},"251":{"position":[[616,8]]}}}],["happi",{"_index":637,"t":{"34":{"position":[[417,5]]}}}],["hard",{"_index":1400,"t":{"161":{"position":[[826,4],[1497,4],[2554,4]]}}}],["hardwar",{"_index":1945,"t":{"320":{"position":[[31,8]]}}}],["have",{"_index":401,"t":{"24":{"position":[[152,6]]},"32":{"position":[[126,6],[3093,6]]},"34":{"position":[[118,6],[509,6]]},"255":{"position":[[20,6]]}}}],["haven't",{"_index":1254,"t":{"117":{"position":[[375,7]]},"208":{"position":[[463,7]]},"390":{"position":[[291,7]]}}}],["head",{"_index":290,"t":{"14":{"position":[[44,7]]},"50":{"position":[[753,4]]}}}],["header",{"_index":494,"t":{"30":{"position":[[644,8]]},"65":{"position":[[400,8],[418,7]]},"69":{"position":[[611,10],[647,7]]},"131":{"position":[[157,9]]},"267":{"position":[[1708,8]]},"359":{"position":[[609,8]]}}}],["health",{"_index":301,"t":{"14":{"position":[[285,7]]}}}],["healthcar",{"_index":1121,"t":{"69":{"position":[[334,12],[1067,11]]}}}],["heavi",{"_index":1668,"t":{"221":{"position":[[196,5]]},"243":{"position":[[407,5]]}}}],["heavyweight",{"_index":1536,"t":{"188":{"position":[[288,11]]}}}],["help",{"_index":632,"t":{"34":{"position":[[133,4]]},"36":{"position":[[1002,8]]},"50":{"position":[[2336,5]]},"251":{"position":[[43,4]]},"308":{"position":[[473,4]]},"394":{"position":[[46,4]]},"410":{"position":[[154,4]]}}}],["helper",{"_index":1845,"t":{"267":{"position":[[2226,6]]}}}],["here",{"_index":639,"t":{"34":{"position":[[490,5]]},"36":{"position":[[819,5]]},"91":{"position":[[365,5]]},"95":{"position":[[371,5]]},"107":{"position":[[615,5]]},"206":{"position":[[10,4],[312,5]]},"228":{"position":[[450,5]]},"232":{"position":[[268,4]]},"251":{"position":[[14,4]]},"271":{"position":[[330,5],[384,5]]},"322":{"position":[[15,5],[99,5]]},"334":{"position":[[8,4]]},"382":{"position":[[176,5]]},"386":{"position":[[73,4]]},"394":{"position":[[17,4]]},"410":{"position":[[521,5]]}}}],["here'",{"_index":854,"t":{"40":{"position":[[249,6]]},"46":{"position":[[167,6]]},"69":{"position":[[0,6]]},"85":{"position":[[0,6]]},"129":{"position":[[98,6]]},"206":{"position":[[411,6]]},"212":{"position":[[175,6]]},"217":{"position":[[1414,6]]},"251":{"position":[[1583,6]]},"267":{"position":[[2193,6]]},"357":{"position":[[4,6]]},"359":{"position":[[211,6]]}}}],["here}export",{"_index":2133,"t":{"382":{"position":[[128,11]]}}}],["hf\"embedding=\"mistralai:nom",{"_index":1992,"t":{"330":{"position":[[321,29]]}}}],["hf\"smart_llm=\"together:meta",{"_index":1990,"t":{"330":{"position":[[215,27]]}}}],["hf\"strategic_llm=\"together:meta",{"_index":1991,"t":{"330":{"position":[[266,31]]}}}],["high",{"_index":385,"t":{"22":{"position":[[251,4]]},"36":{"position":[[830,4]]},"161":{"position":[[741,5]]},"190":{"position":[[82,4],[112,4],[124,4],[179,4]]},"217":{"position":[[1200,4]]},"234":{"position":[[1233,4]]}}}],["higher",{"_index":1144,"t":{"77":{"position":[[64,6]]}}}],["highli",{"_index":840,"t":{"38":{"position":[[14,6]]}}}],["histor",{"_index":866,"t":{"40":{"position":[[703,10]]},"42":{"position":[[705,10],[880,10]]}}}],["hit",{"_index":1295,"t":{"131":{"position":[[45,7]]}}}],["hold",{"_index":181,"t":{"6":{"position":[[956,5],[1154,4]]},"8":{"position":[[578,4]]},"32":{"position":[[617,4]]}}}],["homepag",{"_index":1678,"t":{"226":{"position":[[38,8]]}}}],["hood",{"_index":446,"t":{"28":{"position":[[889,5]]},"44":{"position":[[269,5]]},"48":{"position":[[119,5]]}}}],["hope",{"_index":1231,"t":{"115":{"position":[[79,4]]},"388":{"position":[[75,4]]}}}],["host",{"_index":1243,"t":{"115":{"position":[[462,4]]},"212":{"position":[[96,7]]},"217":{"position":[[1700,4],[1705,6],[1963,4],[1968,6],[2238,4],[2243,6],[2501,4],[2506,6],[2878,6]]},"263":{"position":[[787,6]]},"267":{"position":[[525,6],[699,4]]},"388":{"position":[[458,4]]}}}],["hour",{"_index":1438,"t":{"161":{"position":[[1919,5]]}}}],["hour.[1]you",{"_index":1441,"t":{"161":{"position":[[2019,11]]}}}],["href",{"_index":2238,"t":{"412":{"position":[[1740,4],[1961,7]]}}}],["html",{"_index":1715,"t":{"241":{"position":[[159,4],[211,4]]}}}],["html/css/j",{"_index":1680,"t":{"228":{"position":[[260,13]]}}}],["html/j",{"_index":1526,"t":{"181":{"position":[[488,7]]}}}],["http",{"_index":1105,"t":{"65":{"position":[[430,4]]},"69":{"position":[[642,4]]},"217":{"position":[[361,5],[1452,6]]},"241":{"position":[[102,4]]}}}],["http://example.com/page1",{"_index":2122,"t":{"369":{"position":[[121,27]]}}}],["http://example.com/page2",{"_index":2124,"t":{"369":{"position":[[196,27]]}}}],["http://localhost:3000",{"_index":1282,"t":{"121":{"position":[[345,21]]},"217":{"position":[[1557,22],[2095,22]]}}}],["http://localhost:5000/report/research_report?query=what",{"_index":1895,"t":{"285":{"position":[[898,56]]}}}],["http://localhost:8000",{"_index":1270,"t":{"119":{"position":[[235,21]]},"169":{"position":[[153,21]]},"177":{"position":[[161,21]]},"217":{"position":[[1820,22],[2358,22]]}}}],["http_upgrad",{"_index":1641,"t":{"217":{"position":[[1629,14],[1731,14],[1892,14],[2167,14],[2269,14],[2430,14]]}}}],["https://$host$request_uri",{"_index":1658,"t":{"217":{"position":[[2914,26]]}}}],["https://accredianpublication.medium.com/build",{"_index":2241,"t":{"412":{"position":[[1969,49]]}}}],["https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.baseretriever.html#langchain_core.retrievers.baseretriever.invok",{"_index":1356,"t":{"143":{"position":[[1329,145]]}}}],["https://app.tavily.com/sign",{"_index":1563,"t":{"206":{"position":[[318,27]]}}}],["https://console.groq.com/key",{"_index":1954,"t":{"322":{"position":[[105,29]]}}}],["https://console.groq.com/login",{"_index":1953,"t":{"322":{"position":[[21,30]]}}}],["https://doc.courtbouillon.org/weasyprint/stable/first_steps.html",{"_index":1767,"t":{"257":{"position":[[143,64]]}}}],["https://download.docker.com/linux/ubuntu",{"_index":1611,"t":{"217":{"position":[[713,40]]}}}],["https://download.docker.com/linux/ubuntu/gpg",{"_index":1599,"t":{"217":{"position":[[462,44]]}}}],["https://en.wikipedia.org/wiki/artificial_intellig",{"_index":1312,"t":{"135":{"position":[[965,56]]}}}],["https://github.com/assafelovic/gpt",{"_index":1531,"t":{"186":{"position":[[390,34]]},"192":{"position":[[204,34]]}}}],["https://github.com/yourusername/gpt",{"_index":1361,"t":{"147":{"position":[[32,35]]}}}],["https://ollama",{"_index":2058,"t":{"357":{"position":[[277,15]]}}}],["https://paulgraham.com/wealth.htmlessay",{"_index":1383,"t":{"161":{"position":[[259,39]]}}}],["https://platform.openai.com/api",{"_index":1564,"t":{"206":{"position":[[349,31]]}}}],["https://www.docker.com/products/dock",{"_index":1569,"t":{"208":{"position":[[81,38]]}}}],["https://www.forbes.com/advisor/business/ai",{"_index":1314,"t":{"135":{"position":[[1091,43]]}}}],["https://www.ibm.com/think/insights/artifici",{"_index":1313,"t":{"135":{"position":[[1022,46]]}}}],["https://www.npr.org/2023/09/28/1202110410/how",{"_index":1755,"t":{"251":{"position":[[1706,45],[1837,46]]}}}],["huggingface_api_key=[your",{"_index":1995,"t":{"332":{"position":[[143,25]]}}}],["human",{"_index":45,"t":{"2":{"position":[[550,5]]},"4":{"position":[[177,5]]},"34":{"position":[[63,5],[127,5],[310,5]]},"375":{"position":[[45,5],[57,5]]}}}],["hundr",{"_index":318,"t":{"14":{"position":[[646,8]]},"161":{"position":[[521,8]]}}}],["hybrid",{"_index":860,"t":{"40":{"position":[[477,6],[1089,6]]},"42":{"position":[[36,6],[1735,6],[2111,6]]},"44":{"position":[[101,6],[692,6]]},"48":{"position":[[619,6],[848,6]]},"50":{"position":[[48,6],[588,6],[696,6],[830,6],[978,8],[1035,7],[1663,8],[2678,6]]},"52":{"position":[[0,6],[452,6]]},"75":{"position":[[209,6]]},"85":{"position":[[29,6],[516,8]]},"109":{"position":[[27,6]]},"141":{"position":[[45,6],[229,8]]}}}],["hype",{"_index":608,"t":{"32":{"position":[[2428,4]]},"384":{"position":[[1064,4]]}}}],["hyperlink",{"_index":617,"t":{"32":{"position":[[2697,11]]}}}],["i'm",{"_index":858,"t":{"40":{"position":[[388,3]]},"161":{"position":[[2348,3]]}}}],["i.",{"_index":1303,"t":{"135":{"position":[[279,5]]}}}],["id",{"_index":825,"t":{"36":{"position":[[7767,3],[8211,3]]}}}],["idea",{"_index":103,"t":{"4":{"position":[[341,4]]},"6":{"position":[[1255,4],[1389,4]]},"8":{"position":[[68,4]]},"223":{"position":[[9,4]]}}}],["ideal",{"_index":1525,"t":{"181":{"position":[[92,5]]},"184":{"position":[[19,5]]}}}],["ignor",{"_index":625,"t":{"32":{"position":[[2970,6]]},"50":{"position":[[1181,6]]}}}],["imag",{"_index":312,"t":{"14":{"position":[[556,7]]},"273":{"position":[[683,7],[844,9]]},"295":{"position":[[20,6]]},"297":{"position":[[68,7]]}}}],["imagin",{"_index":307,"t":{"14":{"position":[[464,7],[606,7],[732,7]]}}}],["immedi",{"_index":2,"t":{"2":{"position":[[32,11]]}}}],["impact",{"_index":1117,"t":{"69":{"position":[[290,6],[1051,6]]},"153":{"position":[[219,6]]},"249":{"position":[[426,6]]},"280":{"position":[[39,6]]}}}],["implement",{"_index":709,"t":{"36":{"position":[[1494,9]]},"48":{"position":[[698,12]]},"111":{"position":[[220,9]]},"186":{"position":[[586,14]]},"267":{"position":[[325,11]]},"412":{"position":[[886,9],[947,9]]}}}],["import",{"_index":358,"t":{"20":{"position":[[570,9]]},"22":{"position":[[172,9],[289,9]]},"30":{"position":[[1140,6],[1473,6]]},"32":{"position":[[1248,9]]},"36":{"position":[[5378,6],[5421,6],[5446,6]]},"46":{"position":[[234,6],[436,6],[499,6],[550,6]]},"50":{"position":[[1212,6]]},"56":{"position":[[20,6]]},"69":{"position":[[65,6],[92,6],[139,6],[175,6]]},"81":{"position":[[201,6]]},"85":{"position":[[66,6]]},"135":{"position":[[535,6]]},"137":{"position":[[304,6]]},"139":{"position":[[556,6]]},"143":{"position":[[134,6],[161,6],[198,6],[255,6],[292,6],[331,6]]},"161":{"position":[[20,6],[69,6],[119,6],[180,6],[222,6]]},"163":{"position":[[20,6],[77,6],[114,6]]},"165":{"position":[[310,6],[368,6],[416,6]]},"234":{"position":[[97,6],[234,6]]},"251":{"position":[[114,6],[164,6]]},"263":{"position":[[621,9]]},"273":{"position":[[20,6]]},"283":{"position":[[13,6],[47,6]]},"285":{"position":[[94,6],[144,6]]},"357":{"position":[[72,6],[190,6],[245,6]]},"394":{"position":[[162,6],[205,6],[260,6]]},"412":{"position":[[158,6],[184,6],[236,6],[287,6],[346,6]]}}}],["importerror",{"_index":1730,"t":{"249":{"position":[[128,11]]}}}],["impress",{"_index":270,"t":{"10":{"position":[[993,11]]}}}],["improv",{"_index":131,"t":{"4":{"position":[[910,8],[1002,7]]},"6":{"position":[[540,7]]},"10":{"position":[[1093,8]]},"14":{"position":[[98,8],[763,7]]},"24":{"position":[[67,8]]},"34":{"position":[[667,7]]},"36":{"position":[[84,12],[8659,8]]},"42":{"position":[[1345,8]]},"48":{"position":[[864,8]]},"50":{"position":[[2202,7],[2350,7]]},"52":{"position":[[376,8]]},"62":{"position":[[271,8]]},"99":{"position":[[150,7]]},"103":{"position":[[28,9],[92,9],[221,9]]},"373":{"position":[[62,8]]},"410":{"position":[[60,12]]}}}],["includ",{"_index":288,"t":{"12":{"position":[[429,8]]},"28":{"position":[[1202,9]]},"32":{"position":[[2664,7]]},"36":{"position":[[1326,8],[2040,7],[5907,7]]},"40":{"position":[[612,7]]},"50":{"position":[[859,7],[1120,7],[2501,8]]},"67":{"position":[[371,8]]},"87":{"position":[[143,8]]},"137":{"position":[[705,9]]},"151":{"position":[[128,8]]},"161":{"position":[[3001,7],[3047,7]]},"163":{"position":[[570,7]]},"181":{"position":[[469,9]]},"186":{"position":[[42,9],[149,8]]},"208":{"position":[[167,8]]},"217":{"position":[[2728,7]]},"228":{"position":[[222,8]]},"251":{"position":[[1984,7]]},"291":{"position":[[63,8]]},"297":{"position":[[38,9]]},"380":{"position":[[624,9]]},"412":{"position":[[1711,7],[1949,11]]}}}],["include_human_feedback",{"_index":2136,"t":{"384":{"position":[[337,22],[1184,25]]}}}],["incom",{"_index":1798,"t":{"267":{"position":[[208,8]]}}}],["incomplet",{"_index":874,"t":{"40":{"position":[[908,10]]}}}],["inconsist",{"_index":568,"t":{"32":{"position":[[453,15]]}}}],["increas",{"_index":1163,"t":{"89":{"position":[[270,8]]}}}],["indent=4",{"_index":2235,"t":{"412":{"position":[[1581,9]]}}}],["index",{"_index":1344,"t":{"143":{"position":[[591,5]]},"217":{"position":[[862,5]]}}}],["index.as_retriever(search_kwargs=search_kwargs)async",{"_index":1349,"t":{"143":{"position":[[728,52]]}}}],["indic",{"_index":934,"t":{"42":{"position":[[1974,10]]}}}],["industri",{"_index":894,"t":{"42":{"position":[[338,8]]},"50":{"position":[[1636,10],[1957,10],[2026,8]]},"85":{"position":[[489,10]]}}}],["inevit",{"_index":1408,"t":{"161":{"position":[[1084,10]]}}}],["infer",{"_index":1948,"t":{"320":{"position":[[101,9]]}}}],["influx",{"_index":304,"t":{"14":{"position":[[408,6]]}}}],["inform",{"_index":25,"t":{"2":{"position":[[253,12],[694,11]]},"6":{"position":[[510,11],[975,11],[1168,11],[1219,11]]},"10":{"position":[[35,11],[367,12],[524,12],[695,12],[936,11]]},"12":{"position":[[317,11],[447,12]]},"14":{"position":[[451,12],[691,11]]},"28":{"position":[[430,12]]},"32":{"position":[[883,12]]},"36":{"position":[[493,11],[702,11],[1852,11],[1960,12],[2486,11],[5332,12],[5719,11],[5827,12],[7468,11],[8695,12]]},"40":{"position":[[232,12],[582,11],[976,8]]},"42":{"position":[[205,12],[662,12],[980,8],[1495,11],[1793,11]]},"44":{"position":[[428,11]]},"48":{"position":[[763,12]]},"50":{"position":[[2324,11]]},"52":{"position":[[659,12]]},"71":{"position":[[402,11]]},"91":{"position":[[417,11],[825,11],[909,11]]},"101":{"position":[[34,11],[197,12],[262,11],[349,11]]},"221":{"position":[[119,12],[178,12]]},"223":{"position":[[158,11],[269,11],[802,11],[898,11]]},"234":{"position":[[1058,11],[1125,11],[1255,12]]},"251":{"position":[[805,13],[840,15]]},"273":{"position":[[265,11]]},"287":{"position":[[63,11]]},"289":{"position":[[46,11]]},"291":{"position":[[29,11]]},"410":{"position":[[613,12]]},"418":{"position":[[43,11]]}}}],["init(self",{"_index":2215,"t":{"412":{"position":[[747,11]]}}}],["init_research_team(self",{"_index":525,"t":{"30":{"position":[[2090,25]]}}}],["initi",{"_index":333,"t":{"20":{"position":[[34,7]]},"28":{"position":[[287,7],[571,7]]},"30":{"position":[[1078,10],[1199,12],[1579,10],[2049,10],[2118,10],[3395,14]]},"36":{"position":[[2789,8],[5467,10]]},"50":{"position":[[557,10],[648,11]]},"56":{"position":[[259,10]]},"65":{"position":[[28,11],[183,7]]},"67":{"position":[[46,7]]},"69":{"position":[[440,7]]},"251":{"position":[[301,10],[928,10]]},"304":{"position":[[96,12]]},"380":{"position":[[135,7],[247,7]]},"406":{"position":[[155,10]]},"412":{"position":[[480,10]]}}}],["initial_research",{"_index":487,"t":{"30":{"position":[[549,17]]}}}],["initializewebsocket",{"_index":1807,"t":{"267":{"position":[[654,21],[1587,22]]}}}],["inmemoryvectorstore(embedding=openaiembeddings())queri",{"_index":1491,"t":{"165":{"position":[[454,54]]}}}],["inmemoryvectorstorefrom",{"_index":1489,"t":{"165":{"position":[[375,23]]}}}],["inner",{"_index":1533,"t":{"188":{"position":[[213,5]]}}}],["innov",{"_index":327,"t":{"14":{"position":[[848,10]]},"34":{"position":[[1168,10]]}}}],["input",{"_index":1226,"t":{"111":{"position":[[609,5]]},"125":{"position":[[93,5]]},"165":{"position":[[177,9]]}}}],["input(\"y",{"_index":738,"t":{"36":{"position":[[2896,11],[7919,11]]}}}],["insid",{"_index":1587,"t":{"217":{"position":[[286,6]]}}}],["insight",{"_index":710,"t":{"36":{"position":[[1590,8]]},"40":{"position":[[149,8],[929,9],[1214,10]]},"42":{"position":[[1704,9],[1725,9],[1864,9]]},"52":{"position":[[424,9]]},"87":{"position":[[65,8],[309,9]]}}}],["inspect",{"_index":1291,"t":{"129":{"position":[[47,7]]}}}],["inspir",{"_index":409,"t":{"24":{"position":[[329,8]]},"60":{"position":[[25,8]]},"95":{"position":[[359,11]]},"373":{"position":[[147,8]]}}}],["instal",{"_index":1023,"t":{"50":{"position":[[148,7],[185,7]]},"77":{"position":[[71,9],[116,10]]},"79":{"position":[[4,7]]},"117":{"position":[[9,7]]},"119":{"position":[[111,7],[142,7]]},"121":{"position":[[197,7],[234,7],[260,7]]},"147":{"position":[[105,7],[144,7]]},"169":{"position":[[9,7],[36,7]]},"173":{"position":[[522,7],[612,7],[707,7]]},"175":{"position":[[89,7],[622,7]]},"184":{"position":[[335,13],[353,7]]},"186":{"position":[[451,12]]},"192":{"position":[[94,8],[107,7],[254,12]]},"194":{"position":[[119,7]]},"208":{"position":[[28,7]]},"214":{"position":[[52,7]]},"217":{"position":[[27,7],[75,7],[101,7],[130,12],[196,7],[308,7],[339,7],[878,7],[917,7],[1172,7],[1232,7],[1255,7]]},"226":{"position":[[20,7]]},"243":{"position":[[544,13]]},"245":{"position":[[67,7],[101,7]]},"249":{"position":[[66,9],[178,9]]},"257":{"position":[[219,7],[274,7],[302,7],[426,7],[458,7]]},"259":{"position":[[25,7],[53,7],[92,7],[124,7],[241,7],[302,7],[322,7],[359,7],[400,7],[461,7]]},"263":{"position":[[333,7],[487,10],[525,13]]},"271":{"position":[[78,9],[107,7],[172,7]]},"285":{"position":[[15,7],[55,7]]},"382":{"position":[[0,7],[31,7]]},"386":{"position":[[4,7]]},"390":{"position":[[9,7]]},"392":{"position":[[15,7],[50,7]]}}}],["installation:sudo",{"_index":1620,"t":{"217":{"position":[[955,17],[1368,17]]}}}],["instanc",{"_index":521,"t":{"30":{"position":[[1911,8]]},"32":{"position":[[586,9]]},"50":{"position":[[952,8]]},"69":{"position":[[989,8]]},"111":{"position":[[159,9]]},"139":{"position":[[386,8]]},"143":{"position":[[80,10]]},"161":{"position":[[3127,8]]},"163":{"position":[[661,8]]},"165":{"position":[[537,8]]},"243":{"position":[[109,8]]},"251":{"position":[[1502,9]]},"357":{"position":[[911,9]]},"400":{"position":[[82,8]]},"402":{"position":[[106,8]]}}}],["instancellm_provid",{"_index":2063,"t":{"357":{"position":[[381,20]]}}}],["instanti",{"_index":1215,"t":{"107":{"position":[[567,11]]},"412":{"position":[[1301,11]]}}}],["instruct",{"_index":696,"t":{"36":{"position":[[965,12],[1737,13]]},"107":{"position":[[8,8]]},"137":{"position":[[33,11]]},"139":{"position":[[8,8]]},"141":{"position":[[83,8]]},"143":{"position":[[8,8]]},"186":{"position":[[464,12]]},"192":{"position":[[267,12]]},"208":{"position":[[65,12]]}}}],["instruct\"embedding=\"fireworks:nom",{"_index":2027,"t":{"340":{"position":[[289,35]]}}}],["instruct\"smart_llm=\"fireworks:accounts/fireworks/models/mixtr",{"_index":2025,"t":{"340":{"position":[[147,63]]}}}],["instruct\"strategic_llm=\"fireworks:accounts/fireworks/models/mixtr",{"_index":2026,"t":{"340":{"position":[[216,67]]}}}],["instructions=assistant_prompt_instruct",{"_index":724,"t":{"36":{"position":[[2327,42],[7309,42]]}}}],["int",{"_index":2177,"t":{"406":{"position":[[436,4],[542,4],[661,4]]}}}],["integr",{"_index":695,"t":{"36":{"position":[[852,11]]},"42":{"position":[[1766,11]]},"181":{"position":[[102,11]]},"184":{"position":[[118,11]]},"186":{"position":[[285,12]]},"190":{"position":[[70,11]]},"192":{"position":[[130,11]]},"332":{"position":[[5,11]]},"363":{"position":[[494,10]]}}}],["intellig",{"_index":1119,"t":{"69":{"position":[[311,12]]},"135":{"position":[[1069,12]]},"153":{"position":[[186,13],[240,12]]}}}],["intens",{"_index":1423,"t":{"161":{"position":[[1458,9]]}}}],["interact",{"_index":475,"t":{"30":{"position":[[336,12]]},"125":{"position":[[193,11]]},"181":{"position":[[202,8]]},"241":{"position":[[426,11]]},"243":{"position":[[331,12]]},"247":{"position":[[134,8],[322,12]]}}}],["interest",{"_index":461,"t":{"28":{"position":[[1473,11]]},"38":{"position":[[84,11],[186,10]]},"103":{"position":[[356,10]]},"234":{"position":[[24,10]]},"410":{"position":[[527,10]]}}}],["interfac",{"_index":422,"t":{"26":{"position":[[231,10]]},"115":{"position":[[233,9]]},"125":{"position":[[70,10]]},"181":{"position":[[234,11]]},"228":{"position":[[250,9]]},"388":{"position":[[229,9]]}}}],["interfer",{"_index":46,"t":{"2":{"position":[[556,12]]},"4":{"position":[[183,13]]}}}],["intern",{"_index":900,"t":{"42":{"position":[[462,8],[1211,8]]},"50":{"position":[[2052,8]]},"87":{"position":[[232,8]]}}}],["internet",{"_index":436,"t":{"28":{"position":[[274,8]]},"36":{"position":[[1873,9],[5740,9]]},"95":{"position":[[101,8]]},"380":{"position":[[122,8]]}}}],["interpret",{"_index":681,"t":{"36":{"position":[[384,12],[1034,12],[8724,11]]}}}],["intervent",{"_index":634,"t":{"34":{"position":[[316,12]]}}}],["introduc",{"_index":329,"t":{"17":{"position":[[0,11]]},"40":{"position":[[403,9]]}}}],["introduct",{"_index":450,"t":{"28":{"position":[[1215,13]]},"30":{"position":[[691,13]]},"62":{"position":[[135,13]]},"380":{"position":[[637,13]]}}}],["introspect",{"_index":1787,"t":{"259":{"position":[[386,13]]}}}],["intuit",{"_index":394,"t":{"22":{"position":[[531,9]]},"125":{"position":[[51,9]]}}}],["invalu",{"_index":1137,"t":{"71":{"position":[[305,10]]}}}],["invest",{"_index":913,"t":{"42":{"position":[[989,10]]}}}],["investig",{"_index":1364,"t":{"151":{"position":[[49,12]]}}}],["invoc",{"_index":707,"t":{"36":{"position":[[1435,10]]}}}],["involv",{"_index":1019,"t":{"48":{"position":[[642,8]]},"161":{"position":[[694,7]]}}}],["ironi",{"_index":149,"t":{"6":{"position":[[194,5]]}}}],["irrelev",{"_index":1197,"t":{"101":{"position":[[251,10]]},"221":{"position":[[246,10]]}}}],["isn't",{"_index":1294,"t":{"131":{"position":[[39,5]]}}}],["isol",{"_index":873,"t":{"40":{"position":[[885,10]]},"52":{"position":[[288,10]]},"175":{"position":[[354,8],[770,8]]}}}],["issu",{"_index":82,"t":{"4":{"position":[[32,6]]},"8":{"position":[[8,5]]},"32":{"position":[[684,6]]},"89":{"position":[[8,7],[203,7]]},"196":{"position":[[11,6]]},"257":{"position":[[4,5],[336,5]]},"263":{"position":[[19,5]]},"369":{"position":[[429,6]]}}}],["it'",{"_index":940,"t":{"44":{"position":[[33,4]]},"60":{"position":[[166,4]]},"249":{"position":[[80,4]]},"263":{"position":[[353,4],[539,4],[616,4]]}}}],["item",{"_index":120,"t":{"4":{"position":[[682,5]]}}}],["iter",{"_index":2227,"t":{"412":{"position":[[1233,7]]}}}],["it’",{"_index":275,"t":{"10":{"position":[[1061,4]]},"14":{"position":[[937,4]]},"32":{"position":[[2284,4]]},"36":{"position":[[4062,4]]}}}],["i’v",{"_index":248,"t":{"10":{"position":[[216,4]]},"28":{"position":[[1491,4]]}}}],["javascript",{"_index":1681,"t":{"228":{"position":[[302,10]]},"241":{"position":[[379,10]]},"243":{"position":[[166,10],[396,10]]},"247":{"position":[[218,10]]}}}],["job",{"_index":1373,"t":{"153":{"position":[[256,3]]},"161":{"position":[[1725,3]]}}}],["job.[2]if",{"_index":1453,"t":{"161":{"position":[[2448,9]]}}}],["jobdescript",{"_index":1447,"t":{"161":{"position":[[2245,14]]}}}],["join",{"_index":667,"t":{"34":{"position":[[1387,4]]},"38":{"position":[[200,7]]},"161":{"position":[[463,4]]},"410":{"position":[[335,4]]}}}],["journey",{"_index":2201,"t":{"410":{"position":[[351,8]]}}}],["json",{"_index":1739,"t":{"251":{"position":[[250,4],[396,4]]}}}],["json.parse(event.data",{"_index":1814,"t":{"267":{"position":[[911,23]]}}}],["json.stringify(data",{"_index":1838,"t":{"267":{"position":[[1789,21]]}}}],["jsonifi",{"_index":1894,"t":{"285":{"position":[[642,9]]}}}],["jsonifyfrom",{"_index":1888,"t":{"285":{"position":[[117,11]]}}}],["jsonimport",{"_index":802,"t":{"36":{"position":[[5394,10]]}}}],["juli",{"_index":1764,"t":{"255":{"position":[[119,5]]}}}],["jun",{"_index":2239,"t":{"412":{"position":[[1792,4]]}}}],["k",{"_index":1018,"t":{"48":{"position":[[501,1]]},"143":{"position":[[1534,4]]},"165":{"position":[[917,1]]}}}],["k=3)for",{"_index":1010,"t":{"46":{"position":[[1972,7]]}}}],["keep",{"_index":59,"t":{"2":{"position":[[771,7]]},"12":{"position":[[384,4]]},"34":{"position":[[1322,4]]},"223":{"position":[[914,4]]},"228":{"position":[[324,5]]}}}],["key",{"_index":481,"t":{"30":{"position":[[450,4]]},"32":{"position":[[306,3]]},"34":{"position":[[84,3],[576,3]]},"42":{"position":[[99,3]]},"44":{"position":[[576,3]]},"46":{"position":[[1876,3]]},"50":{"position":[[365,4],[539,4]]},"77":{"position":[[141,3],[201,3]]},"81":{"position":[[16,4]]},"87":{"position":[[174,3]]},"89":{"position":[[4,3],[32,4]]},"117":{"position":[[77,4]]},"147":{"position":[[268,4]]},"157":{"position":[[140,4]]},"161":{"position":[[3009,3]]},"206":{"position":[[302,4],[381,4]]},"208":{"position":[[225,4]]},"232":{"position":[[248,4],[513,5],[981,5]]},"271":{"position":[[263,3],[326,3],[380,3]]},"312":{"position":[[52,5]]},"320":{"position":[[205,4]]},"322":{"position":[[95,3],[156,4]]},"324":{"position":[[108,5]]},"326":{"position":[[64,4]]},"328":{"position":[[26,4]]},"334":{"position":[[47,3]]},"363":{"position":[[220,3]]},"382":{"position":[[124,3],[172,3]]},"390":{"position":[[77,4]]},"406":{"position":[[821,3]]},"408":{"position":[[63,3],[211,3],[362,3],[506,3],[644,3]]}}}],["key:curl",{"_index":1597,"t":{"217":{"position":[[447,8]]}}}],["key]azure_openai_endpoint=https://{your",{"_index":1936,"t":{"316":{"position":[[419,39]]}}}],["key]base_url=\"https://api.fireworks.ai/inference/v1/completions\"fast_llm=\"fireworks:accounts/fireworks/models/mixtr",{"_index":2024,"t":{"340":{"position":[[24,117]]}}}],["key]embedding=\"voyageai:voyag",{"_index":2038,"t":{"349":{"position":[[21,30]]}}}],["key]fast_llm=\"anthropic:claud",{"_index":1973,"t":{"326":{"position":[[141,30]]}}}],["key]fast_llm=\"cohere:command\"smart_llm=\"cohere:command",{"_index":2018,"t":{"338":{"position":[[21,54]]}}}],["key]fast_llm=\"google_genai:gemini",{"_index":2006,"t":{"334":{"position":[[107,33]]}}}],["key]fast_llm=\"huggingface:huggingfaceh4/zephyr",{"_index":1996,"t":{"332":{"position":[[169,46]]}}}],["key]fast_llm=\"mistralai:open",{"_index":1980,"t":{"328":{"position":[[106,28]]}}}],["key]fast_llm=\"together:meta",{"_index":1987,"t":{"330":{"position":[[165,27]]}}}],["keyembedding=\"azure_openai:text",{"_index":1690,"t":{"232":{"position":[[540,31]]}}}],["keyopenai_api_key=\"dummy_key",{"_index":1930,"t":{"314":{"position":[[195,30],[510,30]]}}}],["keyopenai_api_key=[your",{"_index":1922,"t":{"312":{"position":[[28,23]]}}}],["keyring.gpg",{"_index":1604,"t":{"217":{"position":[[566,14],[700,12]]}}}],["keysclient",{"_index":807,"t":{"36":{"position":[[5495,10]]}}}],["key}export",{"_index":1033,"t":{"50":{"position":[[500,10]]}}}],["know",{"_index":565,"t":{"32":{"position":[[248,7]]},"161":{"position":[[873,7],[923,4]]}}}],["knowledg",{"_index":718,"t":{"36":{"position":[[2003,9],[5870,9]]},"40":{"position":[[732,10]]},"42":{"position":[[259,10]]},"44":{"position":[[773,9]]},"184":{"position":[[277,9]]}}}],["kwarg",{"_index":2164,"t":{"400":{"position":[[138,9]]}}}],["l6",{"_index":2002,"t":{"332":{"position":[[376,2]]}}}],["lack",{"_index":139,"t":{"6":{"position":[[39,4]]},"40":{"position":[[552,5]]}}}],["lambda",{"_index":595,"t":{"32":{"position":[[1790,7]]}}}],["langchain",{"_index":376,"t":{"22":{"position":[[29,9]]},"30":{"position":[[2297,9]]},"44":{"position":[[554,10]]},"46":{"position":[[0,9]]},"48":{"position":[[717,10]]},"143":{"position":[[61,9],[1265,9]]},"188":{"position":[[24,9]]},"194":{"position":[[321,9]]},"232":{"position":[[168,9]]},"316":{"position":[[34,9]]}}}],["langchain.embed",{"_index":964,"t":{"46":{"position":[[478,20]]}}}],["langchain.text_splitt",{"_index":962,"t":{"46":{"position":[[412,23]]},"161":{"position":[[45,23]]}}}],["langchain.vectorstor",{"_index":966,"t":{"46":{"position":[[527,22]]}}}],["langchain_community.document_load",{"_index":954,"t":{"46":{"position":[[197,36]]}}}],["langchain_community.vectorstor",{"_index":1379,"t":{"161":{"position":[[147,32]]},"165":{"position":[[335,32]]}}}],["langchain_core.docu",{"_index":1328,"t":{"143":{"position":[[109,24]]},"161":{"position":[[197,24]]}}}],["langchain_docu",{"_index":1354,"t":{"143":{"position":[[1233,21]]}}}],["langchain_openai",{"_index":1334,"t":{"143":{"position":[[275,16]]},"161":{"position":[[102,16]]},"163":{"position":[[97,16]]},"165":{"position":[[399,16]]}}}],["langchain_postgres.vectorstor",{"_index":1332,"t":{"143":{"position":[[223,31]]},"163":{"position":[[45,31]]}}}],["langchain_retriev",{"_index":1357,"t":{"143":{"position":[[1475,19]]}}}],["langchain_retriever.invoke(\"al",{"_index":1359,"t":{"143":{"position":[[1556,31]]}}}],["langchain_vectorstor",{"_index":1488,"t":{"165":{"position":[[267,22]]}}}],["langgraph",{"_index":366,"t":{"20":{"position":[[812,10],[905,10]]},"22":{"position":[[0,9],[214,9],[437,9]]},"24":{"position":[[14,10]]},"26":{"position":[[182,10],[221,9]]},"30":{"position":[[33,9],[74,9],[1227,9],[2075,10],[3010,9]]},"32":{"position":[[62,10],[576,9],[748,9],[1267,9],[3304,9]]},"34":{"position":[[435,9],[794,9]]},"115":{"position":[[446,9]]},"181":{"position":[[340,10]]},"188":{"position":[[63,9],[478,9],[525,9]]},"192":{"position":[[318,9]]},"194":{"position":[[335,9]]},"373":{"position":[[9,10]]},"375":{"position":[[272,10]]},"386":{"position":[[12,9]]},"388":{"position":[[442,9]]}}}],["langgraph.graph",{"_index":501,"t":{"30":{"position":[[1124,15]]}}}],["languag",{"_index":1173,"t":{"91":{"position":[[247,8]]},"324":{"position":[[333,8]]},"359":{"position":[[66,8],[135,8]]}}}],["larg",{"_index":158,"t":{"6":{"position":[[365,5],[1102,5]]},"89":{"position":[[215,5]]},"316":{"position":[[321,5]]},"328":{"position":[[175,5],[221,5]]}}}],["larger?and",{"_index":1410,"t":{"161":{"position":[[1128,10]]}}}],["last",{"_index":582,"t":{"32":{"position":[[1243,4]]},"46":{"position":[[1896,4]]},"359":{"position":[[716,4]]}}}],["lastli",{"_index":645,"t":{"34":{"position":[[631,7]]},"36":{"position":[[4141,7]]},"101":{"position":[[287,7]]}}}],["late",{"_index":1311,"t":{"135":{"position":[[919,8]]}}}],["latest",{"_index":674,"t":{"36":{"position":[[77,6],[668,6],[2167,6],[2663,7],[7645,7]]},"40":{"position":[[417,6]]},"42":{"position":[[552,6]]},"56":{"position":[[183,6]]},"137":{"position":[[635,6]]},"194":{"position":[[78,6],[193,6],[314,6]]},"234":{"position":[[749,6]]},"251":{"position":[[632,6]]},"263":{"position":[[61,6]]},"276":{"position":[[8,7]]}}}],["latest\"embedding=\"mistralai:mistr",{"_index":1983,"t":{"328":{"position":[[227,35]]}}}],["latest\"strategic_llm=\"mistralai:mistr",{"_index":1982,"t":{"328":{"position":[[181,39]]}}}],["launch",{"_index":662,"t":{"34":{"position":[[1266,9]]},"177":{"position":[[0,6]]}}}],["laundri",{"_index":1416,"t":{"161":{"position":[[1294,7]]}}}],["law",{"_index":157,"t":{"6":{"position":[[358,3],[1095,3]]},"349":{"position":[[52,3]]}}}],["layout",{"_index":492,"t":{"30":{"position":[[626,6],[851,6]]},"137":{"position":[[167,7]]}}}],["lead",{"_index":161,"t":{"6":{"position":[[399,4]]},"24":{"position":[[534,7]]},"40":{"position":[[900,4]]},"42":{"position":[[1823,7]]},"101":{"position":[[410,7]]},"330":{"position":[[39,7]]}}}],["learn",{"_index":364,"t":{"20":{"position":[[673,5]]},"40":{"position":[[1068,5]]},"48":{"position":[[15,7]]},"50":{"position":[[787,5],[2562,5]]},"97":{"position":[[455,5]]},"109":{"position":[[46,5]]},"141":{"position":[[390,5]]},"184":{"position":[[435,5]]},"188":{"position":[[496,5]]},"192":{"position":[[3,5]]},"332":{"position":[[68,5]]},"418":{"position":[[97,7],[563,5]]}}}],["legaci",{"_index":1278,"t":{"121":{"position":[[270,6]]},"392":{"position":[[60,6]]}}}],["legal",{"_index":299,"t":{"14":{"position":[[268,6]]}}}],["len(research_imag",{"_index":1882,"t":{"283":{"position":[[621,21]]},"285":{"position":[[746,21]]}}}],["len(research_sourc",{"_index":1884,"t":{"283":{"position":[[658,21]]},"285":{"position":[[783,21]]}}}],["length",{"_index":2184,"t":{"406":{"position":[[720,6]]}}}],["less",{"_index":162,"t":{"6":{"position":[[407,4]]},"32":{"position":[[3100,4]]},"186":{"position":[[239,4]]}}}],["lesson",{"_index":1679,"t":{"228":{"position":[[46,7]]}}}],["let'",{"_index":939,"t":{"42":{"position":[[2161,5]]},"48":{"position":[[57,5]]},"50":{"position":[[71,5]]},"228":{"position":[[432,5]]},"353":{"position":[[209,5]]}}}],["let’",{"_index":201,"t":{"8":{"position":[[149,5]]},"12":{"position":[[63,5]]},"22":{"position":[[603,5]]},"30":{"position":[[1370,5],[1947,5],[3417,5]]},"32":{"position":[[731,5]]},"36":{"position":[[1475,5],[1708,5],[2111,5],[3550,5],[4149,5]]}}}],["level",{"_index":693,"t":{"36":{"position":[[835,6]]},"206":{"position":[[70,6]]}}}],["lever",{"_index":211,"t":{"8":{"position":[[409,8]]}}}],["leverag",{"_index":63,"t":{"2":{"position":[[842,10]]},"6":{"position":[[461,10]]},"24":{"position":[[3,10],[100,10],[521,8]]},"28":{"position":[[835,9]]},"32":{"position":[[263,8]]},"36":{"position":[[655,8]]},"42":{"position":[[1387,8],[2102,8]]},"44":{"position":[[657,8]]},"52":{"position":[[95,10]]},"60":{"position":[[562,9]]},"71":{"position":[[168,10]]},"97":{"position":[[259,10]]},"181":{"position":[[39,8]]},"184":{"position":[[29,10]]},"223":{"position":[[323,8]]},"267":{"position":[[2212,8]]},"320":{"position":[[127,8]]},"353":{"position":[[348,8]]},"373":{"position":[[95,10]]}}}],["lib",{"_index":1769,"t":{"257":{"position":[[287,3],[439,3]]},"259":{"position":[[38,3],[105,3]]}}}],["libglib2.0",{"_index":1777,"t":{"257":{"position":[[466,10]]}}}],["libpango",{"_index":1778,"t":{"259":{"position":[[132,8]]}}}],["librari",{"_index":213,"t":{"8":{"position":[[425,9]]},"188":{"position":[[488,7]]},"257":{"position":[[25,7]]},"259":{"position":[[343,10]]},"353":{"position":[[130,7]]}}}],["life",{"_index":1420,"t":{"161":{"position":[[1408,4]]}}}],["lifecycl",{"_index":760,"t":{"36":{"position":[[3539,10]]},"175":{"position":[[604,10]]}}}],["lighter",{"_index":1539,"t":{"188":{"position":[[422,7]]}}}],["lightweight",{"_index":1258,"t":{"119":{"position":[[2,11]]},"123":{"position":[[30,11]]},"241":{"position":[[242,11]]}}}],["limit",{"_index":64,"t":{"2":{"position":[[884,11]]},"40":{"position":[[692,7]]},"42":{"position":[[68,11]]},"52":{"position":[[243,11]]},"60":{"position":[[247,6]]},"71":{"position":[[260,11]]},"111":{"position":[[266,5]]},"221":{"position":[[294,7],[477,7]]},"241":{"position":[[326,12]]},"243":{"position":[[422,12]]},"363":{"position":[[247,7]]},"406":{"position":[[473,5],[580,5]]}}}],["line",{"_index":1985,"t":{"330":{"position":[[78,5]]},"357":{"position":[[528,6]]},"359":{"position":[[868,5]]}}}],["link",{"_index":1774,"t":{"257":{"position":[[347,7],[391,4]]},"263":{"position":[[466,4]]}}}],["linkedin.com",{"_index":1220,"t":{"111":{"position":[[287,12]]}}}],["linux",{"_index":1776,"t":{"257":{"position":[[412,5]]},"259":{"position":[[78,5]]},"267":{"position":[[535,6]]}}}],["list",{"_index":199,"t":{"8":{"position":[[94,4],[570,4]]},"50":{"position":[[2114,5]]},"65":{"position":[[191,4],[371,4]]},"135":{"position":[[86,4],[629,5]]},"143":{"position":[[53,4],[168,5]]},"263":{"position":[[261,4]]},"278":{"position":[[8,5]]},"295":{"position":[[12,4]]},"297":{"position":[[12,4]]},"369":{"position":[[325,4]]},"384":{"position":[[903,4]]}}}],["list[dict",{"_index":491,"t":{"30":{"position":[[606,10]]}}}],["list[docu",{"_index":1350,"t":{"143":{"position":[[857,15]]}}}],["list[str",{"_index":489,"t":{"30":{"position":[[581,9],[734,9]]}}}],["listen",{"_index":1631,"t":{"217":{"position":[[1470,6],[2515,6],[2964,6]]},"267":{"position":[[160,7]]}}}],["live",{"_index":1677,"t":{"226":{"position":[[28,4]]}}}],["llama.cpp",{"_index":1927,"t":{"314":{"position":[[32,9]]}}}],["llama/llama",{"_index":1988,"t":{"330":{"position":[[193,11],[243,11],[298,11]]}}}],["llama3",{"_index":1963,"t":{"324":{"position":[[364,6],[380,6]]}}}],["llama3.1",{"_index":2061,"t":{"357":{"position":[[339,11]]}}}],["llm",{"_index":138,"t":{"6":{"position":[[27,4],[472,4],[615,4],[772,4]]},"26":{"position":[[36,3]]},"28":{"position":[[363,4]]},"42":{"position":[[1378,4]]},"50":{"position":[[295,3],[2346,3]]},"60":{"position":[[257,3]]},"71":{"position":[[275,3]]},"77":{"position":[[182,5]]},"97":{"position":[[270,4]]},"99":{"position":[[120,3]]},"165":{"position":[[521,5]]},"221":{"position":[[140,4],[285,4]]},"314":{"position":[[61,4],[88,5],[241,4]]},"318":{"position":[[36,4]]},"324":{"position":[[129,3]]},"353":{"position":[[96,4]]},"357":{"position":[[67,4],[1044,4]]},"384":{"position":[[199,3]]},"394":{"position":[[13,3],[72,3],[623,4]]},"406":{"position":[[264,3],[365,3]]}}}],["llm'",{"_index":2042,"t":{"353":{"position":[[141,5]]}}}],["llm_kwargs=cfg.llm_kwarg",{"_index":2156,"t":{"394":{"position":[[547,25]]}}}],["llm_model",{"_index":2082,"t":{"357":{"position":[[925,9]]}}}],["llm_provider.get_chat_response(messag",{"_index":2074,"t":{"357":{"position":[[669,40]]}}}],["llm_provider=cfg.smart_llm_provid",{"_index":2153,"t":{"394":{"position":[[463,36]]}}}],["llmsfast_llm=\"openai:gpt",{"_index":1923,"t":{"312":{"position":[[66,24]]}}}],["load",{"_index":986,"t":{"46":{"position":[[1306,4]]},"89":{"position":[[100,7]]},"115":{"position":[[180,5]]},"241":{"position":[[369,6]]},"243":{"position":[[138,5],[206,4],[296,6]]},"247":{"position":[[207,6],[273,4]]},"388":{"position":[[176,5]]},"412":{"position":[[385,4]]}}}],["load_dotenvfrom",{"_index":2203,"t":{"412":{"position":[[191,15]]}}}],["load_dotenvload_dotenv()async",{"_index":2147,"t":{"394":{"position":[[267,29]]}}}],["load_local_documents(['company_report.pdf",{"_index":988,"t":{"46":{"position":[[1344,43]]}}}],["load_local_documents(file_path",{"_index":968,"t":{"46":{"position":[[567,33]]}}}],["loader",{"_index":952,"t":{"46":{"position":[[41,7],[676,6],[743,6],[807,6],[883,6],[959,6],[1040,6],[1123,6]]}}}],["local",{"_index":641,"t":{"34":{"position":[[556,5]]},"40":{"position":[[308,5],[667,5],[1153,5]]},"42":{"position":[[21,5],[133,5],[681,5],[1054,5],[1413,5]]},"44":{"position":[[349,5],[450,5],[518,5],[758,5]]},"46":{"position":[[150,5],[1316,5]]},"48":{"position":[[40,5],[682,5]]},"50":{"position":[[2045,6],[2318,5]]},"52":{"position":[[271,5]]},"75":{"position":[[56,5]]},"83":{"position":[[76,5]]},"87":{"position":[[105,5]]},"89":{"position":[[132,5]]},"91":{"position":[[437,5],[658,5],[735,5]]},"107":{"position":[[72,5],[550,7]]},"109":{"position":[[78,5]]},"115":{"position":[[290,5]]},"139":{"position":[[51,5],[458,8],[921,7],[931,7]]},"141":{"position":[[147,5],[353,5]]},"188":{"position":[[351,6]]},"314":{"position":[[9,5]]},"355":{"position":[[21,8]]},"384":{"position":[[644,6],[655,6]]},"388":{"position":[[286,5]]}}}],["localhost:3000",{"_index":1227,"t":{"111":{"position":[[622,15]]},"117":{"position":[[536,14],[557,14]]},"208":{"position":[[624,14],[645,14]]},"390":{"position":[[452,14],[473,14]]}}}],["localhost:8000",{"_index":1210,"t":{"107":{"position":[[372,15]]},"117":{"position":[[496,14]]},"121":{"position":[[400,14]]},"208":{"position":[[584,14]]},"267":{"position":[[448,15],[706,17]]},"390":{"position":[[412,14]]}}}],["locat",{"_index":1089,"t":{"60":{"position":[[459,7]]},"107":{"position":[[284,8]]},"115":{"position":[[14,8]]},"139":{"position":[[304,8]]},"217":{"position":[[1533,8],[1748,8],[2071,8],[2286,8]]},"384":{"position":[[583,8]]},"388":{"position":[[14,8]]}}}],["log",{"_index":1626,"t":{"217":{"position":[[1108,3]]},"251":{"position":[[9,4],[73,4],[221,4],[312,4],[410,3],[461,4],[484,4],[1459,6],[1534,7],[1624,7],[2029,3],[2092,4]]},"267":{"position":[[262,4]]},"299":{"position":[[50,5]]},"322":{"position":[[65,6]]},"384":{"position":[[1006,4]]}}}],["logasync",{"_index":1744,"t":{"251":{"position":[[529,8]]}}}],["logginglogging.basicconfig(level=logging.debug)from",{"_index":2053,"t":{"357":{"position":[[102,51]]}}}],["long",{"_index":660,"t":{"34":{"position":[[1208,4]]},"36":{"position":[[4000,4]]},"60":{"position":[[204,4]]},"91":{"position":[[7,4]]},"221":{"position":[[354,4]]},"228":{"position":[[78,4]]}}}],["longer",{"_index":1368,"t":{"151":{"position":[[229,6]]},"384":{"position":[[787,6]]}}}],["look",{"_index":663,"t":{"34":{"position":[[1276,7]]},"44":{"position":[[254,4]]},"48":{"position":[[76,4]]},"50":{"position":[[1063,4]]},"95":{"position":[[55,7],[186,7]]},"103":{"position":[[385,7]]},"131":{"position":[[193,4]]},"206":{"position":[[448,4]]}}}],["loop",{"_index":43,"t":{"2":{"position":[[534,6]]},"34":{"position":[[76,4]]},"188":{"position":[[228,5]]},"375":{"position":[[70,4]]}}}],["loopwhil",{"_index":828,"t":{"36":{"position":[[7890,9]]}}}],["lost",{"_index":49,"t":{"2":{"position":[[603,4],[757,4]]}}}],["lot",{"_index":459,"t":{"28":{"position":[[1438,3]]}}}],["low",{"_index":1422,"t":{"161":{"position":[[1454,3]]},"190":{"position":[[94,3],[168,3]]}}}],["lowercas",{"_index":1559,"t":{"206":{"position":[[179,10]]}}}],["lsb_releas",{"_index":1612,"t":{"217":{"position":[[754,13]]}}}],["m",{"_index":1266,"t":{"119":{"position":[[201,1]]},"173":{"position":[[256,1],[701,1]]},"177":{"position":[[122,1]]},"259":{"position":[[166,1],[544,1]]}}}],["mac",{"_index":1782,"t":{"259":{"position":[[162,3]]}}}],["machin",{"_index":1183,"t":{"91":{"position":[[773,8]]},"212":{"position":[[221,7]]},"271":{"position":[[96,7]]}}}],["maco",{"_index":1768,"t":{"257":{"position":[[260,5]]},"259":{"position":[[11,5]]}}}],["made",{"_index":2128,"t":{"375":{"position":[[21,4]]}}}],["magic",{"_index":1326,"t":{"141":{"position":[[252,5]]}}}],["main",{"_index":198,"t":{"8":{"position":[[63,4]]},"26":{"position":[[216,4]]},"30":{"position":[[806,4],[3073,4],[3140,4]]},"32":{"position":[[571,4],[2082,4]]},"56":{"position":[[64,7]]},"60":{"position":[[334,4]]},"65":{"position":[[82,4]]},"67":{"position":[[70,4]]},"71":{"position":[[138,4]]},"153":{"position":[[80,4]]},"223":{"position":[[4,4]]},"234":{"position":[[600,4]]},"267":{"position":[[2315,6]]},"384":{"position":[[86,4]]},"394":{"position":[[301,7]]}}}],["main.pi",{"_index":2134,"t":{"382":{"position":[[215,7]]}}}],["main:app",{"_index":1268,"t":{"119":{"position":[[211,8]]},"169":{"position":[[115,8]]},"177":{"position":[[132,8]]},"259":{"position":[[554,8]]},"283":{"position":[[707,8]]}}}],["mainli",{"_index":1570,"t":{"208":{"position":[[160,6]]}}}],["maintain",{"_index":1547,"t":{"194":{"position":[[27,10]]}}}],["major",{"_index":291,"t":{"14":{"position":[[61,5]]},"36":{"position":[[154,5]]}}}],["make",{"_index":323,"t":{"14":{"position":[[798,6]]},"32":{"position":[[2328,4]]},"34":{"position":[[712,6]]},"36":{"position":[[200,5],[8800,4]]},"40":{"position":[[965,4]]},"42":{"position":[[795,7],[970,4]]},"50":{"position":[[2392,4]]},"52":{"position":[[84,7],[488,4]]},"71":{"position":[[293,5]]},"125":{"position":[[423,4]]},"157":{"position":[[103,4]]},"161":{"position":[[2988,4]]},"165":{"position":[[205,5]]},"221":{"position":[[227,6]]},"249":{"position":[[161,4]]},"263":{"position":[[341,6]]}}}],["man",{"_index":1078,"t":{"56":{"position":[[198,3]]},"234":{"position":[[764,3]]},"251":{"position":[[647,3]]}}}],["manag",{"_index":418,"t":{"26":{"position":[[97,7]]},"30":{"position":[[52,11]]},"36":{"position":[[3520,6]]},"62":{"position":[[32,10]]},"161":{"position":[[2129,7]]},"175":{"position":[[568,10]]},"184":{"position":[[427,7]]},"217":{"position":[[2533,7],[2620,7],[2709,7],[2779,7],[2847,7],[2945,7],[3015,7]]},"359":{"position":[[52,6]]},"375":{"position":[[187,7]]},"412":{"position":[[904,7]]}}}],["mani",{"_index":234,"t":{"8":{"position":[[934,4]]},"32":{"position":[[3060,4]]},"34":{"position":[[584,4]]},"50":{"position":[[729,4]]},"161":{"position":[[1212,4],[1914,4]]},"263":{"position":[[0,4]]}}}],["manual",{"_index":16,"t":{"2":{"position":[[167,6]]},"36":{"position":[[3507,9]]},"221":{"position":[[34,6]]},"257":{"position":[[240,8]]}}}],["markdown",{"_index":265,"t":{"10":{"position":[[789,8]]},"28":{"position":[[1372,9]]},"32":{"position":[[2482,11],[3217,9]]},"107":{"position":[[156,9]]},"139":{"position":[[176,9]]},"155":{"position":[[40,8]]},"373":{"position":[[410,9]]},"380":{"position":[[794,9]]},"384":{"position":[[1137,11]]}}}],["market",{"_index":870,"t":{"40":{"position":[[820,6]]},"42":{"position":[[848,6],[919,6],[1548,6],[1644,9]]},"50":{"position":[[1615,6],[1936,6],[1981,6]]},"85":{"position":[[468,6]]},"153":{"position":[[260,8]]},"234":{"position":[[962,9]]}}}],["massiv",{"_index":355,"t":{"20":{"position":[[462,7]]}}}],["master",{"_index":419,"t":{"26":{"position":[[127,8]]},"375":{"position":[[217,8]]}}}],["matter",{"_index":293,"t":{"14":{"position":[[120,6],[948,6]]}}}],["maui",{"_index":1758,"t":{"251":{"position":[[1801,5],[1933,5]]}}}],["max",{"_index":2183,"t":{"406":{"position":[[716,3]]}}}],["max_results=10",{"_index":1920,"t":{"308":{"position":[[412,15]]},"412":{"position":[[1494,14]]}}}],["max_sect",{"_index":609,"t":{"32":{"position":[[2442,15],[3029,12]]},"384":{"position":[[226,12],[1097,15]]}}}],["max_subtopics=5",{"_index":1904,"t":{"304":{"position":[[266,16]]}}}],["max_tokens=2000",{"_index":2068,"t":{"357":{"position":[[483,16]]}}}],["max_tokens=8000",{"_index":815,"t":{"36":{"position":[[6110,16]]}}}],["max_tokens=cfg.smart_token_limit",{"_index":2155,"t":{"394":{"position":[[513,33]]}}}],["maximum",{"_index":2135,"t":{"384":{"position":[[245,7]]}}}],["meant",{"_index":36,"t":{"2":{"position":[[422,5]]}}}],["media",{"_index":911,"t":{"42":{"position":[[942,5]]}}}],["medium",{"_index":1541,"t":{"190":{"position":[[87,6],[117,6],[172,6]]}}}],["meeting?\"relevant_doc",{"_index":1008,"t":{"46":{"position":[[1910,22]]}}}],["meeting_notes.docx",{"_index":989,"t":{"46":{"position":[[1388,21]]}}}],["memori",{"_index":381,"t":{"22":{"position":[[149,6]]},"89":{"position":[[196,6],[303,6]]}}}],["messag",{"_index":702,"t":{"36":{"position":[[1135,8],[2837,8],[2908,9],[7044,8],[7109,8],[7186,9],[7984,7],[7992,7],[8547,8]]},"129":{"position":[[69,8]]},"267":{"position":[[217,8],[402,7],[1633,8],[2330,7]]},"394":{"position":[[395,8]]}}}],["messi",{"_index":749,"t":{"36":{"position":[[3256,6]]}}}],["metaclass",{"_index":2160,"t":{"400":{"position":[[50,9],[183,10]]}}}],["metaclass=singleton",{"_index":2166,"t":{"402":{"position":[[33,20]]}}}],["metadata",{"_index":1761,"t":{"251":{"position":[[1825,11],[1964,8],[2001,8]]}}}],["method",{"_index":335,"t":{"20":{"position":[[73,7]]},"141":{"position":[[26,7]]},"238":{"position":[[39,6]]},"241":{"position":[[79,7]]},"243":{"position":[[80,7]]},"249":{"position":[[512,6]]},"287":{"position":[[32,7]]},"400":{"position":[[158,6]]}}}],["methods=['get'])async",{"_index":1891,"t":{"285":{"position":[[221,21]]}}}],["mid",{"_index":1432,"t":{"161":{"position":[[1698,3]]}}}],["middl",{"_index":1395,"t":{"161":{"position":[[665,6],[2122,6]]}}}],["million",{"_index":1458,"t":{"161":{"position":[[2648,7]]}}}],["min",{"_index":1367,"t":{"151":{"position":[[183,4],[240,4]]}}}],["mind",{"_index":9,"t":{"2":{"position":[[96,4]]}}}],["mini",{"_index":1675,"t":{"223":{"position":[[344,4]]},"232":{"position":[[671,5]]},"316":{"position":[[618,4]]}}}],["mini\"smart_llm=\"openai:gpt",{"_index":1924,"t":{"312":{"position":[[94,26]]}}}],["minilm",{"_index":2001,"t":{"332":{"position":[[369,6]]}}}],["minilm:22m",{"_index":2047,"t":{"355":{"position":[[280,11]]},"359":{"position":[[549,11]]}}}],["minimum",{"_index":207,"t":{"8":{"position":[[306,7]]},"10":{"position":[[757,7]]}}}],["minor",{"_index":271,"t":{"10":{"position":[[1015,5]]}}}],["minut",{"_index":206,"t":{"8":{"position":[[235,6],[321,8],[990,7]]},"14":{"position":[[912,8]]},"91":{"position":[[167,7]]},"223":{"position":[[499,7]]}}}],["misinterpret",{"_index":893,"t":{"42":{"position":[[322,15]]}}}],["miss",{"_index":562,"t":{"30":{"position":[[3380,7]]},"40":{"position":[[797,7]]},"241":{"position":[[394,4]]},"249":{"position":[[225,6]]},"369":{"position":[[354,7]]}}}],["mission",{"_index":67,"t":{"2":{"position":[[916,7]]},"38":{"position":[[212,8]]}}}],["mistral",{"_index":1978,"t":{"328":{"position":[[14,7],[135,7]]}}}],["mistral_api_key=[your",{"_index":1979,"t":{"328":{"position":[[84,21]]}}}],["mitig",{"_index":915,"t":{"42":{"position":[[1072,8]]}}}],["mixtral",{"_index":1967,"t":{"324":{"position":[[395,7]]}}}],["mock",{"_index":2213,"t":{"412":{"position":[[672,4],[878,4],[939,4]]}}}],["mockresearch",{"_index":2214,"t":{"412":{"position":[[727,15],[983,16]]}}}],["mode",{"_index":1897,"t":{"299":{"position":[[24,4]]},"406":{"position":[[907,4]]}}}],["model",{"_index":173,"t":{"6":{"position":[[684,6]]},"10":{"position":[[187,6]]},"20":{"position":[[551,7]]},"32":{"position":[[2557,8]]},"36":{"position":[[297,6],[992,6],[2186,5]]},"91":{"position":[[256,7],[319,7],[345,6]]},"232":{"position":[[30,7],[48,5],[203,5],[722,5],[831,5]]},"314":{"position":[[570,5]]},"316":{"position":[[124,5],[171,5],[238,6],[327,6],[362,5],[579,5]]},"324":{"position":[[72,5],[133,6],[342,6]]},"326":{"position":[[317,6]]},"330":{"position":[[59,6]]},"353":{"position":[[110,5],[157,5],[249,6],[261,5]]},"355":{"position":[[335,5]]},"357":{"position":[[944,5]]},"359":{"position":[[75,7],[144,5]]},"384":{"position":[[180,5],[1078,8]]},"406":{"position":[[268,5],[369,5]]}}}],["model=\"gpt",{"_index":725,"t":{"36":{"position":[[2370,10],[7352,10]]}}}],["model=cfg.smart_llm_model",{"_index":2150,"t":{"394":{"position":[[368,26]]}}}],["model=llm_model",{"_index":2066,"t":{"357":{"position":[[449,16]]}}}],["modelfast_llm=\"azure_openai:gpt",{"_index":1693,"t":{"232":{"position":[[636,31]]}}}],["modern",{"_index":1120,"t":{"69":{"position":[[327,6]]}}}],["modifi",{"_index":473,"t":{"30":{"position":[[249,6]]},"267":{"position":[[493,8]]}}}],["modul",{"_index":1241,"t":{"115":{"position":[[436,6]]},"200":{"position":[[191,7]]},"388":{"position":[[432,6]]}}}],["modular",{"_index":2202,"t":{"410":{"position":[[439,10]]}}}],["module.export",{"_index":1843,"t":{"267":{"position":[[2140,18]]}}}],["more",{"_index":84,"t":{"4":{"position":[[53,4]]},"6":{"position":[[381,4]]},"12":{"position":[[120,4]]},"14":{"position":[[813,4]]},"20":{"position":[[507,4]]},"28":{"position":[[190,4]]},"34":{"position":[[639,4]]},"36":{"position":[[3449,4],[8740,5],[8777,4]]},"40":{"position":[[1185,4]]},"42":{"position":[[753,4],[975,4],[1675,4]]},"46":{"position":[[1468,4]]},"50":{"position":[[793,5],[2430,4],[2475,5]]},"52":{"position":[[155,4],[501,4]]},"91":{"position":[[590,4],[904,4]]},"97":{"position":[[461,4]]},"101":{"position":[[421,4]]},"103":{"position":[[159,4],[277,4]]},"109":{"position":[[52,4]]},"115":{"position":[[515,4]]},"121":{"position":[[2,4]]},"125":{"position":[[449,4]]},"141":{"position":[[396,4]]},"161":{"position":[[889,4],[2195,4],[2383,4]]},"175":{"position":[[536,4]]},"181":{"position":[[510,4]]},"184":{"position":[[441,5]]},"188":{"position":[[254,4],[502,5]]},"192":{"position":[[9,4]]},"214":{"position":[[100,4]]},"223":{"position":[[537,4]]},"228":{"position":[[424,7]]},"234":{"position":[[1141,5],[1189,4]]},"241":{"position":[[237,4]]},"243":{"position":[[472,4]]},"247":{"position":[[278,4]]},"299":{"position":[[36,4]]},"332":{"position":[[74,5]]},"380":{"position":[[0,4]]},"388":{"position":[[511,4]]},"410":{"position":[[608,4]]},"418":{"position":[[58,4],[569,4]]}}}],["moreov",{"_index":1060,"t":{"50":{"position":[[2292,8]]}}}],["mostli",{"_index":460,"t":{"28":{"position":[[1459,6]]},"32":{"position":[[1026,6]]},"247":{"position":[[53,6]]}}}],["move",{"_index":872,"t":{"40":{"position":[[848,6]]},"50":{"position":[[386,6]]}}}],["msg",{"_index":820,"t":{"36":{"position":[[7179,3]]}}}],["msg.content[0].text.valu",{"_index":822,"t":{"36":{"position":[[7216,30]]}}}],["much",{"_index":242,"t":{"10":{"position":[[30,4]]},"14":{"position":[[808,4]]},"161":{"position":[[717,4],[2003,4],[2214,4]]},"234":{"position":[[1184,4]]}}}],["multi",{"_index":330,"t":{"17":{"position":[[31,5]]},"20":{"position":[[683,5],[784,5]]},"22":{"position":[[67,5]]},"28":{"position":[[1339,5]]},"30":{"position":[[1284,5]]},"34":{"position":[[808,5]]},"181":{"position":[[296,5]]},"184":{"position":[[171,5]]},"188":{"position":[[45,5]]},"190":{"position":[[43,5]]},"192":{"position":[[280,5],[300,5]]},"194":{"position":[[243,5]]},"380":{"position":[[761,5]]}}}],["multi_ag",{"_index":1240,"t":{"115":{"position":[[402,12]]},"388":{"position":[[398,12]]}}}],["multipl",{"_index":398,"t":{"24":{"position":[[111,8]]},"101":{"position":[[102,8]]},"161":{"position":[[2050,8],[2200,9],[2295,8]]},"181":{"position":[[22,8]]},"363":{"position":[[309,8]]},"373":{"position":[[106,8],[371,8]]},"418":{"position":[[270,8]]}}}],["multipliers,and",{"_index":1449,"t":{"161":{"position":[[2332,15]]}}}],["myself",{"_index":1324,"t":{"139":{"position":[[874,6]]}}}],["n",{"_index":1235,"t":{"115":{"position":[[221,1]]},"388":{"position":[[217,1]]}}}],["name",{"_index":603,"t":{"32":{"position":[[2157,5]]},"36":{"position":[[2441,7],[7423,7]]},"83":{"position":[[19,5]]},"111":{"position":[[707,6]]},"163":{"position":[[468,6]]},"173":{"position":[[150,4]]},"206":{"position":[[160,5]]},"232":{"position":[[462,4],[693,4],[802,4]]},"306":{"position":[[453,6]]},"308":{"position":[[320,6]]},"316":{"position":[[194,5],[550,4]]},"322":{"position":[[232,5]]},"353":{"position":[[163,4]]}}}],["name)fast_token_limit=4000smart_llm=\"azure_openai:gpt",{"_index":1694,"t":{"232":{"position":[[728,53]]}}}],["name)smart_token_limit=4000retriever=\"b",{"_index":1695,"t":{"232":{"position":[[837,43]]}}}],["name.exampl",{"_index":1634,"t":{"217":{"position":[[1493,13],[2031,13],[2887,13],[2987,13]]}}}],["namefast_llm=azure_openai:gpt",{"_index":1938,"t":{"316":{"position":[[585,29]]}}}],["names/deploy",{"_index":1934,"t":{"316":{"position":[[177,16]]}}}],["natur",{"_index":340,"t":{"20":{"position":[[180,6]]}}}],["navig",{"_index":1274,"t":{"121":{"position":[[132,8]]},"125":{"position":[[230,8]]}}}],["nba",{"_index":1865,"t":{"273":{"position":[[614,3]]},"285":{"position":[[972,3]]}}}],["nearli",{"_index":389,"t":{"22":{"position":[[337,6]]}}}],["necessari",{"_index":279,"t":{"12":{"position":[[28,9]]},"69":{"position":[[632,9]]},"89":{"position":[[68,9]]},"147":{"position":[[282,9]]},"157":{"position":[[126,9]]},"223":{"position":[[447,10]]},"251":{"position":[[562,9]]},"412":{"position":[[700,9]]}}}],["need",{"_index":297,"t":{"14":{"position":[[219,6]]},"50":{"position":[[346,4],[851,4]]},"71":{"position":[[368,7]]},"89":{"position":[[262,4]]},"97":{"position":[[445,6]]},"125":{"position":[[332,6]]},"181":{"position":[[462,6]]},"184":{"position":[[291,4]]},"245":{"position":[[58,4]]},"247":{"position":[[126,4],[300,4]]},"249":{"position":[[549,5]]},"251":{"position":[[919,6],[1554,6]]},"316":{"position":[[88,4]]},"320":{"position":[[169,4]]},"322":{"position":[[170,4]]},"324":{"position":[[22,4]]},"365":{"position":[[294,4]]},"418":{"position":[[231,4]]}}}],["network",{"_index":1292,"t":{"129":{"position":[[85,7]]},"131":{"position":[[106,7]]}}}],["never",{"_index":41,"t":{"2":{"position":[[521,5],[642,5]]},"36":{"position":[[1984,5],[5851,5]]}}}],["new",{"_index":326,"t":{"14":{"position":[[840,3]]},"30":{"position":[[947,3]]},"34":{"position":[[1122,3],[1222,3]]},"36":{"position":[[176,3],[319,3],[2671,4],[2800,3],[7653,4]]},"40":{"position":[[52,3]]},"42":{"position":[[417,3],[926,4]]},"161":{"position":[[1179,3],[1234,3]]},"206":{"position":[[144,3],[473,3]]},"234":{"position":[[948,4]]},"267":{"position":[[767,3],[1497,3]]},"410":{"position":[[125,3]]}}}],["new_search_url",{"_index":223,"t":{"8":{"position":[[675,17]]}}}],["newslett",{"_index":1706,"t":{"234":{"position":[[998,12]]}}}],["next",{"_index":357,"t":{"20":{"position":[[521,4]]},"36":{"position":[[2105,5]]},"353":{"position":[[403,4]]}}}],["nextj",{"_index":1064,"t":{"50":{"position":[[2538,6]]},"121":{"position":[[144,6],[165,6]]},"123":{"position":[[54,6],[139,6]]},"181":{"position":[[524,6]]}}}],["ng",{"_index":353,"t":{"20":{"position":[[399,2]]}}}],["nginx",{"_index":1579,"t":{"214":{"position":[[88,6]]},"217":{"position":[[1180,8],[1189,5],[1263,5],[1346,8],[1362,5],[1403,5],[1426,5],[3156,5],[3212,6]]},"359":{"position":[[721,5]]}}}],["nginx.conf",{"_index":1652,"t":{"217":{"position":[[2765,11]]}}}],["nginx:sudo",{"_index":1628,"t":{"217":{"position":[[1240,10],[1292,10]]}}}],["nginxsudo",{"_index":1629,"t":{"217":{"position":[[1319,9]]}}}],["nightly\"embedding=\"cohere:emb",{"_index":2020,"t":{"338":{"position":[[114,31]]}}}],["nightly\"strategic_llm=\"cohere:command",{"_index":2019,"t":{"338":{"position":[[76,37]]}}}],["node",{"_index":472,"t":{"30":{"position":[[227,4],[2384,5],[2883,5],[3177,5]]},"32":{"position":[[2152,4]]}}}],["node.j",{"_index":1271,"t":{"121":{"position":[[78,7],[184,8]]},"186":{"position":[[515,7]]}}}],["none",{"_index":598,"t":{"32":{"position":[[1836,4],[2712,4]]},"36":{"position":[[4382,4],[6612,4]]},"40":{"position":[[267,4]]},"161":{"position":[[1269,4]]},"251":{"position":[[382,5],[886,4]]},"263":{"position":[[743,4]]},"406":{"position":[[145,4],[241,4],[341,4],[444,4],[550,4],[669,4],[792,4],[883,4]]},"408":{"position":[[177,4],[321,4],[472,4],[612,4],[744,4]]},"412":{"position":[[843,4],[871,4],[932,4]]},"418":{"position":[[110,4]]}}}],["nonetheless",{"_index":54,"t":{"2":{"position":[[677,12]]}}}],["notabl",{"_index":2240,"t":{"412":{"position":[[1897,7]]}}}],["note",{"_index":577,"t":{"32":{"position":[[1095,5],[1992,5]]},"44":{"position":[[44,6]]},"91":{"position":[[533,6]]},"121":{"position":[[367,5]]},"141":{"position":[[273,5]]},"190":{"position":[[247,4]]},"238":{"position":[[224,5]]},"316":{"position":[[525,4]]},"320":{"position":[[210,6]]},"324":{"position":[[271,5]]},"363":{"position":[[175,4]]},"373":{"position":[[427,5]]}}}],["noth",{"_index":269,"t":{"10":{"position":[[952,7]]},"161":{"position":[[881,7]]}}}],["notic",{"_index":561,"t":{"30":{"position":[[3332,6]]},"32":{"position":[[2906,6]]}}}],["now",{"_index":134,"t":{"4":{"position":[[973,3]]},"6":{"position":[[1373,4]]},"12":{"position":[[0,3]]},"20":{"position":[[336,3]]},"30":{"position":[[1943,3]]},"36":{"position":[[590,3],[5226,3]]},"40":{"position":[[457,3]]},"48":{"position":[[0,3]]},"50":{"position":[[0,3]]},"52":{"position":[[143,3]]},"353":{"position":[[267,3]]}}}],["npm",{"_index":1273,"t":{"121":{"position":[[109,3],[256,3],[318,3]]},"186":{"position":[[527,3]]}}}],["null",{"_index":1822,"t":{"267":{"position":[[1194,5],[1359,5]]}}}],["null;async",{"_index":1806,"t":{"267":{"position":[[634,10]]}}}],["null;let",{"_index":1804,"t":{"267":{"position":[[606,8]]}}}],["num_imag",{"_index":1881,"t":{"283":{"position":[[607,13]]},"285":{"position":[[732,13]]}}}],["num_sourc",{"_index":1883,"t":{"283":{"position":[[643,14]]},"285":{"position":[[768,14]]}}}],["number",{"_index":159,"t":{"6":{"position":[[371,7],[1108,8]]},"10":{"position":[[733,7]]},"293":{"position":[[14,6]]},"384":{"position":[[253,6]]}}}],["numer",{"_index":1020,"t":{"48":{"position":[[782,8]]}}}],["nvidia",{"_index":734,"t":{"36":{"position":[[2679,6],[7661,6]]}}}],["nvm",{"_index":1276,"t":{"121":{"position":[[193,3]]}}}],["o",{"_index":1601,"t":{"217":{"position":[[529,1]]}}}],["object",{"_index":14,"t":{"2":{"position":[[141,9]]},"6":{"position":[[1317,9]]},"12":{"position":[[194,9]]},"32":{"position":[[2856,6]]},"36":{"position":[[1319,6],[2555,9],[7537,9]]},"48":{"position":[[277,9]]},"221":{"position":[[8,9]]},"223":{"position":[[679,9]]},"228":{"position":[[184,9]]},"267":{"position":[[1695,12]]},"304":{"position":[[254,11]]},"412":{"position":[[502,6],[688,6]]},"418":{"position":[[201,9]]}}}],["obtain",{"_index":1028,"t":{"50":{"position":[[354,6]]},"326":{"position":[[43,6]]},"334":{"position":[[17,9]]}}}],["offer",{"_index":885,"t":{"42":{"position":[[84,6],[645,5]]},"52":{"position":[[299,8],[567,8]]},"181":{"position":[[15,6],[246,8],[351,8]]},"188":{"position":[[93,8]]},"326":{"position":[[293,5]]},"330":{"position":[[12,6]]}}}],["offici",{"_index":1595,"t":{"217":{"position":[[434,8]]},"263":{"position":[[709,8]]},"271":{"position":[[140,8]]}}}],["oil",{"_index":1415,"t":{"161":{"position":[[1287,3]]}}}],["older",{"_index":1793,"t":{"263":{"position":[[279,5]]}}}],["ollama",{"_index":1941,"t":{"318":{"position":[[29,6],[93,6]]},"353":{"position":[[16,6]]},"355":{"position":[[14,6],[89,7]]},"357":{"position":[[413,9],[904,6],[974,6]]}}}],["ollama'",{"_index":2041,"t":{"353":{"position":[[121,8]]}}}],["ollama_base_url",{"_index":2081,"t":{"357":{"position":[[867,15]]}}}],["ollama_base_url=http://localhost:11434fast_llm=\"ollama:llama3\"smart_llm=\"ollama:llama3\"strategic_llm=\"ollama:llama3\"embedding=\"ollama:nom",{"_index":1942,"t":{"318":{"position":[[148,139]]}}}],["on",{"_index":200,"t":{"8":{"position":[[130,3],[137,4],[231,3]]},"30":{"position":[[0,3],[1254,3]]},"32":{"position":[[73,3]]},"36":{"position":[[150,3],[1516,3],[1523,4]]},"161":{"position":[[600,3],[2191,3]]},"324":{"position":[[118,3]]},"400":{"position":[[78,3]]},"402":{"position":[[102,3]]}}}],["onc",{"_index":127,"t":{"4":{"position":[[818,4]]},"8":{"position":[[883,4]]},"48":{"position":[[320,4]]},"50":{"position":[[1002,4]]},"263":{"position":[[397,4]]},"322":{"position":[[52,4],[135,4]]}}}],["ongo",{"_index":666,"t":{"34":{"position":[[1351,7]]},"36":{"position":[[7869,7]]},"125":{"position":[[169,7]]}}}],["onlin",{"_index":11,"t":{"2":{"position":[[116,6],[446,6],[860,6],[1058,6]]},"12":{"position":[[296,6]]},"14":{"position":[[14,6],[444,6],[531,6]]},"36":{"position":[[486,6],[695,6],[1953,6],[5325,6],[5820,6]]},"42":{"position":[[1517,7]]},"223":{"position":[[781,6]]},"251":{"position":[[737,8],[774,9]]}}}],["open",{"_index":75,"t":{"2":{"position":[[1025,4]]},"10":{"position":[[203,4]]},"32":{"position":[[3314,4]]},"34":{"position":[[1109,4]]},"95":{"position":[[218,4]]},"97":{"position":[[28,4]]},"103":{"position":[[323,4]]},"206":{"position":[[463,7],[500,4]]},"208":{"position":[[38,4]]},"243":{"position":[[88,5]]},"330":{"position":[[47,4]]},"353":{"position":[[55,4]]},"359":{"position":[[180,4]]},"418":{"position":[[349,4]]}}}],["openai",{"_index":246,"t":{"10":{"position":[[180,6]]},"36":{"position":[[0,6],[104,6],[1642,6],[5245,6],[5414,6]]},"50":{"position":[[281,6],[493,6]]},"77":{"position":[[130,6]]},"232":{"position":[[297,6]]},"255":{"position":[[65,7]]},"271":{"position":[[252,6],[315,6]]},"312":{"position":[[17,6]]},"314":{"position":[[15,6],[111,6],[184,6],[426,6],[499,6]]},"316":{"position":[[50,6],[72,6]]},"373":{"position":[[455,6]]},"382":{"position":[[113,6]]},"384":{"position":[[192,6]]},"406":{"position":[[810,6]]},"408":{"position":[[200,6]]}}}],["openai'",{"_index":1174,"t":{"91":{"position":[[310,8]]},"232":{"position":[[21,8]]}}}],["openai(api_key=os.environ[\"openai_api_key\"])tavily_cli",{"_index":808,"t":{"36":{"position":[[5508,57]]}}}],["openai:{your",{"_index":1928,"t":{"314":{"position":[[74,13]]}}}],["openai_api_key",{"_index":1561,"t":{"206":{"position":[[262,14]]}}}],["openai_api_key=\"123\"openai_api_base=\"http://127.0.0.1:11434/v1\"ollama_base_url=\"http://127.0.0.1:11434/\"fast_llm=\"ollama:qwen2:1.5b\"smart_llm=\"ollama:qwen2:1.5b\"embedding=\"ollama:al",{"_index":2046,"t":{"355":{"position":[[97,182]]}}}],["openai_api_key=\"123\"openai_api_base=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/v1\"ollama_base_url=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/\"fast_llm=\"openai:qwen2:1.5b\"smart_llm=\"openai:qwen2:1.5b\"embedding=\"ollama:al",{"_index":2083,"t":{"359":{"position":[[294,254]]}}}],["openai_api_key=your_openai_api_key_hereexport",{"_index":1146,"t":{"81":{"position":[[54,45]]}}}],["openai_api_key={your",{"_index":1032,"t":{"50":{"position":[[472,20]]},"271":{"position":[[294,20]]},"382":{"position":[[92,20]]}}}],["openai_api_version=\"2024",{"_index":1684,"t":{"232":{"position":[[319,24]]}}}],["openaiembed",{"_index":1343,"t":{"143":{"position":[[572,18]]}}}],["openaiembeddings())queri",{"_index":1466,"t":{"161":{"position":[[2906,24]]}}}],["openaiembeddings()vectorstor",{"_index":1003,"t":{"46":{"position":[[1713,29]]}}}],["openaiembeddingsconnection_str",{"_index":1476,"t":{"163":{"position":[[121,33]]}}}],["openaiembeddingsfrom",{"_index":965,"t":{"46":{"position":[[506,20]]},"143":{"position":[[299,20]]},"161":{"position":[[126,20]]}}}],["openaiembeddingsvector_stor",{"_index":1490,"t":{"165":{"position":[[423,28]]}}}],["openaifrom",{"_index":804,"t":{"36":{"position":[[5428,10]]}}}],["openai’",{"_index":836,"t":{"36":{"position":[[8708,8]]}}}],["oper",{"_index":755,"t":{"36":{"position":[[3406,10]]},"62":{"position":[[256,10]]},"263":{"position":[[379,9]]}}}],["opinion",{"_index":182,"t":{"6":{"position":[[962,8],[1327,7]]},"12":{"position":[[204,7]]},"223":{"position":[[689,7]]}}}],["opportun",{"_index":899,"t":{"42":{"position":[[438,11]]}}}],["optim",{"_index":151,"t":{"6":{"position":[[245,8]]},"8":{"position":[[478,9]]},"14":{"position":[[354,10]]},"20":{"position":[[756,7]]},"28":{"position":[[899,10]]},"32":{"position":[[314,10]]},"34":{"position":[[92,9],[757,7]]},"42":{"position":[[1988,8]]},"91":{"position":[[296,9]]},"97":{"position":[[334,9]]},"99":{"position":[[109,10]]},"125":{"position":[[358,7]]},"184":{"position":[[213,9]]},"186":{"position":[[209,7]]},"190":{"position":[[279,9]]},"223":{"position":[[407,8]]},"316":{"position":[[255,7]]},"373":{"position":[[475,9]]}}}],["option",{"_index":1104,"t":{"65":{"position":[[362,8],[409,8]]},"107":{"position":[[451,8]]},"121":{"position":[[430,6]]},"151":{"position":[[120,7]]},"190":{"position":[[261,7]]},"192":{"position":[[32,8]]},"212":{"position":[[27,6]]},"217":{"position":[[1000,11]]},"384":{"position":[[628,8]]}}}],["opu",{"_index":1975,"t":{"326":{"position":[[206,4],[254,4]]}}}],["orchestr",{"_index":1087,"t":{"60":{"position":[[281,12]]}}}],["organ",{"_index":888,"t":{"42":{"position":[[183,12],[1842,12]]}}}],["organiz",{"_index":867,"t":{"40":{"position":[[764,14]]}}}],["origin",{"_index":255,"t":{"10":{"position":[[437,8]]},"161":{"position":[[328,10]]},"384":{"position":[[1311,8]]}}}],["osimport",{"_index":801,"t":{"36":{"position":[[5385,8]]},"357":{"position":[[79,8]]}}}],["osos.environ['openai_api_key",{"_index":1149,"t":{"81":{"position":[[208,30]]}}}],["other",{"_index":851,"t":{"40":{"position":[[174,7]]}}}],["out",{"_index":115,"t":{"4":{"position":[[483,3]]},"6":{"position":[[110,3]]},"20":{"position":[[865,3]]},"32":{"position":[[3279,3]]},"34":{"position":[[467,3]]},"36":{"position":[[794,3]]},"38":{"position":[[57,3],[109,3],[140,3]]},"40":{"position":[[805,3]]},"44":{"position":[[117,3]]},"50":{"position":[[2596,3]]},"95":{"position":[[142,3],[332,3]]},"97":{"position":[[494,3]]},"101":{"position":[[247,3]]},"103":{"position":[[415,3]]},"109":{"position":[[6,3]]},"117":{"position":[[177,3]]},"141":{"position":[[424,3]]},"186":{"position":[[15,3]]},"190":{"position":[[129,3]]},"192":{"position":[[47,3]]},"217":{"position":[[1112,3]]},"263":{"position":[[779,3]]},"353":{"position":[[321,3]]},"359":{"position":[[874,3]]},"390":{"position":[[177,3]]},"410":{"position":[[578,3]]},"418":{"position":[[602,3]]}}}],["outdat",{"_index":863,"t":{"40":{"position":[[620,8]]},"221":{"position":[[169,8]]}}}],["outlin",{"_index":118,"t":{"4":{"position":[[566,7],[674,7]]},"12":{"position":[[151,7]]},"26":{"position":[[387,7]]},"28":{"position":[[536,7],[684,8],[702,7]]},"34":{"position":[[213,8]]},"153":{"position":[[316,7]]},"228":{"position":[[22,9]]},"280":{"position":[[8,8]]},"375":{"position":[[441,7]]},"380":{"position":[[212,7],[274,7]]}}}],["outline_report",{"_index":1370,"t":{"151":{"position":[[261,14]]},"153":{"position":[[427,14]]},"280":{"position":[[79,16]]}}}],["output",{"_index":776,"t":{"36":{"position":[[4247,6],[4373,6],[4522,6],[4590,7],[4654,9],[4664,8],[6477,6],[6603,6],[6752,6],[6820,7],[6884,9],[6894,8]]},"60":{"position":[[261,8]]},"71":{"position":[[279,8]]},"87":{"position":[[4,6]]},"155":{"position":[[61,7]]},"221":{"position":[[317,7]]},"251":{"position":[[1606,7],[1663,9],[2097,6]]},"384":{"position":[[552,6]]},"412":{"position":[[1677,6]]}}}],["outsid",{"_index":1302,"t":{"135":{"position":[[245,7]]}}}],["over",{"_index":277,"t":{"10":{"position":[[1102,4]]},"40":{"position":[[0,4]]},"48":{"position":[[909,4]]},"50":{"position":[[2249,4]]},"97":{"position":[[162,4]]},"228":{"position":[[113,5],[143,4]]},"418":{"position":[[511,4]]}}}],["overal",{"_index":169,"t":{"6":{"position":[[552,7]]},"8":{"position":[[271,7]]},"34":{"position":[[240,7]]}}}],["overhead",{"_index":756,"t":{"36":{"position":[[3454,8]]}}}],["overload",{"_index":305,"t":{"14":{"position":[[419,8]]},"40":{"position":[[594,9]]}}}],["overse",{"_index":417,"t":{"26":{"position":[[63,8]]},"375":{"position":[[80,8],[153,8]]}}}],["overview",{"_index":1015,"t":{"48":{"position":[[297,8]]},"412":{"position":[[1859,8]]}}}],["pace",{"_index":657,"t":{"34":{"position":[[1160,4]]}}}],["packag",{"_index":444,"t":{"28":{"position":[[871,7]]},"30":{"position":[[1444,8]]},"77":{"position":[[108,7]]},"107":{"position":[[506,8]]},"119":{"position":[[128,9]]},"173":{"position":[[121,7]]},"175":{"position":[[514,8],[996,9]]},"184":{"position":[[8,7],[419,7]]},"186":{"position":[[266,7]]},"190":{"position":[[12,7]]},"192":{"position":[[85,8]]},"194":{"position":[[106,8]]},"217":{"position":[[854,7]]},"245":{"position":[[88,8]]},"249":{"position":[[201,8]]},"257":{"position":[[232,7]]},"259":{"position":[[443,9]]},"267":{"position":[[140,8]]},"271":{"position":[[149,7]]},"308":{"position":[[551,8]]},"382":{"position":[[17,9]]}}}],["page",{"_index":630,"t":{"32":{"position":[[3326,5]]},"38":{"position":[[125,4]]},"50":{"position":[[779,4],[2618,5]]},"54":{"position":[[8,4]]},"58":{"position":[[8,4]]},"73":{"position":[[8,4]]},"93":{"position":[[8,4]]},"97":{"position":[[516,5]]},"103":{"position":[[431,5]]},"105":{"position":[[8,4]]},"113":{"position":[[8,4]]},"127":{"position":[[8,4]]},"133":{"position":[[8,4]]},"145":{"position":[[8,4]]},"159":{"position":[[8,4]]},"167":{"position":[[8,4]]},"179":{"position":[[8,4]]},"198":{"position":[[8,4]]},"210":{"position":[[8,4]]},"219":{"position":[[8,4]]},"230":{"position":[[8,4]]},"236":{"position":[[8,4]]},"241":{"position":[[128,4]]},"243":{"position":[[148,4],[258,4]]},"247":{"position":[[152,4]]},"253":{"position":[[8,4]]},"265":{"position":[[8,4]]},"269":{"position":[[8,4]]},"310":{"position":[[8,4]]},"316":{"position":[[57,5]]},"326":{"position":[[35,4]]},"351":{"position":[[8,4]]},"361":{"position":[[8,4]]},"369":{"position":[[176,4],[251,4],[467,5]]},"371":{"position":[[8,4]]},"373":{"position":[[347,4]]},"396":{"position":[[8,4]]},"398":{"position":[[8,4]]},"404":{"position":[[8,4]]},"410":{"position":[[599,4]]},"414":{"position":[[8,4]]},"416":{"position":[[8,4]]},"418":{"position":[[624,5]]}}}],["painters.)if",{"_index":1387,"t":{"161":{"position":[[362,12]]}}}],["pango",{"_index":1772,"t":{"257":{"position":[[315,5]]},"259":{"position":[[61,5],[367,5]]}}}],["paper",{"_index":95,"t":{"4":{"position":[[238,5],[264,5]]},"24":{"position":[[358,6]]},"42":{"position":[[480,6]]},"60":{"position":[[54,6]]},"373":{"position":[[176,6]]}}}],["parallel",{"_index":210,"t":{"8":{"position":[[382,11],[499,9],[864,9]]},"28":{"position":[[639,8],[720,10]]},"32":{"position":[[135,8],[272,8],[358,8],[645,8],[2127,8]]},"380":{"position":[[292,10]]}}}],["param",{"_index":793,"t":{"36":{"position":[[4921,6]]},"50":{"position":[[665,6]]},"111":{"position":[[120,5]]}}}],["paramet",{"_index":731,"t":{"36":{"position":[[2531,13],[7513,13]]},"65":{"position":[[59,11]]},"125":{"position":[[304,10]]},"135":{"position":[[392,9]]},"251":{"position":[[572,10]]},"304":{"position":[[80,10]]}}}],["pars",{"_index":1714,"t":{"241":{"position":[[141,6],[204,6]]}}}],["part",{"_index":462,"t":{"28":{"position":[[1485,5]]},"32":{"position":[[27,4],[2768,4]]}}}],["particularli",{"_index":1085,"t":{"60":{"position":[[171,12]]}}}],["partner",{"_index":1199,"t":{"103":{"position":[[138,9]]}}}],["pass",{"_index":511,"t":{"30":{"position":[[1534,4]]},"36":{"position":[[4932,4]]},"107":{"position":[[515,4]]},"111":{"position":[[130,4]]},"137":{"position":[[182,4]]},"139":{"position":[[423,4]]},"304":{"position":[[61,7]]}}}],["passion",{"_index":62,"t":{"2":{"position":[[830,7]]}}}],["past",{"_index":845,"t":{"40":{"position":[[9,4]]},"42":{"position":[[1589,4]]},"221":{"position":[[160,4]]},"353":{"position":[[147,5]]}}}],["path",{"_index":1100,"t":{"65":{"position":[[224,4]]},"139":{"position":[[84,4]]},"141":{"position":[[344,4]]},"245":{"position":[[310,5]]},"249":{"position":[[102,5]]},"251":{"position":[[893,4]]}}}],["pattern",{"_index":2226,"t":{"412":{"position":[[1196,8],[1825,8],[1881,9],[1918,8],[2062,8],[2160,9]]}}}],["pay",{"_index":362,"t":{"20":{"position":[[626,3]]},"161":{"position":[[1536,4],[1729,6]]}}}],["payload",{"_index":1837,"t":{"267":{"position":[[1768,7],[2014,9],[2125,9]]}}}],["pdf",{"_index":453,"t":{"28":{"position":[[1361,4]]},"32":{"position":[[2500,6],[3227,3]]},"83":{"position":[[92,6]]},"107":{"position":[[127,4]]},"139":{"position":[[147,4]]},"228":{"position":[[410,4]]},"257":{"position":[[71,4]]},"373":{"position":[[396,4]]},"380":{"position":[[783,4]]},"384":{"position":[[1155,6]]}}}],["peer",{"_index":1279,"t":{"121":{"position":[[277,4]]},"392":{"position":[[67,4]]}}}],["peopl",{"_index":1402,"t":{"161":{"position":[[857,6]]}}}],["per",{"_index":1191,"t":{"97":{"position":[[183,3]]},"99":{"position":[[56,3]]},"161":{"position":[[1750,3],[1837,3]]},"228":{"position":[[163,3]]},"418":{"position":[[532,3]]}}}],["perform",{"_index":295,"t":{"14":{"position":[[156,7]]},"36":{"position":[[2692,15],[5980,7],[7674,15]]},"46":{"position":[[1826,7]]},"60":{"position":[[619,7]]},"62":{"position":[[280,11]]},"99":{"position":[[158,12]]},"121":{"position":[[50,12]]},"123":{"position":[[102,11]]},"135":{"position":[[217,7]]},"184":{"position":[[238,11]]},"217":{"position":[[1205,11]]},"316":{"position":[[263,12]]},"320":{"position":[[111,12]]},"373":{"position":[[485,12]]},"410":{"position":[[417,12]]},"412":{"position":[[1387,7]]}}}],["perhap",{"_index":356,"t":{"20":{"position":[[494,7]]}}}],["permiss",{"_index":1160,"t":{"89":{"position":[[78,12]]},"157":{"position":[[149,11]]},"255":{"position":[[27,10]]}}}],["perplex",{"_index":852,"t":{"40":{"position":[[190,11]]}}}],["person",{"_index":644,"t":{"34":{"position":[[611,8]]}}}],["perspect",{"_index":924,"t":{"42":{"position":[[1332,12]]}}}],["pgvector.from_existing_index",{"_index":1345,"t":{"143":{"position":[[599,29]]},"163":{"position":[[359,29]]}}}],["pgvectorfrom",{"_index":1333,"t":{"143":{"position":[[262,12]]},"163":{"position":[[84,12]]}}}],["pharmaceut",{"_index":896,"t":{"42":{"position":[[380,14]]}}}],["phrase",{"_index":1398,"t":{"161":{"position":[[734,6]]}}}],["physic",{"_index":1403,"t":{"161":{"position":[[928,7]]}}}],["pick",{"_index":697,"t":{"36":{"position":[[982,7]]}}}],["piec",{"_index":583,"t":{"32":{"position":[[1258,5]]}}}],["pip",{"_index":1024,"t":{"50":{"position":[[176,4],[181,3]]},"77":{"position":[[96,3]]},"79":{"position":[[0,3]]},"107":{"position":[[502,3]]},"119":{"position":[[88,3],[138,3]]},"147":{"position":[[140,3]]},"169":{"position":[[32,3]]},"173":{"position":[[703,3]]},"181":{"position":[[81,3]]},"184":{"position":[[4,3],[349,3],[415,3],[447,3]]},"186":{"position":[[262,3]]},"190":{"position":[[8,3]]},"192":{"position":[[81,3],[103,3]]},"194":{"position":[[102,3],[115,3]]},"245":{"position":[[97,3]]},"271":{"position":[[168,3]]},"285":{"position":[[51,3]]},"382":{"position":[[27,3]]},"386":{"position":[[0,3]]}}}],["pip3.11",{"_index":1788,"t":{"259":{"position":[[453,7]]}}}],["pipelin",{"_index":857,"t":{"40":{"position":[[366,9]]}}}],["pitcher.but",{"_index":1404,"t":{"161":{"position":[[949,11]]}}}],["place",{"_index":1153,"t":{"83":{"position":[[57,5]]}}}],["plain",{"_index":1204,"t":{"107":{"position":[[132,5]]},"139":{"position":[[152,5]]}}}],["plan",{"_index":96,"t":{"4":{"position":[[244,4],[412,4],[517,5]]},"24":{"position":[[473,8]]},"26":{"position":[[365,8]]},"28":{"position":[[72,8],[371,4],[519,5],[676,7]]},"34":{"position":[[196,5],[875,4],[1024,4]]},"42":{"position":[[1354,8],[1439,4]]},"44":{"position":[[339,4]]},"48":{"position":[[174,4]]},"50":{"position":[[2358,8]]},"52":{"position":[[385,8]]},"373":{"position":[[291,8]]},"375":{"position":[[419,8]]},"377":{"position":[[57,8]]},"380":{"position":[[195,5]]}}}],["planner",{"_index":545,"t":{"30":{"position":[[2723,10]]},"223":{"position":[[24,9],[70,7],[226,7]]}}}],["platform",{"_index":1585,"t":{"217":{"position":[[226,8]]},"359":{"position":[[13,8]]}}}],["playground",{"_index":2139,"t":{"386":{"position":[[142,11]]}}}],["pleas",{"_index":624,"t":{"32":{"position":[[2899,6]]},"34":{"position":[[1380,6],[1477,6]]},"38":{"position":[[44,6],[96,6]]},"91":{"position":[[934,6]]},"95":{"position":[[272,6]]},"141":{"position":[[266,6]]},"190":{"position":[[240,6]]},"196":{"position":[[33,6]]},"257":{"position":[[103,6]]},"316":{"position":[[147,6],[334,6]]},"363":{"position":[[168,6]]},"373":{"position":[[420,6]]},"384":{"position":[[662,6]]}}}],["plugin",{"_index":686,"t":{"36":{"position":[[550,9]]},"221":{"position":[[454,8]]}}}],["poetri",{"_index":1509,"t":{"175":{"position":[[17,6],[66,6],[220,6],[615,6],[686,6],[1021,6],[1235,6]]},"177":{"position":[[65,6]]}}}],["point",{"_index":558,"t":{"30":{"position":[[3244,6]]},"46":{"position":[[1880,6]]},"107":{"position":[[236,8]]},"139":{"position":[[256,8]]},"161":{"position":[[3013,6]]},"259":{"position":[[280,7]]}}}],["pointi",{"_index":1442,"t":{"161":{"position":[[2108,6]]}}}],["pool",{"_index":1073,"t":{"52":{"position":[[626,4]]}}}],["popular",{"_index":1189,"t":{"97":{"position":[[20,7]]}}}],["possibl",{"_index":191,"t":{"6":{"position":[[1197,11]]},"10":{"position":[[50,8]]},"34":{"position":[[1135,14]]},"161":{"position":[[1509,8]]}}}],["post",{"_index":1216,"t":{"109":{"position":[[19,4]]}}}],["postgresql://someuser:somepass@localhost:5432/somedatabas",{"_index":1477,"t":{"163":{"position":[[157,61]]}}}],["postgresql://someuser:somepass@localhost:5432/somedatabase'def",{"_index":1338,"t":{"143":{"position":[[385,63]]}}}],["potenti",{"_index":32,"t":{"2":{"position":[[354,9]]},"6":{"position":[[833,11]]},"40":{"position":[[743,11]]},"48":{"position":[[217,9]]},"153":{"position":[[402,10]]}}}],["power",{"_index":925,"t":{"42":{"position":[[1540,7]]},"60":{"position":[[66,8]]},"71":{"position":[[183,5]]},"125":{"position":[[514,8]]},"355":{"position":[[60,8]]},"359":{"position":[[256,8]]}}}],["powerpoint",{"_index":1205,"t":{"107":{"position":[[166,11]]},"139":{"position":[[186,11]]}}}],["powershell/cmd",{"_index":1504,"t":{"173":{"position":[[223,14],[348,14],[481,14]]}}}],["pprint",{"_index":2208,"t":{"412":{"position":[[377,7]]}}}],["pprint.pprint(search_result",{"_index":2234,"t":{"412":{"position":[[1551,29]]}}}],["pr",{"_index":1565,"t":{"206":{"position":[[477,2],[505,3]]}}}],["practic",{"_index":1192,"t":{"97":{"position":[[245,9]]}}}],["pre",{"_index":440,"t":{"28":{"position":[[466,3]]},"271":{"position":[[40,3]]},"285":{"position":[[0,3]]}}}],["predefin",{"_index":564,"t":{"32":{"position":[[225,10]]},"65":{"position":[[379,10]]},"69":{"position":[[579,10]]}}}],["prefer",{"_index":1527,"t":{"184":{"position":[[75,9]]},"238":{"position":[[20,9]]}}}],["prefix",{"_index":2117,"t":{"365":{"position":[[449,8]]}}}],["premium",{"_index":1427,"t":{"161":{"position":[[1589,7]]}}}],["prerequisit",{"_index":1261,"t":{"119":{"position":[[60,14]]},"121":{"position":[[63,14]]}}}],["prerequisites:sudo",{"_index":1588,"t":{"217":{"position":[[316,18]]}}}],["present",{"_index":656,"t":{"34":{"position":[[1079,9]]},"42":{"position":[[1112,7]]},"125":{"position":[[239,12]]}}}],["press",{"_index":1558,"t":{"206":{"position":[[102,5]]}}}],["pretti",{"_index":621,"t":{"32":{"position":[[2866,6]]}}}],["prevent",{"_index":1517,"t":{"175":{"position":[[476,10]]}}}],["preview",{"_index":727,"t":{"36":{"position":[[2388,9],[7370,9]]},"232":{"position":[[350,8]]},"312":{"position":[[149,9]]},"316":{"position":[[516,8],[682,7]]}}}],["previou",{"_index":619,"t":{"32":{"position":[[2780,8]]},"355":{"position":[[387,8]]}}}],["previous",{"_index":1097,"t":{"62":{"position":[[207,10]]},"67":{"position":[[227,10]]}}}],["price",{"_index":932,"t":{"42":{"position":[[1953,7],[2001,7]]}}}],["principl",{"_index":1406,"t":{"161":{"position":[[1024,11]]}}}],["print",{"_index":816,"t":{"36":{"position":[[7038,5],[8541,5]]},"217":{"position":[[635,5]]},"251":{"position":[[519,5]]},"384":{"position":[[991,5]]}}}],["print(\"\\033[35msearch",{"_index":2232,"t":{"412":{"position":[[1511,21]]}}}],["print(\"\\nnumb",{"_index":1870,"t":{"273":{"position":[[816,15],[873,15]]}}}],["print(\"\\nresearch",{"_index":1868,"t":{"273":{"position":[[776,17]]}}}],["print(\"ollama",{"_index":2076,"t":{"357":{"position":[[724,13]]}}}],["print(\"report",{"_index":1867,"t":{"273":{"position":[[745,16]]}}}],["print(\"retriev",{"_index":2212,"t":{"412":{"position":[[628,20]]}}}],["print('mockresearcher',dir(research",{"_index":2224,"t":{"412":{"position":[[1107,39]]}}}],["print('research_conductor',dir(research_conductor",{"_index":2223,"t":{"412":{"position":[[1053,51]]}}}],["print(cost",{"_index":1869,"t":{"273":{"position":[[803,12]]}}}],["print(doc.page_cont",{"_index":1013,"t":{"46":{"position":[[2002,23]]}}}],["print(f\"curr",{"_index":770,"t":{"36":{"position":[[3852,15],[6337,15]]}}}],["print(f\"error",{"_index":2079,"t":{"357":{"position":[[783,14]]},"394":{"position":[[598,13]]}}}],["print(f\"mi",{"_index":1743,"t":{"251":{"position":[[466,10]]}}}],["print(f\"run",{"_index":832,"t":{"36":{"position":[[8199,11]]}}}],["print(f\"{msg.rol",{"_index":821,"t":{"36":{"position":[[7196,19]]}}}],["print(len(imag",{"_index":1871,"t":{"273":{"position":[[854,18]]}}}],["print(len(sourc",{"_index":1872,"t":{"273":{"position":[[912,19]]}}}],["print(related_contexts)print(len(related_context",{"_index":1496,"t":{"165":{"position":[[924,51]]}}}],["print(report",{"_index":1054,"t":{"50":{"position":[[1787,13]]},"85":{"position":[[640,13]]},"135":{"position":[[1241,13]]},"137":{"position":[[798,13]]},"139":{"position":[[1023,13]]},"143":{"position":[[1738,13]]},"273":{"position":[[762,13]]}}}],["print(report)if",{"_index":1702,"t":{"234":{"position":[[679,15]]}}}],["print(run.error",{"_index":833,"t":{"36":{"position":[[8329,16]]}}}],["print_messages_from_thread(thread.id",{"_index":835,"t":{"36":{"position":[[8572,37]]}}}],["print_messages_from_thread(thread_id",{"_index":818,"t":{"36":{"position":[[7070,38]]}}}],["priorit",{"_index":1057,"t":{"50":{"position":[[2099,14]]},"91":{"position":[[578,11]]},"410":{"position":[[375,11]]}}}],["prioriti",{"_index":1728,"t":{"247":{"position":[[102,8]]}}}],["pro",{"_index":1528,"t":{"184":{"position":[[107,5]]},"186":{"position":[[100,5]]},"188":{"position":[[164,5]]},"336":{"position":[[85,3],[135,3]]}}}],["pro\"embedding=\"google_genai:models/text",{"_index":2010,"t":{"334":{"position":[[229,39]]}}}],["pro\"strategic_llm=\"google_genai:gemini",{"_index":2009,"t":{"334":{"position":[[186,38]]}}}],["probabl",{"_index":1436,"t":{"161":{"position":[[1892,8],[1975,8]]}}}],["problem",{"_index":38,"t":{"2":{"position":[[471,7]]},"6":{"position":[[1488,8]]}}}],["problem.lot",{"_index":1401,"t":{"161":{"position":[[841,12]]}}}],["proceed",{"_index":1796,"t":{"263":{"position":[[505,10]]}}}],["process",{"_index":397,"t":{"24":{"position":[[38,7]]},"26":{"position":[[85,7]]},"28":{"position":[[30,7],[212,7],[389,7]]},"30":{"position":[[1013,10]]},"32":{"position":[[295,7]]},"44":{"position":[[223,8],[538,9]]},"46":{"position":[[66,7]]},"60":{"position":[[307,8]]},"75":{"position":[[175,7]]},"89":{"position":[[351,10]]},"91":{"position":[[136,8],[714,8],[755,9]]},"117":{"position":[[456,10]]},"125":{"position":[[441,7]]},"208":{"position":[[544,10]]},"251":{"position":[[1443,7]]},"267":{"position":[[198,9]]},"287":{"position":[[94,8]]},"293":{"position":[[60,8]]},"295":{"position":[[53,8]]},"301":{"position":[[39,7]]},"304":{"position":[[50,7]]},"306":{"position":[[35,7]]},"308":{"position":[[45,10]]},"369":{"position":[[311,9]]},"373":{"position":[[33,7]]},"375":{"position":[[93,7],[175,7]]},"377":{"position":[[15,7]]},"380":{"position":[[60,7]]},"390":{"position":[[372,10]]}}}],["processingtext_splitt",{"_index":994,"t":{"46":{"position":[[1483,23]]}}}],["produc",{"_index":1134,"t":{"71":{"position":[[215,7]]}}}],["product",{"_index":390,"t":{"22":{"position":[[358,10]]},"36":{"position":[[127,8]]},"42":{"position":[[1183,7]]},"50":{"position":[[1579,7],[1900,7],[2061,7]]},"52":{"position":[[550,12]]},"85":{"position":[[432,7]]},"103":{"position":[[42,8]]},"123":{"position":[[127,11]]},"161":{"position":[[2388,10]]},"184":{"position":[[227,10]]},"188":{"position":[[304,10]]},"190":{"position":[[305,10]]},"410":{"position":[[80,8],[129,8]]}}}],["profil",{"_index":1554,"t":{"204":{"position":[[17,7]]}}}],["progress",{"_index":51,"t":{"2":{"position":[[621,9]]},"20":{"position":[[215,9],[473,8]]},"34":{"position":[[1359,8]]},"125":{"position":[[131,8]]}}}],["project",{"_index":408,"t":{"24":{"position":[[314,7]]},"69":{"position":[[56,8]]},"83":{"position":[[41,7]]},"111":{"position":[[542,7]]},"147":{"position":[[238,7]]},"175":{"position":[[97,7],[184,8],[445,7],[693,8],[811,8],[921,7],[1075,8]]},"181":{"position":[[148,8]]},"184":{"position":[[144,8]]},"234":{"position":[[132,8]]},"369":{"position":[[407,7]]}}}],["project'",{"_index":1513,"t":{"175":{"position":[[237,9],[594,9]]}}}],["project’",{"_index":665,"t":{"34":{"position":[[1341,9]]}}}],["promis",{"_index":1840,"t":{"267":{"position":[[1880,7]]}}}],["promise((resolv",{"_index":1830,"t":{"267":{"position":[[1501,17]]}}}],["prompt",{"_index":256,"t":{"10":{"position":[[465,6]]},"14":{"position":[[719,7]]},"20":{"position":[[270,10]]},"97":{"position":[[275,7]]},"137":{"position":[[26,6],[191,6],[612,6]]}}}],["proper",{"_index":1327,"t":{"141":{"position":[[298,6]]}}}],["properli",{"_index":166,"t":{"6":{"position":[[451,9]]},"30":{"position":[[3315,9]]}}}],["properti",{"_index":732,"t":{"36":{"position":[[2565,13],[7547,13]]},"217":{"position":[[397,10]]}}}],["propos",{"_index":80,"t":{"2":{"position":[[1156,8]]}}}],["proposit",{"_index":1431,"t":{"161":{"position":[[1653,12]]}}}],["propositioneconom",{"_index":1418,"t":{"161":{"position":[[1316,24]]}}}],["proprietari",{"_index":928,"t":{"42":{"position":[[1781,11]]},"101":{"position":[[133,11],[222,11]]}}}],["provid",{"_index":98,"t":{"4":{"position":[[278,7]]},"10":{"position":[[318,7]]},"22":{"position":[[224,8],[518,9]]},"28":{"position":[[1028,8]]},"36":{"position":[[1582,7],[1827,7],[1900,8],[5694,7],[5767,8]]},"42":{"position":[[149,7],[697,7]]},"46":{"position":[[10,8]]},"48":{"position":[[266,7]]},"69":{"position":[[432,7],[571,7]]},"75":{"position":[[83,7]]},"91":{"position":[[511,9]]},"101":{"position":[[49,7]]},"125":{"position":[[40,10]]},"135":{"position":[[74,9],[153,8],[269,9],[490,7]]},"137":{"position":[[665,7]]},"139":{"position":[[70,9],[516,8]]},"141":{"position":[[171,7]]},"175":{"position":[[820,9],[1153,8]]},"188":{"position":[[410,9]]},"232":{"position":[[54,10]]},"234":{"position":[[340,8]]},"287":{"position":[[15,8]]},"320":{"position":[[10,8]]},"324":{"position":[[59,8]]},"365":{"position":[[155,8]]},"375":{"position":[[105,8]]},"380":{"position":[[474,8]]},"384":{"position":[[384,7]]},"418":{"position":[[141,7],[170,8]]}}}],["proxy_cache_bypass",{"_index":1642,"t":{"217":{"position":[[1712,18],[2250,18]]}}}],["proxy_http_vers",{"_index":1638,"t":{"217":{"position":[[1580,18],[1843,18],[2118,18],[2381,18]]}}}],["proxy_pass",{"_index":1637,"t":{"217":{"position":[[1546,10],[1809,10],[2084,10],[2347,10]]}}}],["proxy_set_head",{"_index":1640,"t":{"217":{"position":[[1604,16],[1644,16],[1683,16],[1867,16],[1907,16],[1946,16],[2142,16],[2182,16],[2221,16],[2405,16],[2445,16],[2484,16]]}}}],["public",{"_index":413,"t":{"24":{"position":[[485,12]]},"28":{"position":[[177,12]]},"42":{"position":[[1810,6]]},"373":{"position":[[303,12]]},"377":{"position":[[144,11]]},"410":{"position":[[497,6]]}}}],["publish",{"_index":1,"t":{"2":{"position":[[18,10]]},"26":{"position":[[641,9],[669,10]]},"28":{"position":[[1297,9],[1309,9]]},"30":{"position":[[2847,12]]},"42":{"position":[[559,9]]},"161":{"position":[[339,9]]},"375":{"position":[[695,9],[723,10]]},"380":{"position":[[719,9],[731,9]]},"384":{"position":[[494,7]]}}}],["publish_format",{"_index":611,"t":{"32":{"position":[[2461,18]]},"384":{"position":[[461,15],[1116,18]]}}}],["publisher_ag",{"_index":531,"t":{"30":{"position":[[2236,15]]}}}],["publisher_agent.run",{"_index":543,"t":{"30":{"position":[[2673,20]]}}}],["publisheragent(self.output_dir",{"_index":532,"t":{"30":{"position":[[2254,31]]}}}],["pubmedcentr",{"_index":2112,"t":{"363":{"position":[[838,13]]}}}],["pull",{"_index":1549,"t":{"194":{"position":[[184,4]]},"369":{"position":[[439,4]]}}}],["put",{"_index":66,"t":{"2":{"position":[[904,3]]}}}],["pymupdfload",{"_index":955,"t":{"46":{"position":[[243,14]]}}}],["pymupdfloader(file_path",{"_index":971,"t":{"46":{"position":[[685,24]]}}}],["pypi",{"_index":1851,"t":{"271":{"position":[[162,5]]}}}],["pyproject.toml",{"_index":1514,"t":{"175":{"position":[[247,16]]}}}],["pytest",{"_index":1553,"t":{"200":{"position":[[184,6]]}}}],["python",{"_index":212,"t":{"8":{"position":[[418,6]]},"28":{"position":[[864,6]]},"30":{"position":[[1437,6]]},"36":{"position":[[1649,6]]},"77":{"position":[[49,6],[100,7]]},"81":{"position":[[186,6]]},"85":{"position":[[722,6]]},"111":{"position":[[196,6]]},"117":{"position":[[471,6]]},"119":{"position":[[75,6],[193,6]]},"149":{"position":[[39,6]]},"153":{"position":[[52,6],[200,6],[352,6]]},"173":{"position":[[248,6],[693,6]]},"177":{"position":[[114,6]]},"184":{"position":[[402,6]]},"186":{"position":[[502,6]]},"188":{"position":[[465,6]]},"208":{"position":[[559,6]]},"234":{"position":[[125,6]]},"259":{"position":[[268,6],[436,6],[506,6]]},"267":{"position":[[100,6],[133,6],[422,6]]},"271":{"position":[[62,6]]},"357":{"position":[[20,6]]},"382":{"position":[[208,6]]},"390":{"position":[[387,6]]}}}],["python3.11",{"_index":1789,"t":{"259":{"position":[[532,10]]}}}],["python@3.11",{"_index":1785,"t":{"259":{"position":[[310,11]]}}}],["q",{"_index":1167,"t":{"91":{"position":[[0,2],[208,2],[371,2],[649,2]]}}}],["qualiti",{"_index":135,"t":{"4":{"position":[[1010,7]]},"24":{"position":[[89,7]]},"34":{"position":[[248,7],[679,7]]},"50":{"position":[[2210,7]]},"234":{"position":[[1238,7]]},"249":{"position":[[437,7]]},"373":{"position":[[84,7]]},"410":{"position":[[430,8]]}}}],["queri",{"_index":219,"t":{"8":{"position":[[635,6]]},"30":{"position":[[1564,6],[1751,5]]},"32":{"position":[[2407,8]]},"36":{"position":[[2581,8],[2636,5],[2723,9],[7563,8],[7618,5],[7705,9]]},"48":{"position":[[236,7],[331,7]]},"50":{"position":[[1557,5]]},"56":{"position":[[147,5],[153,5],[400,5]]},"60":{"position":[[339,5]]},"65":{"position":[[71,6],[96,5]]},"67":{"position":[[75,6]]},"71":{"position":[[143,5]]},"85":{"position":[[410,5]]},"91":{"position":[[104,5],[801,7]]},"111":{"position":[[114,5]]},"125":{"position":[[112,8]]},"135":{"position":[[369,6],[876,5]]},"137":{"position":[[205,5]]},"139":{"position":[[838,5]]},"143":{"position":[[1113,5]]},"149":{"position":[[53,9]]},"151":{"position":[[0,5],[31,5]]},"157":{"position":[[63,5]]},"165":{"position":[[798,5]]},"223":{"position":[[605,5]]},"234":{"position":[[349,5],[719,5]]},"251":{"position":[[602,5]]},"267":{"position":[[40,5],[505,5]]},"273":{"position":[[583,5]]},"276":{"position":[[0,5]]},"278":{"position":[[0,5]]},"280":{"position":[[0,5]]},"285":{"position":[[272,5]]},"304":{"position":[[177,7]]},"330":{"position":[[29,5]]},"357":{"position":[[49,5]]},"384":{"position":[[23,5],[144,5],[165,5],[330,6],[1043,8]]},"412":{"position":[[120,5],[1162,5],[1340,5]]}}}],["query/sub",{"_index":1305,"t":{"135":{"position":[[359,9]]}}}],["query=\"site:linkedin.com",{"_index":1219,"t":{"111":{"position":[[169,24]]}}}],["query=\"th",{"_index":1116,"t":{"69":{"position":[[279,10]]}}}],["query=\"your",{"_index":1901,"t":{"304":{"position":[[156,11]]}}}],["query=queri",{"_index":515,"t":{"30":{"position":[[1659,12]]},"161":{"position":[[3180,12]]},"163":{"position":[[714,12]]},"165":{"position":[[590,12]]},"251":{"position":[[1044,12]]}}}],["querymessag",{"_index":2070,"t":{"357":{"position":[[569,13]]}}}],["question",{"_index":119,"t":{"4":{"position":[[577,9]]},"10":{"position":[[558,8],[577,12],[658,9]]},"12":{"position":[[171,9],[249,9]]},"34":{"position":[[1466,10]]},"36":{"position":[[1174,10],[1615,10],[5299,9],[8891,10]]},"103":{"position":[[485,9]]},"196":{"position":[[22,10]]},"221":{"position":[[681,9]]},"223":{"position":[[88,9],[203,9],[647,9],[734,9]]},"384":{"position":[[1320,10]]}}}],["questions.pleas",{"_index":719,"t":{"36":{"position":[[2023,16],[5890,16]]}}}],["quick",{"_index":1001,"t":{"46":{"position":[[1685,5]]},"48":{"position":[[70,5]]},"97":{"position":[[348,5]]},"123":{"position":[[17,5]]},"153":{"position":[[11,5]]}}}],["quickli",{"_index":344,"t":{"20":{"position":[[285,7]]},"418":{"position":[[0,7]]}}}],["quickstart",{"_index":1567,"t":{"208":{"position":[[8,10]]}}}],["quit",{"_index":104,"t":{"4":{"position":[[349,5]]},"6":{"position":[[624,5]]},"10":{"position":[[987,5]]},"36":{"position":[[2759,5]]}}}],["qwen2:1.5b",{"_index":2044,"t":{"353":{"position":[[238,10]]}}}],["r",{"_index":1264,"t":{"119":{"position":[[151,1]]},"147":{"position":[[153,1]]},"169":{"position":[[45,1]]},"173":{"position":[[716,1]]},"259":{"position":[[470,1]]},"382":{"position":[[40,1]]}}}],["race",{"_index":566,"t":{"32":{"position":[[433,4]]}}}],["rag",{"_index":347,"t":{"20":{"position":[[328,3]]},"97":{"position":[[296,4]]},"101":{"position":[[304,3]]}}}],["rais",{"_index":570,"t":{"32":{"position":[[701,7]]},"46":{"position":[[1180,5]]},"408":{"position":[[44,6]]}}}],["ram",{"_index":1575,"t":{"212":{"position":[[146,3]]}}}],["ran",{"_index":40,"t":{"2":{"position":[[512,3]]}}}],["random",{"_index":1452,"t":{"161":{"position":[[2431,6]]}}}],["rang",{"_index":1171,"t":{"91":{"position":[[152,5]]}}}],["rank",{"_index":1196,"t":{"101":{"position":[[161,4]]}}}],["raw",{"_index":687,"t":{"36":{"position":[[577,3]]},"91":{"position":[[842,3]]}}}],["raw_cont",{"_index":2123,"t":{"369":{"position":[[149,14],[224,14]]}}}],["reach",{"_index":325,"t":{"14":{"position":[[831,8]]},"38":{"position":[[134,5]]}}}],["react",{"_index":1229,"t":{"115":{"position":[[4,5]]},"117":{"position":[[515,5]]},"208":{"position":[[603,5]]},"388":{"position":[[4,5]]},"390":{"position":[[431,5]]}}}],["read",{"_index":1512,"t":{"175":{"position":[[227,5]]}}}],["readi",{"_index":1530,"t":{"186":{"position":[[106,5]]}}}],["real",{"_index":800,"t":{"36":{"position":[[5315,4]]},"42":{"position":[[909,4]]},"65":{"position":[[327,4]]},"125":{"position":[[121,4]]},"243":{"position":[[96,4],[321,4]]}}}],["realli",{"_index":1185,"t":{"95":{"position":[[3,6]]}}}],["realtim",{"_index":1707,"t":{"234":{"position":[[1246,8]]}}}],["reason",{"_index":321,"t":{"14":{"position":[[774,9]]},"36":{"position":[[4836,8]]},"42":{"position":[[1367,10],[1478,6]]},"50":{"position":[[2367,9]]},"52":{"position":[[398,10]]},"188":{"position":[[238,9]]}}}],["receiv",{"_index":1815,"t":{"267":{"position":[[963,11]]}}}],["recent",{"_index":94,"t":{"4":{"position":[[231,6]]},"20":{"position":[[406,8]]},"24":{"position":[[345,6]]},"36":{"position":[[2501,6],[7483,6]]},"60":{"position":[[41,6]]},"91":{"position":[[595,6]]},"373":{"position":[[163,6]]}}}],["recommend",{"_index":1158,"t":{"87":{"position":[[271,15]]},"121":{"position":[[96,12]]},"123":{"position":[[149,12]]},"161":{"position":[[3060,15]]},"188":{"position":[[335,11]]},"212":{"position":[[202,11]]}}}],["reconcil",{"_index":1177,"t":{"91":{"position":[[486,9]]}}}],["recoveri",{"_index":1762,"t":{"251":{"position":[[1944,10]]}}}],["recovery\\n",{"_index":1760,"t":{"251":{"position":[[1812,12]]}}}],["recursivecharactertextsplitter(chunk_size=1000",{"_index":995,"t":{"46":{"position":[[1509,47]]}}}],["recursivecharactertextsplitterfrom",{"_index":963,"t":{"46":{"position":[[443,34]]}}}],["reduc",{"_index":179,"t":{"6":{"position":[[854,6],[1231,7]]},"8":{"position":[[528,8]]},"14":{"position":[[305,8]]},"42":{"position":[[270,8],[1011,7]]},"52":{"position":[[362,7]]},"99":{"position":[[133,6]]},"101":{"position":[[461,7]]}}}],["redund",{"_index":1096,"t":{"62":{"position":[[184,10]]},"67":{"position":[[263,10]]}}}],["redundant.a",{"_index":1399,"t":{"161":{"position":[[771,11]]}}}],["refer",{"_index":451,"t":{"28":{"position":[[1244,10]]},"67":{"position":[[387,10]]},"196":{"position":[[40,5]]},"326":{"position":[[0,5]]},"380":{"position":[[666,10]]}}}],["refin",{"_index":1545,"t":{"190":{"position":[[293,7]]}}}],["reflect",{"_index":1663,"t":{"217":{"position":[[3107,7]]},"359":{"position":[[921,7]]}}}],["regard",{"_index":1355,"t":{"143":{"position":[[1310,9]]},"161":{"position":[[3020,9]]}}}],["region",{"_index":936,"t":{"42":{"position":[[2031,8]]}}}],["regular",{"_index":751,"t":{"36":{"position":[[3279,7]]}}}],["regulatori",{"_index":905,"t":{"42":{"position":[[581,10]]}}}],["reject",{"_index":1831,"t":{"267":{"position":[[1519,7]]}}}],["relat",{"_index":117,"t":{"4":{"position":[[529,7],[599,7]]},"48":{"position":[[515,7],[755,7]]},"223":{"position":[[150,7],[261,7]]},"249":{"position":[[140,7]]},"255":{"position":[[5,7]]},"257":{"position":[[10,7]]},"394":{"position":[[76,7]]}}}],["releas",{"_index":334,"t":{"20":{"position":[[42,7]]},"36":{"position":[[160,7]]}}}],["relev",{"_index":189,"t":{"6":{"position":[[1159,8]]},"12":{"position":[[329,8],[438,8]]},"28":{"position":[[421,8]]},"36":{"position":[[1268,8],[1944,8],[2048,8],[5811,8],[5915,8]]},"40":{"position":[[1200,9]]},"42":{"position":[[1680,8]]},"44":{"position":[[419,8]]},"48":{"position":[[410,8]]},"50":{"position":[[871,8],[2435,8]]},"67":{"position":[[218,8]]},"83":{"position":[[67,8]]},"101":{"position":[[175,8],[364,8]]},"163":{"position":[[269,8]]},"165":{"position":[[815,8]]},"217":{"position":[[3048,8]]},"223":{"position":[[814,8],[889,8]]},"251":{"position":[[2013,8]]},"418":{"position":[[18,8]]}}}],["relevant_doc",{"_index":1012,"t":{"46":{"position":[[1987,14]]}}}],["reli",{"_index":438,"t":{"28":{"position":[[451,4]]},"34":{"position":[[299,7]]}}}],["reliabl",{"_index":132,"t":{"4":{"position":[[923,11]]},"161":{"position":[[492,8]]}}}],["reload",{"_index":1497,"t":{"169":{"position":[[126,6]]},"177":{"position":[[143,6]]},"259":{"position":[[565,6]]},"283":{"position":[[718,6]]}}}],["rememb",{"_index":1733,"t":{"249":{"position":[[351,9]]}}}],["remov",{"_index":1058,"t":{"50":{"position":[[2262,6]]},"359":{"position":[[621,6]]}}}],["render",{"_index":1717,"t":{"243":{"position":[[249,8]]}}}],["renew",{"_index":1374,"t":{"153":{"position":[[334,9],[366,10]]},"276":{"position":[[32,9]]}}}],["replac",{"_index":2048,"t":{"355":{"position":[[297,7]]},"357":{"position":[[859,7]]}}}],["repo",{"_index":373,"t":{"20":{"position":[[880,4]]},"200":{"position":[[82,4]]},"206":{"position":[[65,4],[96,5]]}}}],["repo_nam",{"_index":1835,"t":{"267":{"position":[[1721,10]]}}}],["report",{"_index":244,"t":{"10":{"position":[[130,6],[411,6],[604,6],[617,6],[861,6],[905,6]]},"12":{"position":[[532,7]]},"14":{"position":[[390,7]]},"26":{"position":[[633,7],[690,6]]},"28":{"position":[[158,6],[529,6],[940,7],[1195,6],[1329,6]]},"30":{"position":[[619,6],[744,7],[844,6],[1805,6],[1812,6],[1860,6]]},"32":{"position":[[392,6],[487,7],[1174,7],[2602,6],[2804,6],[3129,7],[3191,6]]},"34":{"position":[[734,6]]},"44":{"position":[[492,7]]},"48":{"position":[[587,7]]},"50":{"position":[[1011,6],[1475,6],[1523,6],[1672,6]]},"56":{"position":[[133,7],[213,6],[454,6],[461,6]]},"60":{"position":[[139,7],[451,7]]},"62":{"position":[[123,6]]},"65":{"position":[[127,6],[163,6],[273,6]]},"67":{"position":[[283,6],[332,8],[427,7]]},"69":{"position":[[851,6],[1037,6]]},"71":{"position":[[90,7]]},"85":{"position":[[329,6],[525,6]]},"87":{"position":[[44,6],[126,6]]},"91":{"position":[[567,7]]},"107":{"position":[[426,7]]},"129":{"position":[[13,7]]},"135":{"position":[[795,6],[1149,6]]},"137":{"position":[[160,6],[500,6],[548,6],[684,6],[725,6]]},"139":{"position":[[756,6],[804,6],[948,6]]},"143":{"position":[[1032,6],[1617,6]]},"151":{"position":[[100,6]]},"153":{"position":[[26,6],[165,6],[324,6]]},"155":{"position":[[14,6]]},"157":{"position":[[85,6]]},"163":{"position":[[549,6]]},"181":{"position":[[287,8]]},"186":{"position":[[191,6],[579,6]]},"188":{"position":[[205,7]]},"221":{"position":[[377,7]]},"223":{"position":[[304,7],[1024,7]]},"228":{"position":[[54,7],[105,7],[399,7]]},"234":{"position":[[206,7],[320,6],[359,6],[452,6],[632,7],[644,6],[890,6]]},"251":{"position":[[702,6],[833,6],[1238,6],[1300,6],[1314,7]]},"257":{"position":[[94,8]]},"267":{"position":[[238,8]]},"273":{"position":[[207,6],[481,7],[659,7]]},"283":{"position":[[290,6],[527,9],[537,7]]},"285":{"position":[[407,6],[652,9],[662,7]]},"373":{"position":[[361,6]]},"375":{"position":[[687,7],[744,6]]},"380":{"position":[[205,6],[617,6],[751,6]]},"384":{"position":[[47,7],[279,7],[506,6],[521,7],[733,6],[821,6],[931,6],[1282,6],[1336,6],[1380,6]]},"394":{"position":[[329,6]]}}}],["report_format=\"apa",{"_index":1902,"t":{"304":{"position":[[216,20]]}}}],["report_sourc",{"_index":1040,"t":{"50":{"position":[[961,13],[1306,14],[1647,13]]},"65":{"position":[[134,14]]},"85":{"position":[[160,14],[500,13]]},"107":{"position":[[524,13]]},"135":{"position":[[928,13]]},"139":{"position":[[432,13],[623,14],[905,13]]},"141":{"position":[[203,13]]},"143":{"position":[[826,14],[1217,13]]},"165":{"position":[[223,13]]},"251":{"position":[[721,13]]},"267":{"position":[[1667,14]]}}}],["report_source=\"langchain_vectorstor",{"_index":1472,"t":{"161":{"position":[[3224,38]]},"163":{"position":[[758,38]]}}}],["report_source=\"web",{"_index":1492,"t":{"165":{"position":[[634,20]]}}}],["report_source=\"web_search",{"_index":1122,"t":{"69":{"position":[[378,27]]}}}],["report_source=report_sourc",{"_index":1047,"t":{"50":{"position":[[1399,28],[1757,29]]},"85":{"position":[[253,28],[610,29]]},"135":{"position":[[1194,28]]},"139":{"position":[[691,28],[993,29]]},"143":{"position":[[946,28],[1687,28]]},"251":{"position":[[1082,28]]}}}],["report_typ",{"_index":1044,"t":{"50":{"position":[[1288,12]]},"56":{"position":[[225,11]]},"65":{"position":[[102,12]]},"85":{"position":[[142,12]]},"135":{"position":[[602,12]]},"137":{"position":[[271,12],[372,12],[582,11]]},"143":{"position":[[808,12],[1185,11]]},"149":{"position":[[65,11],[77,13]]},"151":{"position":[[64,11]]},"153":{"position":[[114,11],[271,11],[415,11]]},"251":{"position":[[660,11]]},"267":{"position":[[1642,12]]},"273":{"position":[[87,12],[140,12],[627,11],[731,13]]},"283":{"position":[[162,12],[223,12]]},"285":{"position":[[340,12]]}}}],["report_type=\"research_report",{"_index":1053,"t":{"50":{"position":[[1726,30]]},"69":{"position":[[347,30]]},"85":{"position":[[579,30]]},"161":{"position":[[3193,30]]},"163":{"position":[[727,30]]},"165":{"position":[[603,30]]},"304":{"position":[[185,30]]}}}],["report_type=report_typ",{"_index":1046,"t":{"50":{"position":[[1374,24]]},"56":{"position":[[325,24]]},"85":{"position":[[228,24]]},"135":{"position":[[683,24]]},"137":{"position":[[439,24],[772,25]]},"143":{"position":[[921,24],[1662,24]]},"251":{"position":[[1057,24]]}}}],["report_type=research_report",{"_index":516,"t":{"30":{"position":[[1672,28]]}}}],["reportasync",{"_index":1700,"t":{"234":{"position":[[500,11]]}}}],["reportawait",{"_index":1474,"t":{"161":{"position":[[3323,11]]},"163":{"position":[[858,11]]}}}],["reportif",{"_index":1081,"t":{"56":{"position":[[509,8]]},"85":{"position":[[377,8]]},"135":{"position":[[843,8]]},"143":{"position":[[1080,8]]}}}],["reportreport",{"_index":1907,"t":{"306":{"position":[[156,12]]}}}],["repositori",{"_index":1091,"t":{"60":{"position":[[539,11]]},"91":{"position":[[973,11]]},"147":{"position":[[10,11]]},"186":{"position":[[88,11],[368,11]]},"192":{"position":[[182,11]]},"194":{"position":[[224,10]]},"200":{"position":[[5,10]]}}}],["repository:echo",{"_index":1606,"t":{"217":{"position":[[599,15]]}}}],["repres",{"_index":1067,"t":{"52":{"position":[[16,10]]}}}],["request",{"_index":920,"t":{"42":{"position":[[1228,8]]},"65":{"position":[[435,8]]},"131":{"position":[[137,7]]},"157":{"position":[[92,10]]},"241":{"position":[[107,7]]},"285":{"position":[[108,8],[878,7]]},"369":{"position":[[444,8]]}}}],["request.args.get('queri",{"_index":1893,"t":{"285":{"position":[[280,25]]}}}],["requir",{"_index":44,"t":{"2":{"position":[[541,8]]},"8":{"position":[[176,8]]},"36":{"position":[[2711,11],[3440,8],[4080,8],[4903,8],[7693,11]]},"119":{"position":[[119,8]]},"121":{"position":[[373,8]]},"147":{"position":[[117,8]]},"151":{"position":[[6,11],[76,11]]},"175":{"position":[[286,8]]},"184":{"position":[[256,8],[388,13]]},"186":{"position":[[298,8],[484,13]]},"188":{"position":[[451,13]]},"206":{"position":[[19,8]]},"232":{"position":[[148,9]]},"234":{"position":[[1213,7]]},"241":{"position":[[262,7],[412,8]]},"243":{"position":[[463,8],[494,8]]},"245":{"position":[[260,8]]},"247":{"position":[[240,7]]},"259":{"position":[[334,8],[412,8]]},"316":{"position":[[219,8],[291,8]]},"332":{"position":[[17,8]]},"363":{"position":[[224,12]]},"365":{"position":[[413,8]]},"382":{"position":[[8,8]]}}}],["require('./gptr",{"_index":1846,"t":{"267":{"position":[[2274,15]]}}}],["require('ws');let",{"_index":1802,"t":{"267":{"position":[[579,17]]}}}],["requirements.txt",{"_index":1265,"t":{"119":{"position":[[153,16]]},"147":{"position":[[155,16]]},"169":{"position":[[47,16]]},"173":{"position":[[643,16],[718,16]]},"259":{"position":[[472,16]]},"382":{"position":[[42,16]]}}}],["requires_act",{"_index":763,"t":{"36":{"position":[[3642,19],[3936,19],[5042,18],[6421,19],[8374,18]]}}}],["requisit",{"_index":1849,"t":{"271":{"position":[[44,10]]},"285":{"position":[[4,10]]}}}],["research",{"_index":12,"t":{"2":{"position":[[123,9],[174,8],[401,8],[453,9],[738,8],[867,8],[1009,10],[1079,9]]},"4":{"position":[[128,8],[540,9],[590,8],[872,9],[949,8]]},"6":{"position":[[212,8]]},"8":{"position":[[162,8],[279,8],[549,9],[957,8]]},"10":{"position":[[73,8],[446,8]]},"12":{"position":[[51,11],[162,8],[240,8],[523,8]]},"14":{"position":[[21,8],[178,8],[229,8],[332,8],[859,8],[976,10]]},"17":{"position":[[20,10]]},"20":{"position":[[57,11],[775,8],[892,10]]},"24":{"position":[[29,8],[441,8],[553,8],[572,11]]},"26":{"position":[[4,8],[76,8],[246,10],[313,8],[378,8],[454,8],[518,8]]},"28":{"position":[[85,9],[248,11],[295,8],[323,8],[380,8],[579,9],[648,8],[731,10],[747,11],[778,8],[853,10],[931,8],[1278,8]]},"30":{"position":[[822,8],[1399,10],[1426,10],[1594,10],[1605,10],[1729,8],[1927,8],[2763,13]]},"32":{"position":[[157,8],[833,8],[1165,8],[1580,10],[2163,12],[2217,8],[2305,8],[3079,8],[3182,8],[3291,10]]},"34":{"position":[[187,8],[528,8],[1252,10]]},"40":{"position":[[85,9],[357,8],[444,10],[484,8],[537,8],[680,8],[1096,8],[1225,9]]},"42":{"position":[[43,8],[235,8],[403,11],[471,8],[1454,8],[1555,8],[1742,8],[2118,9]]},"44":{"position":[[60,10],[108,8],[279,10],[303,8],[483,8],[670,10],[699,9]]},"48":{"position":[[92,10],[144,10],[165,8],[227,8],[358,10],[530,8],[578,8],[599,10],[626,9],[855,8]]},"50":{"position":[[55,8],[128,11],[160,10],[197,10],[265,10],[572,10],[595,8],[623,10],[703,9],[743,9],[810,10],[837,9],[1047,10],[1140,9],[1334,10],[1428,8],[1836,8],[1871,8],[2193,8],[2237,8],[2418,11],[2485,10],[2685,9]]},"52":{"position":[[7,8],[121,11],[205,9],[459,8]]},"56":{"position":[[124,8],[274,10],[285,10],[378,8]]},"60":{"position":[[92,11],[298,8],[381,8],[521,10],[636,8]]},"62":{"position":[[71,8]]},"65":{"position":[[87,8]]},"67":{"position":[[54,8],[168,8]]},"71":{"position":[[196,11],[326,12],[391,10]]},"75":{"position":[[4,10],[120,8],[216,8],[235,11]]},"79":{"position":[[16,10]]},"85":{"position":[[36,9],[188,10],[282,8]]},"87":{"position":[[35,8]]},"89":{"position":[[244,9]]},"91":{"position":[[27,8],[198,9],[225,10],[282,10],[387,10],[705,8],[890,9],[955,10]]},"95":{"position":[[241,8],[260,11],[287,10]]},"97":{"position":[[4,10],[51,8],[105,8],[196,8],[215,10],[368,9],[476,11]]},"99":{"position":[[2,8],[26,10]]},"101":{"position":[[395,8]]},"103":{"position":[[235,8],[254,11]]},"107":{"position":[[25,10],[43,8],[482,10]]},"109":{"position":[[34,8],[103,9]]},"111":{"position":[[244,10]]},"117":{"position":[[597,12]]},"125":{"position":[[26,10],[61,8],[103,8],[177,8],[295,8],[432,8]]},"135":{"position":[[45,10],[59,8],[108,10],[137,8],[203,10],[236,8],[293,8],[643,10]]},"137":{"position":[[60,8],[112,8],[398,10],[621,9]]},"139":{"position":[[25,10],[39,8],[471,10],[500,8],[651,10]]},"141":{"position":[[52,9],[100,10],[114,8]]},"143":{"position":[[25,10],[39,8],[881,10]]},"147":{"position":[[89,10]]},"151":{"position":[[22,8]]},"153":{"position":[[17,8]]},"161":{"position":[[3300,8]]},"163":{"position":[[835,8]]},"165":{"position":[[122,10],[693,9]]},"169":{"position":[[200,12]]},"177":{"position":[[219,9]]},"181":{"position":[[4,10],[70,10],[118,10],[383,8]]},"184":{"position":[[44,10],[365,10]]},"188":{"position":[[81,11],[152,11],[196,8],[512,10]]},"192":{"position":[[119,10]]},"194":{"position":[[4,10],[141,10]]},"200":{"position":[[71,10]]},"204":{"position":[[43,10]]},"208":{"position":[[685,12]]},"221":{"position":[[41,8],[261,8],[368,8],[672,8]]},"223":{"position":[[101,9],[194,8],[295,8],[389,8],[470,8],[596,8],[638,8],[725,8],[1015,8]]},"228":{"position":[[12,9],[96,8],[167,8],[390,8]]},"234":{"position":[[48,10],[197,8],[311,8],[376,10],[623,8],[1037,10]]},"238":{"position":[[246,10]]},"241":{"position":[[23,10]]},"243":{"position":[[28,10]]},"249":{"position":[[478,10],[540,8]]},"251":{"position":[[86,8],[939,10],[1016,10],[1229,8],[1291,8],[1434,8],[1696,9],[2115,8]]},"257":{"position":[[85,8]]},"259":{"position":[[425,10]]},"267":{"position":[[1747,11],[2371,10]]},"271":{"position":[[119,11],[184,10],[411,10]]},"273":{"position":[[106,10],[835,8],[892,8]]},"283":{"position":[[189,10]]},"285":{"position":[[306,10]]},"287":{"position":[[4,10],[85,8]]},"289":{"position":[[66,9]]},"291":{"position":[[50,9]]},"293":{"position":[[51,8]]},"295":{"position":[[44,8]]},"297":{"position":[[20,8]]},"301":{"position":[[30,8]]},"304":{"position":[[41,8],[128,10],[168,8]]},"306":{"position":[[17,9]]},"308":{"position":[[16,8],[84,8],[540,10]]},"316":{"position":[[280,10]]},"318":{"position":[[4,10]]},"320":{"position":[[148,11]]},"324":{"position":[[48,10]]},"353":{"position":[[375,10]]},"355":{"position":[[73,10]]},"359":{"position":[[269,10]]},"363":{"position":[[4,10]]},"365":{"position":[[227,8]]},"373":{"position":[[24,8],[259,8],[352,8]]},"375":{"position":[[4,8],[166,8],[283,10],[299,11],[367,8],[432,8],[508,8],[572,8]]},"380":{"position":[[96,11],[143,8],[171,8],[255,9],[303,10],[319,11],[350,8],[700,8]]},"384":{"position":[[14,8],[156,8],[321,8],[618,9],[724,8]]},"390":{"position":[[513,12]]},"410":{"position":[[202,11],[255,8],[292,12]]},"412":{"position":[[677,10],[970,10]]},"418":{"position":[[297,8],[365,11],[381,10],[454,8],[545,8],[584,11]]}}}],["research(self",{"_index":513,"t":{"30":{"position":[[1549,14]]}}}],["research_ag",{"_index":528,"t":{"30":{"position":[[2174,14]]}}}],["research_agent.run_depth_research",{"_index":587,"t":{"32":{"position":[[1432,34]]}}}],["research_agent.run_initial_research",{"_index":535,"t":{"30":{"position":[[2434,36]]}}}],["research_conductor",{"_index":2221,"t":{"412":{"position":[[1000,18]]}}}],["research_context",{"_index":1855,"t":{"273":{"position":[[277,16],[489,17]]},"291":{"position":[[117,16]]}}}],["research_cost",{"_index":1857,"t":{"273":{"position":[[330,14],[507,15]]},"283":{"position":[[374,14],[573,17],[591,15]]},"285":{"position":[[491,14],[698,17],[716,15]]},"293":{"position":[[69,14]]}}}],["research_data",{"_index":490,"t":{"30":{"position":[[591,14]]}}}],["research_imag",{"_index":1859,"t":{"273":{"position":[[370,15],[523,16]]},"283":{"position":[[414,15]]},"285":{"position":[[531,15]]},"295":{"position":[[62,15]]}}}],["research_report",{"_index":1080,"t":{"56":{"position":[[239,17]]},"143":{"position":[[1199,17]]},"151":{"position":[[137,16]]},"153":{"position":[[126,15]]},"251":{"position":[[674,17]]},"273":{"position":[[641,17]]},"276":{"position":[[76,17]]}}}],["research_result",{"_index":1854,"t":{"273":{"position":[[153,15]]},"283":{"position":[[236,15]]},"285":{"position":[[353,15]]}}}],["research_sourc",{"_index":1861,"t":{"273":{"position":[[421,16]]},"283":{"position":[[465,16]]},"285":{"position":[[582,16]]},"297":{"position":[[76,16]]}}}],["research_sourcesif",{"_index":1863,"t":{"273":{"position":[[540,18]]}}}],["research_st",{"_index":585,"t":{"32":{"position":[[1343,15]]}}}],["research_summari",{"_index":257,"t":{"10":{"position":[[487,20]]}}}],["researchag",{"_index":508,"t":{"30":{"position":[[1499,14],[2191,15]]}}}],["researchconductor(research",{"_index":2222,"t":{"412":{"position":[[1021,29]]}}}],["researchconductorimport",{"_index":2207,"t":{"412":{"position":[[353,23]]}}}],["researcher'",{"_index":949,"t":{"44":{"position":[[597,12]]},"125":{"position":[[501,12]]}}}],["researcher.add_costs(0.22",{"_index":1899,"t":{"301":{"position":[[99,26]]}}}],["researcher.conduct_research",{"_index":518,"t":{"30":{"position":[[1763,29]]},"50":{"position":[[1445,29]]},"56":{"position":[[412,29]]},"85":{"position":[[299,29]]},"135":{"position":[[765,29]]},"137":{"position":[[470,29]]},"139":{"position":[[726,29]]},"143":{"position":[[1002,29]]},"165":{"position":[[767,30]]},"234":{"position":[[422,29]]},"251":{"position":[[1185,29]]},"273":{"position":[[177,29]]},"283":{"position":[[260,29]]},"285":{"position":[[377,29]]},"306":{"position":[[114,30]]}}}],["researcher.conduct_research()report",{"_index":1475,"t":{"161":{"position":[[3335,35]]},"163":{"position":[[870,35]]}}}],["researcher.get_cost",{"_index":1858,"t":{"273":{"position":[[347,22]]},"283":{"position":[[391,22]]},"285":{"position":[[508,22]]},"293":{"position":[[86,22]]}}}],["researcher.get_draft_section_titles(\"subtop",{"_index":1913,"t":{"306":{"position":[[407,45]]}}}],["researcher.get_research_context",{"_index":1856,"t":{"273":{"position":[[296,33]]},"291":{"position":[[136,33]]},"308":{"position":[[110,34]]}}}],["researcher.get_research_imag",{"_index":1860,"t":{"273":{"position":[[388,32]]},"283":{"position":[[432,32]]},"285":{"position":[[549,32]]},"295":{"position":[[80,32]]}}}],["researcher.get_research_sourc",{"_index":1862,"t":{"273":{"position":[[440,33]]},"283":{"position":[[484,33]]},"285":{"position":[[601,33]]},"297":{"position":[[95,33]]}}}],["researcher.get_similar_written_contents_by_draft_section_titl",{"_index":1916,"t":{"308":{"position":[[228,64]]}}}],["researcher.get_source_url",{"_index":1880,"t":{"283":{"position":[[345,28]]},"285":{"position":[[462,28]]},"289":{"position":[[90,28]]}}}],["researcher.get_subtop",{"_index":1911,"t":{"306":{"position":[[319,27]]}}}],["researcher.git",{"_index":1532,"t":{"186":{"position":[[425,14]]},"192":{"position":[[239,14]]}}}],["researcher.gitcd",{"_index":1362,"t":{"147":{"position":[[68,16]]}}}],["researcher.set_verbose(tru",{"_index":1898,"t":{"299":{"position":[[56,28]]}}}],["researcher.write_report",{"_index":519,"t":{"30":{"position":[[1827,25]]},"50":{"position":[[1490,25]]},"56":{"position":[[476,25]]},"85":{"position":[[344,25]]},"135":{"position":[[810,25]]},"137":{"position":[[515,25]]},"139":{"position":[[771,25]]},"143":{"position":[[1047,25]]},"161":{"position":[[3379,25]]},"163":{"position":[[914,25]]},"234":{"position":[[467,25]]},"251":{"position":[[1253,25]]},"273":{"position":[[222,25]]},"283":{"position":[[305,25]]},"285":{"position":[[422,25]]},"306":{"position":[[177,26]]}}}],["researcher.write_report_conclusion(report",{"_index":1909,"t":{"306":{"position":[[244,43]]}}}],["researchers/experiment",{"_index":1544,"t":{"190":{"position":[[214,25]]}}}],["researchresearch_result",{"_index":1906,"t":{"306":{"position":[[82,23]]}}}],["researchst",{"_index":483,"t":{"30":{"position":[[483,13],[2327,13]]}}}],["researchstate(typeddict",{"_index":485,"t":{"30":{"position":[[512,25]]}}}],["resolv",{"_index":1766,"t":{"257":{"position":[[131,7]]},"267":{"position":[[1868,7]]}}}],["resolve(respons",{"_index":1839,"t":{"267":{"position":[[1846,18]]}}}],["resourc",{"_index":24,"t":{"2":{"position":[[239,9]]},"12":{"position":[[303,9],[374,9]]},"221":{"position":[[105,9],[485,9],[605,9]]},"223":{"position":[[788,9],[859,10]]},"228":{"position":[[32,9]]},"243":{"position":[[484,9]]}}}],["resource_report",{"_index":1369,"t":{"151":{"position":[[245,15]]},"278":{"position":[[58,17]]}}}],["respons",{"_index":142,"t":{"6":{"position":[[71,9]]},"26":{"position":[[349,11],[585,11],[653,11]]},"28":{"position":[[608,11]]},"30":{"position":[[289,9]]},"36":{"position":[[1228,10],[3105,9],[3345,9]]},"125":{"position":[[339,10]]},"267":{"position":[[1830,10],[1907,8],[2402,8],[2473,11]]},"357":{"position":[[652,8],[738,11],[750,9]]},"369":{"position":[[48,8],[291,8]]},"375":{"position":[[403,11],[639,11],[707,11]]}}}],["responsecallback",{"_index":1805,"t":{"267":{"position":[[615,16],[1123,18],[1175,16],[1811,16]]}}}],["responsecallback(data.output",{"_index":1821,"t":{"267":{"position":[[1144,30]]}}}],["restart",{"_index":1667,"t":{"217":{"position":[[3204,7]]},"261":{"position":[[87,7]]},"359":{"position":[[909,8]]}}}],["result",{"_index":164,"t":{"6":{"position":[[419,8],[581,8],[1028,6],[1454,8]]},"8":{"position":[[704,7]]},"10":{"position":[[245,7],[975,7],[1113,7]]},"26":{"position":[[463,7],[527,7]]},"32":{"position":[[3164,6]]},"34":{"position":[[408,8]]},"42":{"position":[[1662,9]]},"48":{"position":[[419,8],[441,6],[898,7]]},"50":{"position":[[2177,7]]},"60":{"position":[[417,7]]},"75":{"position":[[129,8]]},"111":{"position":[[73,7],[276,7]]},"125":{"position":[[205,7]]},"221":{"position":[[526,6]]},"267":{"position":[[271,7]]},"306":{"position":[[47,7]]},"363":{"position":[[80,8]]},"375":{"position":[[517,7],[581,7]]},"412":{"position":[[149,8],[1698,7],[1760,7]]}}}],["results:\\033[0m",{"_index":2233,"t":{"412":{"position":[[1533,17]]}}}],["retail",{"_index":302,"t":{"14":{"position":[[297,7]]},"42":{"position":[[1885,6]]}}}],["retriev",{"_index":647,"t":{"34":{"position":[[690,9]]},"36":{"position":[[397,10],[460,9],[505,9],[1047,10],[8685,9]]},"44":{"position":[[409,9]]},"48":{"position":[[548,9],[735,10]]},"67":{"position":[[208,9]]},"77":{"position":[[242,11]]},"111":{"position":[[43,10]]},"141":{"position":[[305,10],[407,10],[432,10]]},"143":{"position":[[1275,9]]},"287":{"position":[[43,8]]},"291":{"position":[[19,9]]},"295":{"position":[[0,9]]},"297":{"position":[[0,9]]},"363":{"position":[[62,10],[149,9],[318,10],[396,9]]},"365":{"position":[[28,9],[104,10],[174,8],[270,9],[381,10],[429,9]]},"369":{"position":[[15,9],[364,10]]},"412":{"position":[[13,9],[36,10],[529,8],[542,10],[588,10],[649,11],[777,10],[1253,10],[1287,11],[1317,9],[1346,9],[1424,9]]}}}],["retrievalembed",{"_index":1002,"t":{"46":{"position":[[1691,19]]}}}],["retriever.search",{"_index":2231,"t":{"412":{"position":[[1476,17]]}}}],["retriever=arxiv",{"_index":2109,"t":{"363":{"position":[[797,15]]}}}],["retriever=b",{"_index":2092,"t":{"363":{"position":[[268,14],[568,14]]}}}],["retriever=custom",{"_index":2114,"t":{"365":{"position":[[71,16]]}}}],["retriever=customretriever_endpoint=https://api.myretriever.comretriever_arg_api_key=your_api_key",{"_index":2121,"t":{"367":{"position":[[0,96]]}}}],["retriever=duckduckgo",{"_index":2108,"t":{"363":{"position":[[763,20]]}}}],["retriever=exa",{"_index":2111,"t":{"363":{"position":[[824,13]]}}}],["retriever=googl",{"_index":2098,"t":{"363":{"position":[[597,16]]}}}],["retriever=pubmed_centr",{"_index":2113,"t":{"363":{"position":[[859,24]]}}}],["retriever=searchapi",{"_index":2100,"t":{"363":{"position":[[631,19]]}}}],["retriever=searx",{"_index":2106,"t":{"363":{"position":[[729,15]]}}}],["retriever=serp",{"_index":2104,"t":{"363":{"position":[[699,16]]}}}],["retriever=serpapi",{"_index":2102,"t":{"363":{"position":[[667,17]]}}}],["retriever=tavili",{"_index":2095,"t":{"363":{"position":[[432,17]]}}}],["retriever_arg_",{"_index":2118,"t":{"365":{"position":[[463,14]]}}}],["retriever_arg_api_key",{"_index":2120,"t":{"365":{"position":[[485,23]]}}}],["retriever_class",{"_index":2228,"t":{"412":{"position":[[1268,15]]}}}],["retriever_class(sub_queri",{"_index":2229,"t":{"412":{"position":[[1358,26]]}}}],["retriever_endpoint",{"_index":2116,"t":{"365":{"position":[[330,19]]}}}],["return",{"_index":520,"t":{"30":{"position":[[1853,6],[2961,6]]},"36":{"position":[[3324,6],[3359,7],[3956,6],[4673,6],[6127,6],[6441,6],[6903,6]]},"46":{"position":[[1268,6]]},"50":{"position":[[1516,6]]},"56":{"position":[[502,6]]},"69":{"position":[[700,6]]},"85":{"position":[[370,6]]},"135":{"position":[[836,6]]},"137":{"position":[[541,6]]},"139":{"position":[[797,6]]},"143":{"position":[[721,6],[1073,6]]},"217":{"position":[[2903,6],[3001,6]]},"234":{"position":[[493,6],[881,8]]},"251":{"position":[[1307,6]]},"267":{"position":[[1490,6]]},"273":{"position":[[474,6]]},"283":{"position":[[518,6]]},"285":{"position":[[635,6]]}}}],["return_exceptions=tru",{"_index":227,"t":{"8":{"position":[[777,23]]}}}],["reus",{"_index":761,"t":{"36":{"position":[[3585,6]]}}}],["review",{"_index":178,"t":{"6":{"position":[[782,6]]},"12":{"position":[[15,8]]},"14":{"position":[[580,8]]},"26":{"position":[[410,8],[566,9]]},"28":{"position":[[125,6],[948,8],[1137,8]]},"30":{"position":[[3348,8]]},"32":{"position":[[186,8],[811,7],[959,7],[1073,8],[1591,9],[1610,12],[1694,11],[1735,11],[1985,6],[2005,9]]},"42":{"position":[[1275,7]]},"375":{"position":[[464,8],[620,9]]},"377":{"position":[[101,6]]},"380":{"position":[[396,8],[559,8]]}}}],["reviewer_agent.run",{"_index":589,"t":{"32":{"position":[[1497,19]]}}}],["revis",{"_index":425,"t":{"26":{"position":[[496,7],[506,7]]},"28":{"position":[[136,9],[1053,7],[1071,7],[1081,7]]},"30":{"position":[[3361,7]]},"32":{"position":[[199,7],[823,7],[1086,8],[1601,8],[1846,10],[1873,9],[1883,11],[1961,7],[2981,8]]},"34":{"position":[[152,6]]},"375":{"position":[[560,7]]},"377":{"position":[[112,8]]},"380":{"position":[[503,7]]}}}],["reviser_agent.run",{"_index":591,"t":{"32":{"position":[[1546,18]]}}}],["revision_not",{"_index":573,"t":{"32":{"position":[[971,15]]}}}],["revisor",{"_index":2130,"t":{"375":{"position":[[550,7]]},"380":{"position":[[493,7]]}}}],["rewrit",{"_index":175,"t":{"6":{"position":[[726,9],[821,7]]},"32":{"position":[[2749,7]]}}}],["rewritten",{"_index":185,"t":{"6":{"position":[[1018,9]]}}}],["rich",{"_index":1283,"t":{"123":{"position":[[79,5]]},"161":{"position":[[393,5],[512,4],[868,4]]}}}],["right",{"_index":23,"t":{"2":{"position":[[233,5]]},"34":{"position":[[181,5]]},"131":{"position":[[57,5]]},"221":{"position":[[99,5],[650,5]]}}}],["risk",{"_index":862,"t":{"40":{"position":[[576,5]]},"42":{"position":[[283,4],[1085,4]]},"221":{"position":[[202,5]]}}}],["rm",{"_index":1555,"t":{"204":{"position":[[36,2]]}}}],["roadmap",{"_index":843,"t":{"38":{"position":[[117,7]]},"42":{"position":[[1191,7]]},"50":{"position":[[1587,7],[1908,7],[2069,7]]},"85":{"position":[[440,7]]},"103":{"position":[[374,7],[423,7]]},"410":{"position":[[0,7],[364,7],[486,7]]}}}],["robust",{"_index":1233,"t":{"115":{"position":[[114,10]]},"121":{"position":[[7,6]]},"388":{"position":[[110,10]]}}}],["role",{"_index":2071,"t":{"357":{"position":[[585,9]]},"394":{"position":[[406,9]]},"412":{"position":[[2039,4],[2135,4]]}}}],["role=\"us",{"_index":741,"t":{"36":{"position":[[2978,12],[8060,12]]}}}],["root",{"_index":1221,"t":{"111":{"position":[[365,4],[537,4]]},"147":{"position":[[246,4]]},"208":{"position":[[295,5]]},"217":{"position":[[3256,5]]}}}],["round",{"_index":923,"t":{"42":{"position":[[1324,7]]}}}],["rumor",{"_index":1756,"t":{"251":{"position":[[1752,6],[1884,6]]}}}],["run",{"_index":441,"t":{"28":{"position":[[761,4]]},"32":{"position":[[144,3],[654,4],[2205,7],[2297,3],[2371,4],[3137,7],[3257,3]]},"36":{"position":[[1185,3],[1427,3],[3032,3],[3115,3],[3687,3],[3776,3],[3868,3],[3963,3],[4012,3],[5061,3],[5158,3],[6172,3],[6261,3],[6353,3],[6448,4],[8106,3],[8110,3],[8237,3],[8253,3],[8393,3],[8490,3]]},"50":{"position":[[257,3],[690,3],[824,3],[1828,3],[2582,7],[2674,3]]},"56":{"position":[[118,3]]},"69":{"position":[[1002,3]]},"75":{"position":[[201,7]]},"85":{"position":[[25,3],[662,3]]},"99":{"position":[[69,3]]},"107":{"position":[[39,3],[344,7],[470,7]]},"111":{"position":[[550,4]]},"117":{"position":[[213,3],[287,7],[485,7],[525,7]]},"119":{"position":[[102,8]]},"121":{"position":[[123,8],[322,3]]},"129":{"position":[[5,7]]},"169":{"position":[[78,3]]},"173":{"position":[[440,3]]},"175":{"position":[[705,7]]},"200":{"position":[[161,4]]},"202":{"position":[[8,3]]},"204":{"position":[[30,3]]},"208":{"position":[[301,3],[375,7],[573,7],[613,7]]},"217":{"position":[[265,7],[1049,3],[3247,3]]},"223":{"position":[[20,3]]},"234":{"position":[[617,3]]},"251":{"position":[[542,6],[1322,3],[2061,3]]},"257":{"position":[[378,7]]},"259":{"position":[[489,3]]},"261":{"position":[[103,7]]},"267":{"position":[[119,4],[437,7]]},"283":{"position":[[683,3]]},"285":{"position":[[809,3],[831,3],[840,3],[861,3]]},"357":{"position":[[805,3],[989,3]]},"373":{"position":[[327,3]]},"380":{"position":[[333,4]]},"382":{"position":[[187,3]]},"390":{"position":[[213,3],[401,7],[441,7]]},"392":{"position":[[80,3]]},"394":{"position":[[635,3]]}}}],["run.id",{"_index":797,"t":{"36":{"position":[[5098,7],[5199,7],[8215,10],[8294,7],[8430,7],[8531,7]]}}}],["run.required_action.submit_tool_outputs.tool_cal",{"_index":798,"t":{"36":{"position":[[5106,51],[8438,51]]}}}],["run.statu",{"_index":771,"t":{"36":{"position":[[3880,14],[3898,10],[5028,10],[6365,14],[6383,10],[8305,10],[8360,10]]}}}],["run_id",{"_index":766,"t":{"36":{"position":[[3741,8],[4299,7],[6226,8],[6529,7]]}}}],["run_id=run_id",{"_index":769,"t":{"36":{"position":[[3837,14],[4747,14],[6322,14],[6977,14]]}}}],["run_parallel_research(self",{"_index":584,"t":{"32":{"position":[[1315,27]]}}}],["run_research.pi",{"_index":1155,"t":{"85":{"position":[[689,15],[729,15]]}}}],["runnabl",{"_index":794,"t":{"36":{"position":[[4949,8],[5363,8]]}}}],["safari",{"_index":1726,"t":{"245":{"position":[[230,7]]}}}],["sale",{"_index":931,"t":{"42":{"position":[[1914,5]]}}}],["same",{"_index":522,"t":{"30":{"position":[[1975,4]]},"32":{"position":[[406,4]]},"316":{"position":[[567,4]]}}}],["sampl",{"_index":274,"t":{"10":{"position":[[1048,8]]},"56":{"position":[[86,6]]},"107":{"position":[[608,6]]},"234":{"position":[[563,6]]},"251":{"position":[[588,6],[1592,6]]}}}],["satisfactori",{"_index":449,"t":{"28":{"position":[[1111,12]]},"380":{"position":[[533,12]]}}}],["save",{"_index":1016,"t":{"48":{"position":[[456,5]]},"85":{"position":[[678,4]]},"117":{"position":[[105,4]]},"155":{"position":[[29,5]]},"208":{"position":[[253,6]]},"390":{"position":[[105,4]]}}}],["scalabl",{"_index":1284,"t":{"123":{"position":[[85,9]]}}}],["scale",{"_index":407,"t":{"24":{"position":[[301,5]]}}}],["scenario",{"_index":1727,"t":{"247":{"position":[[75,9]]}}}],["schema",{"_index":479,"t":{"30":{"position":[[413,6]]}}}],["scope",{"_index":505,"t":{"30":{"position":[[1355,6]]}}}],["score",{"_index":1195,"t":{"101":{"position":[[151,5]]}}}],["scour",{"_index":853,"t":{"40":{"position":[[211,8]]},"135":{"position":[[467,5]]}}}],["scrape",{"_index":190,"t":{"6":{"position":[[1184,8],[1272,6]]},"8":{"position":[[245,6],[839,8]]},"12":{"position":[[288,7],[366,7]]},"42":{"position":[[1934,7]]},"48":{"position":[[433,7]]},"97":{"position":[[126,9]]},"165":{"position":[[45,7]]},"223":{"position":[[773,7],[851,7]]},"228":{"position":[[277,7]]},"238":{"position":[[30,8],[117,10],[183,10],[291,9]]},"241":{"position":[[64,9]]},"243":{"position":[[65,9],[277,6],[454,8]]},"249":{"position":[[291,8],[399,8]]},"261":{"position":[[30,9],[62,8]]},"418":{"position":[[475,9]]}}}],["scraper",{"_index":1708,"t":{"238":{"position":[[61,7]]},"249":{"position":[[217,7]]},"412":{"position":[[896,7]]}}}],["scraper=\"b",{"_index":1710,"t":{"238":{"position":[[135,12]]},"241":{"position":[[5,13]]}}}],["scraper=\"brows",{"_index":1712,"t":{"238":{"position":[[201,17]]},"243":{"position":[[5,18]]},"245":{"position":[[30,20]]}}}],["screenshot",{"_index":1557,"t":{"206":{"position":[[39,11]]},"212":{"position":[[184,10]]}}}],["script",{"_index":1075,"t":{"56":{"position":[[93,6]]},"81":{"position":[[193,7]]},"85":{"position":[[15,6],[670,7]]},"173":{"position":[[338,6],[471,6]]},"234":{"position":[[570,6]]},"251":{"position":[[2048,6]]},"357":{"position":[[27,6],[997,6]]},"406":{"position":[[101,7]]},"412":{"position":[[91,6]]}}}],["scroll",{"_index":1719,"t":{"243":{"position":[[344,11]]},"247":{"position":[[248,9]]},"263":{"position":[[237,6]]}}}],["sdk",{"_index":712,"t":{"36":{"position":[[1656,3]]}}}],["seamlessli",{"_index":1486,"t":{"165":{"position":[[158,10]]},"175":{"position":[[1051,10]]}}}],["search",{"_index":684,"t":{"36":{"position":[[524,6],[1676,6],[1916,6],[2251,6],[2629,6],[4209,6],[5783,6],[7611,6]]},"40":{"position":[[323,6]]},"42":{"position":[[1625,6]]},"44":{"position":[[741,6]]},"48":{"position":[[376,6]]},"50":{"position":[[324,6]]},"75":{"position":[[31,6]]},"103":{"position":[[106,6],[184,6]]},"111":{"position":[[664,6]]},"221":{"position":[[424,6]]},"232":{"position":[[913,6]]},"363":{"position":[[44,6],[73,6],[116,6],[190,6],[523,6]]},"365":{"position":[[136,6]]},"408":{"position":[[351,6]]},"412":{"position":[[103,6],[142,6],[1399,6],[1691,6],[1753,6]]},"418":{"position":[[126,6]]}}}],["search_depth=\"advanc",{"_index":814,"t":{"36":{"position":[[6085,24]]}}}],["search_kwarg",{"_index":1340,"t":{"143":{"position":[[485,14]]}}}],["search_result",{"_index":812,"t":{"36":{"position":[[6029,13],[6134,14]]},"412":{"position":[[1434,14]]}}}],["searchapi",{"_index":2099,"t":{"363":{"position":[[614,9]]}}}],["searchdef",{"_index":810,"t":{"36":{"position":[[5997,9]]}}}],["searchqueri",{"_index":1007,"t":{"46":{"position":[[1847,11]]}}}],["searx",{"_index":2105,"t":{"363":{"position":[[716,5]]},"408":{"position":[[767,5]]}}}],["season",{"_index":1485,"t":{"163":{"position":[[639,11]]}}}],["second",{"_index":328,"t":{"14":{"position":[[928,8]]}}}],["secret",{"_index":1560,"t":{"206":{"position":[[251,7]]}}}],["section",{"_index":452,"t":{"28":{"position":[[1255,7]]},"30":{"position":[[571,9]]},"32":{"position":[[2651,7],[2738,7],[2789,9]]},"67":{"position":[[193,7],[290,7]]},"161":{"position":[[2978,9]]},"163":{"position":[[580,7]]},"196":{"position":[[57,7]]},"267":{"position":[[8,8]]},"306":{"position":[[357,7]]},"308":{"position":[[189,7]]},"380":{"position":[[677,7]]},"384":{"position":[[263,8],[292,7]]}}}],["secur",{"_index":2087,"t":{"359":{"position":[[701,8]]}}}],["see",{"_index":26,"t":{"2":{"position":[[266,6]]},"30":{"position":[[1883,3]]},"32":{"position":[[2113,3]]},"34":{"position":[[426,3]]},"36":{"position":[[1295,3]]},"95":{"position":[[279,3]]},"249":{"position":[[303,3]]},"316":{"position":[[0,3]]},"386":{"position":[[55,3]]}}}],["seek",{"_index":83,"t":{"4":{"position":[[46,4]]},"223":{"position":[[136,4]]}}}],["seen",{"_index":430,"t":{"28":{"position":[[3,4]]},"30":{"position":[[764,4],[2985,4]]},"32":{"position":[[999,4]]},"34":{"position":[[485,4]]},"36":{"position":[[4803,4],[5013,4]]},"40":{"position":[[31,4]]},"44":{"position":[[369,4]]},"48":{"position":[[128,4]]},"50":{"position":[[990,4],[1809,4]]},"380":{"position":[[22,4]]}}}],["select",{"_index":1212,"t":{"107":{"position":[[395,6]]},"171":{"position":[[0,6]]},"221":{"position":[[592,9]]},"263":{"position":[[409,8]]}}}],["selenium",{"_index":1711,"t":{"238":{"position":[[157,8]]},"243":{"position":[[44,8],[520,9]]},"245":{"position":[[21,8],[79,8],[109,8]]},"247":{"position":[[161,8]]},"249":{"position":[[3,8],[151,9],[192,8]]},"261":{"position":[[12,8]]}}}],["self",{"_index":622,"t":{"32":{"position":[[2873,4]]}}}],["self.cfg",{"_index":2217,"t":{"412":{"position":[[788,8]]}}}],["self.log",{"_index":1740,"t":{"251":{"position":[[284,9]]}}}],["self.logs.append(data",{"_index":1742,"t":{"251":{"position":[[421,22]]}}}],["self.retriev",{"_index":2216,"t":{"412":{"position":[[759,15]]}}}],["self.scraper_manag",{"_index":2219,"t":{"412":{"position":[[848,20]]}}}],["self.vector_stor",{"_index":2220,"t":{"412":{"position":[[912,17]]}}}],["self.verbos",{"_index":2218,"t":{"412":{"position":[[806,12]]}}}],["self.websocket",{"_index":220,"t":{"8":{"position":[[642,15]]},"412":{"position":[[826,14]]}}}],["sell",{"_index":1411,"t":{"161":{"position":[[1226,7],[1274,7]]}}}],["send",{"_index":1713,"t":{"241":{"position":[[87,5]]},"251":{"position":[[388,7]]},"267":{"position":[[386,5]]}}}],["send_json(self",{"_index":1741,"t":{"251":{"position":[[341,15]]}}}],["sendwebhookmessag",{"_index":1844,"t":{"267":{"position":[[2163,20],[2251,18]]}}}],["sendwebhookmessage(messag",{"_index":1829,"t":{"267":{"position":[[1460,27],[2419,28]]}}}],["sens",{"_index":636,"t":{"34":{"position":[[373,5]]}}}],["sent",{"_index":1181,"t":{"91":{"position":[[669,4],[856,4]]},"267":{"position":[[2006,7],[2100,4]]}}}],["sentiment",{"_index":912,"t":{"42":{"position":[[948,9]]}}}],["seo",{"_index":1285,"t":{"123":{"position":[[118,4]]}}}],["separ",{"_index":403,"t":{"24":{"position":[[233,10]]},"175":{"position":[[431,10]]},"363":{"position":[[332,10]]}}}],["separator=\"\\n\")doc",{"_index":1463,"t":{"161":{"position":[[2788,19]]}}}],["sequenc",{"_index":2094,"t":{"363":{"position":[[409,9]]}}}],["serp",{"_index":2101,"t":{"363":{"position":[[651,4]]},"408":{"position":[[635,4]]}}}],["serper",{"_index":2103,"t":{"363":{"position":[[685,6]]}}}],["serv",{"_index":1259,"t":{"119":{"position":[[40,5]]}}}],["server",{"_index":1182,"t":{"91":{"position":[[686,7]]},"117":{"position":[[478,6]]},"119":{"position":[[185,7]]},"121":{"position":[[310,7],[390,6]]},"208":{"position":[[566,6]]},"214":{"position":[[22,7]]},"217":{"position":[[1221,10],[1461,6],[2010,6]]},"267":{"position":[[63,7],[88,6],[107,6],[153,6],[518,6]]},"283":{"position":[[691,7]]},"285":{"position":[[817,7],[848,6]]},"314":{"position":[[42,7]]},"359":{"position":[[191,6]]},"390":{"position":[[394,6]]}}}],["server'",{"_index":2045,"t":{"353":{"position":[[312,8]]}}}],["server_nam",{"_index":1633,"t":{"217":{"position":[[1481,11],[2019,11],[2975,11]]}}}],["servic",{"_index":677,"t":{"36":{"position":[[140,9]]},"42":{"position":[[824,8]]},"91":{"position":[[873,8]]},"103":{"position":[[55,9]]},"117":{"position":[[181,8]]},"181":{"position":[[191,7]]},"186":{"position":[[140,8]]},"212":{"position":[[104,7]]},"359":{"position":[[690,7]]},"390":{"position":[[181,8]]},"410":{"position":[[93,9],[142,8]]}}}],["session",{"_index":706,"t":{"36":{"position":[[1381,8]]},"91":{"position":[[36,7]]},"175":{"position":[[751,7]]}}}],["set",{"_index":126,"t":{"4":{"position":[[804,3]]},"6":{"position":[[131,4]]},"26":{"position":[[479,3]]},"28":{"position":[[1006,3]]},"30":{"position":[[2862,3],[3227,3]]},"32":{"position":[[218,3],[1567,3]]},"46":{"position":[[181,3]]},"50":{"position":[[221,7],[944,3],[1028,3]]},"75":{"position":[[186,7]]},"81":{"position":[[168,3]]},"89":{"position":[[51,3]]},"111":{"position":[[27,3],[103,3],[309,3]]},"115":{"position":[[334,7]]},"121":{"position":[[177,3]]},"125":{"position":[[278,9]]},"135":{"position":[[384,3]]},"141":{"position":[[195,3],[290,3]]},"147":{"position":[[177,3]]},"157":{"position":[[161,3]]},"165":{"position":[[219,3]]},"186":{"position":[[307,7]]},"206":{"position":[[28,8],[112,10]]},"214":{"position":[[6,7]]},"217":{"position":[[581,3]]},"223":{"position":[[631,3]]},"238":{"position":[[49,7],[237,4]]},"299":{"position":[[8,3]]},"312":{"position":[[2,3]]},"314":{"position":[[96,3],[169,3],[379,3],[411,3],[484,3]]},"318":{"position":[[108,3]]},"324":{"position":[[114,3]]},"365":{"position":[[258,7],[302,3]]},"375":{"position":[[533,3]]},"380":{"position":[[454,3]]},"388":{"position":[[330,7]]},"394":{"position":[[110,3]]},"406":{"position":[[251,3],[351,3],[454,3],[560,3],[679,3],[802,3],[893,3]]},"408":{"position":[[74,3],[218,3],[369,3],[513,3],[651,3],[780,3]]}}}],["set_browse_chunk_max_length",{"_index":2180,"t":{"406":{"position":[[593,28]]}}}],["set_browse_chunk_max_length(valu",{"_index":2181,"t":{"406":{"position":[[626,34]]}}}],["set_debug_mod",{"_index":2187,"t":{"406":{"position":[[832,15]]}}}],["set_debug_mode(valu",{"_index":2188,"t":{"406":{"position":[[852,21]]}}}],["set_entry_point",{"_index":555,"t":{"30":{"position":[[3112,16]]}}}],["set_fast_llm_model",{"_index":2171,"t":{"406":{"position":[[183,19]]}}}],["set_fast_llm_model(valu",{"_index":2172,"t":{"406":{"position":[[207,25]]}}}],["set_fast_token_limit",{"_index":2175,"t":{"406":{"position":[[382,21]]}}}],["set_fast_token_limit(valu",{"_index":2176,"t":{"406":{"position":[[408,27]]}}}],["set_openai_api_key",{"_index":2185,"t":{"406":{"position":[[734,19]]}}}],["set_openai_api_key(valu",{"_index":2186,"t":{"406":{"position":[[758,25]]}}}],["set_smart_llm_model",{"_index":2173,"t":{"406":{"position":[[281,20]]}}}],["set_smart_llm_model(valu",{"_index":2174,"t":{"406":{"position":[[306,26]]}}}],["set_smart_token_limit",{"_index":2178,"t":{"406":{"position":[[486,22]]}}}],["set_smart_token_limit(valu",{"_index":2179,"t":{"406":{"position":[[513,28]]}}}],["setup",{"_index":1263,"t":{"119":{"position":[[92,5]]},"121":{"position":[[113,5]]},"123":{"position":[[23,6]]},"177":{"position":[[72,5]]},"181":{"position":[[328,5]]},"184":{"position":[[307,5]]},"212":{"position":[[71,5]]},"241":{"position":[[281,5]]},"243":{"position":[[514,5]]}}}],["seven",{"_index":414,"t":{"26":{"position":[[30,5]]}}}],["sever",{"_index":245,"t":{"10":{"position":[[172,7]]},"42":{"position":[[91,7]]},"181":{"position":[[416,7]]},"287":{"position":[[24,7]]}}}],["share",{"_index":70,"t":{"2":{"position":[[950,7],[1114,5]]},"28":{"position":[[1514,6]]}}}],["shell",{"_index":1521,"t":{"175":{"position":[[745,5],[1028,5],[1242,5]]}}}],["ship",{"_index":1586,"t":{"217":{"position":[[251,9]]}}}],["short",{"_index":1365,"t":{"151":{"position":[[164,5]]},"163":{"position":[[543,5]]},"221":{"position":[[305,5]]}}}],["shorter",{"_index":628,"t":{"32":{"position":[[3121,7]]}}}],["shot",{"_index":343,"t":{"20":{"position":[[253,4],[265,4]]}}}],["show",{"_index":950,"t":{"44":{"position":[[641,4]]},"56":{"position":[[105,5]]}}}],["showcas",{"_index":411,"t":{"24":{"position":[[378,9]]},"36":{"position":[[54,10]]},"373":{"position":[[196,9]]}}}],["shown",{"_index":282,"t":{"12":{"position":[[107,5]]}}}],["side",{"_index":183,"t":{"6":{"position":[[996,5]]},"40":{"position":[[661,5]]}}}],["sign",{"_index":1609,"t":{"217":{"position":[[655,6]]},"328":{"position":[[0,4]]},"334":{"position":[[0,4]]}}}],["signal",{"_index":1037,"t":{"50":{"position":[[677,6]]}}}],["signific",{"_index":1068,"t":{"52":{"position":[[29,11]]}}}],["significantli",{"_index":168,"t":{"6":{"position":[[526,13],[876,14]]},"8":{"position":[[514,13]]},"20":{"position":[[149,14]]},"24":{"position":[[53,13]]},"249":{"position":[[412,13]]},"373":{"position":[[48,13]]}}}],["signup",{"_index":1952,"t":{"322":{"position":[[8,6]]}}}],["similar",{"_index":1006,"t":{"46":{"position":[[1836,10]]},"161":{"position":[[612,7]]},"212":{"position":[[117,7]]},"308":{"position":[[149,7]]}}}],["simpl",{"_index":105,"t":{"4":{"position":[[355,6]]},"20":{"position":[[241,6]]},"181":{"position":[[481,6]]},"241":{"position":[[302,7]]},"247":{"position":[[32,6]]},"357":{"position":[[562,6]]}}}],["simpli",{"_index":1211,"t":{"107":{"position":[[388,6]]},"137":{"position":[[175,6]]},"141":{"position":[[164,6]]},"271":{"position":[[270,6]]}}}],["simul",{"_index":1718,"t":{"243":{"position":[[311,9]]},"247":{"position":[[308,8]]}}}],["simultan",{"_index":1511,"t":{"175":{"position":[[122,14]]}}}],["singl",{"_index":320,"t":{"14":{"position":[[712,6]]},"40":{"position":[[339,6]]},"97":{"position":[[189,6]]},"99":{"position":[[62,6]]},"241":{"position":[[95,6]]},"418":{"position":[[538,6]]}}}],["singleton",{"_index":2159,"t":{"400":{"position":[[40,9],[173,9]]},"402":{"position":[[68,9]]}}}],["singleton(abc.abcmeta",{"_index":2158,"t":{"400":{"position":[[6,22]]}}}],["site",{"_index":188,"t":{"6":{"position":[[1143,5],[1291,5]]},"8":{"position":[[197,6],[213,4]]},"111":{"position":[[84,5]]},"247":{"position":[[229,5]]},"261":{"position":[[25,4],[45,5]]},"418":{"position":[[279,5]]}}}],["size",{"_index":2043,"t":{"353":{"position":[[170,4]]}}}],["sketch",{"_index":1430,"t":{"161":{"position":[[1630,6]]}}}],["skill",{"_index":400,"t":{"24":{"position":[[144,7],[208,6]]},"30":{"position":[[1362,7],[2129,6]]},"373":{"position":[[139,7]]}}}],["skip",{"_index":367,"t":{"20":{"position":[[826,4]]},"36":{"position":[[750,4]]}}}],["sleek",{"_index":1062,"t":{"50":{"position":[[2512,5]]},"186":{"position":[[54,5]]}}}],["sleep",{"_index":773,"t":{"36":{"position":[[3991,5]]}}}],["slimjet",{"_index":1792,"t":{"263":{"position":[[179,8]]}}}],["slow",{"_index":1457,"t":{"161":{"position":[[2593,4]]}}}],["slower",{"_index":1720,"t":{"243":{"position":[[435,6]]}}}],["small",{"_index":937,"t":{"42":{"position":[[2148,5]]},"161":{"position":[[796,5]]},"312":{"position":[[211,6]]}}}],["small?wil",{"_index":1407,"t":{"161":{"position":[[1063,10]]}}}],["smaller",{"_index":112,"t":{"4":{"position":[[448,7]]},"46":{"position":[[1449,7]]}}}],["smalltalk",{"_index":396,"t":{"22":{"position":[[592,10]]}}}],["smart",{"_index":1455,"t":{"161":{"position":[[2528,5]]},"406":{"position":[[359,5],[568,5]]}}}],["smart_llm",{"_index":2050,"t":{"355":{"position":[[316,9]]}}}],["smart_llm=azure_openai:gpt",{"_index":1939,"t":{"316":{"position":[[623,26]]}}}],["smarter",{"_index":837,"t":{"36":{"position":[[8824,8]]},"161":{"position":[[2219,7]]},"412":{"position":[[2019,7],[2114,7]]}}}],["snippet",{"_index":1546,"t":{"192":{"position":[[71,9]]},"251":{"position":[[24,7]]},"394":{"position":[[27,7]]},"412":{"position":[[78,8]]}}}],["social",{"_index":910,"t":{"42":{"position":[[935,6]]}}}],["socket",{"_index":1803,"t":{"267":{"position":[[597,6],[681,9],[758,6],[1350,6],[1535,8]]}}}],["socket.onclos",{"_index":1826,"t":{"267":{"position":[[1281,14]]}}}],["socket.onerror",{"_index":1827,"t":{"267":{"position":[[1368,14]]}}}],["socket.onmessag",{"_index":1813,"t":{"267":{"position":[[866,16]]}}}],["socket.onopen",{"_index":1811,"t":{"267":{"position":[[790,13],[2033,13]]}}}],["socket.readyst",{"_index":1832,"t":{"267":{"position":[[1547,17],[1922,18]]}}}],["socket.send(payload",{"_index":1841,"t":{"267":{"position":[[1963,21],[2057,21]]}}}],["softwar",{"_index":1593,"t":{"217":{"position":[[388,8]]},"320":{"position":[[44,8]]}}}],["software,and",{"_index":1413,"t":{"161":{"position":[[1256,12]]}}}],["sole",{"_index":439,"t":{"28":{"position":[[456,6]]}}}],["solut",{"_index":81,"t":{"2":{"position":[[1165,9]]},"4":{"position":[[72,8],[295,8]]},"119":{"position":[[14,8]]},"121":{"position":[[14,8]]},"181":{"position":[[434,9]]},"221":{"position":[[398,9]]},"259":{"position":[[192,9]]},"320":{"position":[[53,9]]}}}],["solv",{"_index":69,"t":{"2":{"position":[[935,5]]},"4":{"position":[[18,7],[253,6]]},"22":{"position":[[430,6]]},"32":{"position":[[498,5],[674,5]]}}}],["someth",{"_index":1487,"t":{"165":{"position":[[246,9]]}}}],["sometim",{"_index":20,"t":{"2":{"position":[[204,9],[802,9]]},"221":{"position":[[71,9]]}}}],["sonnet",{"_index":2029,"t":{"342":{"position":[[37,6],[96,6],[159,6]]}}}],["soon",{"_index":1247,"t":{"115":{"position":[[527,5]]},"188":{"position":[[438,5]]},"388":{"position":[[523,5]]}}}],["sophist",{"_index":1133,"t":{"71":{"position":[[30,13]]}}}],["sound",{"_index":194,"t":{"6":{"position":[[1356,6]]}}}],["sourc",{"_index":60,"t":{"2":{"position":[[788,9],[1030,6]]},"10":{"position":[[208,7],[831,6]]},"12":{"position":[[494,7]]},"30":{"position":[[725,8]]},"32":{"position":[[2683,7],[3319,6]]},"34":{"position":[[700,7]]},"36":{"position":[[2061,7],[5928,7]]},"42":{"position":[[27,8],[637,7],[1060,8],[1130,6]]},"50":{"position":[[1018,6],[2448,8]]},"52":{"position":[[277,7]]},"65":{"position":[[149,6],[199,6]]},"67":{"position":[[380,6]]},"69":{"position":[[448,6]]},"87":{"position":[[88,7]]},"91":{"position":[[451,8],[619,7]]},"95":{"position":[[223,6]]},"97":{"position":[[33,6],[175,7]]},"101":{"position":[[111,8],[278,8]]},"103":{"position":[[169,7],[328,6]]},"107":{"position":[[434,7]]},"135":{"position":[[20,7],[162,7],[620,8],[953,7]]},"137":{"position":[[715,9]]},"141":{"position":[[135,7],[183,7],[328,7]]},"153":{"position":[[384,7]]},"223":{"position":[[932,8],[986,7]]},"228":{"position":[[155,7],[289,7],[372,7]]},"251":{"position":[[762,6],[1682,6]]},"273":{"position":[[691,7],[901,10]]},"289":{"position":[[0,7]]},"291":{"position":[[76,7]]},"297":{"position":[[29,8]]},"330":{"position":[[52,6]]},"369":{"position":[[333,7]]},"384":{"position":[[570,6],[1217,9]]},"418":{"position":[[354,6],[524,7]]}}}],["source_url",{"_index":1098,"t":{"65":{"position":[[170,12]]},"69":{"position":[[406,15]]},"135":{"position":[[174,12],[502,12]]},"283":{"position":[[331,11],[545,14],[560,12]]},"285":{"position":[[448,11],[670,14],[685,12]]},"289":{"position":[[76,11]]}}}],["source_urls=sourc",{"_index":1309,"t":{"135":{"position":[[708,20]]}}}],["sources=sourc",{"_index":1317,"t":{"135":{"position":[[1223,17]]}}}],["space",{"_index":658,"t":{"34":{"position":[[1189,6]]},"175":{"position":[[842,5]]}}}],["spanish",{"_index":620,"t":{"32":{"position":[[2830,8]]}}}],["special",{"_index":399,"t":{"24":{"position":[[132,11],[181,10]]},"26":{"position":[[261,11]]},"30":{"position":[[1339,11]]},"373":{"position":[[127,11]]},"375":{"position":[[315,11]]}}}],["specif",{"_index":284,"t":{"12":{"position":[[125,13]]},"22":{"position":[[396,8]]},"24":{"position":[[199,8]]},"28":{"position":[[195,12]]},"40":{"position":[[558,8]]},"42":{"position":[[196,8],[347,8],[1855,8]]},"97":{"position":[[436,8]]},"125":{"position":[[323,8]]},"137":{"position":[[126,8]]},"175":{"position":[[453,8]]},"212":{"position":[[125,15],[229,15]]},"223":{"position":[[542,13],[572,8]]},"316":{"position":[[353,8]]},"380":{"position":[[5,12]]}}}],["specifi",{"_index":1301,"t":{"135":{"position":[[8,7]]},"137":{"position":[[8,7]]},"175":{"position":[[174,9]]},"251":{"position":[[754,7]]},"312":{"position":[[58,7],[159,7]]},"314":{"position":[[66,7],[226,7],[541,7]]},"316":{"position":[[159,7]]},"363":{"position":[[134,10],[301,7],[386,9]]},"365":{"position":[[56,10]]}}}],["speed",{"_index":136,"t":{"4":{"position":[[1022,6]]},"6":{"position":[[1482,5]]},"20":{"position":[[191,5]]},"32":{"position":[[325,6]]},"247":{"position":[[91,5]]}}}],["spin",{"_index":4,"t":{"2":{"position":[[58,5]]}}}],["split",{"_index":991,"t":{"46":{"position":[[1424,5]]}}}],["sqlalchemi",{"_index":1335,"t":{"143":{"position":[[320,10]]}}}],["ssd",{"_index":1577,"t":{"212":{"position":[[163,3]]}}}],["ssl",{"_index":1644,"t":{"217":{"position":[[2005,4],[2526,4],[2761,3]]}}}],["ssl_certif",{"_index":1647,"t":{"217":{"position":[[2552,15]]}}}],["ssl_certificate_key",{"_index":1649,"t":{"217":{"position":[[2639,19]]}}}],["ssl_dhparam",{"_index":1653,"t":{"217":{"position":[[2798,11]]}}}],["stabil",{"_index":1246,"t":{"115":{"position":[[495,9]]},"388":{"position":[[491,9]]}}}],["stabl",{"_index":1605,"t":{"217":{"position":[[592,6],[773,7]]}}}],["stage",{"_index":431,"t":{"28":{"position":[[64,7]]},"377":{"position":[[49,7],[66,5]]}}}],["standalon",{"_index":1698,"t":{"234":{"position":[[64,10]]}}}],["standard",{"_index":365,"t":{"20":{"position":[[726,8]]}}}],["start",{"_index":341,"t":{"20":{"position":[[230,7]]},"22":{"position":[[609,5]]},"30":{"position":[[363,5],[2869,5],[3235,8]]},"36":{"position":[[1108,6]]},"67":{"position":[[25,6]]},"117":{"position":[[448,5]]},"119":{"position":[[175,5]]},"121":{"position":[[292,5]]},"161":{"position":[[454,5]]},"186":{"position":[[349,8]]},"208":{"position":[[536,5]]},"217":{"position":[[1275,5],[1313,5]]},"228":{"position":[[442,7]]},"249":{"position":[[21,6]]},"267":{"position":[[1778,6],[2354,7]]},"271":{"position":[[31,8],[395,5]]},"326":{"position":[[27,7]]},"390":{"position":[[364,5]]}}}],["startup",{"_index":1391,"t":{"161":{"position":[[549,9],[752,8],[783,7],[1043,8],[1076,7],[1108,7],[1217,8],[1360,7]]}}}],["startup.that'",{"_index":1389,"t":{"161":{"position":[[470,14]]}}}],["state",{"_index":101,"t":{"4":{"position":[[323,6]]},"20":{"position":[[415,7]]},"30":{"position":[[46,5],[64,6],[196,5],[261,6],[780,5],[978,5],[1240,6]]},"32":{"position":[[411,6],[630,5],[758,5],[866,5],[2265,6]]},"50":{"position":[[2304,6]]},"406":{"position":[[72,5]]}}}],["stategraph",{"_index":533,"t":{"30":{"position":[[2307,10]]}}}],["stategraph(draftst",{"_index":586,"t":{"32":{"position":[[1377,22]]}}}],["stategraph(researchst",{"_index":503,"t":{"30":{"position":[[1168,25],[2352,25]]}}}],["stategraphworkflow",{"_index":502,"t":{"30":{"position":[[1147,18]]}}}],["static",{"_index":1260,"t":{"119":{"position":[[46,6]]},"123":{"position":[[0,6]]},"135":{"position":[[944,8]]},"238":{"position":[[109,7]]},"241":{"position":[[57,6],[152,6],[310,6]]},"243":{"position":[[447,6]]},"247":{"position":[[18,8],[60,6]]},"249":{"position":[[272,6],[380,6]]}}}],["statist",{"_index":1315,"t":{"135":{"position":[[1135,11]]}}}],["statu",{"_index":753,"t":{"36":{"position":[[3369,7],[3532,6],[3872,7],[4980,6],[6357,7]]},"217":{"position":[[983,6],[1396,6]]}}}],["status",{"_index":758,"t":{"36":{"position":[[3476,8],[3624,8]]}}}],["step",{"_index":47,"t":{"2":{"position":[[586,5],[1124,5]]},"4":{"position":[[10,4],[770,5]]},"12":{"position":[[38,5]]},"28":{"position":[[343,4]]},"32":{"position":[[2990,4]]},"34":{"position":[[778,4]]},"36":{"position":[[904,6],[1510,5],[2126,4],[2746,4]]},"48":{"position":[[665,4]]},"50":{"position":[[140,4],[213,4],[549,4]]},"89":{"position":[[362,5]]},"107":{"position":[[198,4],[326,4]]},"111":{"position":[[300,4],[519,4],[582,4]]},"117":{"position":[[0,4],[24,4],[129,4],[347,4]]},"139":{"position":[[218,4],[359,4]]},"169":{"position":[[0,4],[69,4],[138,4]]},"206":{"position":[[77,4],[127,4],[190,4]]},"208":{"position":[[19,4],[129,4],[279,4],[435,4]]},"214":{"position":[[43,5]]},"217":{"position":[[19,4],[188,4]]},"263":{"position":[[201,6]]},"271":{"position":[[18,5]]},"353":{"position":[[408,5]]},"355":{"position":[[396,5]]},"359":{"position":[[672,6]]},"390":{"position":[[0,4],[24,4],[129,4],[263,4]]}}}],["stock",{"_index":735,"t":{"36":{"position":[[2686,5],[7668,5]]}}}],["stop",{"_index":209,"t":{"8":{"position":[[354,6]]},"161":{"position":[[1095,4]]}}}],["storag",{"_index":1578,"t":{"212":{"position":[[167,7]]}}}],["store",{"_index":704,"t":{"36":{"position":[[1347,7]]},"46":{"position":[[1649,5]]},"163":{"position":[[239,5]]},"165":{"position":[[35,5],[93,5],[199,5],[735,6]]},"251":{"position":[[320,5],[1470,6]]},"406":{"position":[[62,5]]},"412":{"position":[[964,5]]}}}],["storerelated_context",{"_index":1494,"t":{"165":{"position":[[846,21]]}}}],["storm",{"_index":410,"t":{"24":{"position":[[352,5]]},"60":{"position":[[48,5]]},"373":{"position":[[170,5]]}}}],["storylin",{"_index":649,"t":{"34":{"position":[[765,10]]}}}],["str",{"_index":488,"t":{"30":{"position":[[567,3],[640,3],[664,3],[687,3],[705,3],[721,3],[752,3],[1571,5]]},"32":{"position":[[943,3],[967,3],[987,3]]},"50":{"position":[[1283,4],[1301,4],[1321,4],[1329,4]]},"85":{"position":[[137,4],[155,4],[175,4],[183,4]]},"135":{"position":[[597,4],[615,4],[638,4]]},"137":{"position":[[367,4],[385,4],[393,4]]},"139":{"position":[[618,4],[638,4],[646,4]]},"143":{"position":[[480,4],[510,6],[803,4],[821,4],[841,4],[876,4]]},"273":{"position":[[82,4],[100,5]]},"283":{"position":[[157,4],[175,4]]},"406":{"position":[[233,4],[333,4],[784,4]]}}}],["straight",{"_index":551,"t":{"30":{"position":[[3034,8]]},"36":{"position":[[2765,8]]}}}],["straightforward",{"_index":252,"t":{"10":{"position":[[300,15]]},"175":{"position":[[541,15]]}}}],["strategi",{"_index":130,"t":{"4":{"position":[[897,8]]},"34":{"position":[[1035,8]]},"42":{"position":[[1463,10],[2009,8]]},"46":{"position":[[1901,8]]}}}],["stray",{"_index":890,"t":{"42":{"position":[[291,8]]}}}],["stream",{"_index":1735,"t":{"251":{"position":[[63,9]]},"267":{"position":[[247,9]]},"386":{"position":[[96,9]]}}}],["stream=fals",{"_index":2075,"t":{"357":{"position":[[710,13]]}}}],["stream=tru",{"_index":2154,"t":{"394":{"position":[[500,12]]}}}],["streamlin",{"_index":1286,"t":{"125":{"position":[[81,11]]}}}],["string",{"_index":733,"t":{"36":{"position":[[2599,9],[7581,9]]}}}],["structur",{"_index":260,"t":{"10":{"position":[[683,11]]},"26":{"position":[[399,10]]},"28":{"position":[[548,9]]},"30":{"position":[[110,10]]},"71":{"position":[[79,10]]},"375":{"position":[[453,10]]},"380":{"position":[[224,9]]}}}],["studi",{"_index":904,"t":{"42":{"position":[[569,7]]}}}],["stumbl",{"_index":92,"t":{"4":{"position":[[213,8]]}}}],["sub",{"_index":569,"t":{"32":{"position":[[527,3],[601,3],[791,3],[2647,3],[2734,3]]},"412":{"position":[[116,3],[1158,3],[1336,3]]}}}],["sub_queri",{"_index":2225,"t":{"412":{"position":[[1176,9]]}}}],["subhead",{"_index":627,"t":{"32":{"position":[[3065,10]]}}}],["submiss",{"_index":2131,"t":{"377":{"position":[[133,10]]}}}],["submissiondef",{"_index":777,"t":{"36":{"position":[[4254,13],[6484,13]]}}}],["submit",{"_index":2126,"t":{"369":{"position":[[418,10]]}}}],["submit_tool_outputs(thread.id",{"_index":796,"t":{"36":{"position":[[5067,30],[8399,30]]}}}],["submit_tool_outputs(thread_id",{"_index":778,"t":{"36":{"position":[[4268,30],[6498,30]]}}}],["subsequ",{"_index":500,"t":{"30":{"position":[[1002,10]]}}}],["subset",{"_index":654,"t":{"34":{"position":[[986,6]]}}}],["subtask",{"_index":113,"t":{"4":{"position":[[456,8],[491,8]]}}}],["subtop",{"_index":442,"t":{"28":{"position":[[794,9]]},"32":{"position":[[1156,8]]},"60":{"position":[[350,10]]},"62":{"position":[[43,9],[88,8]]},"65":{"position":[[351,10],[390,9]]},"67":{"position":[[117,10],[137,9],[323,8]]},"69":{"position":[[547,13],[590,9]]},"71":{"position":[[154,9]]},"380":{"position":[[366,9]]},"384":{"position":[[305,8]]}}}],["subtopic_report",{"_index":1371,"t":{"151":{"position":[[290,15]]}}}],["subtopicdraft_titl",{"_index":1912,"t":{"306":{"position":[[378,20]]}}}],["subtopicssubtop",{"_index":1910,"t":{"306":{"position":[[292,18]]}}}],["succinct",{"_index":1467,"t":{"161":{"position":[[2969,8]]}}}],["such",{"_index":58,"t":{"2":{"position":[[762,5]]},"8":{"position":[[435,4]]},"28":{"position":[[1353,4]]},"32":{"position":[[3209,4]]},"36":{"position":[[515,5],[594,4],[3633,5],[4039,4]]},"40":{"position":[[182,4]]},"52":{"position":[[317,4]]},"111":{"position":[[678,5]]},"115":{"position":[[205,4]]},"161":{"position":[[1774,4]]},"221":{"position":[[431,5]]},"234":{"position":[[940,4]]},"373":{"position":[[388,4]]},"380":{"position":[[775,4]]},"388":{"position":[[201,4]]}}}],["sudo",{"_index":1580,"t":{"217":{"position":[[0,4],[509,4],[783,4]]},"257":{"position":[[449,4]]},"259":{"position":[[115,4]]}}}],["sudo:sudo",{"_index":1623,"t":{"217":{"position":[[1068,9]]}}}],["suffici",{"_index":1670,"t":{"221":{"position":[[339,10]]}}}],["suggest",{"_index":1203,"t":{"103":{"position":[[498,12]]}}}],["suit",{"_index":675,"t":{"36":{"position":[[111,5]]},"125":{"position":[[318,4]]},"249":{"position":[[529,5]]}}}],["suitabl",{"_index":324,"t":{"14":{"position":[[818,8]]},"135":{"position":[[342,8]]},"418":{"position":[[151,8]]}}}],["summar",{"_index":167,"t":{"6":{"position":[[485,13],[708,13],[807,9]]},"8":{"position":[[256,10]]},"12":{"position":[[408,9],[483,10]]},"161":{"position":[[2937,9]]},"223":{"position":[[870,9],[975,10]]}}}],["summari",{"_index":1156,"t":{"87":{"position":[[165,8]]},"151":{"position":[[154,7]]}}}],["sup",{"_index":2151,"t":{"394":{"position":[[435,9]]}}}],["sup?\"}]async",{"_index":2072,"t":{"357":{"position":[[614,13]]}}}],["super",{"_index":631,"t":{"34":{"position":[[25,5]]}}}],["superfici",{"_index":1672,"t":{"221":{"position":[[536,11]]}}}],["supplement",{"_index":903,"t":{"42":{"position":[[527,10]]}}}],["support",{"_index":317,"t":{"14":{"position":[[626,7]]},"32":{"position":[[2672,10]]},"34":{"position":[[453,8],[516,7]]},"36":{"position":[[348,8],[478,7],[568,8]]},"48":{"position":[[610,8]]},"62":{"position":[[234,8]]},"77":{"position":[[172,9],[232,9]]},"89":{"position":[[155,9]]},"91":{"position":[[327,7]]},"107":{"position":[[99,9]]},"139":{"position":[[119,9]]},"188":{"position":[[37,7]]},"228":{"position":[[313,7]]},"318":{"position":[[15,8]]},"324":{"position":[[140,9]]}}}],["suppos",{"_index":1448,"t":{"161":{"position":[[2279,7]]}}}],["sure",{"_index":648,"t":{"34":{"position":[[719,4]]},"157":{"position":[[108,4]]},"161":{"position":[[2993,4]]},"165":{"position":[[211,4]]},"249":{"position":[[166,4]]},"263":{"position":[[348,4]]}}}],["switch",{"_index":1732,"t":{"249":{"position":[[254,9]]}}}],["synchron",{"_index":197,"t":{"8":{"position":[[44,14]]},"36":{"position":[[3333,11]]}}}],["syntax",{"_index":266,"t":{"10":{"position":[[798,6]]},"149":{"position":[[10,6]]}}}],["synthes",{"_index":1184,"t":{"91":{"position":[[813,11]]}}}],["system",{"_index":1145,"t":{"77":{"position":[[89,6]]},"91":{"position":[[467,6]]},"175":{"position":[[502,6],[984,6]]},"181":{"position":[[308,7]]},"184":{"position":[[183,8],[381,6]]},"186":{"position":[[477,6]]},"188":{"position":[[444,6]]},"190":{"position":[[55,6]]},"192":{"position":[[292,7]]},"194":{"position":[[255,7]]},"217":{"position":[[67,7]]},"243":{"position":[[477,6]]},"263":{"position":[[389,7]]},"322":{"position":[[193,7]]},"363":{"position":[[365,6]]},"369":{"position":[[271,6]]},"412":{"position":[[2027,7],[2122,8]]}}}],["system'",{"_index":1164,"t":{"89":{"position":[[284,8]]},"245":{"position":[[301,8]]},"249":{"position":[[93,8]]}}}],["systemctl",{"_index":1621,"t":{"217":{"position":[[973,9],[1303,9],[1329,9],[1386,9],[3194,9]]}}}],["t",{"_index":1665,"t":{"217":{"position":[[3163,2]]}}}],["tab",{"_index":1293,"t":{"129":{"position":[[93,4]]},"131":{"position":[[114,4],[167,3]]},"206":{"position":[[123,3]]}}}],["tabl",{"_index":314,"t":{"14":{"position":[[572,7]]},"62":{"position":[[149,5]]},"67":{"position":[[348,5]]}}}],["table_of_cont",{"_index":495,"t":{"30":{"position":[[668,18]]}}}],["tackl",{"_index":155,"t":{"6":{"position":[[308,6]]}}}],["tailor",{"_index":1187,"t":{"95":{"position":[[122,8]]},"97":{"position":[[419,8]]},"137":{"position":[[149,6]]}}}],["tailwind",{"_index":1065,"t":{"50":{"position":[[2549,9]]}}}],["take",{"_index":18,"t":{"2":{"position":[[193,4]]},"8":{"position":[[218,5],[299,4],[971,5]]},"30":{"position":[[1376,4]]},"32":{"position":[[1221,4]]},"36":{"position":[[4155,4]]},"44":{"position":[[247,4]]},"48":{"position":[[63,4]]},"91":{"position":[[44,5]]},"97":{"position":[[71,5]]},"161":{"position":[[815,5]]},"217":{"position":[[1152,4]]},"221":{"position":[[60,4]]},"223":{"position":[[484,5]]},"384":{"position":[[782,4]]},"418":{"position":[[420,5]]}}}],["taken",{"_index":1382,"t":{"161":{"position":[[246,5]]}}}],["talk",{"_index":938,"t":{"42":{"position":[[2154,4]]}}}],["target",{"_index":1093,"t":{"60":{"position":[[627,8]]},"249":{"position":[[335,6],[579,10]]}}}],["task",{"_index":17,"t":{"2":{"position":[[183,5],[298,5],[671,5],[747,4]]},"4":{"position":[[137,4],[438,4],[614,5],[732,4],[811,6],[827,5],[958,5]]},"6":{"position":[[221,6]]},"8":{"position":[[102,5],[171,4],[288,4],[462,5],[919,5],[966,4]]},"10":{"position":[[82,5],[292,4],[455,5]]},"12":{"position":[[225,5],[351,5]]},"14":{"position":[[187,5]]},"28":{"position":[[332,5],[495,4],[657,5]]},"30":{"position":[[538,5],[831,4]]},"32":{"position":[[166,5],[925,5],[2851,4]]},"34":{"position":[[927,6],[1015,4]]},"40":{"position":[[506,4]]},"48":{"position":[[198,4],[539,4]]},"50":{"position":[[1880,5]]},"97":{"position":[[97,4],[205,5]]},"99":{"position":[[11,4]]},"101":{"position":[[404,5]]},"107":{"position":[[52,5]]},"125":{"position":[[186,6]]},"221":{"position":[[50,5],[270,6],[694,6]]},"223":{"position":[[398,5],[479,4],[614,5],[710,5],[836,5]]},"234":{"position":[[1202,5]]},"251":{"position":[[95,6],[2124,5]]},"267":{"position":[[1627,5]]},"365":{"position":[[236,6]]},"380":{"position":[[180,5]]},"384":{"position":[[174,5]]},"418":{"position":[[306,5],[446,4],[554,5]]}}}],["task.json",{"_index":606,"t":{"32":{"position":[[2389,9]]},"384":{"position":[[64,9],[102,9]]}}}],["taskstask",{"_index":217,"t":{"8":{"position":[[603,10]]}}}],["tavili",{"_index":714,"t":{"36":{"position":[[1669,6],[1909,6],[2240,6],[5439,6],[5776,6],[5990,6]]},"48":{"position":[[395,6]]},"50":{"position":[[310,6],[532,6]]},"77":{"position":[[190,6]]},"95":{"position":[[115,6],[150,6]]},"271":{"position":[[369,6]]},"363":{"position":[[37,6],[539,6]]},"382":{"position":[[161,6]]},"408":{"position":[[344,6]]}}}],["tavily_api_key",{"_index":1562,"t":{"206":{"position":[[279,14]]}}}],["tavily_api_key=langchain_tracing_v2=truelangchain_api_key=openai_api_key=doc_path=./mi",{"_index":1222,"t":{"111":{"position":[[377,86]]}}}],["tavily_api_key=your_tavily_api_key_her",{"_index":1147,"t":{"81":{"position":[[100,39]]}}}],["tavily_api_key={your",{"_index":1034,"t":{"50":{"position":[[511,20]]},"271":{"position":[[348,20]]},"382":{"position":[[140,20]]}}}],["tavily_client.get_search_context(queri",{"_index":813,"t":{"36":{"position":[[6045,39]]}}}],["tavily_search",{"_index":728,"t":{"36":{"position":[[2449,16],[4505,16],[6735,16],[7431,16]]}}}],["tavily_search(queri",{"_index":811,"t":{"36":{"position":[[6007,21]]}}}],["tavily_search(query=json.loads(function_args)[\"queri",{"_index":787,"t":{"36":{"position":[[4531,55],[6761,55]]}}}],["tavilycli",{"_index":805,"t":{"36":{"position":[[5453,13]]}}}],["tavilyclient(api_key=os.environ[\"tavily_api_key\"])assistant_prompt_instruct",{"_index":809,"t":{"36":{"position":[[5568,78]]}}}],["team",{"_index":412,"t":{"24":{"position":[[394,4]]},"26":{"position":[[13,4],[109,5]]},"52":{"position":[[133,5],[479,5]]},"273":{"position":[[597,4]]},"285":{"position":[[955,4]]},"373":{"position":[[212,4]]},"375":{"position":[[13,4],[199,5]]}}}],["team’",{"_index":523,"t":{"30":{"position":[[1996,6]]}}}],["tech",{"_index":917,"t":{"42":{"position":[[1155,4]]},"161":{"position":[[747,4]]}}}],["technic",{"_index":476,"t":{"30":{"position":[[374,9]]},"161":{"position":[[831,9]]}}}],["techniqu",{"_index":1198,"t":{"101":{"position":[[318,11]]}}}],["technolog",{"_index":1397,"t":{"161":{"position":[[702,11],[1183,11],[1560,11]]}}}],["technologies\"report_typ",{"_index":1873,"t":{"276":{"position":[[49,24]]}}}],["tediou",{"_index":1190,"t":{"97":{"position":[[89,7]]},"418":{"position":[[438,7]]}}}],["tee",{"_index":1614,"t":{"217":{"position":[[788,3]]}}}],["tell",{"_index":1323,"t":{"139":{"position":[[860,4]]},"143":{"position":[[1135,4]]}}}],["temperature=0.35",{"_index":2152,"t":{"394":{"position":[[445,17]]}}}],["temperature=0.7",{"_index":2067,"t":{"357":{"position":[[466,16]]}}}],["templat",{"_index":1705,"t":{"234":{"position":[[987,10]]}}}],["termin",{"_index":1505,"t":{"173":{"position":[[238,9],[363,9],[496,9]]}}}],["terminolog",{"_index":895,"t":{"42":{"position":[[356,12]]}}}],["test",{"_index":235,"t":{"8":{"position":[[939,6]]},"20":{"position":[[95,8]]},"175":{"position":[[1226,8]]},"200":{"position":[[52,7],[113,5],[170,5]]},"202":{"position":[[16,6]]},"204":{"position":[[25,4],[54,5]]},"206":{"position":[[166,7],[213,7]]},"357":{"position":[[535,4],[1007,4]]},"394":{"position":[[0,7]]},"412":{"position":[[0,7],[26,4],[1171,4]]}}}],["test_ollama",{"_index":2073,"t":{"357":{"position":[[632,14]]}}}],["test_scrape_data_by_queri",{"_index":2210,"t":{"412":{"position":[[449,28]]}}}],["text",{"_index":315,"t":{"14":{"position":[[589,5]]},"36":{"position":[[602,4]]},"107":{"position":[[138,5]]},"139":{"position":[[158,5]]},"241":{"position":[[181,4]]},"243":{"position":[[220,4]]},"316":{"position":[[304,4]]},"318":{"position":[[294,5]]},"330":{"position":[[366,4]]},"340":{"position":[[340,4]]},"347":{"position":[[29,4]]}}}],["text_splitter.split_documents(documents=document)vector_stor",{"_index":1464,"t":{"161":{"position":[[2810,61]]}}}],["text_splitter.split_documents(local_doc",{"_index":997,"t":{"46":{"position":[[1584,42]]}}}],["textload",{"_index":956,"t":{"46":{"position":[[258,11]]}}}],["textloader(file_path",{"_index":973,"t":{"46":{"position":[[752,21]]}}}],["thank",{"_index":2097,"t":{"363":{"position":[[461,6]]}}}],["that’",{"_index":208,"t":{"8":{"position":[[330,6],[1004,6]]},"20":{"position":[[164,6]]},"36":{"position":[[5212,6]]}}}],["theori",{"_index":177,"t":{"6":{"position":[[761,7]]},"251":{"position":[[1774,8],[1906,8]]}}}],["there'",{"_index":1061,"t":{"50":{"position":[[2467,7]]}}}],["there’",{"_index":458,"t":{"28":{"position":[[1428,7]]}}}],["thing",{"_index":504,"t":{"30":{"position":[[1271,6]]},"34":{"position":[[40,6]]},"36":{"position":[[1694,6]]},"40":{"position":[[260,6]]}}}],["think",{"_index":30,"t":{"2":{"position":[[329,8]]},"20":{"position":[[426,5]]},"34":{"position":[[50,5]]},"161":{"position":[[422,5],[963,5],[1349,5]]}}}],["thorough",{"_index":883,"t":{"40":{"position":[[1190,9]]}}}],["those",{"_index":1322,"t":{"139":{"position":[[92,5]]}}}],["thousand",{"_index":319,"t":{"14":{"position":[[658,9]]}}}],["thread",{"_index":699,"t":{"36":{"position":[[1089,6],[1151,6],[1210,6],[1335,7],[1467,7],[2804,6],[2846,6],[3057,6],[4958,7],[7857,11],[8565,6]]}}}],["thread_id=thread.id",{"_index":740,"t":{"36":{"position":[[2957,20],[3154,20],[8039,20],[8149,20]]}}}],["thread_id=thread_id",{"_index":790,"t":{"36":{"position":[[4726,20],[6956,20]]}}}],["threaddef",{"_index":817,"t":{"36":{"position":[[7060,9]]}}}],["threadthread",{"_index":826,"t":{"36":{"position":[[7798,12]]}}}],["three",{"_index":237,"t":{"8":{"position":[[984,5]]},"30":{"position":[[3067,5]]},"36":{"position":[[357,5]]},"161":{"position":[[1988,5],[2307,6]]},"412":{"position":[[1809,5],[1875,5],[1891,5]]}}}],["through",{"_index":467,"t":{"30":{"position":[[100,7],[886,7]]},"75":{"position":[[163,7]]},"359":{"position":[[108,7]]},"412":{"position":[[1241,7]]}}}],["throughout",{"_index":480,"t":{"30":{"position":[[420,10]]},"34":{"position":[[329,10]]},"175":{"position":[[579,10]]}}}],["thu",{"_index":215,"t":{"8":{"position":[[509,4]]}}}],["tier",{"_index":1951,"t":{"320":{"position":[[247,6]]}}}],["time",{"_index":19,"t":{"2":{"position":[[198,5]]},"4":{"position":[[157,4]]},"6":{"position":[[635,5]]},"8":{"position":[[541,4]]},"10":{"position":[[1107,5]]},"14":{"position":[[130,4],[318,4],[958,4]]},"32":{"position":[[2289,4]]},"36":{"position":[[5320,4]]},"42":{"position":[[914,4]]},"65":{"position":[[332,4]]},"125":{"position":[[126,4]]},"157":{"position":[[14,4]]},"161":{"position":[[1994,5],[2377,5]]},"188":{"position":[[273,4]]},"221":{"position":[[65,5]]}}}],["time.sleep(1",{"_index":767,"t":{"36":{"position":[[3762,13],[6247,13]]}}}],["timefrom",{"_index":803,"t":{"36":{"position":[[5405,8]]}}}],["titl",{"_index":493,"t":{"30":{"position":[[633,6]]},"67":{"position":[[201,6]]},"297":{"position":[[48,6]]},"306":{"position":[[365,6]]},"308":{"position":[[360,6]]},"412":{"position":[[1723,6],[2095,8]]}}}],["titlessimilar_cont",{"_index":1915,"t":{"308":{"position":[[197,22]]}}}],["today",{"_index":878,"t":{"40":{"position":[[996,6]]}}}],["today'",{"_index":2245,"t":{"418":{"position":[[118,7]]}}}],["togeth",{"_index":193,"t":{"6":{"position":[[1297,8]]},"24":{"position":[[421,8]]},"103":{"position":[[117,8]]},"223":{"position":[[662,8]]},"330":{"position":[[0,8]]},"373":{"position":[[239,8]]}}}],["together_api_key=[your",{"_index":1986,"t":{"330":{"position":[[142,22]]}}}],["token",{"_index":1669,"t":{"221":{"position":[[311,5]]},"293":{"position":[[24,6]]},"406":{"position":[[467,5],[574,5]]}}}],["tone",{"_index":1101,"t":{"65":{"position":[[255,5],[261,4],[291,4]]},"251":{"position":[[798,4],[821,4]]},"267":{"position":[[1689,5]]}}}],["tone=\"form",{"_index":1903,"t":{"304":{"position":[[237,12]]}}}],["tone=ton",{"_index":1748,"t":{"251":{"position":[[1111,10]]}}}],["tone=tone.form",{"_index":1124,"t":{"69":{"position":[[508,17]]}}}],["tonefrom",{"_index":1111,"t":{"69":{"position":[[146,8]]}}}],["took",{"_index":3,"t":{"2":{"position":[[44,4]]}}}],["tool",{"_index":676,"t":{"36":{"position":[[120,6],[308,6],[372,6],[470,4],[741,5],[1018,5],[1277,6],[2398,8],[4242,4],[4350,4],[6472,4],[6580,4],[7380,8],[8791,5]]},"40":{"position":[[59,5],[281,5]]},"42":{"position":[[1564,4]]},"52":{"position":[[106,5]]},"71":{"position":[[44,4]]},"157":{"position":[[194,4]]},"418":{"position":[[160,4]]}}}],["tool.function.argu",{"_index":786,"t":{"36":{"position":[[4461,23],[6691,23]]}}}],["tool.function.nam",{"_index":784,"t":{"36":{"position":[[4426,18],[6656,18]]}}}],["tool.id",{"_index":782,"t":{"36":{"position":[[4402,7],[6632,7]]}}}],["tool_call_id",{"_index":781,"t":{"36":{"position":[[4387,12],[4640,13],[6617,12],[6870,13]]}}}],["tool_output_array",{"_index":780,"t":{"36":{"position":[[4323,17],[6553,17]]}}}],["tool_output_array.append({\"tool_call_id",{"_index":788,"t":{"36":{"position":[[4598,41],[6828,41]]}}}],["tool_outputs=tool_output_array",{"_index":791,"t":{"36":{"position":[[4762,30],[6992,30]]}}}],["tools_to_cal",{"_index":779,"t":{"36":{"position":[[4307,15],[4358,14],[6537,15],[6588,14]]}}}],["top",{"_index":1017,"t":{"48":{"position":[[497,3]]},"278":{"position":[[17,3]]}}}],["topic",{"_index":184,"t":{"6":{"position":[[1007,6],[1342,6]]},"10":{"position":[[570,6]]},"24":{"position":[[461,6]]},"26":{"position":[[333,6]]},"28":{"position":[[503,6],[710,5]]},"32":{"position":[[936,6],[1048,5]]},"34":{"position":[[202,6]]},"48":{"position":[[313,6]]},"60":{"position":[[158,7]]},"62":{"position":[[20,6]]},"67":{"position":[[106,5]]},"71":{"position":[[109,7],[425,6]]},"373":{"position":[[279,6]]},"375":{"position":[[387,6]]},"380":{"position":[[282,5]]}}}],["toward",{"_index":79,"t":{"2":{"position":[[1145,6]]},"14":{"position":[[52,6]]},"22":{"position":[[384,7]]}}}],["track",{"_index":50,"t":{"2":{"position":[[608,5],[779,5]]},"12":{"position":[[389,6]]},"34":{"position":[[1327,5]]},"62":{"position":[[198,8]]},"125":{"position":[[140,9]]},"223":{"position":[[919,5]]},"228":{"position":[[330,5]]},"301":{"position":[[62,5]]}}}],["trade",{"_index":909,"t":{"42":{"position":[[891,7]]},"161":{"position":[[642,7]]}}}],["train",{"_index":145,"t":{"6":{"position":[[122,8],[154,7]]},"28":{"position":[[470,7]]},"221":{"position":[[149,7]]}}}],["transformers/al",{"_index":2000,"t":{"332":{"position":[[352,16]]}}}],["transport",{"_index":1589,"t":{"217":{"position":[[351,9]]}}}],["trend",{"_index":359,"t":{"20":{"position":[[580,6]]},"40":{"position":[[827,6]]},"42":{"position":[[767,5],[855,6],[1654,7]]},"50":{"position":[[1622,6],[1943,6],[1988,7]]},"85":{"position":[[475,6]]},"87":{"position":[[259,7]]},"135":{"position":[[906,6],[1082,8]]},"418":{"position":[[340,8]]}}}],["tri",{"_index":68,"t":{"2":{"position":[[927,3]]},"22":{"position":[[423,6]]},"117":{"position":[[283,3]]},"208":{"position":[[371,3]]},"249":{"position":[[250,3]]},"257":{"position":[[374,3]]},"259":{"position":[[222,3]]},"261":{"position":[[99,3]]},"263":{"position":[[775,3]]},"357":{"position":[[647,4]]},"394":{"position":[[324,4]]}}}],["trial",{"_index":902,"t":{"42":{"position":[[500,5]]}}}],["trigger",{"_index":230,"t":{"8":{"position":[[831,7]]},"12":{"position":[[259,7]]},"28":{"position":[[624,10]]},"32":{"position":[[350,7],[552,9]]},"36":{"position":[[1220,7],[3067,7],[4873,8]]},"115":{"position":[[390,7]]},"200":{"position":[[123,9]]},"223":{"position":[[744,7]]},"388":{"position":[[386,7]]}}}],["true",{"_index":612,"t":{"32":{"position":[[2494,5],[2507,5],[2521,4]]},"36":{"position":[[3756,5],[6241,5],[7900,5]]},"135":{"position":[[428,5]]},"384":{"position":[[365,5],[714,5],[964,5],[1149,5],[1162,5],[1176,4],[1255,5],[1429,5]]},"412":{"position":[[821,4]]}}}],["truli",{"_index":943,"t":{"44":{"position":[[145,5]]}}}],["trustworthi",{"_index":2244,"t":{"418":{"position":[[31,11]]}}}],["turbo",{"_index":615,"t":{"32":{"position":[[2573,7]]},"36":{"position":[[2180,5]]}}}],["turn",{"_index":497,"t":{"30":{"position":[[932,5]]}}}],["tutori",{"_index":368,"t":{"20":{"position":[[836,9]]},"36":{"position":[[759,8]]},"332":{"position":[[106,8]]}}}],["twenties,y",{"_index":1433,"t":{"161":{"position":[[1702,12]]}}}],["twicea",{"_index":1437,"t":{"161":{"position":[[1906,7]]}}}],["two",{"_index":107,"t":{"4":{"position":[[378,3]]},"6":{"position":[[270,3]]},"30":{"position":[[802,3]]},"161":{"position":[[2062,4]]}}}],["txt",{"_index":1154,"t":{"83":{"position":[[99,5]]}}}],["type",{"_index":642,"t":{"34":{"position":[[589,5]]},"36":{"position":[[363,5],[2407,7],[2547,7],[2590,8],[7389,7],[7529,7],[7572,8]]},"46":{"position":[[89,6],[1216,5]]},"56":{"position":[[220,4]]},"65":{"position":[[115,4]]},"143":{"position":[[154,6]]},"151":{"position":[[92,4]]},"157":{"position":[[77,4]]},"234":{"position":[[366,5]]},"251":{"position":[[107,6],[694,4],[1616,7]]},"400":{"position":[[29,5]]}}}],["typic",{"_index":694,"t":{"36":{"position":[[844,7]]},"60":{"position":[[239,7]]},"71":{"position":[[252,7]]},"87":{"position":[[133,9]]},"91":{"position":[[19,7]]}}}],["u21899.vm.elestio.app:57987\"llm_model",{"_index":2060,"t":{"357":{"position":[[299,37]]}}}],["ubuntu",{"_index":1571,"t":{"212":{"position":[[12,6],[214,6]]}}}],["ug3qr",{"_index":2059,"t":{"357":{"position":[[293,5]]}}}],["ui",{"_index":1542,"t":{"190":{"position":[[144,2]]},"353":{"position":[[188,3]]},"355":{"position":[[377,2]]},"357":{"position":[[985,3]]}}}],["ultim",{"_index":86,"t":{"4":{"position":[[92,10]]},"52":{"position":[[529,10]]}}}],["unbias",{"_index":141,"t":{"6":{"position":[[62,8],[934,9],[1049,9],[1081,9],[1445,8]]},"14":{"position":[[381,8]]}}}],["uncertainti",{"_index":123,"t":{"4":{"position":[[717,11]]}}}],["uncom",{"_index":1255,"t":{"117":{"position":[[383,11]]},"208":{"position":[[471,11]]},"390":{"position":[[299,11]]}}}],["undefin",{"_index":1819,"t":{"267":{"position":[[1062,9],[1107,10]]}}}],["under",{"_index":445,"t":{"28":{"position":[[879,5]]},"32":{"position":[[2144,5]]},"44":{"position":[[259,5]]},"48":{"position":[[109,5]]}}}],["underli",{"_index":1405,"t":{"161":{"position":[[1013,10]]}}}],["understand",{"_index":309,"t":{"14":{"position":[[496,10]]},"44":{"position":[[202,13]]},"50":{"position":[[27,13]]},"161":{"position":[[998,10]]},"308":{"position":[[484,10]]}}}],["uninstal",{"_index":1797,"t":{"263":{"position":[[555,9]]}}}],["uniqu",{"_index":929,"t":{"42":{"position":[[1834,7]]},"155":{"position":[[103,6]]}}}],["unlik",{"_index":750,"t":{"36":{"position":[[3263,6]]}}}],["unreli",{"_index":864,"t":{"40":{"position":[[632,10]]}}}],["unstructur",{"_index":1074,"t":{"52":{"position":[[634,12]]}}}],["unstructuredcsvload",{"_index":957,"t":{"46":{"position":[[270,22]]}}}],["unstructuredcsvloader(file_path",{"_index":975,"t":{"46":{"position":[[816,32]]}}}],["unstructuredexcelload",{"_index":958,"t":{"46":{"position":[[293,24]]}}}],["unstructuredexcelloader(file_path",{"_index":977,"t":{"46":{"position":[[892,34]]}}}],["unstructuredmarkdownload",{"_index":959,"t":{"46":{"position":[[318,27]]}}}],["unstructuredmarkdownloader(file_path",{"_index":979,"t":{"46":{"position":[[968,37]]}}}],["unstructuredpowerpointload",{"_index":960,"t":{"46":{"position":[[346,29]]}}}],["unstructuredpowerpointloader(file_path",{"_index":981,"t":{"46":{"position":[[1049,39]]}}}],["unstructuredworddocumentloader(file_path",{"_index":983,"t":{"46":{"position":[[1132,41]]}}}],["unstructuredworddocumentloader)from",{"_index":961,"t":{"46":{"position":[[376,35]]}}}],["until",{"_index":448,"t":{"28":{"position":[[1099,5]]},"380":{"position":[[521,5]]}}}],["up",{"_index":437,"t":{"28":{"position":[[406,2]]},"30":{"position":[[2866,2]]},"32":{"position":[[1571,2]]},"42":{"position":[[651,2]]},"46":{"position":[[188,3]]},"50":{"position":[[229,2]]},"75":{"position":[[194,2]]},"111":{"position":[[570,2]]},"117":{"position":[[245,2],[331,2]]},"121":{"position":[[181,2]]},"147":{"position":[[181,2]]},"157":{"position":[[165,2]]},"186":{"position":[[315,2]]},"208":{"position":[[333,2],[419,2]]},"214":{"position":[[14,2]]},"217":{"position":[[585,2],[3277,2]]},"328":{"position":[[5,2]]},"334":{"position":[[5,2]]},"375":{"position":[[26,2]]},"386":{"position":[[35,2]]},"390":{"position":[[247,2]]},"394":{"position":[[114,2]]}}}],["updat",{"_index":499,"t":{"30":{"position":[[988,6]]},"34":{"position":[[1372,7]]},"36":{"position":[[2815,6]]},"42":{"position":[[592,7]]},"91":{"position":[[925,8]]},"194":{"position":[[42,8]]},"217":{"position":[[9,9],[843,6]]},"326":{"position":[[69,6]]},"328":{"position":[[36,6]]},"330":{"position":[[98,6]]},"332":{"position":[[122,6]]},"334":{"position":[[55,6]]},"359":{"position":[[899,7]]},"382":{"position":[[64,6]]}}}],["updatesudo",{"_index":1618,"t":{"217":{"position":[[902,10]]}}}],["upgrad",{"_index":1548,"t":{"194":{"position":[[129,7]]},"217":{"position":[[1621,7],[1672,10],[1884,7],[1935,10],[2159,7],[2210,10],[2422,7],[2473,10]]}}}],["upload",{"_index":1236,"t":{"115":{"position":[[247,9]]},"388":{"position":[[243,9]]}}}],["upon",{"_index":93,"t":{"4":{"position":[[222,4]]},"137":{"position":[[45,4]]}}}],["urg",{"_index":360,"t":{"20":{"position":[[593,4]]}}}],["url",{"_index":221,"t":{"8":{"position":[[662,3],[856,4]]},"10":{"position":[[838,4]]},"36":{"position":[[2057,3],[5924,3]]},"65":{"position":[[206,4]]},"69":{"position":[[455,4]]},"131":{"position":[[95,3]]},"135":{"position":[[94,5],[260,4]]},"251":{"position":[[1689,3]]},"289":{"position":[[16,4]]},"357":{"position":[[892,3]]},"365":{"position":[[363,3]]},"369":{"position":[[114,6],[189,6]]},"408":{"position":[[773,3]]}}}],["urlopenai_base_url=\"http://localhost:1234/v1",{"_index":1929,"t":{"314":{"position":[[122,46],[437,46]]}}}],["us",{"_index":6,"t":{"2":{"position":[[74,3],[367,5]]},"10":{"position":[[508,5]]},"20":{"position":[[806,5]]},"22":{"position":[[405,3]]},"26":{"position":[[176,5]]},"30":{"position":[[1416,5]]},"32":{"position":[[2691,5]]},"34":{"position":[[620,3]]},"36":{"position":[[714,5],[1634,3],[1892,3],[1990,3],[2157,5],[2230,5],[2645,4],[5274,4],[5309,5],[5759,3],[5857,3],[7627,4],[8668,5]]},"40":{"position":[[877,4]]},"42":{"position":[[454,3],[1573,3],[2083,3]]},"44":{"position":[[548,5]]},"46":{"position":[[1286,3]]},"48":{"position":[[369,4],[711,5]]},"50":{"position":[[2532,5],[2639,3]]},"52":{"position":[[258,5]]},"60":{"position":[[184,6]]},"65":{"position":[[280,6]]},"69":{"position":[[19,3]]},"75":{"position":[[225,5]]},"91":{"position":[[217,3]]},"99":{"position":[[16,5]]},"101":{"position":[[96,5],[127,5],[218,3],[298,5]]},"115":{"position":[[282,4]]},"119":{"position":[[23,5]]},"121":{"position":[[216,3]]},"143":{"position":[[1257,5]]},"149":{"position":[[21,5]]},"173":{"position":[[106,5],[309,3],[633,5]]},"175":{"position":[[1144,4]]},"181":{"position":[[334,5]]},"186":{"position":[[115,3],[167,3]]},"188":{"position":[[315,3],[388,4]]},"190":{"position":[[316,4]]},"194":{"position":[[68,5]]},"200":{"position":[[87,5]]},"217":{"position":[[1999,5]]},"221":{"position":[[579,5]]},"223":{"position":[[426,5]]},"228":{"position":[[242,3],[363,4]]},"232":{"position":[[15,5],[894,5],[951,3]]},"234":{"position":[[38,5],[873,3],[1029,3],[1167,4]]},"241":{"position":[[34,4]]},"243":{"position":[[39,4]]},"245":{"position":[[17,3]]},"247":{"position":[[0,3],[157,3]]},"251":{"position":[[1352,5]]},"255":{"position":[[41,3]]},"257":{"position":[[54,4],[291,5],[443,5]]},"259":{"position":[[42,5],[109,5],[518,6]]},"261":{"position":[[6,5]]},"263":{"position":[[173,5]]},"267":{"position":[[1224,3]]},"271":{"position":[[401,5]]},"289":{"position":[[31,4]]},"308":{"position":[[8,3]]},"314":{"position":[[26,5]]},"316":{"position":[[142,4]]},"318":{"position":[[89,3]]},"322":{"position":[[213,5]]},"357":{"position":[[42,3]]},"363":{"position":[[27,5],[106,3],[377,3]]},"365":{"position":[[13,3],[128,3],[207,4]]},"373":{"position":[[3,5],[446,4]]},"375":{"position":[[266,5]]},"384":{"position":[[206,3]]},"386":{"position":[[88,3]]},"388":{"position":[[278,4]]},"392":{"position":[[34,3]]},"410":{"position":[[192,5]]},"412":{"position":[[55,3],[1406,5]]}}}],["usag",{"_index":921,"t":{"42":{"position":[[1241,5]]},"99":{"position":[[84,7]]},"165":{"position":[[110,7]]},"184":{"position":[[162,5]]},"186":{"position":[[555,5]]},"301":{"position":[[92,6]]},"363":{"position":[[241,5]]}}}],["use_jsonb=tru",{"_index":1346,"t":{"143":{"position":[[629,15]]},"163":{"position":[[389,15]]}}}],["user",{"_index":700,"t":{"36":{"position":[[1103,4],[1165,4],[1416,6],[2832,4]]},"115":{"position":[[228,4]]},"125":{"position":[[468,4]]},"175":{"position":[[731,4]]},"181":{"position":[[229,4]]},"186":{"position":[[217,4]]},"190":{"position":[[208,5]]},"217":{"position":[[1021,4],[1097,10]]},"241":{"position":[[421,4]]},"243":{"position":[[326,4]]},"247":{"position":[[317,4]]},"259":{"position":[[173,5]]},"263":{"position":[[5,5]]},"308":{"position":[[478,5]]},"357":{"position":[[595,7]]},"384":{"position":[[375,4]]},"388":{"position":[[224,4]]},"394":{"position":[[416,7]]}}}],["user_input",{"_index":829,"t":{"36":{"position":[[7906,10]]}}}],["user_input.low",{"_index":830,"t":{"36":{"position":[[7937,18]]}}}],["usermod",{"_index":1624,"t":{"217":{"position":[[1078,7]]}}}],["using:sudo",{"_index":1582,"t":{"217":{"position":[[86,10]]}}}],["usingazure_openai_endpoint=\"https://changemen.openai.azure.com",{"_index":1688,"t":{"232":{"position":[[381,64]]}}}],["usr/share/keyrings/dock",{"_index":1602,"t":{"217":{"position":[[531,26]]}}}],["usual",{"_index":39,"t":{"2":{"position":[[504,7]]},"161":{"position":[[686,7]]}}}],["util",{"_index":1921,"t":{"308":{"position":[[499,7]]}}}],["uuid",{"_index":1377,"t":{"155":{"position":[[110,5]]}}}],["uvicorn",{"_index":1267,"t":{"119":{"position":[[203,7]]},"169":{"position":[[107,7]]},"177":{"position":[[124,7]]},"259":{"position":[[546,7]]},"283":{"position":[[699,7]]}}}],["v1.2",{"_index":713,"t":{"36":{"position":[[1660,4]]}}}],["v1.5",{"_index":1994,"t":{"330":{"position":[[371,5]]},"340":{"position":[[345,5]]},"347":{"position":[[34,5]]}}}],["v18.17.0",{"_index":1272,"t":{"121":{"position":[[86,9],[220,8]]}}}],["v18.17.0npm",{"_index":2141,"t":{"392":{"position":[[38,11]]}}}],["v1:0",{"_index":2032,"t":{"342":{"position":[[175,5]]}}}],["v1:0\"smart_llm=\"bedrock:anthropic.claud",{"_index":2030,"t":{"342":{"position":[[53,40]]}}}],["v1:0\"strategic_llm=\"bedrock:anthropic.claud",{"_index":2031,"t":{"342":{"position":[[112,44]]}}}],["v2",{"_index":2003,"t":{"332":{"position":[[379,3]]}}}],["v3.0",{"_index":2022,"t":{"338":{"position":[[154,5]]}}}],["valid",{"_index":423,"t":{"26":{"position":[[421,9]]},"28":{"position":[[959,9]]},"375":{"position":[[475,9]]},"380":{"position":[[407,9]]}}}],["valu",{"_index":1307,"t":{"135":{"position":[[442,5]]},"165":{"position":[[237,5]]},"251":{"position":[[595,6]]},"406":{"position":[[274,6],[375,6],[479,6],[586,6],[727,6],[825,6],[912,6]]}}}],["valuabl",{"_index":463,"t":{"28":{"position":[[1502,8]]},"234":{"position":[[923,8]]}}}],["valueerror(f\"unsupport",{"_index":984,"t":{"46":{"position":[[1186,24]]}}}],["var",{"_index":1971,"t":{"326":{"position":[[98,5]]},"328":{"position":[[65,5]]},"330":{"position":[[123,5]]},"332":{"position":[[137,5]]},"334":{"position":[[80,5]]},"363":{"position":[[163,4]]},"365":{"position":[[92,4],[324,5]]},"384":{"position":[[686,4]]}}}],["vari",{"_index":1169,"t":{"91":{"position":[[66,6]]},"157":{"position":[[23,4]]}}}],["variabl",{"_index":1030,"t":{"50":{"position":[[431,9]]},"81":{"position":[[36,10]]},"107":{"position":[[218,8]]},"111":{"position":[[331,9]]},"115":{"position":[[364,10]]},"139":{"position":[[238,8]]},"147":{"position":[[201,10]]},"232":{"position":[[134,9]]},"238":{"position":[[81,9]]},"271":{"position":[[212,10]]},"318":{"position":[[138,9]]},"322":{"position":[[223,8]]},"324":{"position":[[78,10]]},"382":{"position":[[75,9]]},"388":{"position":[[360,10]]},"394":{"position":[[96,9]]},"408":{"position":[[112,9],[256,9],[407,9],[551,9],[689,9],[818,9]]},"412":{"position":[[402,9]]}}}],["varieti",{"_index":951,"t":{"46":{"position":[[21,7]]}}}],["variou",{"_index":429,"t":{"26":{"position":[[700,7]]},"36":{"position":[[3616,7]]},"50":{"position":[[2126,7]]},"125":{"position":[[384,7]]},"135":{"position":[[305,7]]},"304":{"position":[[18,7]]},"306":{"position":[[58,7]]},"375":{"position":[[754,7]]}}}],["vcpu",{"_index":1576,"t":{"212":{"position":[[152,4]]}}}],["vector",{"_index":999,"t":{"46":{"position":[[1665,6]]},"48":{"position":[[467,6]]},"163":{"position":[[232,6]]},"165":{"position":[[86,6],[192,6],[839,6]]},"412":{"position":[[957,6]]}}}],["vector_store.asimilarity_search(\"gpt",{"_index":1495,"t":{"165":{"position":[[876,36]]}}}],["vector_store=vector_stor",{"_index":1473,"t":{"161":{"position":[[3263,28]]},"163":{"position":[[797,26]]},"165":{"position":[[655,26]]}}}],["vector_storeawait",{"_index":1493,"t":{"165":{"position":[[749,17]]}}}],["vectorstore.similarity_search(queri",{"_index":1009,"t":{"46":{"position":[[1935,36]]}}}],["vendor",{"_index":1027,"t":{"50":{"position":[[299,6]]}}}],["ventur",{"_index":1393,"t":{"161":{"position":[[627,7]]}}}],["venv",{"_index":1501,"t":{"173":{"position":[[116,4],[258,4]]}}}],["verbos",{"_index":1896,"t":{"299":{"position":[[16,7]]},"384":{"position":[[951,7],[1418,10]]}}}],["verbose=tru",{"_index":1905,"t":{"304":{"position":[[283,13]]}}}],["veri",{"_index":272,"t":{"10":{"position":[[1039,4]]},"30":{"position":[[3029,4]]},"91":{"position":[[179,4]]},"161":{"position":[[607,4],[2549,4]]},"188":{"position":[[170,4]]},"320":{"position":[[228,4]]}}}],["verifi",{"_index":887,"t":{"42":{"position":[[173,9]]},"217":{"position":[[119,6],[941,6],[1355,6],[3127,6]]},"394":{"position":[[55,6]]}}}],["verify_ssl=fals",{"_index":2069,"t":{"357":{"position":[[500,16]]}}}],["version",{"_index":661,"t":{"34":{"position":[[1237,7]]},"175":{"position":[[73,7],[318,9],[1115,8]]},"181":{"position":[[496,7],[531,8]]},"188":{"position":[[137,7],[324,7],[430,7]]},"194":{"position":[[85,8],[345,8]]},"217":{"position":[[51,7],[177,10]]},"259":{"position":[[257,7]]},"263":{"position":[[83,7],[292,9],[313,7],[430,8],[578,7],[647,7]]}}}],["version:git",{"_index":1584,"t":{"217":{"position":[[163,11]]}}}],["via",{"_index":844,"t":{"38":{"position":[[150,3]]},"115":{"position":[[420,3]]},"129":{"position":[[21,3]]},"135":{"position":[[170,3],[498,3]]},"200":{"position":[[176,3]]},"247":{"position":[[214,3]]},"353":{"position":[[303,3]]},"388":{"position":[[416,3]]}}}],["video",{"_index":311,"t":{"14":{"position":[[548,7]]}}}],["vim",{"_index":1660,"t":{"217":{"position":[[3067,3]]}}}],["virtual",{"_index":1499,"t":{"173":{"position":[[17,7],[86,7],[288,7],[419,7],[553,7]]},"175":{"position":[[41,7],[146,7],[392,7],[648,7],[884,7]]},"177":{"position":[[42,7]]}}}],["vision",{"_index":652,"t":{"34":{"position":[[939,6]]},"410":{"position":[[218,6]]}}}],["visit",{"_index":202,"t":{"8":{"position":[[185,8]]},"91":{"position":[[941,5]]},"117":{"position":[[551,5]]},"177":{"position":[[155,5]]},"208":{"position":[[639,5]]},"228":{"position":[[351,7]]},"263":{"position":[[215,5]]},"390":{"position":[[467,5]]}}}],["visual",{"_index":1287,"t":{"125":{"position":[[150,6]]}}}],["voyag",{"_index":1394,"t":{"161":{"position":[[650,7]]}}}],["voyage_api_key=[your",{"_index":2037,"t":{"349":{"position":[[0,20]]}}}],["wait",{"_index":762,"t":{"36":{"position":[[3604,7],[3676,4],[6161,4],[8228,4]]},"50":{"position":[[2461,5]]},"243":{"position":[[177,5]]}}}],["wait_for_run_completion(thread.id",{"_index":799,"t":{"36":{"position":[[5164,34],[8259,34],[8496,34]]}}}],["wait_for_run_completion(thread_id",{"_index":765,"t":{"36":{"position":[[3706,34],[6191,34]]}}}],["walk",{"_index":1141,"t":{"75":{"position":[[154,4]]},"359":{"position":[[99,4]]}}}],["want",{"_index":1251,"t":{"117":{"position":[[205,4]]},"135":{"position":[[32,4],[194,4]]},"151":{"position":[[41,4]]},"161":{"position":[[379,6]]},"165":{"position":[[27,4]]},"301":{"position":[[54,4]]},"316":{"position":[[134,4]]},"353":{"position":[[37,4]]},"390":{"position":[[205,4]]}}}],["watch",{"_index":1325,"t":{"141":{"position":[[242,5]]}}}],["way",{"_index":1390,"t":{"161":{"position":[[501,3],[1373,3]]},"181":{"position":[[31,4]]},"251":{"position":[[1794,3],[1926,3]]},"306":{"position":[[66,5]]}}}],["we'll",{"_index":947,"t":{"44":{"position":[[500,5],[635,5]]},"353":{"position":[[342,5]]}}}],["we'r",{"_index":879,"t":{"40":{"position":[[1003,5]]},"44":{"position":[[232,5]]},"99":{"position":[[92,5]]},"103":{"position":[[0,5],[65,5],[199,5]]},"188":{"position":[[393,5]]},"261":{"position":[[0,5]]},"410":{"position":[[8,5],[103,5],[309,5]]}}}],["we'v",{"_index":846,"t":{"40":{"position":[[25,5]]},"48":{"position":[[9,5],[831,5]]},"50":{"position":[[2156,5]]},"188":{"position":[[0,5]]},"418":{"position":[[91,5],[324,5]]}}}],["wealth",{"_index":1468,"t":{"161":{"position":[[3030,6]]}}}],["weasyprint",{"_index":1765,"t":{"257":{"position":[[33,10]]}}}],["web",{"_index":640,"t":{"34":{"position":[[548,3]]},"36":{"position":[[2247,3],[2524,6],[4205,3],[7506,6]]},"40":{"position":[[224,3],[300,3],[526,3],[1145,3]]},"42":{"position":[[13,3],[609,4],[633,3],[1046,3],[1450,3],[1621,3],[1930,3]]},"44":{"position":[[299,3],[460,3],[737,3]]},"50":{"position":[[1968,4],[2444,3]]},"52":{"position":[[264,3]]},"75":{"position":[[27,3]]},"87":{"position":[[84,3]]},"91":{"position":[[447,3],[886,3]]},"97":{"position":[[171,3]]},"109":{"position":[[99,3]]},"111":{"position":[[69,3],[203,3]]},"139":{"position":[[942,5]]},"141":{"position":[[131,3],[324,3]]},"177":{"position":[[190,3]]},"217":{"position":[[1217,3]]},"221":{"position":[[420,3],[450,3]]},"228":{"position":[[151,3],[246,3],[285,3],[368,3]]},"263":{"position":[[161,3]]},"267":{"position":[[1682,6]]},"353":{"position":[[184,3]]},"355":{"position":[[373,3]]},"357":{"position":[[981,3]]},"363":{"position":[[519,3]]},"384":{"position":[[637,3],[1227,6]]},"418":{"position":[[520,3]]}}}],["webdriv",{"_index":1721,"t":{"243":{"position":[[534,9]]},"245":{"position":[[148,9],[280,9]]},"249":{"position":[[56,9]]}}}],["webhook",{"_index":1800,"t":{"267":{"position":[[394,7]]}}}],["webhook');async",{"_index":1847,"t":{"267":{"position":[[2290,15]]}}}],["webhook.j",{"_index":1799,"t":{"267":{"position":[[349,10],[550,10]]}}}],["websit",{"_index":1304,"t":{"135":{"position":[[319,8],[477,8]]},"241":{"position":[[317,8]]},"243":{"position":[[413,8]]},"247":{"position":[[39,8],[185,8]]},"249":{"position":[[342,8],[563,8]]},"263":{"position":[[225,7],[732,7]]}}}],["websocket",{"_index":1103,"t":{"65":{"position":[[302,10],[313,9]]},"69":{"position":[[233,11],[814,11]]},"129":{"position":[[59,9]]},"251":{"position":[[964,9]]},"267":{"position":[[172,9],[305,9],[567,9],[1897,9],[2382,13]]}}}],["websocket(ws_uri",{"_index":1810,"t":{"267":{"position":[[771,18]]}}}],["websocket.accept",{"_index":1131,"t":{"69":{"position":[[832,18]]}}}],["websocket.open",{"_index":1833,"t":{"267":{"position":[[1569,15],[1945,15]]}}}],["websocket.send_text(report",{"_index":1132,"t":{"69":{"position":[[899,27]]}}}],["websocket=custom_logs_handl",{"_index":1750,"t":{"251":{"position":[[1147,29]]}}}],["websocket=websocket",{"_index":1125,"t":{"69":{"position":[[526,20]]}}}],["websocket_endpoint(websocket",{"_index":1130,"t":{"69":{"position":[[784,29]]}}}],["websocketfrom",{"_index":1109,"t":{"69":{"position":[[99,13]]}}}],["webui",{"_index":2039,"t":{"353":{"position":[[23,6],[60,5]]},"359":{"position":[[185,5]]}}}],["week",{"_index":21,"t":{"2":{"position":[[214,6]]},"221":{"position":[[81,5]]}}}],["welcom",{"_index":841,"t":{"38":{"position":[[21,7]]}}}],["well",{"_index":27,"t":{"2":{"position":[[277,4]]},"10":{"position":[[678,4]]},"42":{"position":[[1319,4]]},"71":{"position":[[74,4],[386,4]]},"115":{"position":[[160,5]]},"161":{"position":[[1552,4]]},"212":{"position":[[56,5]]},"241":{"position":[[293,4]]},"243":{"position":[[378,4]]},"386":{"position":[[130,4]]},"388":{"position":[[156,5]]}}}],["we’d",{"_index":524,"t":{"30":{"position":[[2044,4]]}}}],["we’ll",{"_index":482,"t":{"30":{"position":[[468,5]]},"32":{"position":[[849,5],[1215,5]]},"36":{"position":[[2783,5],[3026,5]]}}}],["we’r",{"_index":775,"t":{"36":{"position":[[4121,5]]}}}],["we’v",{"_index":278,"t":{"12":{"position":[[9,5]]},"30":{"position":[[1894,5],[1960,5]]},"32":{"position":[[712,5],[2093,5]]}}}],["whatev",{"_index":1687,"t":{"232":{"position":[[364,8]]},"251":{"position":[[1992,8]]}}}],["wherea",{"_index":1673,"t":{"223":{"position":[[58,7]]}}}],["whole",{"_index":651,"t":{"34":{"position":[[839,5],[1116,5]]},"161":{"position":[[1394,5]]}}}],["whowould",{"_index":1444,"t":{"161":{"position":[[2137,8]]}}}],["wide",{"_index":1518,"t":{"175":{"position":[[509,4],[991,4]]},"255":{"position":[[84,6]]},"365":{"position":[[200,6]]}}}],["width=80)if",{"_index":2236,"t":{"412":{"position":[[1591,11]]}}}],["win",{"_index":1864,"t":{"273":{"position":[[606,3]]},"285":{"position":[[964,3]]}}}],["wish",{"_index":1794,"t":{"263":{"position":[[325,4]]}}}],["with:sudo",{"_index":1664,"t":{"217":{"position":[[3146,9]]}}}],["within",{"_index":88,"t":{"4":{"position":[[142,6]]},"14":{"position":[[398,6],[703,6]]},"32":{"position":[[286,6]]},"40":{"position":[[330,6]]},"117":{"position":[[138,6]]},"175":{"position":[[759,6]]},"206":{"position":[[85,6]]},"208":{"position":[[288,6]]},"353":{"position":[[360,6]]},"390":{"position":[[138,6]]}}}],["without",{"_index":91,"t":{"4":{"position":[[169,7]]},"117":{"position":[[298,7]]},"161":{"position":[[2559,7]]},"208":{"position":[[386,7]]},"217":{"position":[[1060,7]]},"418":{"position":[[219,7]]}}}],["won’t",{"_index":659,"t":{"34":{"position":[[1199,5]]}}}],["word",{"_index":186,"t":{"6":{"position":[[1126,6]]},"10":{"position":[[774,5]]},"14":{"position":[[671,5]]},"107":{"position":[[182,4]]},"139":{"position":[[202,4]]},"161":{"position":[[544,4]]},"221":{"position":[[390,7]]},"228":{"position":[[122,6],[415,4]]}}}],["work",{"_index":71,"t":{"2":{"position":[[961,4]]},"8":{"position":[[38,5],[400,5],[491,4]]},"20":{"position":[[611,5]]},"24":{"position":[[416,4]]},"32":{"position":[[49,7],[281,4],[373,4],[2136,4]]},"36":{"position":[[5237,7]]},"44":{"position":[[171,5]]},"48":{"position":[[30,4],[103,5]]},"50":{"position":[[64,6]]},"103":{"position":[[17,7],[81,7],[210,7]]},"117":{"position":[[277,5]]},"141":{"position":[[381,5]]},"161":{"position":[[1160,4],[1400,7],[1441,7],[1489,4],[1601,7],[1832,4],[1901,4],[2541,7],[2628,4]]},"175":{"position":[[1062,7]]},"188":{"position":[[399,7]]},"208":{"position":[[365,5]]},"212":{"position":[[50,5],[84,4]]},"226":{"position":[[7,5]]},"241":{"position":[[287,5]]},"243":{"position":[[372,5]]},"249":{"position":[[313,5]]},"259":{"position":[[208,5]]},"263":{"position":[[761,5]]},"332":{"position":[[41,5]]},"369":{"position":[[28,4]]},"373":{"position":[[234,4]]},"384":{"position":[[442,4]]},"410":{"position":[[25,7],[114,7]]}}}],["workaround",{"_index":1781,"t":{"259":{"position":[[147,10]]}}}],["workflow",{"_index":348,"t":{"20":{"position":[[356,9],[441,9],[695,9]]},"30":{"position":[[2341,8],[2968,8]]},"32":{"position":[[1366,8]]},"181":{"position":[[161,10]]},"184":{"position":[[203,9]]}}}],["workflow.add_conditional_edges('review",{"_index":594,"t":{"32":{"position":[[1747,42]]}}}],["workflow.add_edge('brows",{"_index":544,"t":{"30":{"position":[[2694,28]]}}}],["workflow.add_edge('plann",{"_index":546,"t":{"30":{"position":[[2734,28]]}}}],["workflow.add_edge('publish",{"_index":550,"t":{"30":{"position":[[2925,30]]}}}],["workflow.add_edge('research",{"_index":547,"t":{"30":{"position":[[2777,31]]},"32":{"position":[[1662,31]]}}}],["workflow.add_edge('revis",{"_index":593,"t":{"32":{"position":[[1706,28]]}}}],["workflow.add_edge('writ",{"_index":548,"t":{"30":{"position":[[2819,27]]}}}],["workflow.add_node(\"brows",{"_index":534,"t":{"30":{"position":[[2405,28]]}}}],["workflow.add_node(\"plann",{"_index":536,"t":{"30":{"position":[[2471,28]]}}}],["workflow.add_node(\"publish",{"_index":542,"t":{"30":{"position":[[2642,30]]}}}],["workflow.add_node(\"research",{"_index":538,"t":{"30":{"position":[[2528,31]]},"32":{"position":[[1400,31]]}}}],["workflow.add_node(\"review",{"_index":588,"t":{"32":{"position":[[1467,29]]}}}],["workflow.add_node(\"revis",{"_index":590,"t":{"32":{"position":[[1517,28]]}}}],["workflow.add_node(\"writ",{"_index":540,"t":{"30":{"position":[[2596,27]]}}}],["workflow.set_entry_point(\"brows",{"_index":549,"t":{"30":{"position":[[2889,35]]}}}],["workflow.set_entry_point(\"research",{"_index":592,"t":{"32":{"position":[[1623,38]]}}}],["world",{"_index":72,"t":{"2":{"position":[[975,6]]},"34":{"position":[[1126,5]]},"40":{"position":[[1136,6]]}}}],["worth",{"_index":941,"t":{"44":{"position":[[38,5]]},"161":{"position":[[1823,5],[2482,5],[2633,5]]}}}],["write",{"_index":243,"t":{"10":{"position":[[108,5],[394,5],[821,5],[894,5]]},"26":{"position":[[615,7]]},"28":{"position":[[146,7],[808,6],[1178,6]]},"30":{"position":[[1795,5]]},"56":{"position":[[444,5]]},"67":{"position":[[274,6]]},"161":{"position":[[3313,5]]},"163":{"position":[[848,5]]},"251":{"position":[[1281,5]]},"324":{"position":[[287,7]]},"375":{"position":[[669,7]]},"377":{"position":[[121,7]]},"380":{"position":[[380,6],[600,6]]}}}],["writer",{"_index":427,"t":{"26":{"position":[[576,6]]},"28":{"position":[[1156,6]]},"30":{"position":[[2809,9]]},"375":{"position":[[630,6]]},"380":{"position":[[578,6]]}}}],["writer_ag",{"_index":529,"t":{"30":{"position":[[2207,12]]}}}],["writer_agent.run",{"_index":541,"t":{"30":{"position":[[2624,17]]}}}],["writerag",{"_index":530,"t":{"30":{"position":[[2222,13]]}}}],["written",{"_index":616,"t":{"32":{"position":[[2617,7],[2819,7]]},"62":{"position":[[218,7]]},"67":{"position":[[238,7]]},"308":{"position":[[157,7]]},"384":{"position":[[537,7],[1351,7],[1395,7]]}}}],["written_contents=some_written_cont",{"_index":1919,"t":{"308":{"position":[[372,39]]}}}],["ws",{"_index":1298,"t":{"131":{"position":[[134,2]]}}}],["ws://${host}/w",{"_index":1809,"t":{"267":{"position":[[739,18]]}}}],["ws_uri",{"_index":1808,"t":{"267":{"position":[[730,6]]}}}],["ws|upload|files|outputs|getconfig|setconfig",{"_index":1643,"t":{"217":{"position":[[1759,47],[2297,47]]}}}],["x",{"_index":374,"t":{"20":{"position":[[903,1]]},"32":{"position":[[3302,1]]},"188":{"position":[[523,1]]},"285":{"position":[[892,1]]}}}],["y",{"_index":1583,"t":{"217":{"position":[[114,4],[416,4],[936,4],[1270,4]]}}}],["ye",{"_index":1543,"t":{"190":{"position":[[150,3]]}}}],["year",{"_index":332,"t":{"20":{"position":[[19,4],[487,4]]},"40":{"position":[[18,6]]},"161":{"position":[[533,6],[1478,6],[1754,5],[1841,4],[2498,4]]}}}],["year..........\"\"\"docu",{"_index":1459,"t":{"161":{"position":[[2658,25]]}}}],["years.instead",{"_index":1421,"t":{"161":{"position":[[1424,13]]}}}],["you'll",{"_index":882,"t":{"40":{"position":[[1061,6]]},"50":{"position":[[339,6]]},"245":{"position":[[51,6]]},"353":{"position":[[30,6]]}}}],["you'r",{"_index":842,"t":{"38":{"position":[[77,6],[179,6]]},"95":{"position":[[26,6],[48,6],[179,6]]},"103":{"position":[[349,6]]},"107":{"position":[[337,6],[463,6]]},"131":{"position":[[3,6]]},"161":{"position":[[1669,6],[2404,6]]},"194":{"position":[[61,6]]},"217":{"position":[[1992,6]]},"234":{"position":[[17,6]]},"249":{"position":[[572,6]]}}}],["you'v",{"_index":1731,"t":{"249":{"position":[[171,6]]},"263":{"position":[[402,6]]},"332":{"position":[[86,6]]}}}],["your_nam",{"_index":1502,"t":{"173":{"position":[[155,12]]}}}],["your_openai_api_key_here'os.environ['tavily_api_key",{"_index":1150,"t":{"81":{"position":[[241,54]]}}}],["your_tavily_api_key_her",{"_index":1151,"t":{"81":{"position":[[298,26]]}}}],["you’ll",{"_index":560,"t":{"30":{"position":[[3325,6]]},"32":{"position":[[2106,6]]}}}],["you’v",{"_index":559,"t":{"30":{"position":[[3267,6]]}}}],["zero",{"_index":342,"t":{"20":{"position":[[248,4]]}}}]],"pipeline":["stemmer"]}}] \ No newline at end of file +[{"documents":[{"i":1,"t":"","u":"/blog/archive","b":["Blog"]},{"i":2,"t":"How we built GPT Researcher","u":"/blog/building-gpt-researcher","b":["Blog"]},{"i":16,"t":"The Future of Research is Hybrid","u":"/blog/gptr-hybrid","b":["Blog"]},{"i":30,"t":"Detailed Report","u":"/docs/examples/detailed_report","b":["Docs","Examples"]},{"i":45,"t":"Contribute","u":"/docs/contribute","b":["Docs"]},{"i":47,"t":"How to build an OpenAI Assistant with Internet access","u":"/blog/building-openai-assistant","b":["Blog"]},{"i":49,"t":"Simple Run","u":"/docs/examples/examples","b":["Docs","Examples"]},{"i":53,"t":"FAQ","u":"/docs/faq","b":["Docs"]},{"i":65,"t":"Research on Local Documents","u":"/docs/gpt-researcher/context/local-docs","b":["Docs","Custom Context"]},{"i":71,"t":"How to Build the Ultimate Research Multi-Agent Assistant","u":"/blog/gptr-langgraph","b":["Blog"]},{"i":90,"t":"Tailored Research","u":"/docs/gpt-researcher/context/tailored-research","b":["Docs","Custom Context"]},{"i":102,"t":"Frontend Application","u":"/docs/gpt-researcher/frontend/frontend","b":["Docs","Frontend"]},{"i":116,"t":"Hybrid Research","u":"/docs/examples/hybrid_research","b":["Docs","Examples"]},{"i":141,"t":"Playing with Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","b":["Docs","Frontend"]},{"i":147,"t":"Vector Stores","u":"/docs/gpt-researcher/context/vector-stores","b":["Docs","Custom Context"]},{"i":155,"t":"Log Files","u":"/docs/gpt-researcher/frontend/logs","b":["Docs","Frontend"]},{"i":173,"t":"Getting Started","u":"/docs/gpt-researcher/getting-started/getting-started","b":["Docs","Getting Started"]},{"i":185,"t":"Run with CLI","u":"/docs/gpt-researcher/getting-started/cli","b":["Docs","Getting Started"]},{"i":199,"t":"Docker: Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started-with-docker","b":["Docs","Getting Started"]},{"i":201,"t":"Introduction","u":"/docs/gpt-researcher/getting-started/introduction","b":["Docs","Getting Started"]},{"i":212,"t":"How to Choose","u":"/docs/gpt-researcher/getting-started/how-to-choose","b":["Docs","Getting Started"]},{"i":231,"t":"Running on Linux","u":"/docs/gpt-researcher/getting-started/linux-deployment","b":["Docs","Getting Started"]},{"i":240,"t":"Automated Tests","u":"/docs/gpt-researcher/gptr/automated-tests","b":["Docs","GPT Researcher"]},{"i":250,"t":"Configuration","u":"/docs/gpt-researcher/gptr/config","b":["Docs","GPT Researcher"]},{"i":254,"t":"Agent Example","u":"/docs/gpt-researcher/gptr/example","b":["Docs","GPT Researcher"]},{"i":256,"t":"Handling Logs","u":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream","b":["Docs","GPT Researcher"]},{"i":258,"t":"PIP Package","u":"/docs/gpt-researcher/gptr/pip-package","b":["Docs","GPT Researcher"]},{"i":299,"t":"Scraping Options","u":"/docs/gpt-researcher/gptr/scraping","b":["Docs","GPT Researcher"]},{"i":314,"t":"Querying the Backend","u":"/docs/gpt-researcher/gptr/querying-the-backend","b":["Docs","GPT Researcher"]},{"i":318,"t":"Troubleshooting","u":"/docs/gpt-researcher/gptr/troubleshooting","b":["Docs","GPT Researcher"]},{"i":330,"t":"Testing your LLM","u":"/docs/gpt-researcher/llms/testing-your-llm","b":["Docs","LLM Providers"]},{"i":332,"t":"Configure LLM","u":"/docs/gpt-researcher/llms/llms","b":["Docs","LLM Providers"]},{"i":373,"t":"Filtering by Domain","u":"/docs/gpt-researcher/context/filtering-by-domain","b":["Docs","Custom Context"]},{"i":375,"t":"Running with Ollama","u":"/docs/gpt-researcher/llms/running-with-ollama","b":["Docs","LLM Providers"]},{"i":385,"t":"Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","b":["Docs","Search Engines"]},{"i":395,"t":"config.config","u":"/docs/reference/config/config","b":[]},{"i":401,"t":"config.singleton","u":"/docs/reference/config/singleton","b":[]},{"i":407,"t":"processing.html","u":"/docs/reference/processing/html","b":[]},{"i":409,"t":"LangGraph","u":"/docs/gpt-researcher/multi_agents/langgraph","b":["Docs","Multi-Agent Frameworks"]},{"i":432,"t":"Testing your Retriever","u":"/docs/gpt-researcher/search-engines/test-your-retriever","b":["Docs","Search Engines"]},{"i":434,"t":"Roadmap","u":"/docs/roadmap","b":["Docs"]},{"i":436,"t":"Welcome","u":"/docs/welcome","b":["Docs"]},{"i":440,"t":"processing.text","u":"/docs/reference/processing/text","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/1",[]],["t/2",[0,2.702,1,2.702,2,1.529]],["t/16",[2,1.529,3,2.702,4,2.293]],["t/30",[5,3.278,6,3.278]],["t/45",[7,4.167]],["t/47",[8,1.697,9,1.999,10,1.697,11,1.999,12,1.999]],["t/49",[13,3.278,14,2.212]],["t/53",[15,4.167]],["t/65",[2,1.529,16,2.702,17,2.702]],["t/71",[2,1.001,8,1.501,10,1.501,18,1.769,19,1.769,20,1.501]],["t/90",[2,1.855,21,3.278]],["t/102",[22,3.278,23,3.278]],["t/116",[2,1.855,4,2.783]],["t/141",[24,3.278,25,3.278]],["t/147",[26,3.278,27,3.278]],["t/155",[28,2.783,29,3.278]],["t/173",[30,3.278,31,3.278]],["t/185",[14,2.212,32,3.278]],["t/199",[33,3.278,34,3.278]],["t/201",[35,4.167]],["t/212",[36,4.167]],["t/231",[14,2.212,37,3.278]],["t/240",[38,3.278,39,2.456]],["t/250",[40,3.537]],["t/254",[20,2.783,41,3.278]],["t/256",[28,2.783,42,3.278]],["t/258",[43,3.278,44,3.278]],["t/299",[45,3.278,46,3.278]],["t/314",[47,3.278,48,3.278]],["t/318",[49,4.167]],["t/330",[39,2.456,50,2.783]],["t/332",[40,2.783,50,2.783]],["t/373",[51,3.278,52,3.278]],["t/375",[14,2.212,53,3.278]],["t/385",[54,3.537]],["t/395",[55,4.167]],["t/401",[56,4.167]],["t/407",[57,4.167]],["t/409",[58,4.167]],["t/432",[39,2.456,54,2.783]],["t/434",[59,4.167]],["t/436",[60,4.167]],["t/440",[61,4.167]]],"invertedIndex":[["access",{"_index":12,"t":{"47":{"position":[[47,6]]}}}],["agent",{"_index":20,"t":{"71":{"position":[[41,5]]},"254":{"position":[[0,5]]}}}],["applic",{"_index":23,"t":{"102":{"position":[[9,11]]}}}],["assist",{"_index":10,"t":{"47":{"position":[[23,9]]},"71":{"position":[[47,9]]}}}],["autom",{"_index":38,"t":{"240":{"position":[[0,9]]}}}],["backend",{"_index":48,"t":{"314":{"position":[[13,7]]}}}],["build",{"_index":8,"t":{"47":{"position":[[7,5]]},"71":{"position":[[7,5]]}}}],["built",{"_index":0,"t":{"2":{"position":[[7,5]]}}}],["choos",{"_index":36,"t":{"212":{"position":[[7,6]]}}}],["cli",{"_index":32,"t":{"185":{"position":[[9,3]]}}}],["config.config",{"_index":55,"t":{"395":{"position":[[0,13]]}}}],["config.singleton",{"_index":56,"t":{"401":{"position":[[0,16]]}}}],["configur",{"_index":40,"t":{"250":{"position":[[0,13]]},"332":{"position":[[0,9]]}}}],["contribut",{"_index":7,"t":{"45":{"position":[[0,10]]}}}],["detail",{"_index":5,"t":{"30":{"position":[[0,8]]}}}],["docker",{"_index":33,"t":{"199":{"position":[[0,7]]}}}],["document",{"_index":17,"t":{"65":{"position":[[18,9]]}}}],["domain",{"_index":52,"t":{"373":{"position":[[13,6]]}}}],["exampl",{"_index":41,"t":{"254":{"position":[[6,7]]}}}],["faq",{"_index":15,"t":{"53":{"position":[[0,3]]}}}],["file",{"_index":29,"t":{"155":{"position":[[4,5]]}}}],["filter",{"_index":51,"t":{"373":{"position":[[0,9]]}}}],["frontend",{"_index":22,"t":{"102":{"position":[[0,8]]}}}],["futur",{"_index":3,"t":{"16":{"position":[[4,6]]}}}],["get",{"_index":30,"t":{"173":{"position":[[0,7]]}}}],["gpt",{"_index":1,"t":{"2":{"position":[[13,3]]}}}],["handl",{"_index":42,"t":{"256":{"position":[[0,8]]}}}],["hybrid",{"_index":4,"t":{"16":{"position":[[26,6]]},"116":{"position":[[0,6]]}}}],["internet",{"_index":11,"t":{"47":{"position":[[38,8]]}}}],["introduct",{"_index":35,"t":{"201":{"position":[[0,12]]}}}],["langgraph",{"_index":58,"t":{"409":{"position":[[0,9]]}}}],["linux",{"_index":37,"t":{"231":{"position":[[11,5]]}}}],["llm",{"_index":50,"t":{"330":{"position":[[13,3]]},"332":{"position":[[10,3]]}}}],["local",{"_index":16,"t":{"65":{"position":[[12,5]]}}}],["log",{"_index":28,"t":{"155":{"position":[[0,3]]},"256":{"position":[[9,4]]}}}],["multi",{"_index":19,"t":{"71":{"position":[[35,5]]}}}],["ollama",{"_index":53,"t":{"375":{"position":[[13,6]]}}}],["openai",{"_index":9,"t":{"47":{"position":[[16,6]]}}}],["option",{"_index":46,"t":{"299":{"position":[[9,7]]}}}],["packag",{"_index":44,"t":{"258":{"position":[[4,7]]}}}],["pip",{"_index":43,"t":{"258":{"position":[[0,3]]}}}],["play",{"_index":24,"t":{"141":{"position":[[0,7]]}}}],["processing.html",{"_index":57,"t":{"407":{"position":[[0,15]]}}}],["processing.text",{"_index":61,"t":{"440":{"position":[[0,15]]}}}],["queri",{"_index":47,"t":{"314":{"position":[[0,8]]}}}],["quickstart",{"_index":34,"t":{"199":{"position":[[8,10]]}}}],["report",{"_index":6,"t":{"30":{"position":[[9,6]]}}}],["research",{"_index":2,"t":{"2":{"position":[[17,10]]},"16":{"position":[[14,8]]},"65":{"position":[[0,8]]},"71":{"position":[[26,8]]},"90":{"position":[[9,8]]},"116":{"position":[[7,8]]}}}],["retriev",{"_index":54,"t":{"385":{"position":[[0,10]]},"432":{"position":[[13,9]]}}}],["roadmap",{"_index":59,"t":{"434":{"position":[[0,7]]}}}],["run",{"_index":14,"t":{"49":{"position":[[7,3]]},"185":{"position":[[0,3]]},"231":{"position":[[0,7]]},"375":{"position":[[0,7]]}}}],["scrape",{"_index":45,"t":{"299":{"position":[[0,8]]}}}],["simpl",{"_index":13,"t":{"49":{"position":[[0,6]]}}}],["start",{"_index":31,"t":{"173":{"position":[[8,7]]}}}],["store",{"_index":27,"t":{"147":{"position":[[7,6]]}}}],["tailor",{"_index":21,"t":{"90":{"position":[[0,8]]}}}],["test",{"_index":39,"t":{"240":{"position":[[10,5]]},"330":{"position":[[0,7]]},"432":{"position":[[0,7]]}}}],["troubleshoot",{"_index":49,"t":{"318":{"position":[[0,15]]}}}],["ultim",{"_index":18,"t":{"71":{"position":[[17,8]]}}}],["vector",{"_index":26,"t":{"147":{"position":[[0,6]]}}}],["webhook",{"_index":25,"t":{"141":{"position":[[13,8]]}}}],["welcom",{"_index":60,"t":{"436":{"position":[[0,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":4,"t":"Moving from infinite loops to deterministic results","u":"/blog/building-gpt-researcher","h":"#moving-from-infinite-loops-to-deterministic-results","p":2},{"i":6,"t":"Aiming for objective and unbiased results","u":"/blog/building-gpt-researcher","h":"#aiming-for-objective-and-unbiased-results","p":2},{"i":8,"t":"Speeding up the research process","u":"/blog/building-gpt-researcher","h":"#speeding-up-the-research-process","p":2},{"i":10,"t":"Finalizing the research report","u":"/blog/building-gpt-researcher","h":"#finalizing-the-research-report","p":2},{"i":12,"t":"The final architecture","u":"/blog/building-gpt-researcher","h":"#the-final-architecture","p":2},{"i":14,"t":"Going forward","u":"/blog/building-gpt-researcher","h":"#going-forward","p":2},{"i":18,"t":"Why Hybrid Research Works Better","u":"/blog/gptr-hybrid","h":"#why-hybrid-research-works-better","p":16},{"i":20,"t":"Building the Hybrid Research Assistant","u":"/blog/gptr-hybrid","h":"#building-the-hybrid-research-assistant","p":16},{"i":22,"t":"Processing Local Documents with Langchain","u":"/blog/gptr-hybrid","h":"#processing-local-documents-with-langchain","p":16},{"i":24,"t":"Conducting Web Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#conducting-web-research-with-gpt-researcher","p":16},{"i":26,"t":"Running the Hybrid Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#running-the-hybrid-research-with-gpt-researcher","p":16},{"i":28,"t":"Conclusion","u":"/blog/gptr-hybrid","h":"#conclusion","p":16},{"i":32,"t":"Overview","u":"/docs/examples/detailed_report","h":"#overview","p":30},{"i":34,"t":"Key Features","u":"/docs/examples/detailed_report","h":"#key-features","p":30},{"i":36,"t":"Class Structure","u":"/docs/examples/detailed_report","h":"#class-structure","p":30},{"i":37,"t":"Initialization","u":"/docs/examples/detailed_report","h":"#initialization","p":30},{"i":39,"t":"How It Works","u":"/docs/examples/detailed_report","h":"#how-it-works","p":30},{"i":41,"t":"Usage Example","u":"/docs/examples/detailed_report","h":"#usage-example","p":30},{"i":43,"t":"Conclusion","u":"/docs/examples/detailed_report","h":"#conclusion","p":30},{"i":51,"t":"Run PIP Package","u":"/docs/examples/examples","h":"#run-pip-package","p":49},{"i":55,"t":"How do I get started?","u":"/docs/faq","h":"#how-do-i-get-started","p":53},{"i":57,"t":"What is GPT Researcher?","u":"/docs/faq","h":"#what-is-gpt-researcher","p":53},{"i":59,"t":"How much does each research run cost?","u":"/docs/faq","h":"#how-much-does-each-research-run-cost","p":53},{"i":61,"t":"How do you ensure the report is factual and accurate?","u":"/docs/faq","h":"#how-do-you-ensure-the-report-is-factual-and-accurate","p":53},{"i":63,"t":"What are your plans for the future?","u":"/docs/faq","h":"#what-are-your-plans-for-the-future","p":53},{"i":67,"t":"Just Local Docs","u":"/docs/gpt-researcher/context/local-docs","h":"#just-local-docs","p":65},{"i":69,"t":"Local Docs + Web (Hybrid)","u":"/docs/gpt-researcher/context/local-docs","h":"#local-docs--web-hybrid","p":65},{"i":73,"t":"Introducing the GPT Researcher Multi-Agent Assistant","u":"/blog/gptr-langgraph","h":"","p":71},{"i":74,"t":"Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents","u":"/blog/gptr-langgraph","h":"#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents","p":71},{"i":76,"t":"Introducing LangGraph","u":"/blog/gptr-langgraph","h":"#introducing-langgraph","p":71},{"i":78,"t":"Building the Ultimate Autonomous Research Agent","u":"/blog/gptr-langgraph","h":"#building-the-ultimate-autonomous-research-agent","p":71},{"i":80,"t":"The Research Agent Team","u":"/blog/gptr-langgraph","h":"#the-research-agent-team","p":71},{"i":82,"t":"Architecture","u":"/blog/gptr-langgraph","h":"#architecture","p":71},{"i":84,"t":"Define the Graph State","u":"/blog/gptr-langgraph","h":"#define-the-graph-state","p":71},{"i":86,"t":"A Graph within a Graph to support stateful Parallelization","u":"/blog/gptr-langgraph","h":"#a-graph-within-a-graph-to-support-stateful-parallelization","p":71},{"i":88,"t":"What’s Next?","u":"/blog/gptr-langgraph","h":"#whats-next","p":71},{"i":92,"t":"Research on Specific Sources 📚","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-specific-sources-","p":90},{"i":94,"t":"Specify Agent Prompt 📝","u":"/docs/gpt-researcher/context/tailored-research","h":"#specify-agent-prompt-","p":90},{"i":96,"t":"Research on Local Documents 📄","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-local-documents-","p":90},{"i":98,"t":"Hybrid Research 🔄","u":"/docs/gpt-researcher/context/tailored-research","h":"#hybrid-research-","p":90},{"i":100,"t":"Research on LangChain Documents 🦜️🔗","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-langchain-documents-️","p":90},{"i":104,"t":"NextJS Frontend App","u":"/docs/gpt-researcher/frontend/frontend","h":"#nextjs-frontend-app","p":102},{"i":106,"t":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/frontend/frontend","h":"#run-the-nextjs-react-app-with-docker","p":102},{"i":108,"t":"Other Options: 1: Static Frontend (FastAPI)","u":"/docs/gpt-researcher/frontend/frontend","h":"#other-options-1-static-frontend-fastapi","p":102},{"i":110,"t":"Yet Another Option: Running NextJS Frontend via CLI","u":"/docs/gpt-researcher/frontend/frontend","h":"#yet-another-option-running-nextjs-frontend-via-cli","p":102},{"i":112,"t":"Choosing an Option","u":"/docs/gpt-researcher/frontend/frontend","h":"#choosing-an-option","p":102},{"i":114,"t":"Frontend Features","u":"/docs/gpt-researcher/frontend/frontend","h":"#frontend-features","p":102},{"i":118,"t":"Introduction","u":"/docs/examples/hybrid_research","h":"#introduction","p":116},{"i":120,"t":"Prerequisites","u":"/docs/examples/hybrid_research","h":"#prerequisites","p":116},{"i":122,"t":"Installation","u":"/docs/examples/hybrid_research","h":"#installation","p":116},{"i":124,"t":"Setting Up the Environment","u":"/docs/examples/hybrid_research","h":"#setting-up-the-environment","p":116},{"i":126,"t":"Preparing Documents","u":"/docs/examples/hybrid_research","h":"#preparing-documents","p":116},{"i":127,"t":"1. Local Documents","u":"/docs/examples/hybrid_research","h":"#1-local-documents","p":116},{"i":129,"t":"2. Online Documents","u":"/docs/examples/hybrid_research","h":"#2-online-documents","p":116},{"i":131,"t":"Running Hybrid Research By \"Local Documents\"","u":"/docs/examples/hybrid_research","h":"#running-hybrid-research-by-local-documents","p":116},{"i":133,"t":"Running Hybrid Research By \"Online Documents\"","u":"/docs/examples/hybrid_research","h":"#running-hybrid-research-by-online-documents","p":116},{"i":135,"t":"Understanding the Results","u":"/docs/examples/hybrid_research","h":"#understanding-the-results","p":116},{"i":137,"t":"Troubleshooting","u":"/docs/examples/hybrid_research","h":"#troubleshooting","p":116},{"i":139,"t":"FAQ","u":"/docs/examples/hybrid_research","h":"#faq","p":116},{"i":143,"t":"Inspecting Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#inspecting-webhooks","p":141},{"i":145,"t":"Am I polling the right URL?","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#am-i-polling-the-right-url","p":141},{"i":149,"t":"Faiss","u":"/docs/gpt-researcher/context/vector-stores","h":"#faiss","p":147},{"i":151,"t":"PGVector","u":"/docs/gpt-researcher/context/vector-stores","h":"#pgvector","p":147},{"i":153,"t":"Adding Scraped Data to your vector store","u":"/docs/gpt-researcher/context/vector-stores","h":"#adding-scraped-data-to-your-vector-store","p":147},{"i":157,"t":"Log File Overview","u":"/docs/gpt-researcher/frontend/logs","h":"#log-file-overview","p":155},{"i":159,"t":"Key Components:","u":"/docs/gpt-researcher/frontend/logs","h":"#key-components","p":155},{"i":161,"t":"Types of Events & Their Significance","u":"/docs/gpt-researcher/frontend/logs","h":"#types-of-events--their-significance","p":155},{"i":163,"t":"How to Use the Logs","u":"/docs/gpt-researcher/frontend/logs","h":"#how-to-use-the-logs","p":155},{"i":165,"t":"Example Usage","u":"/docs/gpt-researcher/frontend/logs","h":"#example-usage","p":155},{"i":167,"t":"Logs for Developers","u":"/docs/gpt-researcher/frontend/logs","h":"#logs-for-developers","p":155},{"i":169,"t":"Basic Log File (.log)","u":"/docs/gpt-researcher/frontend/logs","h":"#basic-log-file-log","p":155},{"i":171,"t":"JSON Log File (.json)","u":"/docs/gpt-researcher/frontend/logs","h":"#json-log-file-json","p":155},{"i":175,"t":"Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#quickstart","p":173},{"i":177,"t":"Using Virtual Environment or Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#using-virtual-environment-or-poetry","p":173},{"i":179,"t":"Virtual Environment","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#virtual-environment","p":173},{"i":181,"t":"Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#poetry","p":173},{"i":183,"t":"Run the app","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#run-the-app","p":173},{"i":187,"t":"Installation","u":"/docs/gpt-researcher/getting-started/cli","h":"#installation","p":185},{"i":189,"t":"Usage","u":"/docs/gpt-researcher/getting-started/cli","h":"#usage","p":185},{"i":191,"t":"Arguments","u":"/docs/gpt-researcher/getting-started/cli","h":"#arguments","p":185},{"i":193,"t":"Examples","u":"/docs/gpt-researcher/getting-started/cli","h":"#examples","p":185},{"i":195,"t":"Output","u":"/docs/gpt-researcher/getting-started/cli","h":"#output","p":185},{"i":197,"t":"Note","u":"/docs/gpt-researcher/getting-started/cli","h":"#note","p":185},{"i":203,"t":"Why GPT Researcher?","u":"/docs/gpt-researcher/getting-started/introduction","h":"#why-gpt-researcher","p":201},{"i":205,"t":"Architecture","u":"/docs/gpt-researcher/getting-started/introduction","h":"#architecture","p":201},{"i":207,"t":"Demo","u":"/docs/gpt-researcher/getting-started/introduction","h":"#demo","p":201},{"i":208,"t":"Tutorials","u":"/docs/gpt-researcher/getting-started/introduction","h":"#tutorials","p":201},{"i":210,"t":"Features","u":"/docs/gpt-researcher/getting-started/introduction","h":"#features","p":201},{"i":214,"t":"Options","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#options","p":212},{"i":216,"t":"Usage Options","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#usage-options","p":212},{"i":217,"t":"1. PIP Package","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#1-pip-package","p":212},{"i":219,"t":"2. End-to-End Application","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#2-end-to-end-application","p":212},{"i":221,"t":"3. Multi Agent System with LangGraph","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#3-multi-agent-system-with-langgraph","p":212},{"i":223,"t":"Comparison Table","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#comparison-table","p":212},{"i":225,"t":"Deep Dive","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#deep-dive","p":212},{"i":227,"t":"Versioning and Updates","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#versioning-and-updates","p":212},{"i":229,"t":"Troubleshooting and FAQs","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#troubleshooting-and-faqs","p":212},{"i":233,"t":"Server Requirements","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#server-requirements","p":231},{"i":235,"t":"Deployment Steps","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#deployment-steps","p":231},{"i":237,"t":"Step 1: Update the System","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#step-1-update-the-system","p":231},{"i":238,"t":"First, ensure your package index is up-to-date:","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#first-ensure-your-package-index-is-up-to-date","p":231},{"i":242,"t":"Automated Testing with Github Actions","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#automated-testing-with-github-actions","p":240},{"i":244,"t":"Running the Tests","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#running-the-tests","p":240},{"i":246,"t":"Via a docker command","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-docker-command","p":240},{"i":248,"t":"Via a Github Action","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-github-action","p":240},{"i":252,"t":"Example: Azure OpenAI Configuration","u":"/docs/gpt-researcher/gptr/config","h":"#example-azure-openai-configuration","p":250},{"i":260,"t":"Steps to Install GPT Researcher","u":"/docs/gpt-researcher/gptr/pip-package","h":"#steps-to-install-gpt-researcher","p":258},{"i":262,"t":"Example Usage","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-usage","p":258},{"i":264,"t":"Specific Examples","u":"/docs/gpt-researcher/gptr/pip-package","h":"#specific-examples","p":258},{"i":265,"t":"Example 1: Research Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-1-research-report","p":258},{"i":267,"t":"Example 2: Resource Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-2-resource-report","p":258},{"i":269,"t":"Example 3: Outline Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-3-outline-report","p":258},{"i":271,"t":"Integration with Web Frameworks","u":"/docs/gpt-researcher/gptr/pip-package","h":"#integration-with-web-frameworks","p":258},{"i":272,"t":"FastAPI Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#fastapi-example","p":258},{"i":274,"t":"Flask Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#flask-example","p":258},{"i":276,"t":"Getters and Setters","u":"/docs/gpt-researcher/gptr/pip-package","h":"#getters-and-setters","p":258},{"i":278,"t":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources","p":258},{"i":280,"t":"Get Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-context","p":258},{"i":282,"t":"Get Research Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-costs","p":258},{"i":284,"t":"Get Research Images","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-images","p":258},{"i":286,"t":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources-1","p":258},{"i":288,"t":"Set Verbose","u":"/docs/gpt-researcher/gptr/pip-package","h":"#set-verbose","p":258},{"i":290,"t":"Add Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#add-costs","p":258},{"i":292,"t":"Advanced Usage","u":"/docs/gpt-researcher/gptr/pip-package","h":"#advanced-usage","p":258},{"i":293,"t":"Customizing the Research Process","u":"/docs/gpt-researcher/gptr/pip-package","h":"#customizing-the-research-process","p":258},{"i":295,"t":"Handling Research Results","u":"/docs/gpt-researcher/gptr/pip-package","h":"#handling-research-results","p":258},{"i":297,"t":"Working with Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#working-with-research-context","p":258},{"i":301,"t":"Configuring Scraping Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#configuring-scraping-method","p":299},{"i":303,"t":"Scraping Methods Explained","u":"/docs/gpt-researcher/gptr/scraping","h":"#scraping-methods-explained","p":299},{"i":304,"t":"BeautifulSoup (Static Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#beautifulsoup-static-scraping","p":299},{"i":306,"t":"Selenium (Browser Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#selenium-browser-scraping","p":299},{"i":308,"t":"Additional Setup for Selenium","u":"/docs/gpt-researcher/gptr/scraping","h":"#additional-setup-for-selenium","p":299},{"i":310,"t":"Choosing the Right Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#choosing-the-right-method","p":299},{"i":312,"t":"Troubleshooting","u":"/docs/gpt-researcher/gptr/scraping","h":"#troubleshooting","p":299},{"i":316,"t":"Introduction","u":"/docs/gpt-researcher/gptr/querying-the-backend","h":"#introduction","p":314},{"i":320,"t":"model: gpt-4 does not exist","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#model-gpt-4-does-not-exist","p":318},{"i":322,"t":"cannot load library 'gobject-2.0-0'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-gobject-20-0","p":318},{"i":324,"t":"cannot load library 'pango'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-pango","p":318},{"i":326,"t":"Error processing the url","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#error-processing-the-url","p":318},{"i":328,"t":"Chrome version issues","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#chrome-version-issues","p":318},{"i":334,"t":"OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#openai","p":332},{"i":336,"t":"Custom LLM","u":"/docs/gpt-researcher/llms/llms","h":"#custom-llm","p":332},{"i":338,"t":"Azure OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#azure-openai","p":332},{"i":340,"t":"Ollama","u":"/docs/gpt-researcher/llms/llms","h":"#ollama","p":332},{"i":342,"t":"Groq","u":"/docs/gpt-researcher/llms/llms","h":"#groq","p":332},{"i":344,"t":"Sign up","u":"/docs/gpt-researcher/llms/llms","h":"#sign-up","p":332},{"i":346,"t":"Update env vars","u":"/docs/gpt-researcher/llms/llms","h":"#update-env-vars","p":332},{"i":348,"t":"Anthropic","u":"/docs/gpt-researcher/llms/llms","h":"#anthropic","p":332},{"i":350,"t":"Mistral AI","u":"/docs/gpt-researcher/llms/llms","h":"#mistral-ai","p":332},{"i":352,"t":"Together AI","u":"/docs/gpt-researcher/llms/llms","h":"#together-ai","p":332},{"i":354,"t":"HuggingFace","u":"/docs/gpt-researcher/llms/llms","h":"#huggingface","p":332},{"i":356,"t":"Google Gemini","u":"/docs/gpt-researcher/llms/llms","h":"#google-gemini","p":332},{"i":358,"t":"Google VertexAI","u":"/docs/gpt-researcher/llms/llms","h":"#google-vertexai","p":332},{"i":360,"t":"Cohere","u":"/docs/gpt-researcher/llms/llms","h":"#cohere","p":332},{"i":362,"t":"Fireworks","u":"/docs/gpt-researcher/llms/llms","h":"#fireworks","p":332},{"i":364,"t":"Bedrock","u":"/docs/gpt-researcher/llms/llms","h":"#bedrock","p":332},{"i":366,"t":"xAI","u":"/docs/gpt-researcher/llms/llms","h":"#xai","p":332},{"i":368,"t":"Other Embedding Models","u":"/docs/gpt-researcher/llms/llms","h":"#other-embedding-models","p":332},{"i":369,"t":"Nomic","u":"/docs/gpt-researcher/llms/llms","h":"#nomic","p":332},{"i":371,"t":"VoyageAI","u":"/docs/gpt-researcher/llms/llms","h":"#voyageai","p":332},{"i":377,"t":"Fetching the Desired LLM Models","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#fetching-the-desired-llm-models","p":375},{"i":379,"t":"Querying your Custom LLM with GPT-Researcher","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#querying-your-custom-llm-with-gpt-researcher","p":375},{"i":381,"t":"Run LLM Test Script for GPTR","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#run-llm-test-script-for-gptr","p":375},{"i":383,"t":"Deploy Ollama on Elestio","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#deploy-ollama-on-elestio","p":375},{"i":387,"t":"Web Search Engines","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#web-search-engines","p":385},{"i":389,"t":"Custom Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#custom-retrievers","p":385},{"i":391,"t":"Example","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#example","p":385},{"i":393,"t":"Response Format","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#response-format","p":385},{"i":397,"t":"Config Objects","u":"/docs/reference/config/config","h":"#config-objects","p":395},{"i":399,"t":"APIKeyError Objects","u":"/docs/reference/config/config","h":"#apikeyerror-objects","p":395},{"i":403,"t":"Singleton Objects","u":"/docs/reference/config/singleton","h":"#singleton-objects","p":401},{"i":405,"t":"AbstractSingleton Objects","u":"/docs/reference/config/singleton","h":"#abstractsingleton-objects","p":401},{"i":411,"t":"Use case","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#use-case","p":409},{"i":413,"t":"The Multi Agent Team","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#the-multi-agent-team","p":409},{"i":415,"t":"How it works","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-it-works","p":409},{"i":417,"t":"Architecture","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#architecture","p":409},{"i":418,"t":"Steps","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#steps","p":409},{"i":420,"t":"How to run","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-to-run","p":409},{"i":422,"t":"Usage","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#usage","p":409},{"i":424,"t":"To Deploy","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#to-deploy","p":409},{"i":426,"t":"NextJS Frontend App","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#nextjs-frontend-app","p":409},{"i":428,"t":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-docker","p":409},{"i":430,"t":"Run the NextJS React App with NPM","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-npm","p":409},{"i":438,"t":"GPT Researcher","u":"/docs/welcome","h":"#gpt-researcher","p":436}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/4",[0,3.493,1,3.493,2,3.493,3,3.493,4,2.696]],["t/6",[4,3.044,5,3.944,6,2.88,7,3.944]],["t/8",[8,3.944,9,3.044,10,1.45,11,3.044]],["t/10",[10,1.665,12,4.048,13,3.306]],["t/12",[12,4.751,14,4.102]],["t/14",[15,5.315,16,5.315]],["t/18",[10,1.45,17,2.626,18,3.044,19,3.944]],["t/20",[10,1.45,17,2.626,20,3.25,21,3.25]],["t/22",[11,3.044,22,2.743,23,2.523,24,3.526]],["t/24",[10,1.932,25,3.493,26,2.696,27,2.154]],["t/26",[10,1.932,17,2.326,27,2.154,28,1.899]],["t/28",[29,5.751]],["t/32",[30,5.751]],["t/34",[31,4.751,32,4.38]],["t/36",[33,5.315,34,5.315]],["t/37",[35,6.434]],["t/39",[18,4.966]],["t/41",[36,3.539,37,2.975]],["t/43",[29,5.751]],["t/51",[28,2.462,38,4.048,39,3.731]],["t/55",[40,6.434]],["t/57",[10,1.954,27,3.278]],["t/59",[10,1.284,28,1.899,41,3.493,42,3.493,43,2.879]],["t/61",[13,2.88,44,3.526,45,3.944,46,3.944]],["t/63",[47,5.315,48,5.315]],["t/67",[22,3.697,49,4.751]],["t/69",[17,2.326,22,2.43,26,2.696,49,3.123,50,2.326]],["t/73",[10,1.153,21,2.583,27,1.933,51,2.803,52,2.583,53,2.087]],["t/74",[10,0.762,20,1.708,21,1.708,53,1.38,54,2.073,55,1.853,56,1.6,57,1.708,58,1.708,59,2.073,60,1.708]],["t/76",[51,4.751,57,4.38]],["t/78",[10,1.284,20,2.879,53,2.326,55,3.123,61,3.493]],["t/80",[10,1.665,53,3.015,58,3.731]],["t/82",[14,4.966]],["t/84",[62,4.528,63,4.048,64,4.048]],["t/86",[63,4.325,64,2.803,65,3.135,66,3.135,67,3.135]],["t/88",[68,5.315,69,5.315]],["t/92",[10,1.45,50,2.626,70,3.526,71,3.25]],["t/94",[50,2.626,53,2.626,72,3.944,73,3.944]],["t/96",[10,1.45,22,2.743,23,2.523,50,2.626]],["t/98",[10,1.665,17,3.015,50,3.015]],["t/100",[10,1.45,23,2.523,24,3.526,50,2.626]],["t/104",[74,3.149,75,3.306,76,3.149]],["t/106",[28,1.899,74,2.43,76,2.43,77,2.879,78,2.879]],["t/108",[75,2.551,79,2.551,80,2.551,81,3.123,82,3.123]],["t/110",[28,1.546,74,1.978,75,2.076,79,2.076,83,2.844,84,2.343,85,2.844]],["t/112",[79,3.881,86,4.751]],["t/114",[32,4.38,75,3.881]],["t/118",[87,5.751]],["t/120",[88,6.434]],["t/122",[89,5.302]],["t/124",[9,3.495,90,4.048,91,3.731]],["t/126",[23,3.4,92,5.315]],["t/127",[22,3.149,23,2.897,80,3.306]],["t/129",[23,2.897,93,3.731,94,4.048]],["t/131",[10,1.284,17,2.326,22,2.43,23,2.235,28,1.899]],["t/133",[10,1.284,17,2.326,23,2.235,28,1.899,94,3.123]],["t/135",[4,4.102,95,5.315]],["t/137",[96,5.302]],["t/139",[97,5.751]],["t/143",[98,5.315,99,5.315]],["t/145",[100,4.528,101,4.048,102,4.048]],["t/149",[103,6.434]],["t/151",[104,6.434]],["t/153",[105,3.493,106,2.551,107,3.493,108,3.493,109,3.493]],["t/157",[30,4.048,110,3.306,111,3.731]],["t/159",[31,4.751,112,5.315]],["t/161",[50,2.626,113,3.944,114,3.944,115,3.944]],["t/163",[56,4.102,110,3.881]],["t/165",[36,3.539,37,2.975]],["t/167",[110,3.881,116,5.315]],["t/169",[110,4.197,111,3.25,117,3.944]],["t/171",[110,2.88,111,3.25,118,5.748]],["t/175",[119,6.434]],["t/177",[56,3.044,91,3.25,120,3.526,121,3.526]],["t/179",[91,4.38,120,4.751]],["t/181",[121,5.751]],["t/183",[28,2.89,76,3.697]],["t/187",[89,5.302]],["t/189",[36,4.283]],["t/191",[122,6.434]],["t/193",[37,3.601]],["t/195",[123,6.434]],["t/197",[124,6.434]],["t/203",[10,1.954,27,3.278]],["t/205",[14,4.966]],["t/207",[125,6.434]],["t/208",[126,6.434]],["t/210",[32,5.302]],["t/214",[79,4.698]],["t/216",[36,3.539,79,3.881]],["t/217",[38,4.048,39,3.731,80,3.306]],["t/219",[93,3.25,127,5.748,128,3.944]],["t/221",[52,2.879,53,2.326,57,2.879,129,3.123,130,3.123]],["t/223",[131,5.315,132,5.315]],["t/225",[133,5.315,134,5.315]],["t/227",[135,4.751,136,4.38]],["t/229",[96,4.38,97,4.751]],["t/233",[137,5.315,138,5.315]],["t/235",[139,4.38,140,4.102]],["t/237",[80,2.88,130,3.526,136,3.25,140,3.044]],["t/238",[9,2.42,39,2.583,44,2.803,141,3.135,142,3.135,143,3.135]],["t/242",[144,3.944,145,3.25,146,3.526,147,3.526]],["t/244",[28,2.89,145,4.38]],["t/246",[78,3.731,84,3.731,148,4.528]],["t/248",[84,3.731,146,4.048,147,4.048]],["t/252",[37,2.207,149,3.526,150,3.25,151,3.526]],["t/260",[10,1.45,27,2.432,89,3.25,140,3.044]],["t/262",[36,3.539,37,2.975]],["t/264",[37,2.975,70,4.751]],["t/265",[10,1.45,13,2.88,37,2.207,80,2.88]],["t/267",[13,2.88,37,2.207,93,3.25,152,3.944]],["t/269",[13,2.88,37,2.207,129,3.526,153,3.944]],["t/271",[26,3.495,154,4.528,155,4.528]],["t/272",[37,2.975,82,4.751]],["t/274",[37,2.975,156,5.315]],["t/276",[157,5.315,158,5.315]],["t/278",[10,1.954,71,4.38]],["t/280",[10,1.954,159,4.751]],["t/282",[10,1.954,43,4.38]],["t/284",[10,1.954,160,5.315]],["t/286",[10,1.954,71,4.38]],["t/288",[90,4.751,161,5.315]],["t/290",[43,4.38,162,5.315]],["t/292",[36,3.539,163,5.315]],["t/293",[10,1.665,11,3.495,164,3.495]],["t/295",[4,3.495,10,1.665,165,4.528]],["t/297",[10,1.665,18,3.495,159,4.048]],["t/301",[106,3.306,151,4.048,166,3.731]],["t/303",[106,3.306,166,3.731,167,4.528]],["t/304",[81,4.048,106,3.306,168,4.528]],["t/306",[106,3.306,169,4.048,170,4.528]],["t/308",[169,4.048,171,4.528,172,4.528]],["t/310",[86,4.048,101,4.048,166,3.731]],["t/312",[96,5.302]],["t/316",[87,5.751]],["t/320",[27,2.432,173,3.25,174,3.944,175,3.944]],["t/322",[176,3.123,177,3.123,178,3.493,179,3.493,180,3.493]],["t/324",[176,4.048,177,4.048,181,4.528]],["t/326",[11,3.495,102,4.048,182,4.528]],["t/328",[135,4.048,183,4.528,184,4.528]],["t/334",[150,5.302]],["t/336",[164,4.102,185,4.102]],["t/338",[149,4.751,150,4.38]],["t/340",[186,5.751]],["t/342",[187,6.434]],["t/344",[9,4.102,188,5.315]],["t/346",[136,3.731,189,4.528,190,4.528]],["t/348",[191,6.434]],["t/350",[60,4.38,192,5.315]],["t/352",[60,4.38,193,5.315]],["t/354",[194,6.434]],["t/356",[195,4.751,196,5.315]],["t/358",[195,4.751,197,5.315]],["t/360",[198,6.434]],["t/362",[199,6.434]],["t/364",[200,6.434]],["t/366",[201,6.434]],["t/368",[173,4.38,202,5.315]],["t/369",[203,6.434]],["t/371",[204,6.434]],["t/377",[173,3.25,185,3.044,205,3.944,206,3.944]],["t/379",[10,1.284,27,2.154,164,2.696,185,2.696,207,3.493]],["t/381",[28,1.899,145,2.879,185,2.696,208,3.493,209,3.493]],["t/383",[139,3.731,186,4.048,210,4.528]],["t/387",[26,3.495,211,4.528,212,4.528]],["t/389",[164,4.102,213,5.315]],["t/391",[37,3.601]],["t/393",[214,5.315,215,5.315]],["t/397",[6,3.881,216,5.315]],["t/399",[6,3.881,217,5.315]],["t/403",[6,3.881,218,5.315]],["t/405",[6,3.881,219,5.315]],["t/411",[56,4.102,220,5.315]],["t/413",[52,3.731,53,3.015,58,3.731]],["t/415",[18,4.966]],["t/417",[14,4.966]],["t/418",[140,4.966]],["t/420",[28,3.498]],["t/422",[36,4.283]],["t/424",[139,5.302]],["t/426",[74,3.149,75,3.306,76,3.149]],["t/428",[28,1.899,74,2.43,76,2.43,77,2.879,78,2.879]],["t/430",[28,1.899,74,2.43,76,2.43,77,2.879,221,3.493]],["t/438",[10,1.954,27,3.278]]],"invertedIndex":[["",{"_index":50,"t":{"69":{"position":[[11,1]]},"92":{"position":[[29,2]]},"94":{"position":[[21,2]]},"96":{"position":[[28,2]]},"98":{"position":[[16,2]]},"100":{"position":[[32,5]]},"161":{"position":[[16,1]]}}}],["0",{"_index":180,"t":{"322":{"position":[[33,2]]}}}],["1",{"_index":80,"t":{"108":{"position":[[15,2]]},"127":{"position":[[0,2]]},"217":{"position":[[0,2]]},"237":{"position":[[5,2]]},"265":{"position":[[8,2]]}}}],["2",{"_index":93,"t":{"129":{"position":[[0,2]]},"219":{"position":[[0,2]]},"267":{"position":[[8,2]]}}}],["2.0",{"_index":179,"t":{"322":{"position":[[29,3]]}}}],["3",{"_index":129,"t":{"221":{"position":[[0,2]]},"269":{"position":[[8,2]]}}}],["4",{"_index":174,"t":{"320":{"position":[[11,1]]}}}],["abstractsingleton",{"_index":219,"t":{"405":{"position":[[0,17]]}}}],["accur",{"_index":46,"t":{"61":{"position":[[44,9]]}}}],["action",{"_index":147,"t":{"242":{"position":[[30,7]]},"248":{"position":[[13,6]]}}}],["ad",{"_index":105,"t":{"153":{"position":[[0,6]]}}}],["add",{"_index":162,"t":{"290":{"position":[[0,3]]}}}],["addit",{"_index":171,"t":{"308":{"position":[[0,10]]}}}],["advanc",{"_index":163,"t":{"292":{"position":[[0,8]]}}}],["agent",{"_index":53,"t":{"73":{"position":[[37,5]]},"74":{"position":[[98,6]]},"78":{"position":[[42,5]]},"80":{"position":[[13,5]]},"94":{"position":[[8,5]]},"221":{"position":[[9,5]]},"413":{"position":[[10,5]]}}}],["ai",{"_index":60,"t":{"74":{"position":[[95,2]]},"350":{"position":[[8,2]]},"352":{"position":[[9,2]]}}}],["aim",{"_index":5,"t":{"6":{"position":[[0,6]]}}}],["anoth",{"_index":83,"t":{"110":{"position":[[4,7]]}}}],["anthrop",{"_index":191,"t":{"348":{"position":[[0,9]]}}}],["apikeyerror",{"_index":217,"t":{"399":{"position":[[0,11]]}}}],["app",{"_index":76,"t":{"104":{"position":[[16,3]]},"106":{"position":[[21,3]]},"183":{"position":[[8,3]]},"426":{"position":[[16,3]]},"428":{"position":[[21,3]]},"430":{"position":[[21,3]]}}}],["applic",{"_index":128,"t":{"219":{"position":[[14,11]]}}}],["architectur",{"_index":14,"t":{"12":{"position":[[10,12]]},"82":{"position":[[0,12]]},"205":{"position":[[0,12]]},"417":{"position":[[0,12]]}}}],["argument",{"_index":122,"t":{"191":{"position":[[0,9]]}}}],["assist",{"_index":21,"t":{"20":{"position":[[29,9]]},"73":{"position":[[43,9]]},"74":{"position":[[42,9]]}}}],["autom",{"_index":144,"t":{"242":{"position":[[0,9]]}}}],["autonom",{"_index":55,"t":{"74":{"position":[[22,10]]},"78":{"position":[[22,10]]}}}],["azur",{"_index":149,"t":{"252":{"position":[[9,5]]},"338":{"position":[[0,5]]}}}],["basic",{"_index":117,"t":{"169":{"position":[[0,5]]}}}],["beautifulsoup",{"_index":168,"t":{"304":{"position":[[0,13]]}}}],["bedrock",{"_index":200,"t":{"364":{"position":[[0,7]]}}}],["better",{"_index":19,"t":{"18":{"position":[[26,6]]}}}],["browser",{"_index":170,"t":{"306":{"position":[[9,8]]}}}],["build",{"_index":20,"t":{"20":{"position":[[0,8]]},"74":{"position":[[13,5]]},"78":{"position":[[0,8]]}}}],["case",{"_index":220,"t":{"411":{"position":[[4,4]]}}}],["choos",{"_index":86,"t":{"112":{"position":[[0,8]]},"310":{"position":[[0,8]]}}}],["chrome",{"_index":183,"t":{"328":{"position":[[0,6]]}}}],["class",{"_index":33,"t":{"36":{"position":[[0,5]]}}}],["cli",{"_index":85,"t":{"110":{"position":[[48,3]]}}}],["coher",{"_index":198,"t":{"360":{"position":[[0,6]]}}}],["command",{"_index":148,"t":{"246":{"position":[[13,7]]}}}],["comparison",{"_index":131,"t":{"223":{"position":[[0,10]]}}}],["compon",{"_index":112,"t":{"159":{"position":[[4,11]]}}}],["conclus",{"_index":29,"t":{"28":{"position":[[0,10]]},"43":{"position":[[0,10]]}}}],["conduct",{"_index":25,"t":{"24":{"position":[[0,10]]}}}],["config",{"_index":216,"t":{"397":{"position":[[0,6]]}}}],["configur",{"_index":151,"t":{"252":{"position":[[22,13]]},"301":{"position":[[0,11]]}}}],["context",{"_index":159,"t":{"280":{"position":[[13,7]]},"297":{"position":[[22,7]]}}}],["cost",{"_index":43,"t":{"59":{"position":[[32,5]]},"282":{"position":[[13,5]]},"290":{"position":[[4,5]]}}}],["custom",{"_index":164,"t":{"293":{"position":[[0,11]]},"336":{"position":[[0,6]]},"379":{"position":[[14,6]]},"389":{"position":[[0,6]]}}}],["data",{"_index":107,"t":{"153":{"position":[[15,4]]}}}],["date",{"_index":143,"t":{"238":{"position":[[42,5]]}}}],["deep",{"_index":133,"t":{"225":{"position":[[0,4]]}}}],["defin",{"_index":62,"t":{"84":{"position":[[0,6]]}}}],["demo",{"_index":125,"t":{"207":{"position":[[0,4]]}}}],["deploy",{"_index":139,"t":{"235":{"position":[[0,10]]},"383":{"position":[[0,6]]},"424":{"position":[[3,6]]}}}],["desir",{"_index":206,"t":{"377":{"position":[[13,7]]}}}],["determinist",{"_index":3,"t":{"4":{"position":[[30,13]]}}}],["develop",{"_index":116,"t":{"167":{"position":[[9,10]]}}}],["dive",{"_index":134,"t":{"225":{"position":[[5,4]]}}}],["doc",{"_index":49,"t":{"67":{"position":[[11,4]]},"69":{"position":[[6,4]]}}}],["docker",{"_index":78,"t":{"106":{"position":[[30,6]]},"246":{"position":[[6,6]]},"428":{"position":[[30,6]]}}}],["document",{"_index":23,"t":{"22":{"position":[[17,9]]},"96":{"position":[[18,9]]},"100":{"position":[[22,9]]},"126":{"position":[[10,9]]},"127":{"position":[[9,9]]},"129":{"position":[[10,9]]},"131":{"position":[[34,10]]},"133":{"position":[[35,10]]}}}],["each",{"_index":42,"t":{"59":{"position":[[14,4]]}}}],["elestio",{"_index":210,"t":{"383":{"position":[[17,7]]}}}],["embed",{"_index":202,"t":{"368":{"position":[[6,9]]}}}],["end",{"_index":127,"t":{"219":{"position":[[3,3],[10,3]]}}}],["engin",{"_index":212,"t":{"387":{"position":[[11,7]]}}}],["ensur",{"_index":44,"t":{"61":{"position":[[11,6]]},"238":{"position":[[7,6]]}}}],["env",{"_index":189,"t":{"346":{"position":[[7,3]]}}}],["environ",{"_index":91,"t":{"124":{"position":[[15,11]]},"177":{"position":[[14,11]]},"179":{"position":[[8,11]]}}}],["error",{"_index":182,"t":{"326":{"position":[[0,5]]}}}],["event",{"_index":114,"t":{"161":{"position":[[9,6]]}}}],["exampl",{"_index":37,"t":{"41":{"position":[[6,7]]},"165":{"position":[[0,7]]},"193":{"position":[[0,8]]},"252":{"position":[[0,8]]},"262":{"position":[[0,7]]},"264":{"position":[[9,8]]},"265":{"position":[[0,7]]},"267":{"position":[[0,7]]},"269":{"position":[[0,7]]},"272":{"position":[[8,7]]},"274":{"position":[[6,7]]},"391":{"position":[[0,7]]}}}],["exist",{"_index":175,"t":{"320":{"position":[[22,5]]}}}],["explain",{"_index":167,"t":{"303":{"position":[[17,9]]}}}],["factual",{"_index":45,"t":{"61":{"position":[[32,7]]}}}],["faiss",{"_index":103,"t":{"149":{"position":[[0,5]]}}}],["faq",{"_index":97,"t":{"139":{"position":[[0,3]]},"229":{"position":[[20,4]]}}}],["fastapi",{"_index":82,"t":{"108":{"position":[[34,9]]},"272":{"position":[[0,7]]}}}],["featur",{"_index":32,"t":{"34":{"position":[[4,8]]},"114":{"position":[[9,8]]},"210":{"position":[[0,8]]}}}],["fetch",{"_index":205,"t":{"377":{"position":[[0,8]]}}}],["file",{"_index":111,"t":{"157":{"position":[[4,4]]},"169":{"position":[[10,4]]},"171":{"position":[[9,4]]}}}],["final",{"_index":12,"t":{"10":{"position":[[0,10]]},"12":{"position":[[4,5]]}}}],["firework",{"_index":199,"t":{"362":{"position":[[0,9]]}}}],["first",{"_index":141,"t":{"238":{"position":[[0,6]]}}}],["flask",{"_index":156,"t":{"274":{"position":[[0,5]]}}}],["format",{"_index":215,"t":{"393":{"position":[[9,6]]}}}],["forward",{"_index":16,"t":{"14":{"position":[[6,7]]}}}],["framework",{"_index":155,"t":{"271":{"position":[[21,10]]}}}],["frontend",{"_index":75,"t":{"104":{"position":[[7,8]]},"108":{"position":[[25,8]]},"110":{"position":[[35,8]]},"114":{"position":[[0,8]]},"426":{"position":[[7,8]]}}}],["futur",{"_index":48,"t":{"63":{"position":[[28,7]]}}}],["gemini",{"_index":196,"t":{"356":{"position":[[7,6]]}}}],["getter",{"_index":157,"t":{"276":{"position":[[0,7]]}}}],["github",{"_index":146,"t":{"242":{"position":[[23,6]]},"248":{"position":[[6,6]]}}}],["go",{"_index":15,"t":{"14":{"position":[[0,5]]}}}],["gobject",{"_index":178,"t":{"322":{"position":[[20,8]]}}}],["googl",{"_index":195,"t":{"356":{"position":[[0,6]]},"358":{"position":[[0,6]]}}}],["gpt",{"_index":27,"t":{"24":{"position":[[29,3]]},"26":{"position":[[33,3]]},"57":{"position":[[8,3]]},"73":{"position":[[16,3]]},"203":{"position":[[4,3]]},"260":{"position":[[17,3]]},"320":{"position":[[7,3]]},"379":{"position":[[30,3]]},"438":{"position":[[0,3]]}}}],["gptr",{"_index":209,"t":{"381":{"position":[[24,4]]}}}],["graph",{"_index":63,"t":{"84":{"position":[[11,5]]},"86":{"position":[[2,5],[17,5]]}}}],["groq",{"_index":187,"t":{"342":{"position":[[0,4]]}}}],["handl",{"_index":165,"t":{"295":{"position":[[0,8]]}}}],["huggingfac",{"_index":194,"t":{"354":{"position":[[0,11]]}}}],["hybrid",{"_index":17,"t":{"18":{"position":[[4,6]]},"20":{"position":[[13,6]]},"26":{"position":[[12,6]]},"69":{"position":[[17,8]]},"98":{"position":[[0,6]]},"131":{"position":[[8,6]]},"133":{"position":[[8,6]]}}}],["imag",{"_index":160,"t":{"284":{"position":[[13,6]]}}}],["index",{"_index":142,"t":{"238":{"position":[[27,5]]}}}],["infinit",{"_index":1,"t":{"4":{"position":[[12,8]]}}}],["initi",{"_index":35,"t":{"37":{"position":[[0,14]]}}}],["inspect",{"_index":98,"t":{"143":{"position":[[0,10]]}}}],["instal",{"_index":89,"t":{"122":{"position":[[0,12]]},"187":{"position":[[0,12]]},"260":{"position":[[9,7]]}}}],["integr",{"_index":154,"t":{"271":{"position":[[0,11]]}}}],["introduc",{"_index":51,"t":{"73":{"position":[[0,11]]},"76":{"position":[[0,11]]}}}],["introduct",{"_index":87,"t":{"118":{"position":[[0,12]]},"316":{"position":[[0,12]]}}}],["issu",{"_index":184,"t":{"328":{"position":[[15,6]]}}}],["json",{"_index":118,"t":{"171":{"position":[[0,4],[14,7]]}}}],["key",{"_index":31,"t":{"34":{"position":[[0,3]]},"159":{"position":[[0,3]]}}}],["langchain",{"_index":24,"t":{"22":{"position":[[32,9]]},"100":{"position":[[12,9]]}}}],["langgraph",{"_index":57,"t":{"74":{"position":[[58,9]]},"76":{"position":[[12,9]]},"221":{"position":[[27,9]]}}}],["learn",{"_index":54,"t":{"74":{"position":[[0,5]]}}}],["librari",{"_index":177,"t":{"322":{"position":[[12,7]]},"324":{"position":[[12,7]]}}}],["llm",{"_index":185,"t":{"336":{"position":[[7,3]]},"377":{"position":[[21,3]]},"379":{"position":[[21,3]]},"381":{"position":[[4,3]]}}}],["load",{"_index":176,"t":{"322":{"position":[[7,4]]},"324":{"position":[[7,4]]}}}],["local",{"_index":22,"t":{"22":{"position":[[11,5]]},"67":{"position":[[5,5]]},"69":{"position":[[0,5]]},"96":{"position":[[12,5]]},"127":{"position":[[3,5]]},"131":{"position":[[27,6]]}}}],["log",{"_index":110,"t":{"157":{"position":[[0,3]]},"163":{"position":[[15,4]]},"167":{"position":[[0,4]]},"169":{"position":[[6,3],[15,6]]},"171":{"position":[[5,3]]}}}],["loop",{"_index":2,"t":{"4":{"position":[[21,5]]}}}],["method",{"_index":166,"t":{"301":{"position":[[21,6]]},"303":{"position":[[9,7]]},"310":{"position":[[19,6]]}}}],["mistral",{"_index":192,"t":{"350":{"position":[[0,7]]}}}],["model",{"_index":173,"t":{"320":{"position":[[0,6]]},"368":{"position":[[16,6]]},"377":{"position":[[25,6]]}}}],["move",{"_index":0,"t":{"4":{"position":[[0,6]]}}}],["much",{"_index":41,"t":{"59":{"position":[[4,4]]}}}],["multi",{"_index":52,"t":{"73":{"position":[[31,5]]},"221":{"position":[[3,5]]},"413":{"position":[[4,5]]}}}],["next",{"_index":69,"t":{"88":{"position":[[7,5]]}}}],["nextj",{"_index":74,"t":{"104":{"position":[[0,6]]},"106":{"position":[[8,6]]},"110":{"position":[[28,6]]},"426":{"position":[[0,6]]},"428":{"position":[[8,6]]},"430":{"position":[[8,6]]}}}],["nomic",{"_index":203,"t":{"369":{"position":[[0,5]]}}}],["note",{"_index":124,"t":{"197":{"position":[[0,4]]}}}],["npm",{"_index":221,"t":{"430":{"position":[[30,3]]}}}],["object",{"_index":6,"t":{"6":{"position":[[11,9]]},"397":{"position":[[7,7]]},"399":{"position":[[12,7]]},"403":{"position":[[10,7]]},"405":{"position":[[18,7]]}}}],["ollama",{"_index":186,"t":{"340":{"position":[[0,6]]},"383":{"position":[[7,6]]}}}],["onlin",{"_index":94,"t":{"129":{"position":[[3,6]]},"133":{"position":[[27,7]]}}}],["openai",{"_index":150,"t":{"252":{"position":[[15,6]]},"334":{"position":[[0,6]]},"338":{"position":[[6,6]]}}}],["option",{"_index":79,"t":{"108":{"position":[[6,8]]},"110":{"position":[[12,7]]},"112":{"position":[[12,6]]},"214":{"position":[[0,7]]},"216":{"position":[[6,7]]}}}],["outlin",{"_index":153,"t":{"269":{"position":[[11,7]]}}}],["output",{"_index":123,"t":{"195":{"position":[[0,6]]}}}],["overview",{"_index":30,"t":{"32":{"position":[[0,8]]},"157":{"position":[[9,8]]}}}],["packag",{"_index":39,"t":{"51":{"position":[[8,7]]},"217":{"position":[[7,7]]},"238":{"position":[[19,7]]}}}],["pango",{"_index":181,"t":{"324":{"position":[[20,7]]}}}],["parallel",{"_index":67,"t":{"86":{"position":[[43,15]]}}}],["pgvector",{"_index":104,"t":{"151":{"position":[[0,8]]}}}],["pip",{"_index":38,"t":{"51":{"position":[[4,3]]},"217":{"position":[[3,3]]}}}],["plan",{"_index":47,"t":{"63":{"position":[[14,5]]}}}],["poetri",{"_index":121,"t":{"177":{"position":[[29,6]]},"181":{"position":[[0,6]]}}}],["poll",{"_index":100,"t":{"145":{"position":[[5,7]]}}}],["prepar",{"_index":92,"t":{"126":{"position":[[0,9]]}}}],["prerequisit",{"_index":88,"t":{"120":{"position":[[0,13]]}}}],["process",{"_index":11,"t":{"8":{"position":[[25,7]]},"22":{"position":[[0,10]]},"293":{"position":[[25,7]]},"326":{"position":[[6,10]]}}}],["prompt",{"_index":73,"t":{"94":{"position":[[14,6]]}}}],["queri",{"_index":207,"t":{"379":{"position":[[0,8]]}}}],["quickstart",{"_index":119,"t":{"175":{"position":[[0,10]]}}}],["react",{"_index":77,"t":{"106":{"position":[[15,5]]},"428":{"position":[[15,5]]},"430":{"position":[[15,5]]}}}],["report",{"_index":13,"t":{"10":{"position":[[24,6]]},"61":{"position":[[22,6]]},"265":{"position":[[20,6]]},"267":{"position":[[20,6]]},"269":{"position":[[19,6]]}}}],["requir",{"_index":138,"t":{"233":{"position":[[7,12]]}}}],["research",{"_index":10,"t":{"8":{"position":[[16,8]]},"10":{"position":[[15,8]]},"18":{"position":[[11,8]]},"20":{"position":[[20,8]]},"24":{"position":[[15,8],[33,10]]},"26":{"position":[[19,8],[37,10]]},"57":{"position":[[12,11]]},"59":{"position":[[19,8]]},"73":{"position":[[20,10]]},"74":{"position":[[33,8]]},"78":{"position":[[33,8]]},"80":{"position":[[4,8]]},"92":{"position":[[0,8]]},"96":{"position":[[0,8]]},"98":{"position":[[7,8]]},"100":{"position":[[0,8]]},"131":{"position":[[15,8]]},"133":{"position":[[15,8]]},"203":{"position":[[8,11]]},"260":{"position":[[21,10]]},"265":{"position":[[11,8]]},"278":{"position":[[4,8]]},"280":{"position":[[4,8]]},"282":{"position":[[4,8]]},"284":{"position":[[4,8]]},"286":{"position":[[4,8]]},"293":{"position":[[16,8]]},"295":{"position":[[9,8]]},"297":{"position":[[13,8]]},"379":{"position":[[34,10]]},"438":{"position":[[4,10]]}}}],["resourc",{"_index":152,"t":{"267":{"position":[[11,8]]}}}],["respons",{"_index":214,"t":{"393":{"position":[[0,8]]}}}],["result",{"_index":4,"t":{"4":{"position":[[44,7]]},"6":{"position":[[34,7]]},"135":{"position":[[18,7]]},"295":{"position":[[18,7]]}}}],["retriev",{"_index":213,"t":{"389":{"position":[[7,10]]}}}],["right",{"_index":101,"t":{"145":{"position":[[17,5]]},"310":{"position":[[13,5]]}}}],["run",{"_index":28,"t":{"26":{"position":[[0,7]]},"51":{"position":[[0,3]]},"59":{"position":[[28,3]]},"106":{"position":[[0,3]]},"110":{"position":[[20,7]]},"131":{"position":[[0,7]]},"133":{"position":[[0,7]]},"183":{"position":[[0,3]]},"244":{"position":[[0,7]]},"381":{"position":[[0,3]]},"420":{"position":[[7,3]]},"428":{"position":[[0,3]]},"430":{"position":[[0,3]]}}}],["scrape",{"_index":106,"t":{"153":{"position":[[7,7]]},"301":{"position":[[12,8]]},"303":{"position":[[0,8]]},"304":{"position":[[22,9]]},"306":{"position":[[18,9]]}}}],["script",{"_index":208,"t":{"381":{"position":[[13,6]]}}}],["search",{"_index":211,"t":{"387":{"position":[[4,6]]}}}],["selenium",{"_index":169,"t":{"306":{"position":[[0,8]]},"308":{"position":[[21,8]]}}}],["server",{"_index":137,"t":{"233":{"position":[[0,6]]}}}],["set",{"_index":90,"t":{"124":{"position":[[0,7]]},"288":{"position":[[0,3]]}}}],["setter",{"_index":158,"t":{"276":{"position":[[12,7]]}}}],["setup",{"_index":172,"t":{"308":{"position":[[11,5]]}}}],["sign",{"_index":188,"t":{"344":{"position":[[0,4]]}}}],["signific",{"_index":115,"t":{"161":{"position":[[24,12]]}}}],["singleton",{"_index":218,"t":{"403":{"position":[[0,9]]}}}],["sourc",{"_index":71,"t":{"92":{"position":[[21,7]]},"278":{"position":[[13,7]]},"286":{"position":[[13,7]]}}}],["special",{"_index":59,"t":{"74":{"position":[[83,11]]}}}],["specif",{"_index":70,"t":{"92":{"position":[[12,8]]},"264":{"position":[[0,8]]}}}],["specifi",{"_index":72,"t":{"94":{"position":[[0,7]]}}}],["speed",{"_index":8,"t":{"8":{"position":[[0,8]]}}}],["start",{"_index":40,"t":{"55":{"position":[[13,8]]}}}],["state",{"_index":64,"t":{"84":{"position":[[17,5]]},"86":{"position":[[34,8]]}}}],["static",{"_index":81,"t":{"108":{"position":[[18,6]]},"304":{"position":[[14,7]]}}}],["step",{"_index":140,"t":{"235":{"position":[[11,5]]},"237":{"position":[[0,4]]},"260":{"position":[[0,5]]},"418":{"position":[[0,5]]}}}],["store",{"_index":109,"t":{"153":{"position":[[35,5]]}}}],["structur",{"_index":34,"t":{"36":{"position":[[6,9]]}}}],["support",{"_index":66,"t":{"86":{"position":[[26,7]]}}}],["system",{"_index":130,"t":{"221":{"position":[[15,6]]},"237":{"position":[[19,6]]}}}],["tabl",{"_index":132,"t":{"223":{"position":[[11,5]]}}}],["team",{"_index":58,"t":{"74":{"position":[[75,4]]},"80":{"position":[[19,4]]},"413":{"position":[[16,4]]}}}],["test",{"_index":145,"t":{"242":{"position":[[10,7]]},"244":{"position":[[12,5]]},"381":{"position":[[8,4]]}}}],["togeth",{"_index":193,"t":{"352":{"position":[[0,8]]}}}],["troubleshoot",{"_index":96,"t":{"137":{"position":[[0,15]]},"229":{"position":[[0,15]]},"312":{"position":[[0,15]]}}}],["tutori",{"_index":126,"t":{"208":{"position":[[0,9]]}}}],["type",{"_index":113,"t":{"161":{"position":[[0,5]]}}}],["ultim",{"_index":61,"t":{"78":{"position":[[13,8]]}}}],["unbias",{"_index":7,"t":{"6":{"position":[[25,8]]}}}],["understand",{"_index":95,"t":{"135":{"position":[[0,13]]}}}],["up",{"_index":9,"t":{"8":{"position":[[9,2]]},"124":{"position":[[8,2]]},"238":{"position":[[36,2]]},"344":{"position":[[5,2]]}}}],["updat",{"_index":136,"t":{"227":{"position":[[15,7]]},"237":{"position":[[8,6]]},"346":{"position":[[0,6]]}}}],["url",{"_index":102,"t":{"145":{"position":[[23,4]]},"326":{"position":[[21,3]]}}}],["us",{"_index":56,"t":{"74":{"position":[[52,5]]},"163":{"position":[[7,3]]},"177":{"position":[[0,5]]},"411":{"position":[[0,3]]}}}],["usag",{"_index":36,"t":{"41":{"position":[[0,5]]},"165":{"position":[[8,5]]},"189":{"position":[[0,5]]},"216":{"position":[[0,5]]},"262":{"position":[[8,5]]},"292":{"position":[[9,5]]},"422":{"position":[[0,5]]}}}],["var",{"_index":190,"t":{"346":{"position":[[11,4]]}}}],["vector",{"_index":108,"t":{"153":{"position":[[28,6]]}}}],["verbos",{"_index":161,"t":{"288":{"position":[[4,7]]}}}],["version",{"_index":135,"t":{"227":{"position":[[0,10]]},"328":{"position":[[7,7]]}}}],["vertexai",{"_index":197,"t":{"358":{"position":[[7,8]]}}}],["via",{"_index":84,"t":{"110":{"position":[[44,3]]},"246":{"position":[[0,3]]},"248":{"position":[[0,3]]}}}],["virtual",{"_index":120,"t":{"177":{"position":[[6,7]]},"179":{"position":[[0,7]]}}}],["voyageai",{"_index":204,"t":{"371":{"position":[[0,8]]}}}],["web",{"_index":26,"t":{"24":{"position":[[11,3]]},"69":{"position":[[13,3]]},"271":{"position":[[17,3]]},"387":{"position":[[0,3]]}}}],["webhook",{"_index":99,"t":{"143":{"position":[[11,8]]}}}],["what’",{"_index":68,"t":{"88":{"position":[[0,6]]}}}],["within",{"_index":65,"t":{"86":{"position":[[8,6]]}}}],["work",{"_index":18,"t":{"18":{"position":[[20,5]]},"39":{"position":[[7,5]]},"297":{"position":[[0,7]]},"415":{"position":[[7,5]]}}}],["xai",{"_index":201,"t":{"366":{"position":[[0,3]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3,"t":"After AutoGPT was published, we immediately took it for a spin. The first use case that came to mind was autonomous online research. Forming objective conclusions for manual research tasks can take time, sometimes weeks, to find the right resources and information. Seeing how well AutoGPT created tasks and executed them got me thinking about the great potential of using AI to conduct comprehensive research and what it meant for the future of online research. But the problem with AutoGPT was that it usually ran into never-ending loops, required human interference for almost every step, constantly lost track of its progress, and almost never actually completed the task. Nonetheless, the information and context gathered during the research task were lost (such as keeping track of sources), and sometimes hallucinated. The passion for leveraging AI for online research and the limitations I found put me on a mission to try and solve it while sharing my work with the world. This is when I created GPT Researcher — an open source autonomous agent for online comprehensive research. In this article, we will share the steps that guided me toward the proposed solution.","s":"How we built GPT Researcher","u":"/blog/building-gpt-researcher","h":"","p":2},{"i":5,"t":"The first step in solving these issues was to seek a more deterministic solution that could ultimately guarantee completing any research task within a fixed time frame, without human interference. This is when we stumbled upon the recent paper Plan and Solve. The paper aims to provide a better solution for the challenges stated above. The idea is quite simple and consists of two components: first, devising a plan to divide the entire task into smaller subtasks and then carrying out the subtasks according to the plan. As it relates to research, first create an outline of questions to research related to the task, and then deterministically execute an agent for every outline item. This approach eliminates the uncertainty in task completion by breaking the agent steps into a deterministic finite set of tasks. Once all tasks are completed, the agent concludes the research. Following this strategy has improved the reliability of completing research tasks to 100%. Now the challenge is, how to improve quality and speed?","s":"Moving from infinite loops to deterministic results","u":"/blog/building-gpt-researcher","h":"#moving-from-infinite-loops-to-deterministic-results","p":2},{"i":7,"t":"The biggest challenge with LLMs is the lack of factuality and unbiased responses caused by hallucinations and out-of-date training sets (GPT is currently trained on datasets from 2021). But the irony is that for research tasks, it is crucial to optimize for these exact two criteria: factuality and bias. To tackle this challenges, we assumed the following: Law of large numbers — More content will lead to less biased results. Especially if gathered properly. Leveraging LLMs for the summarization of factual information can significantly improve the overall better factuality of results. After experimenting with LLMs for quite some time, we can say that the areas where foundation models excel are in the summarization and rewriting of given content. So, in theory, if LLMs only review given content and summarize and rewrite it, potentially it would reduce hallucinations significantly. In addition, assuming the given content is unbiased, or at least holds opinions and information from all sides of a topic, the rewritten result would also be unbiased. So how can content be unbiased? The law of large numbers. In other words, if enough sites that hold relevant information are scraped, the possibility of biased information reduces greatly. So the idea would be to scrape just enough sites together to form an objective opinion on any topic. Great! Sounds like, for now, we have an idea for how to create both deterministic, factual, and unbiased results. But what about the speed problem?","s":"Aiming for objective and unbiased results","u":"/blog/building-gpt-researcher","h":"#aiming-for-objective-and-unbiased-results","p":2},{"i":9,"t":"Another issue with AutoGPT is that it works synchronously. The main idea of it is to create a list of tasks and then execute them one by one. So if, let’s say, a research task requires visiting 20 sites, and each site takes around one minute to scrape and summarize, the overall research task would take a minimum of +20 minutes. That’s assuming it ever stops. But what if we could parallelize agent work? By levering Python libraries such as asyncio, the agent tasks have been optimized to work in parallel, thus significantly reducing the time to research. # Create a list to hold the coroutine agent taskstasks = [async_browse(url, query, self.websocket) for url in await new_search_urls]# Gather the results as they become availableresponses = await asyncio.gather(*tasks, return_exceptions=True) Copy In the example above, we trigger scraping for all URLs in parallel, and only once all is done, continue with the task. Based on many tests, an average research task takes around three minutes (!!). That’s 85% faster than AutoGPT.","s":"Speeding up the research process","u":"/blog/building-gpt-researcher","h":"#speeding-up-the-research-process","p":2},{"i":11,"t":"Finally, after aggregating as much information as possible about a given research task, the challenge is to write a comprehensive report about it. After experimenting with several OpenAI models and even open source, I’ve concluded that the best results are currently achieved with GPT-4. The task is straightforward — provide GPT-4 as context with all the aggregated information, and ask it to write a detailed report about it given the original research task. The prompt is as follows: \"{research_summary}\" Using the above information, answer the following question or topic: \"{question}\" in a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else. Copy The results are quite impressive, with some minor hallucinations in very few samples, but it’s fair to assume that as GPT improves over time, results will only get better.","s":"Finalizing the research report","u":"/blog/building-gpt-researcher","h":"#finalizing-the-research-report","p":2},{"i":13,"t":"Now that we’ve reviewed the necessary steps of GPT Researcher, let’s break down the final architecture, as shown below: More specifically: Generate an outline of research questions that form an objective opinion on any given task. For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task. For each scraped resource, keep track, filter, and summarize only if it includes relevant information. Finally, aggregate all summarized sources and generate a final research report.","s":"The final architecture","u":"/blog/building-gpt-researcher","h":"#the-final-architecture","p":2},{"i":15,"t":"The future of online research automation is heading toward a major disruption. As AI continues to improve, it is only a matter of time before AI agents can perform comprehensive research tasks for any of our day-to-day needs. AI research can disrupt areas of finance, legal, academia, health, and retail, reducing our time for each research by 95% while optimizing for factual and unbiased reports within an influx and overload of ever-growing online information. Imagine if an AI can eventually understand and analyze any form of online content — videos, images, graphs, tables, reviews, text, audio. And imagine if it could support and analyze hundreds of thousands of words of aggregated information within a single prompt. Even imagine that AI can eventually improve in reasoning and analysis, making it much more suitable for reaching new and innovative research conclusions. And that it can do all that in minutes, if not seconds. It’s all a matter of time and what GPT Researcher is all about.","s":"Going forward","u":"/blog/building-gpt-researcher","h":"#going-forward","p":2},{"i":17,"t":"Over the past few years, we've seen an explosion of new AI tools designed to disrupt research. Some, like ChatPDF and Consensus, focus on extracting insights from documents. Others, such as Perplexity, excel at scouring the web for information. But here's the thing: none of these tools combine both web and local document search within a single contextual research pipeline. This is why I'm excited to introduce the latest advancements of GPT Researcher — now able to conduct hybrid research on any given task and documents. Web driven research often lacks specific context, risks information overload, and may include outdated or unreliable data. On the flip side, local driven research is limited to historical data and existing knowledge, potentially creating organizational echo chambers and missing out on crucial market trends or competitor moves. Both approaches, when used in isolation, can lead to incomplete or biased insights, hampering your ability to make fully informed decisions. Today, we're going to change the game. By the end of this guide, you'll learn how to conduct hybrid research that combines the best of both worlds — web and local — enabling you to conduct more thorough, relevant, and insightful research.","s":"The Future of Research is Hybrid","u":"/blog/gptr-hybrid","h":"","p":16},{"i":19,"t":"By combining web and local sources, hybrid research addresses these limitations and offers several key advantages: Grounded context: Local documents provide a foundation of verified, organization specific information. This grounds the research in established knowledge, reducing the risk of straying from core concepts or misinterpreting industry specific terminology. Example: A pharmaceutical company researching a new drug development opportunity can use its internal research papers and clinical trial data as a base, then supplement this with the latest published studies and regulatory updates from the web. Enhanced accuracy: Web sources offer up-to-date information, while local documents provide historical context. This combination allows for more accurate trend analysis and decision-making. Example: A financial services firm analyzing market trends can combine their historical trading data with real-time market news and social media sentiment analysis to make more informed investment decisions. Reduced bias: By drawing from both web and local sources, we mitigate the risk of bias that might be present in either source alone. Example: A tech company evaluating its product roadmap can balance internal feature requests and usage data with external customer reviews and competitor analysis, ensuring a well-rounded perspective. Improved planning and reasoning: LLMs can leverage the context from local documents to better plan their web research strategies and reason about the information they find online. Example: An AI-powered market research tool can use a company's past campaign data to guide its web search for current marketing trends, resulting in more relevant and actionable insights. Customized insights: Hybrid research allows for the integration of proprietary information with public data, leading to unique, organization-specific insights. Example: A retail chain can combine its sales data with web-scraped competitor pricing and economic indicators to optimize its pricing strategy in different regions. These are just a few examples for business use cases that can leverage hybrid research, but enough with the small talk — let's build!","s":"Why Hybrid Research Works Better","u":"/blog/gptr-hybrid","h":"#why-hybrid-research-works-better","p":16},{"i":21,"t":"Before we dive into the details, it's worth noting that GPT Researcher has the capability to conduct hybrid research out of the box! However, to truly appreciate how this works and to give you a deeper understanding of the process, we're going to take a look under the hood. GPT Researcher conducts web research based on an auto-generated plan from local documents, as seen in the architecture above. It then retrieves relevant information from both local and web data for the final research report. We'll explore how local documents are processed using LangChain, which is a key component of GPT Researcher's document handling. Then, we'll show you how to leverage GPT Researcher to conduct hybrid research, combining the advantages of web search with your local document knowledge base.","s":"Building the Hybrid Research Assistant","u":"/blog/gptr-hybrid","h":"#building-the-hybrid-research-assistant","p":16},{"i":23,"t":"LangChain provides a variety of document loaders that allow us to process different file types. This flexibility is crucial when dealing with diverse local documents. Here's how to set it up: from langchain_community.document_loaders import ( PyMuPDFLoader, TextLoader, UnstructuredCSVLoader, UnstructuredExcelLoader, UnstructuredMarkdownLoader, UnstructuredPowerPointLoader, UnstructuredWordDocumentLoader)from langchain.text_splitter import RecursiveCharacterTextSplitterfrom langchain.embeddings import OpenAIEmbeddingsfrom langchain.vectorstores import Chromadef load_local_documents(file_paths): documents = [] for file_path in file_paths: if file_path.endswith('.pdf'): loader = PyMuPDFLoader(file_path) elif file_path.endswith('.txt'): loader = TextLoader(file_path) elif file_path.endswith('.csv'): loader = UnstructuredCSVLoader(file_path) elif file_path.endswith('.xlsx'): loader = UnstructuredExcelLoader(file_path) elif file_path.endswith('.md'): loader = UnstructuredMarkdownLoader(file_path) elif file_path.endswith('.pptx'): loader = UnstructuredPowerPointLoader(file_path) elif file_path.endswith('.docx'): loader = UnstructuredWordDocumentLoader(file_path) else: raise ValueError(f\"Unsupported file type: {file_path}\") documents.extend(loader.load()) return documents# Use the function to load your local documentslocal_docs = load_local_documents(['company_report.pdf', 'meeting_notes.docx', 'data.csv'])# Split the documents into smaller chunks for more efficient processingtext_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)splits = text_splitter.split_documents(local_docs)# Create embeddings and store them in a vector database for quick retrievalembeddings = OpenAIEmbeddings()vectorstore = Chroma.from_documents(documents=splits, embedding=embeddings)# Example of how to perform a similarity searchquery = \"What were the key points from our last strategy meeting?\"relevant_docs = vectorstore.similarity_search(query, k=3)for doc in relevant_docs: print(doc.page_content) Copy","s":"Processing Local Documents with Langchain","u":"/blog/gptr-hybrid","h":"#processing-local-documents-with-langchain","p":16},{"i":25,"t":"Now that we've learned how to work with local documents, let's take a quick look at how GPT Researcher works under the hood: As seen above, GPT Researcher creates a research plan based on the given task by generating potential research queries that can collectively provide an objective and broad overview of the topic. Once these queries are generated, GPT Researcher uses a search engine like Tavily to find relevant results. Each scraped result is then saved in a vector database. Finally, the top k chunks most related to the research task are retrieved to generate a final research report. GPT Researcher supports hybrid research, which involves an additional step of chunking local documents (implemented using Langchain) before retrieving the most related information. After numerous evaluations conducted by the community, we've found that hybrid research improved the correctness of final results by over 40%!","s":"Conducting Web Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#conducting-web-research-with-gpt-researcher","p":16},{"i":27,"t":"Now that you have a better understanding of how hybrid research works, let's demonstrate how easy this can be achieved with GPT Researcher. Step 1: Install GPT Researcher with PIP pip install gpt-researcher Copy Step 2: Setting up the environment We will run GPT Researcher with OpenAI as the LLM vendor and Tavily as the search engine. You'll need to obtain API keys for both before moving forward. Then, export the environment variables in your CLI as follows: export OPENAI_API_KEY={your-openai-key}export TAVILY_API_KEY={your-tavily-key} Copy Step 3: Initialize GPT Researcher with hybrid research configuration GPT Researcher can be easily initialized with params that signal it to run a hybrid research. You can conduct many forms of research, head to the documentation page to learn more. To get GPT Researcher to run a hybrid research, you need to include all relevant files in my-docs directory (create it if it doesn't exist), and set the instance report_source to \"hybrid\" as seen below. Once the report source is set to hybrid, GPT Researcher will look for existing documents in the my-docs directory and include them in the research. If no documents exist, it will ignore it. from gpt_researcher import GPTResearcherimport asyncioasync def get_research_report(query: str, report_type: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source) research = await researcher.conduct_research() report = await researcher.write_report() return report if __name__ == \"__main__\": query = \"How does our product roadmap compare to emerging market trends in our industry?\" report_source = \"hybrid\" report = asyncio.run(get_research_report(query=query, report_type=\"research_report\", report_source=report_source)) print(report) Copy As seen above, we can run the research on the following example: Research task: \"How does our product roadmap compare to emerging market trends in our industry?\" Web: Current market trends, competitor announcements, and industry forecasts Local: Internal product roadmap documents and feature prioritization lists After various community evaluations we've found that the results of this research improve quality and correctness of research by over 40% and remove hallucinations by 50%. Moreover as stated above, local information helps the LLM improve planning reasoning allowing it to make better decisions and researching more relevant web sources. But wait, there's more! GPT Researcher also includes a sleek front-end app using NextJS and Tailwind. To learn how to get it running check out the documentation page. You can easily use drag and drop for documents to run hybrid research.","s":"Running the Hybrid Research with GPT Researcher","u":"/blog/gptr-hybrid","h":"#running-the-hybrid-research-with-gpt-researcher","p":16},{"i":29,"t":"Hybrid research represents a significant advancement in data gathering and decision making. By leveraging tools like GPT Researcher, teams can now conduct more comprehensive, context-aware, and actionable research. This approach addresses the limitations of using web or local sources in isolation, offering benefits such as grounded context, enhanced accuracy, reduced bias, improved planning and reasoning, and customized insights. The automation of hybrid research can enable teams to make faster, more data-driven decisions, ultimately enhancing productivity and offering a competitive advantage in analyzing an expanding pool of unstructured and dynamic information.","s":"Conclusion","u":"/blog/gptr-hybrid","h":"#conclusion","p":16},{"i":31,"t":"On this page","s":"Detailed Report","u":"/docs/examples/detailed_report","h":"","p":30},{"i":33,"t":"The DetailedReport class inspired by the recent STORM paper, is a powerful component of GPT Researcher, designed to generate comprehensive reports on complex topics. It's particularly useful for creating long-form content that exceeds the typical limits of LLM outputs. This class orchestrates the research process, breaking down the main query into subtopics, conducting in-depth research on each, and combining the results into a cohesive, detailed report. Located in backend/report_types/detailed_report.py in the GPT Researcher GitHub repository, this class leverages the capabilities of the GPTResearcher agent to perform targeted research and generate content.","s":"Overview","u":"/docs/examples/detailed_report","h":"#overview","p":30},{"i":35,"t":"Breaks down complex topics into manageable subtopics Conducts in-depth research on each subtopic Generates a comprehensive report with introduction, table of contents, and body Avoids redundancy by tracking previously written content Supports asynchronous operations for improved performance","s":"Key Features","u":"/docs/examples/detailed_report","h":"#key-features","p":30},{"i":38,"t":"The DetailedReport class is initialized with the following parameters: query: The main research query report_type: Type of the report report_source: Source of the report source_urls: Initial list of source URLs config_path: Path to the configuration file tone: Tone of the report (using the Tone enum) websocket: WebSocket for real-time communication subtopics: Optional list of predefined subtopics headers: Optional headers for HTTP requests","s":"Initialization","u":"/docs/examples/detailed_report","h":"#initialization","p":30},{"i":40,"t":"The DetailedReport class starts by conducting initial research on the main query. It then breaks down the topic into subtopics. For each subtopic, it: Conducts focused research Generates draft section titles Retrieves relevant previously written content to avoid redundancy Writes a report section Finally, it combines all subtopic reports, adds a table of contents, and includes source references to create the final detailed report.","s":"How It Works","u":"/docs/examples/detailed_report","h":"#how-it-works","p":30},{"i":42,"t":"Here's how you can use the DetailedReport class in your project: import asynciofrom fastapi import WebSocketfrom gpt_researcher.utils.enum import Tonefrom backend.report_type import DetailedReportasync def generate_report(websocket: WebSocket): detailed_report = DetailedReport( query=\"The impact of artificial intelligence on modern healthcare\", report_type=\"research_report\", report_source=\"web_search\", source_urls=[], # You can provide initial source URLs if available config_path=\"path/to/config.yaml\", tone=Tone.FORMAL, websocket=websocket, subtopics=[], # You can provide predefined subtopics if desired headers={} # Add any necessary HTTP headers ) final_report = await detailed_report.run() return final_report# In your FastAPI app@app.websocket(\"/generate_report\")async def websocket_endpoint(websocket: WebSocket): await websocket.accept() report = await generate_report(websocket) await websocket.send_text(report) Copy This example demonstrates how to create a DetailedReport instance and run it to generate a comprehensive report on the impact of AI on healthcare.","s":"Usage Example","u":"/docs/examples/detailed_report","h":"#usage-example","p":30},{"i":44,"t":"The DetailedReport class is a sophisticated tool for generating in-depth, well-structured reports on complex topics. By breaking down the main query into subtopics and leveraging the power of GPT Researcher, it can produce content that goes beyond the typical limitations of LLM outputs. This makes it an invaluable asset for researchers, content creators, and anyone needing detailed, well-researched information on a given topic.","s":"Conclusion","u":"/docs/examples/detailed_report","h":"#conclusion","p":30},{"i":46,"t":"Contribute We highly welcome contributions! Please check out contributing if you're interested. Please check out our roadmap page and reach out to us via our Discord community if you're interested in joining our mission.","s":"Contribute","u":"/docs/contribute","h":"","p":45},{"i":48,"t":"OpenAI has done it again with a groundbreaking DevDay showcasing some of the latest improvements to the OpenAI suite of tools, products and services. One major release was the new Assistants API that makes it easier for developers to build their own assistive AI apps that have goals and can call models and tools. The new Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. Although you might expect the Retrieval tool to support online information retrieval (such as search APIs or as ChatGPT plugins), it only supports raw data for now such as text or CSV files. This blog will demonstrate how to leverage the latest Assistants API with online information using the function calling tool. To skip the tutorial below, feel free to check out the full Github Gist here. At a high level, a typical integration of the Assistants API has the following steps: Create an Assistant in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling. Create a Thread when a user starts a conversation. Add Messages to the Thread as the user ask questions. Run the Assistant on the Thread to trigger responses. This automatically calls the relevant tools. As you can see below, an Assistant object includes Threads for storing and handling conversation sessions between the assistant and users, and Run for invocation of an Assistant on a Thread. Let’s go ahead and implement these steps one by one! For the example, we will build a finance GPT that can provide insights about financial questions. We will use the OpenAI Python SDK v1.2 and Tavily Search API. First things first, let’s define the assistant’s instructions: assistant_prompt_instruction = \"\"\"You are a finance expert. Your goal is to provide answers based on information from the internet. You must use the provided Tavily search API function to find relevant online information. You should never use your own knowledge to answer questions.Please include relevant url sources in the end of your answers.\"\"\" Copy Next, let’s finalize step 1 and create an assistant using the latest GPT-4 Turbo model (128K context), and the call function using the Tavily web search API: # Create an assistantassistant = client.beta.assistants.create( instructions=assistant_prompt_instruction, model=\"gpt-4-1106-preview\", tools=[{ \"type\": \"function\", \"function\": { \"name\": \"tavily_search\", \"description\": \"Get information on recent events from the web.\", \"parameters\": { \"type\": \"object\", \"properties\": { \"query\": {\"type\": \"string\", \"description\": \"The search query to use. For example: 'Latest news on Nvidia stock performance'\"}, }, \"required\": [\"query\"] } } }]) Copy Step 2+3 are quite straight forward, we’ll initiate a new thread and update it with a user message: thread = client.beta.threads.create()user_input = input(\"You: \")message = client.beta.threads.messages.create( thread_id=thread.id, role=\"user\", content=user_input,) Copy Finally, we’ll run the assistant on the thread to trigger the function call and get the response: run = client.beta.threads.runs.create( thread_id=thread.id, assistant_id=assistant_id,) Copy So far so good! But this is where it gets a bit messy. Unlike with the regular GPT APIs, the Assistants API doesn’t return a synchronous response, but returns a status. This allows for asynchronous operations across assistants, but requires more overhead for fetching statuses and dealing with each manually. To manage this status lifecycle, let’s build a function that can be reused and handles waiting for various statuses (such as ‘requires_action’): # Function to wait for a run to completedef wait_for_run_completion(thread_id, run_id): while True: time.sleep(1) run = client.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run_id) print(f\"Current run status: {run.status}\") if run.status in ['completed', 'failed', 'requires_action']: return run Copy This function will sleep as long as the run has not been finalized such as in cases where it’s completed or requires an action from a function call. We’re almost there! Lastly, let’s take care of when the assistant wants to call the web search API: # Function to handle tool output submissiondef submit_tool_outputs(thread_id, run_id, tools_to_call): tool_output_array = [] for tool in tools_to_call: output = None tool_call_id = tool.id function_name = tool.function.name function_args = tool.function.arguments if function_name == \"tavily_search\": output = tavily_search(query=json.loads(function_args)[\"query\"]) if output: tool_output_array.append({\"tool_call_id\": tool_call_id, \"output\": output}) return client.beta.threads.runs.submit_tool_outputs( thread_id=thread_id, run_id=run_id, tool_outputs=tool_output_array ) Copy As seen above, if the assistant has reasoned that a function call should trigger, we extract the given required function params and pass back to the runnable thread. We catch this status and call our functions as seen below: if run.status == 'requires_action': run = submit_tool_outputs(thread.id, run.id, run.required_action.submit_tool_outputs.tool_calls) run = wait_for_run_completion(thread.id, run.id) Copy That’s it! We now have a working OpenAI Assistant that can be used to answer financial questions using real time online information. Below is the full runnable code: import osimport jsonimport timefrom openai import OpenAIfrom tavily import TavilyClient# Initialize clients with API keysclient = OpenAI(api_key=os.environ[\"OPENAI_API_KEY\"])tavily_client = TavilyClient(api_key=os.environ[\"TAVILY_API_KEY\"])assistant_prompt_instruction = \"\"\"You are a finance expert. Your goal is to provide answers based on information from the internet. You must use the provided Tavily search API function to find relevant online information. You should never use your own knowledge to answer questions.Please include relevant url sources in the end of your answers.\"\"\"# Function to perform a Tavily searchdef tavily_search(query): search_result = tavily_client.get_search_context(query, search_depth=\"advanced\", max_tokens=8000) return search_result# Function to wait for a run to completedef wait_for_run_completion(thread_id, run_id): while True: time.sleep(1) run = client.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run_id) print(f\"Current run status: {run.status}\") if run.status in ['completed', 'failed', 'requires_action']: return run# Function to handle tool output submissiondef submit_tool_outputs(thread_id, run_id, tools_to_call): tool_output_array = [] for tool in tools_to_call: output = None tool_call_id = tool.id function_name = tool.function.name function_args = tool.function.arguments if function_name == \"tavily_search\": output = tavily_search(query=json.loads(function_args)[\"query\"]) if output: tool_output_array.append({\"tool_call_id\": tool_call_id, \"output\": output}) return client.beta.threads.runs.submit_tool_outputs( thread_id=thread_id, run_id=run_id, tool_outputs=tool_output_array )# Function to print messages from a threaddef print_messages_from_thread(thread_id): messages = client.beta.threads.messages.list(thread_id=thread_id) for msg in messages: print(f\"{msg.role}: {msg.content[0].text.value}\")# Create an assistantassistant = client.beta.assistants.create( instructions=assistant_prompt_instruction, model=\"gpt-4-1106-preview\", tools=[{ \"type\": \"function\", \"function\": { \"name\": \"tavily_search\", \"description\": \"Get information on recent events from the web.\", \"parameters\": { \"type\": \"object\", \"properties\": { \"query\": {\"type\": \"string\", \"description\": \"The search query to use. For example: 'Latest news on Nvidia stock performance'\"}, }, \"required\": [\"query\"] } } }])assistant_id = assistant.idprint(f\"Assistant ID: {assistant_id}\")# Create a threadthread = client.beta.threads.create()print(f\"Thread: {thread}\")# Ongoing conversation loopwhile True: user_input = input(\"You: \") if user_input.lower() == 'exit': break # Create a message message = client.beta.threads.messages.create( thread_id=thread.id, role=\"user\", content=user_input, ) # Create a run run = client.beta.threads.runs.create( thread_id=thread.id, assistant_id=assistant_id, ) print(f\"Run ID: {run.id}\") # Wait for run to complete run = wait_for_run_completion(thread.id, run.id) if run.status == 'failed': print(run.error) continue elif run.status == 'requires_action': run = submit_tool_outputs(thread.id, run.id, run.required_action.submit_tool_outputs.tool_calls) run = wait_for_run_completion(thread.id, run.id) # Print messages from the thread print_messages_from_thread(thread.id) Copy The assistant can be further customized and improved using additional retrieval information, OpenAI’s coding interpreter and more. Also, you can go ahead and add more function tools to make the assistant even smarter. Feel free to drop a comment below if you have any further questions!","s":"How to build an OpenAI Assistant with Internet access","u":"/blog/building-openai-assistant","h":"","p":47},{"i":50,"t":"On this page","s":"Simple Run","u":"/docs/examples/examples","h":"","p":49},{"i":52,"t":"from gpt_researcher import GPTResearcherimport asyncioasync def main(): \"\"\" This is a sample script that shows how to run a research report. \"\"\" # Query query = \"What happened in the latest burning man floods?\" # Report Type report_type = \"research_report\" # Initialize the researcher researcher = GPTResearcher(query=query, report_type=report_type, config_path=None) # Conduct research on the given query await researcher.conduct_research() # Write the report report = await researcher.write_report() return reportif __name__ == \"__main__\": asyncio.run(main()) Copy","s":"Run PIP Package","u":"/docs/examples/examples","h":"#run-pip-package","p":49},{"i":54,"t":"On this page","s":"FAQ","u":"/docs/faq","h":"","p":53},{"i":56,"t":"It really depends on what you're aiming for. If you're looking to connect your AI application to the internet with Tavily tailored API, check out the Tavily API documentation. If you're looking to build and deploy our open source autonomous research agent GPT Researcher, please see GPT Researcher documentation. You can also check out demos and examples for inspiration here.","s":"How do I get started?","u":"/docs/faq","h":"#how-do-i-get-started","p":53},{"i":58,"t":"GPT Researcher is a popular open source autonomous research agent that takes care of the tedious task of research for you, by scraping, filtering and aggregating over 20+ web sources per a single research task. GPT Researcher is built with best practices for leveraging LLMs (prompt engineering, RAG, chains, embeddings, etc), and is optimized for quick and efficient research. It is also fully customizable and can be tailored to your specific needs. To learn more about GPT Researcher, check out the documentation page.","s":"What is GPT Researcher?","u":"/docs/faq","h":"#what-is-gpt-researcher","p":53},{"i":60,"t":"A research task using GPT Researcher costs around $0.01 per a single run (for GPT-4 usage). We're constantly optimizing LLM calls to reduce costs and improve performance.","s":"How much does each research run cost?","u":"/docs/faq","h":"#how-much-does-each-research-run-cost","p":53},{"i":62,"t":"we do our best to ensure that the information we provide is factual and accurate. We do this by using multiple sources, and by using proprietary AI to score and rank the most relevant and accurate information. We also use proprietary AI to filter out irrelevant information and sources. Lastly, by using RAG and other techniques, we ensure that the information is relevant to the context of the research task, leading to more accurate generative AI content and reduced hallucinations.","s":"How do you ensure the report is factual and accurate?","u":"/docs/faq","h":"#how-do-you-ensure-the-report-is-factual-and-accurate","p":53},{"i":64,"t":"We're constantly working on improving our products and services. We're currently working on improving our search API together with design partners, and adding more data sources to our search engine. We're also working on improving our research agent GPT Researcher, and adding more features to it while growing our amazing open source community. If you're interested in our roadmap or looking to collaborate, check out our roadmap page. Feel free to contact us if you have any further questions or suggestions!","s":"What are your plans for the future?","u":"/docs/faq","h":"#what-are-your-plans-for-the-future","p":53},{"i":66,"t":"On this page","s":"Research on Local Documents","u":"/docs/gpt-researcher/context/local-docs","h":"","p":65},{"i":68,"t":"You can instruct the GPT Researcher to run research tasks based on your local documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents. Step 1: Add the env variable DOC_PATH pointing to the folder where your documents are located. export DOC_PATH=\"./my-docs\" Copy Step 2: If you're running the frontend app on localhost:8000, simply select \"My Documents\" from the \"Report Source\" Dropdown Options. If you're running GPT Researcher with the PIP package, pass the report_source argument as \"local\" when you instantiate the GPTResearcher class code sample here.","s":"Just Local Docs","u":"/docs/gpt-researcher/context/local-docs","h":"#just-local-docs","p":65},{"i":70,"t":"Check out the blog post on Hybrid Research to learn more about how to combine local documents with web research. Copy","s":"Local Docs + Web (Hybrid)","u":"/docs/gpt-researcher/context/local-docs","h":"#local-docs--web-hybrid","p":65},{"i":72,"t":"Introducing the GPT Researcher Multi-Agent Assistant","s":"How to Build the Ultimate Research Multi-Agent Assistant","u":"/blog/gptr-langgraph","h":"","p":71},{"i":75,"t":"It has only been a year since the initial release of GPT Researcher, but methods for building, testing, and deploying AI agents have already evolved significantly. That’s just the nature and speed of the current AI progress. What started as simple zero-shot or few-shot prompting, has quickly evolved to agent function calling, RAG and now finally agentic workflows (aka “flow engineering”). Andrew Ng has recently stated, “I think AI agent workflows will drive massive AI progress this year — perhaps even more than the next generation of foundation models. This is an important trend, and I urge everyone who works in AI to pay attention to it.” In this article you will learn why multi-agent workflows are the current best standard and how to build the optimal autonomous research multi-agent assistant using LangGraph. To skip this tutorial, feel free to check out the Github repo of GPT Researcher x LangGraph.","s":"Learn how to build an autonomous research assistant using LangGraph with a team of specialized AI agents","u":"/blog/gptr-langgraph","h":"#learn-how-to-build-an-autonomous-research-assistant-using-langgraph-with-a-team-of-specialized-ai-agents","p":71},{"i":77,"t":"LangGraph is an extension of LangChain aimed at creating agent and multi-agent flows. It adds in the ability to create cyclical flows and comes with memory built in — both important attributes for creating agents. LangGraph provides developers with a high degree of controllability and is important for creating custom agents and flows. Nearly all agents in production are customized towards the specific use case they are trying solve. LangGraph gives you the flexibility to create arbitrary customized agents, while providing an intuitive developer experience for doing so. Enough with the smalltalk, let’s start building!","s":"Introducing LangGraph","u":"/blog/gptr-langgraph","h":"#introducing-langgraph","p":71},{"i":79,"t":"By leveraging LangGraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Having every agent focus and specialize only a specific skill, allows for better separation of concerns, customizability, and further development at scale as the project grows. Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. This example will also leverage the leading autonomous research agent GPT Researcher.","s":"Building the Ultimate Autonomous Research Agent","u":"/blog/gptr-langgraph","h":"#building-the-ultimate-autonomous-research-agent","p":71},{"i":81,"t":"The research team consists of seven LLM agents: Chief Editor — Oversees the research process and manages the team. This is the “master” agent that coordinates the other agents using LangGraph. This agent acts as the main LangGraph interface. GPT Researcher — A specialized autonomous agent that conducts in depth research on a given topic. Editor — Responsible for planning the research outline and structure. Reviewer — Validates the correctness of the research results given a set of criteria. Reviser — Revises the research results based on the feedback from the reviewer. Writer — Responsible for compiling and writing the final report. Publisher — Responsible for publishing the final report in various formats.","s":"The Research Agent Team","u":"/blog/gptr-langgraph","h":"#the-research-agent-team","p":71},{"i":83,"t":"As seen below, the automation process is based on the following stages: Planning the research, data collection and analysis, review and revision, writing the report and finally publication: More specifically the process is as follows: Browser (gpt-researcher) — Browses the internet for initial research based on the given research task. This step is crucial for LLMs to plan the research process based on up to date and relevant information, and not rely solely on pre-trained data for a given task or topic. Editor — Plans the report outline and structure based on the initial research. The Editor is also responsible for triggering the parallel research tasks based on the planned outline. For each outline topic (in parallel): Researcher (gpt-researcher) — Runs an in depth research on the subtopics and writes a draft. This agent leverages the GPT Researcher Python package under the hood, for optimized, in depth and factual research report. Reviewer — Validates the correctness of the draft given a set of guidelines and provides feedback to the reviser (if any). Reviser — Revises the draft until it is satisfactory based on the reviewer feedback. Writer — Compiles and writes the final report including an introduction, conclusion and references section from the given research findings. Publisher — Publishes the final report to multi formats such as PDF, Docx, Markdown, etc. We will not dive into all the code since there’s a lot of it, but focus mostly on the interesting parts I’ve found valuable to share.","s":"Architecture","u":"/blog/gptr-langgraph","h":"#architecture","p":71},{"i":85,"t":"One of my favorite features with LangGraph is state management. States in LangGraph are facilitated through a structured approach where developers define a GraphState that encapsulates the entire state of the application. Each node in the graph can modify this state, allowing for dynamic responses based on the evolving context of the interaction. Like in every start of a technical design, considering the data schema throughout the application is key. In this case we’ll define a ResearchState like so: class ResearchState(TypedDict): task: dict initial_research: str sections: List[str] research_data: List[dict] # Report layout title: str headers: dict date: str table_of_contents: str introduction: str conclusion: str sources: List[str] report: str Copy As seen above, the state is divided into two main areas: the research task and the report layout content. As data circulates through the graph agents, each agent will, in turn, generate new data based on the existing state and update it for subsequent processing further down the graph with other agents. We can then initialize the graph with the following: from langgraph.graph import StateGraphworkflow = StateGraph(ResearchState) Copy Initializing the graph with LangGraph As stated above, one of the great things about multi-agent development is building each agent to have specialized and scoped skills. Let’s take an example of the Researcher agent using GPT Researcher python package: from gpt_researcher import GPTResearcherclass ResearchAgent: def __init__(self): pass async def research(self, query: str): # Initialize the researcher researcher = GPTResearcher(parent_query=parent_query, query=query, report_type=research_report, config_path=None) # Conduct research on the given query await researcher.conduct_research() # Write the report report = await researcher.write_report() return report Copy As you can see above, we’ve created an instance of the Research agent. Now let’s assume we’ve done the same for each of the team’s agent. After creating all of the agents, we’d initialize the graph with LangGraph: def init_research_team(self): # Initialize skills editor_agent = EditorAgent(self.task) research_agent = ResearchAgent() writer_agent = WriterAgent() publisher_agent = PublisherAgent(self.output_dir) # Define a Langchain StateGraph with the ResearchState workflow = StateGraph(ResearchState) # Add nodes for each agent workflow.add_node(\"browser\", research_agent.run_initial_research) workflow.add_node(\"planner\", editor_agent.plan_research) workflow.add_node(\"researcher\", editor_agent.run_parallel_research) workflow.add_node(\"writer\", writer_agent.run) workflow.add_node(\"publisher\", publisher_agent.run) workflow.add_edge('browser', 'planner') workflow.add_edge('planner', 'researcher') workflow.add_edge('researcher', 'writer') workflow.add_edge('writer', 'publisher') # set up start and end nodes workflow.set_entry_point(\"browser\") workflow.add_edge('publisher', END) return workflow Copy As seen above, creating the LangGraph graph is very straight forward and consists of three main functions: add_node, add_edge and set_entry_point. With these main functions you can first add the nodes to the graph, connect the edges and finally set the starting point. Focus check: If you’ve been following the code and architecture properly, you’ll notice that the Reviewer and Reviser agents are missing in the initialization above. Let’s dive into it!","s":"Define the Graph State","u":"/blog/gptr-langgraph","h":"#define-the-graph-state","p":71},{"i":87,"t":"This was the most exciting part of my experience working with LangGraph! One exciting feature of this autonomous assistant is having a parallel run for each research task, that would be reviewed and revised based on a set of predefined guidelines. Knowing how to leverage parallel work within a process is key for optimizing speed. But how would you trigger parallel agent work if all agents report to the same state? This can cause race conditions and inconsistencies in the final data report. To solve this, you can create a sub graph, that would be triggered from the main LangGraph instance. This sub graph would hold its own state for each parallel run, and that would solve the issues that were raised. As we’ve done before, let’s define the LangGraph state and its agents. Since this sub graph basically reviews and revises a research draft, we’ll define the state with draft information: class DraftState(TypedDict): task: dict topic: str draft: dict review: str revision_notes: str Copy As seen in the DraftState, we mostly care about the topic discussed, and the reviewer and revision notes as they communicate between each other to finalize the subtopic research report. To create the circular condition we’ll take advantage of the last important piece of LangGraph which is conditional edges: async def run_parallel_research(self, research_state: dict): workflow = StateGraph(DraftState) workflow.add_node(\"researcher\", research_agent.run_depth_research) workflow.add_node(\"reviewer\", reviewer_agent.run) workflow.add_node(\"reviser\", reviser_agent.run) # set up edges researcher->reviewer->reviser->reviewer... workflow.set_entry_point(\"researcher\") workflow.add_edge('researcher', 'reviewer') workflow.add_edge('reviser', 'reviewer') workflow.add_conditional_edges('reviewer', (lambda draft: \"accept\" if draft['review'] is None else \"revise\"), {\"accept\": END, \"revise\": \"reviser\"}) Copy By defining the conditional edges, the graph would direct to reviser if there exists review notes by the reviewer, or the cycle would end with the final draft. If you go back to the main graph we’ve built, you’ll see that this parallel work is under a node named “researcher” called by ChiefEditor agent. Running the Research Assistant After finalizing the agents, states and graphs, it’s time to run our research assistant! To make it easier to customize, the assistant runs with a given task.json file: { \"query\": \"Is AI in a hype cycle?\", \"max_sections\": 3, \"publish_formats\": { \"markdown\": true, \"pdf\": true, \"docx\": true }, \"follow_guidelines\": false, \"model\": \"gpt-4-turbo\", \"guidelines\": [ \"The report MUST be written in APA format\", \"Each sub section MUST include supporting sources using hyperlinks. If none exist, erase the sub section or rewrite it to be a part of the previous section\", \"The report MUST be written in spanish\" ]} Copy The task object is pretty self explanatory, however please notice that follow_guidelines if false would cause the graph to ignore the revision step and defined guidelines. Also, the max_sections field defines how many subheaders to research for. Having less will generate a shorter report. Running the assistant will result in a final research report in formats such as Markdown, PDF and Docx. To download and run the example check out the GPT Researcher x LangGraph open source page.","s":"A Graph within a Graph to support stateful Parallelization","u":"/blog/gptr-langgraph","h":"#a-graph-within-a-graph-to-support-stateful-parallelization","p":71},{"i":89,"t":"Going forward, there are super exciting things to think about. Human in the loop is key for optimized AI experiences. Having a human help the assistant revise and focus on just the right research plan, topics and outline, would enhance the overall quality and experience. Also generally, aiming for relying on human intervention throughout the AI flow ensures correctness, sense of control and deterministic results. Happy to see that LangGraph already supports this out of the box as seen here. In addition, having support for research about both web and local data would be key for many types of business and personal use cases. Lastly, more efforts can be done to improve the quality of retrieved sources and making sure the final report is built in the optimal storyline. A step forward in LangGraph and multi-agent collaboration in a whole would be where assistants can plan and generate graphs dynamically based on given tasks. This vision would allow assistants to choose only a subset of agents for a given task and plan their strategy based on the graph fundamentals as presented in this article and open a whole new world of possibilities. Given the pace of innovation in the AI space, it won’t be long before a new disruptive version of GPT Researcher is launched. Looking forward to what the future brings! To keep track of this project’s ongoing progress and updates please join our Discord community. And as always, if you have any feedback or further questions, please comment below!","s":"What’s Next?","u":"/blog/gptr-langgraph","h":"#whats-next","p":71},{"i":91,"t":"On this page","s":"Tailored Research","u":"/docs/gpt-researcher/context/tailored-research","h":"","p":90},{"i":93,"t":"You can specify the sources you want the GPT Researcher to research on by providing a list of URLs. The GPT Researcher will then conduct research on the provided sources via source_urls. If you want GPT Researcher to perform additional research outside of the URLs you provided, i.e., conduct research on various other websites that it finds suitable for the query/sub-query, you can set the parameter complement_source_urls as True. Default value of False will only scour the websites you provide via source_urls. from gpt_researcher import GPTResearcherimport asyncioasync def get_report(query: str, report_type: str, sources: list) -> str: researcher = GPTResearcher(query=query, report_type=report_type, source_urls=sources, complement_source_urls=False) await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"What are the biggest trends in AI lately?\" report_source = \"static\" sources = [ \"https://en.wikipedia.org/wiki/Artificial_intelligence\", \"https://www.ibm.com/think/insights/artificial-intelligence-trends\", \"https://www.forbes.com/advisor/business/ai-statistics\" ] report = asyncio.run(get_report(query=query, report_source=report_source, sources=sources)) print(report) Copy","s":"Research on Specific Sources 📚","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-specific-sources-","p":90},{"i":95,"t":"You can specify the agent prompt instruction upon which the research is conducted. This allows you to guide the research in a specific direction and tailor the report layout. Simply pass the prompt as the query argument to the GPTResearcher class and the \"custom_report\" report_type. from gpt_researcher import GPTResearcherimport asyncioasync def get_report(prompt: str, report_type: str) -> str: researcher = GPTResearcher(query=prompt, report_type=report_type) await researcher.conduct_research() report = await researcher.write_report() return report if __name__ == \"__main__\": report_type = \"custom_report\" prompt = \"Research the latest advancements in AI and provide a detailed report in APA format including sources.\" report = asyncio.run(get_report(prompt=prompt, report_type=report_type)) print(report) Copy","s":"Specify Agent Prompt 📝","u":"/docs/gpt-researcher/context/tailored-research","h":"#specify-agent-prompt-","p":90},{"i":97,"t":"You can instruct the GPT Researcher to research on local documents by providing the path to those documents. Currently supported file formats are: PDF, plain text, CSV, Excel, Markdown, PowerPoint, and Word documents. Step 1: Add the env variable DOC_PATH pointing to the folder where your documents are located. For example: export DOC_PATH=\"./my-docs\" Copy Step 2: When you create an instance of the GPTResearcher class, pass the report_source argument as \"local\". GPT Researcher will then conduct research on the provided documents. from gpt_researcher import GPTResearcherimport asyncioasync def get_report(query: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_source=report_source) await researcher.conduct_research() report = await researcher.write_report() return report if __name__ == \"__main__\": query = \"What can you tell me about myself based on my documents?\" report_source = \"local\" # \"local\" or \"web\" report = asyncio.run(get_report(query=query, report_source=report_source)) print(report) Copy","s":"Research on Local Documents 📄","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-local-documents-","p":90},{"i":99,"t":"You can combine the above methods to conduct hybrid research. For example, you can instruct the GPT Researcher to research on both web sources and local documents. Simply provide the sources and set the report_source argument as \"hybrid\" and watch the magic happen. Please note! You should set the proper retrievers for the web sources and doc path for local documents for this to work. To learn more about retrievers check out the Retrievers documentation.","s":"Hybrid Research 🔄","u":"/docs/gpt-researcher/context/tailored-research","h":"#hybrid-research-","p":90},{"i":101,"t":"You can instruct the GPT Researcher to research on a list of langchain document instances. For example: from langchain_core.documents import Documentfrom typing import List, Dictfrom gpt_researcher import GPTResearcherfrom langchain_postgres.vectorstores import PGVectorfrom langchain_openai import OpenAIEmbeddingsfrom sqlalchemy import create_engineimport asyncioCONNECTION_STRING = 'postgresql://someuser:somepass@localhost:5432/somedatabase'def get_retriever(collection_name: str, search_kwargs: Dict[str, str]): engine = create_engine(CONNECTION_STRING) embeddings = OpenAIEmbeddings() index = PGVector.from_existing_index( use_jsonb=True, embedding=embeddings, collection_name=collection_name, connection=engine, ) return index.as_retriever(search_kwargs=search_kwargs)async def get_report(query: str, report_type: str, report_source: str, documents: List[Document]) -> str: researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source, documents=documents) await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"What can you tell me about blue cheese based on my documents?\" report_type = \"research_report\" report_source = \"langchain_documents\" # using a LangChain retriever to get all the documents regarding cheese # https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.BaseRetriever.html#langchain_core.retrievers.BaseRetriever.invoke langchain_retriever = get_retriever(\"cheese_collection\", { \"k\": 3 }) documents = langchain_retriever.invoke(\"All the documents about cheese\") report = asyncio.run(get_report(query=query, report_type=report_type, report_source=report_source, documents=documents)) print(report) Copy","s":"Research on LangChain Documents 🦜️🔗","u":"/docs/gpt-researcher/context/tailored-research","h":"#research-on-langchain-documents-️","p":90},{"i":103,"t":"On this page","s":"Frontend Application","u":"/docs/gpt-researcher/frontend/frontend","h":"","p":102},{"i":105,"t":"The React app (located in the frontend directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well. It comes with loads of added features, such as: a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher. a GUI for setting your GPTR environment variables. the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta). stability fixes and more coming soon!","s":"NextJS Frontend App","u":"/docs/gpt-researcher/frontend/frontend","h":"#nextjs-frontend-app","p":102},{"i":107,"t":"Step 1 - Install Docker Step 2 - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env' Step 3 - Within the docker-compose file comment out services that you don't want to run with Docker. docker compose up --build Copy If that doesn't work, try running it without the dash: docker compose up --build Copy Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes: the Python server running on localhost:8000 the React app running on localhost:3000 Visit localhost:3000 on any browser and enjoy researching!","s":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/frontend/frontend","h":"#run-the-nextjs-react-app-with-docker","p":102},{"i":109,"t":"A lightweight solution using FastAPI to serve static files. Prerequisites Python 3.11+ pip Setup and Running Install required packages: pip install -r requirements.txt Copy Start the server: python -m uvicorn main:app Copy Access at http://localhost:8000 Demo","s":"Other Options: 1: Static Frontend (FastAPI)","u":"/docs/gpt-researcher/frontend/frontend","h":"#other-options-1-static-frontend-fastapi","p":102},{"i":111,"t":"A more robust solution with enhanced features and performance. Prerequisites Node.js (v18.17.0 recommended) npm Setup and Running Navigate to NextJS directory: cd nextjs Copy Set up Node.js: nvm install 18.17.0nvm use v18.17.0 Copy Install dependencies: npm install --legacy-peer-deps Copy Start development server: npm run dev Copy Access at http://localhost:3000 Note: Requires backend server on localhost:8000 as detailed in option 1. Demo","s":"Yet Another Option: Running NextJS Frontend via CLI","u":"/docs/gpt-researcher/frontend/frontend","h":"#yet-another-option-running-nextjs-frontend-via-cli","p":102},{"i":113,"t":"Static Frontend: Quick setup, lightweight deployment. NextJS Frontend: Feature-rich, scalable, better performance and SEO. For production, NextJS is recommended.","s":"Choosing an Option","u":"/docs/gpt-researcher/frontend/frontend","h":"#choosing-an-option","p":102},{"i":115,"t":"Our frontend enhances GPT-Researcher by providing: Intuitive Research Interface: Streamlined input for research queries. Real-time Progress Tracking: Visual feedback on ongoing research tasks. Interactive Results Display: Easy-to-navigate presentation of findings. Customizable Settings: Adjust research parameters to suit specific needs. Responsive Design: Optimal experience across various devices. These features aim to make the research process more efficient and user-friendly, complementing GPT-Researcher's powerful agent capabilities.","s":"Frontend Features","u":"/docs/gpt-researcher/frontend/frontend","h":"#frontend-features","p":102},{"i":117,"t":"On this page","s":"Hybrid Research","u":"/docs/examples/hybrid_research","h":"","p":116},{"i":119,"t":"GPT Researcher can combine web search capabilities with local document analysis to provide comprehensive, context-aware research results. This guide will walk you through the process of setting up and running hybrid research using GPT Researcher.","s":"Introduction","u":"/docs/examples/hybrid_research","h":"#introduction","p":116},{"i":121,"t":"Before you begin, ensure you have the following: Python 3.10 or higher installed on your system pip (Python package installer) An OpenAI API key (you can also choose other supported LLMs) A Tavily API key (you can also choose other supported Retrievers)","s":"Prerequisites","u":"/docs/examples/hybrid_research","h":"#prerequisites","p":116},{"i":123,"t":"pip install gpt-researcher Copy","s":"Installation","u":"/docs/examples/hybrid_research","h":"#installation","p":116},{"i":125,"t":"Export your API keys as environment variables: export OPENAI_API_KEY=your_openai_api_key_hereexport TAVILY_API_KEY=your_tavily_api_key_here Copy Alternatively, you can set these in your Python script: import osos.environ['OPENAI_API_KEY'] = 'your_openai_api_key_here'os.environ['TAVILY_API_KEY'] = 'your_tavily_api_key_here' Copy Set the environment variable REPORT_SOURCE to an empty string \"\" in default.py","s":"Setting Up the Environment","u":"/docs/examples/hybrid_research","h":"#setting-up-the-environment","p":116},{"i":128,"t":"Create a directory named my-docs in your project folder. Place all relevant local documents (PDFs, TXTs, DOCXs, etc.) in this directory.","s":"1. Local Documents","u":"/docs/examples/hybrid_research","h":"#1-local-documents","p":116},{"i":130,"t":"Here is an example of your online document URL example: https://xxxx.xxx.pdf (supports file formats like PDFs, TXTs, DOCXs, etc.)","s":"2. Online Documents","u":"/docs/examples/hybrid_research","h":"#2-online-documents","p":116},{"i":132,"t":"Here's a basic script to run hybrid research: from gpt_researcher import GPTResearcherimport asyncioasync def get_research_report(query: str, report_type: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_type=report_type, report_source=report_source) research = await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"How does our product roadmap compare to emerging market trends in our industry?\" report_source = \"hybrid\" report = asyncio.run(get_research_report(query=query, report_type=\"research_report\", report_source=report_source)) print(report) Copy","s":"Running Hybrid Research By \"Local Documents\"","u":"/docs/examples/hybrid_research","h":"#running-hybrid-research-by-local-documents","p":116},{"i":134,"t":"Here's a basic script to run hybrid research: from gpt_researcher import GPTResearcherimport asyncioasync def get_research_report(query: str, report_type: str, report_source: str) -> str: researcher = GPTResearcher(query=query, report_type=report_type, document_urls=document_urls, report_source=report_source) research = await researcher.conduct_research() report = await researcher.write_report() return reportif __name__ == \"__main__\": query = \"How does our product roadmap compare to emerging market trends in our industry?\" report_source = \"hybrid\" document_urls = [\"https://xxxx.xxx.pdf\", \"https://xxxx.xxx.doc\"] report = asyncio.run(get_research_report(query=query, report_type=\"research_report\", document_urls=document_urls, report_source=report_source)) print(report) Copy To run the script: Save it as run_research.py Execute it with: python run_research.py","s":"Running Hybrid Research By \"Online Documents\"","u":"/docs/examples/hybrid_research","h":"#running-hybrid-research-by-online-documents","p":116},{"i":136,"t":"The output will be a comprehensive research report that combines insights from both web sources and your local documents. The report typically includes an executive summary, key findings, detailed analysis, comparisons between your internal data and external trends, and recommendations based on the combined insights.","s":"Understanding the Results","u":"/docs/examples/hybrid_research","h":"#understanding-the-results","p":116},{"i":138,"t":"API Key Issues: Ensure your API keys are correctly set and have the necessary permissions. Document Loading Errors: Check that your local documents are in supported formats and are not corrupted. Memory Issues: For large documents or extensive research, you may need to increase your system's available memory or adjust the chunk_size in the document processing step.","s":"Troubleshooting","u":"/docs/examples/hybrid_research","h":"#troubleshooting","p":116},{"i":140,"t":"Q: How long does a typical research session take? A: The duration varies based on the complexity of the query and the amount of data to process. It can range from 1-5 minutes for very comprehensive research. Q: Can I use GPT Researcher with other language models? A: Currently, GPT Researcher is optimized for OpenAI's models. Support for other models can be found here. Q: How does GPT Researcher handle conflicting information between local and web sources? A: The system attempts to reconcile differences by providing context and noting discrepancies in the final report. It prioritizes more recent or authoritative sources when conflicts arise. Q: Is my local data sent to external servers during the research process? A: No, your local documents are processed on your machine. Only the generated queries and synthesized information (not raw data) are sent to external services for web research. For more information and updates, please visit the GPT Researcher GitHub repository.","s":"FAQ","u":"/docs/examples/hybrid_research","h":"#faq","p":116},{"i":142,"t":"On this page","s":"Playing with Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"","p":141},{"i":144,"t":"When running reports via the frontend, you can inspect the websocket messages in the Network Tab. Here's how:","s":"Inspecting Webhooks","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#inspecting-webhooks","p":141},{"i":146,"t":"If you're concerned that your frontend isn't hitting the right API Endpoint, you can check the URL in the Network Tab. Click into the WS request & go to the \"Headers\" tab For debugging, have a look at the getHost function.","s":"Am I polling the right URL?","u":"/docs/gpt-researcher/frontend/playing-with-webhooks","h":"#am-i-polling-the-right-url","p":141},{"i":148,"t":"On this page","s":"Vector Stores","u":"/docs/gpt-researcher/context/vector-stores","h":"","p":147},{"i":150,"t":"from gpt_researcher import GPTResearcherfrom langchain.text_splitter import CharacterTextSplitterfrom langchain_openai import OpenAIEmbeddingsfrom langchain_community.vectorstores import FAISSfrom langchain_core.documents import Document# exerpt taken from - https://paulgraham.com/wealth.htmlessay = \"\"\"May 2004(This essay was originally published in Hackers & Painters.)If you wanted to get rich, how would you do it? I think your best bet would be to start or join a startup.That's been a reliable way to get rich for hundreds of years. The word \"startup\" dates from the 1960s,but what happens in one is very similar to the venture-backed trading voyages of the Middle Ages.Startups usually involve technology, so much so that the phrase \"high-tech startup\" is almost redundant.A startup is a small company that takes on a hard technical problem.Lots of people get rich knowing nothing more than that. You don't have to know physics to be a good pitcher.But I think it could give you an edge to understand the underlying principles. Why do startups have to be small?Will a startup inevitably stop being a startup as it grows larger?And why do they so often work on developing new technology? Why are there so many startups selling new drugs or computer software,and none selling corn oil or laundry detergent?The PropositionEconomically, you can think of a startup as a way to compress your whole working life into a few years.Instead of working at a low intensity for forty years, you work as hard as you possibly can for four.This pays especially well in technology, where you earn a premium for working fast.Here is a brief sketch of the economic proposition. If you're a good hacker in your mid twenties,you can get a job paying about $80,000 per year. So on average such a hacker must be able to do atleast $80,000 worth of work per year for the company just to break even. You could probably work twiceas many hours as a corporate employee, and if you focus you can probably get three times as much done in an hour.[1]You should get another multiple of two, at least, by eliminating the drag of the pointy-haired middle manager whowould be your boss in a big company. Then there is one more multiple: how much smarter are you than your jobdescription expects you to be? Suppose another multiple of three. Combine all these multipliers,and I'm claiming you could be 36 times more productive than you're expected to be in a random corporate job.[2]If a fairly good hacker is worth $80,000 a year at a big company, then a smart hacker working very hard without any corporate bullshit to slow him down should be able to do work worth about $3 million a year..........\"\"\"document = [Document(page_content=essay)]text_splitter = CharacterTextSplitter(chunk_size=200, chunk_overlap=30, separator=\"\\n\")docs = text_splitter.split_documents(documents=document)vector_store = FAISS.from_documents(documents, OpenAIEmbeddings())query = \"\"\" Summarize the essay into 3 or 4 succinct sections. Make sure to include key points regarding wealth creation. Include some recommendations for entrepreneurs in the conclusion.\"\"\"# Create an instance of GPTResearcherresearcher = GPTResearcher( query=query, report_type=\"research_report\", report_source=\"langchain_vectorstore\", vector_store=vector_store,)# Conduct research and write the reportawait researcher.conduct_research()report = await researcher.write_report() Copy","s":"Faiss","u":"/docs/gpt-researcher/context/vector-stores","h":"#faiss","p":147},{"i":152,"t":"from gpt_researcher import GPTResearcherfrom langchain_postgres.vectorstores import PGVectorfrom langchain_openai import OpenAIEmbeddingsCONNECTION_STRING = 'postgresql://someuser:somepass@localhost:5432/somedatabase'# assuming the vector store exists and contains the relevent documents# also assuming embeddings have been or will be generatedvector_store = PGVector.from_existing_index( use_jsonb=True, embedding=OpenAIEmbeddings(), collection_name='some collection name', connection=CONNECTION_STRING, async_mode=True,)query = \"\"\" Create a short report about apples. Include a section about which apples are considered best during each season.\"\"\"# Create an instance of GPTResearcherresearcher = GPTResearcher( query=query, report_type=\"research_report\", report_source=\"langchain_vectorstore\", vector_store=vector_store, )# Conduct research and write the reportawait researcher.conduct_research()report = await researcher.write_report() Copy","s":"PGVector","u":"/docs/gpt-researcher/context/vector-stores","h":"#pgvector","p":147},{"i":154,"t":"In some cases in which you want to store the scraped data and documents into your own vector store for future usages, GPT-Researcher also allows you to do so seamlessly just by inputting your vector store (make sure to set report_source value to something other than langchain_vectorstore) from gpt_researcher import GPTResearcherfrom langchain_community.vectorstores import InMemoryVectorStorefrom langchain_openai import OpenAIEmbeddingsvector_store = InMemoryVectorStore(embedding=OpenAIEmbeddings())query = \"The best LLM\"# Create an instance of GPTResearcherresearcher = GPTResearcher( query=query, report_type=\"research_report\", report_source=\"web\", vector_store=vector_store, )# Conduct research, the context will be chunked and stored in the vector_storeawait researcher.conduct_research()# Query the 5 most relevant context in our vector storerelated_contexts = await vector_store.asimilarity_search(\"GPT-4\", k = 5) print(related_contexts)print(len(related_contexts)) #Should be 5 Copy","s":"Adding Scraped Data to your vector store","u":"/docs/gpt-researcher/context/vector-stores","h":"#adding-scraped-data-to-your-vector-store","p":147},{"i":156,"t":"On this page","s":"Log Files","u":"/docs/gpt-researcher/frontend/logs","h":"","p":155},{"i":158,"t":"The log file is a JSON file that contains a list of events that happened during the research process. Each event is an object with a timestamp, type, and data. The data contains the specific information about the event. You can find the log file in the outputs folder. Or you can access the log file from the report page itself by clicking the \"Download Logs\" button. For developers, there is an additional logs folder that may be useful. See description below for more details.","s":"Log File Overview","u":"/docs/gpt-researcher/frontend/logs","h":"#log-file-overview","p":155},{"i":160,"t":"timestamp: The timestamp is in the format YYYY-MM-DDTHH:MM:SS.ffffff which is an ISO format. The main timestamp is for the generation of the file itself. The timestamps for the events are when each specific event happened during the research process. events: This is an array containing all the logged events during the research task. Each event object has the following structure. timestamp: The specific time when the event occurred, allowing you to follow the sequence of actions. type: This will always be \"event\" for now. data: Contains specific information about the event. Includes: type: This indicates the general kind of event (e.g., \"logs\"). content: A descriptor of what the tool is doing (e.g., \"starting_research\", \"running_subquery_research\", \"scraping_content\"). output: A more detailed message, which often includes visual indicators (emojis), that is sent to the user when the tool performs the task metadata: Additional data related to the event. This can be null or contain an array of relevant information like URLs.","s":"Key Components:","u":"/docs/gpt-researcher/frontend/logs","h":"#key-components","p":155},{"i":162,"t":"Here's a complete breakdown of all the unique content types and what they mean. This is a comprehensive list of all the different actions the research tool will perform. starting_research: Indicates that the research process has begun for a given task. output: Includes the text of the research query. agent_generated: This is an indicator of what the agent is used for this task output: Will show the name of the agent planning_research: Shows the tool is initially browsing to understand the scope of the request and start planning. The output indicates the tool is either browsing or doing initial planning. subqueries: Indicates that the tool has created subqueries that it will use for research output: Lists out all of the subqueries that the tool will be running to perform the research metadata: An array of strings that contain the subqueries to be run running_subquery_research: Indicates that a specific subquery research is being performed. output: Shows the specific subquery being run. added_source_url: Signifies a URL that was identified as a relevant source of information. output: Provides the URL with a checkmark emoji to indicate success. metadata: Contains the actual URL added. researching: Indicates the tool is actively searching across multiple sources for information. output: A general message indicating research across multiple sources is happening. scraping_urls: Shows the tool is beginning to scrape content from a group of URLs. output: Indicates how many URLs the tool will be scraping from. scraping_content: Indicates the tool successfully scraped the content from the URLs. output: Shows the number of pages that have been successfully scraped. scraping_images: Signifies that images were identified and selected during the scraping process. output: Shows the number of new images selected and the total images found metadata: An array containing URLs of the selected images. scraping_complete: Indicates that the scraping process is complete for the URLs. output: A message stating that the scraping process is complete fetching_query_content: Indicates that the tool is fetching content based on a specific query. output: The specific query for which content is being fetched subquery_context_window: Indicates the tool is creating a context window for a given subquery to help with more detailed research. output: A message stating the context window for the subquery is created. research_step_finalized: Indicates that the research portion of a step is finalized. output: A message stating that the research is complete. generating_subtopics: Signifies that the tool is generating subtopics to guide the report. output: A message indicating that the tool is generating subtopics. subtopics_generated: Indicates that subtopics have been generated. output: A message that subtopics have been generated. writing_introduction: Indicates the tool is beginning to write the introduction to the report. output: A message to the user that the introduction writing has started. introduction_written: Indicates the introduction to the report is finished output: A message to the user that the introduction writing is complete generating_draft_sections: Shows that the tool is generating draft sections for the report. output: A message that the report is generating draft sections. draft_sections_generated: Indicates the draft sections of the report are generated. output: A message to the user that the draft sections have been generated. fetching_relevant_written_content: Indicates the tool is fetching relevant written content for the report. output: A message to the user that relevant content is being fetched writing_report: Indicates that the tool is starting to compile the research into a report. output: A message to the user that the report generation has started. report_written: Signifies that the report generation is complete. output: A message that the report generation is finished. relevant_contents_context: Indicates that a context window for relevant content has been created. output: A message indicating a context window for relevant content has been created. writing_conclusion: Indicates the tool has started writing the conclusion for the report output: A message to the user that the conclusion is being written conclusion_written: Indicates the conclusion of the report has been written output: A message to the user that the conclusion has been written","s":"Types of Events & Their Significance","u":"/docs/gpt-researcher/frontend/logs","h":"#types-of-events--their-significance","p":155},{"i":164,"t":"Troubleshooting: If the research results are unexpected, the log files can help you understand the exact steps the tool took, including the queries used, the sources it visited, and how the report was generated. Transparency: The logs provide transparency into the research process. You can see exactly which URLs were visited, which images were selected, and how the report was built. Understanding the Process: The logs will provide an overview of what the tool does and what each of the steps look like. Reproducibility: The log files allow users to trace the exact process.","s":"How to Use the Logs","u":"/docs/gpt-researcher/frontend/logs","h":"#how-to-use-the-logs","p":155},{"i":166,"t":"By looking at the timestamps, you can see the flow of the research task. The logs will show you the subqueries used by the tool to approach the main query, all the URLs used, if images were selected for the research, and all the steps the tool took to generate the report.","s":"Example Usage","u":"/docs/gpt-researcher/frontend/logs","h":"#example-usage","p":155},{"i":168,"t":"In addition to the user-facing log files (detailed and summary reports), the application also generates two types of log files specifically for developers: A .log file which is a basic log file format for logging events as they occur A .json file which is more structured Find the logs in the logs folder.","s":"Logs for Developers","u":"/docs/gpt-researcher/frontend/logs","h":"#logs-for-developers","p":155},{"i":170,"t":"Format: Plain text format. Each line represents a log entry. Content: Timestamps with millisecond precision. Log level: Usually INFO, but could include DEBUG, WARNING, or ERROR in a more complex setup. Module name (e.g., \"research\"). Descriptive messages about various processes. Includes data about: Start and end of research tasks Web searches being performed Planning of the research Subqueries generated and their results The sizes of scraped data The size of content found from subqueries The final combined size of all context found Use Cases for Developers: Real-time Monitoring: Can be used to monitor the tool's activity in real time. Debugging: Helpful for pinpointing issues by seeing the chronological flow of operations, the size of content collected, etc. Performance Analysis: Timestamps can help in identifying bottlenecks by measuring how long certain operations take. High-level overview: Allows developers to easily see which steps of the tool were performed, and some basic information like sizes of collected content. Key Differences from User Logs: Less structured, more for developers to review in real-time. Contains technical information not usually relevant to a non-developer user. Does not have emojis or simplified language. No information on the images collected","s":"Basic Log File (.log)","u":"/docs/gpt-researcher/frontend/logs","h":"#basic-log-file-log","p":155},{"i":172,"t":"Format: Structured JSON format Content: Timestamps, as in all log files type field that can be: sub_query: which contains the subquery string along with scraped_data_size content_found: which includes the sub_query and the content_size A content field which gives a snapshot of the overall research and can contain the final context and sources found from the research for that task Use Cases for Developers: Detailed Analysis: Allows developers to view specific details of how the tool is running, particularly related to the subqueries and the results of the research. Process Understanding: Developers can see the different subqueries run and how much content each generated which can lead to better debugging and understanding of the tool. Data Inspection: Can be useful for reviewing the generated queries and content sizes. Key Differences from User Logs: Highly structured and focused on subquery execution, and the results of this process, specifically the sizes of collected information. Does not contain simplified language, emojis, or high-level explanations. Does not contain information on the overall context or the images collected, it mainly focuses on the subquery process.","s":"JSON Log File (.json)","u":"/docs/gpt-researcher/frontend/logs","h":"#json-log-file-json","p":155},{"i":174,"t":"On this page","s":"Getting Started","u":"/docs/gpt-researcher/getting-started/getting-started","h":"","p":173},{"i":176,"t":"Step 1 - Install dependencies $ pip install -r requirements.txt Copy Step 2 - Run the agent with FastAPI $ uvicorn main:app --reload Copy Step 3 - Go to http://localhost:8000 on any browser and enjoy researching!","s":"Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#quickstart","p":173},{"i":178,"t":"Select either based on your familiarity with each:","s":"Using Virtual Environment or Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#using-virtual-environment-or-poetry","p":173},{"i":180,"t":"Establishing the Virtual Environment with Activate/Deactivate configuration Create a virtual environment using the venv package with the environment name <your_name>, for example, env. Execute the following command in the PowerShell/CMD terminal: python -m venv env Copy To activate the virtual environment, use the following activation script in PowerShell/CMD terminal: .\\env\\Scripts\\activate Copy To deactivate the virtual environment, run the following deactivation script in PowerShell/CMD terminal: deactivate Copy Install the dependencies for a Virtual environment After activating the env environment, install dependencies using the requirements.txt file with the following command: python -m pip install -r requirements.txt Copy","s":"Virtual Environment","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#virtual-environment","p":173},{"i":182,"t":"Establishing the Poetry dependencies and virtual environment with Poetry version ~1.7.1 Install project dependencies and simultaneously create a virtual environment for the specified project. By executing this command, Poetry reads the project's \"pyproject.toml\" file to determine the required dependencies and their versions, ensuring a consistent and isolated development environment. The virtual environment allows for a clean separation of project-specific dependencies, preventing conflicts with system-wide packages and enabling more straightforward dependency management throughout the project's lifecycle. poetry install Copy Activate the virtual environment associated with a Poetry project By running this command, the user enters a shell session within the isolated environment associated with the project, providing a dedicated space for development and execution. This virtual environment ensures that the project dependencies are encapsulated, avoiding conflicts with system-wide packages. Activating the Poetry shell is essential for seamlessly working on a project, as it ensures that the correct versions of dependencies are used and provides a controlled environment conducive to efficient development and testing. poetry shell Copy","s":"Poetry","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#poetry","p":173},{"i":184,"t":"Launch the FastAPI application agent on a Virtual Environment or Poetry setup by executing the following command: python -m uvicorn main:app --reload Copy Visit http://localhost:8000 in any web browser and explore your research!","s":"Run the app","u":"/docs/gpt-researcher/getting-started/getting-started","h":"#run-the-app","p":173},{"i":186,"t":"On this page","s":"Run with CLI","u":"/docs/gpt-researcher/getting-started/cli","h":"","p":185},{"i":188,"t":"Clone the repository: git clone https://github.com/yourusername/gpt-researcher.gitcd gpt-researcher Copy Install the required dependencies: pip install -r requirements.txt Copy Set up your environment variables: Create a .env file in the project root and add your API keys or other necessary configurations.","s":"Installation","u":"/docs/gpt-researcher/getting-started/cli","h":"#installation","p":185},{"i":190,"t":"The basic syntax for using the CLI is: python cli.py \"<query>\" --report_type <report_type> Copy","s":"Usage","u":"/docs/gpt-researcher/getting-started/cli","h":"#usage","p":185},{"i":192,"t":"query (required): The research query you want to investigate. --report_type (required): The type of report to generate. Options include: research_report: Summary - Short and fast (~2 min) detailed_report: Detailed - In depth and longer (~5 min) resource_report outline_report custom_report subtopic_report","s":"Arguments","u":"/docs/gpt-researcher/getting-started/cli","h":"#arguments","p":185},{"i":194,"t":"Generate a quick research report on climate change: python cli.py \"What are the main causes of climate change?\" --report_type research_report Copy Create a detailed report on artificial intelligence: python cli.py \"The impact of artificial intelligence on job markets\" --report_type detailed_report Copy Generate an outline report on renewable energy: python cli.py \"Renewable energy sources and their potential\" --report_type outline_report Copy","s":"Examples","u":"/docs/gpt-researcher/getting-started/cli","h":"#examples","p":185},{"i":196,"t":"The generated report will be saved as a Markdown file in the outputs directory. The filename will be a unique UUID.","s":"Output","u":"/docs/gpt-researcher/getting-started/cli","h":"#output","p":185},{"i":198,"t":"The execution time may vary depending on the complexity of the query and the type of report requested. Make sure you have the necessary API keys and permissions set up in your .env file for the tool to function correctly.","s":"Note","u":"/docs/gpt-researcher/getting-started/cli","h":"#note","p":185},{"i":200,"t":"Docker: Quickstart Step 1 - Install & Open Docker Desktop Follow instructions at https://www.docker.com/products/docker-desktop/ Step 2 - Follow this flow This mainly includes cloning the '.env.example' file, adding your API Keys to the cloned file and saving the file as '.env' Step 3 - Within root, run with Docker. docker-compose up --build Copy If that doesn't work, try running it without the dash: docker compose up --build Copy Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes: the Python server running on localhost:8000 the React app running on localhost:3000 Visit localhost:3000 on any browser and enjoy researching!","s":"Docker: Quickstart","u":"/docs/gpt-researcher/getting-started/getting-started-with-docker","h":"","p":199},{"i":202,"t":"On this page","s":"Introduction","u":"/docs/gpt-researcher/getting-started/introduction","h":"","p":201},{"i":204,"t":"To form objective conclusions for manual research tasks can take time, sometimes weeks to find the right resources and information. Current LLMs are trained on past and outdated information, with heavy risks of hallucinations, making them almost irrelevant for research tasks. Current LLMs are limited to short token outputs which are not sufficient for long detailed research reports (2k+ words). Solutions that enable web search (such as ChatGPT + Web Plugin), only consider limited resources and content that in some cases result in superficial conclusions or biased answers. Using only a selection of resources can create bias in determining the right conclusions for research questions or tasks.","s":"Why GPT Researcher?","u":"/docs/gpt-researcher/getting-started/introduction","h":"#why-gpt-researcher","p":201},{"i":206,"t":"The main idea is to run \"planner\" and \"execution\" agents, whereas the planner generates questions to research, and the execution agents seek the most related information based on each generated research question. Finally, the planner filters and aggregates all related information and creates a research report. The agents leverage both gpt-4o-mini and gpt-4o (128K context) to complete a research task. We optimize for costs using each only when necessary. The average research task takes around 3 minutes to complete, and costs ~$0.1. More specifically: Create a domain specific agent based on research query or task. Generate a set of research questions that together form an objective opinion on any given task. For each research question, trigger a crawler agent that scrapes online resources for information relevant to the given task. For each scraped resources, summarize based on relevant information and keep track of its sources. Finally, filter and aggregate all summarized sources and generate a final research report.","s":"Architecture","u":"/docs/gpt-researcher/getting-started/introduction","h":"#architecture","p":201},{"i":209,"t":"Full Introduction Playlist How it Works How to Install Live Demo Homepage","s":"Tutorials","u":"/docs/gpt-researcher/getting-started/introduction","h":"#tutorials","p":201},{"i":211,"t":"📝 Generate research, outlines, resources and lessons reports 📜 Can generate long and detailed research reports (over 2K words) 🌐 Aggregates over 20 web sources per research to form objective and factual conclusions 🖥️ Includes an easy-to-use web interface (HTML/CSS/JS) 🔍 Scrapes web sources with javascript support 📂 Keeps track and context of visited and used web sources 📄 Export research reports to PDF, Word and more... Let's get started here!","s":"Features","u":"/docs/gpt-researcher/getting-started/introduction","h":"#features","p":201},{"i":213,"t":"On this page","s":"How to Choose","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"","p":212},{"i":215,"t":"GPT Researcher offers multiple ways to leverage its capabilities: GPT Researcher PIP agent: Ideal for integrating GPT Researcher into your existing projects and workflows. Backend: A backend service to interact with the frontend user interfaces, offering advanced features like detailed reports. Multi Agent System: An advanced setup using LangGraph, offering the most comprehensive research capabilities. Frontend: Several front-end solutions depending on your needs, including a simple HTML/JS version and a more advanced NextJS version.","s":"Options","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#options","p":212},{"i":218,"t":"The PIP package is ideal for leveraging GPT Researcher as an agent in your preferred environment and code. Pros: Easy integration into existing projects Flexible usage in multi-agent systems, chains, or workflows Optimized for production performance Cons: Requires some coding knowledge May need additional setup for advanced features Installation: pip install gpt-researcher Copy System Requirements: Python 3.10+ pip package manager Learn More: PIP Documentation","s":"1. PIP Package","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#1-pip-package","p":212},{"i":220,"t":"For a complete out-of-the-box experience, including a sleek frontend, you can clone our repository. Pros: Ready-to-use frontend and backend services Includes advanced use cases like detailed report generation Optimal user experience Cons: Less flexible than the PIP package for custom integrations Requires setting up the entire application Getting Started: Clone the repository: git clone https://github.com/assafelovic/gpt-researcher.git Follow the installation instructions System Requirements: Git Python 3.10+ Node.js and npm (for frontend) Advanced Usage Example: Detailed Report Implementation","s":"2. End-to-End Application","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#2-end-to-end-application","p":212},{"i":222,"t":"We've collaborated with LangChain to support multi-agents with LangGraph and GPT Researcher, offering the most complex and comprehensive version of GPT Researcher. Pros: Very detailed, customized research reports Inner AI agent loops and reasoning Cons: More expensive and time-consuming Heavyweight for production use This version is recommended for local, experimental, and educational use. We're working on providing a lighter version soon! System Requirements: Python 3.10+ LangGraph library Learn More: GPT Researcher x LangGraph","s":"3. Multi Agent System with LangGraph","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#3-multi-agent-system-with-langgraph","p":212},{"i":224,"t":"Feature PIP Package End-to-End Application Multi Agent System Ease of Integration High Medium Low Customization High Medium High Out-of-the-box UI No Yes No Complexity Low Medium High Best for Developers End-users Researchers/Experimenters Please note that all options have been optimized and refined for production use.","s":"Comparison Table","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#comparison-table","p":212},{"i":226,"t":"To learn more about each of the options, check out these docs and code snippets: PIP Package: Install: pip install gpt-researcher Integration guide End-to-End Application: Clone the repository: git clone https://github.com/assafelovic/gpt-researcher.git Installation instructions Multi-Agent System: Multi-Agents code LangGraph documentation Blog","s":"Deep Dive","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#deep-dive","p":212},{"i":228,"t":"GPT Researcher is actively maintained and updated. To ensure you're using the latest version: For the PIP package: pip install --upgrade gpt-researcher For the End-to-End Application: Pull the latest changes from the GitHub repository For the Multi-Agent System: Check the documentation for compatibility with the latest LangChain and LangGraph versions","s":"Versioning and Updates","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#versioning-and-updates","p":212},{"i":230,"t":"For common issues and questions, please refer to our FAQ section in the documentation.","s":"Troubleshooting and FAQs","u":"/docs/gpt-researcher/getting-started/how-to-choose","h":"#troubleshooting-and-faqs","p":212},{"i":232,"t":"On this page","s":"Running on Linux","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"","p":231},{"i":234,"t":"The default Ubuntu droplet option on DigitalOcean works well, but this setup should work on any hosting service with similar specifications: 2 GB RAM 1 vCPU 50 GB SSD Storage Here's a screenshot of the recommended Ubuntu machine specifications:","s":"Server Requirements","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#server-requirements","p":231},{"i":236,"t":"After setting up your server, follow these steps to install Docker, Docker Compose, and Nginx. Some more commands to achieve that:","s":"Deployment Steps","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#deployment-steps","p":231},{"i":239,"t":"sudo apt update### Step 2: Install Git### Git is a version control system. Install it using:sudo apt install git -y### Verify the installation by checking the Git version:git --version### Step 3: Install Docker### Docker is a platform for developing, shipping, and running applications inside containers.### Install prerequisites:sudo apt install apt-transport-https ca-certificates curl software-properties-common -y### Add Docker’s official GPG key:curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg### Set up the stable repository:echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null### Update the package index again and install Docker:sudo apt updatesudo apt install docker-ce -y### Verify Docker installation:sudo systemctl status docker### Optionally, add your user to the docker group to run Docker without sudo:sudo usermod -aG docker ${USER}### Log out and back in for the group change to take effect.Step 4: Install Nginx### Nginx is a high-performance web server.### Install Nginx:sudo apt install nginx -y### Start and enable Nginx:sudo systemctl start nginxsudo systemctl enable nginx### Verify Nginx installation:sudo systemctl status nginx Copy Here's your nginx config file: events {}http { server { listen 80; server_name name.example; client_max_body_size 64M; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location ~ ^/(ws|upload|files|outputs|getConfig|setConfig) { proxy_pass http://localhost:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection \"Upgrade\"; proxy_set_header Host $host; } }} Copy And if you're using SSL: server { server_name name.example; client_max_body_size 64M; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location ~ ^/(ws|upload|files|outputs|getConfig|setConfig) { proxy_pass http://localhost:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection \"Upgrade\"; proxy_set_header Host $host; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/name.example/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/name.example/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot}server { if ($host = name.example) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name name.example; return 404; # managed by Certbot} Copy And the relevant commands: vim /etc/nginx/nginx.conf### Edit it to reflect above. Then verify all is good with:sudo nginx -t# If there are no errors:sudo systemctl restart nginx# Clone .env.example as .env# Run from root: docker-compose up --build Copy","s":"First, ensure your package index is up-to-date:","u":"/docs/gpt-researcher/getting-started/linux-deployment","h":"#first-ensure-your-package-index-is-up-to-date","p":231},{"i":241,"t":"On this page","s":"Automated Tests","u":"/docs/gpt-researcher/gptr/automated-tests","h":"","p":240},{"i":243,"t":"This repository contains the code for the automated testing of the GPT-Researcher Repo using Github Actions. The tests are triggered in a docker container which runs the tests via the pytest module.","s":"Automated Testing with Github Actions","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#automated-testing-with-github-actions","p":240},{"i":245,"t":"You can run the tests:","s":"Running the Tests","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#running-the-tests","p":240},{"i":247,"t":"docker-compose --profile test run --rm gpt-researcher-tests Copy","s":"Via a docker command","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-docker-command","p":240},{"i":249,"t":"Attaching here the required settings & screenshots on the github repo level: Step 1: Within the repo, press the \"Settings\" tab Step 2: Create a new environment named \"tests\" (all lowercase) Step 3: Click into the \"tests\" environment & add environment secrets of OPENAI_API_KEY & TAVILY_API_KEY Get the keys from here: https://app.tavily.com/sign-in https://platform.openai.com/api-keys If configured correctly, here's what the Github action should look like when opening a new PR or committing to an open PR:","s":"Via a Github Action","u":"/docs/gpt-researcher/gptr/automated-tests","h":"#via-a-github-action","p":240},{"i":251,"t":"On this page","s":"Configuration","u":"/docs/gpt-researcher/gptr/config","h":"","p":250},{"i":253,"t":"If you are not using OpenAI's models, but other model providers, besides the general configuration above, also additional environment variables are required. Check the langchain documentation about your model for the exact configuration of the API keys and endpoints. Here is an example for Azure OpenAI configuration: OPENAI_API_VERSION=\"2024-05-01-preview\" # or whatever you are usingAZURE_OPENAI_ENDPOINT=\"https://CHANGEMEN.openai.azure.com/\" # change to the name of your deploymentAZURE_OPENAI_API_KEY=\"[Your Key]\" # change to your API keyEMBEDDING=\"azure_openai:text-embedding-ada-002\" # change to the deployment of your embedding modelFAST_LLM=\"azure_openai:gpt-4o-mini\" # change to the name of your deployment (not model-name)FAST_TOKEN_LIMIT=4000SMART_LLM=\"azure_openai:gpt-4o\" # change to the name of your deployment (not model-name)SMART_TOKEN_LIMIT=4000RETRIEVER=\"bing\" # if you are using Bing as your search engine (which is likely if you use Azure)BING_API_KEY=\"[Your Key]\" Copy","s":"Example: Azure OpenAI Configuration","u":"/docs/gpt-researcher/gptr/config","h":"#example-azure-openai-configuration","p":250},{"i":255,"t":"Agent Example If you're interested in using GPT Researcher as a standalone agent, you can easily import it into any existing Python project. Below, is an example of calling the agent to generate a research report: from gpt_researcher import GPTResearcherimport asyncioasync def fetch_report(query): \"\"\" Fetch a research report based on the provided query and report type. \"\"\" researcher = GPTResearcher(query=query) await researcher.conduct_research() report = await researcher.write_report() return reportasync def generate_research_report(query): \"\"\" This is a sample script that executes an async main function to run a research report. \"\"\" report = await fetch_report(query) print(report)if __name__ == \"__main__\": QUERY = \"What happened in the latest burning man floods?\" asyncio.run(generate_research_report(query=QUERY)) Copy You can further enhance this example to use the returned report as context for generating valuable content such as news article, marketing content, email templates, newsletters, etc. You can also use GPT Researcher to gather information about code documentation, business analysis, financial information and more. All of which can be used to complete much more complex tasks that require factual and high quality realtime information.","s":"Agent Example","u":"/docs/gpt-researcher/gptr/example","h":"","p":254},{"i":257,"t":"Handling Logs Here is a snippet of code to help you handle the streaming logs of your Research tasks. from typing import Dict, Anyimport asynciofrom gpt_researcher import GPTResearcherclass CustomLogsHandler: \"\"\"A custom Logs handler class to handle JSON data.\"\"\" def __init__(self): self.logs = [] # Initialize logs to store data async def send_json(self, data: Dict[str, Any]) -> None: \"\"\"Send JSON data and log it.\"\"\" self.logs.append(data) # Append data to logs print(f\"My custom Log: {data}\") # For demonstration, print the logasync def run(): # Define the necessary parameters with sample values query = \"What happened in the latest burning man floods?\" report_type = \"research_report\" # Type of report to generate report_source = \"online\" # Could specify source like 'online', 'books', etc. tone = \"informative\" # Tone of the report ('informative', 'casual', etc.) config_path = None # Path to a config file, if needed # Initialize researcher with a custom WebSocket custom_logs_handler = CustomLogsHandler() researcher = GPTResearcher( query=query, report_type=report_type, report_source=report_source, tone=tone, config_path=config_path, websocket=custom_logs_handler ) await researcher.conduct_research() # Conduct the research report = await researcher.write_report() # Write the research report return report# Run the asynchronous function using asyncioif __name__ == \"__main__\": asyncio.run(run()) Copy The data from the research process will be logged and stored in the CustomLogsHandler instance. You can customize the logging behavior as needed for your application. Here's a sample of the output: { \"type\": \"logs\", \"content\": \"added_source_url\", \"output\": \"✅ Added source url to research: https://www.npr.org/2023/09/28/1202110410/how-rumors-and-conspiracy-theories-got-in-the-way-of-mauis-fire-recovery\\n\", \"metadata\": \"https://www.npr.org/2023/09/28/1202110410/how-rumors-and-conspiracy-theories-got-in-the-way-of-mauis-fire-recovery\"} Copy The metadata field will include whatever metadata is relevant to the log entry. Let the script above run to completion for the full logs output of a given research task.","s":"Handling Logs","u":"/docs/gpt-researcher/gptr/handling-logs-as-they-stream","h":"","p":256},{"i":259,"t":"On this page","s":"PIP Package","u":"/docs/gpt-researcher/gptr/pip-package","h":"","p":258},{"i":261,"t":"Follow these easy steps to get started: Pre-requisite: Ensure Python 3.10+ is installed on your machine 💻 Install gpt-researcher: Grab the official package from PyPi. pip install gpt-researcher Copy Environment Variables: Create a .env file with your OpenAI API key or simply export it export OPENAI_API_KEY={Your OpenAI API Key here} Copy export TAVILY_API_KEY={Your Tavily API Key here} Copy Start using GPT Researcher in your own codebase","s":"Steps to Install GPT Researcher","u":"/docs/gpt-researcher/gptr/pip-package","h":"#steps-to-install-gpt-researcher","p":258},{"i":263,"t":"from gpt_researcher import GPTResearcherimport asyncioasync def get_report(query: str, report_type: str): researcher = GPTResearcher(query, report_type) research_result = await researcher.conduct_research() report = await researcher.write_report() # Get additional information research_context = researcher.get_research_context() research_costs = researcher.get_costs() research_images = researcher.get_research_images() research_sources = researcher.get_research_sources() return report, research_context, research_costs, research_images, research_sourcesif __name__ == \"__main__\": query = \"what team may win the NBA finals?\" report_type = \"research_report\" report, context, costs, images, sources = asyncio.run(get_report(query, report_type)) print(\"Report:\") print(report) print(\"\\nResearch Costs:\") print(costs) print(\"\\nNumber of Research Images:\") print(len(images)) print(\"\\nNumber of Research Sources:\") print(len(sources)) Copy","s":"Example Usage","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-usage","p":258},{"i":266,"t":"query = \"Latest developments in renewable energy technologies\"report_type = \"research_report\" Copy","s":"Example 1: Research Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-1-research-report","p":258},{"i":268,"t":"query = \"List of top AI conferences in 2023\"report_type = \"resource_report\" Copy","s":"Example 2: Resource Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-2-resource-report","p":258},{"i":270,"t":"query = \"Outline for an article on the impact of AI in education\"report_type = \"outline_report\" Copy","s":"Example 3: Outline Report","u":"/docs/gpt-researcher/gptr/pip-package","h":"#example-3-outline-report","p":258},{"i":273,"t":"from fastapi import FastAPIfrom gpt_researcher import GPTResearcherimport asyncioapp = FastAPI()@app.get(\"/report/{report_type}\")async def get_report(query: str, report_type: str) -> dict: researcher = GPTResearcher(query, report_type) research_result = await researcher.conduct_research() report = await researcher.write_report() source_urls = researcher.get_source_urls() research_costs = researcher.get_costs() research_images = researcher.get_research_images() research_sources = researcher.get_research_sources() return { \"report\": report, \"source_urls\": source_urls, \"research_costs\": research_costs, \"num_images\": len(research_images), \"num_sources\": len(research_sources) }# Run the server# uvicorn main:app --reload Copy","s":"FastAPI Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#fastapi-example","p":258},{"i":275,"t":"Pre-requisite: Install flask with the async extra. pip install 'flask[async]' Copy from flask import Flask, request, jsonifyfrom gpt_researcher import GPTResearcherapp = Flask(__name__)@app.route('/report/<report_type>', methods=['GET'])async def get_report(report_type): query = request.args.get('query') researcher = GPTResearcher(query, report_type) research_result = await researcher.conduct_research() report = await researcher.write_report() source_urls = researcher.get_source_urls() research_costs = researcher.get_costs() research_images = researcher.get_research_images() research_sources = researcher.get_research_sources() return jsonify({ \"report\": report, \"source_urls\": source_urls, \"research_costs\": research_costs, \"num_images\": len(research_images), \"num_sources\": len(research_sources) })# Run the server# flask run Copy Run the server flask run Copy Example Request curl -X GET \"http://localhost:5000/report/research_report?query=what team may win the nba finals?\" Copy","s":"Flask Example","u":"/docs/gpt-researcher/gptr/pip-package","h":"#flask-example","p":258},{"i":277,"t":"GPT Researcher provides several methods to retrieve additional information about the research process:","s":"Getters and Setters","u":"/docs/gpt-researcher/gptr/pip-package","h":"#getters-and-setters","p":258},{"i":279,"t":"Sources are the URLs that were used to gather information for the research. source_urls = researcher.get_source_urls() Copy","s":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources","p":258},{"i":281,"t":"Context is all the retrieved information from the research. It includes the sources and their corresponding content. research_context = researcher.get_research_context() Copy","s":"Get Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-context","p":258},{"i":283,"t":"Costs are the number of tokens consumed during the research process. research_costs = researcher.get_costs() Copy","s":"Get Research Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-costs","p":258},{"i":285,"t":"Retrieves a list of images found during the research process. research_images = researcher.get_research_images() Copy","s":"Get Research Images","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-images","p":258},{"i":287,"t":"Retrieves a list of research sources, including title, content, and images. research_sources = researcher.get_research_sources() Copy","s":"Get Research Sources","u":"/docs/gpt-researcher/gptr/pip-package","h":"#get-research-sources-1","p":258},{"i":289,"t":"You can set the verbose mode to get more detailed logs. researcher.set_verbose(True) Copy","s":"Set Verbose","u":"/docs/gpt-researcher/gptr/pip-package","h":"#set-verbose","p":258},{"i":291,"t":"You can also add costs to the research process if you want to track the costs from external usage. researcher.add_costs(0.22) Copy","s":"Add Costs","u":"/docs/gpt-researcher/gptr/pip-package","h":"#add-costs","p":258},{"i":294,"t":"You can customize various aspects of the research process by passing additional parameters when initializing the GPTResearcher: researcher = GPTResearcher( query=\"Your research query\", report_type=\"research_report\", report_format=\"APA\", tone=\"formal and objective\", max_subtopics=5, verbose=True) Copy","s":"Customizing the Research Process","u":"/docs/gpt-researcher/gptr/pip-package","h":"#customizing-the-research-process","p":258},{"i":296,"t":"After conducting research, you can process the results in various ways: # Conduct researchresearch_result = await researcher.conduct_research()# Generate a reportreport = await researcher.write_report()# Generate a conclusionconclusion = await researcher.write_report_conclusion(report)# Get subtopicssubtopics = await researcher.get_subtopics()# Get draft section titles for a subtopicdraft_titles = await researcher.get_draft_section_titles(\"Subtopic name\") Copy","s":"Handling Research Results","u":"/docs/gpt-researcher/gptr/pip-package","h":"#handling-research-results","p":258},{"i":298,"t":"You can use the research context for further processing or analysis: # Get the full research contextcontext = researcher.get_research_context()# Get similar written contents based on draft section titlessimilar_contents = await researcher.get_similar_written_contents_by_draft_section_titles( current_subtopic=\"Subtopic name\", draft_section_titles=[\"Title 1\", \"Title 2\"], written_contents=some_written_contents, max_results=10) Copy This comprehensive documentation should help users understand and utilize the full capabilities of the GPT Researcher package.","s":"Working with Research Context","u":"/docs/gpt-researcher/gptr/pip-package","h":"#working-with-research-context","p":258},{"i":300,"t":"On this page","s":"Scraping Options","u":"/docs/gpt-researcher/gptr/scraping","h":"","p":299},{"i":302,"t":"You can choose your preferred scraping method by setting the SCRAPER environment variable: For BeautifulSoup (static scraping): export SCRAPER=\"bs\" Copy For Selenium (dynamic browser scraping): export SCRAPER=\"browser\" Copy Note: If not set, GPT Researcher will default to BeautifulSoup for scraping.","s":"Configuring Scraping Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#configuring-scraping-method","p":299},{"i":305,"t":"When SCRAPER=\"bs\", GPT Researcher uses BeautifulSoup for static scraping. This method: Sends a single HTTP request to fetch the page content Parses the static HTML content Extracts text and data from the parsed HTML Benefits: Faster and more lightweight Doesn't require additional setup Works well for simple, static websites Limitations: Cannot handle dynamic content loaded by JavaScript May miss content that requires user interaction to display","s":"BeautifulSoup (Static Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#beautifulsoup-static-scraping","p":299},{"i":307,"t":"When SCRAPER=\"browser\", GPT Researcher uses Selenium for dynamic scraping. This method: Opens a real browser instance (Chrome by default) Loads the page and executes JavaScript Waits for dynamic content to load Extracts text and data from the fully rendered page Benefits: Can scrape dynamically loaded content Simulates real user interactions (scrolling, clicking, etc.) Works well for complex, JavaScript-heavy websites Limitations: Slower than static scraping Requires more system resources Requires additional setup (Selenium and WebDriver installation)","s":"Selenium (Browser Scraping)","u":"/docs/gpt-researcher/gptr/scraping","h":"#selenium-browser-scraping","p":299},{"i":309,"t":"If you choose to use Selenium (SCRAPER=\"browser\"), you'll need to: Install the Selenium package: pip install selenium Copy Download the appropriate WebDriver for your browser: For Chrome: ChromeDriver For Firefox: GeckoDriver For Safari: Built-in, no download required Ensure the WebDriver is in your system's PATH.","s":"Additional Setup for Selenium","u":"/docs/gpt-researcher/gptr/scraping","h":"#additional-setup-for-selenium","p":299},{"i":311,"t":"Use BeautifulSoup (static) for: Simple websites with mostly static content Scenarios where speed is a priority When you don't need to interact with the page Use Selenium (dynamic) for: Websites with content loaded via JavaScript Sites that require scrolling or clicking to load more content When you need to simulate user interactions","s":"Choosing the Right Method","u":"/docs/gpt-researcher/gptr/scraping","h":"#choosing-the-right-method","p":299},{"i":313,"t":"If Selenium fails to start, ensure you have the correct WebDriver installed and it's in your system's PATH. If you encounter an ImportError related to Selenium, make sure you've installed the Selenium package. If the scraper misses expected content, try switching between static and dynamic scraping to see which works better for your target website. Remember, the choice between static and dynamic scraping can significantly impact the quality and completeness of the data GPT Researcher can gather. Choose the method that best suits your research needs and the websites you're targeting.","s":"Troubleshooting","u":"/docs/gpt-researcher/gptr/scraping","h":"#troubleshooting","p":299},{"i":315,"t":"On this page","s":"Querying the Backend","u":"/docs/gpt-researcher/gptr/querying-the-backend","h":"","p":314},{"i":317,"t":"In this section, we will discuss how to query the GPTR backend server. The GPTR backend server is a Python server that runs the GPTR Python package. The server listens for WebSocket connections and processes incoming messages to generate reports, streaming back logs and results to the client. An example WebSocket client is implemented in the gptr-webhook.js file below. This function sends a Webhook Message to the GPTR Python backend running on localhost:8000, but this example can also be modified to query a GPTR Server hosted on Linux. // gptr-webhook.js const WebSocket = require('ws');let socket = null;let responseCallback = null;async function initializeWebSocket() { if (!socket) { const host = 'localhost:8000'; const ws_uri = `ws://${host}/ws`; socket = new WebSocket(ws_uri); socket.onopen = () => { console.log('WebSocket connection established'); }; socket.onmessage = (event) => { const data = JSON.parse(event.data); console.log('WebSocket data received:', data); if (data.content === 'dev_team_result' && data.output.rubber_ducker_thoughts != undefined && data.output.tech_lead_review != undefined) { if (responseCallback) { responseCallback(data.output); responseCallback = null; // Clear callback after use } } else { console.log('Received data:', data); } }; socket.onclose = () => { console.log('WebSocket connection closed'); socket = null; }; socket.onerror = (error) => { console.error('WebSocket error:', error); }; }}async function sendWebhookMessage(message) { return new Promise((resolve, reject) => { if (!socket || socket.readyState !== WebSocket.OPEN) { initializeWebSocket(); } const data = { task: message, report_type: 'dev_team', report_source: 'web', tone: 'Objective', headers: {}, repo_name: 'elishakay/gpt-researcher' }; const payload = \"start \" + JSON.stringify(data); responseCallback = (response) => { resolve(response); // Resolve the promise with the WebSocket response }; if (socket.readyState === WebSocket.OPEN) { socket.send(payload); console.log('Message sent:', payload); } else { socket.onopen = () => { socket.send(payload); console.log('Message sent after connection:', payload); }; } });}module.exports = { sendWebhookMessage}; Copy And here's how you can leverage this helper function: const { sendWebhookMessage } = require('./gptr-webhook');async function main() { const message = 'How do I get started with GPT-Researcher Websockets?'; const response = await sendWebhookMessage(message); console.log('Response:', response);} Copy","s":"Introduction","u":"/docs/gpt-researcher/gptr/querying-the-backend","h":"#introduction","p":314},{"i":319,"t":"On this page","s":"Troubleshooting","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"","p":318},{"i":321,"t":"This relates to not having permission to use gpt-4 yet. Based on OpenAI, it will be widely available for all by end of July.","s":"model: gpt-4 does not exist","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#model-gpt-4-does-not-exist","p":318},{"i":323,"t":"The issue relates to the library WeasyPrint (which is used to generate PDFs from the research report). Please follow this guide to resolve it: https://doc.courtbouillon.org/weasyprint/stable/first_steps.html Or you can install this package manually In case of MacOS you can install this lib using brew install glib pango If you face an issue with linking afterward, you can try running brew link glib In case of Linux you can install this lib using sudo apt install libglib2.0-dev","s":"cannot load library 'gobject-2.0-0'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-gobject-20-0","p":318},{"i":325,"t":"In case of MacOS you can install this lib using brew install pango In case of Linux you can install this lib using sudo apt install libpango-1.0-0 Workaround for Mac M chip users If the above solutions don't work, you can try the following: Install a fresh version of Python 3.11 pointed to brew: brew install python@3.11 Install the required libraries: brew install pango glib gobject-introspection Install the required GPT Researcher Python packages: pip3.11 install -r requirements.txt Run the app with Python 3.11 (using brew): python3.11 -m uvicorn main:app --reload","s":"cannot load library 'pango'","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#cannot-load-library-pango","p":318},{"i":327,"t":"We're using Selenium for site scraping. Some sites fail to be scraped. In these cases, restart and try running again.","s":"Error processing the url","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#error-processing-the-url","p":318},{"i":329,"t":"Many users have an issue with their chromedriver because the latest chrome browser version doesn't have a compatible chrome driver yet. To downgrade your Chrome web browser using slimjet, follow these steps. First, visit the website and scroll down to find the list of available older Chrome versions. Choose the version you wish to install making sure it's compatible with your operating system. Once you've selected the desired version, click on the corresponding link to download the installer. Before proceeding with the installation, it's crucial to uninstall your current version of Chrome to avoid conflicts. It's important to check if the version you downgrade to, has a chromedriver available in the official chrome driver website If none of the above work, you can try out our hosted beta","s":"Chrome version issues","u":"/docs/gpt-researcher/gptr/troubleshooting","h":"#chrome-version-issues","p":318},{"i":331,"t":"Testing your LLM Here is a snippet of code to help you verify that your LLM-related environment variables are set up correctly. from gpt_researcher.config.config import Configfrom gpt_researcher.utils.llm import create_chat_completionimport asynciofrom dotenv import load_dotenvload_dotenv()async def main(): cfg = Config() try: report = await create_chat_completion( model=cfg.smart_llm_model, messages = [{\"role\": \"user\", \"content\": \"sup?\"}], temperature=0.35, llm_provider=cfg.smart_llm_provider, stream=True, max_tokens=cfg.smart_token_limit, llm_kwargs=cfg.llm_kwargs ) except Exception as e: print(f\"Error in calling LLM: {e}\")# Run the async functionasyncio.run(main()) Copy","s":"Testing your LLM","u":"/docs/gpt-researcher/llms/testing-your-llm","h":"","p":330},{"i":333,"t":"On this page","s":"Configure LLM","u":"/docs/gpt-researcher/llms/llms","h":"","p":332},{"i":335,"t":"# set the custom OpenAI API keyOPENAI_API_KEY=[Your Key]# specify llmsFAST_LLM=\"openai:gpt-4o-mini\"SMART_LLM=\"openai:gpt-4o\"STRATEGIC_LLM=\"openai:o1-preview\"# specify embeddingEMBEDDING=\"openai:text-embedding-3-small\" Copy","s":"OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#openai","p":332},{"i":337,"t":"Create a local OpenAI API using llama.cpp Server. For custom LLM, specify \"openai:{your-llm}\" # set the custom OpenAI API urlOPENAI_BASE_URL=\"http://localhost:1234/v1\"# set the custom OpenAI API keyOPENAI_API_KEY=\"dummy_key\"# specify custom llms FAST_LLM=\"openai:your_fast_llm\"SMART_LLM=\"openai:your_smart_llm\"STRATEGIC_LLM=\"openai:your_strategic_llm\" Copy For custom embedding, set \"custom:{your-embedding}\" # set the custom OpenAI API urlOPENAI_BASE_URL=\"http://localhost:1234/v1\"# set the custom OpenAI API keyOPENAI_API_KEY=\"dummy_key\"# specify the custom embedding model EMBEDDING=\"custom:your_embedding\" Copy","s":"Custom LLM","u":"/docs/gpt-researcher/llms/llms","h":"#custom-llm","p":332},{"i":339,"t":"See also the documentation in the Langchain Azure OpenAI page. On Azure OpenAI you will need to create deployments for each model you want to use. Please also specify the model names/deployment names in your .env file: Required Embedding Model: To ensure optimal performance, GPT Researcher requires the text-embedding-3-large model. Please deploy this specific model to your Azure Endpoint. AZURE_OPENAI_API_KEY=[Your Key]AZURE_OPENAI_ENDPOINT=https://{your-endpoint}.openai.azure.com/OPENAI_API_VERSION=2024-05-01-preview# note that the deployment name must be the same as the model nameFAST_LLM=azure_openai:gpt-4o-mini SMART_LLM=azure_openai:gpt-4oSTRATEGIC_LLM=azure_openai:o1-preview Copy","s":"Azure OpenAI","u":"/docs/gpt-researcher/llms/llms","h":"#azure-openai","p":332},{"i":341,"t":"GPT Researcher supports both Ollama LLMs and embeddings. You can choose each or both. To use Ollama you can set the following environment variables OLLAMA_BASE_URL=http://localhost:11434FAST_LLM=\"ollama:llama3\"SMART_LLM=\"ollama:llama3\"STRATEGIC_LLM=\"ollama:llama3\"EMBEDDING=\"ollama:nomic-embed-text\" Copy","s":"Ollama","u":"/docs/gpt-researcher/llms/llms","h":"#ollama","p":332},{"i":343,"t":"GroqCloud provides advanced AI hardware and software solutions designed to deliver amazingly fast AI inference performance. To leverage Groq in GPT-Researcher, you will need a GroqCloud account and an API Key. (NOTE: Groq has a very generous free tier.)","s":"Groq","u":"/docs/gpt-researcher/llms/llms","h":"#groq","p":332},{"i":345,"t":"You can signup here: https://console.groq.com/login Once you are logged in, you can get an API Key here: https://console.groq.com/keys Once you have an API key, you will need to add it to your systems environment using the variable name: GROQ_API_KEY=\"*********************\"","s":"Sign up","u":"/docs/gpt-researcher/llms/llms","h":"#sign-up","p":332},{"i":347,"t":"And finally, you will need to configure the GPT-Researcher Provider and Model variables: GROQ_API_KEY=[Your Key]# Set one of the LLM models supported by GroqFAST_LLM=\"groq:Mixtral-8x7b-32768\"SMART_LLM=\"groq:Mixtral-8x7b-32768\"STRATEGIC_LLM=\"groq:Mixtral-8x7b-32768\" Copy NOTE: As of the writing of this Doc (May 2024), the available Language Models from Groq are: Llama3-70b-8192 Llama3-8b-8192 Mixtral-8x7b-32768 Gemma-7b-it","s":"Update env vars","u":"/docs/gpt-researcher/llms/llms","h":"#update-env-vars","p":332},{"i":349,"t":"Refer to Anthropic Getting started page to obtain Anthropic API key. Update the corresponding env vars, for example: ANTHROPIC_API_KEY=[Your key]FAST_LLM=\"anthropic:claude-2.1\"SMART_LLM=\"anthropic:claude-3-opus-20240229\"STRATEGIC_LLM=\"anthropic:claude-3-opus-20240229\" Copy Anthropic does not offer its own embedding model.","s":"Anthropic","u":"/docs/gpt-researcher/llms/llms","h":"#anthropic","p":332},{"i":351,"t":"Sign up for a Mistral API key. Then update the corresponding env vars, for example: MISTRAL_API_KEY=[Your key]FAST_LLM=\"mistralai:open-mistral-7b\"SMART_LLM=\"mistralai:mistral-large-latest\"STRATEGIC_LLM=\"mistralai:mistral-large-latest\"EMBEDDING=\"mistralai:mistral-embed\" Copy","s":"Mistral AI","u":"/docs/gpt-researcher/llms/llms","h":"#mistral-ai","p":332},{"i":353,"t":"Together AI offers an API to query 50+ leading open-source models in a couple lines of code. Then update corresponding env vars, for example: TOGETHER_API_KEY=[Your key]FAST_LLM=\"together:meta-llama/Llama-3-8b-chat-hf\"SMART_LLM=\"together:meta-llama/Llama-3-70b-chat-hf\"STRATEGIC_LLM=\"together:meta-llama/Llama-3-70b-chat-hf\"EMBEDDING=\"mistralai:nomic-ai/nomic-embed-text-v1.5\" Copy","s":"Together AI","u":"/docs/gpt-researcher/llms/llms","h":"#together-ai","p":332},{"i":355,"t":"This integration requires a bit of extra work. Follow this guide to learn more. After you've followed the tutorial above, update the env vars: HUGGINGFACE_API_KEY=[Your key]FAST_LLM=\"huggingface:HuggingFaceH4/zephyr-7b-beta\"SMART_LLM=\"huggingface:HuggingFaceH4/zephyr-7b-beta\"STRATEGIC_LLM=\"huggingface:HuggingFaceH4/zephyr-7b-beta\"EMBEDDING=\"sentence-transformers/all-MiniLM-L6-v2\" Copy","s":"HuggingFace","u":"/docs/gpt-researcher/llms/llms","h":"#huggingface","p":332},{"i":357,"t":"Sign up here for obtaining a Google Gemini API Key and update the following env vars: GOOGLE_API_KEY=[Your key]FAST_LLM=\"google_genai:gemini-1.5-flash\"SMART_LLM=\"google_genai:gemini-1.5-pro\"STRATEGIC_LLM=\"google_genai:gemini-1.5-pro\"EMBEDDING=\"google_genai:models/text-embedding-004\" Copy","s":"Google Gemini","u":"/docs/gpt-researcher/llms/llms","h":"#google-gemini","p":332},{"i":359,"t":"FAST_LLM=\"google_vertexai:gemini-1.5-flash-001\"SMART_LLM=\"google_vertexai:gemini-1.5-pro-001\"STRATEGIC_LLM=\"google_vertexai:gemini-1.5-pro-001\"EMBEDDING=\"google_vertexai:text-embedding-004\" Copy","s":"Google VertexAI","u":"/docs/gpt-researcher/llms/llms","h":"#google-vertexai","p":332},{"i":361,"t":"COHERE_API_KEY=[Your key]FAST_LLM=\"cohere:command\"SMART_LLM=\"cohere:command-nightly\"STRATEGIC_LLM=\"cohere:command-nightly\"EMBEDDING=\"cohere:embed-english-v3.0\" Copy","s":"Cohere","u":"/docs/gpt-researcher/llms/llms","h":"#cohere","p":332},{"i":363,"t":"FIREWORKS_API_KEY=[Your key]base_url=\"https://api.fireworks.ai/inference/v1/completions\"FAST_LLM=\"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct\"SMART_LLM=\"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct\"STRATEGIC_LLM=\"fireworks:accounts/fireworks/models/mixtral-8x7b-instruct\"EMBEDDING=\"fireworks:nomic-ai/nomic-embed-text-v1.5\" Copy","s":"Fireworks","u":"/docs/gpt-researcher/llms/llms","h":"#fireworks","p":332},{"i":365,"t":"FAST_LLM=\"bedrock:anthropic.claude-3-sonnet-20240229-v1:0\"SMART_LLM=\"bedrock:anthropic.claude-3-sonnet-20240229-v1:0\"STRATEGIC_LLM=\"bedrock:anthropic.claude-3-sonnet-20240229-v1:0\"EMBEDDING=\"bedrock:amazon.titan-embed-text-v2:0\" Copy","s":"Bedrock","u":"/docs/gpt-researcher/llms/llms","h":"#bedrock","p":332},{"i":367,"t":"FAST_LLM=\"xai:grok-beta\"SMART_LLM=\"xai:grok-beta\"STRATEGIC_LLM=\"xai:grok-beta\" Copy","s":"xAI","u":"/docs/gpt-researcher/llms/llms","h":"#xai","p":332},{"i":370,"t":"EMBEDDING=\"nomic:nomic-embed-text-v1.5\" Copy","s":"Nomic","u":"/docs/gpt-researcher/llms/llms","h":"#nomic","p":332},{"i":372,"t":"VOYAGE_API_KEY=[Your Key]EMBEDDING=\"voyageai:voyage-law-2\" Copy","s":"VoyageAI","u":"/docs/gpt-researcher/llms/llms","h":"#voyageai","p":332},{"i":374,"t":"Filtering by Domain If you set Google as a Retriever, you can filter web results by site. For example, set in the query param you pass the GPTResearcher class instance: query=\"site:linkedin.com a python web developer to implement my custom gpt-researcher flow\" will limit the results to linkedin.com Step 1 - Set these environment variables with a .env file in the root folder TAVILY_API_KEY=LANGCHAIN_TRACING_V2=trueLANGCHAIN_API_KEY=OPENAI_API_KEY=DOC_PATH=./my-docsRETRIEVER=googleGOOGLE_API_KEY=GOOGLE_CX_KEY= Copy Step 2 - from the root project run: docker-compose up -- build Step 3 - from the frontend input box in localhost:3000, you can append any google search filter (such as filtering by domain names)","s":"Filtering by Domain","u":"/docs/gpt-researcher/context/filtering-by-domain","h":"","p":373},{"i":376,"t":"On this page","s":"Running with Ollama","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"","p":375},{"i":378,"t":"After deploying Ollama WebUI, you'll want to enter the Open WebUI Admin App & download a custom LLM. Choose a model from Ollama's Library of LLM's Paste the model name & size into the Web UI: For our example, let's choose to download the qwen2:1.5b model. This model now automatically becomes available via your Server's out-of-the-box API - we'll leverage it within our GPT-Researcher .env file in the next step.","s":"Fetching the Desired LLM Models","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#fetching-the-desired-llm-models","p":375},{"i":380,"t":"If you deploy ollama locally, a .env like so, should enable powering GPT-Researcher with Ollama: OPENAI_API_KEY=\"123\"OPENAI_API_BASE=\"http://127.0.0.1:11434/v1\"OLLAMA_BASE_URL=\"http://127.0.0.1:11434/\"FAST_LLM=\"ollama:qwen2:1.5b\"SMART_LLM=\"ollama:qwen2:1.5b\"EMBEDDING=\"ollama:all-minilm:22m\" Copy Replace FAST_LLM & SMART_LLM with the model you downloaded from the Elestio Web UI in the previous step.","s":"Querying your Custom LLM with GPT-Researcher","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#querying-your-custom-llm-with-gpt-researcher","p":375},{"i":382,"t":"And here's a custom python script you can use to query your custom LLM: import osimport asyncioimport logginglogging.basicConfig(level=logging.DEBUG)from gpt_researcher.llm_provider.generic import GenericLLMProviderfrom gpt_researcher.utils.llm import get_llmOLLAMA_BASE_URL = \"https://ollama-ug3qr-u21899.vm.elestio.app:57987\"LLM_MODEL = \"llama3.1\"# Create the GenericLLMProvider instancellm_provider = get_llm( \"ollama\", base_url=OLLAMA_BASE_URL, model=LLM_MODEL, temperature=0.7, max_tokens=2000, verify_ssl=False # Add this line)# Test the connection with a simple querymessages = [{\"role\": \"user\", \"content\": \"sup?\"}]async def test_ollama(): try: response = await llm_provider.get_chat_response(messages, stream=False) print(\"Ollama response:\", response) except Exception as e: print(f\"Error: {e}\")# Run the async functionasyncio.run(test_ollama()) Copy Replace OLLAMA_BASE_URL with the URL of your Ollama instance, and LLM_MODEL with the model you downloaded from the Ollama Web UI. Run the script to test the connection with your custom LLM.","s":"Run LLM Test Script for GPTR","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#run-llm-test-script-for-gptr","p":375},{"i":384,"t":"Elestio is a platform that allows you to deploy and manage custom language models. This guide will walk you through deploying a custom language model on Elestio. You can deploy an Open WebUI server with Elestio Here's an example .env file that will enable powering GPT-Researcher with Elestio: OPENAI_API_KEY=\"123\"OPENAI_API_BASE=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/v1\"OLLAMA_BASE_URL=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/\"FAST_LLM=\"openai:qwen2:1.5b\"SMART_LLM=\"openai:qwen2:1.5b\"EMBEDDING=\"ollama:all-minilm:22m\" Copy Disable Elestio Authentication or Add Auth Headers To remove the basic auth you have to follow the below steps: Go to your service -> Security -> at last Nginx -> in that find the below code: auth_basic \"Authentication\"; auth_basic_user_file /etc/nginx/conf.d/.htpasswd; Copy Comment these both these lines out and click the button \"Update & Restart\" to reflect the changes.","s":"Deploy Ollama on Elestio","u":"/docs/gpt-researcher/llms/running-with-ollama","h":"#deploy-ollama-on-elestio","p":375},{"i":386,"t":"On this page","s":"Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","h":"","p":385},{"i":388,"t":"GPT Researcher defaults to using the Tavily search engine for retrieving search results. But you can also use other search engines by specifying the RETRIEVER env var. Please note that each search engine has its own API Key requirements and usage limits. For example: RETRIEVER=bing Copy You can also specify multiple retrievers by separating them with commas. The system will use each specified retriever in sequence. For example: RETRIEVER=tavily, arxiv Copy Thanks to our community, we have integrated the following web search engines: Tavily - Default Bing - Env: RETRIEVER=bing Google - Env: RETRIEVER=google SearchApi - Env: RETRIEVER=searchapi Serp API - Env: RETRIEVER=serpapi Serper - Env: RETRIEVER=serper Searx - Env: RETRIEVER=searx Duckduckgo - Env: RETRIEVER=duckduckgo Arxiv - Env: RETRIEVER=arxiv Exa - Env: RETRIEVER=exa PubMedCentral - Env: RETRIEVER=pubmed_central","s":"Web Search Engines","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#web-search-engines","p":385},{"i":390,"t":"You can also use any custom retriever of your choice by specifying the RETRIEVER=custom env var. Custom retrievers allow you to use any search engine that provides an API to retrieve documents and is widely used for enterprise research tasks. In addition to setting the RETRIEVER env, you also need to set the following env vars: RETRIEVER_ENDPOINT: The endpoint URL of the custom retriever. Additional arguments required by the retriever should be prefixed with RETRIEVER_ARG_ (e.g., RETRIEVER_ARG_API_KEY).","s":"Custom Retrievers","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#custom-retrievers","p":385},{"i":392,"t":"RETRIEVER=customRETRIEVER_ENDPOINT=https://api.myretriever.comRETRIEVER_ARG_API_KEY=YOUR_API_KEY Copy","s":"Example","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#example","p":385},{"i":394,"t":"For the custom retriever to work correctly, the response from the endpoint should be in the following format: [ { \"url\": \"http://example.com/page1\", \"raw_content\": \"Content of page 1\" }, { \"url\": \"http://example.com/page2\", \"raw_content\": \"Content of page 2\" }] Copy The system assumes this response format and processes the list of sources accordingly. Missing a retriever? Feel free to contribute to this project by submitting issues or pull requests on our GitHub page.","s":"Response Format","u":"/docs/gpt-researcher/search-engines/retrievers","h":"#response-format","p":385},{"i":396,"t":"On this page","s":"config.config","u":"/docs/reference/config/config","h":"","p":395},{"i":398,"t":"class Config(metaclass=Singleton) Copy Configuration class to store the state of bools for different scripts access. __init__ def __init__() -> None Copy Initialize the Config class set_fast_llm_model def set_fast_llm_model(value: str) -> None Copy Set the fast LLM model value. set_smart_llm_model def set_smart_llm_model(value: str) -> None Copy Set the smart LLM model value. set_fast_token_limit def set_fast_token_limit(value: int) -> None Copy Set the fast token limit value. set_smart_token_limit def set_smart_token_limit(value: int) -> None Copy Set the smart token limit value. set_browse_chunk_max_length def set_browse_chunk_max_length(value: int) -> None Copy Set the browse_website command chunk max length value. set_openai_api_key def set_openai_api_key(value: str) -> None Copy Set the OpenAI API key value. set_debug_mode def set_debug_mode(value: bool) -> None Copy Set the debug mode value.","s":"Config Objects","u":"/docs/reference/config/config","h":"#config-objects","p":395},{"i":400,"t":"class APIKeyError(Exception) Copy Exception raised when an API key is not set in config.py or as an environment variable. check_openai_api_key def check_openai_api_key(cfg) -> None Copy Check if the OpenAI API key is set in config.py or as an environment variable. check_tavily_api_key def check_tavily_api_key(cfg) -> None Copy Check if the Tavily Search API key is set in config.py or as an environment variable. check_google_api_key def check_google_api_key(cfg) -> None Copy Check if the Google API key is set in config.py or as an environment variable. check_serp_api_key def check_serp_api_key(cfg) -> None Copy Check if the SERP API key is set in config.py or as an environment variable. check_searx_url def check_searx_url(cfg) -> None Copy Check if the Searx URL is set in config.py or as an environment variable.","s":"APIKeyError Objects","u":"/docs/reference/config/config","h":"#apikeyerror-objects","p":395},{"i":402,"t":"On this page","s":"config.singleton","u":"/docs/reference/config/singleton","h":"","p":401},{"i":404,"t":"class Singleton(abc.ABCMeta, type) Copy Singleton metaclass for ensuring only one instance of a class. __call__ def __call__(cls, *args, **kwargs) Copy Call method for the singleton metaclass.","s":"Singleton Objects","u":"/docs/reference/config/singleton","h":"#singleton-objects","p":401},{"i":406,"t":"class AbstractSingleton(abc.ABC, metaclass=Singleton) Copy Abstract singleton class for ensuring only one instance of a class.","s":"AbstractSingleton Objects","u":"/docs/reference/config/singleton","h":"#abstractsingleton-objects","p":401},{"i":408,"t":"On this page","s":"processing.html","u":"/docs/reference/processing/html","h":"","p":407},{"i":410,"t":"On this page","s":"LangGraph","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"","p":409},{"i":412,"t":"By using Langgraph, the research process can be significantly improved in depth and quality by leveraging multiple agents with specialized skills. Inspired by the recent STORM paper, this example showcases how a team of AI agents can work together to conduct research on a given topic, from planning to publication. An average run generates a 5-6 page research report in multiple formats such as PDF, Docx and Markdown. Please note: This example uses the OpenAI API only for optimized performance.","s":"Use case","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#use-case","p":409},{"i":414,"t":"The research team is made up of 7 AI agents: Human - The human in the loop that oversees the process and provides feedback to the agents. Chief Editor - Oversees the research process and manages the team. This is the \"master\" agent that coordinates the other agents using Langgraph. Researcher (gpt-researcher) - A specialized autonomous agent that conducts in depth research on a given topic. Editor - Responsible for planning the research outline and structure. Reviewer - Validates the correctness of the research results given a set of criteria. Revisor - Revises the research results based on the feedback from the reviewer. Writer - Responsible for compiling and writing the final report. Publisher - Responsible for publishing the final report in various formats.","s":"The Multi Agent Team","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#the-multi-agent-team","p":409},{"i":416,"t":"Generally, the process is based on the following stages: Planning stage Data collection and analysis Review and revision Writing and submission Publication","s":"How it works","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-it-works","p":409},{"i":419,"t":"More specifically (as seen in the architecture diagram) the process is as follows: Browser (gpt-researcher) - Browses the internet for initial research based on the given research task. Editor - Plans the report outline and structure based on the initial research. For each outline topic (in parallel): Researcher (gpt-researcher) - Runs an in depth research on the subtopics and writes a draft. Reviewer - Validates the correctness of the draft given a set of criteria and provides feedback. Revisor - Revises the draft until it is satisfactory based on the reviewer feedback. Writer - Compiles and writes the final report including an introduction, conclusion and references section from the given research findings. Publisher - Publishes the final report to multi formats such as PDF, Docx, Markdown, etc.","s":"Steps","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#steps","p":409},{"i":421,"t":"Install required packages: pip install -r requirements.txt Copy Update env variables export OPENAI_API_KEY={Your OpenAI API Key here}export TAVILY_API_KEY={Your Tavily API Key here} Copy Run the application: python main.py Copy","s":"How to run","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#how-to-run","p":409},{"i":423,"t":"To change the research query and customize the report, edit the task.json file in the main directory. Task.json contains the following fields: query - The research query or task. model - The OpenAI LLM to use for the agents. max_sections - The maximum number of sections in the report. Each section is a subtopic of the research query. include_human_feedback - If true, the user can provide feedback to the agents. If false, the agents will work autonomously. publish_formats - The formats to publish the report in. The reports will be written in the output directory. source - The location from which to conduct the research. Options: web or local. For local, please add DOC_PATH env var. follow_guidelines - If true, the research report will follow the guidelines below. It will take longer to complete. If false, the report will be generated faster but may not follow the guidelines. guidelines - A list of guidelines that the report must follow. verbose - If true, the application will print detailed logs to the console. For example: { \"query\": \"Is AI in a hype cycle?\", \"model\": \"gpt-4o\", \"max_sections\": 3, \"publish_formats\": { \"markdown\": true, \"pdf\": true, \"docx\": true }, \"include_human_feedback\": false, \"source\": \"web\", \"follow_guidelines\": true, \"guidelines\": [ \"The report MUST fully answer the original question\", \"The report MUST be written in apa format\", \"The report MUST be written in english\" ], \"verbose\": true} Copy","s":"Usage","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#usage","p":409},{"i":425,"t":"pip install langgraph-clilanggraph up Copy From there, see documentation here on how to use the streaming and async endpoints, as well as the playground.","s":"To Deploy","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#to-deploy","p":409},{"i":427,"t":"The React app (located in frontend directory) is our Frontend 2.0 which we hope will enable us to display the robustness of the backend on the frontend, as well. It comes with loads of added features, such as: a drag-n-drop user interface for uploading and deleting files to be used as local documents by GPTResearcher. a GUI for setting your GPTR environment variables. the ability to trigger the multi_agents flow via the Backend Module or Langgraph Cloud Host (currently in closed beta). stability fixes and more coming soon!","s":"NextJS Frontend App","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#nextjs-frontend-app","p":409},{"i":429,"t":"Step 1 - Install Docker Step 2 - Clone the '.env.example' file, add your API Keys to the cloned file and save the file as '.env' Step 3 - Within the docker-compose file comment out services that you don't want to run with Docker. $ docker-compose up --build Copy Step 4 - By default, if you haven't uncommented anything in your docker-compose file, this flow will start 2 processes: the Python server running on localhost:8000 the React app running on localhost:3000 Visit localhost:3000 on any browser and enjoy researching!","s":"Run the NextJS React App with Docker","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-docker","p":409},{"i":431,"t":"cd frontendnvm install 18.17.0nvm use v18.17.0npm install --legacy-peer-depsnpm run dev Copy","s":"Run the NextJS React App with NPM","u":"/docs/gpt-researcher/multi_agents/langgraph","h":"#run-the-nextjs-react-app-with-npm","p":409},{"i":433,"t":"Testing your Retriever To test your retriever, you can use the following code snippet. The script will search for a sub-query and display the search results. import asynciofrom dotenv import load_dotenvfrom gpt_researcher.config.config import Configfrom gpt_researcher.actions.retriever import get_retrieversfrom gpt_researcher.skills.researcher import ResearchConductorimport pprint# Load environment variables from .env fileload_dotenv()async def test_scrape_data_by_query(): # Initialize the Config object config = Config() # Retrieve the retrievers based on the current configuration retrievers = get_retrievers({}, config) print(\"Retrievers:\", retrievers) # Create a mock researcher object with necessary attributes class MockResearcher: def init(self): self.retrievers = retrievers self.cfg = config self.verbose = True self.websocket = None self.scraper_manager = None # Mock or implement scraper manager self.vector_store = None # Mock or implement vector store researcher = MockResearcher() research_conductor = ResearchConductor(researcher) # print('research_conductor',dir(research_conductor)) # print('MockResearcher',dir(researcher)) # Define a sub-query to test sub_query = \"design patterns for autonomous ai agents\" # Iterate through all retrievers for retriever_class in retrievers: # Instantiate the retriever with the sub-query retriever = retriever_class(sub_query) # Perform the search using the current retriever search_results = await asyncio.to_thread( retriever.search, max_results=10 ) print(\"\\033[35mSearch results:\\033[0m\") pprint.pprint(search_results, indent=4, width=80)if __name__ == \"__main__\": asyncio.run(test_scrape_data_by_query()) Copy The output of the search results will include the title, body, and href of each search result. For example: [{ \"body\": \"Jun 5, 2024 ... Three AI Design Patterns of Autonomous \" \"Agents. Overview of the Three Patterns. Three notable AI \" \"design patterns for autonomous agents include:.\", \"href\": \"https://accredianpublication.medium.com/building-smarter-systems-the-role-of-agentic-design-patterns-in-genai-13617492f5df\", \"title\": \"Building Smarter Systems: The Role of Agentic Design \" \"Patterns in ...\"}, ...] Copy","s":"Testing your Retriever","u":"/docs/gpt-researcher/search-engines/test-your-retriever","h":"","p":432},{"i":435,"t":"Roadmap We're constantly working on additional features and improvements to our products and services. We're also working on new products and services to help you build better AI applications using GPT Researcher. Our vision is to build the #1 autonomous research agent for AI developers and researchers, and we're excited to have you join us on this journey! The roadmap is prioritized based on the following goals: Performance, Quality, Modularity and Conversational flexibility. The roadmap is public and can be found here. Interested in collaborating or contributing? Check out our contributing page for more information.","s":"Roadmap","u":"/docs/roadmap","h":"","p":434},{"i":437,"t":"On this page","s":"Welcome","u":"/docs/welcome","h":"","p":436},{"i":439,"t":"Quickly accessing relevant and trustworthy information is more crucial than ever. However, we've learned that none of today's search engines provide a suitable tool that provides factual, explicit and objective answers without the need to continuously click and explore multiple sites for a given research task. This is why we've built the trending open source GPT Researcher. GPT Researcher is an autonomous agent that takes care of the tedious task of research for you, by scraping, filtering and aggregating over 20+ web sources per a single research task. To learn more about GPT Researcher, check out the documentation page.","s":"GPT Researcher","u":"/docs/welcome","h":"#gpt-researcher","p":436},{"i":441,"t":"On this page","s":"processing.text","u":"/docs/reference/processing/text","h":"","p":440}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3",[0,5.816,1,2.246,2,3.576,3,2.965,4,3.576,5,2.64,6,1.107,7,1.942,8,3.576,9,3.576,10,3.087,11,4.695,12,1.088,13,2.246,14,1.894,15,2.246,16,2.784,17,2.702,18,1.849,19,1.806,20,4.833,21,3.208,22,1.942,23,2.784,24,2.52,25,2.05,26,1.942,27,2.109,28,2.017,29,1.993,30,2.784,31,2.965,32,2.64,33,2.357,34,1.535,35,2.926,36,3.576,37,2.784,38,3.208,39,2.965,40,3.576,41,4.833,42,1.993,43,2.784,44,1.564,45,2.784,46,3.208,47,2.155,48,2.784,49,5.388,50,3.505,51,2.784,52,3.208,53,2.174,54,3.576,55,1.692,56,2.417,57,2.326,58,1.894,59,2.64,60,1.866,61,2.52,62,3.576,63,1.728,64,2.049,65,2.174,66,3.576,67,3.208,68,2.109,69,2.784,70,4.833,71,1.455,72,2.965,73,0.813,74,0.834,75,1.942,76,1.258,77,2.64,78,2.174,79,2.965,80,3.576,81,2.326]],["t/5",[5,4.975,12,0.996,17,3.23,19,1.927,28,1.428,29,2.127,45,2.971,46,3.422,47,2.262,53,4.531,69,4.403,76,2.37,81,3.679,82,2.397,83,3.422,84,1.176,85,5.588,86,3.422,87,3.815,88,2.32,89,3.164,90,3.815,91,2.688,92,3.815,93,3.422,94,2.578,95,4.175,96,3.484,97,2.816,98,1.476,99,2.32,100,4.69,101,2.578,102,2.02,103,2.971,104,2.971,105,2.688,106,2.971,107,2.816,108,3.164,109,3.815,110,3.422,111,3.164,112,3.422,113,5.655,114,3.815,115,1.553,116,3.815,117,3.552,118,3.439,119,2.32,120,3.815,121,2.816,122,3.422,123,3.815,124,2.482,125,3.815,126,1.321,127,2.688,128,3.422,129,1.476,130,2.971,131,2.924,132,3.422,133,3.815,134,2.186,135,2.482,136,2.816]],["t/7",[12,0.405,13,2.034,14,1.715,17,1.212,19,1.636,25,2.608,28,1.212,31,2.685,32,2.39,38,2.904,56,2.188,61,3.52,63,1.565,73,0.736,74,0.755,84,0.998,85,2.685,99,1.969,100,4.142,103,3.889,104,2.521,107,2.39,115,1.318,126,1.121,129,1.252,131,1.674,134,1.855,136,2.39,137,2.904,138,3.245,139,2.904,140,5.006,141,6.645,142,1.969,143,2.685,144,2.39,145,4.142,146,1.715,147,3.237,148,3.237,149,3.237,150,2.281,151,1.599,152,2.685,153,2.521,154,2.521,155,3.237,156,3.52,157,4.481,158,3.889,159,3.688,160,3.18,161,2.188,162,2.521,163,4.142,164,3.116,165,2.904,166,2.904,167,4.502,168,3.52,169,2.521,170,2.188,171,2.685,172,2.685,173,1.599,174,2.521,175,4.481,176,2.828,177,2.904,178,1.805,179,3.376,180,1.636,181,4.142,182,4.142,183,2.904,184,2.645,185,3.237,186,2.106,187,4.142,188,3.52,189,1.501,190,2.523,191,2.521,192,3.237,193,2.281,194,3.237,195,1.855]],["t/9",[0,4.95,12,0.918,17,3.083,18,3.417,19,1.865,28,2.066,29,2.058,44,1.615,56,2.495,58,1.955,71,2.689,74,1.711,76,2.324,82,2.319,102,1.955,103,2.875,127,2.601,151,1.824,156,2.601,164,1.678,167,2.725,168,2.601,169,2.875,179,2.495,181,3.061,188,3.888,190,2.788,196,3.312,197,3.312,198,1.865,199,3.076,200,4.299,201,2.601,202,2.319,203,4.297,204,1.556,205,4.576,206,5.146,207,3.312,208,4.576,209,3.312,210,5.146,211,3.691,212,1.585,213,2.725,214,3.691,215,3.691,216,3.691,217,3.691,218,3.691,219,1.205,220,3.312,221,2.726,222,2.369,223,3.691,224,3.312,225,3.691,226,3.691,227,3.691,228,0.611,229,1.452,230,2.319,231,2.601,232,2.875,233,1.529,234,2.495,235,2.245,236,2.875,237,2.725,238,3.691,239,2.875]],["t/11",[6,0.746,12,0.682,17,2.451,19,1.835,25,2.966,27,2.142,35,1.973,42,2.025,55,1.719,60,1.889,61,2.56,73,1.489,74,1.272,75,1.973,98,1.405,99,2.209,100,3.013,102,1.924,104,2.829,119,3.98,128,3.259,129,2.109,131,1.878,146,1.924,156,2.56,159,2.682,164,2.975,170,2.455,173,1.795,176,3.035,184,1.924,186,2.363,191,2.829,207,3.259,221,1.795,228,0.601,233,1.505,240,1.651,241,3.685,242,2.682,243,3.95,244,2.203,245,2.829,246,1.924,247,2.682,248,3.259,249,2.209,250,3.013,251,3.215,252,3.259,253,3.259,254,2.478,255,3.013,256,2.682,257,3.633,258,4.025,259,2.455,260,2.142,261,2.142,262,3.633,263,2.455,264,3.633,265,2.282,266,3.259,267,4.246,268,2.693,269,3.259,270,3.633,271,3.633,272,2.56,273,2.682,274,2.682,275,2.829,276,3.633,277,2.455]],["t/13",[11,3.24,12,1.053,13,3.129,14,2.638,17,2.562,24,4.821,25,2.603,47,1.992,50,3.24,59,3.677,60,1.725,73,1.133,76,1.752,84,1.536,118,3.028,119,4.16,124,3.24,134,2.853,167,5.051,176,3.173,178,2.776,182,4.13,189,3.173,190,3.456,201,3.509,204,2.884,230,3.129,240,3.552,241,3.366,244,1.34,278,4.13,279,3.24,280,3.24,281,3.677,282,4.98,283,3.028,284,2.407,285,2.406,286,4.468,287,3.509,288,2.063]],["t/15",[11,4.398,12,1.045,13,2.41,15,2.41,17,1.436,19,3.415,25,2.161,33,3.489,35,2.083,37,2.987,73,0.872,74,0.895,76,1.349,79,3.181,84,1.183,88,3.453,131,2.936,140,2.593,141,3.441,151,1.895,160,1.647,171,3.181,178,2.138,179,2.593,186,2.496,204,1.617,206,2.987,232,2.987,241,2.593,242,2.832,244,1.032,247,2.832,256,2.832,275,2.987,289,2.987,290,3.441,291,3.441,292,4.709,293,5.678,294,2.496,295,1.854,296,5.678,297,1.895,298,3.441,299,3.836,300,3.836,301,3.836,302,3.441,303,3.836,304,3.836,305,3.441,306,2.987,307,6.76,308,5.678,309,2.496,310,4.709,311,3.836,312,2.41,313,2.987,314,3.181,315,2.083,316,3.836,317,1.983,318,3.441,319,3.836,320,2.703,321,2.703,322,2.333,323,1.983,324,3.181,325,3.441,326,2.198,327,3.441,328,3.836]],["t/17",[6,0.659,12,1.051,17,1.201,25,2.307,28,1.201,32,2.368,33,1.403,34,2.603,42,1.788,55,1.518,58,1.699,64,1.838,72,2.66,73,0.729,74,1.414,78,1.95,84,0.989,88,1.95,115,1.305,121,2.368,134,1.838,139,2.877,150,2.26,161,2.168,163,2.66,174,2.498,176,1.487,183,2.877,189,1.487,195,3.473,249,1.95,259,2.168,273,2.368,277,2.168,284,1.55,288,1.328,292,2.66,305,2.877,320,2.26,323,1.658,326,1.838,329,2.498,330,2.66,331,2.368,332,1.95,333,3.207,334,2.764,335,2.168,336,3.207,337,3.207,338,2.498,339,4.476,340,2.199,341,3.207,342,3.207,343,2.877,344,2.776,345,1.742,346,2.498,347,1.95,348,2.924,349,2.703,350,1.584,351,3.207,352,3.207,353,2.877,354,2.498,355,2.877,356,1.95,357,2.168,358,2.924,359,4.448,360,2.66,361,2.877,362,3.207,363,2.211,364,3.207,365,2.877,366,2.087,367,2.368,368,3.207,369,3.207,370,3.207,371,2.368,372,2.168,373,2.015,374,2.66,375,2.877,376,2.66,377,3.207,378,3.207,379,2.498,380,2.498,381,2.498,382,3.207,383,2.168,384,2.087,385,2.168,386,3.207,387,2.498,388,1.838,389,1.95,390,3.207]],["t/19",[1,1.417,6,0.984,7,1.225,11,1.468,12,0.924,19,1.14,22,1.225,25,2.351,27,1.331,33,0.987,55,2.267,60,1.93,63,1.808,64,1.293,74,0.526,78,1.372,84,1.477,95,1.666,96,1.934,98,1.447,99,1.372,130,2.912,131,1.166,138,1.068,144,1.666,146,1.195,151,1.115,154,2.912,161,1.525,164,1.026,172,1.871,178,1.258,179,2.527,187,1.871,189,1.046,190,1.14,195,1.293,229,2.619,233,0.934,245,1.757,273,1.666,284,2.315,302,2.024,310,1.871,321,2.635,322,2.913,323,1.934,326,2.143,329,1.757,334,1.258,339,3.536,340,1.737,344,2.87,348,3.286,349,2.754,350,1.115,356,1.372,358,2.825,360,3.102,363,2.969,365,3.355,367,1.666,372,3.766,373,3.009,374,3.102,381,2.912,391,2.024,392,2.635,393,0.845,394,1.757,395,3.355,396,1.871,397,3.74,398,1.757,399,2.256,400,2.256,401,2.256,402,2.256,403,1.757,404,2.256,405,2.256,406,3.355,407,2.024,408,1.14,409,2.256,410,3.102,411,2.256,412,2.256,413,2.256,414,2.256,415,2.256,416,1.225,417,1.59,418,2.024,419,1.026,420,1.934,421,2.024,422,1.871,423,1.331,424,2.256,425,2.024,426,1.59,427,2.256,428,2.256,429,2.256,430,2.256,431,2.256,432,2.256,433,1.871,434,2.256,435,2.024,436,1.871,437,1.225,438,1.525,439,2.256,440,1.225,441,1.468,442,1.525,443,1.757,444,1.808,445,1.258,446,2.256,447,2.256,448,1.59,449,2.256,450,2.256,451,1.525,452,1.417,453,2.024,454,1.59,455,1.871,456,1.871,457,2.256,458,3.74,459,2.024,460,1.871,461,1.525,462,2.256,463,1.871,464,1.871,465,2.256,466,1.666,467,1.258]],["t/21",[6,0.871,12,1.116,18,2.192,25,1.613,34,3.075,63,2.05,71,1.726,73,1.782,96,2.192,102,2.246,108,3.516,115,1.726,189,1.966,195,2.429,233,2.53,240,1.927,244,1.141,254,1.927,281,3.13,285,1.491,294,2.759,309,2.759,332,2.578,340,2.842,344,2.914,348,2.501,349,3.493,350,2.095,358,3.603,363,1.89,367,3.13,383,2.866,384,2.759,393,1.588,394,3.302,468,3.516,469,3.302,470,3.804,471,2.429,472,2.988,473,2.988,474,4.24,475,4.24,476,3.302,477,4.24,478,2.216,479,2.578,480,3.302,481,3.516,482,4.24,483,2.142,484,5.48,485,3.516,486,2.578,487,3.804,488,3.13,489,3.302]],["t/23",[6,0.647,28,1.179,74,2.225,84,0.971,98,1.218,112,2.824,126,1.091,130,2.452,150,2.218,228,0.521,229,1.238,295,1.522,340,2.652,345,1.71,349,2.179,393,1.179,419,1.431,420,1.628,461,2.128,478,1.142,486,1.914,490,3.148,491,8.347,492,1.83,493,2.527,494,2.324,495,2.824,496,3.148,497,3.148,498,2.749,499,3.148,500,3.148,501,3.148,502,3.148,503,3.148,504,3.148,505,3.148,506,2.824,507,3.148,508,3.148,509,2.611,510,3.148,511,3.148,512,3.148,513,5.991,514,3.148,515,3.148,516,6.942,517,3.148,518,3.148,519,3.148,520,3.148,521,3.148,522,3.148,523,3.148,524,3.148,525,3.148,526,3.148,527,3.148,528,3.148,529,2.611,530,3.148,531,3.148,532,1.522,533,1.978,534,2.048,535,3.148,536,3.148,537,3.148,538,3.148,539,3.148,540,2.452,541,2.452,542,3.148,543,3.148,544,3.148,545,3.148,546,1.804,547,2.128,548,2.324,549,2.824,550,2.324,551,3.148,552,3.148,553,3.148,554,2.824,555,2.452,556,3.148,557,2.218,558,2.611,559,3.148,560,3.148,561,3.148,562,2.048,563,3.148,564,3.148]],["t/25",[6,1.167,12,1.154,14,2.032,17,2.126,18,1.983,22,2.083,25,1.46,28,1.436,32,2.832,34,1.647,47,1.535,65,2.333,71,2.311,73,1.7,96,1.983,98,1.484,102,2.032,117,3.567,127,2.703,131,1.983,134,2.198,164,3.073,176,1.779,180,1.938,184,2.032,189,1.779,190,1.938,204,1.617,219,1.854,233,1.589,240,3.073,244,1.032,277,2.593,285,2.378,294,2.496,317,1.983,331,4.192,332,2.333,340,2.06,349,2.531,350,1.895,358,3.349,388,2.198,436,3.181,466,2.832,479,2.333,480,2.987,481,3.181,483,2.869,486,2.333,540,4.422,548,2.832,549,3.441,550,2.832,565,2.703,566,3.836,567,2.987,568,2.333,569,2.41,570,2.703,571,3.441,572,3.181,573,3.441,574,2.703,575,3.836,576,2.496,577,2.41,578,3.441]],["t/27",[6,0.688,12,1.142,13,1.241,17,0.74,25,0.752,28,0.74,34,0.848,42,1.102,47,1.741,60,1.159,61,1.392,65,1.202,71,0.804,73,1.653,74,1.628,84,1.342,96,1.022,99,2.035,101,1.336,102,1.773,115,0.804,126,1.508,127,1.392,129,1.295,131,1.73,134,1.132,135,1.286,138,1.584,146,1.047,164,0.898,189,1.552,195,1.132,199,1.102,219,0.645,222,1.437,228,0.721,229,0.777,234,1.336,244,1.379,246,1.773,250,1.639,277,1.336,283,1.202,288,1.803,290,1.773,294,1.286,297,1.653,309,1.286,321,1.392,323,1.022,331,1.459,332,2.035,340,2.258,344,1.362,349,1.492,350,0.976,358,4.114,366,2.832,372,2.942,373,2.735,374,1.639,375,1.773,381,1.539,387,1.539,388,1.918,393,1.253,403,3.39,410,1.639,419,0.898,420,1.022,436,1.639,437,2.364,438,2.942,440,1.073,466,1.459,479,1.202,492,0.74,498,0.804,532,0.955,562,2.178,568,1.202,569,2.103,576,1.286,577,1.241,578,1.773,579,1.539,580,1.459,581,1.022,582,1.316,583,1.618,584,1.047,585,1.618,586,2.033,587,1.976,588,1.639,589,0.777,590,1.539,591,2.178,592,0.976,593,1.773,594,1.639,595,1.976,596,1.639,597,0.976,598,1.773,599,1.241,600,2.776,601,1.639,602,1.976,603,1.032,604,2.262,605,1.459,606,1.047,607,2.427,608,1.773,609,0.998,610,1.202,611,1.241,612,0.898,613,1.639,614,2.936,615,1.022,616,1.286,617,1.286,618,2.262,619,1.022,620,0.998,621,1.132,622,1.132,623,2.776,624,2.776,625,1.639,626,1.286,627,1.286,628,1.976,629,1.976,630,1.639,631,1.241,632,1.773,633,1.639,634,1.976,635,1.202,636,1.639,637,1.976,638,1.773,639,1.773,640,1.202,641,1.539,642,1.976,643,0.916,644,1.539,645,1.539]],["t/29",[6,0.948,12,1.018,25,1.755,34,1.98,35,2.504,55,3.069,56,3.116,58,2.442,60,1.597,63,2.229,64,2.642,73,1.049,84,2,86,4.137,96,2.384,121,3.404,131,2.384,134,2.642,154,3.591,179,3.116,239,3.591,289,3.591,310,3.824,321,3.249,323,3.353,334,2.571,339,3.404,344,1.877,349,2.056,357,3.116,358,3.824,359,4.137,363,2.891,376,3.824,381,5.05,389,2.804,391,4.137,392,4.57,394,3.591,395,4.137,417,4.57,418,4.137,437,2.504,444,2.229,451,3.116,646,4.137,647,4.611,648,4.383,649,4.137,650,3.824,651,4.611,652,4.611,653,4.611,654,4.611,655,3]],["t/31",[603,2.56]],["t/33",[6,0.981,12,1.087,13,2.998,28,1.787,34,2.049,35,2.591,63,2.307,64,2.734,73,1.511,76,1.678,94,3.225,95,3.523,108,3.957,124,3.105,138,2.259,160,2.852,164,2.169,184,2.527,198,2.411,204,2.012,219,1.558,244,1.788,254,2.169,261,2.814,280,3.105,285,2.336,295,2.307,335,3.225,348,2.814,448,3.363,469,3.716,472,3.363,478,1.731,656,3.523,657,3.86,658,3.716,659,3.957,660,2.902,661,4.281,662,3.225,663,4.772,664,3.523,665,2.734,666,4.772,667,2.814,668,4.772,669,3.225,670,4.772,671,3.105,672,3.225,673,2.734,674,4.281]],["t/35",[12,0.776,34,2.661,35,3.365,50,4.032,124,4.032,131,3.204,160,3.395,184,3.282,204,2.613,244,1.668,261,3.655,280,4.032,285,2.18,295,2.996,314,5.14,317,3.204,660,3.768,667,4.664,675,3.655,676,4.367,677,5.559,678,4.826,679,5.559,680,5.559,681,4.367,682,5.14,683,4.826]],["t/38",[6,1.112,12,0.677,19,2.735,60,2.508,129,2.094,198,2.735,199,4.036,219,2.364,221,2.674,244,2.195,426,3.814,441,3.522,492,2.027,493,2.799,576,3.522,598,3.834,599,3.401,607,3.018,615,2.799,656,3.997,657,2.735,667,4.269,684,3.814,685,3.814,686,4.856,687,3.814,688,6.764,689,5.413,690,5.345,691,4.548,692,4.489,693,5.101,694,4.215]],["t/40",[12,0.906,28,2.027,34,3.108,60,1.875,124,3.522,160,3.108,184,2.867,189,2.51,198,2.735,204,2.282,219,1.767,240,3.291,243,2.94,244,2.195,254,2.461,280,3.522,285,1.904,288,2.242,314,4.489,348,3.192,483,2.735,598,2.867,656,3.997,657,2.735,667,4.81,678,4.215,679,4.856,680,4.856,681,3.814,695,2.562,696,4.856,697,3.658,698,4.036,699,3.814,700,2.735,701,3.997]],["t/42",[6,0.845,28,1.54,33,1.799,35,2.233,60,1.425,74,2.061,98,2.311,221,2.032,222,3.317,228,0.681,229,1.618,244,1.608,263,2.779,279,2.676,285,1.446,345,2.233,498,3.144,532,1.988,579,3.203,586,1.343,598,2.178,606,2.178,612,2.716,626,2.676,656,5.196,657,2.078,667,3.524,685,2.898,690,4.412,692,3.411,693,4.211,694,3.203,700,2.078,702,2.501,703,3.203,704,4.412,705,4.113,706,4.113,707,4.113,708,4.113,709,4.113,710,5.975,711,3.411,712,4.113,713,4.653,714,3.689,715,3.411,716,4.113,717,5.975,718,4.113,719,4.113,720,4.113,721,4.113,722,3.689,723,5.975,724,4.113,725,4.113,726,4.113,727,4.113,728,4.113]],["t/44",[12,1.033,25,2.11,27,4.338,63,2.68,64,3.177,73,1.261,124,3.608,138,2.624,160,3.158,176,2.571,184,3.896,198,2.801,219,1.81,244,1.492,254,2.521,260,3.27,261,3.27,280,3.608,285,1.95,297,2.739,323,2.867,334,3.091,448,3.907,656,4.094,657,2.801,660,3.372,664,4.094,665,3.177,667,3.27,729,5.545,730,5.545,731,5.545,732,5.545,733,5.545,734,5.545,735,5.545,736,5.545]],["t/46",[67,5.823,115,3.621,325,5.823,438,4.387,576,4.223,603,2.002,643,3.776,737,7.379,738,5.823,739,6.491,740,4.539,741,4.952,742,6.012,743,4.223,744,5.823,745,5.055]],["t/48",[5,1.081,6,1.126,7,0.426,11,1.983,14,1.09,16,0.611,18,0.406,19,0.396,22,0.795,25,1.814,26,0.426,28,1.564,33,0.343,41,1.314,42,0.816,44,1.333,47,1.033,53,1.57,55,0.371,58,1.368,60,0.507,63,0.379,71,0.319,73,0.468,74,2.147,84,0.635,94,0.99,98,1.179,102,0.416,104,0.611,115,0.319,119,1.57,124,0.511,129,0.304,131,0.757,134,0.839,142,1.252,146,0.416,173,1.017,176,0.364,180,0.396,189,1.413,197,0.704,200,1.339,201,2.148,204,0.331,208,0.651,212,0.337,219,1.131,221,0.723,228,0.692,229,0.81,230,1.293,231,0.553,232,0.611,233,0.606,237,0.579,240,0.936,246,1.614,247,0.579,251,1.214,253,0.704,258,2.834,275,0.611,283,1.853,288,0.853,291,0.704,295,0.995,298,1.847,315,0.426,317,1.064,321,0.553,323,0.757,326,1.746,332,0.89,334,3.167,338,0.611,339,0.579,344,1.051,346,0.611,347,0.89,350,2.064,356,1.853,363,0.35,367,1.081,384,0.953,389,0.477,408,0.396,416,0.426,420,0.406,422,1.214,423,0.463,426,0.553,437,0.426,444,0.708,451,0.53,452,0.493,467,1.148,483,1.54,488,1.907,492,0.294,493,1.985,495,0.704,498,0.838,516,0.704,532,1.856,533,4.461,547,0.53,569,2.176,574,0.553,579,0.611,581,0.406,586,2.208,589,2.234,590,0.611,598,0.776,601,0.651,631,0.493,635,0.477,636,2.142,640,0.477,643,0.364,645,0.611,662,0.53,664,0.579,665,3.014,671,0.511,675,0.463,682,0.651,683,0.611,684,1.032,695,0.371,700,0.74,746,0.651,747,0.785,748,0.785,749,0.651,750,0.651,751,0.704,752,4.801,753,0.704,754,1.847,755,3.395,756,1.44,757,2.058,758,0.785,759,0.651,760,0.704,761,0.704,762,0.704,763,0.651,764,0.651,765,0.704,766,0.651,767,1.14,768,1.081,769,1.14,770,0.785,771,0.396,772,0.511,773,0.611,774,1.081,775,0.92,776,0.785,777,5.023,778,1.13,779,1.847,780,3.031,781,0.704,782,0.651,783,0.579,784,0.785,785,1.464,786,0.785,787,0.785,788,0.785,789,0.785,790,1.464,791,1.14,792,1.464,793,0.651,794,0.704,795,0.704,796,1.464,797,1.464,798,1.464,799,1.464,800,1.464,801,1.14,802,0.776,803,2.582,804,2.142,805,1.032,806,1.314,807,1.14,808,1.464,809,1.464,810,0.785,811,0.704,812,1.214,813,0.785,814,1.464,815,1.464,816,2.582,817,1.464,818,1.464,819,1.464,820,1.464,821,0.785,822,0.651,823,0.651,824,0.704,825,0.785,826,0.785,827,0.785,828,0.785,829,2.734,830,0.785,831,0.611,832,1.464,833,0.704,834,0.785,835,3.048,836,1.464,837,1.464,838,2.582,839,1.52,840,1.464,841,1.464,842,2.582,843,1.464,844,3.839,845,1.707,846,0.785,847,0.785,848,0.651,849,0.611,850,1.464,851,1.464,852,2.582,853,1.464,854,2.582,855,1.464,856,2.582,857,1.464,858,1.464,859,1.464,860,1.464,861,1.464,862,1.464,863,1.464,864,1.464,865,0.53,866,0.579,867,1.464,868,0.785,869,1.464,870,3.464,871,1.464,872,2.058,873,0.704,874,0.785,875,0.785,876,0.785,877,0.785,878,0.704,879,0.785,880,0.785,881,0.785,882,0.785,883,0.785,884,1.314,885,0.785,886,0.785,887,0.785,888,1.14,889,0.785,890,0.785,891,0.785,892,0.785,893,0.785,894,0.785,895,1.464,896,0.785,897,1.464,898,0.785,899,0.785,900,0.651,901,0.785,902,0.785,903,0.785,904,0.785,905,0.785,906,0.785,907,0.785,908,0.99,909,0.785,910,0.651,911,0.579]],["t/50",[603,2.56]],["t/52",[12,1.046,34,2.108,74,2.313,176,2.276,198,2.48,219,2.532,222,2.908,228,0.813,243,2.666,244,2.251,274,3.624,356,2.985,489,3.823,493,2.538,498,1.998,532,2.373,586,1.603,598,2.6,609,2.48,610,2.985,611,3.084,612,2.231,615,2.538,616,3.194,617,3.194,619,2.538,620,2.48,621,2.813,622,2.813,912,2.985,913,3.194,914,4.071,915,4.071,916,4.071,917,3.318,918,4.404,919,3.624,920,4.909]],["t/54",[603,2.56]],["t/56",[10,3.229,12,1.041,26,3.061,33,2.465,60,1.952,73,1.691,75,3.061,76,1.982,97,4.161,115,3.026,229,2.217,340,2.697,467,3.142,479,4.521,569,4.671,589,2.925,643,3.448,658,4.389,740,3.142,741,5.06,771,2.847,791,4.389,921,5.636,922,3.667,923,4.161,924,3.142,925,4.674,926,3.667,927,4.389]],["t/58",[10,2.896,12,1.172,17,2.587,18,2.613,60,2.394,63,2.443,73,1.791,75,2.744,76,1.777,84,1.558,115,2.057,138,2.392,151,2.497,190,2.553,203,3.935,241,3.415,249,3.073,256,3.731,277,3.415,284,2.443,287,3.561,297,2.497,320,3.561,340,1.833,344,2.057,380,3.935,388,2.896,456,4.191,541,3.935,546,2.896,550,3.731,568,3.073,603,1.558,643,2.344,849,3.935,925,4.191,928,5.054,929,4.534,930,3.731,931,3.415,932,5.054,933,4.191,934,3.175,935,4.191]],["t/60",[6,1.347,12,1.025,17,2.454,48,5.103,73,1.863,131,3.388,138,3.102,151,3.237,179,4.429,205,5.435,251,3.865,295,3.168,320,4.618,383,4.429,442,4.429,586,2.14,755,4.429,930,4.838,936,6.048,937,6.553]],["t/62",[6,1.801,12,0.688,17,2.059,25,3.335,33,3.596,55,2.603,60,2.534,61,3.876,84,1.696,98,2.128,115,2.238,140,3.717,160,2.362,161,3.717,179,3.717,189,3.393,249,3.345,285,1.934,287,3.876,421,7.375,445,4.079,453,6.564,848,4.562,933,4.562,938,3.579,939,5.5,940,5.5,941,4.934,942,5.5]],["t/64",[12,0.878,48,4.024,60,2.431,71,3.242,73,1.175,75,2.807,76,1.818,84,2.164,115,2.103,119,3.143,131,4.119,146,2.737,193,3.642,306,4.024,335,3.493,350,3.466,363,2.304,383,5.384,423,3.048,437,2.807,438,4.742,440,2.807,479,3.143,568,3.143,576,3.363,589,2.033,603,1.594,643,2.397,741,3.143,742,3.816,767,4.024,768,3.816,908,3.493,943,5.168,944,4.944,945,5.168,946,4.024,947,5.168,948,5.168]],["t/66",[603,2.56]],["t/68",[12,0.942,17,1.738,47,2.606,60,1.608,73,1.482,146,2.459,174,3.615,186,3.021,228,0.769,233,1.923,244,1.25,265,2.917,268,2.293,274,3.428,315,2.521,317,2.4,340,2.961,349,2.905,492,1.738,557,3.271,562,3.021,581,2.4,583,2.244,584,2.459,586,2.458,591,3.021,592,2.293,607,2.588,640,2.823,657,2.345,669,3.138,673,2.66,691,2.917,700,2.345,741,3.962,756,2.588,763,3.85,771,2.345,775,2.917,865,3.138,949,2.738,950,3.85,951,4.165,952,1.993,953,3.85,954,3.271,955,4.165,956,2.823,957,3.271,958,3.615,959,3.138,960,4.642,961,2.153,962,3.428,963,4.165]],["t/70",[12,1.083,84,2.211,115,2.918,228,1.187,340,2.601,344,2.918,348,4.229,349,3.197,358,4.229,388,4.109,643,3.325,764,5.947,964,7.171]],["t/72",[12,0.979,73,1.78,76,2.753,355,7.021,752,5.778,965,4.363]],["t/75",[6,0.784,10,2.186,12,0.843,30,2.971,33,3.481,51,4.403,71,1.553,73,1.286,74,0.89,76,2.931,77,2.816,84,1.176,94,2.578,101,2.578,105,2.688,115,1.553,134,2.186,136,2.816,146,2.995,151,1.885,168,2.688,172,3.164,173,1.885,208,3.164,235,2.32,240,1.734,247,2.816,249,2.32,256,2.816,273,2.816,285,1.342,330,4.69,373,2.397,388,2.186,467,3.152,498,1.553,533,2.397,568,2.32,598,2.02,643,1.769,671,2.482,695,1.806,751,3.422,752,2.816,755,2.578,765,3.422,766,3.164,767,2.971,768,2.816,793,3.164,926,2.482,933,3.164,965,3.152,966,2.482,967,3.422,968,5.073,969,3.815,970,3.815,971,5.655,972,3.422,973,4.975,974,3.815,975,2.25,976,3.815,977,3.815,978,3.815,979,3.815,980,3.815,981,3.815,982,3.815,983,3.422,984,3.815,985,3.815,986,2.924,987,3.164,988,2.971]],["t/77",[6,0.987,7,2.61,28,3.26,68,2.834,69,3.742,74,1.121,76,3.169,79,3.985,97,3.548,98,2.582,170,3.248,187,3.985,195,2.753,201,3.386,284,2.323,379,3.742,408,3.372,437,2.61,444,3.707,467,2.679,476,3.742,486,2.922,494,3.548,498,2.716,695,2.275,700,2.428,772,3.127,931,3.248,965,2.679,975,4.523,986,3.965,989,4.311,990,4.805,991,3.985,992,4.311,993,4.311,994,4.805,995,3.742,996,4.805,997,4.805,998,4.311,999,3.985,1000,4.805]],["t/79",[10,2.896,12,1.059,33,2.211,34,2.17,63,3.807,71,2.057,73,1.149,76,2.977,94,3.415,95,3.731,96,2.613,99,3.073,131,2.613,135,3.288,161,3.415,168,3.561,176,2.344,184,2.677,193,3.561,229,2.718,259,3.415,261,2.98,284,2.443,306,3.935,408,2.553,420,2.613,454,3.561,478,1.833,648,3.415,658,3.935,659,4.191,702,3.073,749,4.191,908,3.415,935,4.191,938,3.288,986,2.613,1001,5.102,1002,5.731,1003,3.935,1004,4.191,1005,4.534,1006,5.054]],["t/81",[1,3.925,6,0.899,10,2.507,12,1.126,34,1.879,73,0.995,74,2.1,76,2.957,96,2.262,106,3.407,118,2.661,126,1.516,138,2.071,142,4.432,153,3.407,164,2.84,176,2.898,178,3.483,184,2.317,198,2.21,233,1.812,240,2.84,243,2.376,244,1.682,260,2.58,261,2.58,268,2.161,478,1.587,577,2.749,631,2.749,648,4.223,675,2.58,986,3.231,1001,3.23,1007,4.375,1008,3.925,1009,4.866,1010,3.925,1011,3.925,1012,3.925,1013,4.375,1014,3.083,1015,3.407,1016,4.065,1017,2.957,1018,3.23,1019,3.23]],["t/83",[1,2.866,12,1.126,15,1.811,17,2.12,22,1.566,25,1.097,47,1.153,58,1.527,63,1.394,65,1.753,70,2.586,73,1.288,74,1.823,76,1.014,84,0.889,96,3.328,98,1.115,118,3.442,126,0.999,129,1.765,138,1.365,140,1.949,142,1.753,144,2.129,145,2.391,150,2.032,151,1.424,176,2.985,178,3.156,184,2.416,189,1.337,204,1.216,210,3.553,212,1.238,230,1.811,233,3.089,240,2.573,243,3.074,244,1.887,248,2.586,259,1.949,260,1.7,261,2.691,265,1.811,268,1.424,283,1.753,284,1.394,288,1.194,289,2.245,322,1.753,332,1.753,363,2.034,419,1.311,454,2.032,468,2.391,478,2.053,480,2.245,481,2.391,565,2.032,577,1.811,586,0.941,598,2.416,667,1.7,676,2.032,697,3.826,698,1.607,701,2.129,742,2.129,756,1.607,791,2.245,934,1.811,949,1.7,961,1.337,965,1.607,1009,3.553,1015,2.245,1016,4.188,1017,3.083,1018,2.129,1019,2.129,1020,2.586,1021,1.7,1022,2.391,1023,2.586,1024,2.883,1025,2.391,1026,2.391,1027,2.586,1028,2.586,1029,1.949,1030,2.883,1031,2.883,1032,2.391,1033,2.586,1034,2.586]],["t/85",[1,1.107,5,1.301,6,0.362,7,0.957,12,0.829,15,1.107,17,1.136,18,0.911,26,0.957,28,1.497,31,1.462,34,0.757,42,1.692,55,0.834,60,0.611,73,0.401,74,1.924,76,2.609,101,4.237,102,2.837,106,1.372,107,1.301,110,1.581,111,1.462,121,1.301,126,1.051,129,1.174,134,1.01,142,1.072,144,1.301,156,1.242,160,0.757,166,1.581,171,1.462,176,0.817,178,0.982,198,2.019,200,1.975,201,2.817,204,2.258,212,0.757,219,0.991,222,1.303,228,0.786,229,0.693,231,1.242,233,1.257,237,1.301,240,0.801,243,0.957,244,1.575,259,1.191,260,1.039,272,1.242,278,2.517,280,1.147,281,1.301,285,0.62,313,5.156,326,1.01,332,1.846,335,1.191,346,1.372,363,1.782,366,1.147,371,1.301,393,0.66,408,1.533,416,0.957,419,0.801,420,0.911,440,0.957,467,0.982,468,1.462,478,0.639,486,1.072,498,1.235,532,1.467,533,1.907,557,1.242,590,1.372,598,3.1,606,0.933,609,0.89,612,1.817,614,3.794,619,0.911,620,0.89,643,0.817,655,1.147,657,0.89,675,1.039,676,1.242,693,1.242,695,1.892,698,0.982,699,1.242,700,1.533,756,0.982,774,2.951,811,1.581,812,1.462,865,1.191,908,1.191,918,1.581,923,1.301,924,1.692,961,0.817,965,0.982,968,1.581,973,2.241,986,2.769,1001,1.301,1002,2.517,1016,1.147,1018,1.301,1035,1.762,1036,1.762,1037,2.364,1038,1.762,1039,1.581,1040,4.262,1041,1.581,1042,1.242,1043,1.462,1044,1.462,1045,1.762,1046,1.462,1047,3.035,1048,1.762,1049,2.364,1050,1.762,1051,3.035,1052,1.762,1053,1.762,1054,2.723,1055,1.762,1056,1.762,1057,1.762,1058,1.762,1059,1.762,1060,1.762,1061,3.035,1062,1.581,1063,1.581,1064,3.035,1065,1.581,1066,1.107,1067,1.762,1068,1.762,1069,1.301,1070,1.762,1071,1.462,1072,1.762,1073,1.762,1074,1.762,1075,1.762,1076,1.762,1077,1.762,1078,1.762,1079,1.762,1080,1.762,1081,1.762,1082,1.762,1083,1.762,1084,1.762,1085,1.762,1086,1.762,1087,1.581,1088,1.762,1089,1.762,1090,1.762,1091,1.762,1092,1.762,1093,1.762,1094,1.581,1095,1.762,1096,1.581,1097,1.762,1098,1.762,1099,1.762,1100,1.762,1101,1.762,1102,1.762,1103,1.462,1104,1.762,1105,1.581,1106,1.581]],["t/87",[6,0.355,10,0.989,12,0.892,14,0.915,17,1.474,18,0.893,19,0.872,25,0.657,26,0.938,28,1.117,33,0.755,42,1.663,47,0.691,58,0.915,60,1.033,63,0.835,69,2.322,71,1.907,73,0.678,74,1.447,75,0.938,76,1.86,82,1.085,88,1.05,101,3.575,115,0.703,126,1.033,136,1.275,143,2.473,151,0.853,162,1.345,164,0.785,170,1.167,173,0.853,175,1.549,176,0.801,178,3.973,181,1.432,184,1.58,198,1.507,200,1.124,201,1.217,204,1.976,210,4.119,219,0.564,228,0.652,229,0.679,230,1.874,231,1.217,233,0.715,234,1.167,240,2.405,244,1.67,251,1.018,265,1.874,267,1.345,268,1.473,275,1.345,278,2.473,285,0.607,288,0.715,294,1.124,313,4.831,317,0.893,323,0.893,332,1.05,347,1.813,354,2.322,363,0.77,366,1.94,384,1.124,393,0.647,394,1.345,419,0.785,440,0.938,444,0.835,471,1.709,478,0.626,480,1.345,492,0.647,498,0.703,529,1.432,558,1.432,576,1.124,586,2.025,597,0.853,603,0.533,606,0.915,608,1.549,612,0.785,614,2.255,643,0.801,657,0.872,667,1.018,681,2.102,692,1.432,697,3.575,698,2.194,740,0.963,752,3.905,753,1.549,755,1.167,774,3.905,783,1.275,794,1.549,802,0.915,812,2.473,839,2.906,849,1.345,866,1.275,931,1.167,949,1.759,973,1.275,986,2.735,988,1.345,1003,2.322,1016,4.465,1026,3.264,1029,2.016,1032,1.432,1033,2.675,1040,1.549,1049,3.065,1066,1.085,1071,1.432,1087,1.549,1096,1.549,1103,3.264,1105,1.549,1106,1.549,1107,1.549,1108,1.727,1109,4.685,1110,1.727,1111,4.745,1112,1.167,1113,1.727,1114,1.727,1115,1.727,1116,1.549,1117,1.727,1118,1.727,1119,1.727,1120,1.727,1121,1.727,1122,1.727,1123,1.727,1124,1.727,1125,1.727,1126,1.727,1127,1.727,1128,1.727,1129,1.727,1130,1.727,1131,2.982,1132,1.727,1133,1.549,1134,2.675,1135,1.727,1136,1.549,1137,1.549,1138,2.675,1139,1.549,1140,2.675,1141,2.473,1142,1.727,1143,1.727,1144,1.549,1145,1.727,1146,1.727,1147,1.727,1148,1.727,1149,1.345,1150,1.727,1151,1.727,1152,1.167]],["t/89",[6,0.608,7,1.606,12,0.72,17,1.743,23,2.303,26,1.606,30,2.303,33,2.518,37,2.303,43,2.303,45,4.482,47,1.183,50,1.924,51,2.303,59,2.184,60,1.025,72,2.453,73,0.673,75,1.606,76,1.637,77,2.184,84,0.912,85,2.453,96,2.976,97,2.184,115,1.204,118,1.799,119,1.799,130,2.303,131,1.529,135,3.029,151,2.3,164,1.345,169,2.303,170,3.146,176,2.669,180,1.494,184,1.567,191,2.303,195,1.695,231,2.084,233,1.928,234,1.999,240,1.345,244,0.796,259,1.999,283,1.799,285,1.637,292,2.453,294,1.924,313,3.625,317,2.407,323,1.529,326,2.667,327,2.653,332,1.799,344,1.204,346,2.303,349,1.319,354,2.303,363,1.319,384,1.924,393,1.743,416,1.606,417,2.084,420,1.529,433,2.453,445,1.649,463,2.453,473,2.084,479,1.799,483,1.494,493,1.529,576,1.924,577,1.858,590,4.482,635,1.799,655,1.924,662,1.999,740,2.595,744,2.653,745,2.303,752,4.25,771,1.494,848,2.453,900,2.453,908,1.999,911,2.184,931,1.999,946,2.303,965,1.649,967,2.653,975,1.744,986,2.407,995,2.303,1003,3.625,1016,1.924,1017,1.999,1023,2.653,1046,2.453,1153,2.958,1154,2.958,1155,2.958,1156,2.958,1157,2.958,1158,2.958,1159,2.084,1160,2.958,1161,4.176,1162,2.653,1163,1.924,1164,2.958,1165,2.958,1166,2.958,1167,2.653,1168,2.958,1169,1.924,1170,2.653,1171,2.958,1172,2.958,1173,2.653]],["t/91",[603,2.56]],["t/93",[12,1.1,22,2.016,33,1.623,34,2.379,60,2.547,73,1.508,74,2.134,98,2.844,126,1.286,137,3.329,180,1.875,199,3.089,219,1.809,221,2.737,222,2.379,228,0.614,244,1.491,295,1.794,324,3.078,343,3.329,373,3.481,498,1.51,532,1.794,607,2.069,609,1.875,610,2.257,611,2.332,612,1.687,614,3.798,615,1.919,616,2.415,617,2.415,618,2.508,619,1.919,620,1.875,621,2.126,622,2.126,627,2.415,631,2.332,684,2.615,685,3.904,715,3.078,743,3.605,839,2.74,919,2.74,1141,3.078,1174,2.332,1175,3.481,1176,3.711,1177,3.711,1178,3.904,1179,3.711,1180,3.711,1181,2.415,1182,2.89,1183,2.74,1184,3.711,1185,3.711,1186,3.711,1187,2.415,1188,3.711,1189,3.711,1190,3.711,1191,3.711,1192,3.078,1193,3.711]],["t/95",[12,1.004,33,1.951,34,1.915,60,1.545,74,2.112,76,1.569,78,2.713,93,4.002,98,1.726,219,1.456,222,2.72,228,0.739,244,2.28,254,2.028,256,5.439,267,3.474,268,2.204,284,2.156,288,1.848,356,2.713,357,3.015,420,2.307,498,1.815,532,2.156,609,2.254,610,2.713,611,2.803,612,2.028,614,4.221,615,3.809,617,4.122,619,2.307,620,2.254,621,2.556,622,2.556,627,2.902,657,2.254,673,2.556,775,2.803,865,3.015,925,3.7,958,3.474,962,3.294,1054,4.002,1133,4.002,1174,2.803,1194,5.683,1195,4.461,1196,4.461,1197,4.461]],["t/97",[12,0.996,28,1.428,34,1.638,47,2.262,73,1.286,74,2.067,98,2.187,146,2.02,174,2.971,186,2.482,219,1.245,222,2.428,228,0.936,229,1.5,233,1.58,244,1.814,265,2.397,268,1.885,315,2.072,317,1.972,340,3.023,344,1.553,349,3.322,492,1.428,498,1.553,532,1.844,557,2.688,562,2.482,581,1.972,584,2.02,591,2.482,592,1.885,606,2.02,607,3.756,609,1.927,610,2.32,611,2.397,612,1.734,614,3.861,616,2.482,618,3.822,619,1.972,620,1.927,621,2.186,622,2.186,627,2.482,657,1.927,669,2.578,673,2.186,687,2.688,700,1.927,763,3.164,775,2.397,865,2.578,949,2.25,950,3.164,951,3.422,952,1.638,953,3.164,954,2.688,955,3.422,962,2.816,1183,2.816,1192,3.164,1198,3.815,1199,3.422,1200,3.815]],["t/99",[12,1.021,34,2.324,60,2.825,71,2.203,73,1.231,84,1.669,98,2.094,102,2.867,115,2.203,126,2.508,195,3.102,229,2.129,340,2.959,344,2.946,348,3.192,349,3.227,358,4.269,388,3.102,471,3.102,483,4.12,562,3.522,607,3.018,643,2.51,687,3.814,740,3.018,775,3.401,913,3.522,958,4.215,962,3.997,966,3.522,1201,5.413,1202,5.413,1203,5.413]],["t/101",[6,0.691,12,0.782,73,0.765,74,2.279,199,2.868,219,1.099,222,2.209,228,0.557,229,1.323,233,1.394,244,1.385,340,2.883,483,1.7,486,3.128,493,1.74,498,3.235,509,2.791,532,2.487,546,1.928,554,3.019,568,2.046,572,2.791,597,1.662,606,1.782,607,2.868,609,1.7,612,1.53,614,4.554,615,2.66,616,2.189,617,3.347,618,3.477,619,1.74,620,1.7,621,1.928,622,1.928,627,2.189,775,2.114,917,2.274,919,2.484,1183,2.484,1192,2.791,1199,3.019,1204,3.019,1205,3.365,1206,3.365,1207,2.62,1208,3.019,1209,3.019,1210,2.62,1211,3.365,1212,3.365,1213,3.365,1214,3.365,1215,3.365,1216,3.365,1217,3.019,1218,3.365,1219,3.365,1220,3.019,1221,3.019,1222,3.019,1223,3.365,1224,3.365,1225,3.365,1226,3.365,1227,5.145,1228,3.365,1229,6.246,1230,3.365,1231,3.019,1232,3.365,1233,3.365,1234,3.365,1235,3.365]],["t/103",[603,2.56]],["t/105",[6,1.039,27,2.98,58,2.677,84,1.558,89,4.191,126,1.751,146,2.677,230,3.175,340,1.833,349,2.253,379,3.935,389,3.073,440,2.744,492,1.892,534,3.288,585,2.443,592,2.497,604,3.415,640,3.073,644,3.935,645,3.935,669,3.415,673,2.896,743,3.288,778,2.211,944,3.561,956,4.788,975,2.98,986,2.613,991,5.731,1014,3.561,1236,3.731,1237,4.534,1238,4.534,1239,3.731,1240,4.191,1241,4.869,1242,4.534,1243,4.534,1244,4.534,1245,4.534,1246,4.191,1247,4.534,1248,3.935,1249,4.534,1250,3.561,1251,4.191,1252,3.935,1253,4.534,1254,4.191]],["t/107",[12,0.558,47,3.208,68,2.631,71,1.815,88,2.713,91,3.143,115,1.815,202,2.803,212,1.915,228,1.049,251,2.631,393,1.67,419,2.88,423,2.631,467,3.531,478,1.618,492,3.171,570,3.143,581,2.307,582,1.755,584,3.355,586,2.618,589,1.755,597,2.204,605,3.294,640,2.713,695,2.112,700,2.254,911,3.294,952,1.915,957,3.143,975,2.631,1021,2.631,1175,2.803,1181,2.902,1236,3.294,1255,5.725,1256,4.281,1257,3.474,1258,5.42,1259,3.294,1260,4.002,1261,3.7,1262,3.7,1263,3.7,1264,2.487,1265,4.933,1266,3.474]],["t/109",[6,1.251,44,2.663,81,3.96,212,3.357,228,1.294,492,2.279,582,3.075,583,3.779,586,1.987,695,2.881,704,4.494,927,4.74,961,2.823,1187,3.96,1264,3.393,1267,5.048,1268,6.087,1269,5.461,1270,5.461,1271,3.701,1272,4.289,1273,4.289,1274,4.74,1275,4.494,1276,4.494,1277,4.494,1278,4.74]],["t/111",[6,1.039,44,2.211,81,3.288,84,1.558,126,1.751,228,1.402,254,2.297,295,2.443,408,2.553,417,3.561,419,2.297,440,2.744,471,2.896,581,2.613,582,3.097,586,2.256,604,3.415,641,5.381,691,3.175,695,2.392,922,3.288,927,3.935,957,3.561,1240,4.191,1241,3.561,1264,3.852,1269,4.534,1271,3.073,1277,3.731,1279,6.199,1280,6.91,1281,3.561,1282,7.064,1283,4.534,1284,4.534,1285,5.054,1286,4.534,1287,4.534,1288,4.534,1289,5.054,1290,4.191,1291,4.534]],["t/113",[99,4.228,295,3.361,437,3.776,440,3.776,550,5.133,641,6.617,926,4.523,956,5.167,1187,4.523,1267,5.766,1271,4.228,1281,4.899,1292,6.237,1293,6.952,1294,6.952]],["t/115",[12,1.138,17,1.851,19,2.498,22,2.685,50,3.217,51,3.85,73,1.548,76,1.739,84,1.525,97,3.65,98,1.912,126,1.713,142,3.006,151,2.442,164,2.248,170,3.341,219,1.614,284,2.39,297,2.442,323,2.556,335,3.341,417,3.484,426,3.484,433,4.1,440,2.685,448,3.484,472,3.484,478,1.793,487,4.435,541,3.85,580,3.65,631,3.106,684,3.484,750,4.1,778,2.163,900,4.1,935,4.1,956,3.006,998,4.435,1014,3.484,1017,3.341,1042,3.484,1239,3.65,1283,4.435,1295,4.944,1296,4.1,1297,4.435,1298,4.435,1299,4.944,1300,4.944,1301,4.944]],["t/117",[603,2.56]],["t/119",[6,1.297,12,1.156,35,3.428,55,2.987,73,1.82,78,3.838,98,2.441,126,2.186,164,2.869,322,3.838,340,2.289,344,2.569,348,3.722,349,2.814,350,3.118,358,3.722,419,2.869,472,4.447,478,2.289,586,2.061,649,5.662,1037,4.915,1302,5.662]],["t/121",[129,2.487,138,3.043,212,3.476,246,3.406,294,4.184,317,4.185,393,3.031,445,3.584,483,3.248,569,4.04,582,3.184,583,3.108,589,3.184,961,2.982,1163,5.267,1303,5.768,1304,4.747,1305,6.43,1306,3.248]],["t/123",[12,0.991,73,1.801,228,1.311,582,3.114,583,3.827]],["t/125",[74,2.041,126,2.755,212,2.685,228,1.317,393,2.342,498,2.545,585,3.845,589,2.46,591,5.175,592,3.929,607,3.486,807,4.87,912,3.803,1307,6.254,1308,6.254,1309,6.254,1310,6.254,1311,6.254,1312,6.254,1313,6.254,1314,6.254]],["t/128",[28,2.657,189,3.291,340,2.574,349,3.164,562,4.617,604,5.815,702,4.315,802,3.759,934,4.458,949,4.185,954,5.001,1029,4.796,1315,7.096,1316,6.366]],["t/130",[11,4.666,221,3.542,229,3.405,268,3.542,317,3.708,340,2.601,492,2.685,771,3.623,934,4.505,949,4.229,1029,4.846,1316,6.433,1317,6.433]],["t/132",[12,0.978,74,2.218,219,1.626,222,2.937,228,0.824,244,1.841,345,2.705,358,4.035,372,3.366,373,3.129,403,3.878,437,2.705,438,3.366,498,2.027,532,2.407,586,1.626,607,3.814,609,2.516,610,3.028,611,3.129,612,2.264,613,4.13,614,4.821,615,2.575,616,3.24,617,3.24,618,4.624,619,2.575,620,2.516,621,2.853,622,2.853,623,4.13,624,4.13,625,4.13,626,3.24,627,3.24,912,3.028,919,3.677,1112,3.366]],["t/134",[12,0.932,29,2.536,74,2.205,212,1.954,219,1.486,222,2.758,228,0.753,244,1.729,345,2.471,358,3.789,372,3.075,373,2.858,403,3.543,437,2.471,438,3.075,498,1.852,532,2.199,570,3.206,586,2.097,607,3.581,609,2.299,610,2.767,611,2.858,612,2.068,613,3.773,614,4.635,615,2.353,616,2.96,617,2.96,618,4.342,619,2.353,620,2.299,621,2.607,622,2.607,623,3.773,624,3.773,625,3.773,626,2.96,627,2.96,912,3.906,919,3.359,1112,3.075,1317,4.082,1318,6.424,1319,4.55,1320,4.55,1321,6.424]],["t/136",[12,0.769,22,3.335,29,3.424,35,3.335,60,2.127,195,3.519,233,2.544,244,2.116,254,2.792,288,2.544,322,3.735,339,5.805,340,2.228,344,2.499,348,4.637,349,2.738,363,2.738,373,3.858,393,2.3,410,5.093,443,4.783,664,4.534,665,3.519,783,4.534,1281,4.328,1322,5.093,1323,6.141]],["t/138",[12,0.736,47,2.351,82,4.802,126,2.036,158,4.577,263,3.973,268,2.904,279,3.824,297,2.904,317,3.039,340,3.262,349,2.621,393,2.862,445,3.277,478,2.132,534,3.824,589,3.006,643,2.726,989,5.273,992,6.857,1298,5.273,1324,4.34,1325,4.875,1326,4.875,1327,5.878,1328,5.878,1329,4.875,1330,5.878]],["t/140",[6,0.788,12,1.111,18,1.983,25,2.572,35,2.083,55,1.816,57,2.496,60,1.967,65,2.333,73,1.7,84,1.751,94,2.593,98,1.484,146,2.032,151,1.895,173,3.34,202,2.41,206,2.987,219,1.854,233,1.589,240,1.744,244,1.032,272,2.703,285,1.349,317,1.983,340,1.392,344,2.311,349,3.014,363,3.014,416,2.083,423,2.262,443,4.422,461,2.593,471,2.198,478,2.452,488,2.832,581,1.983,630,3.181,660,2.333,662,2.593,664,2.832,671,2.496,672,2.593,740,2.138,762,3.441,771,1.938,782,3.181,783,2.832,1264,2.138,1306,1.938,1331,7.472,1332,3.836,1333,3.441,1334,3.836,1335,3.836,1336,2.832,1337,2.832,1338,3.441,1339,4.709,1340,3.836,1341,3.836,1342,3.836,1343,3.836,1344,3.836,1345,4.709,1346,3.181,1347,3.836]],["t/142",[603,2.56]],["t/144",[244,2.014,345,4.064,586,2.444,690,5.526,743,4.87,780,5.058,956,4.551,1348,6.714,1349,6.714,1350,6.207]],["t/146",[23,5.103,74,1.529,221,3.237,384,4.264,441,4.264,479,3.985,533,4.117,589,2.577,643,3.039,693,4.618,741,3.985,956,3.985,1005,5.879,1349,5.879,1350,6.794,1351,6.553,1352,6.553,1353,4.618,1354,4.264,1355,6.553,1356,5.103,1357,6.553]],["t/148",[603,2.56]],["t/150",[1,1.167,12,0.233,15,1.167,18,0.961,19,1.604,27,1.096,28,0.696,30,3.239,34,0.798,39,1.541,58,0.984,71,2.883,74,1.713,84,1.283,91,1.309,107,1.372,122,1.667,124,1.209,132,1.667,144,1.372,165,1.667,167,1.372,186,1.209,191,1.447,196,2.849,200,2.066,209,1.667,222,0.798,228,0.308,231,1.309,234,2.146,236,1.447,237,2.345,242,3.071,243,1.009,247,1.372,249,1.13,251,1.096,255,1.541,259,1.256,269,1.667,272,2.238,273,1.372,280,1.209,288,1.315,306,1.447,309,1.209,318,1.667,323,0.961,326,1.82,330,4.585,340,0.674,347,1.13,348,1.096,353,1.667,393,0.696,406,4.415,407,1.667,408,0.939,425,1.667,435,1.667,437,1.009,459,1.667,464,1.541,470,3.731,476,1.447,498,2.25,506,1.667,509,1.541,555,1.447,557,1.309,573,1.667,597,1.569,606,0.984,609,0.939,620,0.939,626,1.209,644,1.447,673,1.065,675,1.096,695,0.879,698,1.036,741,1.931,745,1.447,759,2.634,772,1.209,822,3.449,866,1.372,910,1.541,913,1.209,930,2.345,938,2.706,983,2.849,1043,1.541,1069,1.372,1103,1.541,1107,2.849,1159,1.309,1161,1.667,1175,1.167,1204,1.667,1207,1.447,1210,1.447,1231,1.667,1259,1.372,1281,1.309,1292,3.731,1358,1.858,1359,1.667,1360,1.858,1361,1.858,1362,1.858,1363,1.858,1364,1.858,1365,3.176,1366,5.529,1367,1.858,1368,1.858,1369,1.858,1370,2.473,1371,6.785,1372,1.858,1373,1.858,1374,1.858,1375,3.176,1376,1.858,1377,4.159,1378,1.858,1379,1.858,1380,4.159,1381,1.858,1382,1.858,1383,1.858,1384,1.858,1385,1.858,1386,1.858,1387,1.858,1388,1.858,1389,1.541,1390,1.858,1391,3.176,1392,1.858,1393,1.858,1394,1.858,1395,1.858,1396,1.858,1397,1.858,1398,1.858,1399,1.858,1400,1.858,1401,1.858,1402,1.667,1403,1.858,1404,1.858,1405,1.858,1406,1.858,1407,1.858,1408,1.858,1409,1.858,1410,1.858,1411,1.858,1412,1.858,1413,1.858,1414,1.667,1415,4.159,1416,1.858,1417,3.176,1418,1.858,1419,1.858,1420,4.159,1421,1.858,1422,1.858,1423,1.858,1424,1.858,1425,1.858,1426,1.858,1427,3.176,1428,1.858,1429,1.858,1430,1.858,1431,1.858,1432,1.858,1433,1.858,1434,1.858,1435,1.858,1436,1.667,1437,1.858,1438,1.858,1439,1.858,1440,1.858,1441,1.858,1442,1.858,1443,1.858,1444,1.858,1445,1.858,1446,1.858,1447,1.858,1448,1.858,1449,1.858,1450,1.858,1451,1.858,1452,1.541,1453,1.667,1454,1.541,1455,1.667,1456,1.667]],["t/152",[12,0.593,28,2.475,34,2.035,57,3.083,74,2.148,156,4.658,189,2.198,204,1.998,222,2.035,228,0.785,243,2.574,244,1.275,249,2.882,288,1.963,340,1.719,366,3.083,498,3.098,546,2.715,547,3.203,548,3.499,565,3.339,606,2.51,609,2.394,620,2.394,626,3.083,673,2.715,698,2.642,802,2.51,1044,3.93,1069,3.499,1207,3.69,1208,4.251,1209,4.251,1210,3.69,1221,4.251,1222,4.251,1452,3.93,1453,4.251,1454,3.93,1455,4.251,1456,4.251,1457,4.739,1458,4.739,1459,2.977,1460,4.739,1461,4.739,1462,4.739,1463,4.739,1464,4.739,1465,3.93,1466,6.61,1467,4.739]],["t/154",[7,2.439,12,0.796,28,1.681,34,1.928,37,3.497,55,3.012,73,1.021,74,2.057,126,1.555,138,2.125,189,2.082,190,2.268,219,1.466,222,1.928,228,0.743,249,2.73,251,2.648,323,2.322,340,1.629,363,2.002,420,2.322,442,3.035,498,3.009,540,3.497,547,5.436,548,5.458,572,3.724,606,2.378,607,2.503,609,2.268,619,2.322,626,2.921,673,2.573,1069,3.315,1159,3.164,1175,2.821,1182,3.497,1207,3.497,1210,3.497,1296,3.724,1336,5.458,1359,4.028,1452,3.724,1454,3.724,1468,4.028,1469,4.49,1470,4.49,1471,4.49,1472,4.49,1473,4.49,1474,4.49,1475,4.49,1476,4.49,1477,4.49,1478,4.49]],["t/156",[603,2.56]],["t/158",[6,1.095,12,0.667,14,2.822,22,2.894,25,2.028,26,2.894,57,3.467,84,1.643,180,2.692,199,2.971,204,2.247,244,1.434,254,2.422,283,3.24,284,2.576,363,3.194,408,2.692,478,1.933,492,3.24,493,2.755,603,1.643,665,3.053,804,4.42,805,5.702,913,3.467,954,5.048,1152,3.602,1277,3.934,1354,3.467,1459,4.5,1479,5.033,1480,4.15,1481,3.934,1482,4.781,1483,4.781]],["t/160",[12,0.723,14,2.078,17,2.162,19,1.982,25,2.197,57,3.757,84,1.21,117,2.465,129,2.233,134,2.248,160,1.685,180,1.982,189,1.82,198,1.982,204,2.434,221,1.939,254,1.784,260,2.314,268,2.852,284,3.312,285,2.031,288,2.391,295,1.897,334,3.219,363,2.574,420,2.029,451,2.652,460,4.789,478,1.423,492,1.469,493,2.985,665,2.248,778,1.717,780,2.652,805,6.532,913,2.553,999,3.254,1173,3.52,1297,3.52,1345,3.254,1459,4.304,1479,3.219,1481,5.944,1482,3.52,1484,3.924,1485,3.924,1486,3.924,1487,3.924,1488,5.18,1489,3.52,1490,3.52,1491,3.924,1492,4.789,1493,3.924,1494,3.52,1495,3.52,1496,3.52,1497,3.056,1498,3.254,1499,3.52]],["t/162",[6,0.544,12,0.899,15,2.678,17,0.991,25,1.008,28,1.818,35,0.818,47,0.603,52,1.351,53,3.253,55,2.018,57,0.98,60,1.227,65,0.916,76,0.931,78,0.916,84,0.465,96,1.369,98,0.583,101,2.394,115,0.613,159,1.955,160,2.768,176,1.228,189,2.251,190,2.915,199,1.476,219,1.157,221,3.029,233,0.624,234,1.018,240,0.685,243,2.315,244,1.985,254,0.685,284,2.06,285,2.526,288,0.624,295,1.712,309,0.98,312,2.678,315,0.818,326,0.863,334,4.52,345,0.818,350,0.744,441,0.98,451,1.018,455,1.249,460,7.247,461,1.018,478,1.546,489,4.494,493,0.779,586,1.157,598,1.402,603,0.465,635,0.916,665,5.046,667,2.514,676,3.004,681,3.004,695,2.298,697,2.881,698,2.376,778,2.524,780,5.309,802,0.798,807,1.173,831,3.319,913,0.98,938,1.723,944,1.062,959,2.394,999,1.249,1019,1.112,1022,2.196,1062,1.351,1303,2.375,1389,4.026,1459,2.225,1488,2.375,1494,1.351,1495,1.351,1496,1.351,1497,1.173,1498,2.938,1500,1.506,1501,1.506,1502,1.506,1503,1.506,1504,1.506,1505,4.775,1506,1.351,1507,4.262,1508,2.375,1509,1.506,1510,1.506,1511,1.112,1512,1.506,1513,1.351,1514,2.648,1515,1.506,1516,1.506,1517,1.506,1518,1.506,1519,1.506,1520,4.262,1521,1.506,1522,1.506,1523,1.506,1524,1.506,1525,1.506,1526,1.506,1527,2.648,1528,1.506,1529,1.506,1530,1.506,1531,1.506,1532,1.506,1533,1.506,1534,1.506,1535,1.506]],["t/164",[3,4.319,6,1.07,12,0.883,26,2.828,47,2.821,60,1.804,98,2.728,152,5.849,164,2.367,202,4.431,204,2.196,219,1.7,221,2.572,244,1.898,285,1.831,288,2.157,309,4.589,312,3.271,334,3.932,420,2.692,478,2.901,479,3.166,492,2.641,567,4.055,635,3.166,778,2.278,931,3.519,959,3.519,1479,4.778,1536,5.207,1537,5.207,1538,7.053,1539,5.207,1540,5.207,1541,5.207]],["t/166",[3,5.383,6,1.673,12,1.019,17,2.43,26,3.525,47,2.597,121,4.792,198,3.279,219,2.119,221,3.207,244,1.747,285,2.283,312,4.078,334,4.539,479,3.947,489,5.055,959,4.387,975,3.828,1479,3.618,1481,4.792,1505,5.055]],["t/168",[22,3.248,84,1.844,107,4.416,180,3.021,244,1.61,254,2.719,260,3.527,268,2.954,284,2.891,285,2.103,408,3.021,492,3.51,493,3.092,778,2.616,805,4.214,924,3.334,954,4.214,1112,4.042,1322,4.96,1479,5.446,1480,4.657,1489,5.365,1542,5.365]],["t/170",[6,1.012,7,1.726,12,0.754,17,1.19,18,1.643,19,3.045,25,2.293,26,2.673,39,4.083,42,1.771,47,1.271,55,1.504,65,2.993,82,1.996,84,1.518,96,1.643,160,2.914,162,2.474,164,1.444,178,1.771,189,1.473,190,1.605,204,1.34,240,1.444,260,1.874,268,2.432,285,1.118,288,2.039,295,2.913,312,1.996,315,1.726,322,1.932,334,1.771,344,1.293,348,1.874,350,1.57,363,2.195,393,1.19,408,3.429,420,1.643,426,4.247,461,2.147,478,1.153,565,4.247,567,2.474,600,2.635,631,1.996,635,2.993,646,2.85,660,1.932,662,2.147,683,3.834,695,1.504,772,2.067,773,3.834,778,2.153,780,2.147,802,1.683,804,2.635,934,1.996,950,2.635,975,1.874,1043,2.635,1112,2.147,1248,2.474,1271,1.932,1326,2.635,1337,2.346,1356,3.834,1389,2.635,1459,1.996,1479,3.359,1481,3.635,1492,2.635,1497,2.474,1505,3.834,1508,2.85,1511,2.346,1543,2.474,1544,2.85,1545,3.177,1546,3.177,1547,3.177,1548,3.177,1549,6.09,1550,4.923,1551,3.177,1552,3.177,1553,3.177,1554,3.177,1555,3.177,1556,3.177,1557,3.177,1558,2.85]],["t/172",[6,1.125,7,1.983,12,0.822,17,1.367,25,2.083,26,1.983,29,2.036,55,2.591,60,1.265,65,2.221,99,2.221,117,2.294,160,3.131,161,2.468,164,2.488,169,4.263,178,2.036,204,1.54,219,1.192,240,1.66,242,2.696,254,2.488,260,3.228,268,2.704,284,2.646,285,1.925,288,1.513,309,3.562,312,2.294,322,2.221,334,3.051,363,1.628,393,1.367,408,3.317,420,1.888,461,3.699,476,2.844,478,2.382,492,1.367,493,1.888,565,3.857,586,1.787,661,3.276,696,4.911,738,3.276,772,2.376,773,2.844,778,1.597,807,2.844,1149,4.263,1337,2.696,1348,3.276,1356,2.844,1459,4.582,1479,3.051,1480,2.844,1481,2.696,1497,2.844,1505,6.084,1549,4.54,1558,3.276,1559,4.911,1560,3.652,1561,3.652,1562,3.652,1563,3.652,1564,3.652,1565,3.652,1566,3.652,1567,3.276]],["t/174",[603,2.56]],["t/176",[12,0.79,47,3.514,74,1.867,76,2.22,228,1.325,384,4.106,581,3.263,582,3.147,583,3.051,584,3.343,586,2.061,597,3.118,704,4.66,922,4.106,1021,3.722,1266,4.915,1272,4.447,1273,4.447,1275,4.66,1276,4.66,1278,4.915,1568,4.915]],["t/178",[204,3.377,233,3.317,959,5.413,1569,8.009]],["t/180",[6,1.53,28,1.704,29,2.536,129,3.129,212,2.758,228,1.339,229,1.79,398,3.543,492,1.704,582,2.929,583,2.199,585,4.4,586,1.486,599,2.858,802,2.41,912,3.906,922,4.18,952,3.197,961,2.11,1272,3.206,1273,4.527,1274,5.003,1511,5.498,1570,7.077,1571,4.55,1572,6.424,1573,4.55,1574,4.527,1575,7.446,1576,7.446,1577,4.55,1578,7.446]],["t/182",[6,0.727,28,1.325,29,2.98,44,1.548,71,1.44,84,1.091,88,2.152,98,2.068,106,2.756,228,0.885,235,2.152,252,3.175,284,1.711,376,4.433,389,2.152,398,2.756,408,3.255,420,1.83,445,3.591,492,1.325,541,2.756,577,2.223,582,2.103,585,4.188,586,1.155,675,2.087,678,2.756,702,5.117,778,1.548,782,2.935,833,3.175,922,5.475,961,2.479,995,2.756,1004,2.935,1039,3.175,1046,2.935,1167,3.175,1169,4.192,1174,2.223,1306,2.701,1339,4.433,1468,3.175,1511,3.947,1570,6.392,1574,3.767,1579,7.549,1580,3.539,1581,3.539,1582,3.539,1583,5.346,1584,3.539,1585,3.175,1586,3.539,1587,3.539,1588,4.433,1589,5.346,1590,3.175,1591,6.442,1592,3.539,1593,3.539,1594,3.539]],["t/184",[12,0.82,29,3.653,76,2.305,129,2.535,202,4.117,212,2.814,228,1.085,344,2.667,485,5.435,585,3.168,704,4.838,924,3.653,1021,3.865,1170,5.879,1271,3.985,1274,5.103,1275,4.838,1276,4.838,1278,5.103,1568,5.103,1570,5.435,1574,4.618,1579,5.879]],["t/186",[603,2.56]],["t/188",[12,0.762,28,2.279,44,2.663,73,1.384,126,2.109,228,1.294,279,3.96,393,2.279,419,2.767,492,2.279,582,3.075,583,2.942,585,2.942,589,2.394,592,3.007,599,3.824,672,4.114,700,3.075,702,3.701,922,3.96,952,2.614,1256,5.284,1272,4.289,1273,4.289,1595,4.74,1596,6.087,1597,6.087,1598,4.74]],["t/190",[6,1.538,212,3.214,219,2.444,228,1.239,266,6.714,593,6.714,615,4.593,1112,5.058,1599,6.714]],["t/192",[12,0.776,44,3.459,219,2.582,244,1.668,254,2.817,261,3.655,285,2.18,288,2.567,493,3.204,584,3.282,615,3.204,691,3.893,711,5.14,917,4.188,1175,3.893,1194,5.559,1322,5.14,1336,4.575,1465,5.14,1600,6.197,1601,5.14,1602,7.908,1603,5.559,1604,5.559,1605,5.14,1606,6.197]],["t/194",[12,0.683,28,2.043,32,4.028,60,1.89,118,3.318,143,4.525,198,2.757,212,3.516,228,1.356,244,2.204,254,2.48,285,2.56,372,3.688,385,4.918,550,4.028,615,4.234,711,4.525,713,4.249,714,6.529,715,6.036,917,3.688,1414,4.895,1599,7.346,1605,4.525,1607,7.277,1608,6.529,1609,6.529]],["t/196",[244,2.014,265,4.702,285,2.632,455,6.207,492,2.802,570,5.274,604,5.058,665,4.288,1610,7.484,1611,7.484]],["t/198",[19,3.343,29,3.688,126,2.292,219,2.16,244,1.781,279,4.305,323,3.421,334,3.688,393,2.477,419,3.008,441,4.305,492,2.477,493,3.421,533,4.157,589,2.602,660,4.023,922,4.305,952,2.841,1159,4.662,1324,4.885,1325,5.487,1333,5.936]],["t/200",[12,0.537,47,3.153,68,2.532,71,1.747,74,1.002,75,2.331,88,2.611,91,3.025,129,2.384,202,2.697,212,1.843,228,1.02,251,2.532,288,1.778,393,1.607,419,2.802,467,3.436,478,1.557,492,2.951,570,3.025,581,2.22,582,1.689,584,3.265,586,2.573,589,1.689,597,2.121,605,3.17,640,2.611,695,2.032,775,2.697,944,3.025,952,1.843,957,3.025,975,3.635,1021,2.532,1181,2.793,1236,3.17,1255,5.652,1256,4.166,1257,3.343,1258,4.874,1260,3.851,1261,3.56,1262,3.56,1263,3.56,1264,2.393,1265,4.8,1266,3.343,1567,3.851,1598,3.343,1612,4.293,1613,6.164,1614,4.293]],["t/202",[603,2.56]],["t/204",[6,0.929,7,2.455,12,1.009,13,2.84,14,2.394,15,4.661,16,3.52,17,2.778,18,2.337,19,2.283,20,4.055,21,4.055,22,2.455,23,4.979,24,5.228,25,2.433,28,1.692,58,2.394,61,3.185,64,3.664,74,1.055,81,2.941,119,2.748,138,3.026,145,3.748,146,3.387,154,3.52,160,1.941,163,3.748,164,2.055,186,2.941,244,1.217,254,2.055,258,3.337,323,2.337,329,3.52,344,2.602,350,2.233,360,3.748,361,4.055,389,2.748,662,3.055,665,2.59,760,4.055,761,4.055,941,4.055,959,3.055,1044,3.748,1465,3.748,1585,4.055,1615,4.055,1616,3.748,1617,4.52,1618,4.055,1619,4.52]],["t/206",[6,0.735,11,2.326,12,1.113,13,2.246,14,1.894,17,2.899,18,1.849,24,3.797,25,2.746,28,2.017,29,3.003,50,2.326,53,3.276,55,1.692,59,2.64,60,1.866,63,1.728,73,1.225,76,2.723,83,3.208,84,1.103,103,2.784,117,3.385,119,4.388,126,1.239,151,1.766,167,3.978,176,2.499,182,2.965,189,2.499,190,2.722,193,2.52,195,2.049,198,1.806,204,3.043,205,2.965,206,2.784,219,1.167,230,2.246,233,2.685,236,2.784,240,2.947,241,3.641,244,1.45,279,2.326,284,2.604,285,2.538,286,3.208,287,3.797,586,1.167,597,1.766,795,3.208,936,3.978,1094,5.816,1620,3.576,1621,3.978,1622,2.965,1623,3.576,1624,3.208]],["t/209",[71,3.114,582,3.009,676,5.392,769,5.958,927,5.958,1625,7.651,1626,7.651,1627,7.651]],["t/211",[6,1.385,12,1.043,13,3.062,14,2.581,15,3.062,24,3.434,50,3.171,55,2.307,59,3.598,60,2.677,74,2.165,84,1.503,118,2.964,140,3.294,186,4.385,190,2.462,202,3.062,203,3.795,241,3.294,244,2.08,254,2.216,277,4.555,285,2.371,288,2.019,317,2.52,344,3.393,466,3.598,580,3.598,591,3.171,662,3.294,695,2.307,771,2.462,930,3.598,949,2.874,1014,3.434,1618,4.372,1628,4.874,1629,4.874,1630,3.795]],["t/213",[603,2.56]],["t/215",[6,1.023,12,1.053,35,2.705,42,2.776,63,2.407,73,1.777,76,2.406,81,3.24,84,1.536,105,3.509,244,1.34,245,3.878,254,2.264,288,2.063,297,2.46,357,5.282,366,3.24,392,5.507,423,2.937,440,2.705,452,3.129,472,4.821,583,2.407,639,4.468,641,3.878,702,3.028,778,2.178,922,3.24,938,3.24,956,4.16,965,2.776,973,3.677,986,2.575,1014,3.509,1042,3.509,1169,4.451,1241,4.821,1271,3.028,1306,2.516,1370,3.878,1631,4.468,1632,4.98]],["t/218",[12,0.878,44,3.069,63,2.498,73,1.596,76,2.468,84,1.594,151,2.553,180,2.611,212,2.219,228,0.856,295,2.498,297,2.553,340,1.875,357,3.493,366,3.363,367,3.816,388,2.961,437,2.807,440,2.807,442,3.493,452,3.247,456,4.286,494,3.816,580,3.816,582,2.76,583,4.13,585,2.498,675,3.048,702,3.143,756,3.911,961,3.254,965,2.881,973,3.816,1271,3.143,1304,3.816,1306,3.545,1631,4.636,1633,4.636,1634,4.024,1635,4.286]],["t/220",[6,1.365,7,2.591,44,2.905,53,2.902,111,3.957,115,1.942,126,1.653,129,1.846,151,2.357,162,3.716,170,4.489,212,2.049,229,1.877,244,1.788,254,3.019,285,1.678,288,2.751,357,4.489,419,2.169,423,2.814,442,3.225,444,2.307,452,2.998,473,3.363,494,3.523,574,3.363,582,1.877,583,2.307,638,4.281,672,4.489,695,2.259,775,2.998,778,2.087,823,3.957,924,2.66,956,4.646,961,2.213,1241,3.363,1256,5.164,1279,4.281,1282,4.281,1304,3.523,1306,2.411,1595,5.172,1634,3.716,1635,3.957,1636,4.772,1637,4.281,1638,4.281]],["t/222",[6,1.392,12,1.046,19,2.48,33,2.147,35,2.666,43,3.823,44,2.147,71,1.998,73,1.764,76,2.382,84,2.089,98,1.899,212,2.108,213,3.624,244,1.321,254,2.231,272,3.459,317,2.538,321,3.459,331,3.624,349,2.188,383,3.318,388,2.813,392,3.459,437,2.666,444,2.373,486,2.985,660,2.985,946,3.823,965,2.736,986,4.01,988,3.823,1169,5.046,1254,4.071,1281,3.459,1304,3.624,1306,2.48,1634,3.823,1635,4.071,1639,4.909,1640,4.909,1641,4.404,1642,4.909,1643,4.909,1644,4.909,1645,4.909]],["t/224",[6,1.178,42,4.677,76,2.015,115,2.332,151,2.831,249,3.485,408,2.895,437,3.112,440,3.112,444,2.77,452,3.6,471,3.283,473,4.038,583,2.77,660,3.485,691,3.6,740,3.194,772,5.794,778,2.507,924,3.194,961,2.657,965,3.194,1306,2.895,1402,6.744,1646,5.73,1647,8.389,1648,4.462,1649,5.73,1650,5.73,1651,5.73]],["t/226",[12,0.717,42,4.191,73,1.303,76,2.644,78,3.485,84,1.767,115,2.332,204,2.416,340,2.079,388,3.283,452,3.6,562,3.728,582,3.3,583,3.634,643,2.657,672,3.873,691,3.6,756,4.191,764,4.752,775,3.6,924,3.194,961,2.657,965,4.191,986,2.963,1256,5.08,1306,2.895,1595,4.462,1637,5.141,1638,5.141,1652,4.462]],["t/228",[6,1.208,12,0.956,42,4.261,73,1.738,76,2.067,340,2.132,356,5.165,385,3.973,416,3.192,445,3.277,486,3.574,582,2.312,583,3.695,643,2.726,671,3.824,672,3.973,741,3.574,924,3.277,961,2.726,965,3.277,986,3.039,1169,4.973,1306,2.97,1511,4.34,1653,5.878,1654,5.273,1655,5.273,1656,5.273]],["t/230",[82,4.807,119,4.653,340,2.776,698,4.265,701,5.649,740,4.265,1657,6.864,1658,7.651]],["t/232",[603,2.56]],["t/234",[27,3.688,71,3.237,284,3.845,345,3.396,423,3.688,555,4.87,581,3.233,584,3.312,633,5.186,691,3.929,1181,4.069,1250,4.407,1271,3.803,1281,4.407,1346,5.186,1659,7.954,1660,6.254,1661,6.254,1662,7.954,1663,6.254,1664,6.254,1665,6.254,1666,6.254,1667,5.61]],["t/236",[47,2.899,84,2.235,126,2.51,129,2.803,250,6.01,419,3.294,582,2.85,1255,5.669,1258,4.898,1264,4.04,1574,5.106,1668,6.01]],["t/239",[6,0.34,18,0.856,47,1.15,74,2.148,91,1.167,102,0.877,115,0.674,126,0.574,189,0.768,228,0.754,251,0.977,281,1.223,288,0.686,295,0.8,344,0.674,345,0.899,385,1.119,389,1.749,396,3.776,408,0.837,416,1.562,419,1.307,467,0.923,492,0.62,532,1.39,582,2.93,584,0.877,586,1.245,597,0.818,643,0.768,669,3.077,675,3.58,691,1.04,694,2.239,695,1.361,700,1.453,741,1.007,746,1.373,772,1.077,778,1.258,805,1.167,806,1.485,822,1.373,829,2.58,866,1.223,888,1.289,923,3.362,924,0.923,952,0.711,961,0.768,995,1.289,1169,1.871,1220,1.485,1250,4.746,1255,4.382,1256,1.119,1257,1.289,1258,1.119,1264,2.125,1278,2.239,1291,2.58,1306,0.837,1459,1.04,1479,0.923,1513,2.58,1574,1.167,1595,3.546,1598,1.289,1654,5.766,1657,1.485,1668,5.586,1669,3.161,1670,5.034,1671,1.656,1672,4.553,1673,1.656,1674,1.485,1675,1.656,1676,1.656,1677,1.656,1678,1.656,1679,1.656,1680,1.656,1681,1.485,1682,1.485,1683,1.656,1684,1.373,1685,2.876,1686,1.656,1687,1.656,1688,1.656,1689,1.656,1690,1.656,1691,1.656,1692,2.876,1693,2.876,1694,2.876,1695,1.656,1696,1.656,1697,1.656,1698,1.373,1699,1.656,1700,1.656,1701,1.656,1702,1.656,1703,1.656,1704,1.656,1705,1.656,1706,1.656,1707,1.656,1708,1.656,1709,2.876,1710,5.154,1711,1.656,1712,1.656,1713,1.656,1714,1.656,1715,2.876,1716,1.656,1717,1.223,1718,3.42,1719,2.876,1720,3.812,1721,4.553,1722,2.876,1723,2.876,1724,4.553,1725,4.553,1726,4.553,1727,7.449,1728,5.652,1729,2.876,1730,2.876,1731,3.812,1732,1.656,1733,5.652,1734,1.656,1735,1.656,1736,1.656,1737,1.656,1738,1.656,1739,1.656,1740,1.656,1741,1.656,1742,1.656,1743,1.656,1744,1.656,1745,1.656,1746,1.656,1747,1.656,1748,1.656,1749,1.485,1750,1.485,1751,1.656,1752,1.656,1753,1.656,1754,1.373]],["t/241",[603,2.56]],["t/243",[6,1.386,12,0.844,73,1.534,230,4.239,235,5.506,289,5.254,451,4.56,586,2.203,671,4.39,672,4.56,743,4.39,756,3.761,987,5.595,1248,5.254,1255,4.39,1459,5.24,1755,6.747]],["t/245",[235,4.987,586,2.678]],["t/247",[12,0.937,73,1.702,228,1.239,235,5.401,586,2.444,1255,4.87,1258,5.058,1756,7.484,1757,7.484]],["t/249",[28,1.906,44,2.227,47,3.162,74,1.844,75,3.772,88,3.096,126,2.406,235,4.223,326,3.979,345,2.765,393,2.6,451,3.441,479,3.096,581,2.632,584,2.697,585,3.821,597,2.515,599,3.198,671,4.519,700,2.572,771,3.509,773,3.965,802,2.697,987,5.76,1324,3.759,1350,4.222,1354,3.313,1667,4.567,1758,5.091,1759,5.091,1760,5.091,1761,5.091,1762,5.091,1763,5.091,1764,5.091,1765,5.091,1766,6.945,1767,5.091]],["t/251",[603,2.56]],["t/253",[6,1.498,44,1.914,74,2.1,98,1.692,102,2.317,152,3.629,173,4.153,180,2.21,228,0.724,229,1.721,246,2.317,285,1.539,340,1.587,350,2.161,385,5.682,393,2.729,486,2.661,546,3.58,568,2.661,585,2.115,589,2.457,592,2.161,599,4.579,643,2.029,771,2.21,801,3.407,802,3.86,926,4.742,1338,3.925,1353,3.083,1621,4.613,1622,3.629,1768,4.375,1769,3.925,1770,4.375,1771,3.925,1772,3.925,1773,3.925,1774,4.375,1775,4.375,1776,4.375,1777,4.375,1778,4.375,1779,4.375,1780,4.375,1781,4.375,1782,3.925,1783,4.375]],["t/255",[6,1.441,12,0.997,17,1.266,25,2.384,29,1.885,44,1.479,53,2.056,55,1.601,56,2.285,58,1.791,73,1.175,74,2.043,76,2.204,77,2.497,84,1.593,98,1.308,135,2.2,140,2.285,160,2.217,198,1.708,212,1.452,219,1.686,222,2.69,228,0.56,229,2.464,233,1.4,242,2.497,244,2.23,274,2.497,283,2.056,285,1.816,322,2.056,326,1.937,340,1.227,356,2.056,366,2.2,372,2.285,417,2.383,422,2.804,463,2.804,493,1.748,498,2.102,532,2.496,533,2.124,586,1.104,600,2.804,609,1.708,610,2.056,611,2.124,612,2.348,616,2.2,619,1.748,620,1.708,621,1.937,622,1.937,660,2.056,702,2.056,741,2.056,742,2.497,755,2.285,756,1.885,772,2.2,831,2.633,908,2.285,912,2.056,913,2.2,914,2.804,915,2.804,916,2.804,934,2.124,1034,3.033,1066,2.124,1784,3.381,1785,5.164,1786,3.381,1787,3.381,1788,3.381,1789,3.381,1790,3.381,1791,3.381,1792,3.381,1793,3.381]],["t/257",[6,0.476,11,2.488,12,0.934,17,1.432,25,1.455,34,0.995,53,1.409,60,1.324,74,2.23,102,1.227,160,0.995,176,1.075,177,3.43,189,1.075,219,0.757,221,1.145,222,1.642,228,0.633,243,1.258,244,1.687,274,2.823,279,1.508,285,0.815,288,0.96,297,1.889,345,1.258,347,2.325,356,1.409,363,3.182,444,2.738,478,0.841,488,3.604,492,0.868,493,2.524,498,1.556,532,1.12,533,1.456,547,2.584,579,1.804,586,1.594,598,2.025,606,1.227,607,1.292,609,1.171,612,2.219,615,1.198,617,1.508,618,1.566,619,1.198,620,1.171,621,1.328,622,1.328,635,1.409,657,1.171,665,2.797,673,1.328,682,1.922,684,1.633,686,2.079,687,1.633,688,3.171,690,1.711,703,1.804,756,1.292,769,1.804,771,1.171,774,1.711,888,1.804,912,1.409,913,1.508,914,1.922,915,1.922,916,1.922,917,1.566,924,1.292,934,2.402,944,1.633,1049,1.804,1063,2.079,1065,2.079,1066,1.456,1069,1.711,1149,1.804,1174,1.456,1182,1.804,1217,2.079,1370,2.977,1479,4.65,1480,2.977,1498,4.048,1506,2.079,1544,2.079,1652,1.804,1717,1.711,1773,2.079,1794,1.922,1795,2.317,1796,4.881,1797,2.317,1798,2.317,1799,2.317,1800,1.922,1801,2.317,1802,2.079,1803,2.317,1804,2.317,1805,2.317,1806,2.317,1807,2.317,1808,2.317,1809,2.317,1810,2.317,1811,2.317,1812,2.317,1813,2.317,1814,3.823,1815,3.823,1816,3.823,1817,3.823,1818,3.823,1819,2.317,1820,2.317]],["t/259",[603,2.56]],["t/261",[6,1.046,12,0.989,28,1.906,47,2.037,73,1.798,74,1.188,129,1.969,212,2.186,228,1.309,246,3.679,393,2.96,445,2.838,492,1.906,569,3.198,580,3.759,582,3.109,583,2.461,585,2.461,589,3.109,591,5.143,592,2.515,594,4.222,596,4.222,695,3.287,771,3.509,952,2.186,958,3.965,961,2.361,1025,4.222,1304,3.759,1346,4.222,1684,4.222,1821,4.567,1822,5.091,1823,5.091,1824,5.091]],["t/263",[12,0.909,25,1.654,55,2.058,60,2.155,74,2.263,180,2.196,219,1.419,222,2.671,228,0.72,240,1.976,244,1.955,312,3.907,498,1.769,532,2.102,609,2.196,610,2.644,611,2.731,612,1.976,614,3.564,615,4.098,619,2.248,620,2.196,621,2.491,622,2.491,627,2.829,648,2.938,917,2.938,936,4.592,1183,3.21,1825,3.606,1826,3.606,1827,5.58,1828,3.606,1829,4.843,1830,3.386,1831,4.843,1832,3.386,1833,3.386,1834,3.386,1835,4.348,1836,3.9,1837,3.9,1838,4.348,1839,4.348,1840,4.348,1841,4.348,1842,6.22,1843,4.348,1844,4.348]],["t/266",[74,2.073,219,2.444,228,1.239,356,4.551,408,3.781,917,5.058,1608,6.714,1609,6.714,1845,7.484]],["t/268",[33,3.274,74,2.073,199,4.172,219,2.444,228,1.239,571,6.714,1604,6.714,1846,7.484,1847,7.484]],["t/270",[33,3.274,74,2.073,77,5.526,118,4.551,219,2.444,228,1.239,713,5.828,1605,6.207,1848,7.484]],["t/273",[12,0.61,74,2.29,222,2.894,228,0.807,244,2.08,498,2.743,532,2.356,586,1.591,609,2.462,610,2.964,612,2.216,614,3.862,615,3.485,619,2.52,620,2.462,685,5.445,704,3.598,1049,3.795,1183,3.598,1264,2.717,1275,3.598,1276,3.598,1568,3.795,1825,4.042,1826,4.042,1829,6.017,1830,3.795,1831,3.795,1832,3.795,1833,3.795,1834,3.795,1849,4.874,1850,4.874,1851,4.874,1852,4.042,1853,4.372,1854,4.372,1855,4.372,1856,4.372]],["t/275",[12,0.521,74,2.193,219,1.359,222,2.588,228,1.286,229,1.637,240,1.892,244,1.907,441,3.922,498,2.453,532,2.012,582,2.371,583,2.012,586,2.537,609,2.103,612,1.892,615,2.152,619,2.152,620,2.103,648,2.813,685,4.994,988,3.242,1025,3.452,1066,2.615,1264,3.36,1681,3.734,1821,3.734,1825,3.452,1826,3.452,1829,5.519,1830,3.242,1831,3.242,1832,3.242,1833,3.242,1834,3.242,1836,3.734,1837,3.734,1852,3.452,1853,3.734,1854,3.734,1855,3.734,1856,3.734,1857,8.245,1858,3.734,1859,4.163,1860,4.163,1861,4.163,1862,4.163,1863,4.163,1864,4.163,1865,4.163,1866,4.163,1867,4.163]],["t/277",[12,1.112,25,2.848,73,1.702,98,2.895,180,3.781,245,5.828,478,2.715,483,3.781,966,4.87]],["t/279",[6,1.538,12,0.937,25,2.848,56,5.058,60,2.593,74,1.746,221,3.697,228,1.239,685,5.274,1852,6.207]],["t/281",[12,0.917,25,2.787,55,3.467,60,2.537,74,1.709,160,3.145,228,1.213,288,3.033,483,3.7,1827,6.57,1828,6.074,1868,5.407]],["t/283",[12,0.926,57,4.817,74,1.727,159,5.466,228,1.226,478,2.685,936,5.466,1616,6.14,1641,6.642,1829,5.765,1830,5.765]],["t/285",[12,0.926,57,4.817,65,4.502,74,1.727,199,4.127,228,1.226,312,4.651,478,2.685,483,3.74,1831,5.765,1832,5.765]],["t/287",[12,0.917,60,2.537,74,1.709,160,3.145,199,4.083,228,1.213,288,3.033,312,4.601,483,3.7,699,5.161,1833,5.703,1834,5.703]],["t/289",[84,2.36,126,2.651,228,1.267,254,3.478,1479,4.265,1869,6.864,1870,6.864,1871,7.651]],["t/291",[12,0.926,50,4.817,228,1.226,442,5.003,443,5.765,478,2.685,700,3.74,936,6.516,1175,4.651,1872,7.403]],["t/294",[12,1.118,14,3.471,74,1.529,180,3.311,219,2.14,228,1.085,444,3.168,478,2.377,598,3.471,626,4.264,631,4.117,673,4.694,684,4.618,865,4.429,1873,6.553,1874,6.553,1875,6.553,1876,6.553,1877,6.553,1878,6.553]],["t/296",[12,0.736,34,3.282,74,2.23,164,2.672,222,4.003,228,0.973,285,2.688,478,2.132,619,3.039,620,2.97,631,3.693,697,3.973,698,3.277,699,4.142,802,3.113,1370,4.577,1879,5.878,1880,5.878,1881,5.878,1882,5.878,1883,5.878,1884,5.878,1885,5.878,1886,5.878]],["t/298",[6,1.139,12,1.033,35,3.011,55,2.624,73,1.261,74,1.926,160,2.381,222,2.381,228,0.918,233,2.296,309,3.608,322,3.372,340,2.011,472,3.907,478,2.011,555,4.318,581,2.867,584,2.937,635,3.372,681,3.907,697,3.747,698,3.091,699,3.907,769,5.728,778,2.425,802,2.937,908,3.747,961,2.571,1828,4.598,1887,5.545,1888,5.545,1889,5.545,1890,5.545,1891,5.545,1892,5.545,1893,4.974,1894,5.545]],["t/300",[603,2.56]],["t/302",[12,0.783,73,1.422,126,2.755,190,4.65,228,1.317,471,3.583,585,3.023,591,5.175,592,3.089,655,4.069,966,4.069,1021,3.688,1163,4.069,1181,4.069,1187,4.069,1633,5.61,1895,5.186,1896,6.596,1897,5.61,1898,4.407,1899,5.186]],["t/305",[6,1.078,12,0.657,27,3.095,44,3.101,64,3.006,71,2.136,73,1.193,84,1.618,105,3.698,160,3.692,180,2.651,190,2.651,239,4.086,315,2.85,320,3.698,338,4.086,363,2.339,371,3.874,441,3.414,488,3.874,534,3.414,603,1.618,605,3.874,650,4.352,655,3.414,694,4.086,778,2.295,831,4.086,966,3.414,1042,3.698,1178,3.698,1187,5.224,1239,3.874,1267,4.352,1271,3.191,1630,4.086,1800,4.352,1896,4.352,1897,4.707,1900,7.089,1901,7.089]],["t/307",[6,0.994,12,0.606,24,3.41,27,2.854,29,2.698,44,2.934,64,2.773,71,1.969,73,1.101,75,2.628,84,1.492,160,2.88,180,2.445,190,3.889,315,2.628,338,3.768,363,2.157,380,3.768,426,4.726,534,5.008,582,1.903,603,2.068,606,2.563,636,4.013,650,4.013,655,5.008,660,2.943,778,2.117,934,3.04,966,3.149,1021,2.854,1042,3.41,1178,3.41,1181,3.149,1187,3.149,1271,2.943,1306,2.445,1354,3.149,1615,4.341,1630,5.223,1898,4.726,1899,4.013,1902,4.013,1903,4.839,1904,4.341,1905,4.013,1906,4.839,1907,4.013]],["t/309",[6,1.274,44,2.711,228,1.026,297,3.061,387,4.826,445,3.455,582,3.11,583,2.996,687,4.367,931,4.188,961,2.874,1021,3.655,1152,5.345,1163,4.032,1329,5.14,1898,6.137,1899,5.14,1902,5.14,1907,6.558,1908,6.197,1909,5.559,1910,6.197,1911,6.197,1912,6.197]],["t/311",[6,1.579,44,2.593,84,1.828,105,4.178,136,4.377,160,3.662,188,4.178,297,3.797,534,5.001,603,1.828,655,3.858,743,3.858,778,2.593,1032,4.917,1042,5.416,1178,5.416,1187,5.001,1259,4.377,1354,3.858,1630,4.617,1896,4.917,1898,4.178,1904,5.319,1905,4.917,1913,5.929,1914,5.929]],["t/313",[12,0.848,26,2.666,53,2.985,56,3.318,68,2.895,71,1.998,73,1.116,99,2.985,117,3.084,135,3.194,160,2.108,168,3.459,190,3.422,249,2.985,297,2.425,323,2.538,363,2.188,371,3.624,445,2.736,469,3.823,577,3.084,582,2.664,655,4.407,674,6.077,687,3.459,695,2.323,713,3.823,741,2.985,750,4.071,759,4.071,783,5.001,845,4.071,961,2.276,966,3.194,1159,3.459,1163,3.194,1178,4.773,1187,4.407,1329,4.071,1895,4.071,1898,5.465,1907,4.071,1915,4.909,1916,4.909,1917,4.071,1918,4.909,1919,4.909,1920,4.404]],["t/315",[603,2.56]],["t/317",[6,0.404,12,0.417,14,1.041,17,0.736,63,0.95,73,0.447,74,2.41,142,3.104,164,0.893,198,0.993,212,1.861,219,1.087,222,0.844,228,0.551,229,1.31,244,0.529,283,1.195,285,0.691,326,1.908,344,0.8,345,1.067,363,2.767,398,1.53,478,0.713,492,0.736,532,0.95,533,3.589,574,1.384,586,1.087,607,1.095,615,1.016,688,1.629,690,4.218,693,1.384,695,1.576,698,1.095,780,3.45,805,1.384,866,1.451,878,2.988,923,3.769,957,2.347,961,0.911,1041,1.763,1066,1.234,1116,1.763,1241,3.055,1246,5.486,1250,2.347,1251,1.629,1264,3.185,1326,3.595,1345,2.762,1479,1.095,1499,2.988,1718,1.763,1794,1.629,1800,1.629,1921,1.965,1922,3.33,1923,1.965,1924,1.629,1925,7.25,1926,1.965,1927,5.713,1928,1.965,1929,5.105,1930,1.965,1931,3.33,1932,1.965,1933,1.965,1934,1.965,1935,3.33,1936,4.335,1937,1.965,1938,1.965,1939,1.965,1940,1.965,1941,1.965,1942,1.965,1943,3.33,1944,1.965,1945,1.965,1946,1.965,1947,1.965,1948,1.965,1949,1.965,1950,1.965,1951,1.965,1952,3.33,1953,1.965,1954,1.965,1955,3.33,1956,3.33,1957,1.965,1958,1.965,1959,1.965,1960,4.335,1961,1.965,1962,1.965,1963,1.763,1964,1.965,1965,3.33,1966,3.33,1967,1.965,1968,3.33,1969,1.965,1970,1.965,1971,1.965,1972,1.965]],["t/319",[603,2.56]],["t/321",[6,1.505,42,4.083,73,1.666,117,4.601,233,3.033,246,3.879,251,4.319,263,4.95,1003,5.703,1325,6.074,1588,6.074,1973,7.324]],["t/323",[6,1.676,7,3.931,12,0.677,16,4.215,68,3.192,78,3.292,82,4.548,117,3.401,129,2.094,213,3.997,244,1.457,285,1.904,582,3.57,586,1.767,740,3.018,949,3.192,961,2.51,1290,4.489,1542,4.856,1669,4.489,1670,4.489,1924,4.489,1963,4.856,1974,5.413,1975,5.413,1976,4.856,1977,6.494,1978,6.494,1979,6.494,1980,4.856,1981,6.494,1982,5.413,1983,5.413]],["t/325",[6,1.525,7,3.472,12,0.566,44,2.797,68,2.666,71,1.839,73,1.028,81,2.941,102,2.394,129,1.748,212,3.186,213,3.337,557,3.185,582,3.763,586,1.476,640,2.748,778,1.977,961,2.096,1169,2.941,1259,3.337,1270,5.736,1272,3.185,1273,3.185,1274,4.979,1275,3.337,1276,3.337,1568,3.52,1669,3.748,1670,3.748,1924,3.748,1976,4.055,1977,5.736,1978,7.636,1979,4.055,1980,5.736,1984,4.52,1985,4.52,1986,4.52,1987,4.52,1988,4.52,1989,4.52,1990,4.52,1991,4.52,1992,4.52,1993,4.52,1994,4.52,1995,4.52]],["t/327",[6,1.489,7,3.935,68,4.274,188,6.14,190,4.402,383,4.898,586,2.366,746,6.01,845,6.01,1754,6.01,1898,5.106]],["t/329",[5,3.13,6,0.871,22,2.303,47,1.696,68,2.501,71,1.726,82,2.664,102,2.246,115,1.726,127,2.988,129,1.64,146,2.246,150,2.988,199,2.364,202,2.664,234,2.866,263,4.129,280,2.759,294,2.759,323,2.192,344,1.726,347,2.578,356,2.578,469,5.576,498,1.726,582,2.816,605,3.13,643,1.966,678,3.302,683,3.302,722,3.804,778,1.855,959,2.866,1021,3.603,1152,2.866,1159,2.988,1163,2.759,1169,5.629,1178,4.305,1250,2.988,1252,3.302,1306,2.142,1339,3.516,1354,2.759,1656,5.48,1684,3.516,1868,3.13,1902,7.174,1905,3.516,1909,5.48,1917,3.516,1981,3.804,1996,6.109,1997,6.109,1998,4.24,1999,4.24,2000,4.24,2001,4.24,2002,4.24]],["t/331",[68,2.895,74,1.951,117,3.084,126,1.7,138,3.671,160,2.108,198,2.48,222,2.108,228,0.813,235,2.985,244,1.321,396,4.071,419,2.231,498,3.156,585,2.373,586,1.603,592,2.425,612,2.231,635,2.985,703,3.823,755,3.318,756,2.736,771,2.48,778,2.147,780,3.318,1066,3.084,1324,3.624,1652,3.823,1717,3.624,2003,4.404,2004,4.404,2005,4.404,2006,4.909,2007,4.404,2008,4.909,2009,4.909,2010,4.909,2011,4.909,2012,4.071,2013,4.909,2014,4.909,2015,4.909,2016,4.909,2017,4.909,2018,4.909,2019,5.618,2020,6.077,2021,4.404,2022,4.909]],["t/333",[603,2.56]],["t/335",[74,1.59,126,2.36,228,1.128,246,3.609,393,2.551,444,3.294,464,5.651,546,3.904,589,2.68,597,3.366,801,5.306,1174,5.273,1621,5.031,2023,6.814,2024,6.814,2025,6.814,2026,6.814,2027,6.814]],["t/337",[6,1.07,28,1.95,74,1.646,126,3.103,138,3.785,173,2.572,228,1.168,246,4.744,349,2.322,444,4.643,546,4.582,589,3.523,1174,5.024,1264,2.903,2028,5.207,2029,5.207,2030,7.053,2031,7.053,2032,5.207,2033,5.207,2034,5.207]],["t/339",[6,0.994,12,0.606,26,2.628,28,1.812,44,2.934,73,1.101,151,2.391,158,3.768,173,4.461,204,2.04,228,0.801,246,3.552,284,2.339,295,2.339,297,2.391,315,2.628,340,1.755,445,2.698,471,2.773,486,2.943,492,1.812,546,3.843,597,2.391,603,1.492,740,3.739,801,5.223,802,3.552,926,5.008,952,2.078,1071,4.013,1174,3.04,1175,3.04,1353,3.41,1621,3.573,1622,4.013,1769,6.906,1771,4.341,1772,4.341,2035,4.839,2036,4.839,2037,4.839,2038,4.839,2039,4.839,2040,4.839,2041,4.839]],["t/341",[6,1.386,12,0.844,73,1.534,126,2.337,129,2.61,138,3.193,195,4.779,204,2.845,228,1.117,315,3.664,317,3.488,546,3.866,585,3.261,592,3.333,1163,4.39,2042,6.496,2043,6.747,2044,4.754]],["t/343",[12,0.776,33,3.459,63,2.996,73,1.409,81,4.032,98,2.397,272,4.367,285,2.18,295,2.996,297,3.061,335,4.188,357,4.188,393,2.32,471,3.551,589,2.437,768,4.575,1601,5.14,1682,5.559,2045,7.908,2046,6.197,2047,6.197,2048,6.197,2049,6.197,2050,7.094,2051,6.197,2052,6.197]],["t/345",[6,1.386,127,5.878,297,3.333,393,3.123,585,3.261,589,3.281,592,3.333,700,3.408,771,4.214,802,3.573,1306,3.408,1479,3.761,2053,6.747,2054,6.747,2055,6.747,2056,6.747]],["t/347",[12,0.694,73,1.261,98,2.145,126,1.921,138,2.624,173,4.078,200,3.608,228,0.918,240,2.521,243,3.011,263,3.747,297,2.739,317,2.867,393,2.076,471,3.177,562,3.608,592,2.739,599,3.483,1337,4.094,2050,4.974,2057,5.545,2058,5.545,2059,7.887,2060,5.545,2061,5.545,2062,7.356,2063,4.974,2064,7.356,2065,4.974,2066,7.356,2067,4.974,2068,5.545,2069,5.545,2070,4.974]],["t/349",[173,3.089,228,1.035,229,2.46,392,4.407,393,2.342,416,3.396,546,3.583,588,5.186,589,2.46,597,3.929,603,1.929,695,2.96,701,4.617,823,5.186,952,2.685,1868,4.617,2071,8.746,2072,4.069,2073,6.254,2074,6.254,2075,6.254,2076,7.954,2077,6.254,2078,5.61]],["t/351",[158,6.496,228,1.117,229,2.654,393,2.526,416,3.664,419,3.067,589,2.654,952,2.897,1698,5.595,1868,4.981,2044,4.754,2072,4.39,2079,8.341,2080,6.747,2081,6.747,2082,6.747,2083,6.747,2084,6.747]],["t/353",[33,2.465,60,1.952,75,3.061,161,3.809,173,2.784,193,3.971,219,1.84,228,0.933,229,2.217,315,3.061,392,3.971,416,3.061,589,2.217,597,4.111,633,4.674,756,3.142,952,2.42,1543,4.389,1868,4.161,2044,3.971,2065,6.671,2067,5.056,2072,3.667,2085,5.636,2086,5.636,2087,5.636,2088,8.321,2089,8.321,2090,5.636,2091,5.636,2092,5.636,2093,5.056,2094,4.674]],["t/355",[44,2.711,71,2.522,78,3.768,84,1.911,102,3.282,129,3.059,228,1.026,388,3.551,416,3.365,452,3.893,766,5.14,824,5.559,952,2.661,1858,5.559,1917,5.14,2070,7.813,2072,4.032,2095,6.197,2096,6.197,2097,6.197,2098,6.197,2099,6.197,2100,6.197,2101,6.197,2102,6.197,2103,6.197]],["t/357",[129,2.535,228,1.085,393,2.454,416,3.559,419,2.979,546,3.755,588,5.435,589,2.577,771,3.311,952,2.814,1698,5.435,2072,4.264,2104,5.103,2105,6.553,2106,6.553,2107,6.553,2108,8.017,2109,6.553,2110,6.553,2111,6.553,2112,5.879]],["t/359",[228,1.2,546,4.152,1634,6.785,2108,8.382,2112,6.501,2113,7.246,2114,7.246,2115,7.246,2116,7.246,2117,7.246]],["t/361",[228,1.281,2118,7.738,2119,7.738,2120,7.738,2121,7.738,2122,6.942,2123,7.738]],["t/363",[228,1.2,315,3.935,2044,5.106,2059,8.382,2093,6.501,2094,6.01,2124,7.246,2125,7.246,2126,7.246,2127,7.246,2128,7.246]],["t/365",[228,1.151,315,3.776,597,4.533,2044,4.899,2078,8.232,2129,6.952,2130,9.176,2131,6.952,2132,6.952,2133,6.952,2134,6.952]],["t/367",[228,1.311,1252,6.165,2135,7.917,2136,7.917,2137,7.917]],["t/370",[228,1.311,315,4.299,2044,5.579,2094,6.566,2138,7.917]],["t/372",[157,7.102,228,1.311,584,4.193,2139,7.917,2140,7.917]],["t/374",[12,0.589,47,3.034,58,2.493,64,2.697,73,1.07,126,2.627,164,2.99,188,3.316,212,2.021,219,1.537,228,0.779,229,1.851,287,5.786,344,2.677,350,2.325,408,2.378,419,2.139,444,2.275,467,2.624,473,3.316,483,2.378,492,1.762,574,3.316,581,2.433,584,2.493,585,2.275,586,1.537,592,2.325,597,2.325,601,3.903,606,2.493,657,2.378,673,2.697,702,2.862,802,2.493,865,3.181,952,2.021,954,3.316,956,2.862,975,2.776,1255,3.062,1258,3.181,1265,3.665,1296,3.903,1598,5.123,1624,5.901,1802,4.222,2104,5.123,2141,4.706,2142,4.706,2143,4.706,2144,4.706]],["t/376",[603,2.56]],["t/378",[12,0.647,47,2.067,63,2.498,73,1.175,74,1.637,75,2.807,88,3.143,115,2.103,134,2.961,138,2.446,173,4.221,213,3.816,224,4.636,229,2.033,263,3.493,329,4.024,344,2.103,387,4.024,444,2.498,466,3.816,473,3.642,484,4.636,492,1.935,589,2.033,640,3.143,743,3.363,781,4.636,793,4.286,802,2.737,926,3.363,952,2.219,1152,4.742,1163,4.565,1175,3.247,1549,4.286,1590,4.636,1648,4.024,2042,4.024,2145,6.295,2146,5.168,2147,5.168,2148,5.168,2149,5.168,2150,5.168]],["t/380",[12,0.82,47,2.621,73,1.49,74,1.529,173,3.237,228,1.085,344,2.667,349,2.922,389,3.985,448,4.618,926,4.264,952,2.814,1144,5.879,1152,4.429,1648,5.103,2042,6.379,2151,6.553,2152,5.879,2153,5.879,2154,6.553,2155,6.553,2156,5.879]],["t/382",[6,0.85,28,1.549,68,2.44,74,2.002,105,2.916,138,2.841,142,4.294,160,1.777,173,2.044,212,1.777,219,1.351,221,2.044,222,1.777,228,0.685,235,3.649,344,1.684,345,2.247,444,3.414,498,2.874,586,1.96,606,2.191,612,1.881,700,2.09,778,1.81,873,3.712,912,3.649,923,4.431,1066,2.599,1152,2.796,1543,3.222,1648,3.222,2005,3.712,2012,3.431,2019,4.977,2020,5.384,2021,3.712,2042,5.5,2153,3.712,2157,4.137,2158,4.137,2159,4.137,2160,4.137,2161,4.137,2162,4.137,2163,4.137,2164,4.137,2165,4.137,2166,4.137,2167,4.137,2168,4.137,2169,4.137,2170,4.137,2171,4.137,2172,4.137,2173,4.137,2174,4.137,2175,4.137,2176,4.137,2177,4.137,2178,4.137,2179,4.137,2180,4.137,2181,4.137,2182,4.137]],["t/384",[12,0.558,22,2.423,47,1.785,73,1.015,74,1.871,75,2.423,78,2.713,115,1.815,129,1.726,173,3.129,195,2.556,228,1.049,229,1.755,283,3.852,345,2.423,384,2.902,385,3.015,389,2.713,416,2.423,420,2.307,423,2.631,444,3.062,448,3.143,492,1.67,558,3.7,632,4.002,675,2.631,693,3.143,700,2.254,756,2.487,911,3.294,926,4.793,952,1.915,1037,3.474,1112,3.015,1264,2.487,1302,4.002,1337,4.677,1354,2.902,1483,4.002,1543,3.474,1668,3.7,1674,4.002,1750,4.002,1754,3.7,2145,4.002,2152,4.002,2156,7.598,2183,4.461,2184,4.461,2185,6.335,2186,6.335,2187,4.461,2188,4.461,2189,4.461,2190,4.461]],["t/386",[603,2.56]],["t/388",[6,1.446,12,0.515,44,1.799,64,2.356,73,0.935,129,1.591,164,1.87,204,2.519,228,0.989,229,2.35,344,1.674,350,4.054,393,1.54,442,2.779,452,2.584,471,2.356,483,3.903,568,4.697,569,3.754,576,2.676,589,2.35,740,2.293,938,2.676,952,4.077,1004,3.411,1174,4.422,1181,3.888,1306,2.078,1490,3.689,1782,3.689,2072,2.676,2104,3.203,2191,5.975,2192,4.113,2193,4.113,2194,5.975,2195,4.113,2196,4.113,2197,4.113,2198,4.113,2199,3.689,2200,4.113,2201,4.113,2202,4.113,2203,3.689,2204,4.113,2205,4.113,2206,4.113,2207,4.113,2208,4.113,2209,4.113,2210,4.113,2211,4.113]],["t/390",[6,1.676,12,0.677,17,2.027,44,2.368,98,2.094,126,2.508,129,2.094,180,3.657,221,2.674,297,2.674,340,1.964,350,2.674,420,2.799,444,3.943,483,4.718,568,3.292,589,2.129,952,3.502,962,3.997,1174,3.401,1353,3.814,1492,4.489,1588,4.489,1920,4.856,2072,4.71,2212,5.413,2213,5.413,2214,5.413,2215,5.413,2216,5.413,2217,5.413]],["t/392",[228,1.358,2218,8.201]],["t/394",[60,1.86,71,2.186,74,2.112,82,3.374,129,2.078,142,4.379,156,3.785,160,3.092,199,2.994,221,3.557,228,0.889,268,3.557,371,3.965,441,3.494,444,2.596,478,1.948,483,3.638,581,2.777,584,2.845,603,2.505,671,3.494,702,3.266,737,4.454,767,4.182,768,3.965,1306,2.713,1324,3.965,1353,3.785,1655,4.818,2219,5.371,2220,7.201,2221,5.371,2222,5.371,2223,5.371]],["t/396",[603,2.56]],["t/398",[64,3.149,74,2.044,101,2.481,126,2.951,138,2.601,173,2.715,228,1.483,246,1.945,347,5.327,393,1.375,461,2.481,540,2.859,547,2.481,589,1.444,598,1.945,599,2.307,612,3.982,614,3.774,657,3.328,912,2.233,1182,6.634,1277,2.711,1356,2.859,1436,4.93,1574,2.587,1601,4.558,1616,4.558,1717,2.711,1870,3.294,2224,3.671,2225,5.496,2226,5.496,2227,3.671,2228,3.671,2229,3.671,2230,3.671,2231,3.671,2232,3.671,2233,6.587,2234,3.671,2235,3.671,2236,3.671,2237,3.671,2238,3.671,2239,3.671,2240,3.671,2241,3.671,2242,3.671,2243,3.671,2244,3.671]],["t/400",[74,1.933,126,2.99,221,2.082,228,1.429,246,2.232,347,5.038,350,2.082,393,3.102,529,3.495,569,2.647,585,4.173,589,3.259,592,4.265,612,3.766,643,3.842,657,2.129,2019,3.495,2104,3.281,2199,3.78,2203,3.78,2245,4.214,2246,8.632,2247,4.214,2248,4.214,2249,4.214,2250,4.214,2251,4.214,2252,4.214,2253,4.214,2254,4.214,2255,4.214,2256,4.214]],["t/402",[603,2.56]],["t/404",[200,4.39,228,1.381,445,3.761,493,3.488,606,3.573,612,3.067,657,4.214,755,4.56,966,4.39,2257,6.747,2258,7.483,2259,8.341,2260,6.747,2261,6.747,2262,6.747,2263,6.747]],["t/406",[200,4.817,228,1.226,445,4.127,606,3.921,657,4.764,2258,6.642,2264,7.403,2265,7.403,2266,7.403]],["t/408",[603,2.56]],["t/410",[603,2.56]],["t/412",[6,1.435,12,0.993,33,2.244,34,2.202,58,2.717,63,2.48,71,2.088,76,2.455,94,3.467,95,3.787,96,2.652,131,2.652,135,3.337,151,2.534,168,3.614,176,2.379,184,2.717,193,3.614,229,2.746,236,3.994,244,1.381,246,2.717,261,3.025,265,3.222,268,2.534,285,1.804,295,2.48,454,3.614,471,2.939,478,1.861,586,1.675,589,2.017,603,1.582,648,3.467,658,3.994,659,4.254,740,2.859,749,4.254,938,4.542,949,3.025,986,2.652,1001,3.787,1002,4.254,1029,3.467,1336,3.787,2267,5.129]],["t/414",[1,3.961,6,0.911,10,2.539,12,1.155,33,1.939,34,1.903,43,3.451,45,4.91,73,1.008,76,2.971,96,2.292,98,1.714,118,2.695,126,1.535,142,4.463,153,3.451,164,2.866,176,2.924,178,3.515,184,2.347,233,1.836,240,2.866,243,2.407,244,1.697,260,2.614,261,2.614,268,2.189,419,2.015,478,2.287,577,2.784,631,2.784,648,4.262,675,2.614,986,2.292,1001,3.272,1008,3.976,1009,4.91,1010,5.657,1011,3.976,1012,3.976,1015,3.451,1016,2.884,1017,4.262,1018,3.272,1019,3.272,2268,4.432,2269,4.432,2270,3.976]],["t/416",[96,3.669,129,2.745,178,3.956,233,2.939,243,3.854,285,2.496,322,4.315,363,3.164,454,5.001,478,2.574,565,5.001,1016,4.617,1020,7.718,2271,7.096]],["t/419",[1,3.838,12,1.142,15,2.664,17,1.588,22,2.303,58,2.246,73,1.389,84,1.308,96,2.192,98,1.64,118,3.715,126,1.469,129,1.64,153,3.302,176,3.321,178,3.405,184,2.246,204,1.788,210,3.302,233,2.966,240,2.777,243,3.318,244,1.927,260,2.501,261,2.501,265,2.664,268,2.095,281,3.13,284,2.05,288,1.756,332,2.578,478,1.538,577,2.664,586,1.384,598,3.235,667,2.501,676,2.988,697,4.84,698,2.364,701,3.13,791,3.302,934,2.664,949,2.501,965,2.364,1009,3.302,1015,3.302,1016,2.759,1017,4.129,1018,3.13,1019,3.13,1021,2.501,1022,3.516,1027,3.804,1028,3.804,1029,2.866,2270,3.804,2272,4.24]],["t/421",[44,2.736,212,2.685,228,1.448,246,3.312,393,2.978,416,3.396,569,3.929,582,3.128,583,3.023,586,2.042,589,3.128,591,4.069,592,3.089,594,5.186,596,5.186,771,3.159,924,3.486,952,2.685,961,2.9,1272,4.407,1273,4.407,2273,6.254,2274,6.254]],["t/423",[1,1.978,6,0.647,10,1.804,12,0.915,17,1.179,18,1.628,33,1.377,34,1.352,53,1.914,60,1.693,71,1.281,73,0.716,74,1.706,76,2.107,98,1.218,119,1.914,129,2.612,138,1.49,159,2.324,173,2.415,198,1.59,199,1.755,204,1.327,219,2.387,228,0.521,229,1.238,239,2.452,244,2.358,246,1.667,254,1.431,255,2.611,258,2.324,265,1.978,267,2.452,268,2.415,283,1.914,285,1.107,344,1.989,349,2.179,380,2.452,385,2.128,444,1.522,492,1.179,597,1.555,604,3.303,665,1.804,667,1.857,669,2.128,681,4.222,691,1.978,698,2.725,700,1.59,740,1.755,778,1.377,839,6.162,888,2.452,924,1.755,949,1.857,952,1.352,953,2.611,1017,2.128,1026,6.064,1029,2.128,1134,2.824,1136,4.385,1137,2.824,1138,4.385,1139,4.385,1140,4.385,1141,4.969,1149,2.452,1459,1.978,1479,1.755,1603,2.824,1621,2.324,1749,2.824,1869,4.385,2072,2.048,2122,2.824,2275,3.148,2276,4.888,2277,3.148]],["t/425",[6,1.458,26,3.854,27,4.185,228,1.175,340,2.574,419,3.226,582,2.791,583,3.43,771,3.585,986,3.669,1066,4.458,1353,5.001,1794,5.885,2278,7.096,2279,7.096]],["t/427",[6,1.039,27,2.98,58,2.677,84,1.558,89,4.191,126,1.751,146,2.677,230,3.175,340,1.833,349,2.253,379,3.935,389,3.073,440,2.744,492,1.892,534,3.288,585,2.443,592,2.497,604,3.415,640,3.073,644,3.935,645,3.935,669,3.415,673,2.896,743,3.288,778,2.211,944,3.561,956,4.788,975,2.98,986,2.613,991,5.731,1014,3.561,1236,3.731,1237,4.534,1238,4.534,1239,3.731,1240,4.191,1241,4.869,1242,4.534,1243,4.534,1244,4.534,1245,4.534,1246,4.191,1247,4.534,1248,3.935,1249,4.534,1250,3.561,1251,4.191,1252,3.935,1253,4.534,1254,4.191]],["t/429",[12,0.597,47,3.305,74,1.113,88,2.902,115,1.942,202,2.998,212,2.049,228,0.79,251,2.814,393,1.787,419,2.169,423,2.814,467,2.66,478,1.731,492,3.252,570,3.363,581,2.467,582,1.877,584,3.518,586,2.495,589,1.877,597,2.357,640,2.902,695,2.259,700,2.411,911,3.523,952,2.049,957,3.363,975,2.814,1021,2.814,1175,2.998,1181,3.105,1236,3.523,1255,5.65,1256,4.489,1257,3.716,1258,5.164,1259,3.523,1261,3.957,1262,3.957,1263,3.957,1264,2.66,1265,5.172,1266,3.716]],["t/431",[6,1.489,228,1.2,582,3.427,586,2.366,1284,6.501,1286,6.501,1287,6.501,1288,6.501,1290,6.01,2280,7.246,2281,7.246,2282,7.246]],["t/433",[6,0.79,10,2.81,12,0.481,14,2.036,28,0.874,33,2.145,74,2.293,76,2.212,129,0.902,146,2.036,164,2.229,204,0.984,219,1.601,220,2.093,222,1.002,228,0.637,229,0.918,233,0.966,235,2.982,237,3.621,279,1.518,288,1.592,295,1.128,335,4.252,347,2.982,350,3.108,467,1.301,483,4.223,498,2.56,534,1.518,547,1.577,548,1.722,567,1.817,574,2.709,585,1.128,592,1.152,598,1.236,599,1.466,612,1.748,621,1.337,622,1.337,657,1.179,665,1.337,675,1.376,677,3.449,699,2.709,703,1.817,756,1.301,774,1.722,839,1.722,884,2.093,910,3.189,912,1.419,952,1.002,963,2.093,993,2.093,1037,1.817,1111,4.399,1239,1.722,1306,1.942,1336,1.722,1559,2.093,1652,1.817,1717,4.644,1893,2.093,1895,1.935,2003,2.093,2004,2.093,2007,2.093,2012,3.189,2063,2.093,2283,2.333,2284,2.333,2285,2.333,2286,2.333,2287,2.333,2288,2.333,2289,2.333,2290,2.333,2291,2.333,2292,2.333,2293,4.904,2294,3.845,2295,2.333,2296,2.333,2297,2.333,2298,2.333,2299,2.333,2300,2.333,2301,2.333,2302,2.333,2303,2.333,2304,2.333,2305,6.769,2306,2.333,2307,2.333,2308,2.333,2309,2.333,2310,2.333,2311,2.333,2312,2.333,2313,2.333,2314,2.333,2315,2.333,2316,2.333,2317,3.845,2318,2.333,2319,2.333,2320,2.333,2321,2.333,2322,2.333]],["t/435",[6,1.009,10,2.813,12,0.971,25,1.868,33,2.963,48,3.823,65,2.985,71,2.757,73,1.116,76,1.726,84,1.514,99,2.985,115,1.998,129,1.899,131,2.538,135,3.194,180,2.48,233,2.033,295,2.373,326,2.813,354,3.823,383,5.242,408,2.48,423,3.995,437,3.679,438,5.242,440,2.666,454,3.459,467,3.776,494,3.624,581,2.538,603,1.514,630,4.071,635,2.985,643,2.276,737,5.618,742,3.624,745,3.823,754,4.404,771,2.48,779,4.404,924,2.736,946,3.823,1162,4.404,2323,4.909,2324,4.909]],["t/437",[603,2.56]],["t/439",[10,2.66,12,1.115,14,2.459,17,2.819,18,2.4,25,1.767,60,2.257,73,1.712,75,2.521,76,1.633,84,2.009,91,3.271,98,2.52,115,1.889,140,3.138,150,3.271,176,2.153,188,3.271,189,2.153,190,2.345,203,3.615,232,3.615,241,3.138,258,3.428,277,3.138,287,3.271,297,2.293,320,3.271,324,3.85,331,4.811,334,2.588,340,1.684,344,1.889,347,2.823,350,2.293,373,2.917,388,3.733,485,3.85,568,2.823,603,1.432,643,2.153,849,3.615,929,4.165,930,3.428,931,3.138,938,3.021,972,4.165,1277,3.428,1354,3.021,2325,4.642,2326,4.642,2327,4.642]],["t/441",[603,2.56]]],"invertedIndex":[["",{"_index":74,"t":{"3":{"position":[[1020,1]]},"7":{"position":[[379,1]]},"9":{"position":[[559,1],[614,1],[746,1],[998,5]]},"11":{"position":[[316,1],[611,1]]},"15":{"position":[[546,1]]},"17":{"position":[[455,1],[1143,1],[1159,1]]},"19":{"position":[[2159,1]]},"23":{"position":[[241,1],[611,1],[613,2],[683,1],[750,1],[814,1],[890,1],[966,1],[1047,1],[1130,1],[1342,1],[1507,1],[1582,1],[1711,1],[1743,1],[1859,1],[1933,1]]},"27":{"position":[[1327,1],[1345,1],[1437,1],[1482,1],[1542,2],[1563,1],[1661,1],[1679,1]]},"42":{"position":[[261,1],[422,1],[561,1],[622,1],[655,1],[670,1],[858,1]]},"48":{"position":[[1780,1],[2263,1],[2294,1],[2439,1],[2545,1],[2579,1],[2708,2],[2733,1],[2735,1],[2737,3],[2853,1],[2894,1],[2918,1],[3119,1],[3662,1],[3780,1],[4221,1],[4341,1],[4343,2],[4380,1],[4400,1],[4424,1],[4459,1],[4502,2],[4529,1],[4793,1],[5039,2],[5065,1],[5162,1],[5506,1],[5566,1],[5647,1],[6043,1],[6265,1],[6571,1],[6573,2],[6610,1],[6630,1],[6654,1],[6689,1],[6732,2],[6759,1],[7023,2],[7118,1],[7276,1],[7421,1],[7527,1],[7561,1],[7690,2],[7715,1],[7717,1],[7735,1],[7811,1],[7917,1],[7931,2],[7956,2],[7973,1],[8000,1],[8093,1],[8095,1],[8114,1],[8197,1],[8226,1],[8257,1],[8316,2],[8371,2],[8397,1],[8494,1],[8539,1]]},"52":{"position":[[72,3],[141,3],[145,1],[159,1],[211,1],[237,1],[257,1],[296,1],[368,1],[442,1],[468,1],[527,2]]},"75":{"position":[[492,1]]},"77":{"position":[[165,1]]},"81":{"position":[[61,1],[257,1],[347,1],[419,1],[504,1],[583,1],[651,1]]},"83":{"position":[[260,1],[517,1],[759,1],[957,1],[1079,1],[1163,1],[1307,1]]},"85":{"position":[[617,1],[1166,1],[1577,1],[1616,1],[1719,1],[1793,1],[1819,1],[2116,1],[2149,1],[2189,1],[2220,1],[2252,1],[2286,1],[2350,1],[2378,1],[2860,1]]},"87":{"position":[[1375,1],[1565,1],[2405,1],[2480,1],[2526,2],[2595,1],[2839,2]]},"93":{"position":[[636,1],[654,1],[802,1],[861,2],[882,1],[942,1],[961,1],[963,1],[1147,1],[1156,1]]},"95":{"position":[[391,1],[409,1],[507,1],[567,2],[594,1],[619,1],[732,1]]},"97":{"position":[[644,1],[662,1],[763,1],[823,2],[844,1],[919,1],[929,1],[955,1]]},"101":{"position":[[383,1],[524,1],[570,1],[597,1],[719,1],[874,1],[892,1],[1039,1],[1098,2],[1119,1],[1197,1],[1231,1],[1255,1],[1327,1],[1495,1],[1532,1],[1541,2],[1554,1],[1624,1]]},"125":{"position":[[239,1],[296,1],[392,2]]},"132":{"position":[[181,1],[199,1],[291,1],[336,1],[395,2],[416,1],[514,1],[532,1]]},"134":{"position":[[181,1],[199,1],[320,1],[365,1],[424,2],[445,1],[543,1],[568,1],[626,1]]},"146":{"position":[[145,1]]},"150":{"position":[[299,1],[360,1],[2684,1],[2730,1],[2808,1],[2872,1],[2931,1],[2933,3],[3163,1],[3371,1]]},"152":{"position":[[155,1],[357,1],[528,1],[530,3],[697,1],[824,2],[906,1]]},"154":{"position":[[452,1],[509,1],[573,1],[682,2],[868,1],[919,1]]},"176":{"position":[[30,1],[105,1]]},"200":{"position":[[36,1]]},"204":{"position":[[448,1]]},"211":{"position":[[0,2],[62,2],[129,2],[218,3],[274,2],[321,2],[380,2]]},"239":{"position":[[507,1],[781,1],[828,1],[1459,1],[1468,1],[1542,1],[1544,1],[1746,1],[1757,1],[1807,1],[1975,1],[1977,2],[2017,1],[2080,1],[2082,1],[2284,1],[2295,1],[2345,1],[2513,1],[2531,1],[2618,1],[2707,1],[2777,1],[2845,1],[2873,1],[2885,1],[2901,1],[2941,1],[2943,1],[3013,1]]},"249":{"position":[[37,1],[233,1],[277,1]]},"253":{"position":[[359,1],[446,1],[519,1],[591,1],[677,1],[786,1],[881,1]]},"255":{"position":[[299,3],[372,3],[387,1],[459,1],[549,3],[640,3],[651,1],[704,2],[725,1]]},"257":{"position":[[294,1],[296,2],[299,1],[380,1],[444,1],[498,1],[549,1],[608,1],[672,1],[692,1],[735,1],[746,1],[803,1],[819,1],[884,1],[891,1],[926,1],[994,1],[1027,1],[1177,1],[1215,1],[1245,1],[1279,1],[1377,2],[1614,1],[1673,2]]},"261":{"position":[[104,2]]},"263":{"position":[[117,1],[169,1],[214,1],[248,1],[294,1],[345,1],[386,1],[438,1],[568,2],[589,1],[639,1],[699,1]]},"266":{"position":[[6,1],[74,1]]},"268":{"position":[[6,1],[56,1]]},"270":{"position":[[6,1],[77,1]]},"273":{"position":[[85,1],[181,1],[200,1],[252,1],[297,1],[343,1],[389,1],[430,1],[482,1],[525,1],[680,2]]},"275":{"position":[[168,1],[278,1],[317,1],[369,1],[414,1],[460,1],[506,1],[547,1],[599,1],[805,3]]},"279":{"position":[[88,1]]},"281":{"position":[[134,1]]},"283":{"position":[[84,1]]},"285":{"position":[[78,1]]},"287":{"position":[[93,1]]},"294":{"position":[[139,1]]},"296":{"position":[[72,1],[106,1],[169,1],[236,1],[311,1],[399,1]]},"298":{"position":[[69,1],[108,1],[220,1]]},"317":{"position":[[542,2],[577,1],[604,1],[632,1],[676,1],[691,1],[704,1],[737,1],[765,1],[804,1],[806,2],[809,2],[812,1],[863,2],[883,1],[893,2],[896,1],[909,1],[999,3],[1021,2],[1059,2],[1072,2],[1104,2],[1118,1],[1142,1],[1192,1],[1200,2],[1228,1],[1230,1],[1237,1],[1276,1],[1278,2],[1296,1],[1298,2],[1301,2],[1304,1],[1357,1],[1365,2],[1383,1],[1393,2],[1396,1],[1440,2],[1488,1],[1527,2],[1530,1],[1544,2],[1565,3],[1585,1],[1610,1],[1623,1],[1625,1],[1717,3],[1759,2],[1776,1],[1785,1],[1787,1],[1828,1],[1841,2],[1844,1],[1865,2],[1916,2],[1941,3],[1961,1],[2024,1],[2031,1],[2047,1],[2049,2],[2052,2],[2055,1],[2135,2],[2138,1],[2159,1],[2161,1],[2249,1],[2270,1],[2272,1],[2322,1],[2338,1],[2411,1]]},"331":{"position":[[313,1],[336,1],[404,1],[573,1]]},"335":{"position":[[0,1]]},"337":{"position":[[94,1],[409,1]]},"378":{"position":[[76,1],[168,1]]},"380":{"position":[[314,1]]},"382":{"position":[[275,1],[337,1],[402,1],[517,1],[583,1],[661,1]]},"384":{"position":[[699,1],[711,1],[728,1],[907,1]]},"394":{"position":[[110,1],[112,1],[184,2],[187,1],[259,2]]},"398":{"position":[[143,1],[239,1],[339,1],[442,1],[548,1],[667,1],[790,1],[881,1]]},"400":{"position":[[175,1],[319,1],[470,1],[610,1],[742,1]]},"423":{"position":[[1041,1],[1135,1],[1181,2],[1275,1],[1415,2]]},"429":{"position":[[230,1]]},"433":{"position":[[478,1],[516,1],[527,1],[599,1],[661,1],[775,1],[797,1],[819,1],[841,1],[869,1],[876,1],[930,1],[937,1],[981,1],[1019,1],[1051,1],[1105,1],[1147,1],[1186,1],[1231,1],[1299,1],[1356,1],[1385,1],[1449,1],[1509,1],[1612,2],[1781,2],[1805,3],[1848,1],[1908,1],[2158,1],[2173,6],[2180,4]]}}}],["0",{"_index":1986,"t":{"325":{"position":[[145,1]]}}}],["0.01",{"_index":937,"t":{"60":{"position":[[50,5]]}}}],["0.1",{"_index":1623,"t":{"206":{"position":[[530,6]]}}}],["001\"embedding=\"google_vertexai:text",{"_index":2117,"t":{"359":{"position":[[139,35]]}}}],["001\"smart_llm=\"google_vertexai:gemini",{"_index":2115,"t":{"359":{"position":[[43,37]]}}}],["001\"strategic_llm=\"google_vertexai:gemini",{"_index":2116,"t":{"359":{"position":[[89,41]]}}}],["002",{"_index":1778,"t":{"253":{"position":[[586,4]]}}}],["004",{"_index":2112,"t":{"357":{"position":[[279,4]]},"359":{"position":[[185,4]]}}}],["01",{"_index":1772,"t":{"253":{"position":[[347,2]]},"339":{"position":[[513,2]]}}}],["05",{"_index":1771,"t":{"253":{"position":[[344,2]]},"339":{"position":[[510,2]]}}}],["1",{"_index":581,"t":{"27":{"position":[[145,2]]},"48":{"position":[[2131,1]]},"68":{"position":[[203,2]]},"97":{"position":[[223,2]]},"107":{"position":[[5,1]]},"111":{"position":[[437,2]]},"140":{"position":[[163,1]]},"176":{"position":[[5,1]]},"200":{"position":[[24,1]]},"234":{"position":[[150,1]]},"249":{"position":[[82,2]]},"298":{"position":[[356,3]]},"374":{"position":[[305,1]]},"394":{"position":[[181,2]]},"429":{"position":[[5,1]]},"435":{"position":[[241,2]]}}}],["1,200",{"_index":264,"t":{"11":{"position":[[768,5]]}}}],["1.0",{"_index":1985,"t":{"325":{"position":[[141,3]]}}}],["1.1",{"_index":1726,"t":{"239":{"position":[[1599,4],[1862,4],[2137,4],[2400,4]]}}}],["1.5",{"_index":2108,"t":{"357":{"position":[[141,3],[182,3],[225,3]]},"359":{"position":[[33,3],[81,3],[131,3]]}}}],["1.7.1",{"_index":1580,"t":{"182":{"position":[[81,7]]}}}],["100",{"_index":133,"t":{"5":{"position":[[967,5]]}}}],["1106",{"_index":800,"t":{"48":{"position":[[2383,4],[7365,4]]}}}],["128k",{"_index":795,"t":{"48":{"position":[[2192,5]]},"206":{"position":[[360,5]]}}}],["13617492f5df",{"_index":2322,"t":{"433":{"position":[[2080,14]]}}}],["18.17.0nvm",{"_index":1286,"t":{"111":{"position":[[205,10]]},"431":{"position":[[23,10]]}}}],["1960s,but",{"_index":1372,"t":{"150":{"position":[[574,9]]}}}],["2",{"_index":584,"t":{"27":{"position":[[218,2]]},"68":{"position":[[331,2]]},"97":{"position":[[364,2]]},"107":{"position":[[29,1],[454,1]]},"176":{"position":[[74,1]]},"192":{"position":[[179,3]]},"200":{"position":[[134,1],[542,1]]},"234":{"position":[[141,1]]},"239":{"position":[[24,2]]},"249":{"position":[[132,2]]},"298":{"position":[[367,4]]},"372":{"position":[[56,2]]},"374":{"position":[[524,1]]},"394":{"position":[[256,2]]},"429":{"position":[[29,1],[370,1]]}}}],["2+3",{"_index":810,"t":{"48":{"position":[[2751,3]]}}}],["2.0",{"_index":1237,"t":{"105":{"position":[[66,3]]},"427":{"position":[[62,3]]}}}],["2.1\"smart_llm=\"anthropic:claud",{"_index":2075,"t":{"349":{"position":[[172,31]]}}}],["20",{"_index":203,"t":{"9":{"position":[[194,2],[317,3]]},"58":{"position":[[167,3]]},"211":{"position":[[148,2]]},"439":{"position":[[516,3]]}}}],["2004(thi",{"_index":1364,"t":{"150":{"position":[[308,9]]}}}],["2021",{"_index":148,"t":{"7":{"position":[[179,6]]}}}],["2023\"report_typ",{"_index":1847,"t":{"268":{"position":[[39,16]]}}}],["2024",{"_index":2063,"t":{"347":{"position":[[312,6]]},"433":{"position":[[1800,4]]}}}],["20240229",{"_index":2078,"t":{"349":{"position":[[259,9]]},"365":{"position":[[44,8],[103,8],[166,8]]}}}],["20240229\"strategic_llm=\"anthropic:claud",{"_index":2077,"t":{"349":{"position":[[211,40]]}}}],["2k",{"_index":1618,"t":{"204":{"position":[[385,4]]},"211":{"position":[[119,2]]}}}],["3",{"_index":597,"t":{"27":{"position":[[554,2]]},"87":{"position":[[2458,2]]},"101":{"position":[[1539,1]]},"107":{"position":[[134,1]]},"150":{"position":[[2645,2],[2962,1]]},"176":{"position":[[143,1]]},"200":{"position":[[284,1]]},"206":{"position":[[497,1]]},"239":{"position":[[193,2]]},"249":{"position":[[195,2]]},"335":{"position":[[209,1]]},"339":{"position":[[319,1]]},"349":{"position":[[204,1],[252,1]]},"353":{"position":[[205,1],[255,1],[310,1]]},"365":{"position":[[35,1],[94,1],[157,1]]},"374":{"position":[[587,1]]},"423":{"position":[[1113,2]]},"429":{"position":[[134,1]]}}}],["3.10",{"_index":1304,"t":{"121":{"position":[[56,4]]},"218":{"position":[[409,5]]},"220":{"position":[[509,5]]},"222":{"position":[[472,5]]},"261":{"position":[[69,5]]}}}],["3.11",{"_index":1270,"t":{"109":{"position":[[82,5]]},"325":{"position":[[275,4],[513,4]]}}}],["301",{"_index":1744,"t":{"239":{"position":[[2910,3]]}}}],["32768",{"_index":2062,"t":{"347":{"position":[[259,6],[408,5]]}}}],["32768\"smart_llm=\"groq:mixtr",{"_index":2060,"t":{"347":{"position":[[185,29]]}}}],["32768\"strategic_llm=\"groq:mixtr",{"_index":2061,"t":{"347":{"position":[[220,33]]}}}],["36",{"_index":1432,"t":{"150":{"position":[[2374,2]]}}}],["4",{"_index":251,"t":{"11":{"position":[[285,2],[330,1]]},"48":{"position":[[2178,1],[2381,1],[7363,1]]},"60":{"position":[[82,1]]},"87":{"position":[[2571,1]]},"107":{"position":[[352,1]]},"150":{"position":[[2967,1]]},"154":{"position":[[913,3]]},"200":{"position":[[440,1]]},"239":{"position":[[1169,2]]},"321":{"position":[[49,1]]},"429":{"position":[[268,1]]}}}],["40",{"_index":578,"t":{"25":{"position":[[914,4]]},"27":{"position":[[2254,3]]}}}],["404",{"_index":1746,"t":{"239":{"position":[[3008,4]]}}}],["443",{"_index":1732,"t":{"239":{"position":[[2522,3]]}}}],["4o",{"_index":1621,"t":{"206":{"position":[[341,2],[357,2]]},"253":{"position":[[668,2],[782,3]]},"335":{"position":[[91,2]]},"339":{"position":[[615,2]]},"423":{"position":[[1092,4]]}}}],["4o\"strategic_llm=\"openai:o1",{"_index":2026,"t":{"335":{"position":[[121,27]]}}}],["4ostrategic_llm=azure_openai:o1",{"_index":2041,"t":{"339":{"position":[[650,31]]}}}],["5",{"_index":1336,"t":{"140":{"position":[[165,1]]},"154":{"position":[[808,1],[921,2],[987,1]]},"192":{"position":[[236,3]]},"412":{"position":[[343,1]]},"433":{"position":[[1797,2]]}}}],["50",{"_index":633,"t":{"27":{"position":[[2287,4]]},"234":{"position":[[157,2]]},"353":{"position":[[35,3]]}}}],["6",{"_index":2267,"t":{"412":{"position":[[345,1]]}}}],["64m",{"_index":1723,"t":{"239":{"position":[[1528,4],[2066,4]]}}}],["7",{"_index":2269,"t":{"414":{"position":[[32,1]]}}}],["70b",{"_index":2065,"t":{"347":{"position":[[371,3]]},"353":{"position":[[257,3],[312,3]]}}}],["7b",{"_index":2070,"t":{"347":{"position":[[420,2]]},"355":{"position":[[216,2],[268,2],[324,2]]}}}],["7b\"smart_llm=\"mistralai:mistr",{"_index":2082,"t":{"351":{"position":[[143,31]]}}}],["80",{"_index":1719,"t":{"239":{"position":[[1477,3],[2971,3]]}}}],["80,000",{"_index":1415,"t":{"150":{"position":[[1742,7],[1815,7],[2488,7]]}}}],["8192",{"_index":2066,"t":{"347":{"position":[[375,4],[390,4]]}}}],["85",{"_index":238,"t":{"9":{"position":[[1011,3]]}}}],["8b",{"_index":2067,"t":{"347":{"position":[[387,2]]},"353":{"position":[[207,2]]}}}],["8x7b",{"_index":2059,"t":{"347":{"position":[[180,4],[215,4],[254,4],[403,4]]},"363":{"position":[[142,4],[211,4],[284,4]]}}}],["95",{"_index":303,"t":{"15":{"position":[[344,3]]}}}],["__call__",{"_index":2260,"t":{"404":{"position":[[103,9]]}}}],["__call__(cl",{"_index":2261,"t":{"404":{"position":[[117,13]]}}}],["__init__",{"_index":2226,"t":{"398":{"position":[[117,9],[131,10]]}}}],["__init__(self",{"_index":1065,"t":{"85":{"position":[[1518,15]]},"257":{"position":[[268,15]]}}}],["__main__",{"_index":622,"t":{"27":{"position":[[1545,11]]},"52":{"position":[[530,11]]},"93":{"position":[[864,11]]},"95":{"position":[[570,11]]},"97":{"position":[[826,11]]},"101":{"position":[[1101,11]]},"132":{"position":[[398,11]]},"134":{"position":[[427,11]]},"255":{"position":[[707,11]]},"257":{"position":[[1380,11]]},"263":{"position":[[571,11]]},"433":{"position":[[1615,11]]}}}],["__name__",{"_index":621,"t":{"27":{"position":[[1533,8]]},"52":{"position":[[518,8]]},"93":{"position":[[852,8]]},"95":{"position":[[558,8]]},"97":{"position":[[814,8]]},"101":{"position":[[1089,8]]},"132":{"position":[[386,8]]},"134":{"position":[[415,8]]},"255":{"position":[[695,8]]},"257":{"position":[[1368,8]]},"263":{"position":[[559,8]]},"433":{"position":[[1603,8]]}}}],["abil",{"_index":379,"t":{"17":{"position":[[954,7]]},"77":{"position":[[101,7]]},"105":{"position":[[379,7]]},"427":{"position":[[375,7]]}}}],["abov",{"_index":102,"t":{"5":{"position":[[330,6]]},"9":{"position":[[821,6]]},"11":{"position":[[518,5]]},"21":{"position":[[394,6]]},"25":{"position":[[133,6]]},"27":{"position":[[1814,6],[2311,6]]},"48":{"position":[[4808,6]]},"85":{"position":[[769,6],[1247,6],[1887,6],[2990,6],[3410,6]]},"99":{"position":[[20,5]]},"239":{"position":[[3115,6]]},"253":{"position":[[99,6]]},"257":{"position":[[2055,5]]},"325":{"position":[[186,5]]},"329":{"position":[[755,5]]},"355":{"position":[[115,6]]}}}],["abstract",{"_index":2266,"t":{"406":{"position":[[59,8]]}}}],["abstractsingleton(abc.abc",{"_index":2264,"t":{"406":{"position":[[6,26]]}}}],["academia",{"_index":300,"t":{"15":{"position":[[275,9]]}}}],["accept",{"_index":1131,"t":{"87":{"position":[[1805,8],[1857,10]]}}}],["access",{"_index":1277,"t":{"109":{"position":[[225,6]]},"111":{"position":[[335,6]]},"158":{"position":[[280,6]]},"398":{"position":[[109,7]]},"439":{"position":[[8,9]]}}}],["accord",{"_index":116,"t":{"5":{"position":[[500,9]]}}}],["accordingli",{"_index":2222,"t":{"394":{"position":[[341,12]]}}}],["account",{"_index":2051,"t":{"343":{"position":[[186,7]]}}}],["accur",{"_index":421,"t":{"19":{"position":[[758,8]]},"62":{"position":[[72,9],[188,8],[426,8]]}}}],["accuraci",{"_index":418,"t":{"19":{"position":[[623,9]]},"29":{"position":[[352,9]]}}}],["achiev",{"_index":250,"t":{"11":{"position":[[267,8]]},"27":{"position":[[110,8]]},"236":{"position":[[117,7]]}}}],["act",{"_index":1013,"t":{"81":{"position":[[204,4]]}}}],["action",{"_index":451,"t":{"19":{"position":[[1693,10]]},"29":{"position":[[194,10]]},"48":{"position":[[4092,6]]},"160":{"position":[[475,8]]},"162":{"position":[[130,7]]},"243":{"position":[[100,8]]},"249":{"position":[[434,6]]}}}],["activ",{"_index":1511,"t":{"162":{"position":[[1236,8]]},"170":{"position":[[621,8]]},"180":{"position":[[275,8],[327,10],[580,10]]},"182":{"position":[[635,8],[1006,10]]},"228":{"position":[[18,8]]}}}],["activate/deactiv",{"_index":1571,"t":{"180":{"position":[[42,19]]}}}],["actual",{"_index":52,"t":{"3":{"position":[[648,8]]},"162":{"position":[[1183,6]]}}}],["ad",{"_index":944,"t":{"64":{"position":[[152,6],[270,6]]},"105":{"position":[[189,5]]},"162":{"position":[[1194,6]]},"200":{"position":[[209,6]]},"257":{"position":[[1676,5]]},"427":{"position":[[185,5]]}}}],["ada",{"_index":1777,"t":{"253":{"position":[[582,3]]}}}],["add",{"_index":700,"t":{"40":{"position":[[341,4]]},"42":{"position":[[624,3]]},"48":{"position":[[1131,3],[8773,3]]},"68":{"position":[[206,3]]},"77":{"position":[[89,4]]},"85":{"position":[[2380,3],[3169,3]]},"97":{"position":[[226,3]]},"107":{"position":[[64,3]]},"188":{"position":[[255,3]]},"239":{"position":[[421,3],[1012,3]]},"249":{"position":[[235,3]]},"291":{"position":[[13,3]]},"345":{"position":[[178,3]]},"382":{"position":[[519,3]]},"384":{"position":[[600,3]]},"423":{"position":[[669,3]]},"429":{"position":[[64,3]]}}}],["add_edg",{"_index":1101,"t":{"85":{"position":[[3099,8]]}}}],["add_nod",{"_index":1100,"t":{"85":{"position":[[3089,9]]}}}],["added_source_url",{"_index":1506,"t":{"162":{"position":[[1000,17]]},"257":{"position":[[1643,19]]}}}],["addit",{"_index":180,"t":{"7":{"position":[[894,9]]},"25":{"position":[[654,10]]},"48":{"position":[[8674,10]]},"89":{"position":[[499,9]]},"93":{"position":[[225,10]]},"158":{"position":[[396,10]]},"160":{"position":[[928,10]]},"168":{"position":[[3,8]]},"218":{"position":[[296,10]]},"253":{"position":[[111,10]]},"263":{"position":[[254,10]]},"277":{"position":[[52,10]]},"294":{"position":[[69,10]]},"305":{"position":[[270,10]]},"307":{"position":[[503,10]]},"390":{"position":[[246,8],[392,10]]},"435":{"position":[[36,10]]}}}],["address",{"_index":391,"t":{"19":{"position":[[52,9]]},"29":{"position":[[229,9]]}}}],["adjust",{"_index":1298,"t":{"115":{"position":[[288,6]]},"138":{"position":[[313,6]]}}}],["admin",{"_index":2146,"t":{"378":{"position":[[66,5]]}}}],["advanc",{"_index":357,"t":{"17":{"position":[[424,12]]},"29":{"position":[[41,11]]},"95":{"position":[[642,12]]},"215":{"position":[[255,8],[319,8],[515,8]]},"218":{"position":[[317,8]]},"220":{"position":[[158,8],[546,8]]},"343":{"position":[[19,8]]}}}],["advantag",{"_index":394,"t":{"19":{"position":[[103,11]]},"21":{"position":[[723,10]]},"29":{"position":[[590,9]]},"87":{"position":[[1226,9]]}}}],["afterward",{"_index":1982,"t":{"323":{"position":[[355,10]]}}}],["ag",{"_index":1713,"t":{"239":{"position":[[1087,2]]}}}],["again",{"_index":746,"t":{"48":{"position":[[19,5]]},"239":{"position":[[868,5]]},"327":{"position":[[111,6]]}}}],["agent",{"_index":76,"t":{"3":{"position":[[1048,5]]},"5":{"position":[[658,5],[764,5],[852,5]]},"9":{"position":[[394,5],[456,5],[597,5]]},"13":{"position":[[277,5]]},"15":{"position":[[145,6]]},"33":{"position":[[610,5]]},"56":{"position":[[250,5]]},"58":{"position":[[60,5]]},"64":{"position":[[244,5]]},"72":{"position":[[37,5]]},"75":{"position":[[121,6],[304,5],[348,7],[435,5],[689,5],[790,5]]},"77":{"position":[[57,5],[73,5],[206,7],[319,6],[348,6],[504,7]]},"79":{"position":[[120,6],[165,5],[405,6],[562,5]]},"81":{"position":[[40,7],[136,5],[169,6],[198,5],[284,5]]},"83":{"position":[[829,5]]},"85":{"position":[[904,7],[917,5],[1058,7],[1290,5],[1325,5],[1410,5],[1936,6],[2003,6],[2036,7],[2399,5],[3369,6]]},"87":{"position":[[367,5],[385,6],[772,7],[2198,6],[2257,7]]},"89":{"position":[[814,5],[996,6]]},"95":{"position":[[20,5]]},"115":{"position":[[523,5]]},"162":{"position":[[352,5],[414,5]]},"176":{"position":[[86,5]]},"184":{"position":[[31,5]]},"206":{"position":[[50,7],[129,6],[316,6],[581,5],[762,5]]},"215":{"position":[[85,6],[302,5]]},"218":{"position":[[61,5],[177,5]]},"222":{"position":[[51,6],[222,5]]},"224":{"position":[[49,5]]},"226":{"position":[[286,5],[306,6]]},"228":{"position":[[249,5]]},"255":{"position":[[0,5],[75,6],[177,5]]},"412":{"position":[[115,6],[223,6]]},"414":{"position":[[37,7],[130,7],[226,5],[259,6],[338,5]]},"423":{"position":[[218,7],[408,7],[430,6]]},"433":{"position":[[1223,7],[1850,8],[1942,6],[2047,7],[2143,7]]},"435":{"position":[[264,5]]},"439":{"position":[[409,5]]}}}],["agent_gener",{"_index":1503,"t":{"162":{"position":[[302,16]]}}}],["ages.startup",{"_index":1376,"t":{"150":{"position":[[672,13]]}}}],["aggreg",{"_index":241,"t":{"11":{"position":[[15,11],[356,10]]},"13":{"position":[[469,9]]},"15":{"position":[[680,10]]},"58":{"position":[[150,11]]},"206":{"position":[[246,10],[961,9]]},"211":{"position":[[132,10]]},"439":{"position":[[499,11]]}}}],["ahead",{"_index":785,"t":{"48":{"position":[[1484,5],[8763,5]]}}}],["ai",{"_index":33,"t":{"3":{"position":[[373,2],[853,2]]},"15":{"position":[[82,2],[142,2],[226,2],[478,2],[745,2]]},"17":{"position":[[56,2]]},"19":{"position":[[1537,2]]},"42":{"position":[[1061,2]]},"48":{"position":[[260,2]]},"56":{"position":[[79,2]]},"62":{"position":[[145,2],[234,2],[446,2]]},"75":{"position":[[118,2],[212,2],[432,2],[470,2],[620,2]]},"79":{"position":[[402,2]]},"87":{"position":[[2420,2]]},"89":{"position":[[102,2],[344,2],[1186,2]]},"93":{"position":[[916,2]]},"95":{"position":[[658,2]]},"222":{"position":[[219,2]]},"268":{"position":[[21,2]]},"270":{"position":[[49,2]]},"343":{"position":[[28,2],[98,2]]},"353":{"position":[[9,2]]},"412":{"position":[[220,2]]},"414":{"position":[[34,2]]},"423":{"position":[[1056,2]]},"433":{"position":[[1220,2],[1815,2],[1905,2]]},"435":{"position":[[176,2],[274,2]]}}}],["ai/nom",{"_index":2093,"t":{"353":{"position":[[351,8]]},"363":{"position":[[325,8]]}}}],["aim",{"_index":97,"t":{"5":{"position":[[270,4]]},"56":{"position":[[33,6]]},"77":{"position":[[39,5]]},"89":{"position":[[288,6]]},"115":{"position":[[416,3]]}}}],["aka",{"_index":974,"t":{"75":{"position":[[366,4]]}}}],["allow",{"_index":420,"t":{"19":{"position":[[742,6],[1751,6]]},"23":{"position":[[54,5]]},"27":{"position":[[2377,8]]},"48":{"position":[[3382,6]]},"79":{"position":[[215,6]]},"85":{"position":[[268,8]]},"89":{"position":[[952,5]]},"95":{"position":[[88,6]]},"154":{"position":[[138,6]]},"160":{"position":[[436,8]]},"164":{"position":[[538,5]]},"170":{"position":[[907,6]]},"172":{"position":[[428,6]]},"182":{"position":[[412,6]]},"384":{"position":[[27,6]]},"390":{"position":[[115,5]]}}}],["alon",{"_index":434,"t":{"19":{"position":[[1137,6]]}}}],["along",{"_index":1560,"t":{"172":{"position":[[142,5]]}}}],["alreadi",{"_index":967,"t":{"75":{"position":[[133,7]]},"89":{"position":[[445,7]]}}}],["altern",{"_index":1309,"t":{"125":{"position":[[145,14]]}}}],["although",{"_index":758,"t":{"48":{"position":[[430,8]]}}}],["alway",{"_index":1173,"t":{"89":{"position":[[1422,7]]},"160":{"position":[[500,6]]}}}],["amaz",{"_index":945,"t":{"64":{"position":[[315,7]]}}}],["amazingli",{"_index":2048,"t":{"343":{"position":[[83,9]]}}}],["amount",{"_index":1334,"t":{"140":{"position":[[118,6]]}}}],["analysi",{"_index":322,"t":{"15":{"position":[[788,9]]},"19":{"position":[[773,8],[958,8],[1298,9]]},"83":{"position":[[115,9]]},"119":{"position":[[71,8]]},"136":{"position":[[197,9]]},"170":{"position":[[782,9]]},"172":{"position":[[418,9]]},"255":{"position":[[1105,9]]},"298":{"position":[[59,9]]},"416":{"position":[[92,8]]}}}],["analyz",{"_index":310,"t":{"15":{"position":[[511,7],[638,7]]},"19":{"position":[[838,9]]},"29":{"position":[[603,9]]}}}],["andrew",{"_index":976,"t":{"75":{"position":[[392,6]]}}}],["announc",{"_index":628,"t":{"27":{"position":[[2007,14]]}}}],["anoth",{"_index":196,"t":{"9":{"position":[[0,7]]},"150":{"position":[[2042,7],[2287,7]]}}}],["answer",{"_index":258,"t":{"11":{"position":[[537,6],[644,6]]},"48":{"position":[[1835,7],[2016,6],[2088,11],[5282,6],[5702,7],[5883,6],[5955,12]]},"204":{"position":[[570,8]]},"423":{"position":[[1300,6]]},"439":{"position":[[211,7]]}}}],["anthrop",{"_index":2071,"t":{"349":{"position":[[9,9],[50,9],[274,9]]}}}],["anthropic_api_key=[your",{"_index":2073,"t":{"349":{"position":[[117,23]]}}}],["anyimport",{"_index":1795,"t":{"257":{"position":[[127,9]]}}}],["anyon",{"_index":736,"t":{"44":{"position":[[361,6]]}}}],["anyth",{"_index":1263,"t":{"107":{"position":[[395,8]]},"200":{"position":[[483,8]]},"429":{"position":[[311,8]]}}}],["apa",{"_index":267,"t":{"11":{"position":[[809,3],[871,3]]},"87":{"position":[[2628,3]]},"95":{"position":[[694,3]]},"423":{"position":[[1362,3]]}}}],["api",{"_index":589,"t":{"27":{"position":[[361,3]]},"48":{"position":[[191,3],[334,3],[531,4],[686,3],[882,3],[938,3],[1683,4],[1923,3],[2258,4],[3291,5],[3312,3],[4216,4],[5491,3],[5790,3]]},"56":{"position":[[131,4],[157,3]]},"64":{"position":[[113,3]]},"107":{"position":[[73,3]]},"121":{"position":[[137,3],[197,3]]},"125":{"position":[[12,3]]},"138":{"position":[[0,3],[28,3]]},"146":{"position":[[63,3]]},"188":{"position":[[264,3]]},"198":{"position":[[136,3]]},"200":{"position":[[221,3]]},"253":{"position":[[244,3],[536,3]]},"261":{"position":[[259,3],[322,3],[376,3]]},"335":{"position":[[24,3]]},"337":{"position":[[22,3],[118,3],[191,3],[433,3],[506,3]]},"343":{"position":[[201,3]]},"345":{"position":[[91,3],[152,3]]},"349":{"position":[[60,3]]},"351":{"position":[[22,3]]},"353":{"position":[[22,3]]},"357":{"position":[[43,3]]},"378":{"position":[[336,3]]},"388":{"position":[[216,3],[656,3]]},"390":{"position":[[167,3]]},"398":{"position":[[817,3]]},"400":{"position":[[59,3],[207,3],[358,3],[502,3],[640,3]]},"412":{"position":[[462,3]]},"421":{"position":[[120,3],[168,3]]},"429":{"position":[[73,3]]}}}],["apikeyerror(except",{"_index":2245,"t":{"400":{"position":[[6,22]]}}}],["app",{"_index":640,"t":{"27":{"position":[[2528,3]]},"48":{"position":[[263,4]]},"68":{"position":[[365,3]]},"105":{"position":[[10,3]]},"107":{"position":[[521,3]]},"200":{"position":[[609,3]]},"325":{"position":[[497,3]]},"378":{"position":[[72,3]]},"427":{"position":[[10,3]]},"429":{"position":[[437,3]]}}}],["app@app.websocket(\"/generate_report\")async",{"_index":725,"t":{"42":{"position":[[737,42]]}}}],["append",{"_index":1802,"t":{"257":{"position":[[446,6]]},"374":{"position":[[646,6]]}}}],["appl",{"_index":1466,"t":{"152":{"position":[[562,7],[600,6]]}}}],["applic",{"_index":924,"t":{"56":{"position":[[82,11]]},"85":{"position":[[209,12],[435,11]]},"168":{"position":[[77,11]]},"184":{"position":[[19,11]]},"220":{"position":[[329,11]]},"224":{"position":[[31,11]]},"226":{"position":[[159,12]]},"228":{"position":[[171,12]]},"239":{"position":[[273,12]]},"257":{"position":[[1570,12]]},"421":{"position":[[195,12]]},"423":{"position":[[974,11]]},"435":{"position":[[179,12]]}}}],["appreci",{"_index":475,"t":{"21":{"position":[[151,10]]}}}],["approach",{"_index":121,"t":{"5":{"position":[[693,8]]},"17":{"position":[[860,11]]},"29":{"position":[[220,8]]},"85":{"position":[[121,8]]},"166":{"position":[[131,8]]}}}],["appropri",{"_index":1908,"t":{"309":{"position":[[136,11]]}}}],["apt",{"_index":1670,"t":{"239":{"position":[[5,3],[97,3],[335,3],[347,3],[898,3],[913,3],[1251,3]]},"323":{"position":[[454,3]]},"325":{"position":[[120,3]]}}}],["arbitrari",{"_index":997,"t":{"77":{"position":[[483,9]]}}}],["arch=$(dpkg",{"_index":1697,"t":{"239":{"position":[[620,12]]}}}],["architectur",{"_index":281,"t":{"13":{"position":[[90,13]]},"21":{"position":[[381,12]]},"85":{"position":[[3302,12]]},"239":{"position":[[641,13]]},"419":{"position":[[34,12]]}}}],["archiv",{"_index":1692,"t":{"239":{"position":[[558,7],[692,7]]}}}],["area",{"_index":171,"t":{"7":{"position":[[661,5]]},"15":{"position":[[250,5]]},"85":{"position":[[811,6]]}}}],["arg",{"_index":2262,"t":{"404":{"position":[[131,6]]}}}],["argument",{"_index":962,"t":{"68":{"position":[[538,8]]},"95":{"position":[[211,8]]},"97":{"position":[[446,8]]},"99":{"position":[[217,8]]},"390":{"position":[[403,9]]}}}],["aris",{"_index":1344,"t":{"140":{"position":[[642,6]]}}}],["around",{"_index":205,"t":{"9":{"position":[[224,6],[977,6]]},"60":{"position":[[43,6]]},"206":{"position":[[490,6]]}}}],["array",{"_index":1488,"t":{"160":{"position":[[270,5],[997,5]]},"162":{"position":[[807,5],[1868,5]]}}}],["articl",{"_index":77,"t":{"3":{"position":[[1097,8]]},"75":{"position":[[656,7]]},"89":{"position":[[1097,7]]},"255":{"position":[[953,8]]},"270":{"position":[[24,7]]}}}],["artifici",{"_index":714,"t":{"42":{"position":[[300,10]]},"194":{"position":[[175,10],[229,10]]}}}],["arxiv",{"_index":2194,"t":{"388":{"position":[[450,5],[784,5]]}}}],["ask",{"_index":253,"t":{"11":{"position":[[384,3]]},"48":{"position":[[1170,3]]}}}],["aspect",{"_index":1873,"t":{"294":{"position":[[26,7]]}}}],["asset",{"_index":734,"t":{"44":{"position":[[316,5]]}}}],["assist",{"_index":752,"t":{"48":{"position":[[180,10],[250,9],[323,10],[675,10],[871,10],[921,9],[1193,9],[1309,9],[1402,9],[1452,9],[2147,9],[3040,9],[3301,10],[3424,11],[4177,9],[4822,9],[5252,9],[8619,9],[8809,9]]},"72":{"position":[[43,9]]},"75":{"position":[[796,9]]},"87":{"position":[[113,9],[2226,9],[2314,10],[2361,9],[3149,9]]},"89":{"position":[[142,9],[860,10],[958,10]]}}}],["assistant.idprint(f\"assist",{"_index":896,"t":{"48":{"position":[[7737,29]]}}}],["assistant_id",{"_index":895,"t":{"48":{"position":[[7719,15],[7771,17]]}}}],["assistant_id=assistant_id",{"_index":820,"t":{"48":{"position":[[3175,27],[8170,26]]}}}],["assistant_prompt_instruct",{"_index":789,"t":{"48":{"position":[[1751,28]]}}}],["assistantassist",{"_index":796,"t":{"48":{"position":[[2275,18],[7257,18]]}}}],["assistant’",{"_index":788,"t":{"48":{"position":[[1725,11]]}}}],["associ",{"_index":1589,"t":{"182":{"position":[[668,10],[791,10]]}}}],["assum",{"_index":156,"t":{"7":{"position":[[335,7],[904,8]]},"9":{"position":[[337,8]]},"11":{"position":[[1074,6]]},"85":{"position":[[1953,6]]},"152":{"position":[[219,8],[294,8]]},"394":{"position":[[278,7]]}}}],["async",{"_index":1066,"t":{"85":{"position":[[1539,5]]},"87":{"position":[[1305,5]]},"255":{"position":[[594,5]]},"257":{"position":[[331,5]]},"275":{"position":[[38,5]]},"317":{"position":[[1443,7]]},"331":{"position":[[643,5]]},"382":{"position":[[813,5]]},"425":{"position":[[110,5]]}}}],["async_browse(url",{"_index":218,"t":{"9":{"position":[[616,18]]}}}],["async_mode=true,)queri",{"_index":1464,"t":{"152":{"position":[[505,22]]}}}],["asynchron",{"_index":682,"t":{"35":{"position":[[243,12]]},"48":{"position":[[3393,12]]},"257":{"position":[[1330,12]]}}}],["asyncio",{"_index":214,"t":{"9":{"position":[[443,8]]}}}],["asyncio.gather(*task",{"_index":226,"t":{"9":{"position":[[754,22]]}}}],["asyncio.run(generate_research_report(query=queri",{"_index":1789,"t":{"255":{"position":[[777,50]]}}}],["asyncio.run(get_report(prompt=prompt",{"_index":1197,"t":{"95":{"position":[[734,37]]}}}],["asyncio.run(get_report(queri",{"_index":1838,"t":{"263":{"position":[[701,29]]}}}],["asyncio.run(get_report(query=queri",{"_index":1192,"t":{"93":{"position":[[1158,35]]},"97":{"position":[[957,35]]},"101":{"position":[[1626,35]]}}}],["asyncio.run(get_research_report(query=queri",{"_index":625,"t":{"27":{"position":[[1681,44]]},"132":{"position":[[534,44]]},"134":{"position":[[628,44]]}}}],["asyncio.run(main",{"_index":920,"t":{"52":{"position":[[542,19]]}}}],["asyncio.run(run",{"_index":1812,"t":{"257":{"position":[[1392,18]]}}}],["asyncio.run(test_scrape_data_by_queri",{"_index":2316,"t":{"433":{"position":[[1627,40]]}}}],["asyncio.to_thread",{"_index":2309,"t":{"433":{"position":[[1457,18]]}}}],["asyncioapp",{"_index":1850,"t":{"273":{"position":[[74,10]]}}}],["asyncioasync",{"_index":611,"t":{"27":{"position":[[1239,12]]},"52":{"position":[[47,12]]},"93":{"position":[[562,12]]},"95":{"position":[[331,12]]},"97":{"position":[[583,12]]},"132":{"position":[[93,12]]},"134":{"position":[[93,12]]},"255":{"position":[[261,12]]},"263":{"position":[[47,12]]}}}],["asyncioconnection_str",{"_index":1213,"t":{"101":{"position":[[358,24]]}}}],["asynciofrom",{"_index":703,"t":{"42":{"position":[[72,11]]},"257":{"position":[[137,11]]},"331":{"position":[[241,11]]},"433":{"position":[[165,11]]}}}],["asyncioif",{"_index":1811,"t":{"257":{"position":[[1358,9]]}}}],["asyncioimport",{"_index":2157,"t":{"382":{"position":[[88,13]]}}}],["atleast",{"_index":1416,"t":{"150":{"position":[[1807,7]]}}}],["attach",{"_index":1758,"t":{"249":{"position":[[0,9]]}}}],["attempt",{"_index":1340,"t":{"140":{"position":[[474,8]]}}}],["attent",{"_index":984,"t":{"75":{"position":[[630,9]]}}}],["attribut",{"_index":993,"t":{"77":{"position":[[182,10]]},"433":{"position":[[710,10]]}}}],["audio",{"_index":316,"t":{"15":{"position":[[595,6]]}}}],["auth",{"_index":2186,"t":{"384":{"position":[[604,4],[638,4]]}}}],["auth_bas",{"_index":2188,"t":{"384":{"position":[[759,10]]}}}],["auth_basic_user_fil",{"_index":2189,"t":{"384":{"position":[[788,20]]}}}],["authent",{"_index":2185,"t":{"384":{"position":[[582,14],[770,17]]}}}],["authorit",{"_index":1343,"t":{"140":{"position":[[605,13]]}}}],["auto",{"_index":482,"t":{"21":{"position":[[324,4]]}}}],["autogpt",{"_index":0,"t":{"3":{"position":[[6,7],[282,7],[484,7]]},"9":{"position":[[19,7],[1027,8]]}}}],["autom",{"_index":289,"t":{"15":{"position":[[30,10]]},"29":{"position":[[438,10]]},"83":{"position":[[19,10]]},"243":{"position":[[42,9]]}}}],["automat",{"_index":781,"t":{"48":{"position":[[1244,13]]},"378":{"position":[[271,13]]}}}],["autonom",{"_index":10,"t":{"3":{"position":[[105,10],[1037,10]]},"56":{"position":[[230,10]]},"58":{"position":[[40,10]]},"75":{"position":[[764,10]]},"79":{"position":[[542,10]]},"81":{"position":[[273,10]]},"87":{"position":[[102,10]]},"414":{"position":[[327,10]]},"423":{"position":[[447,13]]},"433":{"position":[[1209,10],[1837,10],[1931,10]]},"435":{"position":[[244,10]]},"439":{"position":[[398,10]]}}}],["avail",{"_index":263,"t":{"11":{"position":[[744,10]]},"42":{"position":[[463,9]]},"138":{"position":[[293,9]]},"321":{"position":[[91,9]]},"329":{"position":[[269,9],[692,9]]},"347":{"position":[[323,9]]},"378":{"position":[[293,9]]}}}],["availablerespons",{"_index":225,"t":{"9":{"position":[[727,18]]}}}],["averag",{"_index":236,"t":{"9":{"position":[[949,7]]},"150":{"position":[[1766,7]]},"206":{"position":[[462,7]]},"412":{"position":[[319,7]]}}}],["avoid",{"_index":678,"t":{"35":{"position":[[177,6]]},"40":{"position":[[257,5]]},"182":{"position":[[960,8]]},"329":{"position":[[599,5]]}}}],["await",{"_index":222,"t":{"9":{"position":[[669,5],[748,5]]},"27":{"position":[[1439,5],[1484,5]]},"42":{"position":[[672,5],[826,5],[860,5],[893,5]]},"52":{"position":[[406,5],[470,5]]},"85":{"position":[[1757,5],[1821,5]]},"93":{"position":[[759,5],[804,5]]},"95":{"position":[[464,5],[509,5]]},"97":{"position":[[720,5],[765,5]]},"101":{"position":[[996,5],[1041,5]]},"132":{"position":[[293,5],[338,5]]},"134":{"position":[[322,5],[367,5]]},"150":{"position":[[3373,5]]},"152":{"position":[[908,5]]},"154":{"position":[[870,5]]},"255":{"position":[[416,5],[461,5],[653,5]]},"257":{"position":[[1179,5],[1247,5]]},"263":{"position":[[171,5],[216,5]]},"273":{"position":[[254,5],[299,5]]},"275":{"position":[[371,5],[416,5]]},"296":{"position":[[108,5],[171,5],[238,5],[313,5],[401,5]]},"298":{"position":[[222,5]]},"317":{"position":[[2413,5]]},"331":{"position":[[338,5]]},"382":{"position":[[663,5]]},"433":{"position":[[1451,5]]}}}],["awar",{"_index":649,"t":{"29":{"position":[[183,6]]},"119":{"position":[[114,5]]}}}],["azur",{"_index":1769,"t":{"253":{"position":[[291,5]]},"339":{"position":[[44,5],[66,5],[376,5]]}}}],["azure)bing_api_key=\"[your",{"_index":1783,"t":{"253":{"position":[[955,25]]}}}],["azure_openai_api_key=[your",{"_index":2036,"t":{"339":{"position":[[392,26]]}}}],["back",{"_index":866,"t":{"48":{"position":[[4937,4]]},"87":{"position":[[2070,4]]},"150":{"position":[[635,6]]},"239":{"position":[[1120,4]]},"317":{"position":[[257,4]]}}}],["backend",{"_index":1241,"t":{"105":{"position":[[132,7],[428,7]]},"111":{"position":[[382,7]]},"215":{"position":[[172,8],[183,7]]},"220":{"position":[[132,7]]},"317":{"position":[[55,7],[80,7],[429,7]]},"427":{"position":[[128,7],[424,7]]}}}],["backend.report_typ",{"_index":708,"t":{"42":{"position":[[155,19]]}}}],["backend/report_types/detailed_report.pi",{"_index":670,"t":{"33":{"position":[[470,39]]}}}],["balanc",{"_index":439,"t":{"19":{"position":[[1203,7]]}}}],["base",{"_index":233,"t":{"9":{"position":[[925,5]]},"11":{"position":[[917,5]]},"19":{"position":[[516,5]]},"21":{"position":[[312,5],[783,5]]},"25":{"position":[[179,5]]},"48":{"position":[[1843,5],[5710,5]]},"68":{"position":[[58,5]]},"81":{"position":[[535,5]]},"83":{"position":[[41,5],[304,5],[397,5],[558,5],[663,5],[1124,5]]},"85":{"position":[[299,5],[956,5]]},"87":{"position":[[207,5]]},"89":{"position":[[912,5],[1044,5]]},"97":{"position":[[881,5]]},"101":{"position":[[1161,5]]},"136":{"position":[[287,5]]},"140":{"position":[[73,5]]},"162":{"position":[[2127,5]]},"178":{"position":[[14,5]]},"206":{"position":[[170,5],[587,5],[880,5]]},"255":{"position":[[327,5]]},"298":{"position":[[174,5]]},"321":{"position":[[56,5]]},"414":{"position":[[589,5]]},"416":{"position":[[26,5]]},"419":{"position":[[152,5],[234,5],[546,5]]},"433":{"position":[[553,5]]},"435":{"position":[[387,5]]}}}],["base_url=ollama_base_url",{"_index":2169,"t":{"382":{"position":[[423,25]]}}}],["basic",{"_index":1112,"t":{"87":{"position":[[801,9]]},"132":{"position":[[9,5]]},"134":{"position":[[9,5]]},"168":{"position":[[179,5]]},"170":{"position":[[988,5]]},"190":{"position":[[4,5]]},"384":{"position":[[632,5]]}}}],["be",{"_index":1389,"t":{"150":{"position":[[1100,5]]},"162":{"position":[[936,5],[989,5],[2202,5],[3635,5],[4259,5]]},"170":{"position":[[346,5]]}}}],["beautifulsoup",{"_index":1896,"t":{"302":{"position":[[95,13],[273,13]]},"305":{"position":[[39,13]]},"311":{"position":[[4,13]]}}}],["becom",{"_index":224,"t":{"9":{"position":[[720,6]]},"378":{"position":[[285,7]]}}}],["befor",{"_index":294,"t":{"15":{"position":[[135,6]]},"21":{"position":[[0,6]]},"25":{"position":[[728,6]]},"27":{"position":[[379,6]]},"87":{"position":[[723,7]]},"89":{"position":[[1213,6]]},"121":{"position":[[0,6]]},"329":{"position":[[498,6]]}}}],["begin",{"_index":1303,"t":{"121":{"position":[[11,6]]},"162":{"position":[[1413,9],[2887,9]]}}}],["begun",{"_index":1502,"t":{"162":{"position":[[229,5]]}}}],["behavior",{"_index":1813,"t":{"257":{"position":[[1542,8]]}}}],["below",{"_index":283,"t":{"13":{"position":[[113,6]]},"27":{"position":[[995,6]]},"48":{"position":[[768,6],[1299,6],[5018,6],[5345,5],[8861,5]]},"83":{"position":[[8,6]]},"89":{"position":[[1492,6]]},"158":{"position":[[455,5]]},"255":{"position":[[141,6]]},"317":{"position":[[365,6]]},"384":{"position":[[666,5],[747,5]]},"423":{"position":[[767,6]]}}}],["benefit",{"_index":650,"t":{"29":{"position":[[308,8]]},"305":{"position":[[216,9]]},"307":{"position":[[263,9]]}}}],["besid",{"_index":1768,"t":{"253":{"position":[[65,7]]}}}],["best",{"_index":249,"t":{"11":{"position":[[240,4]]},"17":{"position":[[1123,4]]},"58":{"position":[[240,4]]},"62":{"position":[[10,4]]},"75":{"position":[[721,4]]},"150":{"position":[[433,4]]},"152":{"position":[[622,4]]},"154":{"position":[[516,4]]},"224":{"position":[[184,4]]},"313":{"position":[[524,4]]}}}],["bet",{"_index":1368,"t":{"150":{"position":[[438,3]]}}}],["beta",{"_index":1252,"t":{"105":{"position":[[488,6]]},"329":{"position":[[794,4]]},"367":{"position":[[73,5]]},"427":{"position":[[484,6]]}}}],["beta\"embedding=\"sent",{"_index":2099,"t":{"355":{"position":[[327,24]]}}}],["beta\"smart_llm=\"huggingface:huggingfaceh4/zephyr",{"_index":2097,"t":{"355":{"position":[[219,48]]}}}],["beta\"smart_llm=\"xai:grok",{"_index":2136,"t":{"367":{"position":[[19,24]]}}}],["beta\"strategic_llm=\"huggingface:huggingfaceh4/zephyr",{"_index":2098,"t":{"355":{"position":[[271,52]]}}}],["beta\"strategic_llm=\"xai:grok",{"_index":2137,"t":{"367":{"position":[[44,28]]}}}],["better",{"_index":99,"t":{"5":{"position":[[288,6]]},"7":{"position":[[560,6]]},"11":{"position":[[1135,7]]},"19":{"position":[[1432,6]]},"27":{"position":[[20,6],[2397,6]]},"79":{"position":[[226,6]]},"113":{"position":[[95,6]]},"172":{"position":[[696,6]]},"313":{"position":[[319,6]]},"435":{"position":[[169,6]]}}}],["between",{"_index":783,"t":{"48":{"position":[[1390,7]]},"87":{"position":[[1121,7]]},"136":{"position":[[219,7]]},"140":{"position":[[429,7]]},"313":{"position":[[264,7],[372,7]]}}}],["beyond",{"_index":732,"t":{"44":{"position":[[241,6]]}}}],["bia",{"_index":154,"t":{"7":{"position":[[299,5]]},"19":{"position":[[1019,5],[1093,4]]},"29":{"position":[[370,5]]},"204":{"position":[[626,4]]}}}],["bias",{"_index":163,"t":{"7":{"position":[[412,6],[1212,6]]},"17":{"position":[[922,6]]},"204":{"position":[[563,6]]}}}],["big",{"_index":1427,"t":{"150":{"position":[[2164,3],[2508,3]]}}}],["biggest",{"_index":137,"t":{"7":{"position":[[4,7]]},"93":{"position":[[898,7]]}}}],["bing",{"_index":1782,"t":{"253":{"position":[[900,4]]},"388":{"position":[[556,4]]}}}],["bit",{"_index":824,"t":{"48":{"position":[[3252,3]]},"355":{"position":[[28,3]]}}}],["blog",{"_index":764,"t":{"48":{"position":[[626,4]]},"70":{"position":[[14,4]]},"226":{"position":[[342,4]]}}}],["blue",{"_index":1228,"t":{"101":{"position":[[1149,4]]}}}],["bodi",{"_index":677,"t":{"35":{"position":[[172,4]]},"433":{"position":[[1730,5],[1784,7]]}}}],["book",{"_index":1805,"t":{"257":{"position":[[784,8]]}}}],["bool",{"_index":2225,"t":{"398":{"position":[[81,5],[874,5]]}}}],["boss",{"_index":1426,"t":{"150":{"position":[[2154,4]]}}}],["both",{"_index":195,"t":{"7":{"position":[[1412,4]]},"17":{"position":[[295,4],[855,4],[1131,4]]},"19":{"position":[[1041,4]]},"21":{"position":[[445,4]]},"27":{"position":[[374,4]]},"77":{"position":[[167,4]]},"89":{"position":[[543,4]]},"99":{"position":[[126,4]]},"136":{"position":[[79,4]]},"206":{"position":[[332,4]]},"341":{"position":[[24,4],[80,5]]},"384":{"position":[[857,4]]}}}],["bottleneck",{"_index":1554,"t":{"170":{"position":[[827,11]]}}}],["box",{"_index":473,"t":{"21":{"position":[[128,4]]},"89":{"position":[[478,3]]},"220":{"position":[[26,3]]},"224":{"position":[[140,3]]},"374":{"position":[[615,3]]},"378":{"position":[[332,3]]}}}],["break",{"_index":124,"t":{"5":{"position":[[751,8]]},"13":{"position":[[69,5]]},"33":{"position":[[316,8]]},"35":{"position":[[0,6]]},"40":{"position":[[90,6]]},"44":{"position":[[120,8]]},"48":{"position":[[7967,5]]},"150":{"position":[[1870,5]]}}}],["breakdown",{"_index":1500,"t":{"162":{"position":[[18,9]]}}}],["brew",{"_index":1978,"t":{"323":{"position":[[297,4],[386,4]]},"325":{"position":[[48,4],[291,5],[297,4],[354,4],[525,6]]}}}],["brief",{"_index":1409,"t":{"150":{"position":[[1624,5]]}}}],["bring",{"_index":1171,"t":{"89":{"position":[[1311,7]]}}}],["broad",{"_index":566,"t":{"25":{"position":[[291,5]]}}}],["brows",{"_index":1022,"t":{"83":{"position":[[262,7]]},"162":{"position":[[467,8],[575,8]]},"419":{"position":[[110,7]]}}}],["browse_websit",{"_index":2238,"t":{"398":{"position":[[687,14]]}}}],["browser",{"_index":1021,"t":{"83":{"position":[[235,7]]},"107":{"position":[[579,7]]},"176":{"position":[[182,7]]},"184":{"position":[[194,7]]},"200":{"position":[[667,7]]},"302":{"position":[[175,7]]},"307":{"position":[[101,7]]},"309":{"position":[[167,8]]},"329":{"position":[[75,7],[165,7]]},"419":{"position":[[83,7]]},"429":{"position":[[495,7]]}}}],["build",{"_index":467,"t":{"19":{"position":[[2167,6]]},"48":{"position":[[234,5],[1553,5],[3556,5]]},"56":{"position":[[197,5]]},"75":{"position":[[85,9],[746,5]]},"77":{"position":[[615,9]]},"85":{"position":[[1311,8]]},"107":{"position":[[250,5],[336,5]]},"200":{"position":[[338,5],[424,5]]},"239":{"position":[[3282,5]]},"374":{"position":[[576,5]]},"429":{"position":[[252,5]]},"433":{"position":[[2104,9]]},"435":{"position":[[163,5],[231,5]]}}}],["built",{"_index":931,"t":{"58":{"position":[[229,5]]},"77":{"position":[[156,5]]},"87":{"position":[[2099,6]]},"89":{"position":[[744,5]]},"164":{"position":[[379,6]]},"309":{"position":[[238,5]]},"439":{"position":[[330,5]]}}}],["bullshit",{"_index":1437,"t":{"150":{"position":[[2581,8]]}}}],["burn",{"_index":914,"t":{"52":{"position":[[190,7]]},"255":{"position":[[756,7]]},"257":{"position":[[639,7]]}}}],["busi",{"_index":463,"t":{"19":{"position":[[2074,8]]},"89":{"position":[[598,8]]},"255":{"position":[[1096,8]]}}}],["button",{"_index":1483,"t":{"158":{"position":[[360,7]]},"384":{"position":[[892,6]]}}}],["by=/usr/share/keyrings/dock",{"_index":1699,"t":{"239":{"position":[[662,29]]}}}],["ca",{"_index":1679,"t":{"239":{"position":[[367,2]]}}}],["call",{"_index":755,"t":{"48":{"position":[[292,4],[421,8],[733,7],[1071,8],[1258,5],[2216,4],[3088,4],[4115,5],[4196,4],[4861,4],[4991,4]]},"60":{"position":[[124,5]]},"75":{"position":[[319,8]]},"87":{"position":[[2176,6]]},"255":{"position":[[165,7]]},"331":{"position":[[615,7]]},"404":{"position":[[153,4]]}}}],["callback",{"_index":1947,"t":{"317":{"position":[[1209,8]]}}}],["came",{"_index":8,"t":{"3":{"position":[[88,4]]}}}],["campaign",{"_index":450,"t":{"19":{"position":[[1594,8]]}}}],["capabl",{"_index":472,"t":{"21":{"position":[[79,10]]},"33":{"position":[[576,12]]},"115":{"position":[[529,13]]},"119":{"position":[[38,12]]},"215":{"position":[[52,13],[392,13]]},"298":{"position":[[516,12]]}}}],["care",{"_index":849,"t":{"48":{"position":[[4160,4]]},"58":{"position":[[77,4]]},"87":{"position":[[1033,4]]},"439":{"position":[[426,4]]}}}],["carri",{"_index":114,"t":{"5":{"position":[[474,8]]}}}],["case",{"_index":7,"t":{"3":{"position":[[78,4]]},"19":{"position":[[2087,5]]},"48":{"position":[[4050,5]]},"77":{"position":[[409,4]]},"85":{"position":[[463,4]]},"89":{"position":[[624,6]]},"154":{"position":[[8,5]]},"170":{"position":[[543,5]]},"172":{"position":[[387,5]]},"204":{"position":[[520,5]]},"220":{"position":[[171,5]]},"323":{"position":[[252,4],[404,4]]},"325":{"position":[[3,4],[70,4]]},"327":{"position":[[80,6]]}}}],["casual",{"_index":1806,"t":{"257":{"position":[[856,9]]}}}],["catch",{"_index":868,"t":{"48":{"position":[[4969,5]]}}}],["caus",{"_index":143,"t":{"7":{"position":[[81,6]]},"87":{"position":[[427,5],[2951,5]]},"194":{"position":[[85,6]]}}}],["cd",{"_index":1284,"t":{"111":{"position":[[162,2]]},"431":{"position":[[0,2]]}}}],["ce",{"_index":1708,"t":{"239":{"position":[[932,2]]}}}],["certain",{"_index":1556,"t":{"170":{"position":[[861,7]]}}}],["certbot",{"_index":1733,"t":{"239":{"position":[[2544,7],[2631,7],[2720,7],[2790,7],[2956,7],[3026,8]]}}}],["certbot}serv",{"_index":1743,"t":{"239":{"position":[[2858,14]]}}}],["certif",{"_index":1680,"t":{"239":{"position":[[370,12]]}}}],["cfg",{"_index":2009,"t":{"331":{"position":[[309,3]]}}}],["chain",{"_index":456,"t":{"19":{"position":[[1892,5]]},"58":{"position":[[301,7]]},"218":{"position":[[192,7]]}}}],["challeng",{"_index":100,"t":{"5":{"position":[[312,10],[981,9]]},"7":{"position":[[12,9],[320,11]]},"11":{"position":[[92,9]]}}}],["chamber",{"_index":370,"t":{"17":{"position":[[784,8]]}}}],["chang",{"_index":385,"t":{"17":{"position":[[1018,6]]},"194":{"position":[[44,7],[103,8]]},"228":{"position":[[200,7]]},"239":{"position":[[1142,6]]},"253":{"position":[[448,6],[521,6],[593,6],[679,6],[788,6]]},"384":{"position":[[933,8]]},"423":{"position":[[3,6]]}}}],["charactertextsplitter(chunk_size=200",{"_index":1442,"t":{"150":{"position":[[2732,37]]}}}],["charactertextsplitterfrom",{"_index":1358,"t":{"150":{"position":[[76,25]]}}}],["chat",{"_index":2089,"t":{"353":{"position":[[210,4],[261,4],[316,4]]}}}],["chatgpt",{"_index":760,"t":{"48":{"position":[[542,7]]},"204":{"position":[[440,7]]}}}],["chatpdf",{"_index":336,"t":{"17":{"position":[[106,7]]}}}],["check",{"_index":643,"t":{"27":{"position":[[2590,5]]},"46":{"position":[[51,5],[103,5]]},"48":{"position":[[788,5]]},"56":{"position":[[136,5],[326,5]]},"58":{"position":[[488,5]]},"64":{"position":[[409,5]]},"70":{"position":[[0,5]]},"75":{"position":[[859,5]]},"85":{"position":[[3257,6]]},"87":{"position":[[3273,5]]},"99":{"position":[[418,5]]},"138":{"position":[[116,5]]},"146":{"position":[[85,5]]},"226":{"position":[[41,5]]},"228":{"position":[[263,5]]},"239":{"position":[[146,8]]},"253":{"position":[[158,5]]},"329":{"position":[[634,5]]},"400":{"position":[[187,5],[331,5],[482,5],[622,5],[754,5]]},"435":{"position":[[572,5]]},"439":{"position":[[596,5]]}}}],["check_google_api_key",{"_index":2251,"t":{"400":{"position":[[417,21]]}}}],["check_google_api_key(cfg",{"_index":2252,"t":{"400":{"position":[[443,25]]}}}],["check_openai_api_key",{"_index":2247,"t":{"400":{"position":[[122,21]]}}}],["check_openai_api_key(cfg",{"_index":2248,"t":{"400":{"position":[[148,25]]}}}],["check_searx_url",{"_index":2255,"t":{"400":{"position":[[699,16]]}}}],["check_searx_url(cfg",{"_index":2256,"t":{"400":{"position":[[720,20]]}}}],["check_serp_api_key",{"_index":2253,"t":{"400":{"position":[[561,19]]}}}],["check_serp_api_key(cfg",{"_index":2254,"t":{"400":{"position":[[585,23]]}}}],["check_tavily_api_key",{"_index":2249,"t":{"400":{"position":[[266,21]]}}}],["check_tavily_api_key(cfg",{"_index":2250,"t":{"400":{"position":[[292,25]]}}}],["checkmark",{"_index":1509,"t":{"162":{"position":[[1123,9]]}}}],["chees",{"_index":1229,"t":{"101":{"position":[[1154,6],[1320,6],[1608,8]]}}}],["chief",{"_index":1008,"t":{"81":{"position":[[48,5]]},"414":{"position":[[138,5]]}}}],["chiefeditor",{"_index":1135,"t":{"87":{"position":[[2186,11]]}}}],["chip",{"_index":1989,"t":{"325":{"position":[[168,4]]}}}],["choic",{"_index":1920,"t":{"313":{"position":[[365,6]]},"390":{"position":[[46,6]]}}}],["choos",{"_index":1163,"t":{"89":{"position":[[972,6]]},"121":{"position":[[159,6],[219,6]]},"302":{"position":[[8,6]]},"309":{"position":[[7,6]]},"313":{"position":[[501,6]]},"329":{"position":[[302,6]]},"341":{"position":[[65,6]]},"378":{"position":[[101,6],[215,6]]}}}],["chroma.from_documents(documents=split",{"_index":553,"t":{"23":{"position":[[1745,39]]}}}],["chromadef",{"_index":511,"t":{"23":{"position":[[557,9]]}}}],["chrome",{"_index":1902,"t":{"307":{"position":[[118,7]]},"309":{"position":[[180,7]]},"329":{"position":[[68,6],[117,6],[154,6],[285,6],[589,6],[718,6]]}}}],["chromedriv",{"_index":1909,"t":{"309":{"position":[[188,12]]},"329":{"position":[[36,12],[679,12]]}}}],["chronolog",{"_index":1553,"t":{"170":{"position":[[700,13]]}}}],["chunk",{"_index":540,"t":{"23":{"position":[[1457,6]]},"25":{"position":[[503,6],[673,8]]},"154":{"position":[[723,7]]},"398":{"position":[[710,5]]}}}],["chunk_overlap=200)split",{"_index":544,"t":{"23":{"position":[[1557,24]]}}}],["chunk_overlap=30",{"_index":1443,"t":{"150":{"position":[[2770,17]]}}}],["chunk_siz",{"_index":1330,"t":{"138":{"position":[[324,10]]}}}],["circul",{"_index":1056,"t":{"85":{"position":[[875,10]]}}}],["circular",{"_index":1117,"t":{"87":{"position":[[1196,8]]}}}],["claim",{"_index":1431,"t":{"150":{"position":[[2352,8]]}}}],["class",{"_index":657,"t":{"33":{"position":[[19,5],[275,5],[556,5]]},"38":{"position":[[19,5]]},"40":{"position":[[19,5]]},"42":{"position":[[42,5]]},"44":{"position":[[19,5]]},"68":{"position":[[597,5]]},"85":{"position":[[506,5]]},"87":{"position":[[896,5]]},"95":{"position":[[241,5]]},"97":{"position":[[416,6]]},"257":{"position":[[234,5]]},"374":{"position":[[153,5]]},"398":{"position":[[0,5],[53,5],[177,5]]},"400":{"position":[[0,5]]},"404":{"position":[[0,5],[96,6]]},"406":{"position":[[0,5],[78,5],[120,6]]},"433":{"position":[[721,5]]}}}],["clean",{"_index":1586,"t":{"182":{"position":[[425,5]]}}}],["clear",{"_index":1946,"t":{"317":{"position":[[1203,5]]}}}],["cli",{"_index":593,"t":{"27":{"position":[[449,3]]},"190":{"position":[[31,3]]}}}],["cli.pi",{"_index":1599,"t":{"190":{"position":[[46,6]]},"194":{"position":[[59,6],[207,6],[359,6]]}}}],["click",{"_index":1354,"t":{"146":{"position":[[119,5]]},"158":{"position":[[331,8]]},"249":{"position":[[198,5]]},"307":{"position":[[356,9]]},"311":{"position":[[261,8]]},"329":{"position":[[439,5]]},"384":{"position":[[882,5]]},"439":{"position":[[252,5]]}}}],["client",{"_index":878,"t":{"48":{"position":[[5478,7]]},"317":{"position":[[286,7],[315,6]]}}}],["client.beta.assistants.cr",{"_index":797,"t":{"48":{"position":[[2296,30],[7278,30]]}}}],["client.beta.threads.create()print(f\"thread",{"_index":899,"t":{"48":{"position":[[7813,43]]}}}],["client.beta.threads.create()user_input",{"_index":813,"t":{"48":{"position":[[2855,38]]}}}],["client.beta.threads.messages.cr",{"_index":815,"t":{"48":{"position":[[2920,36],[8002,36]]}}}],["client.beta.threads.messages.list(thread_id=thread_id",{"_index":891,"t":{"48":{"position":[[7120,54]]}}}],["client.beta.threads.runs.cr",{"_index":819,"t":{"48":{"position":[[3121,32],[8116,32]]}}}],["client.beta.threads.runs.retrieve(thread_id=thread_id",{"_index":841,"t":{"48":{"position":[[3782,54],[6267,54]]}}}],["client.beta.threads.runs.submit_tool_output",{"_index":862,"t":{"48":{"position":[[4680,45],[6910,45]]}}}],["client_max_body_s",{"_index":1722,"t":{"239":{"position":[[1507,20],[2045,20]]}}}],["clilanggraph",{"_index":2278,"t":{"425":{"position":[[22,12]]}}}],["climat",{"_index":1607,"t":{"194":{"position":[[36,7],[95,7]]}}}],["clinic",{"_index":411,"t":{"19":{"position":[[491,8]]}}}],["clone",{"_index":1256,"t":{"107":{"position":[[33,5],[89,6]]},"188":{"position":[[0,5],[26,5]]},"200":{"position":[[176,7],[237,6]]},"220":{"position":[[78,5],[358,5],[384,5]]},"226":{"position":[[172,5],[198,5]]},"239":{"position":[[3219,5]]},"429":{"position":[[33,5],[89,6]]}}}],["close",{"_index":1251,"t":{"105":{"position":[[481,6]]},"317":{"position":[[1340,9]]},"427":{"position":[[477,6]]}}}],["cloud",{"_index":1249,"t":{"105":{"position":[[456,5]]},"427":{"position":[[452,5]]}}}],["code",{"_index":756,"t":{"48":{"position":[[379,4],[1029,4],[5372,5],[8717,6]]},"68":{"position":[[603,4]]},"83":{"position":[[1417,4]]},"85":{"position":[[3293,4]]},"218":{"position":[[101,5],[270,6]]},"226":{"position":[[66,4],[313,4]]},"243":{"position":[[29,4]]},"255":{"position":[[1076,4]]},"257":{"position":[[35,4]]},"331":{"position":[[38,4]]},"353":{"position":[[87,5]]},"384":{"position":[[753,5]]},"433":{"position":[[73,4]]}}}],["codebas",{"_index":1824,"t":{"261":{"position":[[434,8]]}}}],["cohere_api_key=[your",{"_index":2118,"t":{"361":{"position":[[0,20]]}}}],["cohes",{"_index":668,"t":{"33":{"position":[[432,9]]}}}],["collabor",{"_index":946,"t":{"64":{"position":[[396,12]]},"89":{"position":[[820,13]]},"222":{"position":[[6,12]]},"435":{"position":[[541,13]]}}}],["collect",{"_index":565,"t":{"25":{"position":[[253,12]]},"83":{"position":[[100,10]]},"152":{"position":[[457,10]]},"170":{"position":[[754,10],[1020,9],[1283,9]]},"172":{"position":[[974,9],[1137,10]]},"416":{"position":[[77,10]]}}}],["collection_name='som",{"_index":1462,"t":{"152":{"position":[[435,21]]}}}],["collection_name=collection_nam",{"_index":1223,"t":{"101":{"position":[[667,32]]}}}],["combin",{"_index":348,"t":{"17":{"position":[[287,7],[1110,8]]},"19":{"position":[[3,9],[730,11],[866,7],[1902,7]]},"21":{"position":[[709,9]]},"33":{"position":[[403,9]]},"40":{"position":[[310,8]]},"70":{"position":[[70,7]]},"99":{"position":[[8,7]]},"119":{"position":[[19,7]]},"136":{"position":[[56,8],[300,8]]},"150":{"position":[[2314,7]]},"170":{"position":[[504,8]]}}}],["come",{"_index":991,"t":{"77":{"position":[[138,5]]},"105":{"position":[[169,5],[520,6]]},"427":{"position":[[165,5],[516,6]]}}}],["comma",{"_index":2192,"t":{"388":{"position":[[353,7]]}}}],["command",{"_index":1574,"t":{"180":{"position":[[208,7],[684,8]]},"182":{"position":[[211,8],[718,8]]},"184":{"position":[[105,8]]},"236":{"position":[[105,8]]},"239":{"position":[[3057,9]]},"398":{"position":[[702,7]]}}}],["comment",{"_index":911,"t":{"48":{"position":[[8853,7]]},"89":{"position":[[1484,7]]},"107":{"position":[[169,7]]},"384":{"position":[[843,7]]},"429":{"position":[[169,7]]}}}],["commit",{"_index":1767,"t":{"249":{"position":[[483,10]]}}}],["common",{"_index":1657,"t":{"230":{"position":[[4,6]]},"239":{"position":[[408,6]]}}}],["commun",{"_index":576,"t":{"25":{"position":[[820,10]]},"27":{"position":[[2134,9]]},"38":{"position":[[337,13]]},"46":{"position":[[166,9]]},"64":{"position":[[335,10]]},"87":{"position":[[1109,11]]},"89":{"position":[[1404,10]]},"388":{"position":[[475,10]]}}}],["compani",{"_index":406,"t":{"19":{"position":[[395,7],[1160,7]]},"150":{"position":[[802,7],[1854,7],[2168,8],[2512,8]]}}}],["company'",{"_index":449,"t":{"19":{"position":[[1579,9]]}}}],["compar",{"_index":623,"t":{"27":{"position":[[1595,7],[1916,7]]},"132":{"position":[[448,7]]},"134":{"position":[[477,7]]}}}],["comparison",{"_index":1323,"t":{"136":{"position":[[207,11]]}}}],["compat",{"_index":1656,"t":{"228":{"position":[[291,13]]},"329":{"position":[[106,10],[358,10]]}}}],["competit",{"_index":651,"t":{"29":{"position":[[578,11]]}}}],["competitor",{"_index":374,"t":{"17":{"position":[[837,10]]},"19":{"position":[[1287,10],[1942,10]]},"27":{"position":[[1996,10]]}}}],["compil",{"_index":1019,"t":{"81":{"position":[[601,9]]},"83":{"position":[[1165,8]]},"162":{"position":[[3704,7]]},"414":{"position":[[655,9]]},"419":{"position":[[587,8]]}}}],["complement",{"_index":1301,"t":{"115":{"position":[[483,13]]}}}],["complement_source_url",{"_index":1180,"t":{"93":{"position":[[402,22]]}}}],["complement_source_urls=fals",{"_index":1185,"t":{"93":{"position":[[729,29]]}}}],["complet",{"_index":53,"t":{"3":{"position":[[657,9]]},"5":{"position":[[113,10],[737,10],[837,10],[938,10]]},"48":{"position":[[3912,13],[4067,9],[6397,13],[8244,8]]},"162":{"position":[[9,8],[1972,8],[2050,8],[2553,9],[3149,8],[3866,9]]},"206":{"position":[[378,8],[510,9]]},"220":{"position":[[6,8]]},"255":{"position":[[1175,8]]},"257":{"position":[[2068,10]]},"313":{"position":[[449,12]]},"423":{"position":[[797,9]]}}}],["completedef",{"_index":836,"t":{"48":{"position":[[3694,11],[6179,11]]}}}],["complex",{"_index":660,"t":{"33":{"position":[[150,7]]},"35":{"position":[[12,7]]},"44":{"position":[[101,7]]},"140":{"position":[[86,10]]},"170":{"position":[[187,7]]},"198":{"position":[[45,10]]},"222":{"position":[[111,7]]},"224":{"position":[[157,10]]},"255":{"position":[[1194,7]]},"307":{"position":[[387,8]]}}}],["compon",{"_index":108,"t":{"5":{"position":[[382,11]]},"21":{"position":[[580,9]]},"33":{"position":[[75,9]]}}}],["compos",{"_index":1258,"t":{"107":{"position":[[156,7],[237,7],[323,7],[419,7]]},"200":{"position":[[325,7],[411,7],[507,7]]},"236":{"position":[[75,8]]},"239":{"position":[[3269,7]]},"247":{"position":[[7,7]]},"374":{"position":[[562,7]]},"429":{"position":[[156,7],[239,7],[335,7]]}}}],["comprehens",{"_index":35,"t":{"3":{"position":[[387,13],[1065,13]]},"11":{"position":[[116,13]]},"15":{"position":[[164,13]]},"29":{"position":[[160,14]]},"33":{"position":[[125,13]]},"35":{"position":[[109,13]]},"42":{"position":[[1023,13]]},"119":{"position":[[91,14]]},"136":{"position":[[21,13]]},"140":{"position":[[184,13]]},"162":{"position":[[90,13]]},"215":{"position":[[369,13]]},"222":{"position":[[123,13]]},"298":{"position":[[438,13]]}}}],["compress",{"_index":1399,"t":{"150":{"position":[[1380,8]]}}}],["comput",{"_index":1392,"t":{"150":{"position":[[1247,8]]}}}],["con",{"_index":1635,"t":{"218":{"position":[[250,5]]},"220":{"position":[[233,5]]},"222":{"position":[[248,5]]}}}],["concept",{"_index":401,"t":{"19":{"position":[[310,8]]}}}],["concern",{"_index":1005,"t":{"79":{"position":[[247,9]]},"146":{"position":[[10,9]]}}}],["conclud",{"_index":128,"t":{"5":{"position":[[858,9]]},"11":{"position":[[221,9]]}}}],["conclus",{"_index":15,"t":{"3":{"position":[[151,11]]},"15":{"position":[[868,12]]},"83":{"position":[[1229,10]]},"85":{"position":[[709,11]]},"150":{"position":[[3101,15]]},"162":{"position":[[4180,10],[4245,10],[4307,10],[4388,10]]},"204":{"position":[[18,11],[548,11],[656,11]]},"211":{"position":[[206,11]]},"419":{"position":[[651,10]]}}}],["conclusion_written",{"_index":1535,"t":{"162":{"position":[[4273,19]]}}}],["conclusionconclus",{"_index":1881,"t":{"296":{"position":[[215,20]]}}}],["condit",{"_index":1109,"t":{"87":{"position":[[438,10],[1205,9],[1286,11],[1916,11]]}}}],["conduc",{"_index":1594,"t":{"182":{"position":[[1187,9]]}}}],["conduct",{"_index":34,"t":{"3":{"position":[[379,7]]},"17":{"position":[[469,7],[1081,7],[1177,7]]},"21":{"position":[[93,7],[290,8],[684,7]]},"25":{"position":[[803,9]]},"27":{"position":[[721,7]]},"29":{"position":[[147,7]]},"33":{"position":[[361,10]]},"35":{"position":[[53,8]]},"40":{"position":[[35,10],[151,8]]},"52":{"position":[[370,7]]},"79":{"position":[[433,7]]},"81":{"position":[[295,8]]},"85":{"position":[[1721,7]]},"93":{"position":[[129,7],[285,7]]},"95":{"position":[[72,10]]},"97":{"position":[[492,7]]},"99":{"position":[[37,7]]},"150":{"position":[[3292,7]]},"152":{"position":[[827,7]]},"154":{"position":[[685,7]]},"257":{"position":[[1217,7]]},"296":{"position":[[6,10],[74,7]]},"412":{"position":[[251,7]]},"414":{"position":[[349,8]]},"423":{"position":[[606,7]]}}}],["confer",{"_index":1846,"t":{"268":{"position":[[24,11]]}}}],["config",{"_index":1717,"t":{"239":{"position":[[1432,6]]},"257":{"position":[[903,6]]},"331":{"position":[[315,8]]},"398":{"position":[[170,6]]},"433":{"position":[[495,6],[509,6],[518,8],[620,7],[799,6]]}}}],["config(metaclass=singleton",{"_index":2224,"t":{"398":{"position":[[6,27]]}}}],["config.pi",{"_index":2246,"t":{"400":{"position":[[81,9],[225,9],[376,9],[520,9],[658,9],[787,9]]}}}],["config_path",{"_index":686,"t":{"38":{"position":[[211,12]]},"257":{"position":[[872,11]]}}}],["config_path=\"path/to/config.yaml",{"_index":719,"t":{"42":{"position":[[473,34]]}}}],["config_path=config_path",{"_index":1809,"t":{"257":{"position":[[1122,24]]}}}],["config_path=non",{"_index":918,"t":{"52":{"position":[[350,17]]},"85":{"position":[[1701,17]]}}}],["configfrom",{"_index":2004,"t":{"331":{"position":[[169,10]]},"433":{"position":[[243,10]]}}}],["configur",{"_index":599,"t":{"27":{"position":[[604,14]]},"38":{"position":[[236,13]]},"180":{"position":[[62,14]]},"188":{"position":[[292,15]]},"249":{"position":[[389,10]]},"253":{"position":[[85,13],[223,13],[304,14]]},"347":{"position":[[30,9]]},"398":{"position":[[39,13]]},"433":{"position":[[574,13]]}}}],["conflict",{"_index":1339,"t":{"140":{"position":[[405,11],[632,9]]},"182":{"position":[[487,9],[969,9]]},"329":{"position":[[605,10]]}}}],["connect",{"_index":923,"t":{"56":{"position":[[66,7]]},"85":{"position":[[3197,7]]},"239":{"position":[[1661,10],[1924,10],[2199,10],[2462,10]]},"317":{"position":[[182,11],[837,10],[1329,10],[2111,13]]},"382":{"position":[[544,10],[1016,10]]}}}],["connection=connection_str",{"_index":1463,"t":{"152":{"position":[[475,29]]}}}],["connection=engin",{"_index":1224,"t":{"101":{"position":[[700,18]]}}}],["consensu",{"_index":337,"t":{"17":{"position":[[118,10]]}}}],["consid",{"_index":1044,"t":{"85":{"position":[[392,11]]},"152":{"position":[[611,10]]},"204":{"position":[[468,8]]}}}],["consist",{"_index":106,"t":{"5":{"position":[[366,8]]},"81":{"position":[[18,8]]},"85":{"position":[[3055,8]]},"182":{"position":[[339,10]]}}}],["consol",{"_index":2277,"t":{"423":{"position":[[1018,8]]}}}],["console.error('websocket",{"_index":1951,"t":{"317":{"position":[[1398,24]]}}}],["console.log('messag",{"_index":1966,"t":{"317":{"position":[[1985,20],[2079,20]]}}}],["console.log('receiv",{"_index":1948,"t":{"317":{"position":[[1239,21]]}}}],["console.log('respons",{"_index":1972,"t":{"317":{"position":[[2448,24]]}}}],["console.log('websocket",{"_index":1936,"t":{"317":{"position":[[814,22],[935,22],[1306,22]]}}}],["conspiraci",{"_index":1816,"t":{"257":{"position":[[1763,10],[1895,10]]}}}],["const",{"_index":1925,"t":{"317":{"position":[[561,5],[693,5],[724,5],[898,5],[1612,5],[1762,5],[2243,5],[2324,5],[2396,5]]}}}],["constantli",{"_index":48,"t":{"3":{"position":[[592,10]]},"60":{"position":[[98,10]]},"64":{"position":[[6,10]]},"435":{"position":[[14,10]]}}}],["consum",{"_index":1641,"t":{"222":{"position":[[278,9]]},"283":{"position":[[31,8]]}}}],["contact",{"_index":947,"t":{"64":{"position":[[450,7]]}}}],["contain",{"_index":1459,"t":{"152":{"position":[[256,8]]},"158":{"position":[[33,8],[169,8]]},"160":{"position":[[276,10],[533,8],[986,7]]},"162":{"position":[[829,7],[1170,8],[1874,10]]},"170":{"position":[[1132,8]]},"172":{"position":[[113,8],[307,7],[1006,7],[1080,7]]},"239":{"position":[[293,14]]},"243":{"position":[[16,8],[145,9]]},"423":{"position":[[112,8]]}}}],["content",{"_index":160,"t":{"7":{"position":[[386,7],[745,8],[795,7],[923,7],[1070,7]]},"15":{"position":[[538,7]]},"33":{"position":[[214,7],[658,8]]},"35":{"position":[[158,9],[226,7]]},"40":{"position":[[246,7],[357,9]]},"44":{"position":[[223,7],[339,7]]},"62":{"position":[[449,7]]},"85":{"position":[[858,8]]},"160":{"position":[[653,8]]},"162":{"position":[[46,7],[1433,7],[1589,7],[2119,7],[2191,7],[3556,7],[3624,7],[4006,7],[4091,7]]},"170":{"position":[[61,8],[464,7],[746,7],[1030,8]]},"172":{"position":[[31,8],[238,7],[655,7],[815,7]]},"204":{"position":[[499,7]]},"255":{"position":[[932,7],[972,8]]},"257":{"position":[[1632,10]]},"281":{"position":[[108,8]]},"287":{"position":[[55,8]]},"298":{"position":[[165,8]]},"305":{"position":[[133,7],[164,7],[361,7],[399,7]]},"307":{"position":[[195,7],[303,7]]},"311":{"position":[[67,7],[199,7],[283,7]]},"313":{"position":[[241,8]]},"331":{"position":[[424,10]]},"382":{"position":[[603,10]]},"394":{"position":[[164,8],[239,8]]}}}],["content=user_input",{"_index":818,"t":{"48":{"position":[[2991,20],[8073,19]]}}}],["content_found",{"_index":1562,"t":{"172":{"position":[[171,14]]}}}],["content_s",{"_index":1563,"t":{"172":{"position":[[223,12]]}}}],["context",{"_index":55,"t":{"3":{"position":[[710,7]]},"11":{"position":[[335,7]]},"17":{"position":[[567,8]]},"19":{"position":[[124,8],[716,8],[1400,7]]},"29":{"position":[[175,7],[334,8]]},"48":{"position":[[2198,9]]},"62":{"position":[[380,7]]},"85":{"position":[[321,7]]},"119":{"position":[[106,7]]},"140":{"position":[[521,7]]},"154":{"position":[[707,7],[824,7]]},"162":{"position":[[2274,7],[2377,7],[3978,7],[4063,7]]},"170":{"position":[[525,7]]},"172":{"position":[[325,7],[1115,7]]},"206":{"position":[[366,8]]},"211":{"position":[[340,7]]},"255":{"position":[[900,7]]},"263":{"position":[[667,8]]},"281":{"position":[[0,7]]},"298":{"position":[[25,7]]}}}],["contextcontext",{"_index":1887,"t":{"298":{"position":[[93,14]]}}}],["contextu",{"_index":351,"t":{"17":{"position":[[346,10]]}}}],["continu",{"_index":232,"t":{"9":{"position":[[901,8]]},"15":{"position":[[85,9]]},"48":{"position":[[8346,8]]},"439":{"position":[[239,12]]}}}],["contribut",{"_index":737,"t":{"46":{"position":[[0,10],[29,14],[61,12]]},"394":{"position":[[388,10]]},"435":{"position":[[558,13],[586,12]]}}}],["control",{"_index":995,"t":{"77":{"position":[[266,15]]},"89":{"position":[[382,7]]},"182":{"position":[[1164,10]]},"239":{"position":[[59,7]]}}}],["convers",{"_index":779,"t":{"48":{"position":[[1117,13],[1368,12],[7877,12]]},"435":{"position":[[454,14]]}}}],["coordin",{"_index":1012,"t":{"81":{"position":[[147,11]]},"414":{"position":[[237,11]]}}}],["copi",{"_index":228,"t":{"9":{"position":[[801,4]]},"11":{"position":[[966,4]]},"23":{"position":[[2026,4]]},"27":{"position":[[208,4],[544,4],[1801,4]]},"42":{"position":[[927,4]]},"48":{"position":[[2100,4],[2741,4],[3012,4],[3203,4],[3967,4],[4795,4],[5207,4],[8610,4]]},"52":{"position":[[562,4]]},"68":{"position":[[321,4]]},"70":{"position":[[113,4]]},"85":{"position":[[756,4],[1194,4],[1867,4],[2977,4]]},"87":{"position":[[991,4],[1895,4],[2842,4]]},"93":{"position":[[1255,4]]},"95":{"position":[[812,4]]},"97":{"position":[[354,4],[1037,4]]},"101":{"position":[[1752,4]]},"107":{"position":[[256,4],[342,4]]},"109":{"position":[[170,4],[220,4]]},"111":{"position":[[172,4],[229,4],[287,4],[330,4]]},"123":{"position":[[27,4]]},"125":{"position":[[140,4],[325,4]]},"132":{"position":[[654,4]]},"134":{"position":[[777,4]]},"150":{"position":[[3405,4]]},"152":{"position":[[940,4]]},"154":{"position":[[989,4]]},"176":{"position":[[64,4],[133,4]]},"180":{"position":[[267,4],[396,4],[517,4],[735,4]]},"182":{"position":[[630,4],[1248,4]]},"184":{"position":[[150,4]]},"188":{"position":[[100,4],[172,4]]},"190":{"position":[[91,4]]},"194":{"position":[[142,4],[299,4],[442,4]]},"200":{"position":[[344,4],[430,4]]},"218":{"position":[[376,4]]},"239":{"position":[[1409,4],[1980,4],[3035,4],[3288,4]]},"247":{"position":[[60,4]]},"253":{"position":[[987,4]]},"255":{"position":[[828,4]]},"257":{"position":[[1411,4],[1955,4]]},"261":{"position":[[195,4],[336,4],[390,4]]},"263":{"position":[[932,4]]},"266":{"position":[[94,4]]},"268":{"position":[[76,4]]},"270":{"position":[[96,4]]},"273":{"position":[[725,4]]},"275":{"position":[[78,4],[835,4],[865,4],[985,4]]},"279":{"position":[[119,4]]},"281":{"position":[[170,4]]},"283":{"position":[[109,4]]},"285":{"position":[[113,4]]},"287":{"position":[[129,4]]},"289":{"position":[[85,4]]},"291":{"position":[[126,4]]},"294":{"position":[[297,4]]},"296":{"position":[[460,4]]},"298":{"position":[[428,4]]},"302":{"position":[[148,4],[219,4]]},"309":{"position":[[118,4]]},"317":{"position":[[2184,4],[2485,4]]},"331":{"position":[[677,4]]},"335":{"position":[[218,4]]},"337":{"position":[[352,4],[610,4]]},"339":{"position":[[690,4]]},"341":{"position":[[300,4]]},"347":{"position":[[266,4]]},"349":{"position":[[269,4]]},"351":{"position":[[270,4]]},"353":{"position":[[377,4]]},"355":{"position":[[383,4]]},"357":{"position":[[284,4]]},"359":{"position":[[190,4]]},"361":{"position":[[160,4]]},"363":{"position":[[351,4]]},"365":{"position":[[229,4]]},"367":{"position":[[79,4]]},"370":{"position":[[40,4]]},"372":{"position":[[59,4]]},"374":{"position":[[514,4]]},"380":{"position":[[292,4]]},"382":{"position":[[854,4]]},"384":{"position":[[561,4],[838,4]]},"388":{"position":[[283,4],[456,4]]},"392":{"position":[[97,4]]},"394":{"position":[[262,4]]},"398":{"position":[[34,4],[150,4],[246,4],[346,4],[449,4],[555,4],[674,4],[797,4],[888,4]]},"400":{"position":[[29,4],[182,4],[326,4],[477,4],[617,4],[749,4]]},"404":{"position":[[35,4],[148,4]]},"406":{"position":[[54,4]]},"421":{"position":[[59,4],[182,4],[223,4]]},"423":{"position":[[1435,4]]},"425":{"position":[[38,4]]},"429":{"position":[[258,4]]},"431":{"position":[[88,4]]},"433":{"position":[[1668,4],[2185,4]]}}}],["core",{"_index":400,"t":{"19":{"position":[[305,4]]}}}],["corn",{"_index":1394,"t":{"150":{"position":[[1282,4]]}}}],["coroutin",{"_index":216,"t":{"9":{"position":[[587,9]]}}}],["corpor",{"_index":1420,"t":{"150":{"position":[[1930,9],[2438,9],[2571,9]]}}}],["correct",{"_index":577,"t":{"25":{"position":[[877,11]]},"27":{"position":[[2222,11]]},"81":{"position":[[435,11]]},"83":{"position":[[973,11]]},"89":{"position":[[360,12]]},"182":{"position":[[1107,7]]},"313":{"position":[[48,7]]},"414":{"position":[[489,11]]},"419":{"position":[[421,11]]}}}],["correctli",{"_index":1324,"t":{"138":{"position":[[41,9]]},"198":{"position":[[211,10]]},"249":{"position":[[400,10]]},"331":{"position":[[117,10]]},"394":{"position":[[33,10]]}}}],["correspond",{"_index":1868,"t":{"281":{"position":[[94,13]]},"329":{"position":[[452,13]]},"349":{"position":[[80,13]]},"351":{"position":[[47,13]]},"353":{"position":[[105,13]]}}}],["corrupt",{"_index":1327,"t":{"138":{"position":[[185,10]]}}}],["cost",{"_index":936,"t":{"60":{"position":[[37,5],[140,5]]},"206":{"position":[[420,5],[524,5]]},"263":{"position":[[676,6],[794,8]]},"283":{"position":[[0,5]]},"291":{"position":[[17,5],[72,5]]}}}],["coupl",{"_index":2085,"t":{"353":{"position":[[71,6]]}}}],["crawler",{"_index":286,"t":{"13":{"position":[[269,7]]},"206":{"position":[[754,7]]}}}],["creat",{"_index":28,"t":{"3":{"position":[[290,7],[997,7]]},"5":{"position":[[556,6]]},"7":{"position":[[1405,6]]},"9":{"position":[[85,6],[561,6]]},"17":{"position":[[755,8]]},"23":{"position":[[1627,6]]},"25":{"position":[[155,7]]},"27":{"position":[[907,7]]},"33":{"position":[[195,8]]},"40":{"position":[[401,6]]},"42":{"position":[[965,6]]},"48":{"position":[[911,6],[1080,6],[2137,6],[2265,6],[7247,6],[7789,6],[7975,6],[8097,6]]},"77":{"position":[[48,8],[112,6],[197,8],[303,8],[476,6]]},"85":{"position":[[1900,7],[2016,8],[2997,8]]},"87":{"position":[[518,6],[1185,6]]},"97":{"position":[[376,6]]},"128":{"position":[[0,6]]},"150":{"position":[[3117,6]]},"152":{"position":[[534,6],[651,6]]},"154":{"position":[[527,6]]},"162":{"position":[[651,7],[2263,8],[2412,8],[4023,8],[4108,8]]},"180":{"position":[[77,6]]},"182":{"position":[[137,6]]},"188":{"position":[[212,6]]},"194":{"position":[[147,6]]},"204":{"position":[[619,6]]},"206":{"position":[[285,7],[556,6]]},"249":{"position":[[135,6]]},"261":{"position":[[223,6]]},"337":{"position":[[0,6]]},"339":{"position":[[96,6]]},"382":{"position":[[351,6]]},"433":{"position":[[663,6]]}}}],["create_chat_complet",{"_index":2010,"t":{"331":{"position":[[344,23]]}}}],["create_chat_completionimport",{"_index":2006,"t":{"331":{"position":[[212,28]]}}}],["create_engine(connection_str",{"_index":1218,"t":{"101":{"position":[[526,32]]}}}],["create_engineimport",{"_index":1212,"t":{"101":{"position":[[338,19]]}}}],["creation",{"_index":1450,"t":{"150":{"position":[[3037,9]]}}}],["creator",{"_index":735,"t":{"44":{"position":[[347,9]]}}}],["criteria",{"_index":153,"t":{"7":{"position":[[274,9]]},"81":{"position":[[486,9]]},"414":{"position":[[540,9]]},"419":{"position":[[461,8]]}}}],["crucial",{"_index":150,"t":{"7":{"position":[[234,7]]},"17":{"position":[[812,7]]},"23":{"position":[[116,7]]},"83":{"position":[[351,7]]},"329":{"position":[[544,7]]},"439":{"position":[[63,7]]}}}],["cs",{"_index":1702,"t":{"239":{"position":[[769,3]]}}}],["csv",{"_index":763,"t":{"48":{"position":[[610,3]]},"68":{"position":[[144,4]]},"97":{"position":[[164,4]]}}}],["curl",{"_index":1681,"t":{"239":{"position":[[383,4]]},"275":{"position":[[886,4]]}}}],["current",{"_index":146,"t":{"7":{"position":[[144,9]]},"11":{"position":[[257,9]]},"19":{"position":[[1636,7]]},"27":{"position":[[1973,7]]},"48":{"position":[[338,9]]},"64":{"position":[[71,9]]},"68":{"position":[[89,9]]},"75":{"position":[[204,7],[713,7]]},"97":{"position":[[109,9]]},"105":{"position":[[467,10]]},"140":{"position":[[267,10]]},"204":{"position":[[132,7],[277,7]]},"329":{"position":[[570,7]]},"427":{"position":[[463,10]]},"433":{"position":[[566,7],[1416,7]]}}}],["current_subtopic=\"subtop",{"_index":1890,"t":{"298":{"position":[[293,26]]}}}],["custom",{"_index":444,"t":{"19":{"position":[[1266,8],[1714,10]]},"29":{"position":[[413,10]]},"48":{"position":[[958,6],[8644,10]]},"77":{"position":[[312,6],[373,10],[493,10]]},"87":{"position":[[2346,10]]},"220":{"position":[[278,6]]},"222":{"position":[[185,10]]},"224":{"position":[[98,13]]},"257":{"position":[[214,6],[477,6],[957,6],[1520,9]]},"294":{"position":[[8,9]]},"335":{"position":[[10,6]]},"337":{"position":[[54,6],[104,6],[177,6],[234,6],[361,6],[419,6],[492,6],[553,6]]},"374":{"position":[[233,6]]},"378":{"position":[[89,6]]},"382":{"position":[[13,6],[60,6],[1037,6]]},"384":{"position":[[59,6],[128,6]]},"390":{"position":[[21,6],[97,6],[374,6]]},"394":{"position":[[8,6]]},"423":{"position":[[33,9]]}}}],["custom:{your",{"_index":2033,"t":{"337":{"position":[[383,13]]}}}],["custom_logs_handl",{"_index":1807,"t":{"257":{"position":[[974,19]]}}}],["custom_report",{"_index":1194,"t":{"95":{"position":[[255,15],[596,15]]},"192":{"position":[[276,13]]}}}],["customiz",{"_index":935,"t":{"58":{"position":[[395,12]]},"79":{"position":[[257,16]]},"115":{"position":[[265,12]]}}}],["customlogshandl",{"_index":1796,"t":{"257":{"position":[[190,18],[996,19],[1484,17]]}}}],["cycl",{"_index":1134,"t":{"87":{"position":[[2022,5],[2433,8]]},"423":{"position":[[1069,8]]}}}],["cyclic",{"_index":990,"t":{"77":{"position":[[119,8]]}}}],["dash",{"_index":1260,"t":{"107":{"position":[[310,5]]},"200":{"position":[[398,5]]}}}],["data",{"_index":363,"t":{"17":{"position":[[643,5],[714,4]]},"19":{"position":[[506,4],[899,4],[1247,4],[1603,4],[1817,5],[1920,4]]},"21":{"position":[[464,4]]},"29":{"position":[[56,4],[506,4]]},"48":{"position":[[581,4]]},"64":{"position":[[164,4]]},"83":{"position":[[95,4],[478,4]]},"85":{"position":[[408,4],[870,4],[951,4]]},"87":{"position":[[482,4]]},"89":{"position":[[562,4]]},"136":{"position":[[241,4]]},"140":{"position":[[128,4],[664,4],[846,5]]},"154":{"position":[[53,4]]},"158":{"position":[[154,5],[164,4]]},"160":{"position":[[527,5],[939,4]]},"170":{"position":[[289,4],[447,4]]},"172":{"position":[[744,4]]},"257":{"position":[[255,8],[326,4],[357,5],[401,4],[453,4],[489,8],[1420,4]]},"305":{"position":[[190,4]]},"307":{"position":[[229,4]]},"313":{"position":[[469,4]]},"317":{"position":[[904,4],[958,4],[975,6],[1261,7],[1269,6],[1618,4]]},"416":{"position":[[72,4]]}}}],["data.cont",{"_index":1940,"t":{"317":{"position":[[985,13]]}}}],["data.csv",{"_index":538,"t":{"23":{"position":[[1410,13]]}}}],["data.output.rubber_ducker_thought",{"_index":1942,"t":{"317":{"position":[[1024,34]]}}}],["data.output.tech_lead_review",{"_index":1944,"t":{"317":{"position":[[1075,28]]}}}],["databas",{"_index":549,"t":{"23":{"position":[[1672,8]]},"25":{"position":[[474,9]]}}}],["dataset",{"_index":147,"t":{"7":{"position":[[165,8]]}}}],["date",{"_index":144,"t":{"7":{"position":[[117,4]]},"19":{"position":[[657,4]]},"83":{"position":[[412,4]]},"85":{"position":[[658,5]]},"150":{"position":[[559,5]]}}}],["day",{"_index":296,"t":{"15":{"position":[[208,3],[215,3]]}}}],["ddthh:mm:ss.ffffff",{"_index":1486,"t":{"160":{"position":[[50,18]]}}}],["deactiv",{"_index":1578,"t":{"180":{"position":[[404,10],[458,12],[506,10]]}}}],["deal",{"_index":495,"t":{"23":{"position":[[129,7]]},"48":{"position":[[3489,7]]}}}],["dearmor",{"_index":1689,"t":{"239":{"position":[[520,7]]}}}],["deb",{"_index":1696,"t":{"239":{"position":[[615,4]]}}}],["debug",{"_index":1356,"t":{"146":{"position":[[175,10]]},"170":{"position":[[152,6],[644,10]]},"172":{"position":[[703,9]]},"398":{"position":[[901,5]]}}}],["decis",{"_index":381,"t":{"17":{"position":[[985,10]]},"19":{"position":[[786,8],[1000,10]]},"27":{"position":[[2404,9]]},"29":{"position":[[75,8],[518,10]]}}}],["dedic",{"_index":1592,"t":{"182":{"position":[[832,9]]}}}],["deeper",{"_index":477,"t":{"21":{"position":[[195,6]]}}}],["def",{"_index":612,"t":{"27":{"position":[[1252,3]]},"42":{"position":[[202,3],[780,3]]},"52":{"position":[[60,3]]},"85":{"position":[[1514,3],[1545,3],[2086,3]]},"87":{"position":[[1311,3]]},"93":{"position":[[575,3]]},"95":{"position":[[344,3]]},"97":{"position":[[596,3]]},"101":{"position":[[781,3]]},"132":{"position":[[106,3]]},"134":{"position":[[106,3]]},"255":{"position":[[274,3],[512,3]]},"257":{"position":[[264,3],[337,3],[538,3]]},"263":{"position":[[60,3]]},"273":{"position":[[135,3]]},"275":{"position":[[243,3]]},"331":{"position":[[297,3]]},"382":{"position":[[628,3]]},"398":{"position":[[127,3],[203,3],[302,3],[404,3],[509,3],[622,3],[754,3],[848,3]]},"400":{"position":[[144,3],[288,3],[439,3],[581,3],[716,3]]},"404":{"position":[[113,3]]},"433":{"position":[[445,3],[743,3]]}}}],["default",{"_index":1181,"t":{"93":{"position":[[434,7]]},"107":{"position":[[359,8]]},"200":{"position":[[447,8]]},"234":{"position":[[4,7]]},"302":{"position":[[262,7]]},"307":{"position":[[129,8]]},"388":{"position":[[15,8],[548,7]]},"429":{"position":[[275,8]]}}}],["default.pi",{"_index":1314,"t":{"125":{"position":[[398,10]]}}}],["defin",{"_index":774,"t":{"48":{"position":[[945,8],[1714,6]]},"85":{"position":[[147,6],[474,6],[2288,6]]},"87":{"position":[[737,6],[855,6],[1903,8],[2999,7],[3048,7]]},"257":{"position":[[551,6]]},"433":{"position":[[1149,6]]}}}],["degre",{"_index":994,"t":{"77":{"position":[[256,6]]}}}],["delet",{"_index":1244,"t":{"105":{"position":[[261,8]]},"427":{"position":[[257,8]]}}}],["deliv",{"_index":2047,"t":{"343":{"position":[[75,7]]}}}],["demo",{"_index":927,"t":{"56":{"position":[[336,5]]},"109":{"position":[[257,5]]},"111":{"position":[[440,5]]},"209":{"position":[[60,4]]}}}],["demonstr",{"_index":579,"t":{"27":{"position":[[77,11]]},"42":{"position":[[945,12]]},"48":{"position":[[636,11]]},"257":{"position":[[504,14]]}}}],["dep",{"_index":1289,"t":{"111":{"position":[[282,4]]}}}],["depend",{"_index":922,"t":{"56":{"position":[[10,7]]},"111":{"position":[[242,13]]},"176":{"position":[[17,12]]},"180":{"position":[[534,12],[620,12]]},"182":{"position":[[24,12],[105,12],[295,12],[462,13],[557,10],[929,12],[1127,12]]},"188":{"position":[[126,13]]},"198":{"position":[[28,9]]},"215":{"position":[[444,9]]}}}],["deploy",{"_index":926,"t":{"56":{"position":[[207,6]]},"75":{"position":[[108,9]]},"113":{"position":[[42,11]]},"253":{"position":[[607,10],[706,10],[815,10]]},"339":{"position":[[103,11],[341,6],[539,10]]},"378":{"position":[[6,9]]},"380":{"position":[[7,6]]},"384":{"position":[[41,6],[116,9],[170,6]]}}}],["deploymentazure_openai_api_key=\"[your",{"_index":1775,"t":{"253":{"position":[[475,37]]}}}],["depsnpm",{"_index":2282,"t":{"431":{"position":[[72,7]]}}}],["depth",{"_index":261,"t":{"11":{"position":[[711,6]]},"33":{"position":[[375,5]]},"35":{"position":[[65,5]]},"44":{"position":[[67,6]]},"79":{"position":[[79,5]]},"81":{"position":[[307,5]]},"83":{"position":[[772,5],[913,5]]},"192":{"position":[[219,5]]},"412":{"position":[[74,5]]},"414":{"position":[[361,5]]},"419":{"position":[[344,5]]}}}],["descript",{"_index":804,"t":{"48":{"position":[[2466,14],[2609,14],[7448,14],[7591,14]]},"158":{"position":[[443,11]]},"170":{"position":[[234,11]]}}}],["descriptor",{"_index":1493,"t":{"160":{"position":[[664,10]]}}}],["design",{"_index":335,"t":{"17":{"position":[[65,8]]},"33":{"position":[[104,8]]},"64":{"position":[[131,6]]},"85":{"position":[[384,7]]},"115":{"position":[[350,7]]},"343":{"position":[[63,8]]},"433":{"position":[[1188,7],[1818,6],[1910,7],[2055,6],[2151,6]]}}}],["desir",{"_index":722,"t":{"42":{"position":[[603,7]]},"329":{"position":[[422,7]]}}}],["desktop",{"_index":1613,"t":{"200":{"position":[[50,7],[120,8]]}}}],["detail",{"_index":254,"t":{"11":{"position":[[402,8],[595,8]]},"21":{"position":[[24,8]]},"33":{"position":[[442,8]]},"40":{"position":[[418,8]]},"44":{"position":[[376,9]]},"95":{"position":[[675,8]]},"111":{"position":[[418,8]]},"136":{"position":[[188,8]]},"158":{"position":[[470,8]]},"160":{"position":[[794,8]]},"162":{"position":[[2328,8]]},"168":{"position":[[41,9]]},"172":{"position":[[409,8],[463,7]]},"192":{"position":[[205,8]]},"194":{"position":[[156,8]]},"204":{"position":[[359,8]]},"211":{"position":[[87,8]]},"215":{"position":[[278,8]]},"220":{"position":[[182,8],[570,8]]},"222":{"position":[[175,9]]},"289":{"position":[[41,8]]},"423":{"position":[[997,8]]}}}],["detailed_report",{"_index":711,"t":{"42":{"position":[[245,15]]},"192":{"position":[[188,16]]},"194":{"position":[[283,15]]}}}],["detailed_report.run",{"_index":724,"t":{"42":{"position":[[678,21]]}}}],["detailedreport",{"_index":656,"t":{"33":{"position":[[4,14]]},"38":{"position":[[4,14]]},"40":{"position":[[4,14]]},"42":{"position":[[27,14],[263,15],[974,14]]},"44":{"position":[[4,14]]}}}],["detailedreportasync",{"_index":709,"t":{"42":{"position":[[182,19]]}}}],["detergent?th",{"_index":1397,"t":{"150":{"position":[[1302,13]]}}}],["determin",{"_index":1585,"t":{"182":{"position":[[272,9]]},"204":{"position":[[634,11]]}}}],["determinist",{"_index":85,"t":{"5":{"position":[[58,13],[629,17],[783,13]]},"7":{"position":[[1417,14]]},"89":{"position":[[394,13]]}}}],["dev",{"_index":1290,"t":{"111":{"position":[[326,3]]},"323":{"position":[[477,3]]},"431":{"position":[[84,3]]}}}],["dev/nul",{"_index":1705,"t":{"239":{"position":[[830,12]]}}}],["dev_team",{"_index":1957,"t":{"317":{"position":[[1655,11]]}}}],["dev_team_result",{"_index":1941,"t":{"317":{"position":[[1003,17]]}}}],["devday",{"_index":748,"t":{"48":{"position":[[47,6]]}}}],["develop",{"_index":408,"t":{"19":{"position":[[426,11]]},"48":{"position":[[220,10]]},"77":{"position":[[233,10],[541,9]]},"79":{"position":[[286,11]]},"85":{"position":[[136,10],[1296,11]]},"111":{"position":[[298,11]]},"150":{"position":[[1168,10]]},"158":{"position":[[372,11]]},"168":{"position":[[144,11]]},"170":{"position":[[553,11],[914,10],[1097,10],[1193,9]]},"172":{"position":[[397,11],[435,10],[594,10]]},"182":{"position":[[363,11],[852,11],[1210,11]]},"224":{"position":[[193,10]]},"239":{"position":[[239,11]]},"266":{"position":[[16,12]]},"374":{"position":[[207,9]]},"435":{"position":[[277,10]]}}}],["devic",{"_index":1299,"t":{"115":{"position":[[392,8]]}}}],["devis",{"_index":109,"t":{"5":{"position":[[401,8]]}}}],["dhparams.pem",{"_index":1742,"t":{"239":{"position":[[2831,13]]}}}],["diagram",{"_index":2272,"t":{"419":{"position":[[47,8]]}}}],["dict",{"_index":1049,"t":{"85":{"position":[[544,4],[653,4]]},"87":{"position":[[931,4],[954,4],[1359,6]]},"257":{"position":[[121,5]]},"273":{"position":[[183,5]]}}}],["dict[str",{"_index":1217,"t":{"101":{"position":[[500,9]]},"257":{"position":[[363,9]]}}}],["dictfrom",{"_index":1206,"t":{"101":{"position":[[174,8]]}}}],["differ",{"_index":461,"t":{"19":{"position":[[2021,9]]},"23":{"position":[[74,9]]},"140":{"position":[[496,11]]},"162":{"position":[[120,9]]},"170":{"position":[[1043,11]]},"172":{"position":[[617,9],[834,11]]},"398":{"position":[[91,9]]}}}],["digitalocean",{"_index":1661,"t":{"234":{"position":[[37,12]]}}}],["direct",{"_index":1133,"t":{"87":{"position":[[1951,6]]},"95":{"position":[[135,9]]}}}],["directori",{"_index":604,"t":{"27":{"position":[[897,9],[1106,9]]},"105":{"position":[[39,10]]},"111":{"position":[[151,10]]},"128":{"position":[[9,9],[126,10]]},"196":{"position":[[69,10]]},"423":{"position":[[91,10],[559,10]]},"427":{"position":[[35,10]]}}}],["disabl",{"_index":2184,"t":{"384":{"position":[[566,7]]}}}],["discord",{"_index":744,"t":{"46":{"position":[[158,7]]},"89":{"position":[[1396,7]]}}}],["discrep",{"_index":1342,"t":{"140":{"position":[[540,13]]}}}],["discuss",{"_index":1116,"t":{"87":{"position":[[1054,10]]},"317":{"position":[[25,7]]}}}],["display",{"_index":1239,"t":{"105":{"position":[[102,7]]},"115":{"position":[[213,8]]},"305":{"position":[[441,7]]},"427":{"position":[[98,7]]},"433":{"position":[[130,7]]}}}],["disrupt",{"_index":292,"t":{"15":{"position":[[67,11],[242,7]]},"17":{"position":[[77,7]]},"89":{"position":[[1226,10]]}}}],["dive",{"_index":468,"t":{"21":{"position":[[10,4]]},"83":{"position":[[1399,4]]},"85":{"position":[[3423,4]]}}}],["divers",{"_index":496,"t":{"23":{"position":[[142,7]]}}}],["divid",{"_index":110,"t":{"5":{"position":[[420,6]]},"85":{"position":[[789,7]]}}}],["do",{"_index":999,"t":{"77":{"position":[[566,5]]},"160":{"position":[[695,5]]},"162":{"position":[[587,5]]}}}],["doc",{"_index":562,"t":{"23":{"position":[[1980,3]]},"27":{"position":[[892,4],[1101,4]]},"68":{"position":[[315,5]]},"97":{"position":[[348,5]]},"99":{"position":[[340,3]]},"128":{"position":[[28,4]]},"226":{"position":[[57,4]]},"347":{"position":[[303,3]]}}}],["doc_path",{"_index":953,"t":{"68":{"position":[[227,8]]},"97":{"position":[[247,8]]},"423":{"position":[[673,8]]}}}],["doc_path=\"./mi",{"_index":955,"t":{"68":{"position":[[300,14]]},"97":{"position":[[333,14]]}}}],["docker",{"_index":1255,"t":{"107":{"position":[[17,6],[149,6],[222,7],[230,6],[316,6],[412,6]]},"200":{"position":[[0,7],[43,6],[310,7],[318,6],[404,6],[500,6]]},"236":{"position":[[60,7],[68,6]]},"239":{"position":[[204,9],[214,6],[925,6],[948,6],[990,9],[1033,6],[1053,6],[1090,6],[3262,6]]},"243":{"position":[[138,6]]},"247":{"position":[[0,6]]},"374":{"position":[[555,6]]},"429":{"position":[[17,6],[149,6],[222,7],[232,6],[328,6]]}}}],["docker:sudo",{"_index":1706,"t":{"239":{"position":[[886,11]]}}}],["docker’",{"_index":1683,"t":{"239":{"position":[[425,8]]}}}],["docsretriever=googlegoogle_api_key=google_cx_key",{"_index":2144,"t":{"374":{"position":[[464,49]]}}}],["document",{"_index":340,"t":{"17":{"position":[[163,10],[314,8],[515,10]]},"19":{"position":[[139,9],[687,9],[1419,9]]},"21":{"position":[[355,10],[524,9],[610,8],[764,8]]},"23":{"position":[[32,8],[156,10],[601,9],[1275,10],[1434,9]]},"25":{"position":[[46,10],[688,9]]},"27":{"position":[[765,13],[1081,9],[1156,9],[2077,9],[2604,13],[2661,9]]},"56":{"position":[[161,14],[298,14]]},"58":{"position":[[502,13]]},"68":{"position":[[78,10],[187,10],[270,9],[406,10]]},"70":{"position":[[84,9]]},"97":{"position":[[57,9],[98,10],[207,10],[290,9],[525,10],[893,11]]},"99":{"position":[[153,10],[359,9],[443,14]]},"101":{"position":[[71,8],[846,10],[1173,11],[1300,9],[1544,9],[1592,9]]},"105":{"position":[[296,9]]},"119":{"position":[[62,8]]},"128":{"position":[[82,9]]},"130":{"position":[[34,8]]},"136":{"position":[[111,10]]},"138":{"position":[[91,8],[138,9],[221,9],[342,8]]},"140":{"position":[[741,9]]},"150":{"position":[[229,9]]},"152":{"position":[[278,10]]},"154":{"position":[[62,9]]},"218":{"position":[[451,13]]},"226":{"position":[[328,13]]},"228":{"position":[[273,13]]},"230":{"position":[[72,14]]},"253":{"position":[[178,13]]},"255":{"position":[[1081,14]]},"298":{"position":[[452,13]]},"339":{"position":[[13,13]]},"390":{"position":[[183,9]]},"425":{"position":[[59,13]]},"427":{"position":[[292,9]]},"439":{"position":[[610,13]]}}}],["document(page_content=essay)]text_splitt",{"_index":1441,"t":{"150":{"position":[[2686,43]]}}}],["document_url",{"_index":1319,"t":{"134":{"position":[[554,13]]}}}],["document_urls=document_url",{"_index":1318,"t":{"134":{"position":[[253,28],[704,28]]}}}],["documentfrom",{"_index":1205,"t":{"101":{"position":[[141,12]]}}}],["documents.extend(loader.load",{"_index":531,"t":{"23":{"position":[[1236,31]]}}}],["documents=docu",{"_index":1227,"t":{"101":{"position":[[975,20],[1716,21]]}}}],["documentslocal_doc",{"_index":535,"t":{"23":{"position":[[1322,19]]}}}],["docx",{"_index":1029,"t":{"83":{"position":[[1366,5]]},"87":{"position":[[2513,7],[3235,5]]},"128":{"position":[[105,6]]},"130":{"position":[[117,6]]},"412":{"position":[[401,4]]},"419":{"position":[[788,5]]},"423":{"position":[[1168,7]]}}}],["doesn't",{"_index":605,"t":{"27":{"position":[[924,7]]},"107":{"position":[[269,7]]},"200":{"position":[[357,7]]},"305":{"position":[[254,7]]},"329":{"position":[[91,7]]}}}],["doesn’t",{"_index":828,"t":{"48":{"position":[[3316,7]]}}}],["domain",{"_index":1624,"t":{"206":{"position":[[565,6]]},"374":{"position":[[13,6],[700,6]]}}}],["don't",{"_index":1259,"t":{"107":{"position":[[199,5]]},"150":{"position":[[909,5]]},"311":{"position":[[120,5]]},"325":{"position":[[202,5]]},"429":{"position":[[199,5]]}}}],["done",{"_index":231,"t":{"9":{"position":[[895,5]]},"48":{"position":[[11,4]]},"85":{"position":[[1966,4]]},"87":{"position":[[718,4]]},"89":{"position":[[659,4]]},"150":{"position":[[2008,4]]}}}],["dotenv",{"_index":2007,"t":{"331":{"position":[[253,6]]},"433":{"position":[[177,6]]}}}],["down",{"_index":280,"t":{"13":{"position":[[75,4]]},"33":{"position":[[325,4]]},"35":{"position":[[7,4]]},"40":{"position":[[97,4]]},"44":{"position":[[129,4]]},"85":{"position":[[1032,4]]},"150":{"position":[[2602,4]]},"329":{"position":[[244,4]]}}}],["downgrad",{"_index":1997,"t":{"329":{"position":[[139,9],[659,9]]}}}],["download",{"_index":1152,"t":{"87":{"position":[[3244,8]]},"158":{"position":[[344,9]]},"309":{"position":[[123,8],[251,8]]},"329":{"position":[[474,8]]},"378":{"position":[[78,8],[225,8]]},"380":{"position":[[345,10]]},"382":{"position":[[954,10]]}}}],["draft",{"_index":697,"t":{"40":{"position":[[187,5]]},"83":{"position":[[817,6],[992,5],[1093,5]]},"87":{"position":[[842,6],[877,5],[947,6],[1798,6],[2053,6]]},"162":{"position":[[3219,5],[3298,5],[3354,5],[3437,5]]},"296":{"position":[[351,5]]},"298":{"position":[[183,5]]},"419":{"position":[[389,6],[440,5],[515,5]]}}}],["draft['review",{"_index":1132,"t":{"87":{"position":[[1817,15]]}}}],["draft_section_titles=[\"titl",{"_index":1891,"t":{"298":{"position":[[327,28]]}}}],["draft_sections_gener",{"_index":1529,"t":{"162":{"position":[[3314,25]]}}}],["draftstat",{"_index":1115,"t":{"87":{"position":[[1011,11]]}}}],["draftstate(typeddict",{"_index":1113,"t":{"87":{"position":[[902,22]]}}}],["drag",{"_index":644,"t":{"27":{"position":[[2643,4]]},"105":{"position":[[216,4]]},"150":{"position":[[2096,4]]},"427":{"position":[[212,4]]}}}],["draw",{"_index":431,"t":{"19":{"position":[[1028,7]]}}}],["drive",{"_index":978,"t":{"75":{"position":[[456,5]]}}}],["driven",{"_index":359,"t":{"17":{"position":[[530,6],[673,6]]},"29":{"position":[[511,6]]}}}],["driver",{"_index":1996,"t":{"329":{"position":[[124,6],[725,6]]}}}],["drop",{"_index":645,"t":{"27":{"position":[[2652,4]]},"48":{"position":[[8846,4]]},"105":{"position":[[223,4]]},"427":{"position":[[219,4]]}}}],["dropdown",{"_index":960,"t":{"68":{"position":[[442,8]]}}}],["droplet",{"_index":1660,"t":{"234":{"position":[[19,7]]}}}],["drug",{"_index":407,"t":{"19":{"position":[[421,4]]},"150":{"position":[[1238,5]]}}}],["duckduckgo",{"_index":2205,"t":{"388":{"position":[[745,10]]}}}],["durat",{"_index":1332,"t":{"140":{"position":[[57,8]]}}}],["dure",{"_index":57,"t":{"3":{"position":[[727,6]]},"140":{"position":[[694,6]]},"152":{"position":[[627,6]]},"158":{"position":[[73,6]]},"160":{"position":[[222,6],[309,6]]},"162":{"position":[[1751,6]]},"283":{"position":[[40,6]]},"285":{"position":[[33,6]]}}}],["dynam",{"_index":655,"t":{"29":{"position":[[651,7]]},"85":{"position":[[281,7]]},"89":{"position":[[900,11]]},"302":{"position":[[166,8]]},"305":{"position":[[353,7]]},"307":{"position":[[57,7],[187,7],[284,11]]},"311":{"position":[[170,9]]},"313":{"position":[[283,7],[391,7]]}}}],["e",{"_index":2020,"t":{"331":{"position":[[595,2],[628,6]]},"382":{"position":[[780,2],[798,6]]}}}],["e.g",{"_index":1492,"t":{"160":{"position":[[637,6],[701,6]]},"170":{"position":[[214,6]]},"390":{"position":[[478,6]]}}}],["each",{"_index":204,"t":{"9":{"position":[[208,4]]},"13":{"position":[[235,4],[361,4]]},"15":{"position":[[327,4]]},"25":{"position":[[428,4]]},"33":{"position":[[393,5]]},"35":{"position":[[83,4]]},"40":{"position":[[132,4]]},"48":{"position":[[3502,4]]},"83":{"position":[[697,4]]},"85":{"position":[[222,4],[912,4],[1320,4],[1984,4],[2394,4]]},"87":{"position":[[152,4],[640,4],[1129,4],[2641,5]]},"152":{"position":[[634,4]]},"158":{"position":[[102,4]]},"160":{"position":[[193,4],[335,4]]},"164":{"position":[[478,4]]},"170":{"position":[[27,4]]},"172":{"position":[[663,4]]},"178":{"position":[[45,5]]},"206":{"position":[[179,4],[432,4],[720,4],[846,4]]},"226":{"position":[[20,4]]},"339":{"position":[[119,4]]},"341":{"position":[[72,4]]},"388":{"position":[[185,4],[381,4]]},"419":{"position":[[269,4]]},"423":{"position":[[287,4]]},"433":{"position":[[1748,4]]}}}],["earn",{"_index":1406,"t":{"150":{"position":[[1582,4]]}}}],["eas",{"_index":1646,"t":{"224":{"position":[[62,4]]}}}],["easi",{"_index":580,"t":{"27":{"position":[[93,4]]},"115":{"position":[[222,4]]},"211":{"position":[[234,4]]},"218":{"position":[[113,4]]},"261":{"position":[[13,4]]}}}],["easier",{"_index":753,"t":{"48":{"position":[[209,6]]},"87":{"position":[[2336,6]]}}}],["easili",{"_index":600,"t":{"27":{"position":[[641,6],[2632,6]]},"170":{"position":[[928,6]]},"255":{"position":[[90,6]]}}}],["echo",{"_index":369,"t":{"17":{"position":[[779,4]]}}}],["econom",{"_index":459,"t":{"19":{"position":[[1965,8]]},"150":{"position":[[1644,8]]}}}],["edg",{"_index":1103,"t":{"85":{"position":[[3209,5]]},"87":{"position":[[1298,6],[1574,5],[1928,6]]},"150":{"position":[[990,4]]}}}],["edit",{"_index":1749,"t":{"239":{"position":[[3096,4]]},"423":{"position":[[55,4]]}}}],["editor",{"_index":1009,"t":{"81":{"position":[[54,6],[340,6]]},"83":{"position":[[510,6],[593,6]]},"414":{"position":[[144,6],[394,6]]},"419":{"position":[[186,6]]}}}],["editor_ag",{"_index":1075,"t":{"85":{"position":[[2136,12]]}}}],["editor_agent.plan_research",{"_index":1086,"t":{"85":{"position":[[2500,27]]}}}],["editor_agent.run_parallel_research",{"_index":1088,"t":{"85":{"position":[[2560,35]]}}}],["editoragent(self.task",{"_index":1076,"t":{"85":{"position":[[2151,22]]}}}],["educ",{"_index":1644,"t":{"222":{"position":[[376,11]]}}}],["education\"report_typ",{"_index":1848,"t":{"270":{"position":[[55,21]]}}}],["effect.step",{"_index":1714,"t":{"239":{"position":[[1157,11]]}}}],["effici",{"_index":541,"t":{"23":{"position":[[1473,9]]},"58":{"position":[[358,9]]},"115":{"position":[[454,9]]},"182":{"position":[[1200,9]]}}}],["effort",{"_index":1158,"t":{"89":{"position":[[644,7]]}}}],["elestio",{"_index":2156,"t":{"380":{"position":[[365,7]]},"384":{"position":[[0,7],[153,8],[203,7],[285,8],[574,7]]}}}],["elif",{"_index":516,"t":{"23":{"position":[[710,4],[774,4],[849,4],[927,4],[1006,4],[1089,4]]},"48":{"position":[[8355,4]]}}}],["elimin",{"_index":122,"t":{"5":{"position":[[702,10]]},"150":{"position":[[2080,11]]}}}],["elishakay/gpt",{"_index":1959,"t":{"317":{"position":[[1732,14]]}}}],["email",{"_index":1790,"t":{"255":{"position":[[981,5]]}}}],["emb",{"_index":2044,"t":{"341":{"position":[[288,5]]},"351":{"position":[[263,6]]},"353":{"position":[[360,5]]},"363":{"position":[[334,5]]},"365":{"position":[[212,5]]},"370":{"position":[[23,5]]}}}],["embed",{"_index":546,"t":{"23":{"position":[[1634,10]]},"58":{"position":[[309,11]]},"101":{"position":[[559,10]]},"152":{"position":[[303,10]]},"253":{"position":[[572,9],[626,9]]},"335":{"position":[[199,9]]},"337":{"position":[[368,10],[397,11],[560,9]]},"339":{"position":[[228,9],[309,9]]},"341":{"position":[[45,11]]},"349":{"position":[[307,9]]},"357":{"position":[[269,9]]},"359":{"position":[[175,9]]}}}],["embedding=\"custom:your_embed",{"_index":2034,"t":{"337":{"position":[[576,33]]}}}],["embedding=\"nomic:nom",{"_index":2138,"t":{"370":{"position":[[0,22]]}}}],["embedding=embed",{"_index":554,"t":{"23":{"position":[[1785,22]]},"101":{"position":[[645,21]]}}}],["embedding=openaiembed",{"_index":1461,"t":{"152":{"position":[[405,29]]}}}],["embeddingembedding=\"openai:text",{"_index":2027,"t":{"335":{"position":[[167,31]]}}}],["emerg",{"_index":624,"t":{"27":{"position":[[1606,8],[1927,8]]},"132":{"position":[[459,8]]},"134":{"position":[[488,8]]}}}],["emoji",{"_index":1497,"t":{"160":{"position":[[851,9]]},"162":{"position":[[1133,5]]},"170":{"position":[[1223,6]]},"172":{"position":[[1035,7]]}}}],["employe",{"_index":1421,"t":{"150":{"position":[[1940,9]]}}}],["empti",{"_index":1313,"t":{"125":{"position":[[379,5]]}}}],["enabl",{"_index":389,"t":{"17":{"position":[[1161,8]]},"29":{"position":[[472,6]]},"48":{"position":[[1011,6]]},"105":{"position":[[89,6]]},"182":{"position":[[527,8]]},"204":{"position":[[413,6]]},"239":{"position":[[1285,6],[1339,6]]},"380":{"position":[[53,6]]},"384":{"position":[[249,6]]},"427":{"position":[[85,6]]}}}],["encapsul",{"_index":1039,"t":{"85":{"position":[[172,12]]},"182":{"position":[[946,13]]}}}],["encount",{"_index":1915,"t":{"313":{"position":[[115,9]]}}}],["end",{"_index":42,"t":{"3":{"position":[[527,6]]},"11":{"position":[[850,3]]},"17":{"position":[[1042,3]]},"27":{"position":[[2524,3]]},"48":{"position":[[2076,3],[5943,3]]},"85":{"position":[[2879,3],[2956,4]]},"87":{"position":[[1868,4],[2034,3]]},"170":{"position":[[311,3]]},"215":{"position":[[430,3]]},"224":{"position":[[20,3],[27,3],[204,3]]},"226":{"position":[[148,3],[155,3]]},"228":{"position":[[160,3],[167,3]]},"321":{"position":[[112,3]]}}}],["endpoint",{"_index":1353,"t":{"146":{"position":[[67,9]]},"253":{"position":[[257,10]]},"339":{"position":[[382,9]]},"390":{"position":[[354,8]]},"394":{"position":[[66,8]]},"425":{"position":[[116,10]]}}}],["endpoint}.openai.azure.com/openai_api_version=2024",{"_index":2038,"t":{"339":{"position":[[459,50]]}}}],["energi",{"_index":1609,"t":{"194":{"position":[[344,7],[377,6]]},"266":{"position":[[42,6]]}}}],["engin",{"_index":568,"t":{"25":{"position":[[383,6]]},"27":{"position":[[331,7]]},"58":{"position":[[283,12]]},"64":{"position":[[191,7]]},"75":{"position":[[377,14]]},"101":{"position":[[517,6]]},"253":{"position":[[920,6]]},"388":{"position":[[51,6],[123,7],[197,6],[530,8]]},"390":{"position":[[143,6]]},"439":{"position":[[133,7]]}}}],["english",{"_index":2122,"t":{"361":{"position":[[146,7]]},"423":{"position":[[1406,8]]}}}],["enhanc",{"_index":417,"t":{"19":{"position":[[614,8]]},"29":{"position":[[343,8],[540,9]]},"89":{"position":[[228,7]]},"111":{"position":[[28,8]]},"115":{"position":[[13,8]]},"255":{"position":[[849,7]]}}}],["enjoy",{"_index":1266,"t":{"107":{"position":[[591,5]]},"176":{"position":[[194,5]]},"200":{"position":[[679,5]]},"429":{"position":[[507,5]]}}}],["enough",{"_index":187,"t":{"7":{"position":[[1136,6],[1284,6]]},"19":{"position":[[2132,6]]},"77":{"position":[[576,6]]}}}],["ensur",{"_index":445,"t":{"19":{"position":[[1308,8]]},"62":{"position":[[18,6],[333,6]]},"89":{"position":[[352,7]]},"121":{"position":[[18,6]]},"138":{"position":[[16,6]]},"182":{"position":[[328,8],[904,7],[1090,7]]},"228":{"position":[[54,6]]},"261":{"position":[[55,6]]},"309":{"position":[[269,6]]},"313":{"position":[[28,6]]},"339":{"position":[[248,6]]},"404":{"position":[[64,8]]},"406":{"position":[[88,8]]}}}],["enter",{"_index":1590,"t":{"182":{"position":[[736,6]]},"378":{"position":[[45,5]]}}}],["enterpris",{"_index":2213,"t":{"390":{"position":[[216,10]]}}}],["entir",{"_index":111,"t":{"5":{"position":[[431,6]]},"85":{"position":[[189,6]]},"220":{"position":[[322,6]]}}}],["entrepreneur",{"_index":1451,"t":{"150":{"position":[[3080,13]]}}}],["entri",{"_index":1544,"t":{"170":{"position":[[54,6]]},"257":{"position":[[2033,6]]}}}],["enum",{"_index":689,"t":{"38":{"position":[[296,5]]}}}],["env",{"_index":952,"t":{"68":{"position":[[214,3]]},"97":{"position":[[234,3]]},"107":{"position":[[122,6]]},"180":{"position":[[181,4],[263,3],[595,3]]},"188":{"position":[[221,4]]},"198":{"position":[[176,4]]},"200":{"position":[[272,6]]},"239":{"position":[[3241,5]]},"261":{"position":[[232,4]]},"339":{"position":[[208,4]]},"349":{"position":[[94,3]]},"351":{"position":[[61,3]]},"353":{"position":[[119,3]]},"355":{"position":[[133,3]]},"357":{"position":[[76,3]]},"374":{"position":[[348,4]]},"378":{"position":[[386,4]]},"380":{"position":[[32,4]]},"384":{"position":[[229,4]]},"388":{"position":[[159,3],[563,4],[592,4],[626,4],[662,4],[694,4],[724,4],[758,4],[792,4],[819,4],[854,4]]},"390":{"position":[[88,3],[280,4],[320,3]]},"421":{"position":[[71,3]]},"423":{"position":[[682,3]]},"429":{"position":[[122,6]]},"433":{"position":[[417,4]]}}}],["env.exampl",{"_index":1257,"t":{"107":{"position":[[43,14]]},"200":{"position":[[188,14]]},"239":{"position":[[3225,12]]},"429":{"position":[[43,14]]}}}],["env\\scripts\\activ",{"_index":1577,"t":{"180":{"position":[[373,22]]}}}],["environ",{"_index":585,"t":{"27":{"position":[[236,12],[419,11]]},"105":{"position":[[352,11]]},"125":{"position":[[24,11],[338,11]]},"180":{"position":[[25,11],[94,11],[138,11],[296,12],[427,12],[561,12],[599,12]]},"182":{"position":[[49,11],[154,11],[375,12],[400,11],[656,11],[779,11],[892,11],[1175,11]]},"184":{"position":[[50,11]]},"188":{"position":[[189,11]]},"218":{"position":[[85,11]]},"249":{"position":[[148,11],[221,11],[239,11]]},"253":{"position":[[122,11]]},"261":{"position":[[200,11]]},"302":{"position":[[69,11]]},"331":{"position":[[84,11]]},"341":{"position":[[126,11]]},"345":{"position":[[201,11]]},"374":{"position":[[319,11]]},"400":{"position":[[100,11],[244,11],[395,11],[539,11],[677,11],[806,11]]},"427":{"position":[[348,11]]},"433":{"position":[[390,11]]}}}],["eras",{"_index":1143,"t":{"87":{"position":[[2724,5]]}}}],["error",{"_index":1326,"t":{"138":{"position":[[108,7]]},"170":{"position":[[171,5]]},"317":{"position":[[1385,7],[1423,8],[1432,7]]}}}],["errors:sudo",{"_index":1753,"t":{"239":{"position":[[3182,11]]}}}],["especi",{"_index":165,"t":{"7":{"position":[[428,10]]},"150":{"position":[[1541,10]]}}}],["essay",{"_index":1365,"t":{"150":{"position":[[318,5],[2951,5]]}}}],["essenti",{"_index":1593,"t":{"182":{"position":[[1037,9]]}}}],["establish",{"_index":398,"t":{"19":{"position":[[247,11]]},"180":{"position":[[0,12]]},"182":{"position":[[0,12]]},"317":{"position":[[848,14]]}}}],["etc",{"_index":934,"t":{"58":{"position":[[321,5]]},"83":{"position":[[1382,4]]},"128":{"position":[[112,5]]},"130":{"position":[[124,5]]},"170":{"position":[[765,4]]},"255":{"position":[[1011,4]]},"257":{"position":[[793,4],[866,5]]},"307":{"position":[[366,5]]},"419":{"position":[[804,4]]}}}],["etc/apt/sources.list.d/docker.list",{"_index":1704,"t":{"239":{"position":[[792,35]]}}}],["etc/letsencrypt/live/name.example/fullchain.pem",{"_index":1735,"t":{"239":{"position":[[2568,49]]}}}],["etc/letsencrypt/live/name.example/privkey.pem",{"_index":1737,"t":{"239":{"position":[[2659,47]]}}}],["etc/letsencrypt/opt",{"_index":1738,"t":{"239":{"position":[[2736,24]]}}}],["etc/letsencrypt/ssl",{"_index":1741,"t":{"239":{"position":[[2810,20]]}}}],["etc/nginx/conf.d/.htpasswd",{"_index":2190,"t":{"384":{"position":[[809,28]]}}}],["etc/nginx/nginx.conf",{"_index":1748,"t":{"239":{"position":[[3071,24]]}}}],["evalu",{"_index":436,"t":{"19":{"position":[[1168,10]]},"25":{"position":[[791,11]]},"27":{"position":[[2144,11]]}}}],["even",{"_index":247,"t":{"11":{"position":[[198,4]]},"15":{"position":[[727,4]]},"48":{"position":[[8819,4]]},"75":{"position":[[502,4]]},"150":{"position":[[1876,5]]}}}],["event",{"_index":805,"t":{"48":{"position":[[2508,6],[7490,6]]},"158":{"position":[[52,6],[107,5],[213,6]]},"160":{"position":[[177,6],[207,5],[251,7],[302,6],[340,5],[420,5],[510,7],[573,6],[631,5],[959,6]]},"168":{"position":[[213,6]]},"239":{"position":[[1445,6]]},"317":{"position":[[885,7]]}}}],["eventu",{"_index":308,"t":{"15":{"position":[[485,10],[752,10]]}}}],["everyon",{"_index":982,"t":{"75":{"position":[[598,8]]}}}],["evolv",{"_index":968,"t":{"75":{"position":[[141,7],[293,7]]},"85":{"position":[[312,8]]}}}],["exa",{"_index":2208,"t":{"388":{"position":[[813,3]]}}}],["exact",{"_index":152,"t":{"7":{"position":[[264,5]]},"164":{"position":[[99,5],[563,5]]},"253":{"position":[[217,5]]}}}],["exactli",{"_index":1539,"t":{"164":{"position":[[295,7]]}}}],["exampl",{"_index":229,"t":{"9":{"position":[[813,7]]},"19":{"position":[[369,8],[803,8],[1144,8],[1525,8],[1874,8],[2061,8]]},"23":{"position":[[1808,7]]},"27":{"position":[[1862,8]]},"42":{"position":[[937,7]]},"48":{"position":[[1536,8],[2654,8],[7636,8]]},"56":{"position":[[346,8]]},"79":{"position":[[370,7],[503,7]]},"85":{"position":[[1384,7]]},"87":{"position":[[3265,7]]},"97":{"position":[[317,8]]},"99":{"position":[[66,8]]},"101":{"position":[[95,8]]},"130":{"position":[[11,7],[47,8]]},"180":{"position":[[172,8]]},"220":{"position":[[561,8]]},"253":{"position":[[279,7]]},"255":{"position":[[6,7],[154,7],[862,7]]},"275":{"position":[[870,7]]},"317":{"position":[[297,7],[473,7]]},"349":{"position":[[108,8]]},"351":{"position":[[75,8]]},"353":{"position":[[133,8]]},"374":{"position":[[94,8]]},"378":{"position":[[200,8]]},"384":{"position":[[221,7]]},"388":{"position":[[259,8],[423,8]]},"412":{"position":[[188,7],[438,7]]},"423":{"position":[[1031,9]]},"433":{"position":[[1772,8]]}}}],["exce",{"_index":663,"t":{"33":{"position":[[227,7]]}}}],["excel",{"_index":174,"t":{"7":{"position":[[691,5]]},"17":{"position":[[202,5]]},"68":{"position":[[149,6]]},"97":{"position":[[169,6]]}}}],["except",{"_index":2019,"t":{"331":{"position":[[575,6],[582,9]]},"382":{"position":[[760,6],[767,9]]},"400":{"position":[[34,9]]}}}],["excit",{"_index":354,"t":{"17":{"position":[[392,7]]},"87":{"position":[[18,8],[77,8]]},"89":{"position":[[31,8]]},"435":{"position":[[315,7]]}}}],["execut",{"_index":29,"t":{"3":{"position":[[308,8]]},"5":{"position":[[647,7]]},"9":{"position":[[117,7]]},"134":{"position":[[828,7]]},"136":{"position":[[155,9]]},"172":{"position":[[904,10]]},"180":{"position":[[186,7]]},"182":{"position":[[196,9],[868,10]]},"184":{"position":[[81,9]]},"198":{"position":[[4,9]]},"206":{"position":[[38,11],[119,9]]},"255":{"position":[[582,8]]},"307":{"position":[[157,8]]}}}],["exerpt",{"_index":1361,"t":{"150":{"position":[[239,6]]}}}],["exist",{"_index":366,"t":{"17":{"position":[[723,8]]},"27":{"position":[[932,7],[1072,8],[1166,6]]},"85":{"position":[[969,8]]},"87":{"position":[[1978,6],[2717,6]]},"152":{"position":[[245,6]]},"215":{"position":[[139,8]]},"218":{"position":[[135,8]]},"255":{"position":[[116,8]]}}}],["exit",{"_index":904,"t":{"48":{"position":[[7959,7]]}}}],["expand",{"_index":652,"t":{"29":{"position":[[616,9]]}}}],["expect",{"_index":759,"t":{"48":{"position":[[449,6]]},"150":{"position":[[2260,7],[2411,8]]},"313":{"position":[[232,8]]}}}],["expens",{"_index":1640,"t":{"222":{"position":[[259,9]]}}}],["experi",{"_index":170,"t":{"7":{"position":[[596,13]]},"11":{"position":[[153,13]]},"77":{"position":[[551,10]]},"87":{"position":[[38,10]]},"89":{"position":[[105,12],[260,11]]},"115":{"position":[[366,10]]},"220":{"position":[[30,11],[222,10]]}}}],["experiment",{"_index":1643,"t":{"222":{"position":[[358,13]]}}}],["expert",{"_index":790,"t":{"48":{"position":[[1803,7],[5670,7]]}}}],["explan",{"_index":1566,"t":{"172":{"position":[[1057,13]]}}}],["explanatori",{"_index":1148,"t":{"87":{"position":[[2878,12]]}}}],["explicit",{"_index":2327,"t":{"439":{"position":[[188,8]]}}}],["explor",{"_index":485,"t":{"21":{"position":[[506,7]]},"184":{"position":[[206,7]]},"439":{"position":[[262,7]]}}}],["explos",{"_index":333,"t":{"17":{"position":[[39,9]]}}}],["export",{"_index":591,"t":{"27":{"position":[[408,6],[465,6]]},"68":{"position":[[293,6]]},"97":{"position":[[326,6]]},"125":{"position":[[0,6],[47,6]]},"211":{"position":[[383,6]]},"261":{"position":[[277,6],[287,6],[341,6]]},"302":{"position":[[128,6],[194,6]]},"421":{"position":[[85,6]]}}}],["extens",{"_index":989,"t":{"77":{"position":[[16,9]]},"138":{"position":[[234,9]]}}}],["extern",{"_index":443,"t":{"19":{"position":[[1257,8]]},"136":{"position":[[250,8]]},"140":{"position":[[677,8],[864,8]]},"291":{"position":[[83,8]]}}}],["extra",{"_index":1858,"t":{"275":{"position":[[44,6]]},"355":{"position":[[35,5]]}}}],["extract",{"_index":338,"t":{"17":{"position":[[138,10]]},"48":{"position":[[4885,7]]},"305":{"position":[[172,8]]},"307":{"position":[[211,8]]}}}],["face",{"_index":1542,"t":{"168":{"position":[[24,6]]},"323":{"position":[[328,4]]}}}],["facilit",{"_index":1036,"t":{"85":{"position":[[88,11]]}}}],["fact",{"_index":262,"t":{"11":{"position":[[723,5]]}}}],["factual",{"_index":140,"t":{"7":{"position":[[47,10],[284,10],[502,7],[567,10],[1432,8]]},"15":{"position":[[369,7]]},"62":{"position":[[60,7]]},"83":{"position":[[923,7]]},"211":{"position":[[198,7]]},"255":{"position":[[1221,7]]},"439":{"position":[[179,8]]}}}],["fail",{"_index":845,"t":{"48":{"position":[[3926,9],[6411,9],[8319,9]]},"313":{"position":[[12,5]]},"327":{"position":[[51,4]]}}}],["fair",{"_index":276,"t":{"11":{"position":[[1066,4]]}}}],["fairli",{"_index":1435,"t":{"150":{"position":[[2460,6]]}}}],["faiss.from_documents(docu",{"_index":1446,"t":{"150":{"position":[[2874,31]]}}}],["faissfrom",{"_index":1360,"t":{"150":{"position":[[187,9]]}}}],["fals",{"_index":1141,"t":{"87":{"position":[[2550,6],[2939,5]]},"93":{"position":[[451,5]]},"423":{"position":[[419,6],[810,6],[1210,6]]}}}],["familiar",{"_index":1569,"t":{"178":{"position":[[28,11]]}}}],["faq",{"_index":1658,"t":{"230":{"position":[[53,3]]}}}],["far",{"_index":821,"t":{"48":{"position":[[3211,3]]}}}],["fast",{"_index":1601,"t":{"192":{"position":[[174,4]]},"343":{"position":[[93,4]]},"398":{"position":[[259,4],[462,4]]}}}],["fast.her",{"_index":1408,"t":{"150":{"position":[[1609,9]]}}}],["fast_llm",{"_index":2154,"t":{"380":{"position":[[305,8]]}}}],["fast_llm=\"bedrock:anthropic.claud",{"_index":2129,"t":{"365":{"position":[[0,34]]}}}],["fast_llm=\"google_vertexai:gemini",{"_index":2113,"t":{"359":{"position":[[0,32]]}}}],["fast_llm=\"openai:your_fast_llm\"smart_llm=\"openai:your_smart_llm\"strategic_llm=\"openai:your_strategic_llm",{"_index":2032,"t":{"337":{"position":[[246,105]]}}}],["fast_llm=\"xai:grok",{"_index":2135,"t":{"367":{"position":[[0,18]]}}}],["fastapi",{"_index":704,"t":{"42":{"position":[[84,7],[729,7]]},"109":{"position":[[29,7]]},"176":{"position":[[97,7]]},"184":{"position":[[11,7]]},"273":{"position":[[5,7]]}}}],["fastapi()@app.get(\"/report/{report_type}\")async",{"_index":1851,"t":{"273":{"position":[[87,47]]}}}],["fastapifrom",{"_index":1849,"t":{"273":{"position":[[20,11]]}}}],["faster",{"_index":239,"t":{"9":{"position":[[1015,6]]},"29":{"position":[[493,7]]},"305":{"position":[[226,6]]},"423":{"position":[[846,6]]}}}],["favorit",{"_index":1035,"t":{"85":{"position":[[10,8]]}}}],["featur",{"_index":440,"t":{"19":{"position":[[1220,7]]},"27":{"position":[[2091,7]]},"64":{"position":[[282,8]]},"85":{"position":[[19,8]]},"87":{"position":[[86,7]]},"105":{"position":[[195,9]]},"111":{"position":[[37,8]]},"113":{"position":[[71,7]]},"115":{"position":[[407,8]]},"215":{"position":[[264,8]]},"218":{"position":[[326,8]]},"224":{"position":[[0,7]]},"427":{"position":[[191,9]]},"435":{"position":[[47,8]]}}}],["feedback",{"_index":1017,"t":{"81":{"position":[[548,8]]},"83":{"position":[[1037,8],[1146,9]]},"89":{"position":[[1446,8]]},"115":{"position":[[157,8]]},"414":{"position":[[114,8],[602,8]]},"419":{"position":[[483,9],[568,9]]},"423":{"position":[[392,8]]}}}],["feel",{"_index":767,"t":{"48":{"position":[[775,4],[8833,4]]},"64":{"position":[[437,4]]},"75":{"position":[[846,4]]},"394":{"position":[[375,4]]}}}],["fetch",{"_index":831,"t":{"48":{"position":[[3467,8]]},"162":{"position":[[2110,8],[2208,7],[3530,8],[3641,7]]},"255":{"position":[[303,5]]},"305":{"position":[[118,5]]}}}],["fetch_report(queri",{"_index":1785,"t":{"255":{"position":[[278,20],[659,19]]}}}],["fetching_query_cont",{"_index":1518,"t":{"162":{"position":[[2059,23]]}}}],["fetching_relevant_written_cont",{"_index":1530,"t":{"162":{"position":[[3473,34]]}}}],["few",{"_index":273,"t":{"11":{"position":[[1044,3]]},"17":{"position":[[14,3]]},"19":{"position":[[2057,3]]},"75":{"position":[[261,3]]},"150":{"position":[[1420,3]]}}}],["field",{"_index":1149,"t":{"87":{"position":[[3042,5]]},"172":{"position":[[77,5],[246,5]]},"257":{"position":[[1973,5]]},"423":{"position":[[135,8]]}}}],["file",{"_index":492,"t":{"23":{"position":[[84,4],[1211,4]]},"27":{"position":[[880,5]]},"38":{"position":[[250,4]]},"48":{"position":[[614,6]]},"68":{"position":[[109,4]]},"87":{"position":[[2399,5]]},"97":{"position":[[129,4]]},"105":{"position":[[270,5]]},"107":{"position":[[58,5],[96,4],[114,4],[164,4],[427,5]]},"109":{"position":[[53,6]]},"130":{"position":[[87,4]]},"158":{"position":[[8,4],[23,4],[241,4],[295,4]]},"160":{"position":[[141,4]]},"164":{"position":[[65,5],[532,5]]},"168":{"position":[[35,5],[121,5],[163,4],[189,4],[242,4]]},"172":{"position":[[66,5]]},"180":{"position":[[660,4]]},"182":{"position":[[264,4]]},"188":{"position":[[226,4]]},"196":{"position":[[49,4]]},"198":{"position":[[181,4]]},"200":{"position":[[203,5],[244,4],[264,4],[515,5]]},"239":{"position":[[1439,5]]},"257":{"position":[[910,5]]},"261":{"position":[[237,4]]},"317":{"position":[[360,4]]},"339":{"position":[[213,5]]},"374":{"position":[[353,4]]},"378":{"position":[[391,4]]},"384":{"position":[[234,4]]},"423":{"position":[[74,4]]},"427":{"position":[[266,5]]},"429":{"position":[[58,5],[96,4],[114,4],[164,4],[343,5]]}}}],["file_path",{"_index":513,"t":{"23":{"position":[[620,9],[633,11],[1222,13]]}}}],["file_path.endswith('.csv",{"_index":519,"t":{"23":{"position":[[779,27]]}}}],["file_path.endswith('.docx",{"_index":527,"t":{"23":{"position":[[1094,28]]}}}],["file_path.endswith('.md",{"_index":523,"t":{"23":{"position":[[932,26]]}}}],["file_path.endswith('.pdf",{"_index":514,"t":{"23":{"position":[[648,27]]}}}],["file_path.endswith('.pptx",{"_index":525,"t":{"23":{"position":[[1011,28]]}}}],["file_path.endswith('.txt",{"_index":517,"t":{"23":{"position":[[715,27]]}}}],["file_path.endswith('.xlsx",{"_index":521,"t":{"23":{"position":[[854,28]]}}}],["fileload_dotenv()async",{"_index":2289,"t":{"433":{"position":[[422,22]]}}}],["filenam",{"_index":1610,"t":{"196":{"position":[[84,8]]}}}],["filter",{"_index":287,"t":{"13":{"position":[[396,7]]},"58":{"position":[[136,9]]},"62":{"position":[[240,6]]},"206":{"position":[[234,7],[950,6]]},"374":{"position":[[0,9],[62,6],[671,6],[687,9]]},"439":{"position":[[485,9]]}}}],["final",{"_index":240,"t":{"11":{"position":[[0,8]]},"13":{"position":[[84,5],[460,8],[517,5]]},"21":{"position":[[477,5]]},"25":{"position":[[484,8],[572,5],[892,5]]},"40":{"position":[[298,8],[412,5]]},"48":{"position":[[2117,8],[3017,8],[4029,9]]},"75":{"position":[[340,7]]},"81":{"position":[[627,5],[684,5]]},"83":{"position":[[169,7],[1189,5],[1323,5]]},"85":{"position":[[3219,7]]},"87":{"position":[[476,5],[1143,8],[2047,5],[2242,10],[3176,5]]},"89":{"position":[[728,5]]},"140":{"position":[[561,5]]},"162":{"position":[[2495,10]]},"170":{"position":[[498,5]]},"172":{"position":[[319,5]]},"206":{"position":[[213,8],[941,8],[1009,5]]},"263":{"position":[[618,8]]},"275":{"position":[[976,8]]},"347":{"position":[[4,8]]},"414":{"position":[[681,5],[738,5]]},"419":{"position":[[611,5],[745,5]]}}}],["final_report",{"_index":723,"t":{"42":{"position":[[657,12],[707,13]]}}}],["financ",{"_index":298,"t":{"15":{"position":[[259,8]]},"48":{"position":[[1561,7],[1795,7],[5662,7]]}}}],["financi",{"_index":422,"t":{"19":{"position":[[814,9]]},"48":{"position":[[1605,9],[5289,9]]},"255":{"position":[[1115,9]]}}}],["find",{"_index":22,"t":{"3":{"position":[[224,4]]},"19":{"position":[[1512,4]]},"25":{"position":[[405,4]]},"48":{"position":[[1939,4],[5806,4]]},"83":{"position":[[1287,9]]},"93":{"position":[[336,5]]},"115":{"position":[[255,9]]},"136":{"position":[[178,9]]},"158":{"position":[[228,4]]},"168":{"position":[[272,4]]},"204":{"position":[[90,4]]},"329":{"position":[[252,4]]},"384":{"position":[[738,4]]},"419":{"position":[[709,9]]}}}],["finish",{"_index":1527,"t":{"162":{"position":[[3077,8],[3924,9]]}}}],["finit",{"_index":125,"t":{"5":{"position":[[797,6]]}}}],["fire",{"_index":1818,"t":{"257":{"position":[[1807,4],[1939,4]]}}}],["firefox",{"_index":1910,"t":{"309":{"position":[[205,8]]}}}],["fireworks_api_key=[your",{"_index":2124,"t":{"363":{"position":[[0,23]]}}}],["firm",{"_index":424,"t":{"19":{"position":[[833,4]]}}}],["first",{"_index":5,"t":{"3":{"position":[[68,5]]},"5":{"position":[[4,5],[394,6],[550,5]]},"48":{"position":[[1688,5],[1701,6]]},"85":{"position":[[3163,5]]},"329":{"position":[[208,6]]}}}],["fix",{"_index":89,"t":{"5":{"position":[[151,5]]},"105":{"position":[[505,5]]},"427":{"position":[[501,5]]}}}],["flash",{"_index":2114,"t":{"359":{"position":[[37,5]]}}}],["flash\"smart_llm=\"google_genai:gemini",{"_index":2109,"t":{"357":{"position":[[145,36]]}}}],["flask",{"_index":1857,"t":{"275":{"position":[[23,5],[88,5],[101,6],[825,5],[855,5]]}}}],["flask(__name__)@app.route('/report/<report_typ",{"_index":1862,"t":{"275":{"position":[[170,50]]}}}],["flask[async",{"_index":1859,"t":{"275":{"position":[[63,14]]}}}],["flexibl",{"_index":494,"t":{"23":{"position":[[101,11]]},"77":{"position":[[461,11]]},"218":{"position":[[153,8]]},"220":{"position":[[244,8]]},"435":{"position":[[469,12]]}}}],["flip",{"_index":364,"t":{"17":{"position":[[656,4]]}}}],["flood",{"_index":916,"t":{"52":{"position":[[202,8]]},"255":{"position":[[768,8]]},"257":{"position":[[651,8]]}}}],["flow",{"_index":975,"t":{"75":{"position":[[371,5]]},"77":{"position":[[79,6],[128,5],[330,6]]},"89":{"position":[[347,4]]},"105":{"position":[[415,4]]},"107":{"position":[[438,4]]},"166":{"position":[[46,4]]},"170":{"position":[[714,4]]},"200":{"position":[[150,4],[526,4]]},"374":{"position":[[255,5]]},"427":{"position":[[411,4]]},"429":{"position":[[354,4]]}}}],["focu",{"_index":259,"t":{"11":{"position":[[631,5]]},"17":{"position":[[129,5]]},"79":{"position":[[171,5]]},"83":{"position":[[1453,5]]},"85":{"position":[[3251,5]]},"89":{"position":[[163,5]]},"150":{"position":[[1961,5]]}}}],["focus",{"_index":696,"t":{"40":{"position":[[160,7]]},"172":{"position":[[884,7],[1158,7]]}}}],["folder",{"_index":954,"t":{"68":{"position":[[252,6]]},"97":{"position":[[272,6]]},"128":{"position":[[49,7]]},"158":{"position":[[261,7],[412,6]]},"168":{"position":[[298,7]]},"374":{"position":[[370,6]]}}}],["follow",{"_index":129,"t":{"5":{"position":[[882,9]]},"7":{"position":[[347,10]]},"11":{"position":[[478,8],[548,9]]},"27":{"position":[[456,8],[1852,9]]},"38":{"position":[[49,9]]},"48":{"position":[[894,9]]},"83":{"position":[[54,9],[226,8]]},"85":{"position":[[1108,10],[3279,9]]},"121":{"position":[[38,10]]},"160":{"position":[[361,9],[452,6]]},"180":{"position":[[198,9],[317,9],[448,9],[674,9]]},"184":{"position":[[95,9]]},"200":{"position":[[58,6],[138,6]]},"220":{"position":[[440,6]]},"236":{"position":[[30,6]]},"261":{"position":[[0,6]]},"323":{"position":[[110,6]]},"325":{"position":[[230,10]]},"329":{"position":[[188,6]]},"341":{"position":[[116,9]]},"355":{"position":[[47,6],[93,8]]},"357":{"position":[[66,9]]},"384":{"position":[[655,6]]},"388":{"position":[[509,9]]},"390":{"position":[[310,9]]},"394":{"position":[[92,9]]},"416":{"position":[[39,9]]},"419":{"position":[[74,8]]},"423":{"position":[[125,9],[745,6],[865,6],[943,7]]},"433":{"position":[[63,9]]},"435":{"position":[[400,9]]}}}],["follow_guidelin",{"_index":1140,"t":{"87":{"position":[[2529,20],[2918,17]]},"423":{"position":[[691,17],[1234,20]]}}}],["forecast",{"_index":629,"t":{"27":{"position":[[2035,9]]}}}],["form",{"_index":13,"t":{"3":{"position":[[133,7]]},"7":{"position":[[1309,4]]},"13":{"position":[[186,4]]},"15":{"position":[[523,4]]},"27":{"position":[[734,5]]},"33":{"position":[[209,4]]},"204":{"position":[[3,4]]},"206":{"position":[[671,4]]},"211":{"position":[[179,4]]}}}],["format",{"_index":268,"t":{"11":{"position":[[813,7],[875,7]]},"68":{"position":[[114,7]]},"81":{"position":[[708,8]]},"83":{"position":[[1345,7]]},"87":{"position":[[2632,8],[3201,7]]},"95":{"position":[[698,6]]},"97":{"position":[[134,7]]},"130":{"position":[[92,7]]},"138":{"position":[[165,7]]},"160":{"position":[[35,6],[85,7]]},"168":{"position":[[194,6]]},"170":{"position":[[0,7],[19,7]]},"172":{"position":[[0,7],[24,6]]},"394":{"position":[[102,7],[300,6]]},"412":{"position":[[380,7]]},"414":{"position":[[762,8]]},"419":{"position":[[767,7]]},"423":{"position":[[483,7],[1366,8]]}}}],["forti",{"_index":1404,"t":{"150":{"position":[[1472,5]]}}}],["forward",{"_index":590,"t":{"27":{"position":[[393,8]]},"48":{"position":[[2774,8]]},"85":{"position":[[3043,7]]},"89":{"position":[[6,8],[783,7],[1284,7]]}}}],["found",{"_index":65,"t":{"3":{"position":[[898,5]]},"25":{"position":[[837,5]]},"27":{"position":[[2162,5]]},"83":{"position":[[1496,5]]},"140":{"position":[[359,5]]},"162":{"position":[[1849,5]]},"170":{"position":[[472,5],[533,5]]},"172":{"position":[[345,5]]},"285":{"position":[[27,5]]},"435":{"position":[[515,5]]}}}],["foundat",{"_index":172,"t":{"7":{"position":[[673,10]]},"19":{"position":[[159,10]]},"75":{"position":[[540,10]]}}}],["four.thi",{"_index":1405,"t":{"150":{"position":[[1526,9]]}}}],["frame",{"_index":90,"t":{"5":{"position":[[162,6]]}}}],["free",{"_index":768,"t":{"48":{"position":[[780,4],[8838,4]]},"64":{"position":[[442,4]]},"75":{"position":[[851,4]]},"343":{"position":[[242,4]]},"394":{"position":[[380,4]]}}}],["fresh",{"_index":1990,"t":{"325":{"position":[[251,5]]}}}],["friendli",{"_index":1300,"t":{"115":{"position":[[473,9]]}}}],["front",{"_index":639,"t":{"27":{"position":[[2518,5]]},"215":{"position":[[424,5]]}}}],["frontend",{"_index":956,"t":{"68":{"position":[[356,8]]},"105":{"position":[[30,8],[57,8],[147,9]]},"113":{"position":[[7,9],[61,9]]},"115":{"position":[[4,8]]},"144":{"position":[[29,9]]},"146":{"position":[[30,8]]},"215":{"position":[[220,8],[406,9]]},"220":{"position":[[60,9],[119,8],[536,9]]},"374":{"position":[[600,8]]},"427":{"position":[[26,8],[53,8],[143,9]]}}}],["frontendnvm",{"_index":2280,"t":{"431":{"position":[[3,11]]}}}],["fssl",{"_index":1687,"t":{"239":{"position":[[457,4]]}}}],["full",{"_index":769,"t":{"48":{"position":[[802,4],[5358,4]]},"209":{"position":[[0,4]]},"257":{"position":[[2087,4]]},"298":{"position":[[79,4],[511,4]]}}}],["fulli",{"_index":380,"t":{"17":{"position":[[970,5]]},"58":{"position":[[389,5]]},"307":{"position":[[243,5]]},"423":{"position":[[1294,5]]}}}],["function",{"_index":533,"t":{"23":{"position":[[1294,8]]},"48":{"position":[[412,8],[724,8],[1062,8],[1927,8],[2221,8],[2415,11],[2427,11],[3079,8],[3564,8],[3664,8],[3977,8],[4106,8],[4223,8],[4852,8],[4912,8],[5000,9],[5794,8],[5968,8],[6149,8],[6453,8],[7026,8],[7397,11],[7409,11],[8782,8]]},"75":{"position":[[310,8]]},"85":{"position":[[3078,10],[3145,9]]},"146":{"position":[[213,9]]},"198":{"position":[[202,8]]},"255":{"position":[[605,8]]},"257":{"position":[[1343,8]]},"317":{"position":[[377,8],[645,8],[1451,8],[2233,9],[2306,8]]}}}],["function_arg",{"_index":858,"t":{"48":{"position":[[4445,13],[6675,13]]}}}],["function_nam",{"_index":856,"t":{"48":{"position":[[4410,13],[4488,13],[6640,13],[6718,13]]}}}],["functionasyncio.run(main",{"_index":2022,"t":{"331":{"position":[[649,27]]}}}],["functionasyncio.run(test_ollama",{"_index":2180,"t":{"382":{"position":[[819,34]]}}}],["fundament",{"_index":1165,"t":{"89":{"position":[[1063,12]]}}}],["further",{"_index":908,"t":{"48":{"position":[[8636,7],[8883,7]]},"64":{"position":[[477,7]]},"79":{"position":[[278,7]]},"85":{"position":[[1024,7]]},"89":{"position":[[1458,7]]},"255":{"position":[[841,7]]},"298":{"position":[[37,7]]}}}],["futur",{"_index":37,"t":{"3":{"position":[[436,6]]},"15":{"position":[[4,6]]},"89":{"position":[[1304,6]]},"154":{"position":[[103,6]]}}}],["game",{"_index":386,"t":{"17":{"position":[[1029,5]]}}}],["gather",{"_index":56,"t":{"3":{"position":[[718,8]]},"7":{"position":[[442,8]]},"9":{"position":[[693,6]]},"29":{"position":[[61,9]]},"255":{"position":[[1051,6]]},"279":{"position":[[39,6]]},"313":{"position":[[493,7]]}}}],["gb",{"_index":1662,"t":{"234":{"position":[[143,2],[160,2]]}}}],["geckodriv",{"_index":1911,"t":{"309":{"position":[[214,11]]}}}],["gemini",{"_index":2105,"t":{"357":{"position":[[36,6]]}}}],["gemma",{"_index":2069,"t":{"347":{"position":[[414,5]]}}}],["genai",{"_index":2321,"t":{"433":{"position":[[2074,5]]}}}],["gener",{"_index":285,"t":{"13":{"position":[[139,8],[506,8]]},"21":{"position":[[329,9]]},"25":{"position":[[206,10],[343,10],[561,8]]},"33":{"position":[[116,8],[649,8]]},"35":{"position":[[97,9]]},"40":{"position":[[177,9]]},"42":{"position":[[1012,8]]},"44":{"position":[[53,10]]},"62":{"position":[[435,10]]},"75":{"position":[[526,10]]},"85":{"position":[[938,8]]},"87":{"position":[[3110,8]]},"89":{"position":[[277,10],[884,8]]},"140":{"position":[[791,9]]},"160":{"position":[[123,10],[615,7]]},"162":{"position":[[1306,7],[2612,10],[2700,10],[2778,10],[2832,10],[3208,10],[3287,10],[3387,10],[3462,10],[3786,10],[3852,10],[3910,10]]},"164":{"position":[[201,10]]},"166":{"position":[[252,8]]},"168":{"position":[[94,9]]},"170":{"position":[[398,9]]},"172":{"position":[[668,9],[793,9]]},"192":{"position":[[110,9]]},"194":{"position":[[0,8],[304,8]]},"196":{"position":[[4,9]]},"206":{"position":[[78,9],[184,9],[620,8],[998,8]]},"211":{"position":[[3,8],[69,8]]},"220":{"position":[[198,10]]},"253":{"position":[[77,7]]},"255":{"position":[[186,8],[912,10]]},"257":{"position":[[712,8]]},"296":{"position":[[145,8],[204,8]]},"317":{"position":[[229,8]]},"323":{"position":[[62,8]]},"343":{"position":[[233,8]]},"412":{"position":[[331,9]]},"416":{"position":[[0,10]]},"423":{"position":[[836,9]]}}}],["generate_report(websocket",{"_index":710,"t":{"42":{"position":[[206,26],[866,26]]}}}],["generate_research_report(queri",{"_index":1787,"t":{"255":{"position":[[516,32]]}}}],["generatedvector_stor",{"_index":1460,"t":{"152":{"position":[[335,21]]}}}],["generating_draft_sect",{"_index":1528,"t":{"162":{"position":[[3158,26]]}}}],["generating_subtop",{"_index":1523,"t":{"162":{"position":[[2563,21]]}}}],["genericllmprovid",{"_index":2166,"t":{"382":{"position":[[362,18]]}}}],["genericllmproviderfrom",{"_index":2160,"t":{"382":{"position":[[197,22]]}}}],["get",{"_index":823,"t":{"48":{"position":[[3245,4]]},"220":{"position":[[341,7]]},"349":{"position":[[19,7]]}}}],["get_llm",{"_index":2168,"t":{"382":{"position":[[404,8]]}}}],["get_llmollama_base_url",{"_index":2161,"t":{"382":{"position":[[252,22]]}}}],["get_report(prompt",{"_index":1195,"t":{"95":{"position":[[348,18]]}}}],["get_report(queri",{"_index":1183,"t":{"93":{"position":[[579,17]]},"97":{"position":[[600,17]]},"101":{"position":[[785,17]]},"263":{"position":[[64,17]]},"273":{"position":[[139,17]]}}}],["get_report(report_typ",{"_index":1864,"t":{"275":{"position":[[247,24]]}}}],["get_research_report(queri",{"_index":613,"t":{"27":{"position":[[1256,26]]},"132":{"position":[[110,26]]},"134":{"position":[[110,26]]}}}],["get_retriev",{"_index":2291,"t":{"433":{"position":[[601,18]]}}}],["get_retriever(\"cheese_collect",{"_index":1234,"t":{"101":{"position":[[1497,34]]}}}],["get_retriever(collection_nam",{"_index":1215,"t":{"101":{"position":[[449,30]]}}}],["get_retrieversfrom",{"_index":2285,"t":{"433":{"position":[[294,18]]}}}],["gethost",{"_index":1357,"t":{"146":{"position":[[205,7]]}}}],["gist",{"_index":770,"t":{"48":{"position":[[814,4]]}}}],["git",{"_index":1595,"t":{"188":{"position":[[22,3]]},"220":{"position":[[380,3],[498,3]]},"226":{"position":[[194,3]]},"239":{"position":[[35,6],[42,3],[109,3],[159,3]]}}}],["github",{"_index":671,"t":{"33":{"position":[[532,6]]},"48":{"position":[[807,6]]},"75":{"position":[[873,6]]},"140":{"position":[[966,6]]},"228":{"position":[[217,6]]},"243":{"position":[[93,6]]},"249":{"position":[[58,6],[427,6]]},"394":{"position":[[460,6]]}}}],["give",{"_index":476,"t":{"21":{"position":[[184,4]]},"77":{"position":[[447,5]]},"150":{"position":[[978,4]]},"172":{"position":[[258,5]]}}}],["given",{"_index":176,"t":{"7":{"position":[[739,5],[789,5],[917,5]]},"11":{"position":[[67,5],[427,5],[930,5]]},"13":{"position":[[219,5],[345,5]]},"17":{"position":[[500,5]]},"25":{"position":[[192,5]]},"44":{"position":[[419,5]]},"48":{"position":[[4897,5]]},"52":{"position":[[394,5]]},"79":{"position":[[455,5]]},"81":{"position":[[327,5],[471,5]]},"83":{"position":[[317,5],[489,5],[998,5],[1272,5]]},"85":{"position":[[1745,5]]},"87":{"position":[[2383,5]]},"89":{"position":[[921,5],[1009,5],[1150,5]]},"162":{"position":[[241,5],[2295,5]]},"206":{"position":[[704,5],[830,5]]},"257":{"position":[[2109,5]]},"412":{"position":[[273,5]]},"414":{"position":[[381,5],[525,5]]},"419":{"position":[[165,5],[446,5],[694,5]]},"439":{"position":[[291,5]]}}}],["glib",{"_index":1979,"t":{"323":{"position":[[310,4],[396,4]]},"325":{"position":[[373,4]]}}}],["go",{"_index":384,"t":{"17":{"position":[[1009,5]]},"21":{"position":[[238,5]]},"48":{"position":[[1481,2],[8760,2]]},"87":{"position":[[2067,2]]},"89":{"position":[[0,5]]},"146":{"position":[[147,2]]},"176":{"position":[[147,2]]},"384":{"position":[[679,2]]}}}],["goal",{"_index":754,"t":{"48":{"position":[[278,5],[1816,4],[5683,4]]},"435":{"position":[[410,6]]}}}],["gobject",{"_index":1992,"t":{"325":{"position":[[378,7]]}}}],["goe",{"_index":731,"t":{"44":{"position":[[236,4]]}}}],["good",{"_index":822,"t":{"48":{"position":[[3218,5]]},"150":{"position":[[944,4],[1678,4],[2467,4]]},"239":{"position":[[3141,4]]}}}],["googl",{"_index":2104,"t":{"357":{"position":[[29,6]]},"374":{"position":[[31,6],[657,6]]},"388":{"position":[[583,6]]},"400":{"position":[[495,6]]}}}],["google_api_key=[your",{"_index":2106,"t":{"357":{"position":[[86,20]]}}}],["gpg",{"_index":1685,"t":{"239":{"position":[[443,3],[514,3]]}}}],["gpt",{"_index":73,"t":{"3":{"position":[[1005,3]]},"7":{"position":[[136,4]]},"11":{"position":[[281,3],[326,3],[1089,3]]},"13":{"position":[[47,3]]},"15":{"position":[[972,3]]},"17":{"position":[[440,3]]},"21":{"position":[[56,3],[275,3],[593,3],[666,3]]},"25":{"position":[[88,3],[140,3],[354,3],[595,3]]},"27":{"position":[[124,3],[156,3],[193,3],[261,3],[568,3],[619,3],[806,3],[1043,3],[2481,3]]},"29":{"position":[[117,3]]},"33":{"position":[[88,3],[517,3]]},"44":{"position":[[192,3]]},"48":{"position":[[1569,3],[2174,3],[3287,3]]},"56":{"position":[[256,3],[283,3]]},"58":{"position":[[0,3],[211,3],[472,3]]},"60":{"position":[[22,3],[78,3]]},"64":{"position":[[250,3]]},"68":{"position":[[21,3],[478,3]]},"72":{"position":[[16,3]]},"75":{"position":[[53,3],[888,3]]},"79":{"position":[[568,3]]},"81":{"position":[[242,3]]},"83":{"position":[[243,4],[742,4],[849,3]]},"85":{"position":[[1422,3]]},"87":{"position":[[2566,4],[3287,3]]},"89":{"position":[[1248,3]]},"93":{"position":[[41,3],[104,3],[199,3]]},"97":{"position":[[21,3],[467,3]]},"99":{"position":[[96,3]]},"101":{"position":[[21,3]]},"115":{"position":[[22,3],[497,3]]},"119":{"position":[[0,3],[231,3]]},"123":{"position":[[12,3]]},"140":{"position":[[221,3],[278,3],[383,3],[951,3]]},"154":{"position":[[118,3]]},"188":{"position":[[85,3]]},"206":{"position":[[337,3],[353,3]]},"215":{"position":[[0,3],[66,3],[114,3]]},"218":{"position":[[40,3],[361,3]]},"222":{"position":[[77,3],[148,3],[508,3]]},"226":{"position":[[115,3]]},"228":{"position":[[0,3],[137,3]]},"243":{"position":[[67,3]]},"247":{"position":[[39,3]]},"255":{"position":[[44,3],[1033,3]]},"261":{"position":[[115,3],[180,3],[407,3]]},"277":{"position":[[0,3]]},"298":{"position":[[536,3]]},"302":{"position":[[242,3]]},"305":{"position":[[19,3]]},"307":{"position":[[24,3]]},"313":{"position":[[474,3]]},"317":{"position":[[2367,3]]},"321":{"position":[[45,3]]},"325":{"position":[[421,3]]},"339":{"position":[[276,3]]},"341":{"position":[[0,3]]},"343":{"position":[[144,3]]},"347":{"position":[[44,3]]},"374":{"position":[[240,3]]},"378":{"position":[[371,3]]},"380":{"position":[[69,3]]},"384":{"position":[[265,3]]},"388":{"position":[[0,3]]},"414":{"position":[[294,4]]},"419":{"position":[[91,4],[314,4]]},"423":{"position":[[1087,4]]},"435":{"position":[[198,3]]},"439":{"position":[[361,3],[377,3],[580,3]]}}}],["gpt_research",{"_index":609,"t":{"27":{"position":[[1197,14]]},"52":{"position":[[5,14]]},"85":{"position":[[1458,14]]},"93":{"position":[[520,14]]},"95":{"position":[[289,14]]},"97":{"position":[[541,14]]},"101":{"position":[[183,14]]},"132":{"position":[[51,14]]},"134":{"position":[[51,14]]},"150":{"position":[[5,14]]},"152":{"position":[[5,14]]},"154":{"position":[[295,14]]},"255":{"position":[[219,14]]},"257":{"position":[[149,14]]},"263":{"position":[[5,14]]},"273":{"position":[[32,14]]},"275":{"position":[[129,14]]}}}],["gpt_researcher.actions.retriev",{"_index":2284,"t":{"433":{"position":[[254,32]]}}}],["gpt_researcher.config.config",{"_index":2003,"t":{"331":{"position":[[133,28]]},"433":{"position":[[207,28]]}}}],["gpt_researcher.llm_provider.gener",{"_index":2159,"t":{"382":{"position":[[154,35]]}}}],["gpt_researcher.skills.research",{"_index":2286,"t":{"433":{"position":[[313,32]]}}}],["gpt_researcher.utils.enum",{"_index":706,"t":{"42":{"position":[[113,25]]}}}],["gpt_researcher.utils.llm",{"_index":2005,"t":{"331":{"position":[[180,24]]},"382":{"position":[[220,24]]}}}],["gptr",{"_index":1246,"t":{"105":{"position":[[347,4]]},"317":{"position":[[50,4],[75,4],[128,4],[344,4],[417,4],[513,4],[545,4]]},"427":{"position":[[343,4]]}}}],["gptresearch",{"_index":673,"t":{"33":{"position":[[596,13]]},"68":{"position":[[583,13]]},"95":{"position":[[227,13]]},"97":{"position":[[402,13]]},"105":{"position":[[309,14]]},"150":{"position":[[3165,14]]},"152":{"position":[[699,14]]},"154":{"position":[[575,14]]},"257":{"position":[[1029,14]]},"294":{"position":[[113,14],[141,14]]},"374":{"position":[[139,13]]},"427":{"position":[[305,14]]}}}],["gptresearcher(parent_query=parent_queri",{"_index":1068,"t":{"85":{"position":[[1618,40]]}}}],["gptresearcher(queri",{"_index":1825,"t":{"263":{"position":[[119,20]]},"273":{"position":[[202,20]]},"275":{"position":[[319,20]]}}}],["gptresearcher(query=prompt",{"_index":1196,"t":{"95":{"position":[[411,27]]}}}],["gptresearcher(query=queri",{"_index":616,"t":{"27":{"position":[[1347,26]]},"52":{"position":[[298,26]]},"93":{"position":[[656,26]]},"97":{"position":[[664,26]]},"101":{"position":[[894,26]]},"132":{"position":[[201,26]]},"134":{"position":[[201,26]]},"255":{"position":[[389,26]]}}}],["gptresearcherapp",{"_index":1861,"t":{"275":{"position":[[151,16]]}}}],["gptresearcherclass",{"_index":1063,"t":{"85":{"position":[[1480,18]]},"257":{"position":[[171,18]]}}}],["gptresearcherfrom",{"_index":1207,"t":{"101":{"position":[[205,17]]},"150":{"position":[[27,17]]},"152":{"position":[[27,17]]},"154":{"position":[[317,17]]}}}],["gptresearcherimport",{"_index":610,"t":{"27":{"position":[[1219,19]]},"52":{"position":[[27,19]]},"93":{"position":[[542,19]]},"95":{"position":[[311,19]]},"97":{"position":[[563,19]]},"132":{"position":[[73,19]]},"134":{"position":[[73,19]]},"255":{"position":[[241,19]]},"263":{"position":[[27,19]]},"273":{"position":[[54,19]]}}}],["gptresearcherresearch",{"_index":1452,"t":{"150":{"position":[[3139,23]]},"152":{"position":[[673,23]]},"154":{"position":[[549,23]]}}}],["grab",{"_index":1822,"t":{"261":{"position":[[131,4]]}}}],["graph",{"_index":313,"t":{"15":{"position":[[564,7]]},"85":{"position":[[239,5],[898,5],[1041,5],[1093,5],[1216,5],[2064,5],[3020,5],[3190,6]]},"87":{"position":[[531,6],[605,5],[795,5],[1939,5],[2087,5],[2276,7],[2961,5]]},"89":{"position":[[893,6],[1057,5]]}}}],["graphstat",{"_index":1038,"t":{"85":{"position":[[156,10]]}}}],["great",{"_index":31,"t":{"3":{"position":[[348,5]]},"7":{"position":[[1349,6]]},"85":{"position":[[1265,5]]}}}],["greatli",{"_index":192,"t":{"7":{"position":[[1239,8]]}}}],["groq",{"_index":2050,"t":{"343":{"position":[[136,4],[217,4]]},"347":{"position":[[354,4]]}}}],["groq_api_key",{"_index":2056,"t":{"345":{"position":[[238,36]]}}}],["groq_api_key=[your",{"_index":2057,"t":{"347":{"position":[[89,18]]}}}],["groqcloud",{"_index":2045,"t":{"343":{"position":[[0,9],[176,9]]}}}],["groqfast_llm=\"groq:mixtr",{"_index":2058,"t":{"347":{"position":[[153,26]]}}}],["ground",{"_index":395,"t":{"19":{"position":[[115,8],[223,7]]},"29":{"position":[[325,8]]}}}],["groundbreak",{"_index":747,"t":{"48":{"position":[[32,14]]}}}],["group",{"_index":1513,"t":{"162":{"position":[[1448,5]]},"239":{"position":[[1040,5],[1136,5]]}}}],["grow",{"_index":306,"t":{"15":{"position":[[436,7]]},"64":{"position":[[303,7]]},"79":{"position":[[322,6]]},"150":{"position":[[1122,5]]}}}],["guarante",{"_index":87,"t":{"5":{"position":[[103,9]]}}}],["gui",{"_index":1245,"t":{"105":{"position":[[326,3]]},"427":{"position":[[322,3]]}}}],["guid",{"_index":78,"t":{"3":{"position":[[1135,6]]},"17":{"position":[[1054,6]]},"19":{"position":[[1611,5]]},"95":{"position":[[102,5]]},"119":{"position":[[143,5]]},"162":{"position":[[2636,5]]},"226":{"position":[[142,5]]},"323":{"position":[[122,5]]},"355":{"position":[[59,5]]},"384":{"position":[[88,5]]}}}],["guidelin",{"_index":1026,"t":{"83":{"position":[[1013,10]]},"87":{"position":[[236,11],[2581,13],[3007,11]]},"423":{"position":[[756,10],[876,11],[888,10],[911,10],[1261,13]]}}}],["hacker",{"_index":1366,"t":{"150":{"position":[[352,7],[1683,6],[1781,6],[2472,6],[2534,6]]}}}],["hair",{"_index":1424,"t":{"150":{"position":[[2115,6]]}}}],["hallucin",{"_index":61,"t":{"3":{"position":[[812,13]]},"7":{"position":[[91,14],[861,14]]},"11":{"position":[[1021,14]]},"27":{"position":[[2269,14]]},"62":{"position":[[469,15]]},"204":{"position":[[211,15]]}}}],["hamper",{"_index":378,"t":{"17":{"position":[[939,9]]}}}],["handl",{"_index":488,"t":{"21":{"position":[[619,9]]},"48":{"position":[[1359,8],[3596,7],[4235,6],[6465,6]]},"140":{"position":[[398,6]]},"257":{"position":[[0,8],[52,6],[243,6]]},"305":{"position":[[346,6]]}}}],["handler",{"_index":1797,"t":{"257":{"position":[[226,7]]}}}],["happen",{"_index":913,"t":{"52":{"position":[[167,8]]},"99":{"position":[[258,7]]},"150":{"position":[[589,7]]},"158":{"position":[[64,8]]},"160":{"position":[[213,8]]},"162":{"position":[[1369,10]]},"255":{"position":[[733,8]]},"257":{"position":[[616,8]]}}}],["happi",{"_index":1156,"t":{"89":{"position":[[417,5]]}}}],["hard",{"_index":1380,"t":{"150":{"position":[[826,4],[1497,4],[2554,4]]}}}],["hardwar",{"_index":2046,"t":{"343":{"position":[[31,8]]}}}],["have",{"_index":1003,"t":{"79":{"position":[[152,6]]},"87":{"position":[[126,6],[3093,6]]},"89":{"position":[[118,6],[509,6]]},"321":{"position":[[20,6]]}}}],["haven't",{"_index":1261,"t":{"107":{"position":[[375,7]]},"200":{"position":[[463,7]]},"429":{"position":[[291,7]]}}}],["head",{"_index":290,"t":{"15":{"position":[[44,7]]},"27":{"position":[[753,4]]}}}],["header",{"_index":693,"t":{"38":{"position":[[400,8],[418,7]]},"42":{"position":[[611,10],[647,7]]},"85":{"position":[[644,8]]},"146":{"position":[[157,9]]},"317":{"position":[[1708,8]]},"384":{"position":[[609,8]]}}}],["health",{"_index":301,"t":{"15":{"position":[[285,7]]}}}],["healthcar",{"_index":717,"t":{"42":{"position":[[334,12],[1067,11]]}}}],["heavi",{"_index":1615,"t":{"204":{"position":[[196,5]]},"307":{"position":[[407,5]]}}}],["heavyweight",{"_index":1642,"t":{"222":{"position":[[288,11]]}}}],["help",{"_index":635,"t":{"27":{"position":[[2336,5]]},"48":{"position":[[1002,8]]},"89":{"position":[[133,4]]},"162":{"position":[[2313,4]]},"164":{"position":[[75,4]]},"170":{"position":[[655,7],[807,4]]},"257":{"position":[[43,4]]},"298":{"position":[[473,4]]},"331":{"position":[[46,4]]},"435":{"position":[[154,4]]}}}],["helper",{"_index":1969,"t":{"317":{"position":[[2226,6]]}}}],["here",{"_index":771,"t":{"48":{"position":[[819,5]]},"56":{"position":[[371,5]]},"68":{"position":[[615,5]]},"89":{"position":[[490,5]]},"130":{"position":[[0,4]]},"140":{"position":[[365,5]]},"211":{"position":[[450,5]]},"249":{"position":[[10,4],[312,5]]},"253":{"position":[[268,4]]},"257":{"position":[[14,4]]},"261":{"position":[[330,5],[384,5]]},"331":{"position":[[17,4]]},"345":{"position":[[15,5],[99,5]]},"357":{"position":[[8,4]]},"421":{"position":[[176,5]]},"425":{"position":[[73,4]]},"435":{"position":[[521,5]]}}}],["here'",{"_index":345,"t":{"17":{"position":[[249,6]]},"23":{"position":[[167,6]]},"42":{"position":[[0,6]]},"132":{"position":[[0,6]]},"134":{"position":[[0,6]]},"144":{"position":[[98,6]]},"162":{"position":[[0,6]]},"234":{"position":[[175,6]]},"239":{"position":[[1414,6]]},"249":{"position":[[411,6]]},"257":{"position":[[1583,6]]},"317":{"position":[[2193,6]]},"382":{"position":[[4,6]]},"384":{"position":[[211,6]]}}}],["here}export",{"_index":2273,"t":{"421":{"position":[[128,11]]}}}],["hf\"embedding=\"mistralai:nom",{"_index":2092,"t":{"353":{"position":[[321,29]]}}}],["hf\"smart_llm=\"together:meta",{"_index":2090,"t":{"353":{"position":[[215,27]]}}}],["hf\"strategic_llm=\"together:meta",{"_index":2091,"t":{"353":{"position":[[266,31]]}}}],["high",{"_index":772,"t":{"48":{"position":[[830,4]]},"77":{"position":[[251,4]]},"150":{"position":[[741,5]]},"170":{"position":[[886,4]]},"172":{"position":[[1046,4]]},"224":{"position":[[82,4],[112,4],[124,4],[179,4]]},"239":{"position":[[1200,4]]},"255":{"position":[[1233,4]]}}}],["higher",{"_index":1305,"t":{"121":{"position":[[64,6]]}}}],["highli",{"_index":738,"t":{"46":{"position":[[14,6]]},"172":{"position":[[862,6]]}}}],["histor",{"_index":365,"t":{"17":{"position":[[703,10]]},"19":{"position":[[705,10],[880,10]]}}}],["hit",{"_index":1352,"t":{"146":{"position":[[45,7]]}}}],["hold",{"_index":181,"t":{"7":{"position":[[956,5],[1154,4]]},"9":{"position":[[578,4]]},"87":{"position":[[617,4]]}}}],["homepag",{"_index":1627,"t":{"209":{"position":[[65,8]]}}}],["hood",{"_index":481,"t":{"21":{"position":[[269,5]]},"25":{"position":[[119,5]]},"83":{"position":[[889,5]]}}}],["hope",{"_index":1238,"t":{"105":{"position":[[79,4]]},"427":{"position":[[75,4]]}}}],["host",{"_index":1250,"t":{"105":{"position":[[462,4]]},"234":{"position":[[96,7]]},"239":{"position":[[1700,4],[1705,6],[1963,4],[1968,6],[2238,4],[2243,6],[2501,4],[2506,6],[2878,6]]},"317":{"position":[[525,6],[699,4]]},"329":{"position":[[787,6]]},"427":{"position":[[458,4]]}}}],["hour",{"_index":1419,"t":{"150":{"position":[[1919,5]]}}}],["hour.[1]you",{"_index":1422,"t":{"150":{"position":[[2019,11]]}}}],["href",{"_index":2317,"t":{"433":{"position":[[1740,4],[1961,7]]}}}],["html",{"_index":1901,"t":{"305":{"position":[[159,4],[211,4]]}}}],["html/css/j",{"_index":1629,"t":{"211":{"position":[[260,13]]}}}],["html/j",{"_index":1632,"t":{"215":{"position":[[488,7]]}}}],["http",{"_index":694,"t":{"38":{"position":[[430,4]]},"42":{"position":[[642,4]]},"239":{"position":[[361,5],[1452,6]]},"305":{"position":[[102,4]]}}}],["http://example.com/page1",{"_index":2219,"t":{"394":{"position":[[121,27]]}}}],["http://example.com/page2",{"_index":2221,"t":{"394":{"position":[[196,27]]}}}],["http://localhost:3000",{"_index":1291,"t":{"111":{"position":[[345,21]]},"239":{"position":[[1557,22],[2095,22]]}}}],["http://localhost:5000/report/research_report?query=what",{"_index":1867,"t":{"275":{"position":[[898,56]]}}}],["http://localhost:8000",{"_index":1278,"t":{"109":{"position":[[235,21]]},"176":{"position":[[153,21]]},"184":{"position":[[161,21]]},"239":{"position":[[1820,22],[2358,22]]}}}],["http_upgrad",{"_index":1728,"t":{"239":{"position":[[1629,14],[1731,14],[1892,14],[2167,14],[2269,14],[2430,14]]}}}],["https://$host$request_uri",{"_index":1745,"t":{"239":{"position":[[2914,26]]}}}],["https://accredianpublication.medium.com/build",{"_index":2320,"t":{"433":{"position":[[1969,49]]}}}],["https://api.python.langchain.com/en/latest/retrievers/langchain_core.retrievers.baseretriever.html#langchain_core.retrievers.baseretriever.invok",{"_index":1232,"t":{"101":{"position":[[1329,145]]}}}],["https://app.tavily.com/sign",{"_index":1764,"t":{"249":{"position":[[318,27]]}}}],["https://console.groq.com/key",{"_index":2055,"t":{"345":{"position":[[105,29]]}}}],["https://console.groq.com/login",{"_index":2054,"t":{"345":{"position":[[21,30]]}}}],["https://doc.courtbouillon.org/weasyprint/stable/first_steps.html",{"_index":1975,"t":{"323":{"position":[[143,64]]}}}],["https://download.docker.com/linux/ubuntu",{"_index":1700,"t":{"239":{"position":[[713,40]]}}}],["https://download.docker.com/linux/ubuntu/gpg",{"_index":1688,"t":{"239":{"position":[[462,44]]}}}],["https://en.wikipedia.org/wiki/artificial_intellig",{"_index":1188,"t":{"93":{"position":[[965,56]]}}}],["https://github.com/assafelovic/gpt",{"_index":1637,"t":{"220":{"position":[[390,34]]},"226":{"position":[[204,34]]}}}],["https://github.com/yourusername/gpt",{"_index":1596,"t":{"188":{"position":[[32,35]]}}}],["https://ollama",{"_index":2162,"t":{"382":{"position":[[277,15]]}}}],["https://paulgraham.com/wealth.htmlessay",{"_index":1363,"t":{"150":{"position":[[259,39]]}}}],["https://platform.openai.com/api",{"_index":1765,"t":{"249":{"position":[[349,31]]}}}],["https://www.docker.com/products/dock",{"_index":1614,"t":{"200":{"position":[[81,38]]}}}],["https://www.forbes.com/advisor/business/ai",{"_index":1190,"t":{"93":{"position":[[1091,43]]}}}],["https://www.ibm.com/think/insights/artifici",{"_index":1189,"t":{"93":{"position":[[1022,46]]}}}],["https://www.npr.org/2023/09/28/1202110410/how",{"_index":1814,"t":{"257":{"position":[[1706,45],[1837,46]]}}}],["https://xxxx.xxx.doc",{"_index":1320,"t":{"134":{"position":[[595,23]]}}}],["https://xxxx.xxx.pdf",{"_index":1317,"t":{"130":{"position":[[56,20]]},"134":{"position":[[570,24]]}}}],["huggingface_api_key=[your",{"_index":2095,"t":{"355":{"position":[[143,25]]}}}],["human",{"_index":45,"t":{"3":{"position":[[550,5]]},"5":{"position":[[177,5]]},"89":{"position":[[63,5],[127,5],[310,5]]},"414":{"position":[[45,5],[57,5]]}}}],["hundr",{"_index":318,"t":{"15":{"position":[[646,8]]},"150":{"position":[[521,8]]}}}],["hybrid",{"_index":358,"t":{"17":{"position":[[477,6],[1089,6]]},"19":{"position":[[36,6],[1735,6],[2111,6]]},"21":{"position":[[101,6],[692,6]]},"25":{"position":[[619,6],[848,6]]},"27":{"position":[[48,6],[588,6],[696,6],[830,6],[978,8],[1035,7],[1663,8],[2678,6]]},"29":{"position":[[0,6],[452,6]]},"70":{"position":[[27,6]]},"99":{"position":[[45,6],[229,8]]},"119":{"position":[[209,6]]},"132":{"position":[[29,6],[516,8]]},"134":{"position":[[29,6],[545,8]]}}}],["hype",{"_index":1137,"t":{"87":{"position":[[2428,4]]},"423":{"position":[[1064,4]]}}}],["hyperlink",{"_index":1142,"t":{"87":{"position":[[2697,11]]}}}],["i'm",{"_index":353,"t":{"17":{"position":[[388,3]]},"150":{"position":[[2348,3]]}}}],["i.",{"_index":1177,"t":{"93":{"position":[[279,5]]}}}],["id",{"_index":897,"t":{"48":{"position":[[7767,3],[8211,3]]}}}],["idea",{"_index":103,"t":{"5":{"position":[[341,4]]},"7":{"position":[[1255,4],[1389,4]]},"9":{"position":[[68,4]]},"206":{"position":[[9,4]]}}}],["ideal",{"_index":1631,"t":{"215":{"position":[[92,5]]},"218":{"position":[[19,5]]}}}],["identifi",{"_index":1508,"t":{"162":{"position":[[1043,10],[1727,10]]},"170":{"position":[[815,11]]}}}],["ignor",{"_index":608,"t":{"27":{"position":[[1181,6]]},"87":{"position":[[2970,6]]}}}],["imag",{"_index":312,"t":{"15":{"position":[[556,7]]},"162":{"position":[[1715,6],[1812,6],[1842,6],[1906,7]]},"164":{"position":[[334,6]]},"166":{"position":[[178,6]]},"170":{"position":[[1276,6]]},"172":{"position":[[1130,6]]},"263":{"position":[[683,7],[844,9]]},"285":{"position":[[20,6]]},"287":{"position":[[68,7]]}}}],["imagin",{"_index":307,"t":{"15":{"position":[[464,7],[606,7],[732,7]]}}}],["immedi",{"_index":2,"t":{"3":{"position":[[32,11]]}}}],["impact",{"_index":713,"t":{"42":{"position":[[290,6],[1051,6]]},"194":{"position":[[219,6]]},"270":{"position":[[39,6]]},"313":{"position":[[426,6]]}}}],["implement",{"_index":574,"t":{"25":{"position":[[698,12]]},"48":{"position":[[1494,9]]},"220":{"position":[[586,14]]},"317":{"position":[[325,11]]},"374":{"position":[[220,9]]},"433":{"position":[[886,9],[947,9]]}}}],["import",{"_index":498,"t":{"23":{"position":[[234,6],[436,6],[499,6],[550,6]]},"27":{"position":[[1212,6]]},"42":{"position":[[65,6],[92,6],[139,6],[175,6]]},"48":{"position":[[5378,6],[5421,6],[5446,6]]},"52":{"position":[[20,6]]},"75":{"position":[[570,9]]},"77":{"position":[[172,9],[289,9]]},"85":{"position":[[1140,6],[1473,6]]},"87":{"position":[[1248,9]]},"93":{"position":[[535,6]]},"95":{"position":[[304,6]]},"97":{"position":[[556,6]]},"101":{"position":[[134,6],[161,6],[198,6],[255,6],[292,6],[331,6]]},"125":{"position":[[201,6]]},"132":{"position":[[66,6]]},"134":{"position":[[66,6]]},"150":{"position":[[20,6],[69,6],[119,6],[180,6],[222,6]]},"152":{"position":[[20,6],[77,6],[114,6]]},"154":{"position":[[310,6],[368,6],[416,6]]},"255":{"position":[[97,6],[234,6]]},"257":{"position":[[114,6],[164,6]]},"263":{"position":[[20,6]]},"273":{"position":[[13,6],[47,6]]},"275":{"position":[[94,6],[144,6]]},"329":{"position":[[621,9]]},"331":{"position":[[162,6],[205,6],[260,6]]},"382":{"position":[[72,6],[190,6],[245,6]]},"433":{"position":[[158,6],[184,6],[236,6],[287,6],[346,6]]}}}],["importerror",{"_index":1916,"t":{"313":{"position":[[128,11]]}}}],["impress",{"_index":270,"t":{"11":{"position":[[993,11]]}}}],["improv",{"_index":131,"t":{"5":{"position":[[910,8],[1002,7]]},"7":{"position":[[540,7]]},"11":{"position":[[1093,8]]},"15":{"position":[[98,8],[763,7]]},"19":{"position":[[1345,8]]},"25":{"position":[[864,8]]},"27":{"position":[[2202,7],[2350,7]]},"29":{"position":[[376,8]]},"35":{"position":[[271,8]]},"48":{"position":[[84,12],[8659,8]]},"60":{"position":[[150,7]]},"64":{"position":[[28,9],[92,9],[221,9]]},"79":{"position":[[67,8]]},"89":{"position":[[667,7]]},"412":{"position":[[62,8]]},"435":{"position":[[60,12]]}}}],["includ",{"_index":288,"t":{"13":{"position":[[429,8]]},"17":{"position":[[612,7]]},"27":{"position":[[859,7],[1120,7],[2501,8]]},"40":{"position":[[371,8]]},"48":{"position":[[1326,8],[2040,7],[5907,7]]},"83":{"position":[[1202,9]]},"87":{"position":[[2664,7]]},"95":{"position":[[705,9]]},"136":{"position":[[143,8]]},"150":{"position":[[3001,7],[3047,7]]},"152":{"position":[[570,7]]},"160":{"position":[[580,9],[824,8]]},"162":{"position":[[261,8]]},"164":{"position":[[126,9]]},"170":{"position":[[144,7],[280,8]]},"172":{"position":[[192,8]]},"192":{"position":[[128,8]]},"200":{"position":[[167,8]]},"211":{"position":[[222,8]]},"215":{"position":[[469,9]]},"220":{"position":[[42,9],[149,8]]},"239":{"position":[[2728,7]]},"257":{"position":[[1984,7]]},"281":{"position":[[63,8]]},"287":{"position":[[38,9]]},"419":{"position":[[624,9]]},"433":{"position":[[1711,7],[1949,11]]}}}],["include_human_feedback",{"_index":2276,"t":{"423":{"position":[[337,22],[1184,25]]}}}],["incom",{"_index":1921,"t":{"317":{"position":[[208,8]]}}}],["incomplet",{"_index":377,"t":{"17":{"position":[[908,10]]}}}],["inconsist",{"_index":1110,"t":{"87":{"position":[[453,15]]}}}],["increas",{"_index":1328,"t":{"138":{"position":[[270,8]]}}}],["indent=4",{"_index":2314,"t":{"433":{"position":[[1581,9]]}}}],["index",{"_index":1220,"t":{"101":{"position":[[591,5]]},"239":{"position":[[862,5]]}}}],["index.as_retriever(search_kwargs=search_kwargs)async",{"_index":1225,"t":{"101":{"position":[[728,52]]}}}],["indic",{"_index":460,"t":{"19":{"position":[[1974,10]]},"160":{"position":[[601,9],[840,10]]},"162":{"position":[[189,9],[330,9],[546,9],[623,9],[889,9],[1142,8],[1214,9],[1322,10],[1471,9],[1545,9],[1933,9],[2083,9],[2241,9],[2446,9],[2672,10],[2743,9],[2865,9],[3033,9],[3340,9],[3508,9],[3665,9],[3961,9],[4050,10],[4137,9],[4293,9]]}}}],["industri",{"_index":403,"t":{"19":{"position":[[338,8]]},"27":{"position":[[1636,10],[1957,10],[2026,8]]},"132":{"position":[[489,10]]},"134":{"position":[[518,10]]}}}],["inevit",{"_index":1388,"t":{"150":{"position":[[1084,10]]}}}],["infer",{"_index":2049,"t":{"343":{"position":[[101,9]]}}}],["influx",{"_index":304,"t":{"15":{"position":[[408,6]]}}}],["info",{"_index":1547,"t":{"170":{"position":[[128,5]]}}}],["inform",{"_index":25,"t":{"3":{"position":[[253,12],[694,11]]},"7":{"position":[[510,11],[975,11],[1168,11],[1219,11]]},"11":{"position":[[35,11],[367,12],[524,12],[695,12],[936,11]]},"13":{"position":[[317,11],[447,12]]},"15":{"position":[[451,12],[691,11]]},"17":{"position":[[232,12],[582,11],[976,8]]},"19":{"position":[[205,12],[662,12],[980,8],[1495,11],[1793,11]]},"21":{"position":[[428,11]]},"25":{"position":[[763,12]]},"27":{"position":[[2324,11]]},"29":{"position":[[659,12]]},"44":{"position":[[402,11]]},"48":{"position":[[493,11],[702,11],[1852,11],[1960,12],[2486,11],[5332,12],[5719,11],[5827,12],[7468,11],[8695,12]]},"62":{"position":[[34,11],[197,12],[262,11],[349,11]]},"83":{"position":[[430,12]]},"87":{"position":[[883,12]]},"140":{"position":[[417,11],[825,11],[909,11]]},"158":{"position":[[191,11]]},"160":{"position":[[551,11],[1015,11]]},"162":{"position":[[1078,12],[1283,12]]},"170":{"position":[[994,11],[1151,11],[1257,11]]},"172":{"position":[[984,12],[1088,11]]},"204":{"position":[[119,12],[178,12]]},"206":{"position":[[158,11],[269,11],[802,11],[898,11]]},"255":{"position":[[1058,11],[1125,11],[1255,12]]},"257":{"position":[[805,13],[840,15]]},"263":{"position":[[265,11]]},"277":{"position":[[63,11]]},"279":{"position":[[46,11]]},"281":{"position":[[29,11]]},"435":{"position":[[613,12]]},"439":{"position":[[43,11]]}}}],["init(self",{"_index":2295,"t":{"433":{"position":[[747,11]]}}}],["init_research_team(self",{"_index":1074,"t":{"85":{"position":[[2090,25]]}}}],["initi",{"_index":598,"t":{"27":{"position":[[557,10],[648,11]]},"38":{"position":[[28,11],[183,7]]},"40":{"position":[[46,7]]},"42":{"position":[[440,7]]},"48":{"position":[[2789,8],[5467,10]]},"52":{"position":[[259,10]]},"75":{"position":[[34,7]]},"83":{"position":[[287,7],[571,7]]},"85":{"position":[[1078,10],[1199,12],[1579,10],[2049,10],[2118,10],[3395,14]]},"162":{"position":[[457,9],[593,7]]},"257":{"position":[[301,10],[928,10]]},"294":{"position":[[96,12]]},"398":{"position":[[155,10]]},"419":{"position":[[135,7],[247,7]]},"433":{"position":[[480,10]]}}}],["initial_research",{"_index":1050,"t":{"85":{"position":[[549,17]]}}}],["initializewebsocket",{"_index":1931,"t":{"317":{"position":[[654,21],[1587,22]]}}}],["inmemoryvectorstore(embedding=openaiembeddings())queri",{"_index":1473,"t":{"154":{"position":[[454,54]]}}}],["inmemoryvectorstorefrom",{"_index":1471,"t":{"154":{"position":[[375,23]]}}}],["inner",{"_index":1639,"t":{"222":{"position":[[213,5]]}}}],["innov",{"_index":327,"t":{"15":{"position":[[848,10]]},"89":{"position":[[1168,10]]}}}],["input",{"_index":1296,"t":{"115":{"position":[[93,5]]},"154":{"position":[[177,9]]},"374":{"position":[[609,5]]}}}],["input(\"y",{"_index":814,"t":{"48":{"position":[[2896,11],[7919,11]]}}}],["insid",{"_index":1676,"t":{"239":{"position":[[286,6]]}}}],["insight",{"_index":339,"t":{"17":{"position":[[149,8],[929,9],[1214,10]]},"19":{"position":[[1704,9],[1725,9],[1864,9]]},"29":{"position":[[424,9]]},"48":{"position":[[1590,8]]},"136":{"position":[[65,8],[309,9]]}}}],["inspect",{"_index":1348,"t":{"144":{"position":[[47,7]]},"172":{"position":[[749,11]]}}}],["inspir",{"_index":658,"t":{"33":{"position":[[25,8]]},"56":{"position":[[359,11]]},"79":{"position":[[329,8]]},"412":{"position":[[147,8]]}}}],["instal",{"_index":582,"t":{"27":{"position":[[148,7],[185,7]]},"107":{"position":[[9,7]]},"109":{"position":[[111,7],[142,7]]},"111":{"position":[[197,7],[234,7],[260,7]]},"121":{"position":[[71,9],[116,10]]},"123":{"position":[[4,7]]},"176":{"position":[[9,7],[36,7]]},"180":{"position":[[522,7],[612,7],[707,7]]},"182":{"position":[[89,7],[622,7]]},"188":{"position":[[105,7],[144,7]]},"200":{"position":[[28,7]]},"209":{"position":[[47,7]]},"218":{"position":[[335,13],[353,7]]},"220":{"position":[[451,12]]},"226":{"position":[[94,8],[107,7],[254,12]]},"228":{"position":[[119,7]]},"236":{"position":[[52,7]]},"239":{"position":[[27,7],[75,7],[101,7],[130,12],[196,7],[308,7],[339,7],[878,7],[917,7],[1172,7],[1232,7],[1255,7]]},"261":{"position":[[78,9],[107,7],[172,7]]},"275":{"position":[[15,7],[55,7]]},"307":{"position":[[544,13]]},"309":{"position":[[67,7],[101,7]]},"313":{"position":[[66,9],[178,9]]},"323":{"position":[[219,7],[274,7],[302,7],[426,7],[458,7]]},"325":{"position":[[25,7],[53,7],[92,7],[124,7],[241,7],[302,7],[322,7],[359,7],[400,7],[461,7]]},"329":{"position":[[333,7],[487,10],[525,13]]},"421":{"position":[[0,7],[31,7]]},"425":{"position":[[4,7]]},"429":{"position":[[9,7]]},"431":{"position":[[15,7],[50,7]]}}}],["installation:sudo",{"_index":1709,"t":{"239":{"position":[[955,17],[1368,17]]}}}],["instanc",{"_index":606,"t":{"27":{"position":[[952,8]]},"42":{"position":[[989,8]]},"85":{"position":[[1911,8]]},"87":{"position":[[586,9]]},"97":{"position":[[386,8]]},"101":{"position":[[80,10]]},"150":{"position":[[3127,8]]},"152":{"position":[[661,8]]},"154":{"position":[[537,8]]},"257":{"position":[[1502,9]]},"307":{"position":[[109,8]]},"374":{"position":[[159,9]]},"382":{"position":[[911,9]]},"404":{"position":[[82,8]]},"406":{"position":[[106,8]]}}}],["instancellm_provid",{"_index":2167,"t":{"382":{"position":[[381,20]]}}}],["instanti",{"_index":963,"t":{"68":{"position":[[567,11]]},"433":{"position":[[1301,11]]}}}],["instruct",{"_index":775,"t":{"48":{"position":[[965,12],[1737,13]]},"68":{"position":[[8,8]]},"95":{"position":[[33,11]]},"97":{"position":[[8,8]]},"99":{"position":[[83,8]]},"101":{"position":[[8,8]]},"200":{"position":[[65,12]]},"220":{"position":[[464,12]]},"226":{"position":[[267,12]]}}}],["instruct\"embedding=\"fireworks:nom",{"_index":2128,"t":{"363":{"position":[[289,35]]}}}],["instruct\"smart_llm=\"fireworks:accounts/fireworks/models/mixtr",{"_index":2126,"t":{"363":{"position":[[147,63]]}}}],["instruct\"strategic_llm=\"fireworks:accounts/fireworks/models/mixtr",{"_index":2127,"t":{"363":{"position":[[216,67]]}}}],["instructions=assistant_prompt_instruct",{"_index":798,"t":{"48":{"position":[[2327,42],[7309,42]]}}}],["int",{"_index":2233,"t":{"398":{"position":[[436,4],[542,4],[661,4]]}}}],["integr",{"_index":452,"t":{"19":{"position":[[1766,11]]},"48":{"position":[[852,11]]},"215":{"position":[[102,11]]},"218":{"position":[[118,11]]},"220":{"position":[[285,12]]},"224":{"position":[[70,11]]},"226":{"position":[[130,11]]},"355":{"position":[[5,11]]},"388":{"position":[[494,10]]}}}],["intellig",{"_index":715,"t":{"42":{"position":[[311,12]]},"93":{"position":[[1069,12]]},"194":{"position":[[186,13],[240,12]]}}}],["intens",{"_index":1403,"t":{"150":{"position":[[1458,9]]}}}],["interact",{"_index":1042,"t":{"85":{"position":[[336,12]]},"115":{"position":[[193,11]]},"215":{"position":[[202,8]]},"305":{"position":[[426,11]]},"307":{"position":[[331,12]]},"311":{"position":[[134,8],[322,12]]}}}],["interest",{"_index":742,"t":{"46":{"position":[[84,11],[186,10]]},"64":{"position":[[356,10]]},"83":{"position":[[1473,11]]},"255":{"position":[[24,10]]},"435":{"position":[[527,10]]}}}],["interfac",{"_index":1014,"t":{"81":{"position":[[231,10]]},"105":{"position":[[233,9]]},"115":{"position":[[70,10]]},"211":{"position":[[250,9]]},"215":{"position":[[234,11]]},"427":{"position":[[229,9]]}}}],["interfer",{"_index":46,"t":{"3":{"position":[[556,12]]},"5":{"position":[[183,13]]}}}],["intern",{"_index":410,"t":{"19":{"position":[[462,8],[1211,8]]},"27":{"position":[[2052,8]]},"136":{"position":[[232,8]]}}}],["internet",{"_index":791,"t":{"48":{"position":[[1873,9],[5740,9]]},"56":{"position":[[101,8]]},"83":{"position":[[274,8]]},"419":{"position":[[122,8]]}}}],["interpret",{"_index":757,"t":{"48":{"position":[[384,12],[1034,12],[8724,11]]}}}],["intervent",{"_index":1154,"t":{"89":{"position":[[316,12]]}}}],["introduc",{"_index":355,"t":{"17":{"position":[[403,9]]},"72":{"position":[[0,11]]}}}],["introduct",{"_index":676,"t":{"35":{"position":[[135,13]]},"83":{"position":[[1215,13]]},"85":{"position":[[691,13]]},"162":{"position":[[2910,12],[2977,12],[3047,12],[3125,12]]},"209":{"position":[[5,12]]},"419":{"position":[[637,13]]}}}],["introduction_written",{"_index":1526,"t":{"162":{"position":[[3011,21]]}}}],["introspect",{"_index":1993,"t":{"325":{"position":[[386,13]]}}}],["intuit",{"_index":998,"t":{"77":{"position":[[531,9]]},"115":{"position":[[51,9]]}}}],["invalu",{"_index":733,"t":{"44":{"position":[[305,10]]}}}],["invest",{"_index":430,"t":{"19":{"position":[[989,10]]}}}],["investig",{"_index":1600,"t":{"192":{"position":[[49,12]]}}}],["invoc",{"_index":784,"t":{"48":{"position":[[1435,10]]}}}],["involv",{"_index":573,"t":{"25":{"position":[[642,8]]},"150":{"position":[[694,7]]}}}],["ironi",{"_index":149,"t":{"7":{"position":[[194,5]]}}}],["irrelev",{"_index":941,"t":{"62":{"position":[[251,10]]},"204":{"position":[[246,10]]}}}],["isn't",{"_index":1351,"t":{"146":{"position":[[39,5]]}}}],["iso",{"_index":1487,"t":{"160":{"position":[[81,3]]}}}],["isol",{"_index":376,"t":{"17":{"position":[[885,10]]},"29":{"position":[[288,10]]},"182":{"position":[[354,8],[770,8]]}}}],["issu",{"_index":82,"t":{"5":{"position":[[32,6]]},"9":{"position":[[8,5]]},"87":{"position":[[684,6]]},"138":{"position":[[8,7],[203,7]]},"170":{"position":[[679,6]]},"230":{"position":[[11,6]]},"323":{"position":[[4,5],[336,5]]},"329":{"position":[[19,5]]},"394":{"position":[[429,6]]}}}],["it'",{"_index":469,"t":{"21":{"position":[[33,4]]},"33":{"position":[[166,4]]},"313":{"position":[[80,4]]},"329":{"position":[[353,4],[539,4],[616,4]]}}}],["item",{"_index":120,"t":{"5":{"position":[[682,5]]}}}],["iter",{"_index":2306,"t":{"433":{"position":[[1233,7]]}}}],["itself",{"_index":1482,"t":{"158":{"position":[[321,6]]},"160":{"position":[[146,7]]}}}],["it’",{"_index":275,"t":{"11":{"position":[[1061,4]]},"15":{"position":[[937,4]]},"48":{"position":[[4062,4]]},"87":{"position":[[2284,4]]}}}],["i’v",{"_index":248,"t":{"11":{"position":[[216,4]]},"83":{"position":[[1491,4]]}}}],["javascript",{"_index":1630,"t":{"211":{"position":[[302,10]]},"305":{"position":[[379,10]]},"307":{"position":[[166,10],[396,10]]},"311":{"position":[[218,10]]}}}],["job",{"_index":1414,"t":{"150":{"position":[[1725,3]]},"194":{"position":[[256,3]]}}}],["job.[2]if",{"_index":1434,"t":{"150":{"position":[[2448,9]]}}}],["jobdescript",{"_index":1428,"t":{"150":{"position":[[2245,14]]}}}],["join",{"_index":745,"t":{"46":{"position":[[200,7]]},"89":{"position":[[1387,4]]},"150":{"position":[[463,4]]},"435":{"position":[[335,4]]}}}],["journey",{"_index":2323,"t":{"435":{"position":[[351,8]]}}}],["json",{"_index":1480,"t":{"158":{"position":[[18,4]]},"168":{"position":[[236,5]]},"172":{"position":[[19,4]]},"257":{"position":[[250,4],[396,4]]}}}],["json.parse(event.data",{"_index":1938,"t":{"317":{"position":[[911,23]]}}}],["json.stringify(data",{"_index":1961,"t":{"317":{"position":[[1789,21]]}}}],["jsonifi",{"_index":1866,"t":{"275":{"position":[[642,9]]}}}],["jsonifyfrom",{"_index":1860,"t":{"275":{"position":[[117,11]]}}}],["jsonimport",{"_index":874,"t":{"48":{"position":[[5394,10]]}}}],["juli",{"_index":1973,"t":{"321":{"position":[[119,5]]}}}],["jun",{"_index":2318,"t":{"433":{"position":[[1792,4]]}}}],["k",{"_index":572,"t":{"25":{"position":[[501,1]]},"101":{"position":[[1534,4]]},"154":{"position":[[917,1]]}}}],["k=3)for",{"_index":561,"t":{"23":{"position":[[1972,7]]}}}],["keep",{"_index":59,"t":{"3":{"position":[[771,7]]},"13":{"position":[[384,4]]},"89":{"position":[[1322,4]]},"206":{"position":[[914,4]]},"211":{"position":[[324,5]]}}}],["key",{"_index":393,"t":{"19":{"position":[[99,3]]},"21":{"position":[[576,3]]},"23":{"position":[[1876,3]]},"27":{"position":[[365,4],[539,4]]},"85":{"position":[[450,4]]},"87":{"position":[[306,3]]},"89":{"position":[[84,3],[576,3]]},"107":{"position":[[77,4]]},"121":{"position":[[141,3],[201,3]]},"125":{"position":[[16,4]]},"136":{"position":[[174,3]]},"138":{"position":[[4,3],[32,4]]},"150":{"position":[[3009,3]]},"170":{"position":[[1039,3]]},"172":{"position":[[830,3]]},"188":{"position":[[268,4]]},"198":{"position":[[140,4]]},"200":{"position":[[225,4]]},"249":{"position":[[302,4],[381,4]]},"253":{"position":[[248,4],[513,5],[981,5]]},"261":{"position":[[263,3],[326,3],[380,3]]},"335":{"position":[[52,5]]},"343":{"position":[[205,4]]},"345":{"position":[[95,3],[156,4]]},"347":{"position":[[108,5]]},"349":{"position":[[64,4]]},"351":{"position":[[26,4]]},"357":{"position":[[47,3]]},"388":{"position":[[220,3]]},"398":{"position":[[821,3]]},"400":{"position":[[63,3],[211,3],[362,3],[506,3],[644,3]]},"421":{"position":[[124,3],[172,3]]},"429":{"position":[[77,4]]}}}],["key:curl",{"_index":1686,"t":{"239":{"position":[[447,8]]}}}],["key]azure_openai_endpoint=https://{your",{"_index":2037,"t":{"339":{"position":[[419,39]]}}}],["key]base_url=\"https://api.fireworks.ai/inference/v1/completions\"fast_llm=\"fireworks:accounts/fireworks/models/mixtr",{"_index":2125,"t":{"363":{"position":[[24,117]]}}}],["key]embedding=\"voyageai:voyag",{"_index":2140,"t":{"372":{"position":[[21,30]]}}}],["key]fast_llm=\"anthropic:claud",{"_index":2074,"t":{"349":{"position":[[141,30]]}}}],["key]fast_llm=\"cohere:command\"smart_llm=\"cohere:command",{"_index":2119,"t":{"361":{"position":[[21,54]]}}}],["key]fast_llm=\"google_genai:gemini",{"_index":2107,"t":{"357":{"position":[[107,33]]}}}],["key]fast_llm=\"huggingface:huggingfaceh4/zephyr",{"_index":2096,"t":{"355":{"position":[[169,46]]}}}],["key]fast_llm=\"mistralai:open",{"_index":2081,"t":{"351":{"position":[[106,28]]}}}],["key]fast_llm=\"together:meta",{"_index":2087,"t":{"353":{"position":[[165,27]]}}}],["keyembedding=\"azure_openai:text",{"_index":1776,"t":{"253":{"position":[[540,31]]}}}],["keyopenai_api_key=\"dummy_key",{"_index":2031,"t":{"337":{"position":[[195,30],[510,30]]}}}],["keyopenai_api_key=[your",{"_index":2023,"t":{"335":{"position":[[28,23]]}}}],["keyring.gpg",{"_index":1693,"t":{"239":{"position":[[566,14],[700,12]]}}}],["keysclient",{"_index":879,"t":{"48":{"position":[[5495,10]]}}}],["key}export",{"_index":595,"t":{"27":{"position":[[500,10]]}}}],["kind",{"_index":1491,"t":{"160":{"position":[[623,4]]}}}],["know",{"_index":1107,"t":{"87":{"position":[[248,7]]},"150":{"position":[[873,7],[923,4]]}}}],["knowledg",{"_index":367,"t":{"17":{"position":[[732,10]]},"19":{"position":[[259,10]]},"21":{"position":[[773,9]]},"48":{"position":[[2003,9],[5870,9]]},"218":{"position":[[277,9]]}}}],["kwarg",{"_index":2263,"t":{"404":{"position":[[138,9]]}}}],["l6",{"_index":2102,"t":{"355":{"position":[[376,2]]}}}],["lack",{"_index":139,"t":{"7":{"position":[[39,4]]},"17":{"position":[[552,5]]}}}],["lambda",{"_index":1130,"t":{"87":{"position":[[1790,7]]}}}],["langchain",{"_index":486,"t":{"21":{"position":[[554,10]]},"23":{"position":[[0,9]]},"25":{"position":[[717,10]]},"77":{"position":[[29,9]]},"85":{"position":[[2297,9]]},"101":{"position":[[61,9],[1265,9]]},"222":{"position":[[24,9]]},"228":{"position":[[321,9]]},"253":{"position":[[168,9]]},"339":{"position":[[34,9]]}}}],["langchain.embed",{"_index":508,"t":{"23":{"position":[[478,20]]}}}],["langchain.text_splitt",{"_index":506,"t":{"23":{"position":[[412,23]]},"150":{"position":[[45,23]]}}}],["langchain.vectorstor",{"_index":510,"t":{"23":{"position":[[527,22]]}}}],["langchain_community.document_load",{"_index":497,"t":{"23":{"position":[[197,36]]}}}],["langchain_community.vectorstor",{"_index":1359,"t":{"150":{"position":[[147,32]]},"154":{"position":[[335,32]]}}}],["langchain_core.docu",{"_index":1204,"t":{"101":{"position":[[109,24]]},"150":{"position":[[197,24]]}}}],["langchain_docu",{"_index":1230,"t":{"101":{"position":[[1233,21]]}}}],["langchain_openai",{"_index":1210,"t":{"101":{"position":[[275,16]]},"150":{"position":[[102,16]]},"152":{"position":[[97,16]]},"154":{"position":[[399,16]]}}}],["langchain_postgres.vectorstor",{"_index":1208,"t":{"101":{"position":[[223,31]]},"152":{"position":[[45,31]]}}}],["langchain_retriev",{"_index":1233,"t":{"101":{"position":[[1475,19]]}}}],["langchain_retriever.invoke(\"al",{"_index":1235,"t":{"101":{"position":[[1556,31]]}}}],["langchain_vectorstor",{"_index":1470,"t":{"154":{"position":[[267,22]]}}}],["langgraph",{"_index":986,"t":{"75":{"position":[[812,10],[905,10]]},"77":{"position":[[0,9],[214,9],[437,9]]},"79":{"position":[[14,10]]},"81":{"position":[[182,10],[221,9]]},"85":{"position":[[33,9],[74,9],[1227,9],[2075,10],[3010,9]]},"87":{"position":[[62,10],[576,9],[748,9],[1267,9],[3304,9]]},"89":{"position":[[435,9],[794,9]]},"105":{"position":[[446,9]]},"215":{"position":[[340,10]]},"222":{"position":[[63,9],[478,9],[525,9]]},"226":{"position":[[318,9]]},"228":{"position":[[335,9]]},"412":{"position":[[9,10]]},"414":{"position":[[272,10]]},"425":{"position":[[12,9]]},"427":{"position":[[442,9]]}}}],["langgraph.graph",{"_index":1059,"t":{"85":{"position":[[1124,15]]}}}],["languag",{"_index":1337,"t":{"140":{"position":[[247,8]]},"170":{"position":[[1244,9]]},"172":{"position":[[1025,9]]},"347":{"position":[[333,8]]},"384":{"position":[[66,8],[135,8]]}}}],["larg",{"_index":158,"t":{"7":{"position":[[365,5],[1102,5]]},"138":{"position":[[215,5]]},"339":{"position":[[321,5]]},"351":{"position":[[175,5],[221,5]]}}}],["larger?and",{"_index":1390,"t":{"150":{"position":[[1128,10]]}}}],["last",{"_index":558,"t":{"23":{"position":[[1896,4]]},"87":{"position":[[1243,4]]},"384":{"position":[[716,4]]}}}],["lastli",{"_index":848,"t":{"48":{"position":[[4141,7]]},"62":{"position":[[287,7]]},"89":{"position":[[631,7]]}}}],["late",{"_index":1186,"t":{"93":{"position":[[919,8]]}}}],["latest",{"_index":356,"t":{"17":{"position":[[417,6]]},"19":{"position":[[552,6]]},"48":{"position":[[77,6],[668,6],[2167,6],[2663,7],[7645,7]]},"52":{"position":[[183,6]]},"95":{"position":[[635,6]]},"228":{"position":[[78,6],[193,6],[314,6]]},"255":{"position":[[749,6]]},"257":{"position":[[632,6]]},"266":{"position":[[8,7]]},"329":{"position":[[61,6]]}}}],["latest\"embedding=\"mistralai:mistr",{"_index":2084,"t":{"351":{"position":[[227,35]]}}}],["latest\"strategic_llm=\"mistralai:mistr",{"_index":2083,"t":{"351":{"position":[[181,39]]}}}],["launch",{"_index":1170,"t":{"89":{"position":[[1266,9]]},"184":{"position":[[0,6]]}}}],["laundri",{"_index":1396,"t":{"150":{"position":[[1294,7]]}}}],["law",{"_index":157,"t":{"7":{"position":[[358,3],[1095,3]]},"372":{"position":[[52,3]]}}}],["layout",{"_index":1054,"t":{"85":{"position":[[626,6],[851,6]]},"95":{"position":[[167,7]]}}}],["lead",{"_index":161,"t":{"7":{"position":[[399,4]]},"17":{"position":[[900,4]]},"19":{"position":[[1823,7]]},"62":{"position":[[410,7]]},"79":{"position":[[534,7]]},"172":{"position":[[688,4]]},"353":{"position":[[39,7]]}}}],["learn",{"_index":388,"t":{"17":{"position":[[1068,5]]},"25":{"position":[[15,7]]},"27":{"position":[[787,5],[2562,5]]},"58":{"position":[[455,5]]},"70":{"position":[[46,5]]},"75":{"position":[[673,5]]},"99":{"position":[[390,5]]},"218":{"position":[[435,5]]},"222":{"position":[[496,5]]},"226":{"position":[[3,5]]},"355":{"position":[[68,5]]},"439":{"position":[[97,7],[563,5]]}}}],["legaci",{"_index":1287,"t":{"111":{"position":[[270,6]]},"431":{"position":[[60,6]]}}}],["legal",{"_index":299,"t":{"15":{"position":[[268,6]]}}}],["len(research_imag",{"_index":1854,"t":{"273":{"position":[[621,21]]},"275":{"position":[[746,21]]}}}],["len(research_sourc",{"_index":1856,"t":{"273":{"position":[[658,21]]},"275":{"position":[[783,21]]}}}],["length",{"_index":2240,"t":{"398":{"position":[[720,6]]}}}],["less",{"_index":162,"t":{"7":{"position":[[407,4]]},"87":{"position":[[3100,4]]},"170":{"position":[[1071,4]]},"220":{"position":[[239,4]]}}}],["lesson",{"_index":1628,"t":{"211":{"position":[[46,7]]}}}],["let'",{"_index":466,"t":{"19":{"position":[[2161,5]]},"25":{"position":[[57,5]]},"27":{"position":[[71,5]]},"211":{"position":[[432,5]]},"378":{"position":[[209,5]]}}}],["let’",{"_index":201,"t":{"9":{"position":[[149,5]]},"13":{"position":[[63,5]]},"48":{"position":[[1475,5],[1708,5],[2111,5],[3550,5],[4149,5]]},"77":{"position":[[603,5]]},"85":{"position":[[1370,5],[1947,5],[3417,5]]},"87":{"position":[[731,5]]}}}],["level",{"_index":773,"t":{"48":{"position":[[835,6]]},"170":{"position":[[113,6],[891,5]]},"172":{"position":[[1051,5]]},"249":{"position":[[70,6]]}}}],["lever",{"_index":211,"t":{"9":{"position":[[409,8]]}}}],["leverag",{"_index":63,"t":{"3":{"position":[[842,10]]},"7":{"position":[[461,10]]},"19":{"position":[[1387,8],[2102,8]]},"21":{"position":[[657,8]]},"29":{"position":[[95,10]]},"33":{"position":[[562,9]]},"44":{"position":[[168,10]]},"48":{"position":[[655,8]]},"58":{"position":[[259,10]]},"79":{"position":[[3,10],[100,10],[521,8]]},"83":{"position":[[835,9]]},"87":{"position":[[263,8]]},"206":{"position":[[323,8]]},"215":{"position":[[39,8]]},"218":{"position":[[29,10]]},"317":{"position":[[2212,8]]},"343":{"position":[[127,8]]},"378":{"position":[[348,8]]},"412":{"position":[[95,10]]}}}],["lib",{"_index":1977,"t":{"323":{"position":[[287,3],[439,3]]},"325":{"position":[[38,3],[105,3]]}}}],["libglib2.0",{"_index":1983,"t":{"323":{"position":[[466,10]]}}}],["libpango",{"_index":1984,"t":{"325":{"position":[[132,8]]}}}],["librari",{"_index":213,"t":{"9":{"position":[[425,9]]},"222":{"position":[[488,7]]},"323":{"position":[[25,7]]},"325":{"position":[[343,10]]},"378":{"position":[[130,7]]}}}],["life",{"_index":1400,"t":{"150":{"position":[[1408,4]]}}}],["lifecycl",{"_index":833,"t":{"48":{"position":[[3539,10]]},"182":{"position":[[604,10]]}}}],["lighter",{"_index":1645,"t":{"222":{"position":[[422,7]]}}}],["lightweight",{"_index":1267,"t":{"109":{"position":[[2,11]]},"113":{"position":[[30,11]]},"305":{"position":[[242,11]]}}}],["limit",{"_index":64,"t":{"3":{"position":[[884,11]]},"17":{"position":[[692,7]]},"19":{"position":[[68,11]]},"29":{"position":[[243,11]]},"33":{"position":[[247,6]]},"44":{"position":[[260,11]]},"204":{"position":[[294,7],[477,7]]},"305":{"position":[[326,12]]},"307":{"position":[[422,12]]},"374":{"position":[[266,5]]},"388":{"position":[[247,7]]},"398":{"position":[[473,5],[580,5]]}}}],["line",{"_index":1543,"t":{"170":{"position":[[32,4]]},"353":{"position":[[78,5]]},"382":{"position":[[528,6]]},"384":{"position":[[868,5]]}}}],["link",{"_index":1981,"t":{"323":{"position":[[347,7],[391,4]]},"329":{"position":[[466,4]]}}}],["linkedin.com",{"_index":2142,"t":{"374":{"position":[[287,12]]}}}],["linux",{"_index":1924,"t":{"317":{"position":[[535,6]]},"323":{"position":[[412,5]]},"325":{"position":[[78,5]]}}}],["list",{"_index":199,"t":{"9":{"position":[[94,4],[570,4]]},"27":{"position":[[2114,5]]},"38":{"position":[[191,4],[371,4]]},"93":{"position":[[86,4],[629,5]]},"101":{"position":[[53,4],[168,5]]},"158":{"position":[[44,4]]},"162":{"position":[[104,4],[708,5]]},"268":{"position":[[8,5]]},"285":{"position":[[12,4]]},"287":{"position":[[12,4]]},"329":{"position":[[261,4]]},"394":{"position":[[325,4]]},"423":{"position":[[903,4]]}}}],["list[dict",{"_index":1053,"t":{"85":{"position":[[606,10]]}}}],["list[docu",{"_index":1226,"t":{"101":{"position":[[857,15]]}}}],["list[str",{"_index":1051,"t":{"85":{"position":[[581,9],[734,9]]}}}],["listen",{"_index":1718,"t":{"239":{"position":[[1470,6],[2515,6],[2964,6]]},"317":{"position":[[160,7]]}}}],["live",{"_index":1626,"t":{"209":{"position":[[55,4]]}}}],["llama.cpp",{"_index":2028,"t":{"337":{"position":[[32,9]]}}}],["llama/llama",{"_index":2088,"t":{"353":{"position":[[193,11],[243,11],[298,11]]}}}],["llama3",{"_index":2064,"t":{"347":{"position":[[364,6],[380,6]]}}}],["llama3.1",{"_index":2165,"t":{"382":{"position":[[339,11]]}}}],["llm",{"_index":138,"t":{"7":{"position":[[27,4],[472,4],[615,4],[772,4]]},"19":{"position":[[1378,4]]},"27":{"position":[[295,3],[2346,3]]},"33":{"position":[[257,3]]},"44":{"position":[[275,3]]},"58":{"position":[[270,4]]},"60":{"position":[[120,3]]},"81":{"position":[[36,3]]},"83":{"position":[[363,4]]},"121":{"position":[[182,5]]},"154":{"position":[[521,5]]},"204":{"position":[[140,4],[285,4]]},"331":{"position":[[13,3],[72,3],[623,4]]},"337":{"position":[[61,4],[88,5],[241,4]]},"341":{"position":[[36,4]]},"347":{"position":[[129,3]]},"378":{"position":[[96,4]]},"382":{"position":[[67,4],[1044,4]]},"398":{"position":[[264,3],[365,3]]},"423":{"position":[[199,3]]}}}],["llm'",{"_index":2148,"t":{"378":{"position":[[141,5]]}}}],["llm_kwargs=cfg.llm_kwarg",{"_index":2018,"t":{"331":{"position":[[547,25]]}}}],["llm_model",{"_index":2182,"t":{"382":{"position":[[925,9]]}}}],["llm_provider.get_chat_response(messag",{"_index":2177,"t":{"382":{"position":[[669,40]]}}}],["llm_provider=cfg.smart_llm_provid",{"_index":2015,"t":{"331":{"position":[[463,36]]}}}],["llmsfast_llm=\"openai:gpt",{"_index":2024,"t":{"335":{"position":[[66,24]]}}}],["load",{"_index":534,"t":{"23":{"position":[[1306,4]]},"105":{"position":[[180,5]]},"138":{"position":[[100,7]]},"305":{"position":[[369,6]]},"307":{"position":[[138,5],[206,4],[296,6]]},"311":{"position":[[207,6],[273,4]]},"427":{"position":[[176,5]]},"433":{"position":[[385,4]]}}}],["load_dotenvfrom",{"_index":2283,"t":{"433":{"position":[[191,15]]}}}],["load_dotenvload_dotenv()async",{"_index":2008,"t":{"331":{"position":[[267,29]]}}}],["load_local_documents(['company_report.pdf",{"_index":536,"t":{"23":{"position":[[1344,43]]}}}],["load_local_documents(file_path",{"_index":512,"t":{"23":{"position":[[567,33]]}}}],["loader",{"_index":491,"t":{"23":{"position":[[41,7],[676,6],[743,6],[807,6],[883,6],[959,6],[1040,6],[1123,6]]}}}],["local",{"_index":349,"t":{"17":{"position":[[308,5],[667,5],[1153,5]]},"19":{"position":[[21,5],[133,5],[681,5],[1054,5],[1413,5]]},"21":{"position":[[349,5],[450,5],[518,5],[758,5]]},"23":{"position":[[150,5],[1316,5]]},"25":{"position":[[40,5],[682,5]]},"27":{"position":[[2045,6],[2318,5]]},"29":{"position":[[271,5]]},"68":{"position":[[72,5],[550,7]]},"70":{"position":[[78,5]]},"89":{"position":[[556,5]]},"97":{"position":[[51,5],[458,8],[921,7],[931,7]]},"99":{"position":[[147,5],[353,5]]},"105":{"position":[[290,5]]},"119":{"position":[[56,5]]},"128":{"position":[[76,5]]},"136":{"position":[[105,5]]},"138":{"position":[[132,5]]},"140":{"position":[[437,5],[658,5],[735,5]]},"222":{"position":[[351,6]]},"337":{"position":[[9,5]]},"380":{"position":[[21,8]]},"423":{"position":[[644,6],[655,6]]},"427":{"position":[[286,5]]}}}],["localhost:3000",{"_index":1265,"t":{"107":{"position":[[536,14],[557,14]]},"200":{"position":[[624,14],[645,14]]},"374":{"position":[[622,15]]},"429":{"position":[[452,14],[473,14]]}}}],["localhost:8000",{"_index":957,"t":{"68":{"position":[[372,15]]},"107":{"position":[[496,14]]},"111":{"position":[[400,14]]},"200":{"position":[[584,14]]},"317":{"position":[[448,15],[706,17]]},"429":{"position":[[412,14]]}}}],["locat",{"_index":669,"t":{"33":{"position":[[459,7]]},"68":{"position":[[284,8]]},"97":{"position":[[304,8]]},"105":{"position":[[14,8]]},"239":{"position":[[1533,8],[1748,8],[2071,8],[2286,8]]},"423":{"position":[[583,8]]},"427":{"position":[[14,8]]}}}],["log",{"_index":1479,"t":{"158":{"position":[[4,3],[237,3],[291,3],[354,5],[407,4]]},"160":{"position":[[295,6],[644,8]]},"164":{"position":[[61,3],[230,4],[417,4],[528,3]]},"166":{"position":[[77,4]]},"168":{"position":[[31,3],[117,3],[158,4],[185,3],[205,7],[281,4],[293,4]]},"170":{"position":[[50,3],[109,3],[1065,5]]},"172":{"position":[[62,3],[856,5]]},"239":{"position":[[1108,3]]},"257":{"position":[[9,4],[73,4],[221,4],[312,4],[410,3],[461,4],[484,4],[1459,6],[1534,7],[1624,7],[2029,3],[2092,4]]},"289":{"position":[[50,5]]},"317":{"position":[[262,4]]},"345":{"position":[[65,6]]},"423":{"position":[[1006,4]]}}}],["logasync",{"_index":1804,"t":{"257":{"position":[[529,8]]}}}],["logginglogging.basicconfig(level=logging.debug)from",{"_index":2158,"t":{"382":{"position":[[102,51]]}}}],["long",{"_index":662,"t":{"33":{"position":[[204,4]]},"48":{"position":[[4000,4]]},"89":{"position":[[1208,4]]},"140":{"position":[[7,4]]},"170":{"position":[[856,4]]},"204":{"position":[[354,4]]},"211":{"position":[[78,4]]}}}],["longer",{"_index":1603,"t":{"192":{"position":[[229,6]]},"423":{"position":[[787,6]]}}}],["look",{"_index":479,"t":{"21":{"position":[[254,4]]},"25":{"position":[[76,4]]},"27":{"position":[[1063,4]]},"56":{"position":[[55,7],[186,7]]},"64":{"position":[[385,7]]},"89":{"position":[[1276,7]]},"146":{"position":[[193,4]]},"164":{"position":[[496,4]]},"166":{"position":[[3,7]]},"249":{"position":[[448,4]]}}}],["loop",{"_index":43,"t":{"3":{"position":[[534,6]]},"89":{"position":[[76,4]]},"222":{"position":[[228,5]]},"414":{"position":[[70,4]]}}}],["loopwhil",{"_index":901,"t":{"48":{"position":[[7890,9]]}}}],["lost",{"_index":49,"t":{"3":{"position":[[603,4],[757,4]]}}}],["lot",{"_index":1031,"t":{"83":{"position":[[1438,3]]}}}],["low",{"_index":1402,"t":{"150":{"position":[[1454,3]]},"224":{"position":[[94,3],[168,3]]}}}],["lowercas",{"_index":1760,"t":{"249":{"position":[[179,10]]}}}],["lsb_releas",{"_index":1701,"t":{"239":{"position":[[754,13]]}}}],["m",{"_index":1274,"t":{"109":{"position":[[201,1]]},"180":{"position":[[256,1],[701,1]]},"184":{"position":[[122,1]]},"325":{"position":[[166,1],[544,1]]}}}],["mac",{"_index":1988,"t":{"325":{"position":[[162,3]]}}}],["machin",{"_index":1346,"t":{"140":{"position":[[773,8]]},"234":{"position":[[221,7]]},"261":{"position":[[96,7]]}}}],["maco",{"_index":1976,"t":{"323":{"position":[[260,5]]},"325":{"position":[[11,5]]}}}],["made",{"_index":2268,"t":{"414":{"position":[[21,4]]}}}],["magic",{"_index":1202,"t":{"99":{"position":[[252,5]]}}}],["main",{"_index":198,"t":{"9":{"position":[[63,4]]},"33":{"position":[[334,4]]},"38":{"position":[[82,4]]},"40":{"position":[[70,4]]},"44":{"position":[[138,4]]},"52":{"position":[[64,7]]},"81":{"position":[[216,4]]},"85":{"position":[[806,4],[3073,4],[3140,4]]},"87":{"position":[[571,4],[2082,4]]},"160":{"position":[[97,4]]},"166":{"position":[[144,4]]},"194":{"position":[[80,4]]},"206":{"position":[[4,4]]},"255":{"position":[[600,4]]},"317":{"position":[[2315,6]]},"331":{"position":[[301,7]]},"423":{"position":[[86,4]]}}}],["main.pi",{"_index":2274,"t":{"421":{"position":[[215,7]]}}}],["main:app",{"_index":1276,"t":{"109":{"position":[[211,8]]},"176":{"position":[[115,8]]},"184":{"position":[[132,8]]},"273":{"position":[[707,8]]},"325":{"position":[[554,8]]}}}],["mainli",{"_index":1567,"t":{"172":{"position":[[1151,6]]},"200":{"position":[[160,6]]}}}],["maintain",{"_index":1653,"t":{"228":{"position":[[27,10]]}}}],["major",{"_index":291,"t":{"15":{"position":[[61,5]]},"48":{"position":[[154,5]]}}}],["make",{"_index":323,"t":{"15":{"position":[[798,6]]},"17":{"position":[[965,4]]},"19":{"position":[[795,7],[970,4]]},"27":{"position":[[2392,4]]},"29":{"position":[[84,7],[488,4]]},"44":{"position":[[293,5]]},"48":{"position":[[200,5],[8800,4]]},"87":{"position":[[2328,4]]},"89":{"position":[[712,6]]},"115":{"position":[[423,4]]},"150":{"position":[[2988,4]]},"154":{"position":[[205,5]]},"198":{"position":[[103,4]]},"204":{"position":[[227,6]]},"313":{"position":[[161,4]]},"329":{"position":[[341,6]]}}}],["man",{"_index":915,"t":{"52":{"position":[[198,3]]},"255":{"position":[[764,3]]},"257":{"position":[[647,3]]}}}],["manag",{"_index":675,"t":{"35":{"position":[[32,10]]},"48":{"position":[[3520,6]]},"81":{"position":[[97,7]]},"85":{"position":[[52,11]]},"150":{"position":[[2129,7]]},"182":{"position":[[568,10]]},"218":{"position":[[427,7]]},"239":{"position":[[2533,7],[2620,7],[2709,7],[2779,7],[2847,7],[2945,7],[3015,7]]},"384":{"position":[[52,6]]},"414":{"position":[[187,7]]},"433":{"position":[[904,7]]}}}],["mani",{"_index":234,"t":{"9":{"position":[[934,4]]},"27":{"position":[[729,4]]},"87":{"position":[[3060,4]]},"89":{"position":[[584,4]]},"150":{"position":[[1212,4],[1914,4]]},"162":{"position":[[1485,4]]},"329":{"position":[[0,4]]}}}],["manual",{"_index":16,"t":{"3":{"position":[[167,6]]},"48":{"position":[[3507,9]]},"204":{"position":[[34,6]]},"323":{"position":[[240,8]]}}}],["markdown",{"_index":265,"t":{"11":{"position":[[789,8]]},"68":{"position":[[156,9]]},"83":{"position":[[1372,9]]},"87":{"position":[[2482,11],[3217,9]]},"97":{"position":[[176,9]]},"196":{"position":[[40,8]]},"412":{"position":[[410,9]]},"419":{"position":[[794,9]]},"423":{"position":[[1137,11]]}}}],["market",{"_index":372,"t":{"17":{"position":[[820,6]]},"19":{"position":[[848,6],[919,6],[1548,6],[1644,9]]},"27":{"position":[[1615,6],[1936,6],[1981,6]]},"132":{"position":[[468,6]]},"134":{"position":[[497,6]]},"194":{"position":[[260,8]]},"255":{"position":[[962,9]]}}}],["massiv",{"_index":979,"t":{"75":{"position":[[462,7]]}}}],["master",{"_index":1011,"t":{"81":{"position":[[127,8]]},"414":{"position":[[217,8]]}}}],["matter",{"_index":293,"t":{"15":{"position":[[120,6],[948,6]]}}}],["maui",{"_index":1817,"t":{"257":{"position":[[1801,5],[1933,5]]}}}],["max",{"_index":2239,"t":{"398":{"position":[[716,3]]}}}],["max_results=10",{"_index":1893,"t":{"298":{"position":[[412,15]]},"433":{"position":[[1494,14]]}}}],["max_sect",{"_index":1138,"t":{"87":{"position":[[2442,15],[3029,12]]},"423":{"position":[[226,12],[1097,15]]}}}],["max_subtopics=5",{"_index":1877,"t":{"294":{"position":[[266,16]]}}}],["max_tokens=2000",{"_index":2172,"t":{"382":{"position":[[483,16]]}}}],["max_tokens=8000",{"_index":887,"t":{"48":{"position":[[6110,16]]}}}],["max_tokens=cfg.smart_token_limit",{"_index":2017,"t":{"331":{"position":[[513,33]]}}}],["maximum",{"_index":2275,"t":{"423":{"position":[[245,7]]}}}],["mean",{"_index":1501,"t":{"162":{"position":[[74,5]]}}}],["meant",{"_index":36,"t":{"3":{"position":[[422,5]]}}}],["measur",{"_index":1555,"t":{"170":{"position":[[842,9]]}}}],["media",{"_index":428,"t":{"19":{"position":[[942,5]]}}}],["medium",{"_index":1647,"t":{"224":{"position":[[87,6],[117,6],[172,6]]}}}],["meeting?\"relevant_doc",{"_index":559,"t":{"23":{"position":[[1910,22]]}}}],["meeting_notes.docx",{"_index":537,"t":{"23":{"position":[[1388,21]]}}}],["memori",{"_index":992,"t":{"77":{"position":[[149,6]]},"138":{"position":[[196,6],[303,6]]}}}],["messag",{"_index":780,"t":{"48":{"position":[[1135,8],[2837,8],[2908,9],[7044,8],[7109,8],[7186,9],[7984,7],[7992,7],[8547,8]]},"144":{"position":[[69,8]]},"160":{"position":[[803,8]]},"162":{"position":[[1314,7],[2005,7],[2357,7],[2516,7],[2664,7],[2799,7],[2948,7],[3096,7],[3260,7],[3408,7],[3590,7],[3750,7],[3886,7],[4042,7],[4216,7],[4359,7]]},"170":{"position":[[246,8]]},"317":{"position":[[217,8],[402,7],[1633,8],[2330,7]]},"331":{"position":[[395,8]]}}}],["messi",{"_index":825,"t":{"48":{"position":[[3256,6]]}}}],["metaclass",{"_index":2259,"t":{"404":{"position":[[50,9],[183,10]]}}}],["metaclass=singleton",{"_index":2265,"t":{"406":{"position":[[33,20]]}}}],["metadata",{"_index":1498,"t":{"160":{"position":[[918,9]]},"162":{"position":[[794,9],[1160,9],[1855,9]]},"257":{"position":[[1825,11],[1964,8],[2001,8]]}}}],["method",{"_index":966,"t":{"75":{"position":[[73,7]]},"99":{"position":[[26,7]]},"277":{"position":[[32,7]]},"302":{"position":[[39,6]]},"305":{"position":[[79,7]]},"307":{"position":[[80,7]]},"313":{"position":[[512,6]]},"404":{"position":[[158,6]]}}}],["methods=['get'])async",{"_index":1863,"t":{"275":{"position":[[221,21]]}}}],["mid",{"_index":1412,"t":{"150":{"position":[[1698,3]]}}}],["middl",{"_index":1375,"t":{"150":{"position":[[665,6],[2122,6]]}}}],["million",{"_index":1439,"t":{"150":{"position":[[2648,7]]}}}],["millisecond",{"_index":1545,"t":{"170":{"position":[[86,11]]}}}],["min",{"_index":1602,"t":{"192":{"position":[[183,4],[240,4]]}}}],["mind",{"_index":9,"t":{"3":{"position":[[96,4]]}}}],["mini",{"_index":1622,"t":{"206":{"position":[[344,4]]},"253":{"position":[[671,5]]},"339":{"position":[[618,4]]}}}],["mini\"smart_llm=\"openai:gpt",{"_index":2025,"t":{"335":{"position":[[94,26]]}}}],["minilm",{"_index":2101,"t":{"355":{"position":[[369,6]]}}}],["minilm:22m",{"_index":2152,"t":{"380":{"position":[[280,11]]},"384":{"position":[[549,11]]}}}],["minimum",{"_index":207,"t":{"9":{"position":[[306,7]]},"11":{"position":[[757,7]]}}}],["minor",{"_index":271,"t":{"11":{"position":[[1015,5]]}}}],["minut",{"_index":206,"t":{"9":{"position":[[235,6],[321,8],[990,7]]},"15":{"position":[[912,8]]},"140":{"position":[[167,7]]},"206":{"position":[[499,7]]}}}],["misinterpret",{"_index":402,"t":{"19":{"position":[[322,15]]}}}],["miss",{"_index":371,"t":{"17":{"position":[[797,7]]},"85":{"position":[[3380,7]]},"305":{"position":[[394,4]]},"313":{"position":[[225,6]]},"394":{"position":[[354,7]]}}}],["mission",{"_index":67,"t":{"3":{"position":[[916,7]]},"46":{"position":[[212,8]]}}}],["mistral",{"_index":2079,"t":{"351":{"position":[[14,7],[135,7]]}}}],["mistral_api_key=[your",{"_index":2080,"t":{"351":{"position":[[84,21]]}}}],["mitig",{"_index":432,"t":{"19":{"position":[[1072,8]]}}}],["mixtral",{"_index":2068,"t":{"347":{"position":[[395,7]]}}}],["mm",{"_index":1485,"t":{"160":{"position":[[47,2]]}}}],["mock",{"_index":2293,"t":{"433":{"position":[[672,4],[878,4],[939,4]]}}}],["mockresearch",{"_index":2294,"t":{"433":{"position":[[727,15],[983,16]]}}}],["mode",{"_index":1870,"t":{"289":{"position":[[24,4]]},"398":{"position":[[907,4]]}}}],["model",{"_index":173,"t":{"7":{"position":[[684,6]]},"11":{"position":[[187,6]]},"48":{"position":[[297,6],[992,6],[2186,5]]},"75":{"position":[[551,7]]},"87":{"position":[[2557,8]]},"140":{"position":[[256,7],[319,7],[345,6]]},"253":{"position":[[30,7],[48,5],[203,5],[722,5],[831,5]]},"337":{"position":[[570,5]]},"339":{"position":[[124,5],[171,5],[238,6],[327,6],[362,5],[579,5]]},"347":{"position":[[72,5],[133,6],[342,6]]},"349":{"position":[[317,6]]},"353":{"position":[[59,6]]},"378":{"position":[[110,5],[157,5],[249,6],[261,5]]},"380":{"position":[[335,5]]},"382":{"position":[[944,5]]},"384":{"position":[[75,7],[144,5]]},"398":{"position":[[268,5],[369,5]]},"423":{"position":[[180,5],[1078,8]]}}}],["model=\"gpt",{"_index":799,"t":{"48":{"position":[[2370,10],[7352,10]]}}}],["model=cfg.smart_llm_model",{"_index":2011,"t":{"331":{"position":[[368,26]]}}}],["model=llm_model",{"_index":2170,"t":{"382":{"position":[[449,16]]}}}],["modelfast_llm=\"azure_openai:gpt",{"_index":1779,"t":{"253":{"position":[[636,31]]}}}],["modern",{"_index":716,"t":{"42":{"position":[[327,6]]}}}],["modifi",{"_index":1041,"t":{"85":{"position":[[249,6]]},"317":{"position":[[493,8]]}}}],["modul",{"_index":1248,"t":{"105":{"position":[[436,6]]},"170":{"position":[[202,6]]},"243":{"position":[[191,7]]},"427":{"position":[[432,6]]}}}],["modular",{"_index":2324,"t":{"435":{"position":[[439,10]]}}}],["module.export",{"_index":1967,"t":{"317":{"position":[[2140,18]]}}}],["monitor",{"_index":1550,"t":{"170":{"position":[[575,11],[602,7]]}}}],["more",{"_index":84,"t":{"5":{"position":[[53,4]]},"7":{"position":[[381,4]]},"13":{"position":[[120,4]]},"15":{"position":[[813,4]]},"17":{"position":[[1185,4]]},"19":{"position":[[753,4],[975,4],[1675,4]]},"23":{"position":[[1468,4]]},"27":{"position":[[793,5],[2430,4],[2475,5]]},"29":{"position":[[155,4],[501,4]]},"48":{"position":[[3449,4],[8740,5],[8777,4]]},"58":{"position":[[461,4]]},"62":{"position":[[421,4]]},"64":{"position":[[159,4],[277,4]]},"70":{"position":[[52,4]]},"75":{"position":[[507,4]]},"83":{"position":[[190,4]]},"89":{"position":[[639,4]]},"99":{"position":[[396,4]]},"105":{"position":[[515,4]]},"111":{"position":[[2,4]]},"115":{"position":[[449,4]]},"140":{"position":[[590,4],[904,4]]},"150":{"position":[[889,4],[2195,4],[2383,4]]},"158":{"position":[[465,4]]},"160":{"position":[[789,4]]},"162":{"position":[[2323,4]]},"168":{"position":[[256,4]]},"170":{"position":[[182,4],[1088,4]]},"182":{"position":[[536,4]]},"206":{"position":[[537,4]]},"211":{"position":[[424,7]]},"215":{"position":[[510,4]]},"218":{"position":[[441,5]]},"222":{"position":[[254,4],[502,5]]},"226":{"position":[[9,4]]},"236":{"position":[[100,4]]},"255":{"position":[[1141,5],[1189,4]]},"289":{"position":[[36,4]]},"305":{"position":[[237,4]]},"307":{"position":[[472,4]]},"311":{"position":[[278,4]]},"355":{"position":[[74,5]]},"419":{"position":[[0,4]]},"427":{"position":[[511,4]]},"435":{"position":[[608,4]]},"439":{"position":[[58,4],[569,4]]}}}],["moreov",{"_index":634,"t":{"27":{"position":[[2292,8]]}}}],["mostli",{"_index":1032,"t":{"83":{"position":[[1459,6]]},"87":{"position":[[1026,6]]},"311":{"position":[[53,6]]}}}],["move",{"_index":375,"t":{"17":{"position":[[848,6]]},"27":{"position":[[386,6]]}}}],["msg",{"_index":892,"t":{"48":{"position":[[7179,3]]}}}],["msg.content[0].text.valu",{"_index":894,"t":{"48":{"position":[[7216,30]]}}}],["much",{"_index":242,"t":{"11":{"position":[[30,4]]},"15":{"position":[[808,4]]},"150":{"position":[[717,4],[2003,4],[2214,4]]},"172":{"position":[[650,4]]},"255":{"position":[[1184,4]]}}}],["multi",{"_index":965,"t":{"72":{"position":[[31,5]]},"75":{"position":[[683,5],[784,5]]},"77":{"position":[[67,5]]},"83":{"position":[[1339,5]]},"85":{"position":[[1284,5]]},"89":{"position":[[808,5]]},"215":{"position":[[296,5]]},"218":{"position":[[171,5]]},"222":{"position":[[45,5]]},"224":{"position":[[43,5]]},"226":{"position":[[280,5],[300,5]]},"228":{"position":[[243,5]]},"419":{"position":[[761,5]]}}}],["multi_ag",{"_index":1247,"t":{"105":{"position":[[402,12]]},"427":{"position":[[398,12]]}}}],["multipl",{"_index":938,"t":{"62":{"position":[[102,8]]},"79":{"position":[[111,8]]},"150":{"position":[[2050,8],[2200,9],[2295,8]]},"162":{"position":[[1262,8],[1349,8]]},"215":{"position":[[22,8]]},"388":{"position":[[309,8]]},"412":{"position":[[106,8],[371,8]]},"439":{"position":[[270,8]]}}}],["multipliers,and",{"_index":1430,"t":{"150":{"position":[[2332,15]]}}}],["myself",{"_index":1200,"t":{"97":{"position":[[874,6]]}}}],["n",{"_index":1242,"t":{"105":{"position":[[221,1]]},"427":{"position":[[217,1]]}}}],["name",{"_index":802,"t":{"48":{"position":[[2441,7],[7423,7]]},"87":{"position":[[2157,5]]},"128":{"position":[[19,5]]},"152":{"position":[[468,6]]},"162":{"position":[[402,4]]},"170":{"position":[[209,4]]},"180":{"position":[[150,4]]},"249":{"position":[[160,5]]},"253":{"position":[[462,4],[693,4],[802,4]]},"296":{"position":[[453,6]]},"298":{"position":[[320,6]]},"339":{"position":[[194,5],[550,4]]},"345":{"position":[[232,5]]},"374":{"position":[[707,6]]},"378":{"position":[[163,4]]}}}],["name)fast_token_limit=4000smart_llm=\"azure_openai:gpt",{"_index":1780,"t":{"253":{"position":[[728,53]]}}}],["name)smart_token_limit=4000retriever=\"b",{"_index":1781,"t":{"253":{"position":[[837,43]]}}}],["name.exampl",{"_index":1721,"t":{"239":{"position":[[1493,13],[2031,13],[2887,13],[2987,13]]}}}],["namefast_llm=azure_openai:gpt",{"_index":2039,"t":{"339":{"position":[[585,29]]}}}],["names/deploy",{"_index":2035,"t":{"339":{"position":[[177,16]]}}}],["natur",{"_index":969,"t":{"75":{"position":[[180,6]]}}}],["navig",{"_index":1283,"t":{"111":{"position":[[132,8]]},"115":{"position":[[230,8]]}}}],["nba",{"_index":1837,"t":{"263":{"position":[[614,3]]},"275":{"position":[[972,3]]}}}],["nearli",{"_index":996,"t":{"77":{"position":[[337,6]]}}}],["necessari",{"_index":279,"t":{"13":{"position":[[28,9]]},"42":{"position":[[632,9]]},"138":{"position":[[68,9]]},"188":{"position":[[282,9]]},"198":{"position":[[126,9]]},"206":{"position":[[447,10]]},"257":{"position":[[562,9]]},"433":{"position":[[700,9]]}}}],["need",{"_index":297,"t":{"15":{"position":[[219,6]]},"27":{"position":[[346,4],[851,4]]},"44":{"position":[[368,7]]},"58":{"position":[[445,6]]},"115":{"position":[[332,6]]},"138":{"position":[[262,4]]},"215":{"position":[[462,6]]},"218":{"position":[[291,4]]},"257":{"position":[[919,6],[1554,6]]},"309":{"position":[[58,4]]},"311":{"position":[[126,4],[300,4]]},"313":{"position":[[549,5]]},"339":{"position":[[88,4]]},"343":{"position":[[169,4]]},"345":{"position":[[170,4]]},"347":{"position":[[22,4]]},"390":{"position":[[294,4]]},"439":{"position":[[231,4]]}}}],["network",{"_index":1349,"t":{"144":{"position":[[85,7]]},"146":{"position":[[106,7]]}}}],["never",{"_index":41,"t":{"3":{"position":[[521,5],[642,5]]},"48":{"position":[[1984,5],[5851,5]]}}}],["new",{"_index":326,"t":{"15":{"position":[[840,3]]},"17":{"position":[[52,3]]},"19":{"position":[[417,3],[926,4]]},"48":{"position":[[176,3],[319,3],[2671,4],[2800,3],[7653,4]]},"85":{"position":[[947,3]]},"89":{"position":[[1122,3],[1222,3]]},"150":{"position":[[1179,3],[1234,3]]},"162":{"position":[[1808,3]]},"249":{"position":[[144,3],[473,3]]},"255":{"position":[[948,4]]},"317":{"position":[[767,3],[1497,3]]},"435":{"position":[[125,3]]}}}],["new_search_url",{"_index":223,"t":{"9":{"position":[[675,17]]}}}],["newslett",{"_index":1792,"t":{"255":{"position":[[998,12]]}}}],["next",{"_index":793,"t":{"48":{"position":[[2105,5]]},"75":{"position":[[521,4]]},"378":{"position":[[403,4]]}}}],["nextj",{"_index":641,"t":{"27":{"position":[[2538,6]]},"111":{"position":[[144,6],[165,6]]},"113":{"position":[[54,6],[139,6]]},"215":{"position":[[524,6]]}}}],["ng",{"_index":977,"t":{"75":{"position":[[399,2]]}}}],["nginx",{"_index":1668,"t":{"236":{"position":[[88,6]]},"239":{"position":[[1180,8],[1189,5],[1263,5],[1346,8],[1362,5],[1403,5],[1426,5],[3156,5],[3212,6]]},"384":{"position":[[721,5]]}}}],["nginx.conf",{"_index":1739,"t":{"239":{"position":[[2765,11]]}}}],["nginx:sudo",{"_index":1715,"t":{"239":{"position":[[1240,10],[1292,10]]}}}],["nginxsudo",{"_index":1716,"t":{"239":{"position":[[1319,9]]}}}],["nightly\"embedding=\"cohere:emb",{"_index":2121,"t":{"361":{"position":[[114,31]]}}}],["nightly\"strategic_llm=\"cohere:command",{"_index":2120,"t":{"361":{"position":[[76,37]]}}}],["node",{"_index":1040,"t":{"85":{"position":[[227,4],[2384,5],[2883,5],[3177,5]]},"87":{"position":[[2152,4]]}}}],["node.j",{"_index":1279,"t":{"111":{"position":[[78,7],[184,8]]},"220":{"position":[[515,7]]}}}],["non",{"_index":1557,"t":{"170":{"position":[[1189,3]]}}}],["none",{"_index":347,"t":{"17":{"position":[[267,4]]},"48":{"position":[[4382,4],[6612,4]]},"87":{"position":[[1836,4],[2712,4]]},"150":{"position":[[1269,4]]},"257":{"position":[[382,5],[886,4]]},"329":{"position":[[743,4]]},"398":{"position":[[145,4],[241,4],[341,4],[444,4],[550,4],[669,4],[792,4],[883,4]]},"400":{"position":[[177,4],[321,4],[472,4],[612,4],[744,4]]},"433":{"position":[[843,4],[871,4],[932,4]]},"439":{"position":[[110,4]]}}}],["nonetheless",{"_index":54,"t":{"3":{"position":[[677,12]]}}}],["notabl",{"_index":2319,"t":{"433":{"position":[[1897,7]]}}}],["note",{"_index":471,"t":{"21":{"position":[[44,6]]},"87":{"position":[[1095,5],[1992,5]]},"99":{"position":[[273,5]]},"111":{"position":[[367,5]]},"140":{"position":[[533,6]]},"224":{"position":[[247,4]]},"302":{"position":[[224,5]]},"339":{"position":[[525,4]]},"343":{"position":[[210,6]]},"347":{"position":[[271,5]]},"388":{"position":[[175,4]]},"412":{"position":[[427,5]]}}}],["noth",{"_index":269,"t":{"11":{"position":[[952,7]]},"150":{"position":[[881,7]]}}}],["notic",{"_index":1106,"t":{"85":{"position":[[3332,6]]},"87":{"position":[[2906,6]]}}}],["now",{"_index":134,"t":{"5":{"position":[[973,3]]},"7":{"position":[[1373,4]]},"13":{"position":[[0,3]]},"17":{"position":[[457,3]]},"25":{"position":[[0,3]]},"27":{"position":[[0,3]]},"29":{"position":[[143,3]]},"48":{"position":[[590,3],[5226,3]]},"75":{"position":[[336,3]]},"85":{"position":[[1943,3]]},"160":{"position":[[522,4]]},"378":{"position":[[267,3]]}}}],["npm",{"_index":1282,"t":{"111":{"position":[[109,3],[256,3],[318,3]]},"220":{"position":[[527,3]]}}}],["null",{"_index":1499,"t":{"160":{"position":[[978,4]]},"317":{"position":[[1194,5],[1359,5]]}}}],["null;async",{"_index":1930,"t":{"317":{"position":[[634,10]]}}}],["null;let",{"_index":1928,"t":{"317":{"position":[[606,8]]}}}],["num_imag",{"_index":1853,"t":{"273":{"position":[[607,13]]},"275":{"position":[[732,13]]}}}],["num_sourc",{"_index":1855,"t":{"273":{"position":[[643,14]]},"275":{"position":[[768,14]]}}}],["number",{"_index":159,"t":{"7":{"position":[[371,7],[1108,8]]},"11":{"position":[[733,7]]},"162":{"position":[[1630,6],[1798,6]]},"283":{"position":[[14,6]]},"423":{"position":[[253,6]]}}}],["numer",{"_index":575,"t":{"25":{"position":[[782,8]]}}}],["nvidia",{"_index":808,"t":{"48":{"position":[[2679,6],[7661,6]]}}}],["nvm",{"_index":1285,"t":{"111":{"position":[[193,3]]}}}],["o",{"_index":1690,"t":{"239":{"position":[[529,1]]}}}],["object",{"_index":14,"t":{"3":{"position":[[141,9]]},"7":{"position":[[1317,9]]},"13":{"position":[[194,9]]},"25":{"position":[[277,9]]},"48":{"position":[[1319,6],[2555,9],[7537,9]]},"87":{"position":[[2856,6]]},"158":{"position":[[119,6]]},"160":{"position":[[346,6]]},"204":{"position":[[8,9]]},"206":{"position":[[679,9]]},"211":{"position":[[184,9]]},"294":{"position":[[254,11]]},"317":{"position":[[1695,12]]},"433":{"position":[[502,6],[688,6]]},"439":{"position":[[201,9]]}}}],["obtain",{"_index":588,"t":{"27":{"position":[[354,6]]},"349":{"position":[[43,6]]},"357":{"position":[[17,9]]}}}],["occur",{"_index":1489,"t":{"160":{"position":[[426,9]]},"168":{"position":[[228,5]]}}}],["offer",{"_index":392,"t":{"19":{"position":[[84,6],[645,5]]},"29":{"position":[[299,8],[567,8]]},"215":{"position":[[15,6],[246,8],[351,8]]},"222":{"position":[[93,8]]},"349":{"position":[[293,5]]},"353":{"position":[[12,6]]}}}],["offici",{"_index":1684,"t":{"239":{"position":[[434,8]]},"261":{"position":[[140,8]]},"329":{"position":[[709,8]]}}}],["oil",{"_index":1395,"t":{"150":{"position":[[1287,3]]}}}],["older",{"_index":1999,"t":{"329":{"position":[[279,5]]}}}],["ollama",{"_index":2042,"t":{"341":{"position":[[29,6],[93,6]]},"378":{"position":[[16,6]]},"380":{"position":[[14,6],[89,7]]},"382":{"position":[[413,9],[904,6],[974,6]]}}}],["ollama'",{"_index":2147,"t":{"378":{"position":[[121,8]]}}}],["ollama_base_url",{"_index":2181,"t":{"382":{"position":[[867,15]]}}}],["ollama_base_url=http://localhost:11434fast_llm=\"ollama:llama3\"smart_llm=\"ollama:llama3\"strategic_llm=\"ollama:llama3\"embedding=\"ollama:nom",{"_index":2043,"t":{"341":{"position":[[148,139]]}}}],["on",{"_index":200,"t":{"9":{"position":[[130,3],[137,4],[231,3]]},"48":{"position":[[150,3],[1516,3],[1523,4]]},"85":{"position":[[0,3],[1254,3]]},"87":{"position":[[73,3]]},"150":{"position":[[600,3],[2191,3]]},"347":{"position":[[118,3]]},"404":{"position":[[78,3]]},"406":{"position":[[102,3]]}}}],["onc",{"_index":127,"t":{"5":{"position":[[818,4]]},"9":{"position":[[883,4]]},"25":{"position":[[320,4]]},"27":{"position":[[1002,4]]},"329":{"position":[[397,4]]},"345":{"position":[[52,4],[135,4]]}}}],["ongo",{"_index":900,"t":{"48":{"position":[[7869,7]]},"89":{"position":[[1351,7]]},"115":{"position":[[169,7]]}}}],["onlin",{"_index":11,"t":{"3":{"position":[[116,6],[446,6],[860,6],[1058,6]]},"13":{"position":[[296,6]]},"15":{"position":[[14,6],[444,6],[531,6]]},"19":{"position":[[1517,7]]},"48":{"position":[[486,6],[695,6],[1953,6],[5325,6],[5820,6]]},"130":{"position":[[27,6]]},"206":{"position":[[781,6]]},"257":{"position":[[737,8],[774,9]]}}}],["open",{"_index":75,"t":{"3":{"position":[[1025,4]]},"11":{"position":[[203,4]]},"56":{"position":[[218,4]]},"58":{"position":[[28,4]]},"64":{"position":[[323,4]]},"87":{"position":[[3314,4]]},"89":{"position":[[1109,4]]},"200":{"position":[[38,4]]},"249":{"position":[[463,7],[500,4]]},"307":{"position":[[88,5]]},"353":{"position":[[47,4]]},"378":{"position":[[55,4]]},"384":{"position":[[180,4]]},"439":{"position":[[349,4]]}}}],["openai",{"_index":246,"t":{"11":{"position":[[180,6]]},"27":{"position":[[281,6],[493,6]]},"48":{"position":[[0,6],[104,6],[1642,6],[5245,6],[5414,6]]},"121":{"position":[[130,6]]},"253":{"position":[[297,6]]},"261":{"position":[[252,6],[315,6]]},"321":{"position":[[65,7]]},"335":{"position":[[17,6]]},"337":{"position":[[15,6],[111,6],[184,6],[426,6],[499,6]]},"339":{"position":[[50,6],[72,6]]},"398":{"position":[[810,6]]},"400":{"position":[[200,6]]},"412":{"position":[[455,6]]},"421":{"position":[[113,6]]},"423":{"position":[[192,6]]}}}],["openai'",{"_index":1338,"t":{"140":{"position":[[310,8]]},"253":{"position":[[21,8]]}}}],["openai(api_key=os.environ[\"openai_api_key\"])tavily_cli",{"_index":880,"t":{"48":{"position":[[5508,57]]}}}],["openai:{your",{"_index":2029,"t":{"337":{"position":[[74,13]]}}}],["openai_api_key",{"_index":1762,"t":{"249":{"position":[[262,14]]}}}],["openai_api_key=\"123\"openai_api_base=\"http://127.0.0.1:11434/v1\"ollama_base_url=\"http://127.0.0.1:11434/\"fast_llm=\"ollama:qwen2:1.5b\"smart_llm=\"ollama:qwen2:1.5b\"embedding=\"ollama:al",{"_index":2151,"t":{"380":{"position":[[97,182]]}}}],["openai_api_key=\"123\"openai_api_base=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/v1\"ollama_base_url=\"https://<your_custom_elestio_project>.vm.elestio.app:57987/\"fast_llm=\"openai:qwen2:1.5b\"smart_llm=\"openai:qwen2:1.5b\"embedding=\"ollama:al",{"_index":2183,"t":{"384":{"position":[[294,254]]}}}],["openai_api_key=your_openai_api_key_hereexport",{"_index":1307,"t":{"125":{"position":[[54,45]]}}}],["openai_api_key={your",{"_index":594,"t":{"27":{"position":[[472,20]]},"261":{"position":[[294,20]]},"421":{"position":[[92,20]]}}}],["openai_api_version=\"2024",{"_index":1770,"t":{"253":{"position":[[319,24]]}}}],["openaiembed",{"_index":1219,"t":{"101":{"position":[[572,18]]}}}],["openaiembeddings())queri",{"_index":1447,"t":{"150":{"position":[[2906,24]]}}}],["openaiembeddings()vectorstor",{"_index":552,"t":{"23":{"position":[[1713,29]]}}}],["openaiembeddingsconnection_str",{"_index":1457,"t":{"152":{"position":[[121,33]]}}}],["openaiembeddingsfrom",{"_index":509,"t":{"23":{"position":[[506,20]]},"101":{"position":[[299,20]]},"150":{"position":[[126,20]]}}}],["openaiembeddingsvector_stor",{"_index":1472,"t":{"154":{"position":[[423,28]]}}}],["openaifrom",{"_index":876,"t":{"48":{"position":[[5428,10]]}}}],["openai’",{"_index":909,"t":{"48":{"position":[[8708,8]]}}}],["oper",{"_index":683,"t":{"35":{"position":[[256,10]]},"48":{"position":[[3406,10]]},"170":{"position":[[722,11],[869,10]]},"329":{"position":[[379,9]]}}}],["opinion",{"_index":182,"t":{"7":{"position":[[962,8],[1327,7]]},"13":{"position":[[204,7]]},"206":{"position":[[689,7]]}}}],["opportun",{"_index":409,"t":{"19":{"position":[[438,11]]}}}],["optim",{"_index":151,"t":{"7":{"position":[[245,8]]},"9":{"position":[[478,9]]},"15":{"position":[[354,10]]},"19":{"position":[[1988,8]]},"58":{"position":[[334,9]]},"60":{"position":[[109,10]]},"75":{"position":[[756,7]]},"83":{"position":[[899,10]]},"87":{"position":[[314,10]]},"89":{"position":[[92,9],[757,7]]},"115":{"position":[[358,7]]},"140":{"position":[[296,9]]},"206":{"position":[[407,8]]},"218":{"position":[[213,9]]},"220":{"position":[[209,7]]},"224":{"position":[[279,9]]},"339":{"position":[[255,7]]},"412":{"position":[[475,9]]}}}],["option",{"_index":691,"t":{"38":{"position":[[362,8],[409,8]]},"68":{"position":[[451,8]]},"111":{"position":[[430,6]]},"192":{"position":[[120,7]]},"224":{"position":[[261,7]]},"226":{"position":[[32,8]]},"234":{"position":[[27,6]]},"239":{"position":[[1000,11]]},"423":{"position":[[628,8]]}}}],["opu",{"_index":2076,"t":{"349":{"position":[[206,4],[254,4]]}}}],["orchestr",{"_index":666,"t":{"33":{"position":[[281,12]]}}}],["organ",{"_index":397,"t":{"19":{"position":[[183,12],[1842,12]]}}}],["organiz",{"_index":368,"t":{"17":{"position":[[764,14]]}}}],["origin",{"_index":255,"t":{"11":{"position":[[437,8]]},"150":{"position":[[328,10]]},"423":{"position":[[1311,8]]}}}],["osimport",{"_index":873,"t":{"48":{"position":[[5385,8]]},"382":{"position":[[79,8]]}}}],["osos.environ['openai_api_key",{"_index":1310,"t":{"125":{"position":[[208,30]]}}}],["other",{"_index":341,"t":{"17":{"position":[[174,7]]}}}],["out",{"_index":115,"t":{"5":{"position":[[483,3]]},"7":{"position":[[110,3]]},"17":{"position":[[805,3]]},"21":{"position":[[117,3]]},"27":{"position":[[2596,3]]},"46":{"position":[[57,3],[109,3],[140,3]]},"48":{"position":[[794,3]]},"56":{"position":[[142,3],[332,3]]},"58":{"position":[[494,3]]},"62":{"position":[[247,3]]},"64":{"position":[[415,3]]},"70":{"position":[[6,3]]},"75":{"position":[[865,3]]},"87":{"position":[[3279,3]]},"89":{"position":[[467,3]]},"99":{"position":[[424,3]]},"107":{"position":[[177,3]]},"162":{"position":[[714,3]]},"220":{"position":[[15,3]]},"224":{"position":[[129,3]]},"226":{"position":[[47,3]]},"239":{"position":[[1112,3]]},"329":{"position":[[779,3]]},"378":{"position":[[321,3]]},"384":{"position":[[874,3]]},"429":{"position":[[177,3]]},"435":{"position":[[578,3]]},"439":{"position":[[602,3]]}}}],["outdat",{"_index":361,"t":{"17":{"position":[[620,8]]},"204":{"position":[[169,8]]}}}],["outlin",{"_index":118,"t":{"5":{"position":[[566,7],[674,7]]},"13":{"position":[[151,7]]},"81":{"position":[[387,7]]},"83":{"position":[[536,7],[684,8],[702,7]]},"89":{"position":[[213,8]]},"194":{"position":[[316,7]]},"211":{"position":[[22,9]]},"270":{"position":[[8,8]]},"414":{"position":[[441,7]]},"419":{"position":[[212,7],[274,7]]}}}],["outline_report",{"_index":1605,"t":{"192":{"position":[[261,14]]},"194":{"position":[[427,14]]},"270":{"position":[[79,16]]}}}],["output",{"_index":665,"t":{"33":{"position":[[261,8]]},"44":{"position":[[279,8]]},"48":{"position":[[4247,6],[4373,6],[4522,6],[4590,7],[4654,9],[4664,8],[6477,6],[6603,6],[6752,6],[6820,7],[6884,9],[6894,8]]},"136":{"position":[[4,6]]},"158":{"position":[[253,7]]},"160":{"position":[[779,7]]},"162":{"position":[[253,7],[380,7],[539,6],[700,7],[953,7],[1091,7],[1296,7],[1463,7],[1612,7],[1780,7],[1995,7],[2154,7],[2347,7],[2506,7],[2654,7],[2789,7],[2938,7],[3086,7],[3250,7],[3398,7],[3580,7],[3740,7],[3876,7],[4032,7],[4206,7],[4349,7]]},"196":{"position":[[61,7]]},"204":{"position":[[317,7]]},"257":{"position":[[1606,7],[1663,9],[2097,6]]},"423":{"position":[[552,6]]},"433":{"position":[[1677,6]]}}}],["outsid",{"_index":1176,"t":{"93":{"position":[[245,7]]}}}],["over",{"_index":277,"t":{"11":{"position":[[1102,4]]},"17":{"position":[[0,4]]},"25":{"position":[[909,4]]},"27":{"position":[[2249,4]]},"58":{"position":[[162,4]]},"211":{"position":[[113,5],[143,4]]},"439":{"position":[[511,4]]}}}],["overal",{"_index":169,"t":{"7":{"position":[[552,7]]},"9":{"position":[[271,7]]},"89":{"position":[[240,7]]},"172":{"position":[[282,7],[1107,7]]}}}],["overhead",{"_index":830,"t":{"48":{"position":[[3454,8]]}}}],["overload",{"_index":305,"t":{"15":{"position":[[419,8]]},"17":{"position":[[594,9]]}}}],["overse",{"_index":1010,"t":{"81":{"position":[[63,8]]},"414":{"position":[[80,8],[153,8]]}}}],["overview",{"_index":567,"t":{"25":{"position":[[297,8]]},"164":{"position":[[438,8]]},"170":{"position":[[897,9]]},"433":{"position":[[1859,8]]}}}],["pace",{"_index":1166,"t":{"89":{"position":[[1160,4]]}}}],["packag",{"_index":961,"t":{"68":{"position":[[506,8]]},"83":{"position":[[871,7]]},"85":{"position":[[1444,8]]},"109":{"position":[[128,9]]},"121":{"position":[[108,7]]},"180":{"position":[[121,7]]},"182":{"position":[[514,8],[996,9]]},"218":{"position":[[8,7],[419,7]]},"220":{"position":[[266,7]]},"224":{"position":[[12,7]]},"226":{"position":[[85,8]]},"228":{"position":[[106,8]]},"239":{"position":[[854,7]]},"261":{"position":[[149,7]]},"298":{"position":[[551,8]]},"309":{"position":[[88,8]]},"313":{"position":[[201,8]]},"317":{"position":[[140,8]]},"323":{"position":[[232,7]]},"325":{"position":[[443,9]]},"421":{"position":[[17,9]]}}}],["page",{"_index":603,"t":{"27":{"position":[[779,4],[2618,5]]},"31":{"position":[[8,4]]},"46":{"position":[[125,4]]},"50":{"position":[[8,4]]},"54":{"position":[[8,4]]},"58":{"position":[[516,5]]},"64":{"position":[[431,5]]},"66":{"position":[[8,4]]},"87":{"position":[[3326,5]]},"91":{"position":[[8,4]]},"103":{"position":[[8,4]]},"117":{"position":[[8,4]]},"142":{"position":[[8,4]]},"148":{"position":[[8,4]]},"156":{"position":[[8,4]]},"158":{"position":[[316,4]]},"162":{"position":[[1640,5]]},"174":{"position":[[8,4]]},"186":{"position":[[8,4]]},"202":{"position":[[8,4]]},"213":{"position":[[8,4]]},"232":{"position":[[8,4]]},"241":{"position":[[8,4]]},"251":{"position":[[8,4]]},"259":{"position":[[8,4]]},"300":{"position":[[8,4]]},"305":{"position":[[128,4]]},"307":{"position":[[148,4],[258,4]]},"311":{"position":[[152,4]]},"315":{"position":[[8,4]]},"319":{"position":[[8,4]]},"333":{"position":[[8,4]]},"339":{"position":[[57,5]]},"349":{"position":[[35,4]]},"376":{"position":[[8,4]]},"386":{"position":[[8,4]]},"394":{"position":[[176,4],[251,4],[467,5]]},"396":{"position":[[8,4]]},"402":{"position":[[8,4]]},"408":{"position":[[8,4]]},"410":{"position":[[8,4]]},"412":{"position":[[347,4]]},"435":{"position":[[599,4]]},"437":{"position":[[8,4]]},"439":{"position":[[624,5]]},"441":{"position":[[8,4]]}}}],["painters.)if",{"_index":1367,"t":{"150":{"position":[[362,12]]}}}],["pango",{"_index":1980,"t":{"323":{"position":[[315,5]]},"325":{"position":[[61,5],[367,5]]}}}],["paper",{"_index":95,"t":{"5":{"position":[[238,5],[264,5]]},"19":{"position":[[480,6]]},"33":{"position":[[54,6]]},"79":{"position":[[358,6]]},"412":{"position":[[176,6]]}}}],["parallel",{"_index":210,"t":{"9":{"position":[[382,11],[499,9],[864,9]]},"83":{"position":[[639,8],[720,10]]},"87":{"position":[[135,8],[272,8],[358,8],[645,8],[2127,8]]},"419":{"position":[[292,10]]}}}],["param",{"_index":601,"t":{"27":{"position":[[665,6]]},"48":{"position":[[4921,6]]},"374":{"position":[[120,5]]}}}],["paramet",{"_index":684,"t":{"38":{"position":[[59,11]]},"48":{"position":[[2531,13],[7513,13]]},"93":{"position":[[392,9]]},"115":{"position":[[304,10]]},"257":{"position":[[572,10]]},"294":{"position":[[80,10]]}}}],["pars",{"_index":1900,"t":{"305":{"position":[[141,6],[204,6]]}}}],["part",{"_index":1033,"t":{"83":{"position":[[1485,5]]},"87":{"position":[[27,4],[2768,4]]}}}],["particularli",{"_index":661,"t":{"33":{"position":[[171,12]]},"172":{"position":[[499,12]]}}}],["partner",{"_index":943,"t":{"64":{"position":[[138,9]]}}}],["pass",{"_index":865,"t":{"48":{"position":[[4932,4]]},"68":{"position":[[515,4]]},"85":{"position":[[1534,4]]},"95":{"position":[[182,4]]},"97":{"position":[[423,4]]},"294":{"position":[[61,7]]},"374":{"position":[[130,4]]}}}],["passion",{"_index":62,"t":{"3":{"position":[[830,7]]}}}],["past",{"_index":329,"t":{"17":{"position":[[9,4]]},"19":{"position":[[1589,4]]},"204":{"position":[[160,4]]},"378":{"position":[[147,5]]}}}],["path",{"_index":687,"t":{"38":{"position":[[224,4]]},"97":{"position":[[84,4]]},"99":{"position":[[344,4]]},"257":{"position":[[893,4]]},"309":{"position":[[310,5]]},"313":{"position":[[102,5]]}}}],["pattern",{"_index":2305,"t":{"433":{"position":[[1196,8],[1825,8],[1881,9],[1918,8],[2062,8],[2160,9]]}}}],["pay",{"_index":983,"t":{"75":{"position":[[626,3]]},"150":{"position":[[1536,4],[1729,6]]}}}],["payload",{"_index":1960,"t":{"317":{"position":[[1768,7],[2014,9],[2125,9]]}}}],["pdf",{"_index":949,"t":{"68":{"position":[[127,4]]},"83":{"position":[[1361,4]]},"87":{"position":[[2500,6],[3227,3]]},"97":{"position":[[147,4]]},"128":{"position":[[92,6]]},"130":{"position":[[105,5]]},"211":{"position":[[410,4]]},"323":{"position":[[71,4]]},"412":{"position":[[396,4]]},"419":{"position":[[783,4]]},"423":{"position":[[1155,6]]}}}],["peer",{"_index":1288,"t":{"111":{"position":[[277,4]]},"431":{"position":[[67,4]]}}}],["peopl",{"_index":1382,"t":{"150":{"position":[[857,6]]}}}],["per",{"_index":930,"t":{"58":{"position":[[183,3]]},"60":{"position":[[56,3]]},"150":{"position":[[1750,3],[1837,3]]},"211":{"position":[[163,3]]},"439":{"position":[[532,3]]}}}],["perform",{"_index":295,"t":{"15":{"position":[[156,7]]},"23":{"position":[[1826,7]]},"33":{"position":[[619,7]]},"35":{"position":[[280,11]]},"48":{"position":[[2692,15],[5980,7],[7674,15]]},"60":{"position":[[158,12]]},"93":{"position":[[217,7]]},"111":{"position":[[50,12]]},"113":{"position":[[102,11]]},"160":{"position":[[900,8]]},"162":{"position":[[161,8],[773,7],[942,10]]},"170":{"position":[[352,9],[770,11],[968,10]]},"218":{"position":[[238,11]]},"239":{"position":[[1205,11]]},"339":{"position":[[263,12]]},"343":{"position":[[111,12]]},"412":{"position":[[485,12]]},"433":{"position":[[1387,7]]},"435":{"position":[[417,12]]}}}],["perhap",{"_index":980,"t":{"75":{"position":[[494,7]]}}}],["permiss",{"_index":1325,"t":{"138":{"position":[[78,12]]},"198":{"position":[[149,11]]},"321":{"position":[[27,10]]}}}],["perplex",{"_index":342,"t":{"17":{"position":[[190,11]]}}}],["person",{"_index":1157,"t":{"89":{"position":[[611,8]]}}}],["perspect",{"_index":447,"t":{"19":{"position":[[1332,12]]}}}],["pgvector.from_existing_index",{"_index":1221,"t":{"101":{"position":[[599,29]]},"152":{"position":[[359,29]]}}}],["pgvectorfrom",{"_index":1209,"t":{"101":{"position":[[262,12]]},"152":{"position":[[84,12]]}}}],["pharmaceut",{"_index":405,"t":{"19":{"position":[[380,14]]}}}],["phrase",{"_index":1378,"t":{"150":{"position":[[734,6]]}}}],["physic",{"_index":1383,"t":{"150":{"position":[[928,7]]}}}],["pick",{"_index":776,"t":{"48":{"position":[[982,7]]}}}],["piec",{"_index":1118,"t":{"87":{"position":[[1258,5]]}}}],["pinpoint",{"_index":1552,"t":{"170":{"position":[[667,11]]}}}],["pip",{"_index":583,"t":{"27":{"position":[[176,4],[181,3]]},"68":{"position":[[502,3]]},"109":{"position":[[88,3],[138,3]]},"121":{"position":[[96,3]]},"123":{"position":[[0,3]]},"176":{"position":[[32,3]]},"180":{"position":[[703,3]]},"188":{"position":[[140,3]]},"215":{"position":[[81,3]]},"218":{"position":[[4,3],[349,3],[415,3],[447,3]]},"220":{"position":[[262,3]]},"224":{"position":[[8,3]]},"226":{"position":[[81,3],[103,3]]},"228":{"position":[[102,3],[115,3]]},"261":{"position":[[168,3]]},"275":{"position":[[51,3]]},"309":{"position":[[97,3]]},"421":{"position":[[27,3]]},"425":{"position":[[0,3]]}}}],["pip3.11",{"_index":1994,"t":{"325":{"position":[[453,7]]}}}],["pipelin",{"_index":352,"t":{"17":{"position":[[366,9]]}}}],["pitcher.but",{"_index":1384,"t":{"150":{"position":[[949,11]]}}}],["place",{"_index":1315,"t":{"128":{"position":[[57,5]]}}}],["plain",{"_index":950,"t":{"68":{"position":[[132,5]]},"97":{"position":[[152,5]]},"170":{"position":[[8,5]]}}}],["plan",{"_index":96,"t":{"5":{"position":[[244,4],[412,4],[517,5]]},"19":{"position":[[1354,8],[1439,4]]},"21":{"position":[[339,4]]},"25":{"position":[[174,4]]},"27":{"position":[[2358,8]]},"29":{"position":[[385,8]]},"79":{"position":[[473,8]]},"81":{"position":[[365,8]]},"83":{"position":[[72,8],[371,4],[519,5],[676,7]]},"89":{"position":[[196,5],[875,4],[1024,4]]},"162":{"position":[[525,9],[601,9]]},"170":{"position":[[362,8]]},"412":{"position":[[291,8]]},"414":{"position":[[419,8]]},"416":{"position":[[57,8]]},"419":{"position":[[195,5]]}}}],["planner",{"_index":1094,"t":{"85":{"position":[[2723,10]]},"206":{"position":[[24,9],[70,7],[226,7]]}}}],["planning_research",{"_index":1504,"t":{"162":{"position":[[420,18]]}}}],["platform",{"_index":1674,"t":{"239":{"position":[[226,8]]},"384":{"position":[[13,8]]}}}],["playground",{"_index":2279,"t":{"425":{"position":[[142,11]]}}}],["playlist",{"_index":1625,"t":{"209":{"position":[[18,8]]}}}],["pleas",{"_index":740,"t":{"46":{"position":[[44,6],[96,6]]},"56":{"position":[[272,6]]},"87":{"position":[[2899,6]]},"89":{"position":[[1380,6],[1477,6]]},"99":{"position":[[266,6]]},"140":{"position":[[934,6]]},"224":{"position":[[240,6]]},"230":{"position":[[33,6]]},"323":{"position":[[103,6]]},"339":{"position":[[147,6],[334,6]]},"388":{"position":[[168,6]]},"412":{"position":[[420,6]]},"423":{"position":[[662,6]]}}}],["plugin",{"_index":761,"t":{"48":{"position":[[550,9]]},"204":{"position":[[454,8]]}}}],["poetri",{"_index":1579,"t":{"182":{"position":[[17,6],[66,6],[220,6],[615,6],[686,6],[1021,6],[1235,6]]},"184":{"position":[[65,6]]}}}],["point",{"_index":557,"t":{"23":{"position":[[1880,6]]},"68":{"position":[[236,8]]},"85":{"position":[[3244,6]]},"97":{"position":[[256,8]]},"150":{"position":[[3013,6]]},"325":{"position":[[280,7]]}}}],["pointi",{"_index":1423,"t":{"150":{"position":[[2108,6]]}}}],["pool",{"_index":653,"t":{"29":{"position":[[626,4]]}}}],["popular",{"_index":928,"t":{"58":{"position":[[20,7]]}}}],["portion",{"_index":1522,"t":{"162":{"position":[[2474,7]]}}}],["possibl",{"_index":191,"t":{"7":{"position":[[1197,11]]},"11":{"position":[[50,8]]},"89":{"position":[[1135,14]]},"150":{"position":[[1509,8]]}}}],["post",{"_index":964,"t":{"70":{"position":[[19,4]]}}}],["postgresql://someuser:somepass@localhost:5432/somedatabas",{"_index":1458,"t":{"152":{"position":[[157,61]]}}}],["postgresql://someuser:somepass@localhost:5432/somedatabase'def",{"_index":1214,"t":{"101":{"position":[[385,63]]}}}],["potenti",{"_index":32,"t":{"3":{"position":[[354,9]]},"7":{"position":[[833,11]]},"17":{"position":[[743,11]]},"25":{"position":[[217,9]]},"194":{"position":[[402,10]]}}}],["power",{"_index":448,"t":{"19":{"position":[[1540,7]]},"33":{"position":[[66,8]]},"44":{"position":[[183,5]]},"115":{"position":[[514,8]]},"380":{"position":[[60,8]]},"384":{"position":[[256,8]]}}}],["powerpoint",{"_index":951,"t":{"68":{"position":[[166,11]]},"97":{"position":[[186,11]]}}}],["powershell/cmd",{"_index":1575,"t":{"180":{"position":[[223,14],[348,14],[481,14]]}}}],["pprint",{"_index":2288,"t":{"433":{"position":[[377,7]]}}}],["pprint.pprint(search_result",{"_index":2313,"t":{"433":{"position":[[1551,29]]}}}],["pr",{"_index":1766,"t":{"249":{"position":[[477,2],[505,3]]}}}],["practic",{"_index":932,"t":{"58":{"position":[[245,9]]}}}],["pre",{"_index":1025,"t":{"83":{"position":[[466,3]]},"261":{"position":[[40,3]]},"275":{"position":[[0,3]]}}}],["precis",{"_index":1546,"t":{"170":{"position":[[98,10]]}}}],["predefin",{"_index":692,"t":{"38":{"position":[[379,10]]},"42":{"position":[[579,10]]},"87":{"position":[[225,10]]}}}],["prefer",{"_index":1633,"t":{"218":{"position":[[75,9]]},"302":{"position":[[20,9]]}}}],["prefix",{"_index":2215,"t":{"390":{"position":[[449,8]]}}}],["premium",{"_index":1407,"t":{"150":{"position":[[1589,7]]}}}],["prerequisit",{"_index":1269,"t":{"109":{"position":[[60,14]]},"111":{"position":[[63,14]]}}}],["prerequisites:sudo",{"_index":1677,"t":{"239":{"position":[[316,18]]}}}],["present",{"_index":433,"t":{"19":{"position":[[1112,7]]},"89":{"position":[[1079,9]]},"115":{"position":[[239,12]]}}}],["press",{"_index":1759,"t":{"249":{"position":[[102,5]]}}}],["pretti",{"_index":1146,"t":{"87":{"position":[[2866,6]]}}}],["prevent",{"_index":1587,"t":{"182":{"position":[[476,10]]}}}],["preview",{"_index":801,"t":{"48":{"position":[[2388,9],[7370,9]]},"253":{"position":[[350,8]]},"335":{"position":[[149,9]]},"339":{"position":[[516,8],[682,7]]}}}],["previou",{"_index":1144,"t":{"87":{"position":[[2780,8]]},"380":{"position":[[387,8]]}}}],["previous",{"_index":680,"t":{"35":{"position":[[207,10]]},"40":{"position":[[227,10]]}}}],["price",{"_index":458,"t":{"19":{"position":[[1953,7],[2001,7]]}}}],["principl",{"_index":1386,"t":{"150":{"position":[[1024,11]]}}}],["print",{"_index":888,"t":{"48":{"position":[[7038,5],[8541,5]]},"239":{"position":[[635,5]]},"257":{"position":[[519,5]]},"423":{"position":[[991,5]]}}}],["print(\"\\033[35msearch",{"_index":2311,"t":{"433":{"position":[[1511,21]]}}}],["print(\"\\nnumb",{"_index":1842,"t":{"263":{"position":[[816,15],[873,15]]}}}],["print(\"\\nresearch",{"_index":1840,"t":{"263":{"position":[[776,17]]}}}],["print(\"ollama",{"_index":2179,"t":{"382":{"position":[[724,13]]}}}],["print(\"report",{"_index":1839,"t":{"263":{"position":[[745,16]]}}}],["print(\"retriev",{"_index":2292,"t":{"433":{"position":[[628,20]]}}}],["print('mockresearcher',dir(research",{"_index":2304,"t":{"433":{"position":[[1107,39]]}}}],["print('research_conductor',dir(research_conductor",{"_index":2303,"t":{"433":{"position":[[1053,51]]}}}],["print(cost",{"_index":1841,"t":{"263":{"position":[[803,12]]}}}],["print(doc.page_cont",{"_index":564,"t":{"23":{"position":[[2002,23]]}}}],["print(f\"curr",{"_index":843,"t":{"48":{"position":[[3852,15],[6337,15]]}}}],["print(f\"error",{"_index":2021,"t":{"331":{"position":[[598,13]]},"382":{"position":[[783,14]]}}}],["print(f\"mi",{"_index":1803,"t":{"257":{"position":[[466,10]]}}}],["print(f\"run",{"_index":905,"t":{"48":{"position":[[8199,11]]}}}],["print(f\"{msg.rol",{"_index":893,"t":{"48":{"position":[[7196,19]]}}}],["print(len(imag",{"_index":1843,"t":{"263":{"position":[[854,18]]}}}],["print(len(sourc",{"_index":1844,"t":{"263":{"position":[[912,19]]}}}],["print(related_contexts)print(len(related_context",{"_index":1478,"t":{"154":{"position":[[924,51]]}}}],["print(report",{"_index":627,"t":{"27":{"position":[[1787,13]]},"93":{"position":[[1241,13]]},"95":{"position":[[798,13]]},"97":{"position":[[1023,13]]},"101":{"position":[[1738,13]]},"132":{"position":[[640,13]]},"134":{"position":[[763,13]]},"263":{"position":[[762,13]]}}}],["print(report)if",{"_index":1788,"t":{"255":{"position":[[679,15]]}}}],["print(run.error",{"_index":906,"t":{"48":{"position":[[8329,16]]}}}],["print_messages_from_thread(thread.id",{"_index":907,"t":{"48":{"position":[[8572,37]]}}}],["print_messages_from_thread(thread_id",{"_index":890,"t":{"48":{"position":[[7070,38]]}}}],["priorit",{"_index":630,"t":{"27":{"position":[[2099,14]]},"140":{"position":[[578,11]]},"435":{"position":[[375,11]]}}}],["prioriti",{"_index":1914,"t":{"311":{"position":[[102,8]]}}}],["pro",{"_index":1634,"t":{"218":{"position":[[107,5]]},"220":{"position":[[100,5]]},"222":{"position":[[164,5]]},"359":{"position":[[85,3],[135,3]]}}}],["pro\"embedding=\"google_genai:models/text",{"_index":2111,"t":{"357":{"position":[[229,39]]}}}],["pro\"strategic_llm=\"google_genai:gemini",{"_index":2110,"t":{"357":{"position":[[186,38]]}}}],["probabl",{"_index":1417,"t":{"150":{"position":[[1892,8],[1975,8]]}}}],["problem",{"_index":38,"t":{"3":{"position":[[471,7]]},"7":{"position":[[1488,8]]}}}],["problem.lot",{"_index":1381,"t":{"150":{"position":[[841,12]]}}}],["proceed",{"_index":2001,"t":{"329":{"position":[[505,10]]}}}],["process",{"_index":478,"t":{"21":{"position":[[223,8],[538,9]]},"23":{"position":[[66,7]]},"33":{"position":[[307,8]]},"79":{"position":[[38,7]]},"81":{"position":[[85,7]]},"83":{"position":[[30,7],[212,7],[389,7]]},"85":{"position":[[1013,10]]},"87":{"position":[[295,7]]},"107":{"position":[[456,10]]},"115":{"position":[[441,7]]},"119":{"position":[[175,7]]},"138":{"position":[[351,10]]},"140":{"position":[[136,8],[714,8],[755,9]]},"158":{"position":[[93,8]]},"160":{"position":[[242,8]]},"162":{"position":[[217,7],[1771,8],[1961,7],[2039,7]]},"164":{"position":[[274,8],[404,8],[569,8]]},"170":{"position":[[269,10]]},"172":{"position":[[571,7],[939,8],[1182,8]]},"200":{"position":[[544,10]]},"257":{"position":[[1443,7]]},"277":{"position":[[94,8]]},"283":{"position":[[60,8]]},"285":{"position":[[53,8]]},"291":{"position":[[39,7]]},"294":{"position":[[50,7]]},"296":{"position":[[35,7]]},"298":{"position":[[45,10]]},"317":{"position":[[198,9]]},"394":{"position":[[311,9]]},"412":{"position":[[33,7]]},"414":{"position":[[93,7],[175,7]]},"416":{"position":[[15,7]]},"419":{"position":[[60,7]]},"429":{"position":[[372,10]]}}}],["processingtext_splitt",{"_index":542,"t":{"23":{"position":[[1483,23]]}}}],["produc",{"_index":730,"t":{"44":{"position":[[215,7]]}}}],["product",{"_index":437,"t":{"19":{"position":[[1183,7]]},"27":{"position":[[1579,7],[1900,7],[2061,7]]},"29":{"position":[[550,12]]},"48":{"position":[[127,8]]},"64":{"position":[[42,8]]},"77":{"position":[[358,10]]},"113":{"position":[[127,11]]},"132":{"position":[[432,7]]},"134":{"position":[[461,7]]},"150":{"position":[[2388,10]]},"218":{"position":[[227,10]]},"222":{"position":[[304,10]]},"224":{"position":[[305,10]]},"435":{"position":[[80,8],[129,8]]}}}],["profil",{"_index":1756,"t":{"247":{"position":[[17,7]]}}}],["progress",{"_index":51,"t":{"3":{"position":[[621,9]]},"75":{"position":[[215,9],[473,8]]},"89":{"position":[[1359,8]]},"115":{"position":[[131,8]]}}}],["project",{"_index":702,"t":{"42":{"position":[[56,8]]},"79":{"position":[[314,7]]},"128":{"position":[[41,7]]},"182":{"position":[[97,7],[184,8],[445,7],[693,8],[811,8],[921,7],[1075,8]]},"188":{"position":[[238,7]]},"215":{"position":[[148,8]]},"218":{"position":[[144,8]]},"255":{"position":[[132,8]]},"374":{"position":[[542,7]]},"394":{"position":[[407,7]]}}}],["project'",{"_index":1583,"t":{"182":{"position":[[237,9],[594,9]]}}}],["project’",{"_index":1172,"t":{"89":{"position":[[1341,9]]}}}],["promis",{"_index":1964,"t":{"317":{"position":[[1880,7]]}}}],["promise((resolv",{"_index":1953,"t":{"317":{"position":[[1501,17]]}}}],["prompt",{"_index":256,"t":{"11":{"position":[[465,6]]},"15":{"position":[[719,7]]},"58":{"position":[[275,7]]},"75":{"position":[[270,10]]},"95":{"position":[[26,6],[191,6],[612,6]]}}}],["proper",{"_index":1203,"t":{"99":{"position":[[298,6]]}}}],["properli",{"_index":166,"t":{"7":{"position":[[451,9]]},"85":{"position":[[3315,9]]}}}],["properti",{"_index":806,"t":{"48":{"position":[[2565,13],[7547,13]]},"239":{"position":[[397,10]]}}}],["propos",{"_index":80,"t":{"3":{"position":[[1156,8]]}}}],["proposit",{"_index":1411,"t":{"150":{"position":[[1653,12]]}}}],["propositioneconom",{"_index":1398,"t":{"150":{"position":[[1316,24]]}}}],["proprietari",{"_index":453,"t":{"19":{"position":[[1781,11]]},"62":{"position":[[133,11],[222,11]]}}}],["provid",{"_index":98,"t":{"5":{"position":[[278,7]]},"11":{"position":[[318,7]]},"19":{"position":[[149,7],[697,7]]},"23":{"position":[[10,8]]},"25":{"position":[[266,7]]},"42":{"position":[[432,7],[571,7]]},"48":{"position":[[1582,7],[1827,7],[1900,8],[5694,7],[5767,8]]},"62":{"position":[[49,7]]},"77":{"position":[[224,8],[518,9]]},"83":{"position":[[1028,8]]},"93":{"position":[[74,9],[153,8],[269,9],[490,7]]},"95":{"position":[[665,7]]},"97":{"position":[[70,9],[516,8]]},"99":{"position":[[171,7]]},"115":{"position":[[40,10]]},"119":{"position":[[83,7]]},"140":{"position":[[511,9]]},"162":{"position":[[1099,8]]},"164":{"position":[[235,7],[427,7]]},"182":{"position":[[820,9],[1153,8]]},"222":{"position":[[410,9]]},"253":{"position":[[54,10]]},"255":{"position":[[340,8]]},"277":{"position":[[15,8]]},"343":{"position":[[10,8]]},"347":{"position":[[59,8]]},"390":{"position":[[155,8]]},"414":{"position":[[105,8]]},"419":{"position":[[474,8]]},"423":{"position":[[384,7]]},"439":{"position":[[141,7],[170,8]]}}}],["proxy_cache_bypass",{"_index":1729,"t":{"239":{"position":[[1712,18],[2250,18]]}}}],["proxy_http_vers",{"_index":1725,"t":{"239":{"position":[[1580,18],[1843,18],[2118,18],[2381,18]]}}}],["proxy_pass",{"_index":1724,"t":{"239":{"position":[[1546,10],[1809,10],[2084,10],[2347,10]]}}}],["proxy_set_head",{"_index":1727,"t":{"239":{"position":[[1604,16],[1644,16],[1683,16],[1867,16],[1907,16],[1946,16],[2142,16],[2182,16],[2221,16],[2405,16],[2445,16],[2484,16]]}}}],["public",{"_index":454,"t":{"19":{"position":[[1810,6]]},"79":{"position":[[485,12]]},"83":{"position":[[177,12]]},"412":{"position":[[303,12]]},"416":{"position":[[144,11]]},"435":{"position":[[497,6]]}}}],["publish",{"_index":1,"t":{"3":{"position":[[18,10]]},"19":{"position":[[559,9]]},"81":{"position":[[641,9],[669,10]]},"83":{"position":[[1297,9],[1309,9]]},"85":{"position":[[2847,12]]},"150":{"position":[[339,9]]},"414":{"position":[[695,9],[723,10]]},"419":{"position":[[719,9],[731,9]]},"423":{"position":[[494,7]]}}}],["publish_format",{"_index":1139,"t":{"87":{"position":[[2461,18]]},"423":{"position":[[461,15],[1116,18]]}}}],["publisher_ag",{"_index":1080,"t":{"85":{"position":[[2236,15]]}}}],["publisher_agent.run",{"_index":1092,"t":{"85":{"position":[[2673,20]]}}}],["publisheragent(self.output_dir",{"_index":1081,"t":{"85":{"position":[[2254,31]]}}}],["pubmedcentr",{"_index":2210,"t":{"388":{"position":[[838,13]]}}}],["pull",{"_index":1655,"t":{"228":{"position":[[184,4]]},"394":{"position":[[439,4]]}}}],["put",{"_index":66,"t":{"3":{"position":[[904,3]]}}}],["pymupdfload",{"_index":499,"t":{"23":{"position":[[243,14]]}}}],["pymupdfloader(file_path",{"_index":515,"t":{"23":{"position":[[685,24]]}}}],["pypi",{"_index":1823,"t":{"261":{"position":[[162,5]]}}}],["pyproject.toml",{"_index":1584,"t":{"182":{"position":[[247,16]]}}}],["pytest",{"_index":1755,"t":{"243":{"position":[[184,6]]}}}],["python",{"_index":212,"t":{"9":{"position":[[418,6]]},"48":{"position":[[1649,6]]},"83":{"position":[[864,6]]},"85":{"position":[[1437,6]]},"107":{"position":[[471,6]]},"109":{"position":[[75,6],[193,6]]},"121":{"position":[[49,6],[100,7]]},"125":{"position":[[186,6]]},"134":{"position":[[845,6]]},"180":{"position":[[248,6],[693,6]]},"184":{"position":[[114,6]]},"190":{"position":[[39,6]]},"194":{"position":[[52,6],[200,6],[352,6]]},"200":{"position":[[559,6]]},"218":{"position":[[402,6]]},"220":{"position":[[502,6]]},"222":{"position":[[465,6]]},"255":{"position":[[125,6]]},"261":{"position":[[62,6]]},"317":{"position":[[100,6],[133,6],[422,6]]},"325":{"position":[[268,6],[436,6],[506,6]]},"374":{"position":[[196,6]]},"382":{"position":[[20,6]]},"421":{"position":[[208,6]]},"429":{"position":[[387,6]]}}}],["python3.11",{"_index":1995,"t":{"325":{"position":[[532,10]]}}}],["python@3.11",{"_index":1991,"t":{"325":{"position":[[310,11]]}}}],["q",{"_index":1331,"t":{"140":{"position":[[0,2],[208,2],[371,2],[649,2]]}}}],["qualiti",{"_index":135,"t":{"5":{"position":[[1010,7]]},"27":{"position":[[2210,7]]},"79":{"position":[[89,7]]},"89":{"position":[[248,7],[679,7]]},"255":{"position":[[1238,7]]},"313":{"position":[[437,7]]},"412":{"position":[[84,7]]},"435":{"position":[[430,8]]}}}],["queri",{"_index":219,"t":{"9":{"position":[[635,6]]},"25":{"position":[[236,7],[331,7]]},"27":{"position":[[1557,5]]},"33":{"position":[[339,5]]},"38":{"position":[[71,6],[96,5]]},"40":{"position":[[75,6]]},"44":{"position":[[143,5]]},"48":{"position":[[2581,8],[2636,5],[2723,9],[7563,8],[7618,5],[7705,9]]},"52":{"position":[[147,5],[153,5],[400,5]]},"85":{"position":[[1564,6],[1751,5]]},"87":{"position":[[2407,8]]},"93":{"position":[[369,6],[876,5]]},"95":{"position":[[205,5]]},"97":{"position":[[838,5]]},"101":{"position":[[1113,5]]},"115":{"position":[[112,8]]},"132":{"position":[[410,5]]},"134":{"position":[[439,5]]},"140":{"position":[[104,5],[801,7]]},"154":{"position":[[798,5]]},"162":{"position":[[295,6],[2147,6],[2175,5]]},"164":{"position":[[140,7]]},"166":{"position":[[149,6]]},"172":{"position":[[803,7]]},"190":{"position":[[53,9]]},"192":{"position":[[0,5],[31,5]]},"198":{"position":[[63,5]]},"206":{"position":[[605,5]]},"255":{"position":[[349,5],[719,5]]},"257":{"position":[[602,5]]},"263":{"position":[[583,5]]},"266":{"position":[[0,5]]},"268":{"position":[[0,5]]},"270":{"position":[[0,5]]},"275":{"position":[[272,5]]},"294":{"position":[[177,7]]},"317":{"position":[[40,5],[505,5]]},"353":{"position":[[29,5]]},"374":{"position":[[114,5]]},"382":{"position":[[49,5]]},"423":{"position":[[23,5],[144,5],[165,5],[330,6],[1043,8]]},"433":{"position":[[120,5],[1162,5],[1340,5]]}}}],["query/sub",{"_index":1179,"t":{"93":{"position":[[359,9]]}}}],["query=\"site:linkedin.com",{"_index":2141,"t":{"374":{"position":[[169,24]]}}}],["query=\"th",{"_index":712,"t":{"42":{"position":[[279,10]]}}}],["query=\"your",{"_index":1874,"t":{"294":{"position":[[156,11]]}}}],["query=queri",{"_index":1069,"t":{"85":{"position":[[1659,12]]},"150":{"position":[[3180,12]]},"152":{"position":[[714,12]]},"154":{"position":[[590,12]]},"257":{"position":[[1044,12]]}}}],["querymessag",{"_index":2174,"t":{"382":{"position":[[569,13]]}}}],["question",{"_index":119,"t":{"5":{"position":[[577,9]]},"11":{"position":[[558,8],[577,12],[658,9]]},"13":{"position":[[171,9],[249,9]]},"48":{"position":[[1174,10],[1615,10],[5299,9],[8891,10]]},"64":{"position":[[485,9]]},"89":{"position":[[1466,10]]},"204":{"position":[[681,9]]},"206":{"position":[[88,9],[203,9],[647,9],[734,9]]},"230":{"position":[[22,10]]},"423":{"position":[[1320,10]]}}}],["questions.pleas",{"_index":792,"t":{"48":{"position":[[2023,16],[5890,16]]}}}],["quick",{"_index":550,"t":{"23":{"position":[[1685,5]]},"25":{"position":[[70,5]]},"58":{"position":[[348,5]]},"113":{"position":[[17,5]]},"194":{"position":[[11,5]]}}}],["quickli",{"_index":972,"t":{"75":{"position":[[285,7]]},"439":{"position":[[0,7]]}}}],["quickstart",{"_index":1612,"t":{"200":{"position":[[8,10]]}}}],["quit",{"_index":104,"t":{"5":{"position":[[349,5]]},"7":{"position":[[624,5]]},"11":{"position":[[987,5]]},"48":{"position":[[2759,5]]}}}],["qwen2:1.5b",{"_index":2149,"t":{"378":{"position":[[238,10]]}}}],["r",{"_index":1272,"t":{"109":{"position":[[151,1]]},"176":{"position":[[45,1]]},"180":{"position":[[716,1]]},"188":{"position":[[153,1]]},"325":{"position":[[470,1]]},"421":{"position":[[40,1]]}}}],["race",{"_index":1108,"t":{"87":{"position":[[433,4]]}}}],["rag",{"_index":933,"t":{"58":{"position":[[296,4]]},"62":{"position":[[304,3]]},"75":{"position":[[328,3]]}}}],["rais",{"_index":529,"t":{"23":{"position":[[1180,5]]},"87":{"position":[[701,7]]},"400":{"position":[[44,6]]}}}],["ram",{"_index":1663,"t":{"234":{"position":[[146,3]]}}}],["ran",{"_index":40,"t":{"3":{"position":[[512,3]]}}}],["random",{"_index":1433,"t":{"150":{"position":[[2431,6]]}}}],["rang",{"_index":1335,"t":{"140":{"position":[[152,5]]}}}],["rank",{"_index":940,"t":{"62":{"position":[[161,4]]}}}],["raw",{"_index":762,"t":{"48":{"position":[[577,3]]},"140":{"position":[[842,3]]}}}],["raw_cont",{"_index":2220,"t":{"394":{"position":[[149,14],[224,14]]}}}],["reach",{"_index":325,"t":{"15":{"position":[[831,8]]},"46":{"position":[[134,5]]}}}],["react",{"_index":1236,"t":{"105":{"position":[[4,5]]},"107":{"position":[[515,5]]},"200":{"position":[[603,5]]},"427":{"position":[[4,5]]},"429":{"position":[[431,5]]}}}],["read",{"_index":1582,"t":{"182":{"position":[[227,5]]}}}],["readi",{"_index":1636,"t":{"220":{"position":[[106,5]]}}}],["real",{"_index":426,"t":{"19":{"position":[[909,4]]},"38":{"position":[[327,4]]},"48":{"position":[[5315,4]]},"115":{"position":[[121,4]]},"170":{"position":[[565,4],[633,4],[1121,4]]},"307":{"position":[[96,4],[321,4]]}}}],["realli",{"_index":921,"t":{"56":{"position":[[3,6]]}}}],["realtim",{"_index":1793,"t":{"255":{"position":[[1246,8]]}}}],["reason",{"_index":321,"t":{"15":{"position":[[774,9]]},"19":{"position":[[1367,10],[1478,6]]},"27":{"position":[[2367,9]]},"29":{"position":[[398,10]]},"48":{"position":[[4836,8]]},"222":{"position":[[238,9]]}}}],["receiv",{"_index":1939,"t":{"317":{"position":[[963,11]]}}}],["recent",{"_index":94,"t":{"5":{"position":[[231,6]]},"33":{"position":[[41,6]]},"48":{"position":[[2501,6],[7483,6]]},"75":{"position":[[406,8]]},"79":{"position":[[345,6]]},"140":{"position":[[595,6]]},"412":{"position":[[163,6]]}}}],["recommend",{"_index":1281,"t":{"111":{"position":[[96,12]]},"113":{"position":[[149,12]]},"136":{"position":[[271,15]]},"150":{"position":[[3060,15]]},"222":{"position":[[335,11]]},"234":{"position":[[202,11]]}}}],["reconcil",{"_index":1341,"t":{"140":{"position":[[486,9]]}}}],["recoveri",{"_index":1820,"t":{"257":{"position":[[1944,10]]}}}],["recovery\\n",{"_index":1819,"t":{"257":{"position":[[1812,12]]}}}],["recursivecharactertextsplitter(chunk_size=1000",{"_index":543,"t":{"23":{"position":[[1509,47]]}}}],["recursivecharactertextsplitterfrom",{"_index":507,"t":{"23":{"position":[[443,34]]}}}],["reduc",{"_index":179,"t":{"7":{"position":[[854,6],[1231,7]]},"9":{"position":[[528,8]]},"15":{"position":[[305,8]]},"19":{"position":[[270,8],[1011,7]]},"29":{"position":[[362,7]]},"60":{"position":[[133,6]]},"62":{"position":[[461,7]]}}}],["redund",{"_index":679,"t":{"35":{"position":[[184,10]]},"40":{"position":[[263,10]]}}}],["redundant.a",{"_index":1379,"t":{"150":{"position":[[771,11]]}}}],["refer",{"_index":701,"t":{"40":{"position":[[387,10]]},"83":{"position":[[1244,10]]},"230":{"position":[[40,5]]},"349":{"position":[[0,5]]},"419":{"position":[[666,10]]}}}],["refin",{"_index":1651,"t":{"224":{"position":[[293,7]]}}}],["reflect",{"_index":1750,"t":{"239":{"position":[[3107,7]]},"384":{"position":[[921,7]]}}}],["regard",{"_index":1231,"t":{"101":{"position":[[1310,9]]},"150":{"position":[[3020,9]]}}}],["region",{"_index":462,"t":{"19":{"position":[[2031,8]]}}}],["regular",{"_index":827,"t":{"48":{"position":[[3279,7]]}}}],["regulatori",{"_index":415,"t":{"19":{"position":[[581,10]]}}}],["reject",{"_index":1954,"t":{"317":{"position":[[1519,7]]}}}],["relat",{"_index":117,"t":{"5":{"position":[[529,7],[599,7]]},"25":{"position":[[515,7],[755,7]]},"160":{"position":[[944,7]]},"172":{"position":[[512,7]]},"206":{"position":[[150,7],[261,7]]},"313":{"position":[[140,7]]},"321":{"position":[[5,7]]},"323":{"position":[[10,7]]},"331":{"position":[[76,7]]}}}],["releas",{"_index":751,"t":{"48":{"position":[[160,7]]},"75":{"position":[[42,7]]}}}],["relev",{"_index":189,"t":{"7":{"position":[[1159,8]]},"13":{"position":[[329,8],[438,8]]},"17":{"position":[[1200,9]]},"19":{"position":[[1680,8]]},"21":{"position":[[419,8]]},"25":{"position":[[410,8]]},"27":{"position":[[871,8],[2435,8]]},"40":{"position":[[218,8]]},"48":{"position":[[1268,8],[1944,8],[2048,8],[5811,8],[5915,8]]},"62":{"position":[[175,8],[364,8]]},"83":{"position":[[421,8]]},"128":{"position":[[67,8]]},"152":{"position":[[269,8]]},"154":{"position":[[815,8]]},"160":{"position":[[1006,8]]},"162":{"position":[[1059,8],[3539,8],[3615,8],[3997,8],[4082,8]]},"170":{"position":[[1175,8]]},"206":{"position":[[814,8],[889,8]]},"239":{"position":[[3048,8]]},"257":{"position":[[2013,8]]},"439":{"position":[[18,8]]}}}],["relevant_contents_context",{"_index":1533,"t":{"162":{"position":[[3934,26]]}}}],["relevant_doc",{"_index":563,"t":{"23":{"position":[[1987,14]]}}}],["reli",{"_index":1023,"t":{"83":{"position":[[451,4]]},"89":{"position":[[299,7]]}}}],["reliabl",{"_index":132,"t":{"5":{"position":[[923,11]]},"150":{"position":[[492,8]]}}}],["reload",{"_index":1568,"t":{"176":{"position":[[126,6]]},"184":{"position":[[143,6]]},"273":{"position":[[718,6]]},"325":{"position":[[565,6]]}}}],["rememb",{"_index":1919,"t":{"313":{"position":[[351,9]]}}}],["remov",{"_index":632,"t":{"27":{"position":[[2262,6]]},"384":{"position":[[621,6]]}}}],["render",{"_index":1903,"t":{"307":{"position":[[249,8]]}}}],["renew",{"_index":1608,"t":{"194":{"position":[[334,9],[366,10]]},"266":{"position":[[32,9]]}}}],["replac",{"_index":2153,"t":{"380":{"position":[[297,7]]},"382":{"position":[[859,7]]}}}],["repo",{"_index":987,"t":{"75":{"position":[[880,4]]},"243":{"position":[[82,4]]},"249":{"position":[[65,4],[96,5]]}}}],["repo_nam",{"_index":1958,"t":{"317":{"position":[[1721,10]]}}}],["report",{"_index":244,"t":{"11":{"position":[[130,6],[411,6],[604,6],[617,6],[861,6],[905,6]]},"13":{"position":[[532,7]]},"15":{"position":[[390,7]]},"21":{"position":[[492,7]]},"25":{"position":[[587,7]]},"27":{"position":[[1011,6],[1475,6],[1523,6],[1672,6]]},"33":{"position":[[139,7],[451,7]]},"35":{"position":[[123,6]]},"38":{"position":[[127,6],[163,6],[273,6]]},"40":{"position":[[283,6],[332,8],[427,7]]},"42":{"position":[[851,6],[1037,6]]},"44":{"position":[[90,7]]},"52":{"position":[[133,7],[213,6],[454,6],[461,6]]},"68":{"position":[[426,7]]},"81":{"position":[[633,7],[690,6]]},"83":{"position":[[158,6],[529,6],[940,7],[1195,6],[1329,6]]},"85":{"position":[[619,6],[744,7],[844,6],[1805,6],[1812,6],[1860,6]]},"87":{"position":[[392,6],[487,7],[1174,7],[2602,6],[2804,6],[3129,7],[3191,6]]},"89":{"position":[[734,6]]},"93":{"position":[[795,6],[1149,6]]},"95":{"position":[[160,6],[500,6],[548,6],[684,6],[725,6]]},"97":{"position":[[756,6],[804,6],[948,6]]},"101":{"position":[[1032,6],[1617,6]]},"132":{"position":[[329,6],[525,6]]},"134":{"position":[[358,6],[619,6]]},"136":{"position":[[44,6],[126,6]]},"140":{"position":[[567,7]]},"144":{"position":[[13,7]]},"152":{"position":[[549,6]]},"158":{"position":[[309,6]]},"162":{"position":[[2646,7],[2930,7],[3067,6],[3242,7],[3277,6],[3376,6],[3572,7],[3732,7],[3779,6],[3845,6],[3903,6],[4199,6],[4325,6]]},"164":{"position":[[190,6],[368,6]]},"166":{"position":[[265,7]]},"168":{"position":[[63,9]]},"192":{"position":[[100,6]]},"194":{"position":[[26,6],[165,6],[324,6]]},"196":{"position":[[14,6]]},"198":{"position":[[85,6]]},"204":{"position":[[377,7]]},"206":{"position":[[304,7],[1024,7]]},"211":{"position":[[54,7],[105,7],[399,7]]},"215":{"position":[[287,8]]},"220":{"position":[[191,6],[579,6]]},"222":{"position":[[205,7]]},"255":{"position":[[206,7],[320,6],[359,6],[452,6],[632,7],[644,6],[890,6]]},"257":{"position":[[702,6],[833,6],[1238,6],[1300,6],[1314,7]]},"263":{"position":[[207,6],[481,7],[659,7]]},"273":{"position":[[290,6],[527,9],[537,7]]},"275":{"position":[[407,6],[652,9],[662,7]]},"317":{"position":[[238,8]]},"323":{"position":[[94,8]]},"331":{"position":[[329,6]]},"412":{"position":[[361,6]]},"414":{"position":[[687,7],[744,6]]},"419":{"position":[[205,6],[617,6],[751,6]]},"423":{"position":[[47,7],[279,7],[506,6],[521,7],[733,6],[821,6],[931,6],[1282,6],[1336,6],[1380,6]]}}}],["report_format=\"apa",{"_index":1875,"t":{"294":{"position":[[216,20]]}}}],["report_sourc",{"_index":607,"t":{"27":{"position":[[961,13],[1306,14],[1647,13]]},"38":{"position":[[134,14]]},"68":{"position":[[524,13]]},"93":{"position":[[928,13]]},"97":{"position":[[432,13],[623,14],[905,13]]},"99":{"position":[[203,13]]},"101":{"position":[[826,14],[1217,13]]},"125":{"position":[[359,13]]},"132":{"position":[[160,14],[500,13]]},"134":{"position":[[160,14],[529,13]]},"154":{"position":[[223,13]]},"257":{"position":[[721,13]]},"317":{"position":[[1667,14]]}}}],["report_source=\"langchain_vectorstor",{"_index":1453,"t":{"150":{"position":[[3224,38]]},"152":{"position":[[758,38]]}}}],["report_source=\"web",{"_index":1474,"t":{"154":{"position":[[634,20]]}}}],["report_source=\"web_search",{"_index":718,"t":{"42":{"position":[[378,27]]}}}],["report_source=report_sourc",{"_index":618,"t":{"27":{"position":[[1399,28],[1757,29]]},"93":{"position":[[1194,28]]},"97":{"position":[[691,28],[993,29]]},"101":{"position":[[946,28],[1687,28]]},"132":{"position":[[253,28],[610,29]]},"134":{"position":[[282,28],[733,29]]},"257":{"position":[[1082,28]]}}}],["report_typ",{"_index":615,"t":{"27":{"position":[[1288,12]]},"38":{"position":[[102,12]]},"52":{"position":[[225,11]]},"93":{"position":[[602,12]]},"95":{"position":[[271,12],[372,12],[582,11]]},"101":{"position":[[808,12],[1185,11]]},"132":{"position":[[142,12]]},"134":{"position":[[142,12]]},"190":{"position":[[65,11],[77,13]]},"192":{"position":[[64,11]]},"194":{"position":[[114,11],[271,11],[415,11]]},"257":{"position":[[660,11]]},"263":{"position":[[87,12],[140,12],[627,11],[731,13]]},"273":{"position":[[162,12],[223,12]]},"275":{"position":[[340,12]]},"317":{"position":[[1642,12]]}}}],["report_type=\"research_report",{"_index":626,"t":{"27":{"position":[[1726,30]]},"42":{"position":[[347,30]]},"132":{"position":[[579,30]]},"134":{"position":[[673,30]]},"150":{"position":[[3193,30]]},"152":{"position":[[727,30]]},"154":{"position":[[603,30]]},"294":{"position":[[185,30]]}}}],["report_type=report_typ",{"_index":617,"t":{"27":{"position":[[1374,24]]},"52":{"position":[[325,24]]},"93":{"position":[[683,24]]},"95":{"position":[[439,24],[772,25]]},"101":{"position":[[921,24],[1662,24]]},"132":{"position":[[228,24]]},"134":{"position":[[228,24]]},"257":{"position":[[1057,24]]}}}],["report_type=research_report",{"_index":1070,"t":{"85":{"position":[[1672,28]]}}}],["report_written",{"_index":1532,"t":{"162":{"position":[[3810,15]]}}}],["reportasync",{"_index":1786,"t":{"255":{"position":[[500,11]]}}}],["reportawait",{"_index":1455,"t":{"150":{"position":[[3323,11]]},"152":{"position":[[858,11]]}}}],["reportif",{"_index":919,"t":{"52":{"position":[[509,8]]},"93":{"position":[[843,8]]},"101":{"position":[[1080,8]]},"132":{"position":[[377,8]]},"134":{"position":[[406,8]]}}}],["reportreport",{"_index":1880,"t":{"296":{"position":[[156,12]]}}}],["repositori",{"_index":672,"t":{"33":{"position":[[539,11]]},"140":{"position":[[973,11]]},"188":{"position":[[10,11]]},"220":{"position":[[88,11],[368,11]]},"226":{"position":[[182,11]]},"228":{"position":[[224,10]]},"243":{"position":[[5,10]]}}}],["repository:echo",{"_index":1695,"t":{"239":{"position":[[599,15]]}}}],["repres",{"_index":646,"t":{"29":{"position":[[16,10]]},"170":{"position":[[37,10]]}}}],["reproduc",{"_index":1540,"t":{"164":{"position":[[507,16]]}}}],["request",{"_index":441,"t":{"19":{"position":[[1228,8]]},"38":{"position":[[435,8]]},"146":{"position":[[137,7]]},"162":{"position":[[507,7]]},"198":{"position":[[92,10]]},"275":{"position":[[108,8],[878,7]]},"305":{"position":[[107,7]]},"394":{"position":[[444,8]]}}}],["request.args.get('queri",{"_index":1865,"t":{"275":{"position":[[280,25]]}}}],["requir",{"_index":44,"t":{"3":{"position":[[541,8]]},"9":{"position":[[176,8]]},"48":{"position":[[2711,11],[3440,8],[4080,8],[4903,8],[7693,11]]},"109":{"position":[[119,8]]},"111":{"position":[[373,8]]},"182":{"position":[[286,8]]},"188":{"position":[[117,8]]},"192":{"position":[[6,11],[76,11]]},"218":{"position":[[256,8],[388,13]]},"220":{"position":[[298,8],[484,13]]},"222":{"position":[[451,13]]},"249":{"position":[[19,8]]},"253":{"position":[[148,9]]},"255":{"position":[[1213,7]]},"305":{"position":[[262,7],[412,8]]},"307":{"position":[[463,8],[494,8]]},"309":{"position":[[260,8]]},"311":{"position":[[240,7]]},"325":{"position":[[334,8],[412,8]]},"339":{"position":[[219,8],[291,8]]},"355":{"position":[[17,8]]},"388":{"position":[[224,12]]},"390":{"position":[[413,8]]},"421":{"position":[[8,8]]}}}],["require('./gptr",{"_index":1970,"t":{"317":{"position":[[2274,15]]}}}],["require('ws');let",{"_index":1926,"t":{"317":{"position":[[579,17]]}}}],["requirements.txt",{"_index":1273,"t":{"109":{"position":[[153,16]]},"176":{"position":[[47,16]]},"180":{"position":[[643,16],[718,16]]},"188":{"position":[[155,16]]},"325":{"position":[[472,16]]},"421":{"position":[[42,16]]}}}],["requires_act",{"_index":835,"t":{"48":{"position":[[3642,19],[3936,19],[5042,18],[6421,19],[8374,18]]}}}],["requisit",{"_index":1821,"t":{"261":{"position":[[44,10]]},"275":{"position":[[4,10]]}}}],["research",{"_index":12,"t":{"3":{"position":[[123,9],[174,8],[401,8],[453,9],[738,8],[867,8],[1009,10],[1079,9]]},"5":{"position":[[128,8],[540,9],[590,8],[872,9],[949,8]]},"7":{"position":[[212,8]]},"9":{"position":[[162,8],[279,8],[549,9],[957,8]]},"11":{"position":[[73,8],[446,8]]},"13":{"position":[[51,11],[162,8],[240,8],[523,8]]},"15":{"position":[[21,8],[178,8],[229,8],[332,8],[859,8],[976,10]]},"17":{"position":[[85,9],[357,8],[444,10],[484,8],[537,8],[680,8],[1096,8],[1225,9]]},"19":{"position":[[43,8],[235,8],[403,11],[471,8],[1454,8],[1555,8],[1742,8],[2118,9]]},"21":{"position":[[60,10],[108,8],[279,10],[303,8],[483,8],[670,10],[699,9]]},"25":{"position":[[92,10],[144,10],[165,8],[227,8],[358,10],[530,8],[578,8],[599,10],[626,9],[855,8]]},"27":{"position":[[55,8],[128,11],[160,10],[197,10],[265,10],[572,10],[595,8],[623,10],[703,9],[743,9],[810,10],[837,9],[1047,10],[1140,9],[1334,10],[1428,8],[1836,8],[1871,8],[2193,8],[2237,8],[2418,11],[2485,10],[2685,9]]},"29":{"position":[[7,8],[121,11],[205,9],[459,8]]},"33":{"position":[[92,11],[298,8],[381,8],[521,10],[636,8]]},"35":{"position":[[71,8]]},"38":{"position":[[87,8]]},"40":{"position":[[54,8],[168,8]]},"44":{"position":[[196,11],[326,12],[391,10]]},"52":{"position":[[124,8],[274,10],[285,10],[378,8]]},"56":{"position":[[241,8],[260,11],[287,10]]},"58":{"position":[[4,10],[51,8],[105,8],[196,8],[215,10],[368,9],[476,11]]},"60":{"position":[[2,8],[26,10]]},"62":{"position":[[395,8]]},"64":{"position":[[235,8],[254,11]]},"68":{"position":[[25,10],[43,8],[482,10]]},"70":{"position":[[34,8],[103,9]]},"72":{"position":[[20,10]]},"75":{"position":[[57,11],[775,8],[892,10]]},"79":{"position":[[29,8],[441,8],[553,8],[572,11]]},"81":{"position":[[4,8],[76,8],[246,10],[313,8],[378,8],[454,8],[518,8]]},"83":{"position":[[85,9],[248,11],[295,8],[323,8],[380,8],[579,9],[648,8],[731,10],[747,11],[778,8],[853,10],[931,8],[1278,8]]},"85":{"position":[[822,8],[1399,10],[1426,10],[1594,10],[1605,10],[1729,8],[1927,8],[2763,13]]},"87":{"position":[[157,8],[833,8],[1165,8],[1580,10],[2163,12],[2217,8],[2305,8],[3079,8],[3182,8],[3291,10]]},"89":{"position":[[187,8],[528,8],[1252,10]]},"93":{"position":[[45,10],[59,8],[108,10],[137,8],[203,10],[236,8],[293,8],[643,10]]},"95":{"position":[[60,8],[112,8],[398,10],[621,9]]},"97":{"position":[[25,10],[39,8],[471,10],[500,8],[651,10]]},"99":{"position":[[52,9],[100,10],[114,8]]},"101":{"position":[[25,10],[39,8],[881,10]]},"107":{"position":[[597,12]]},"115":{"position":[[26,10],[61,8],[103,8],[177,8],[295,8],[432,8]]},"119":{"position":[[4,10],[120,8],[216,8],[235,11]]},"123":{"position":[[16,10]]},"132":{"position":[[36,9],[188,10],[282,8]]},"134":{"position":[[36,9],[188,10],[311,8]]},"136":{"position":[[35,8]]},"138":{"position":[[244,9]]},"140":{"position":[[27,8],[198,9],[225,10],[282,10],[387,10],[705,8],[890,9],[955,10]]},"150":{"position":[[3300,8]]},"152":{"position":[[835,8]]},"154":{"position":[[122,10],[693,9]]},"158":{"position":[[84,8]]},"160":{"position":[[233,8],[320,8]]},"162":{"position":[[142,8],[208,8],[286,8],[691,8],[785,8],[924,8],[1201,12],[1333,8],[2337,9],[2465,8],[2541,8],[3716,8]]},"164":{"position":[[24,8],[265,8]]},"166":{"position":[[58,8],[207,9]]},"170":{"position":[[221,12],[318,8],[378,8]]},"172":{"position":[[290,8],[360,8],[561,9]]},"176":{"position":[[200,12]]},"184":{"position":[[219,9]]},"188":{"position":[[89,10]]},"192":{"position":[[22,8]]},"194":{"position":[[17,8]]},"200":{"position":[[685,12]]},"204":{"position":[[41,8],[261,8],[368,8],[672,8]]},"206":{"position":[[101,9],[194,8],[295,8],[389,8],[470,8],[596,8],[638,8],[725,8],[1015,8]]},"211":{"position":[[12,9],[96,8],[167,8],[390,8]]},"215":{"position":[[4,10],[70,10],[118,10],[383,8]]},"218":{"position":[[44,10],[365,10]]},"222":{"position":[[81,11],[152,11],[196,8],[512,10]]},"226":{"position":[[119,10]]},"228":{"position":[[4,10],[141,10]]},"243":{"position":[[71,10]]},"247":{"position":[[43,10]]},"255":{"position":[[48,10],[197,8],[311,8],[376,10],[623,8],[1037,10]]},"257":{"position":[[86,8],[939,10],[1016,10],[1229,8],[1291,8],[1434,8],[1696,9],[2115,8]]},"261":{"position":[[119,11],[184,10],[411,10]]},"263":{"position":[[106,10],[835,8],[892,8]]},"273":{"position":[[189,10]]},"275":{"position":[[306,10]]},"277":{"position":[[4,10],[85,8]]},"279":{"position":[[66,9]]},"281":{"position":[[50,9]]},"283":{"position":[[51,8]]},"285":{"position":[[44,8]]},"287":{"position":[[20,8]]},"291":{"position":[[30,8]]},"294":{"position":[[41,8],[128,10],[168,8]]},"296":{"position":[[17,9]]},"298":{"position":[[16,8],[84,8],[540,10]]},"302":{"position":[[246,10]]},"305":{"position":[[23,10]]},"307":{"position":[[28,10]]},"313":{"position":[[478,10],[540,8]]},"317":{"position":[[1747,11],[2371,10]]},"323":{"position":[[85,8]]},"325":{"position":[[425,10]]},"339":{"position":[[280,10]]},"341":{"position":[[4,10]]},"343":{"position":[[148,11]]},"347":{"position":[[48,10]]},"374":{"position":[[244,10]]},"378":{"position":[[375,10]]},"380":{"position":[[73,10]]},"384":{"position":[[269,10]]},"388":{"position":[[4,10]]},"390":{"position":[[227,8]]},"412":{"position":[[24,8],[259,8],[352,8]]},"414":{"position":[[4,8],[166,8],[283,10],[299,11],[367,8],[432,8],[508,8],[572,8]]},"419":{"position":[[96,11],[143,8],[171,8],[255,9],[303,10],[319,11],[350,8],[700,8]]},"423":{"position":[[14,8],[156,8],[321,8],[618,9],[724,8]]},"429":{"position":[[513,12]]},"433":{"position":[[677,10],[970,10]]},"435":{"position":[[202,11],[255,8],[292,12]]},"439":{"position":[[297,8],[365,11],[381,10],[454,8],[545,8],[584,11]]}}}],["research(self",{"_index":1067,"t":{"85":{"position":[[1549,14]]}}}],["research_ag",{"_index":1077,"t":{"85":{"position":[[2174,14]]}}}],["research_agent.run_depth_research",{"_index":1122,"t":{"87":{"position":[[1432,34]]}}}],["research_agent.run_initial_research",{"_index":1084,"t":{"85":{"position":[[2434,36]]}}}],["research_conductor",{"_index":2301,"t":{"433":{"position":[[1000,18]]}}}],["research_context",{"_index":1827,"t":{"263":{"position":[[277,16],[489,17]]},"281":{"position":[[117,16]]}}}],["research_cost",{"_index":1829,"t":{"263":{"position":[[330,14],[507,15]]},"273":{"position":[[374,14],[573,17],[591,15]]},"275":{"position":[[491,14],[698,17],[716,15]]},"283":{"position":[[69,14]]}}}],["research_data",{"_index":1052,"t":{"85":{"position":[[591,14]]}}}],["research_imag",{"_index":1831,"t":{"263":{"position":[[370,15],[523,16]]},"273":{"position":[[414,15]]},"275":{"position":[[531,15]]},"285":{"position":[[62,15]]}}}],["research_report",{"_index":917,"t":{"52":{"position":[[239,17]]},"101":{"position":[[1199,17]]},"192":{"position":[[137,16]]},"194":{"position":[[126,15]]},"257":{"position":[[674,17]]},"263":{"position":[[641,17]]},"266":{"position":[[76,17]]}}}],["research_result",{"_index":1826,"t":{"263":{"position":[[153,15]]},"273":{"position":[[236,15]]},"275":{"position":[[353,15]]}}}],["research_sourc",{"_index":1833,"t":{"263":{"position":[[421,16]]},"273":{"position":[[465,16]]},"275":{"position":[[582,16]]},"287":{"position":[[76,16]]}}}],["research_sourcesif",{"_index":1835,"t":{"263":{"position":[[540,18]]}}}],["research_st",{"_index":1120,"t":{"87":{"position":[[1343,15]]}}}],["research_step_fin",{"_index":1521,"t":{"162":{"position":[[2421,24]]}}}],["research_summari",{"_index":257,"t":{"11":{"position":[[487,20]]}}}],["researchag",{"_index":1064,"t":{"85":{"position":[[1499,14],[2191,15]]}}}],["researchconductor(research",{"_index":2302,"t":{"433":{"position":[[1021,29]]}}}],["researchconductorimport",{"_index":2287,"t":{"433":{"position":[[353,23]]}}}],["researcher'",{"_index":487,"t":{"21":{"position":[[597,12]]},"115":{"position":[[501,12]]}}}],["researcher.add_costs(0.22",{"_index":1872,"t":{"291":{"position":[[99,26]]}}}],["researcher.conduct_research",{"_index":619,"t":{"27":{"position":[[1445,29]]},"52":{"position":[[412,29]]},"85":{"position":[[1763,29]]},"93":{"position":[[765,29]]},"95":{"position":[[470,29]]},"97":{"position":[[726,29]]},"101":{"position":[[1002,29]]},"132":{"position":[[299,29]]},"134":{"position":[[328,29]]},"154":{"position":[[767,30]]},"255":{"position":[[422,29]]},"257":{"position":[[1185,29]]},"263":{"position":[[177,29]]},"273":{"position":[[260,29]]},"275":{"position":[[377,29]]},"296":{"position":[[114,30]]}}}],["researcher.conduct_research()report",{"_index":1456,"t":{"150":{"position":[[3335,35]]},"152":{"position":[[870,35]]}}}],["researcher.get_cost",{"_index":1830,"t":{"263":{"position":[[347,22]]},"273":{"position":[[391,22]]},"275":{"position":[[508,22]]},"283":{"position":[[86,22]]}}}],["researcher.get_draft_section_titles(\"subtop",{"_index":1886,"t":{"296":{"position":[[407,45]]}}}],["researcher.get_research_context",{"_index":1828,"t":{"263":{"position":[[296,33]]},"281":{"position":[[136,33]]},"298":{"position":[[110,34]]}}}],["researcher.get_research_imag",{"_index":1832,"t":{"263":{"position":[[388,32]]},"273":{"position":[[432,32]]},"275":{"position":[[549,32]]},"285":{"position":[[80,32]]}}}],["researcher.get_research_sourc",{"_index":1834,"t":{"263":{"position":[[440,33]]},"273":{"position":[[484,33]]},"275":{"position":[[601,33]]},"287":{"position":[[95,33]]}}}],["researcher.get_similar_written_contents_by_draft_section_titl",{"_index":1889,"t":{"298":{"position":[[228,64]]}}}],["researcher.get_source_url",{"_index":1852,"t":{"273":{"position":[[345,28]]},"275":{"position":[[462,28]]},"279":{"position":[[90,28]]}}}],["researcher.get_subtop",{"_index":1884,"t":{"296":{"position":[[319,27]]}}}],["researcher.git",{"_index":1638,"t":{"220":{"position":[[425,14]]},"226":{"position":[[239,14]]}}}],["researcher.gitcd",{"_index":1597,"t":{"188":{"position":[[68,16]]}}}],["researcher.set_verbose(tru",{"_index":1871,"t":{"289":{"position":[[56,28]]}}}],["researcher.write_report",{"_index":620,"t":{"27":{"position":[[1490,25]]},"52":{"position":[[476,25]]},"85":{"position":[[1827,25]]},"93":{"position":[[810,25]]},"95":{"position":[[515,25]]},"97":{"position":[[771,25]]},"101":{"position":[[1047,25]]},"132":{"position":[[344,25]]},"134":{"position":[[373,25]]},"150":{"position":[[3379,25]]},"152":{"position":[[914,25]]},"255":{"position":[[467,25]]},"257":{"position":[[1253,25]]},"263":{"position":[[222,25]]},"273":{"position":[[305,25]]},"275":{"position":[[422,25]]},"296":{"position":[[177,26]]}}}],["researcher.write_report_conclusion(report",{"_index":1882,"t":{"296":{"position":[[244,43]]}}}],["researchers/experiment",{"_index":1650,"t":{"224":{"position":[[214,25]]}}}],["researchresearch_result",{"_index":1879,"t":{"296":{"position":[[82,23]]}}}],["researchst",{"_index":1047,"t":{"85":{"position":[[483,13],[2327,13]]}}}],["researchstate(typeddict",{"_index":1048,"t":{"85":{"position":[[512,25]]}}}],["resolv",{"_index":1963,"t":{"317":{"position":[[1868,7]]},"323":{"position":[[131,7]]}}}],["resolve(respons",{"_index":1962,"t":{"317":{"position":[[1846,18]]}}}],["resourc",{"_index":24,"t":{"3":{"position":[[239,9]]},"13":{"position":[[303,9],[374,9]]},"204":{"position":[[105,9],[485,9],[605,9]]},"206":{"position":[[788,9],[859,10]]},"211":{"position":[[32,9]]},"307":{"position":[[484,9]]}}}],["resource_report",{"_index":1604,"t":{"192":{"position":[[245,15]]},"268":{"position":[[58,17]]}}}],["respons",{"_index":142,"t":{"7":{"position":[[71,9]]},"48":{"position":[[1228,10],[3105,9],[3345,9]]},"81":{"position":[[349,11],[585,11],[653,11]]},"83":{"position":[[608,11]]},"85":{"position":[[289,9]]},"115":{"position":[[339,10]]},"317":{"position":[[1830,10],[1907,8],[2402,8],[2473,11]]},"382":{"position":[[652,8],[738,11],[750,9]]},"394":{"position":[[48,8],[291,8]]},"414":{"position":[[403,11],[639,11],[707,11]]}}}],["responsecallback",{"_index":1929,"t":{"317":{"position":[[615,16],[1123,18],[1175,16],[1811,16]]}}}],["responsecallback(data.output",{"_index":1945,"t":{"317":{"position":[[1144,30]]}}}],["restart",{"_index":1754,"t":{"239":{"position":[[3204,7]]},"327":{"position":[[87,7]]},"384":{"position":[[909,8]]}}}],["result",{"_index":164,"t":{"7":{"position":[[419,8],[581,8],[1028,6],[1454,8]]},"9":{"position":[[704,7]]},"11":{"position":[[245,7],[975,7],[1113,7]]},"19":{"position":[[1662,9]]},"25":{"position":[[419,8],[441,6],[898,7]]},"27":{"position":[[2177,7]]},"33":{"position":[[417,7]]},"81":{"position":[[463,7],[527,7]]},"87":{"position":[[3164,6]]},"89":{"position":[[408,8]]},"115":{"position":[[205,7]]},"119":{"position":[[129,8]]},"164":{"position":[[33,7]]},"170":{"position":[[418,7]]},"172":{"position":[[546,7],[923,7]]},"204":{"position":[[526,6]]},"296":{"position":[[47,7]]},"317":{"position":[[271,7]]},"374":{"position":[[73,7],[276,7]]},"388":{"position":[[80,8]]},"414":{"position":[[517,7],[581,7]]},"433":{"position":[[149,8],[1698,7],[1760,7]]}}}],["results:\\033[0m",{"_index":2312,"t":{"433":{"position":[[1533,17]]}}}],["retail",{"_index":302,"t":{"15":{"position":[[297,7]]},"19":{"position":[[1885,6]]}}}],["retriev",{"_index":483,"t":{"21":{"position":[[409,9]]},"25":{"position":[[548,9],[735,10]]},"40":{"position":[[208,9]]},"48":{"position":[[397,10],[460,9],[505,9],[1047,10],[8685,9]]},"89":{"position":[[690,9]]},"99":{"position":[[305,10],[407,10],[432,10]]},"101":{"position":[[1275,9]]},"121":{"position":[[242,11]]},"277":{"position":[[43,8]]},"281":{"position":[[19,9]]},"285":{"position":[[0,9]]},"287":{"position":[[0,9]]},"374":{"position":[[43,10]]},"388":{"position":[[62,10],[149,9],[318,10],[396,9]]},"390":{"position":[[28,9],[104,10],[174,8],[270,9],[381,10],[429,9]]},"394":{"position":[[15,9],[364,10]]},"433":{"position":[[13,9],[36,10],[529,8],[542,10],[588,10],[649,11],[777,10],[1253,10],[1287,11],[1317,9],[1346,9],[1424,9]]}}}],["retrievalembed",{"_index":551,"t":{"23":{"position":[[1691,19]]}}}],["retriever.search",{"_index":2310,"t":{"433":{"position":[[1476,17]]}}}],["retriever=arxiv",{"_index":2207,"t":{"388":{"position":[[797,15]]}}}],["retriever=b",{"_index":2191,"t":{"388":{"position":[[268,14],[568,14]]}}}],["retriever=custom",{"_index":2212,"t":{"390":{"position":[[71,16]]}}}],["retriever=customretriever_endpoint=https://api.myretriever.comretriever_arg_api_key=your_api_key",{"_index":2218,"t":{"392":{"position":[[0,96]]}}}],["retriever=duckduckgo",{"_index":2206,"t":{"388":{"position":[[763,20]]}}}],["retriever=exa",{"_index":2209,"t":{"388":{"position":[[824,13]]}}}],["retriever=googl",{"_index":2196,"t":{"388":{"position":[[597,16]]}}}],["retriever=pubmed_centr",{"_index":2211,"t":{"388":{"position":[[859,24]]}}}],["retriever=searchapi",{"_index":2198,"t":{"388":{"position":[[631,19]]}}}],["retriever=searx",{"_index":2204,"t":{"388":{"position":[[729,15]]}}}],["retriever=serp",{"_index":2202,"t":{"388":{"position":[[699,16]]}}}],["retriever=serpapi",{"_index":2200,"t":{"388":{"position":[[667,17]]}}}],["retriever=tavili",{"_index":2193,"t":{"388":{"position":[[432,17]]}}}],["retriever_arg_",{"_index":2216,"t":{"390":{"position":[[463,14]]}}}],["retriever_arg_api_key",{"_index":2217,"t":{"390":{"position":[[485,23]]}}}],["retriever_class",{"_index":2307,"t":{"433":{"position":[[1268,15]]}}}],["retriever_class(sub_queri",{"_index":2308,"t":{"433":{"position":[[1358,26]]}}}],["retriever_endpoint",{"_index":2214,"t":{"390":{"position":[[330,19]]}}}],["return",{"_index":532,"t":{"23":{"position":[[1268,6]]},"27":{"position":[[1516,6]]},"42":{"position":[[700,6]]},"48":{"position":[[3324,6],[3359,7],[3956,6],[4673,6],[6127,6],[6441,6],[6903,6]]},"52":{"position":[[502,6]]},"85":{"position":[[1853,6],[2961,6]]},"93":{"position":[[836,6]]},"95":{"position":[[541,6]]},"97":{"position":[[797,6]]},"101":{"position":[[721,6],[1073,6]]},"132":{"position":[[370,6]]},"134":{"position":[[399,6]]},"239":{"position":[[2903,6],[3001,6]]},"255":{"position":[[493,6],[881,8]]},"257":{"position":[[1307,6]]},"263":{"position":[[474,6]]},"273":{"position":[[518,6]]},"275":{"position":[[635,6]]},"317":{"position":[[1490,6]]}}}],["return_exceptions=tru",{"_index":227,"t":{"9":{"position":[[777,23]]}}}],["reus",{"_index":834,"t":{"48":{"position":[[3585,6]]}}}],["review",{"_index":178,"t":{"7":{"position":[[782,6]]},"13":{"position":[[15,8]]},"15":{"position":[[580,8]]},"19":{"position":[[1275,7]]},"81":{"position":[[410,8],[566,9]]},"83":{"position":[[125,6],[948,8],[1137,8]]},"85":{"position":[[3348,8]]},"87":{"position":[[186,8],[811,7],[959,7],[1073,8],[1591,9],[1610,12],[1694,11],[1735,11],[1985,6],[2005,9]]},"170":{"position":[[1111,6]]},"172":{"position":[[779,9]]},"414":{"position":[[464,8],[620,9]]},"416":{"position":[[101,6]]},"419":{"position":[[396,8],[559,8]]}}}],["reviewer_agent.run",{"_index":1124,"t":{"87":{"position":[[1497,19]]}}}],["revis",{"_index":1016,"t":{"81":{"position":[[496,7],[506,7]]},"83":{"position":[[136,9],[1053,7],[1071,7],[1081,7]]},"85":{"position":[[3361,7]]},"87":{"position":[[199,7],[823,7],[1086,8],[1601,8],[1846,10],[1873,9],[1883,11],[1961,7],[2981,8]]},"89":{"position":[[152,6]]},"414":{"position":[[560,7]]},"416":{"position":[[112,8]]},"419":{"position":[[503,7]]}}}],["reviser_agent.run",{"_index":1126,"t":{"87":{"position":[[1546,18]]}}}],["revision_not",{"_index":1114,"t":{"87":{"position":[[971,15]]}}}],["revisor",{"_index":2270,"t":{"414":{"position":[[550,7]]},"419":{"position":[[493,7]]}}}],["rewrit",{"_index":175,"t":{"7":{"position":[[726,9],[821,7]]},"87":{"position":[[2749,7]]}}}],["rewritten",{"_index":185,"t":{"7":{"position":[[1018,9]]}}}],["rich",{"_index":1292,"t":{"113":{"position":[[79,5]]},"150":{"position":[[393,5],[512,4],[868,4]]}}}],["right",{"_index":23,"t":{"3":{"position":[[233,5]]},"89":{"position":[[181,5]]},"146":{"position":[[57,5]]},"204":{"position":[[99,5],[650,5]]}}}],["risk",{"_index":360,"t":{"17":{"position":[[576,5]]},"19":{"position":[[283,4],[1085,4]]},"204":{"position":[[202,5]]}}}],["rm",{"_index":1757,"t":{"247":{"position":[[36,2]]}}}],["roadmap",{"_index":438,"t":{"19":{"position":[[1191,7]]},"27":{"position":[[1587,7],[1908,7],[2069,7]]},"46":{"position":[[117,7]]},"64":{"position":[[374,7],[423,7]]},"132":{"position":[[440,7]]},"134":{"position":[[469,7]]},"435":{"position":[[0,7],[364,7],[486,7]]}}}],["robust",{"_index":1240,"t":{"105":{"position":[[114,10]]},"111":{"position":[[7,6]]},"427":{"position":[[110,10]]}}}],["role",{"_index":2012,"t":{"331":{"position":[[406,9]]},"382":{"position":[[585,9]]},"433":{"position":[[2039,4],[2135,4]]}}}],["role=\"us",{"_index":817,"t":{"48":{"position":[[2978,12],[8060,12]]}}}],["root",{"_index":1598,"t":{"188":{"position":[[246,4]]},"200":{"position":[[295,5]]},"239":{"position":[[3256,5]]},"374":{"position":[[365,4],[537,4]]}}}],["round",{"_index":446,"t":{"19":{"position":[[1324,7]]}}}],["rumor",{"_index":1815,"t":{"257":{"position":[[1752,6],[1884,6]]}}}],["run",{"_index":586,"t":{"27":{"position":[[257,3],[690,3],[824,3],[1828,3],[2582,7],[2674,3]]},"42":{"position":[[1002,3]]},"48":{"position":[[1185,3],[1427,3],[3032,3],[3115,3],[3687,3],[3776,3],[3868,3],[3963,3],[4012,3],[5061,3],[5158,3],[6172,3],[6261,3],[6353,3],[6448,4],[8106,3],[8110,3],[8237,3],[8253,3],[8393,3],[8490,3]]},"52":{"position":[[118,3]]},"60":{"position":[[69,3]]},"68":{"position":[[39,3],[344,7],[470,7]]},"83":{"position":[[761,4]]},"87":{"position":[[144,3],[654,4],[2205,7],[2297,3],[2371,4],[3137,7],[3257,3]]},"107":{"position":[[213,3],[287,7],[485,7],[525,7]]},"109":{"position":[[102,8]]},"111":{"position":[[123,8],[322,3]]},"119":{"position":[[201,7]]},"132":{"position":[[25,3]]},"134":{"position":[[25,3],[785,3]]},"144":{"position":[[5,7]]},"162":{"position":[[762,7],[858,3],[995,4]]},"172":{"position":[[490,8],[638,3]]},"176":{"position":[[78,3]]},"180":{"position":[[440,3]]},"182":{"position":[[705,7]]},"200":{"position":[[301,3],[375,7],[573,7],[613,7]]},"206":{"position":[[20,3]]},"239":{"position":[[265,7],[1049,3],[3247,3]]},"243":{"position":[[161,4]]},"245":{"position":[[8,3]]},"247":{"position":[[30,3]]},"255":{"position":[[617,3]]},"257":{"position":[[542,6],[1322,3],[2061,3]]},"273":{"position":[[683,3]]},"275":{"position":[[809,3],[831,3],[840,3],[861,3]]},"317":{"position":[[119,4],[437,7]]},"323":{"position":[[378,7]]},"325":{"position":[[489,3]]},"327":{"position":[[103,7]]},"331":{"position":[[635,3]]},"374":{"position":[[550,4]]},"382":{"position":[[805,3],[989,3]]},"412":{"position":[[327,3]]},"419":{"position":[[333,4]]},"421":{"position":[[187,3]]},"429":{"position":[[213,3],[401,7],[441,7]]},"431":{"position":[[80,3]]}}}],["run.id",{"_index":870,"t":{"48":{"position":[[5098,7],[5199,7],[8215,10],[8294,7],[8430,7],[8531,7]]}}}],["run.required_action.submit_tool_outputs.tool_cal",{"_index":871,"t":{"48":{"position":[[5106,51],[8438,51]]}}}],["run.statu",{"_index":844,"t":{"48":{"position":[[3880,14],[3898,10],[5028,10],[6365,14],[6383,10],[8305,10],[8360,10]]}}}],["run_id",{"_index":838,"t":{"48":{"position":[[3741,8],[4299,7],[6226,8],[6529,7]]}}}],["run_id=run_id",{"_index":842,"t":{"48":{"position":[[3837,14],[4747,14],[6322,14],[6977,14]]}}}],["run_parallel_research(self",{"_index":1119,"t":{"87":{"position":[[1315,27]]}}}],["run_research.pi",{"_index":1321,"t":{"134":{"position":[[812,15],[852,15]]}}}],["runnabl",{"_index":867,"t":{"48":{"position":[[4949,8],[5363,8]]}}}],["running_subquery_research",{"_index":1495,"t":{"160":{"position":[[729,28]]},"162":{"position":[[862,26]]}}}],["safari",{"_index":1912,"t":{"309":{"position":[[230,7]]}}}],["sale",{"_index":457,"t":{"19":{"position":[[1914,5]]}}}],["same",{"_index":1071,"t":{"85":{"position":[[1975,4]]},"87":{"position":[[406,4]]},"339":{"position":[[567,4]]}}}],["sampl",{"_index":274,"t":{"11":{"position":[[1048,8]]},"52":{"position":[[86,6]]},"68":{"position":[[608,6]]},"255":{"position":[[563,6]]},"257":{"position":[[588,6],[1592,6]]}}}],["satisfactori",{"_index":1028,"t":{"83":{"position":[[1111,12]]},"419":{"position":[[533,12]]}}}],["save",{"_index":570,"t":{"25":{"position":[[456,5]]},"107":{"position":[[105,4]]},"134":{"position":[[801,4]]},"196":{"position":[[29,5]]},"200":{"position":[[253,6]]},"429":{"position":[[105,4]]}}}],["scalabl",{"_index":1293,"t":{"113":{"position":[[85,9]]}}}],["scale",{"_index":1006,"t":{"79":{"position":[[301,5]]}}}],["scenario",{"_index":1913,"t":{"311":{"position":[[75,9]]}}}],["schema",{"_index":1045,"t":{"85":{"position":[[413,6]]}}}],["scope",{"_index":1062,"t":{"85":{"position":[[1355,6]]},"162":{"position":[[494,5]]}}}],["score",{"_index":939,"t":{"62":{"position":[[151,5]]}}}],["scour",{"_index":343,"t":{"17":{"position":[[211,8]]},"93":{"position":[[467,5]]}}}],["scrape",{"_index":190,"t":{"7":{"position":[[1184,8],[1272,6]]},"9":{"position":[[245,6],[839,8]]},"13":{"position":[[288,7],[366,7]]},"19":{"position":[[1934,7]]},"25":{"position":[[433,7]]},"58":{"position":[[126,9]]},"154":{"position":[[45,7]]},"162":{"position":[[1426,6],[1512,8],[1577,7],[1674,8],[1762,8],[1952,8],[2030,8]]},"170":{"position":[[439,7]]},"206":{"position":[[773,7],[851,7]]},"211":{"position":[[277,7]]},"302":{"position":[[30,8],[117,10],[183,10],[291,9]]},"305":{"position":[[64,9]]},"307":{"position":[[65,9],[277,6],[454,8]]},"313":{"position":[[291,8],[399,8]]},"327":{"position":[[30,9],[62,8]]},"439":{"position":[[475,9]]}}}],["scraped_data_s",{"_index":1561,"t":{"172":{"position":[[153,17]]}}}],["scraper",{"_index":1895,"t":{"302":{"position":[[61,7]]},"313":{"position":[[217,7]]},"433":{"position":[[896,7]]}}}],["scraper=\"b",{"_index":1897,"t":{"302":{"position":[[135,12]]},"305":{"position":[[5,13]]}}}],["scraper=\"brows",{"_index":1899,"t":{"302":{"position":[[201,17]]},"307":{"position":[[5,18]]},"309":{"position":[[30,20]]}}}],["scraping_complet",{"_index":1517,"t":{"162":{"position":[[1914,18]]}}}],["scraping_cont",{"_index":1496,"t":{"160":{"position":[[758,20]]},"162":{"position":[[1527,17]]}}}],["scraping_imag",{"_index":1515,"t":{"162":{"position":[[1683,16]]}}}],["scraping_url",{"_index":1512,"t":{"162":{"position":[[1380,14]]}}}],["screenshot",{"_index":1667,"t":{"234":{"position":[[184,10]]},"249":{"position":[[39,11]]}}}],["script",{"_index":912,"t":{"52":{"position":[[93,6]]},"125":{"position":[[193,7]]},"132":{"position":[[15,6]]},"134":{"position":[[15,6],[793,7]]},"180":{"position":[[338,6],[471,6]]},"255":{"position":[[570,6]]},"257":{"position":[[2048,6]]},"382":{"position":[[27,6],[997,6]]},"398":{"position":[[101,7]]},"433":{"position":[[91,6]]}}}],["scroll",{"_index":1905,"t":{"307":{"position":[[344,11]]},"311":{"position":[[248,9]]},"329":{"position":[[237,6]]}}}],["sdk",{"_index":786,"t":{"48":{"position":[[1656,3]]}}}],["seamlessli",{"_index":1468,"t":{"154":{"position":[[158,10]]},"182":{"position":[[1051,10]]}}}],["search",{"_index":350,"t":{"17":{"position":[[323,6]]},"19":{"position":[[1625,6]]},"21":{"position":[[741,6]]},"25":{"position":[[376,6]]},"27":{"position":[[324,6]]},"48":{"position":[[524,6],[1676,6],[1916,6],[2251,6],[2629,6],[4209,6],[5783,6],[7611,6]]},"64":{"position":[[106,6],[184,6]]},"119":{"position":[[31,6]]},"162":{"position":[[1245,9]]},"170":{"position":[[337,8]]},"204":{"position":[[424,6]]},"253":{"position":[[913,6]]},"374":{"position":[[664,6]]},"388":{"position":[[44,6],[73,6],[116,6],[190,6],[523,6]]},"390":{"position":[[136,6]]},"400":{"position":[[351,6]]},"433":{"position":[[103,6],[142,6],[1399,6],[1691,6],[1753,6]]},"439":{"position":[[126,6]]}}}],["search_depth=\"advanc",{"_index":886,"t":{"48":{"position":[[6085,24]]}}}],["search_kwarg",{"_index":1216,"t":{"101":{"position":[[485,14]]}}}],["search_result",{"_index":884,"t":{"48":{"position":[[6029,13],[6134,14]]},"433":{"position":[[1434,14]]}}}],["searchapi",{"_index":2197,"t":{"388":{"position":[[614,9]]}}}],["searchdef",{"_index":882,"t":{"48":{"position":[[5997,9]]}}}],["searchqueri",{"_index":556,"t":{"23":{"position":[[1847,11]]}}}],["searx",{"_index":2203,"t":{"388":{"position":[[716,5]]},"400":{"position":[[767,5]]}}}],["season",{"_index":1467,"t":{"152":{"position":[[639,11]]}}}],["second",{"_index":328,"t":{"15":{"position":[[928,8]]}}}],["secret",{"_index":1761,"t":{"249":{"position":[[251,7]]}}}],["section",{"_index":698,"t":{"40":{"position":[[193,7],[290,7]]},"83":{"position":[[1255,7]]},"85":{"position":[[571,9]]},"87":{"position":[[2651,7],[2738,7],[2789,9]]},"150":{"position":[[2978,9]]},"152":{"position":[[580,7]]},"162":{"position":[[3225,8],[3304,9],[3360,8],[3443,8]]},"230":{"position":[[57,7]]},"296":{"position":[[357,7]]},"298":{"position":[[189,7]]},"317":{"position":[[8,8]]},"419":{"position":[[677,7]]},"423":{"position":[[263,8],[292,7]]}}}],["secur",{"_index":2187,"t":{"384":{"position":[[701,8]]}}}],["see",{"_index":26,"t":{"3":{"position":[[266,6]]},"48":{"position":[[1295,3]]},"56":{"position":[[279,3]]},"85":{"position":[[1883,3]]},"87":{"position":[[2113,3]]},"89":{"position":[[426,3]]},"158":{"position":[[439,3]]},"164":{"position":[[291,3]]},"166":{"position":[[38,3]]},"170":{"position":[[689,6],[935,3]]},"172":{"position":[[609,3]]},"313":{"position":[[303,3]]},"339":{"position":[[0,3]]},"425":{"position":[[55,3]]}}}],["seek",{"_index":83,"t":{"5":{"position":[[46,4]]},"206":{"position":[[136,4]]}}}],["seen",{"_index":332,"t":{"17":{"position":[[31,4]]},"21":{"position":[[369,4]]},"25":{"position":[[128,4]]},"27":{"position":[[990,4],[1809,4]]},"48":{"position":[[4803,4],[5013,4]]},"83":{"position":[[3,4]]},"85":{"position":[[764,4],[2985,4]]},"87":{"position":[[999,4]]},"89":{"position":[[485,4]]},"419":{"position":[[22,4]]}}}],["select",{"_index":959,"t":{"68":{"position":[[395,6]]},"162":{"position":[[1742,8],[1819,8],[1897,8]]},"164":{"position":[[346,9]]},"166":{"position":[[190,8]]},"178":{"position":[[0,6]]},"204":{"position":[[592,9]]},"329":{"position":[[409,8]]}}}],["selenium",{"_index":1898,"t":{"302":{"position":[[157,8]]},"307":{"position":[[44,8],[520,9]]},"309":{"position":[[21,8],[79,8],[109,8]]},"311":{"position":[[161,8]]},"313":{"position":[[3,8],[151,9],[192,8]]},"327":{"position":[[12,8]]}}}],["self",{"_index":1147,"t":{"87":{"position":[[2873,4]]}}}],["self.cfg",{"_index":2297,"t":{"433":{"position":[[788,8]]}}}],["self.log",{"_index":1798,"t":{"257":{"position":[[284,9]]}}}],["self.logs.append(data",{"_index":1801,"t":{"257":{"position":[[421,22]]}}}],["self.retriev",{"_index":2296,"t":{"433":{"position":[[759,15]]}}}],["self.scraper_manag",{"_index":2299,"t":{"433":{"position":[[848,20]]}}}],["self.vector_stor",{"_index":2300,"t":{"433":{"position":[[912,17]]}}}],["self.verbos",{"_index":2298,"t":{"433":{"position":[[806,12]]}}}],["self.websocket",{"_index":220,"t":{"9":{"position":[[642,15]]},"433":{"position":[[826,14]]}}}],["sell",{"_index":1391,"t":{"150":{"position":[[1226,7],[1274,7]]}}}],["send",{"_index":1800,"t":{"257":{"position":[[388,7]]},"305":{"position":[[87,5]]},"317":{"position":[[386,5]]}}}],["send_json(self",{"_index":1799,"t":{"257":{"position":[[341,15]]}}}],["sendwebhookmessag",{"_index":1968,"t":{"317":{"position":[[2163,20],[2251,18]]}}}],["sendwebhookmessage(messag",{"_index":1952,"t":{"317":{"position":[[1460,27],[2419,28]]}}}],["sens",{"_index":1155,"t":{"89":{"position":[[373,5]]}}}],["sent",{"_index":1345,"t":{"140":{"position":[[669,4],[856,4]]},"160":{"position":[[869,4]]},"317":{"position":[[2006,7],[2100,4]]}}}],["sentiment",{"_index":429,"t":{"19":{"position":[[948,9]]}}}],["seo",{"_index":1294,"t":{"113":{"position":[[118,4]]}}}],["separ",{"_index":1004,"t":{"79":{"position":[[233,10]]},"182":{"position":[[431,10]]},"388":{"position":[[332,10]]}}}],["separator=\"\\n\")doc",{"_index":1444,"t":{"150":{"position":[[2788,19]]}}}],["sequenc",{"_index":1490,"t":{"160":{"position":[[463,8]]},"388":{"position":[[409,9]]}}}],["serp",{"_index":2199,"t":{"388":{"position":[[651,4]]},"400":{"position":[[635,4]]}}}],["serper",{"_index":2201,"t":{"388":{"position":[[685,6]]}}}],["serv",{"_index":1268,"t":{"109":{"position":[[40,5]]}}}],["server",{"_index":1264,"t":{"107":{"position":[[478,6]]},"109":{"position":[[185,7]]},"111":{"position":[[310,7],[390,6]]},"140":{"position":[[686,7]]},"200":{"position":[[566,6]]},"236":{"position":[[22,7]]},"239":{"position":[[1221,10],[1461,6],[2010,6]]},"273":{"position":[[691,7]]},"275":{"position":[[817,7],[848,6]]},"317":{"position":[[63,7],[88,6],[107,6],[153,6],[518,6]]},"337":{"position":[[42,7]]},"384":{"position":[[191,6]]},"429":{"position":[[394,6]]}}}],["server'",{"_index":2150,"t":{"378":{"position":[[312,8]]}}}],["server_nam",{"_index":1720,"t":{"239":{"position":[[1481,11],[2019,11],[2975,11]]}}}],["servic",{"_index":423,"t":{"19":{"position":[[824,8]]},"48":{"position":[[140,9]]},"64":{"position":[[55,9]]},"107":{"position":[[181,8]]},"140":{"position":[[873,8]]},"215":{"position":[[191,7]]},"220":{"position":[[140,8]]},"234":{"position":[[104,7]]},"384":{"position":[[690,7]]},"429":{"position":[[181,8]]},"435":{"position":[[93,9],[142,8]]}}}],["session",{"_index":782,"t":{"48":{"position":[[1381,8]]},"140":{"position":[[36,7]]},"182":{"position":[[751,7]]}}}],["set",{"_index":126,"t":{"5":{"position":[[804,3]]},"7":{"position":[[131,4]]},"23":{"position":[[181,3]]},"27":{"position":[[221,7],[944,3],[1028,3]]},"81":{"position":[[479,3]]},"83":{"position":[[1006,3]]},"85":{"position":[[2862,3],[3227,3]]},"87":{"position":[[218,3],[1567,3]]},"93":{"position":[[384,3]]},"99":{"position":[[195,3],[290,3]]},"105":{"position":[[334,7]]},"111":{"position":[[177,3]]},"115":{"position":[[278,9]]},"119":{"position":[[186,7]]},"125":{"position":[[168,3],[330,3]]},"138":{"position":[[51,3]]},"154":{"position":[[219,3]]},"188":{"position":[[177,3]]},"198":{"position":[[161,3]]},"206":{"position":[[631,3]]},"220":{"position":[[307,7]]},"236":{"position":[[6,7]]},"239":{"position":[[581,3]]},"249":{"position":[[28,8],[112,10]]},"289":{"position":[[8,3]]},"302":{"position":[[49,7],[237,4]]},"331":{"position":[[110,3]]},"335":{"position":[[2,3]]},"337":{"position":[[96,3],[169,3],[379,3],[411,3],[484,3]]},"341":{"position":[[108,3]]},"347":{"position":[[114,3]]},"374":{"position":[[27,3],[103,3],[309,3]]},"390":{"position":[[258,7],[302,3]]},"398":{"position":[[251,3],[351,3],[454,3],[560,3],[679,3],[802,3],[893,3]]},"400":{"position":[[74,3],[218,3],[369,3],[513,3],[651,3],[780,3]]},"414":{"position":[[533,3]]},"419":{"position":[[454,3]]},"427":{"position":[[330,7]]}}}],["set_browse_chunk_max_length",{"_index":2236,"t":{"398":{"position":[[593,28]]}}}],["set_browse_chunk_max_length(valu",{"_index":2237,"t":{"398":{"position":[[626,34]]}}}],["set_debug_mod",{"_index":2243,"t":{"398":{"position":[[832,15]]}}}],["set_debug_mode(valu",{"_index":2244,"t":{"398":{"position":[[852,21]]}}}],["set_entry_point",{"_index":1102,"t":{"85":{"position":[[3112,16]]}}}],["set_fast_llm_model",{"_index":2227,"t":{"398":{"position":[[183,19]]}}}],["set_fast_llm_model(valu",{"_index":2228,"t":{"398":{"position":[[207,25]]}}}],["set_fast_token_limit",{"_index":2231,"t":{"398":{"position":[[382,21]]}}}],["set_fast_token_limit(valu",{"_index":2232,"t":{"398":{"position":[[408,27]]}}}],["set_openai_api_key",{"_index":2241,"t":{"398":{"position":[[734,19]]}}}],["set_openai_api_key(valu",{"_index":2242,"t":{"398":{"position":[[758,25]]}}}],["set_smart_llm_model",{"_index":2229,"t":{"398":{"position":[[281,20]]}}}],["set_smart_llm_model(valu",{"_index":2230,"t":{"398":{"position":[[306,26]]}}}],["set_smart_token_limit",{"_index":2234,"t":{"398":{"position":[[486,22]]}}}],["set_smart_token_limit(valu",{"_index":2235,"t":{"398":{"position":[[513,28]]}}}],["setup",{"_index":1271,"t":{"109":{"position":[[92,5]]},"111":{"position":[[113,5]]},"113":{"position":[[23,6]]},"170":{"position":[[195,6]]},"184":{"position":[[72,5]]},"215":{"position":[[328,5]]},"218":{"position":[[307,5]]},"234":{"position":[[71,5]]},"305":{"position":[[281,5]]},"307":{"position":[[514,5]]}}}],["seven",{"_index":1007,"t":{"81":{"position":[[30,5]]}}}],["sever",{"_index":245,"t":{"11":{"position":[[172,7]]},"19":{"position":[[91,7]]},"215":{"position":[[416,7]]},"277":{"position":[[24,7]]}}}],["share",{"_index":70,"t":{"3":{"position":[[950,7],[1114,5]]},"83":{"position":[[1514,6]]}}}],["shell",{"_index":1591,"t":{"182":{"position":[[745,5],[1028,5],[1242,5]]}}}],["ship",{"_index":1675,"t":{"239":{"position":[[251,9]]}}}],["short",{"_index":1465,"t":{"152":{"position":[[543,5]]},"192":{"position":[[164,5]]},"204":{"position":[[305,5]]}}}],["shorter",{"_index":1151,"t":{"87":{"position":[[3121,7]]}}}],["shot",{"_index":971,"t":{"75":{"position":[[253,4],[265,4]]}}}],["show",{"_index":489,"t":{"21":{"position":[[641,4]]},"52":{"position":[[105,5]]},"162":{"position":[[393,4],[439,5],[961,5],[1395,5],[1620,5],[1788,5],[3185,5]]},"166":{"position":[[87,4]]}}}],["showcas",{"_index":749,"t":{"48":{"position":[[54,10]]},"79":{"position":[[378,9]]},"412":{"position":[[196,9]]}}}],["shown",{"_index":282,"t":{"13":{"position":[[107,5]]}}}],["side",{"_index":183,"t":{"7":{"position":[[996,5]]},"17":{"position":[[661,5]]}}}],["sign",{"_index":1698,"t":{"239":{"position":[[655,6]]},"351":{"position":[[0,4]]},"357":{"position":[[0,4]]}}}],["signal",{"_index":602,"t":{"27":{"position":[[677,6]]}}}],["signifi",{"_index":1507,"t":{"162":{"position":[[1018,9],[1700,9],[2585,9],[3826,9]]}}}],["signific",{"_index":647,"t":{"29":{"position":[[29,11]]}}}],["significantli",{"_index":168,"t":{"7":{"position":[[526,13],[876,14]]},"9":{"position":[[514,13]]},"75":{"position":[[149,14]]},"79":{"position":[[53,13]]},"313":{"position":[[412,13]]},"412":{"position":[[48,13]]}}}],["signup",{"_index":2053,"t":{"345":{"position":[[8,6]]}}}],["similar",{"_index":555,"t":{"23":{"position":[[1836,10]]},"150":{"position":[[612,7]]},"234":{"position":[[117,7]]},"298":{"position":[[149,7]]}}}],["simpl",{"_index":105,"t":{"5":{"position":[[355,6]]},"75":{"position":[[241,6]]},"215":{"position":[[481,6]]},"305":{"position":[[302,7]]},"311":{"position":[[32,6]]},"382":{"position":[[562,6]]}}}],["simpli",{"_index":958,"t":{"68":{"position":[[388,6]]},"95":{"position":[[175,6]]},"99":{"position":[[164,6]]},"261":{"position":[[270,6]]}}}],["simplifi",{"_index":1558,"t":{"170":{"position":[[1233,10]]},"172":{"position":[[1014,10]]}}}],["simul",{"_index":1904,"t":{"307":{"position":[[311,9]]},"311":{"position":[[308,8]]}}}],["simultan",{"_index":1581,"t":{"182":{"position":[[122,14]]}}}],["singl",{"_index":320,"t":{"15":{"position":[[712,6]]},"17":{"position":[[339,6]]},"58":{"position":[[189,6]]},"60":{"position":[[62,6]]},"305":{"position":[[95,6]]},"439":{"position":[[538,6]]}}}],["singleton",{"_index":2258,"t":{"404":{"position":[[40,9],[173,9]]},"406":{"position":[[68,9]]}}}],["singleton(abc.abcmeta",{"_index":2257,"t":{"404":{"position":[[6,22]]}}}],["site",{"_index":188,"t":{"7":{"position":[[1143,5],[1291,5]]},"9":{"position":[[197,6],[213,4]]},"311":{"position":[[229,5]]},"327":{"position":[[25,4],[45,5]]},"374":{"position":[[84,5]]},"439":{"position":[[279,5]]}}}],["size",{"_index":1549,"t":{"170":{"position":[[430,5],[456,4],[513,4],[738,4],[1011,5]]},"172":{"position":[[823,6],[965,5]]},"378":{"position":[[170,4]]}}}],["sketch",{"_index":1410,"t":{"150":{"position":[[1630,6]]}}}],["skill",{"_index":1002,"t":{"79":{"position":[[144,7],[208,6]]},"85":{"position":[[1362,7],[2129,6]]},"412":{"position":[[139,7]]}}}],["skip",{"_index":765,"t":{"48":{"position":[[750,4]]},"75":{"position":[[826,4]]}}}],["sleek",{"_index":638,"t":{"27":{"position":[[2512,5]]},"220":{"position":[[54,5]]}}}],["sleep",{"_index":846,"t":{"48":{"position":[[3991,5]]}}}],["slimjet",{"_index":1998,"t":{"329":{"position":[[179,8]]}}}],["slow",{"_index":1438,"t":{"150":{"position":[[2593,4]]}}}],["slower",{"_index":1906,"t":{"307":{"position":[[435,6]]}}}],["small",{"_index":464,"t":{"19":{"position":[[2148,5]]},"150":{"position":[[796,5]]},"335":{"position":[[211,6]]}}}],["small?wil",{"_index":1387,"t":{"150":{"position":[[1063,10]]}}}],["smaller",{"_index":112,"t":{"5":{"position":[[448,7]]},"23":{"position":[[1449,7]]}}}],["smalltalk",{"_index":1000,"t":{"77":{"position":[[592,10]]}}}],["smart",{"_index":1436,"t":{"150":{"position":[[2528,5]]},"398":{"position":[[359,5],[568,5]]}}}],["smart_llm",{"_index":2155,"t":{"380":{"position":[[316,9]]}}}],["smart_llm=azure_openai:gpt",{"_index":2040,"t":{"339":{"position":[[623,26]]}}}],["smarter",{"_index":910,"t":{"48":{"position":[[8824,8]]},"150":{"position":[[2219,7]]},"433":{"position":[[2019,7],[2114,7]]}}}],["snapshot",{"_index":1564,"t":{"172":{"position":[[266,8]]}}}],["snippet",{"_index":1652,"t":{"226":{"position":[[71,9]]},"257":{"position":[[24,7]]},"331":{"position":[[27,7]]},"433":{"position":[[78,8]]}}}],["social",{"_index":427,"t":{"19":{"position":[[935,6]]}}}],["socket",{"_index":1927,"t":{"317":{"position":[[597,6],[681,9],[758,6],[1350,6],[1535,8]]}}}],["socket.onclos",{"_index":1949,"t":{"317":{"position":[[1281,14]]}}}],["socket.onerror",{"_index":1950,"t":{"317":{"position":[[1368,14]]}}}],["socket.onmessag",{"_index":1937,"t":{"317":{"position":[[866,16]]}}}],["socket.onopen",{"_index":1935,"t":{"317":{"position":[[790,13],[2033,13]]}}}],["socket.readyst",{"_index":1955,"t":{"317":{"position":[[1547,17],[1922,18]]}}}],["socket.send(payload",{"_index":1965,"t":{"317":{"position":[[1963,21],[2057,21]]}}}],["softwar",{"_index":1682,"t":{"239":{"position":[[388,8]]},"343":{"position":[[44,8]]}}}],["software,and",{"_index":1393,"t":{"150":{"position":[[1256,12]]}}}],["sole",{"_index":1024,"t":{"83":{"position":[[456,6]]}}}],["solut",{"_index":81,"t":{"3":{"position":[[1165,9]]},"5":{"position":[[72,8],[295,8]]},"109":{"position":[[14,8]]},"111":{"position":[[14,8]]},"204":{"position":[[398,9]]},"215":{"position":[[434,9]]},"325":{"position":[[192,9]]},"343":{"position":[[53,9]]}}}],["solv",{"_index":69,"t":{"3":{"position":[[935,5]]},"5":{"position":[[18,7],[253,6]]},"77":{"position":[[430,6]]},"87":{"position":[[498,5],[674,5]]}}}],["someth",{"_index":1469,"t":{"154":{"position":[[246,9]]}}}],["sometim",{"_index":20,"t":{"3":{"position":[[204,9],[802,9]]},"204":{"position":[[71,9]]}}}],["sonnet",{"_index":2130,"t":{"365":{"position":[[37,6],[96,6],[159,6]]}}}],["soon",{"_index":1254,"t":{"105":{"position":[[527,5]]},"222":{"position":[[438,5]]},"427":{"position":[[523,5]]}}}],["sophist",{"_index":729,"t":{"44":{"position":[[30,13]]}}}],["sound",{"_index":194,"t":{"7":{"position":[[1356,6]]}}}],["sourc",{"_index":60,"t":{"3":{"position":[[788,9],[1030,6]]},"11":{"position":[[208,7],[831,6]]},"13":{"position":[[494,7]]},"19":{"position":[[27,8],[637,7],[1060,8],[1130,6]]},"27":{"position":[[1018,6],[2448,8]]},"29":{"position":[[277,7]]},"38":{"position":[[149,6],[199,6]]},"40":{"position":[[380,6]]},"42":{"position":[[448,6]]},"48":{"position":[[2061,7],[5928,7]]},"56":{"position":[[223,6]]},"58":{"position":[[33,6],[175,7]]},"62":{"position":[[111,8],[278,8]]},"64":{"position":[[169,7],[328,6]]},"68":{"position":[[434,7]]},"85":{"position":[[725,8]]},"87":{"position":[[2683,7],[3319,6]]},"89":{"position":[[700,7]]},"93":{"position":[[20,7],[162,7],[620,8],[953,7]]},"95":{"position":[[715,9]]},"99":{"position":[[135,7],[183,7],[328,7]]},"136":{"position":[[88,7]]},"140":{"position":[[451,8],[619,7]]},"162":{"position":[[1068,6],[1271,7],[1358,7]]},"164":{"position":[[158,7]]},"172":{"position":[[337,7]]},"194":{"position":[[384,7]]},"206":{"position":[[932,8],[986,7]]},"211":{"position":[[155,7],[289,7],[372,7]]},"257":{"position":[[762,6],[1682,6]]},"263":{"position":[[691,7],[901,10]]},"279":{"position":[[0,7]]},"281":{"position":[[76,7]]},"287":{"position":[[29,8]]},"353":{"position":[[52,6]]},"394":{"position":[[333,7]]},"423":{"position":[[570,6],[1217,9]]},"439":{"position":[[354,6],[524,7]]}}}],["source_url",{"_index":685,"t":{"38":{"position":[[170,12]]},"42":{"position":[[406,15]]},"93":{"position":[[174,12],[502,12]]},"273":{"position":[[331,11],[545,14],[560,12]]},"275":{"position":[[448,11],[670,14],[685,12]]},"279":{"position":[[76,11]]}}}],["source_urls=sourc",{"_index":1184,"t":{"93":{"position":[[708,20]]}}}],["sources=sourc",{"_index":1193,"t":{"93":{"position":[[1223,17]]}}}],["space",{"_index":1167,"t":{"89":{"position":[[1189,6]]},"182":{"position":[[842,5]]}}}],["spanish",{"_index":1145,"t":{"87":{"position":[[2830,8]]}}}],["special",{"_index":1001,"t":{"79":{"position":[[132,11],[181,10]]},"81":{"position":[[261,11]]},"85":{"position":[[1339,11]]},"412":{"position":[[127,11]]},"414":{"position":[[315,11]]}}}],["specif",{"_index":284,"t":{"13":{"position":[[125,13]]},"17":{"position":[[558,8]]},"19":{"position":[[196,8],[347,8],[1855,8]]},"58":{"position":[[436,8]]},"77":{"position":[[396,8]]},"79":{"position":[[199,8]]},"83":{"position":[[195,12]]},"95":{"position":[[126,8]]},"115":{"position":[[323,8]]},"158":{"position":[[182,8]]},"160":{"position":[[198,8],[397,8],[542,8]]},"162":{"position":[[906,8],[971,8],[2138,8],[2166,8]]},"168":{"position":[[127,12]]},"172":{"position":[[454,8],[948,12]]},"182":{"position":[[453,8]]},"206":{"position":[[542,13],[572,8]]},"234":{"position":[[125,15],[229,15]]},"339":{"position":[[353,8]]},"419":{"position":[[5,12]]}}}],["specifi",{"_index":1174,"t":{"93":{"position":[[8,7]]},"95":{"position":[[8,7]]},"182":{"position":[[174,9]]},"257":{"position":[[754,7]]},"335":{"position":[[58,7],[159,7]]},"337":{"position":[[66,7],[226,7],[541,7]]},"339":{"position":[[159,7]]},"388":{"position":[[134,10],[301,7],[386,9]]},"390":{"position":[[56,10]]}}}],["speed",{"_index":136,"t":{"5":{"position":[[1022,6]]},"7":{"position":[[1482,5]]},"75":{"position":[[191,5]]},"87":{"position":[[325,6]]},"311":{"position":[[91,5]]}}}],["spin",{"_index":4,"t":{"3":{"position":[[58,5]]}}}],["split",{"_index":539,"t":{"23":{"position":[[1424,5]]}}}],["sqlalchemi",{"_index":1211,"t":{"101":{"position":[[320,10]]}}}],["ssd",{"_index":1665,"t":{"234":{"position":[[163,3]]}}}],["ssl",{"_index":1731,"t":{"239":{"position":[[2005,4],[2526,4],[2761,3]]}}}],["ssl_certif",{"_index":1734,"t":{"239":{"position":[[2552,15]]}}}],["ssl_certificate_key",{"_index":1736,"t":{"239":{"position":[[2639,19]]}}}],["ssl_dhparam",{"_index":1740,"t":{"239":{"position":[[2798,11]]}}}],["stabil",{"_index":1253,"t":{"105":{"position":[[495,9]]},"427":{"position":[[491,9]]}}}],["stabl",{"_index":1694,"t":{"239":{"position":[[592,6],[773,7]]}}}],["stage",{"_index":1020,"t":{"83":{"position":[[64,7]]},"416":{"position":[[49,7],[66,5]]}}}],["standalon",{"_index":1784,"t":{"255":{"position":[[64,10]]}}}],["standard",{"_index":985,"t":{"75":{"position":[[726,8]]}}}],["start",{"_index":695,"t":{"40":{"position":[[25,6]]},"48":{"position":[[1108,6]]},"75":{"position":[[230,7]]},"77":{"position":[[609,5]]},"85":{"position":[[363,5],[2869,5],[3235,8]]},"107":{"position":[[448,5]]},"109":{"position":[[175,5]]},"111":{"position":[[292,5]]},"150":{"position":[[454,5]]},"162":{"position":[[519,5],[3002,8],[3692,8],[3801,8],[4160,7]]},"170":{"position":[[301,5]]},"200":{"position":[[536,5]]},"211":{"position":[[442,7]]},"220":{"position":[[349,8]]},"239":{"position":[[1275,5],[1313,5]]},"261":{"position":[[31,8],[395,5]]},"313":{"position":[[21,6]]},"317":{"position":[[1778,6],[2354,7]]},"349":{"position":[[27,7]]},"429":{"position":[[364,5]]}}}],["starting_research",{"_index":1494,"t":{"160":{"position":[[708,20]]},"162":{"position":[[170,18]]}}}],["startup",{"_index":1371,"t":{"150":{"position":[[549,9],[752,8],[783,7],[1043,8],[1076,7],[1108,7],[1217,8],[1360,7]]}}}],["startup.that'",{"_index":1369,"t":{"150":{"position":[[470,14]]}}}],["state",{"_index":101,"t":{"5":{"position":[[323,6]]},"27":{"position":[[2304,6]]},"75":{"position":[[415,7]]},"85":{"position":[[46,5],[64,6],[196,5],[261,6],[780,5],[978,5],[1240,6]]},"87":{"position":[[411,6],[630,5],[758,5],[866,5],[2265,6]]},"162":{"position":[[2013,7],[2365,7],[2524,7]]},"398":{"position":[[72,5]]}}}],["stategraph",{"_index":1082,"t":{"85":{"position":[[2307,10]]}}}],["stategraph(draftst",{"_index":1121,"t":{"87":{"position":[[1377,22]]}}}],["stategraph(researchst",{"_index":1061,"t":{"85":{"position":[[1168,25],[2352,25]]}}}],["stategraphworkflow",{"_index":1060,"t":{"85":{"position":[[1147,18]]}}}],["static",{"_index":1187,"t":{"93":{"position":[[944,8]]},"109":{"position":[[46,6]]},"113":{"position":[[0,6]]},"302":{"position":[[109,7]]},"305":{"position":[[57,6],[152,6],[310,6]]},"307":{"position":[[447,6]]},"311":{"position":[[18,8],[60,6]]},"313":{"position":[[272,6],[380,6]]}}}],["statist",{"_index":1191,"t":{"93":{"position":[[1135,11]]}}}],["statu",{"_index":829,"t":{"48":{"position":[[3369,7],[3532,6],[3872,7],[4980,6],[6357,7]]},"239":{"position":[[983,6],[1396,6]]}}}],["status",{"_index":832,"t":{"48":{"position":[[3476,8],[3624,8]]}}}],["step",{"_index":47,"t":{"3":{"position":[[586,5],[1124,5]]},"5":{"position":[[10,4],[770,5]]},"13":{"position":[[38,5]]},"25":{"position":[[665,4]]},"27":{"position":[[140,4],[213,4],[549,4]]},"48":{"position":[[904,6],[1510,5],[2126,4],[2746,4]]},"68":{"position":[[198,4],[326,4]]},"83":{"position":[[343,4]]},"87":{"position":[[2990,4]]},"89":{"position":[[778,4]]},"97":{"position":[[218,4],[359,4]]},"107":{"position":[[0,4],[24,4],[129,4],[347,4]]},"138":{"position":[[362,5]]},"162":{"position":[[2487,4]]},"164":{"position":[[105,5],[490,5]]},"166":{"position":[[229,5]]},"170":{"position":[[945,5]]},"176":{"position":[[0,4],[69,4],[138,4]]},"200":{"position":[[19,4],[129,4],[279,4],[435,4]]},"236":{"position":[[43,5]]},"239":{"position":[[19,4],[188,4]]},"249":{"position":[[77,4],[127,4],[190,4]]},"261":{"position":[[18,5]]},"329":{"position":[[201,6]]},"374":{"position":[[300,4],[519,4],[582,4]]},"378":{"position":[[408,5]]},"380":{"position":[[396,5]]},"384":{"position":[[672,6]]},"429":{"position":[[0,4],[24,4],[129,4],[263,4]]}}}],["stock",{"_index":809,"t":{"48":{"position":[[2686,5],[7668,5]]}}}],["stop",{"_index":209,"t":{"9":{"position":[[354,6]]},"150":{"position":[[1095,4]]}}}],["storag",{"_index":1666,"t":{"234":{"position":[[167,7]]}}}],["store",{"_index":547,"t":{"23":{"position":[[1649,5]]},"48":{"position":[[1347,7]]},"152":{"position":[[239,5]]},"154":{"position":[[35,5],[93,5],[199,5],[735,6]]},"257":{"position":[[320,5],[1470,6]]},"398":{"position":[[62,5]]},"433":{"position":[[964,5]]}}}],["storerelated_context",{"_index":1476,"t":{"154":{"position":[[846,21]]}}}],["storm",{"_index":659,"t":{"33":{"position":[[48,5]]},"79":{"position":[[352,5]]},"412":{"position":[[170,5]]}}}],["storylin",{"_index":1160,"t":{"89":{"position":[[765,10]]}}}],["str",{"_index":614,"t":{"27":{"position":[[1283,4],[1301,4],[1321,4],[1329,4]]},"85":{"position":[[567,3],[640,3],[664,3],[687,3],[705,3],[721,3],[752,3],[1571,5]]},"87":{"position":[[943,3],[967,3],[987,3]]},"93":{"position":[[597,4],[615,4],[638,4]]},"95":{"position":[[367,4],[385,4],[393,4]]},"97":{"position":[[618,4],[638,4],[646,4]]},"101":{"position":[[480,4],[510,6],[803,4],[821,4],[841,4],[876,4]]},"132":{"position":[[137,4],[155,4],[175,4],[183,4]]},"134":{"position":[[137,4],[155,4],[175,4],[183,4]]},"263":{"position":[[82,4],[100,5]]},"273":{"position":[[157,4],[175,4]]},"398":{"position":[[233,4],[333,4],[784,4]]}}}],["straight",{"_index":811,"t":{"48":{"position":[[2765,8]]},"85":{"position":[[3034,8]]}}}],["straightforward",{"_index":252,"t":{"11":{"position":[[300,15]]},"182":{"position":[[541,15]]}}}],["strategi",{"_index":130,"t":{"5":{"position":[[897,8]]},"19":{"position":[[1463,10],[2009,8]]},"23":{"position":[[1901,8]]},"89":{"position":[[1035,8]]}}}],["stray",{"_index":399,"t":{"19":{"position":[[291,8]]}}}],["stream",{"_index":1794,"t":{"257":{"position":[[63,9]]},"317":{"position":[[247,9]]},"425":{"position":[[96,9]]}}}],["stream=fals",{"_index":2178,"t":{"382":{"position":[[710,13]]}}}],["stream=tru",{"_index":2016,"t":{"331":{"position":[[500,12]]}}}],["streamlin",{"_index":1295,"t":{"115":{"position":[[81,11]]}}}],["string",{"_index":807,"t":{"48":{"position":[[2599,9],[7581,9]]},"125":{"position":[[385,6]]},"162":{"position":[[816,7]]},"172":{"position":[[135,6]]}}}],["structur",{"_index":260,"t":{"11":{"position":[[683,11]]},"44":{"position":[[79,10]]},"81":{"position":[[399,10]]},"83":{"position":[[548,9]]},"85":{"position":[[110,10]]},"160":{"position":[[371,10]]},"168":{"position":[[261,10]]},"170":{"position":[[1076,11]]},"172":{"position":[[8,10],[869,10]]},"414":{"position":[[453,10]]},"419":{"position":[[224,9]]}}}],["studi",{"_index":414,"t":{"19":{"position":[[569,7]]}}}],["stumbl",{"_index":92,"t":{"5":{"position":[[213,8]]}}}],["sub",{"_index":1111,"t":{"87":{"position":[[527,3],[601,3],[791,3],[2647,3],[2734,3]]},"433":{"position":[[116,3],[1158,3],[1336,3]]}}}],["sub_queri",{"_index":1559,"t":{"172":{"position":[[96,10],[205,9]]},"433":{"position":[[1176,9]]}}}],["subhead",{"_index":1150,"t":{"87":{"position":[[3065,10]]}}}],["submiss",{"_index":2271,"t":{"416":{"position":[[133,10]]}}}],["submissiondef",{"_index":850,"t":{"48":{"position":[[4254,13],[6484,13]]}}}],["submit",{"_index":2223,"t":{"394":{"position":[[418,10]]}}}],["submit_tool_outputs(thread.id",{"_index":869,"t":{"48":{"position":[[5067,30],[8399,30]]}}}],["submit_tool_outputs(thread_id",{"_index":851,"t":{"48":{"position":[[4268,30],[6498,30]]}}}],["subqueri",{"_index":1505,"t":{"162":{"position":[[611,11],[659,10],[729,10],[841,10],[915,8],[980,8],[2301,8],[2400,8]]},"166":{"position":[[100,10]]},"170":{"position":[[387,10],[483,10]]},"172":{"position":[[126,8],[527,10],[627,10],[895,8],[1173,8]]}}}],["subquery_context_window",{"_index":1519,"t":{"162":{"position":[[2216,24]]}}}],["subsequ",{"_index":1058,"t":{"85":{"position":[[1002,10]]}}}],["subset",{"_index":1164,"t":{"89":{"position":[[986,6]]}}}],["subtask",{"_index":113,"t":{"5":{"position":[[456,8],[491,8]]}}}],["subtop",{"_index":667,"t":{"33":{"position":[[350,10]]},"35":{"position":[[43,9],[88,8]]},"38":{"position":[[351,10],[390,9]]},"40":{"position":[[117,10],[137,9],[323,8]]},"42":{"position":[[547,13],[590,9]]},"44":{"position":[[154,9]]},"83":{"position":[[794,9]]},"87":{"position":[[1156,8]]},"162":{"position":[[2623,9],[2711,10],[2758,9],[2812,9]]},"419":{"position":[[366,9]]},"423":{"position":[[305,8]]}}}],["subtopic_report",{"_index":1606,"t":{"192":{"position":[[290,15]]}}}],["subtopicdraft_titl",{"_index":1885,"t":{"296":{"position":[[378,20]]}}}],["subtopics_gener",{"_index":1524,"t":{"162":{"position":[[2722,20]]}}}],["subtopicssubtop",{"_index":1883,"t":{"296":{"position":[[292,18]]}}}],["success",{"_index":1510,"t":{"162":{"position":[[1151,8]]}}}],["successfulli",{"_index":1514,"t":{"162":{"position":[[1564,12],[1661,12]]}}}],["succinct",{"_index":1448,"t":{"150":{"position":[[2969,8]]}}}],["such",{"_index":58,"t":{"3":{"position":[[762,5]]},"9":{"position":[[435,4]]},"17":{"position":[[182,4]]},"29":{"position":[[317,4]]},"48":{"position":[[515,5],[594,4],[3633,5],[4039,4]]},"83":{"position":[[1353,4]]},"87":{"position":[[3209,4]]},"105":{"position":[[205,4]]},"150":{"position":[[1774,4]]},"204":{"position":[[431,5]]},"255":{"position":[[940,4]]},"374":{"position":[[678,5]]},"412":{"position":[[388,4]]},"419":{"position":[[775,4]]},"427":{"position":[[201,4]]}}}],["sudo",{"_index":1669,"t":{"239":{"position":[[0,4],[509,4],[783,4]]},"323":{"position":[[449,4]]},"325":{"position":[[115,4]]}}}],["sudo:sudo",{"_index":1711,"t":{"239":{"position":[[1068,9]]}}}],["suffici",{"_index":1617,"t":{"204":{"position":[[339,10]]}}}],["suggest",{"_index":948,"t":{"64":{"position":[[498,12]]}}}],["suit",{"_index":750,"t":{"48":{"position":[[111,5]]},"115":{"position":[[318,4]]},"313":{"position":[[529,5]]}}}],["suitabl",{"_index":324,"t":{"15":{"position":[[818,8]]},"93":{"position":[[342,8]]},"439":{"position":[[151,8]]}}}],["summar",{"_index":167,"t":{"7":{"position":[[485,13],[708,13],[807,9]]},"9":{"position":[[256,10]]},"13":{"position":[[408,9],[483,10]]},"150":{"position":[[2937,9]]},"206":{"position":[[870,9],[975,10]]}}}],["summari",{"_index":1322,"t":{"136":{"position":[[165,8]]},"168":{"position":[[55,7]]},"192":{"position":[[154,7]]}}}],["sup",{"_index":2013,"t":{"331":{"position":[[435,9]]}}}],["sup?\"}]async",{"_index":2175,"t":{"382":{"position":[[614,13]]}}}],["super",{"_index":1153,"t":{"89":{"position":[[25,5]]}}}],["superfici",{"_index":1619,"t":{"204":{"position":[[536,11]]}}}],["supplement",{"_index":413,"t":{"19":{"position":[[527,10]]}}}],["support",{"_index":317,"t":{"15":{"position":[[626,7]]},"25":{"position":[[610,8]]},"35":{"position":[[234,8]]},"48":{"position":[[348,8],[478,7],[568,8]]},"68":{"position":[[99,9]]},"87":{"position":[[2672,10]]},"89":{"position":[[453,8],[516,7]]},"97":{"position":[[119,9]]},"121":{"position":[[172,9],[232,9]]},"130":{"position":[[77,9]]},"138":{"position":[[155,9]]},"140":{"position":[[327,7]]},"211":{"position":[[313,7]]},"222":{"position":[[37,7]]},"341":{"position":[[15,8]]},"347":{"position":[[140,9]]}}}],["suppos",{"_index":1429,"t":{"150":{"position":[[2279,7]]}}}],["sure",{"_index":1159,"t":{"89":{"position":[[719,4]]},"150":{"position":[[2993,4]]},"154":{"position":[[211,4]]},"198":{"position":[[108,4]]},"313":{"position":[[166,4]]},"329":{"position":[[348,4]]}}}],["switch",{"_index":1918,"t":{"313":{"position":[[254,9]]}}}],["synchron",{"_index":197,"t":{"9":{"position":[[44,14]]},"48":{"position":[[3333,11]]}}}],["syntax",{"_index":266,"t":{"11":{"position":[[798,6]]},"190":{"position":[[10,6]]}}}],["synthes",{"_index":1347,"t":{"140":{"position":[[813,11]]}}}],["system",{"_index":1306,"t":{"121":{"position":[[89,6]]},"140":{"position":[[467,6]]},"182":{"position":[[502,6],[984,6]]},"215":{"position":[[308,7]]},"218":{"position":[[183,8],[381,6]]},"220":{"position":[[477,6]]},"222":{"position":[[444,6]]},"224":{"position":[[55,6]]},"226":{"position":[[292,7]]},"228":{"position":[[255,7]]},"239":{"position":[[67,7]]},"307":{"position":[[477,6]]},"329":{"position":[[389,7]]},"345":{"position":[[193,7]]},"388":{"position":[[365,6]]},"394":{"position":[[271,6]]},"433":{"position":[[2027,7],[2122,8]]}}}],["system'",{"_index":1329,"t":{"138":{"position":[[284,8]]},"309":{"position":[[301,8]]},"313":{"position":[[93,8]]}}}],["systemctl",{"_index":1710,"t":{"239":{"position":[[973,9],[1303,9],[1329,9],[1386,9],[3194,9]]}}}],["t",{"_index":1752,"t":{"239":{"position":[[3163,2]]}}}],["tab",{"_index":1350,"t":{"144":{"position":[[93,4]]},"146":{"position":[[114,4],[167,3]]},"249":{"position":[[123,3]]}}}],["tabl",{"_index":314,"t":{"15":{"position":[[572,7]]},"35":{"position":[[149,5]]},"40":{"position":[[348,5]]}}}],["table_of_cont",{"_index":1055,"t":{"85":{"position":[[668,18]]}}}],["tackl",{"_index":155,"t":{"7":{"position":[[308,6]]}}}],["tailor",{"_index":925,"t":{"56":{"position":[[122,8]]},"58":{"position":[[419,8]]},"95":{"position":[[149,6]]}}}],["tailwind",{"_index":642,"t":{"27":{"position":[[2549,9]]}}}],["take",{"_index":18,"t":{"3":{"position":[[193,4]]},"9":{"position":[[218,5],[299,4],[971,5]]},"21":{"position":[[247,4]]},"25":{"position":[[63,4]]},"48":{"position":[[4155,4]]},"58":{"position":[[71,5]]},"85":{"position":[[1376,4]]},"87":{"position":[[1221,4]]},"140":{"position":[[44,5]]},"150":{"position":[[815,5]]},"170":{"position":[[880,5]]},"204":{"position":[[60,4]]},"206":{"position":[[484,5]]},"239":{"position":[[1152,4]]},"423":{"position":[[782,4]]},"439":{"position":[[420,5]]}}}],["taken",{"_index":1362,"t":{"150":{"position":[[246,5]]}}}],["talk",{"_index":465,"t":{"19":{"position":[[2154,4]]}}}],["target",{"_index":674,"t":{"33":{"position":[[627,8]]},"313":{"position":[[335,6],[579,10]]}}}],["task",{"_index":17,"t":{"3":{"position":[[183,5],[298,5],[671,5],[747,4]]},"5":{"position":[[137,4],[438,4],[614,5],[732,4],[811,6],[827,5],[958,5]]},"7":{"position":[[221,6]]},"9":{"position":[[102,5],[171,4],[288,4],[462,5],[919,5],[966,4]]},"11":{"position":[[82,5],[292,4],[455,5]]},"13":{"position":[[225,5],[351,5]]},"15":{"position":[[187,5]]},"17":{"position":[[506,4]]},"25":{"position":[[198,4],[539,4]]},"27":{"position":[[1880,5]]},"58":{"position":[[97,4],[205,5]]},"60":{"position":[[11,4]]},"62":{"position":[[404,5]]},"68":{"position":[[52,5]]},"83":{"position":[[332,5],[495,4],[657,5]]},"85":{"position":[[538,5],[831,4]]},"87":{"position":[[166,5],[925,5],[2851,4]]},"89":{"position":[[927,6],[1015,4]]},"115":{"position":[[186,6]]},"160":{"position":[[329,5],[913,4]]},"162":{"position":[[247,5],[375,4]]},"166":{"position":[[67,5]]},"170":{"position":[[327,5]]},"172":{"position":[[378,4]]},"204":{"position":[[50,5],[270,6],[694,6]]},"206":{"position":[[398,5],[479,4],[614,5],[710,5],[836,5]]},"255":{"position":[[1202,5]]},"257":{"position":[[95,6],[2124,5]]},"317":{"position":[[1627,5]]},"390":{"position":[[236,6]]},"419":{"position":[[180,5]]},"423":{"position":[[174,5]]},"439":{"position":[[306,5],[446,4],[554,5]]}}}],["task.json",{"_index":1136,"t":{"87":{"position":[[2389,9]]},"423":{"position":[[64,9],[102,9]]}}}],["taskstask",{"_index":217,"t":{"9":{"position":[[603,10]]}}}],["tavili",{"_index":569,"t":{"25":{"position":[[395,6]]},"27":{"position":[[310,6],[532,6]]},"48":{"position":[[1669,6],[1909,6],[2240,6],[5439,6],[5776,6],[5990,6]]},"56":{"position":[[115,6],[150,6]]},"121":{"position":[[190,6]]},"261":{"position":[[369,6]]},"388":{"position":[[37,6],[539,6]]},"400":{"position":[[344,6]]},"421":{"position":[[161,6]]}}}],["tavily_api_key",{"_index":1763,"t":{"249":{"position":[[279,14]]}}}],["tavily_api_key=langchain_tracing_v2=truelangchain_api_key=openai_api_key=doc_path=./mi",{"_index":2143,"t":{"374":{"position":[[377,86]]}}}],["tavily_api_key=your_tavily_api_key_her",{"_index":1308,"t":{"125":{"position":[[100,39]]}}}],["tavily_api_key={your",{"_index":596,"t":{"27":{"position":[[511,20]]},"261":{"position":[[348,20]]},"421":{"position":[[140,20]]}}}],["tavily_client.get_search_context(queri",{"_index":885,"t":{"48":{"position":[[6045,39]]}}}],["tavily_search",{"_index":803,"t":{"48":{"position":[[2449,16],[4505,16],[6735,16],[7431,16]]}}}],["tavily_search(queri",{"_index":883,"t":{"48":{"position":[[6007,21]]}}}],["tavily_search(query=json.loads(function_args)[\"queri",{"_index":860,"t":{"48":{"position":[[4531,55],[6761,55]]}}}],["tavilycli",{"_index":877,"t":{"48":{"position":[[5453,13]]}}}],["tavilyclient(api_key=os.environ[\"tavily_api_key\"])assistant_prompt_instruct",{"_index":881,"t":{"48":{"position":[[5568,78]]}}}],["team",{"_index":648,"t":{"29":{"position":[[133,5],[479,5]]},"79":{"position":[[394,4]]},"81":{"position":[[13,4],[109,5]]},"263":{"position":[[597,4]]},"275":{"position":[[955,4]]},"412":{"position":[[212,4]]},"414":{"position":[[13,4],[199,5]]}}}],["team’",{"_index":1072,"t":{"85":{"position":[[1996,6]]}}}],["tech",{"_index":435,"t":{"19":{"position":[[1155,4]]},"150":{"position":[[747,4]]}}}],["technic",{"_index":1043,"t":{"85":{"position":[[374,9]]},"150":{"position":[[831,9]]},"170":{"position":[[1141,9]]}}}],["techniqu",{"_index":942,"t":{"62":{"position":[[318,11]]}}}],["technolog",{"_index":1377,"t":{"150":{"position":[[702,11],[1183,11],[1560,11]]}}}],["technologies\"report_typ",{"_index":1845,"t":{"266":{"position":[[49,24]]}}}],["tediou",{"_index":929,"t":{"58":{"position":[[89,7]]},"439":{"position":[[438,7]]}}}],["tee",{"_index":1703,"t":{"239":{"position":[[788,3]]}}}],["tell",{"_index":1199,"t":{"97":{"position":[[860,4]]},"101":{"position":[[1135,4]]}}}],["temperature=0.35",{"_index":2014,"t":{"331":{"position":[[445,17]]}}}],["temperature=0.7",{"_index":2171,"t":{"382":{"position":[[466,16]]}}}],["templat",{"_index":1791,"t":{"255":{"position":[[987,10]]}}}],["termin",{"_index":1576,"t":{"180":{"position":[[238,9],[363,9],[496,9]]}}}],["terminolog",{"_index":404,"t":{"19":{"position":[[356,12]]}}}],["test",{"_index":235,"t":{"9":{"position":[[939,6]]},"75":{"position":[[95,8]]},"182":{"position":[[1226,8]]},"243":{"position":[[52,7],[113,5],[170,5]]},"245":{"position":[[16,6]]},"247":{"position":[[25,4],[54,5]]},"249":{"position":[[166,7],[213,7]]},"331":{"position":[[0,7]]},"382":{"position":[[535,4],[1007,4]]},"433":{"position":[[0,7],[26,4],[1171,4]]}}}],["test_ollama",{"_index":2176,"t":{"382":{"position":[[632,14]]}}}],["test_scrape_data_by_queri",{"_index":2290,"t":{"433":{"position":[[449,28]]}}}],["text",{"_index":315,"t":{"15":{"position":[[589,5]]},"48":{"position":[[602,4]]},"68":{"position":[[138,5]]},"97":{"position":[[158,5]]},"162":{"position":[[274,4]]},"170":{"position":[[14,4]]},"305":{"position":[[181,4]]},"307":{"position":[[220,4]]},"339":{"position":[[304,4]]},"341":{"position":[[294,5]]},"353":{"position":[[366,4]]},"363":{"position":[[340,4]]},"365":{"position":[[218,4]]},"370":{"position":[[29,4]]}}}],["text_splitter.split_documents(documents=document)vector_stor",{"_index":1445,"t":{"150":{"position":[[2810,61]]}}}],["text_splitter.split_documents(local_doc",{"_index":545,"t":{"23":{"position":[[1584,42]]}}}],["textload",{"_index":500,"t":{"23":{"position":[[258,11]]}}}],["textloader(file_path",{"_index":518,"t":{"23":{"position":[[752,21]]}}}],["thank",{"_index":2195,"t":{"388":{"position":[[461,6]]}}}],["that’",{"_index":208,"t":{"9":{"position":[[330,6],[1004,6]]},"48":{"position":[[5212,6]]},"75":{"position":[[164,6]]}}}],["theori",{"_index":177,"t":{"7":{"position":[[761,7]]},"257":{"position":[[1774,8],[1906,8]]}}}],["there'",{"_index":637,"t":{"27":{"position":[[2467,7]]}}}],["there’",{"_index":1030,"t":{"83":{"position":[[1428,7]]}}}],["thing",{"_index":346,"t":{"17":{"position":[[260,6]]},"48":{"position":[[1694,6]]},"85":{"position":[[1271,6]]},"89":{"position":[[40,6]]}}}],["think",{"_index":30,"t":{"3":{"position":[[329,8]]},"75":{"position":[[426,5]]},"89":{"position":[[50,5]]},"150":{"position":[[422,5],[963,5],[1349,5]]}}}],["thorough",{"_index":390,"t":{"17":{"position":[[1190,9]]}}}],["those",{"_index":1198,"t":{"97":{"position":[[92,5]]}}}],["thousand",{"_index":319,"t":{"15":{"position":[[658,9]]}}}],["thread",{"_index":777,"t":{"48":{"position":[[1089,6],[1151,6],[1210,6],[1335,7],[1467,7],[2804,6],[2846,6],[3057,6],[4958,7],[7857,11],[8565,6]]}}}],["thread_id=thread.id",{"_index":816,"t":{"48":{"position":[[2957,20],[3154,20],[8039,20],[8149,20]]}}}],["thread_id=thread_id",{"_index":863,"t":{"48":{"position":[[4726,20],[6956,20]]}}}],["threaddef",{"_index":889,"t":{"48":{"position":[[7060,9]]}}}],["threadthread",{"_index":898,"t":{"48":{"position":[[7798,12]]}}}],["three",{"_index":237,"t":{"9":{"position":[[984,5]]},"48":{"position":[[357,5]]},"85":{"position":[[3067,5]]},"150":{"position":[[1988,5],[2307,6]]},"433":{"position":[[1809,5],[1875,5],[1891,5]]}}}],["through",{"_index":1037,"t":{"85":{"position":[[100,7],[886,7]]},"119":{"position":[[163,7]]},"384":{"position":[[108,7]]},"433":{"position":[[1241,7]]}}}],["throughout",{"_index":1046,"t":{"85":{"position":[[420,10]]},"89":{"position":[[329,10]]},"182":{"position":[[579,10]]}}}],["thu",{"_index":215,"t":{"9":{"position":[[509,4]]}}}],["tier",{"_index":2052,"t":{"343":{"position":[[247,6]]}}}],["time",{"_index":19,"t":{"3":{"position":[[198,5]]},"5":{"position":[[157,4]]},"7":{"position":[[635,5]]},"9":{"position":[[541,4]]},"11":{"position":[[1107,5]]},"15":{"position":[[130,4],[318,4],[958,4]]},"19":{"position":[[914,4]]},"38":{"position":[[332,4]]},"48":{"position":[[5320,4]]},"87":{"position":[[2289,4]]},"115":{"position":[[126,4]]},"150":{"position":[[1994,5],[2377,5]]},"160":{"position":[[406,4]]},"170":{"position":[[570,4],[638,5],[1126,5]]},"198":{"position":[[14,4]]},"204":{"position":[[65,5]]},"222":{"position":[[273,4]]}}}],["time.sleep(1",{"_index":840,"t":{"48":{"position":[[3762,13],[6247,13]]}}}],["timefrom",{"_index":875,"t":{"48":{"position":[[5405,8]]}}}],["timestamp",{"_index":1481,"t":{"158":{"position":[[133,10]]},"160":{"position":[[0,10],[15,9],[102,9],[158,10],[382,10]]},"166":{"position":[[18,11]]},"170":{"position":[[70,10],[792,10]]},"172":{"position":[[40,11]]}}}],["titl",{"_index":699,"t":{"40":{"position":[[201,6]]},"85":{"position":[[633,6]]},"287":{"position":[[48,6]]},"296":{"position":[[365,6]]},"298":{"position":[[360,6]]},"433":{"position":[[1723,6],[2095,8]]}}}],["titlessimilar_cont",{"_index":1888,"t":{"298":{"position":[[197,22]]}}}],["today",{"_index":382,"t":{"17":{"position":[[996,6]]}}}],["today'",{"_index":2326,"t":{"439":{"position":[[118,7]]}}}],["togeth",{"_index":193,"t":{"7":{"position":[[1297,8]]},"64":{"position":[[117,8]]},"79":{"position":[[421,8]]},"206":{"position":[[662,8]]},"353":{"position":[[0,8]]},"412":{"position":[[239,8]]}}}],["together_api_key=[your",{"_index":2086,"t":{"353":{"position":[[142,22]]}}}],["token",{"_index":1616,"t":{"204":{"position":[[311,5]]},"283":{"position":[[24,6]]},"398":{"position":[[467,5],[574,5]]}}}],["tone",{"_index":688,"t":{"38":{"position":[[255,5],[261,4],[291,4]]},"257":{"position":[[798,4],[821,4]]},"317":{"position":[[1689,5]]}}}],["tone=\"form",{"_index":1876,"t":{"294":{"position":[[237,12]]}}}],["tone=ton",{"_index":1808,"t":{"257":{"position":[[1111,10]]}}}],["tone=tone.form",{"_index":720,"t":{"42":{"position":[[508,17]]}}}],["tonefrom",{"_index":707,"t":{"42":{"position":[[146,8]]}}}],["took",{"_index":3,"t":{"3":{"position":[[44,4]]},"164":{"position":[[120,5]]},"166":{"position":[[244,4]]}}}],["tool",{"_index":334,"t":{"17":{"position":[[59,5],[281,5]]},"19":{"position":[[1564,4]]},"29":{"position":[[106,5]]},"44":{"position":[[44,4]]},"48":{"position":[[120,6],[308,6],[372,6],[470,4],[741,5],[1018,5],[1277,6],[2398,8],[4242,4],[4350,4],[6472,4],[6580,4],[7380,8],[8791,5]]},"160":{"position":[[687,4],[895,4]]},"162":{"position":[[151,4],[449,4],[560,4],[642,4],[749,4],[1228,4],[1405,4],[1499,4],[1559,4],[2102,4],[2255,4],[2604,4],[2692,4],[2879,4],[3200,4],[3522,4],[3684,4],[4151,4]]},"164":{"position":[[115,4],[459,4]]},"166":{"position":[[123,4],[239,4]]},"170":{"position":[[958,4]]},"172":{"position":[[482,4],[738,5]]},"198":{"position":[[194,4]]},"439":{"position":[[160,4]]}}}],["tool'",{"_index":1551,"t":{"170":{"position":[[614,6]]}}}],["tool.function.argu",{"_index":859,"t":{"48":{"position":[[4461,23],[6691,23]]}}}],["tool.function.nam",{"_index":857,"t":{"48":{"position":[[4426,18],[6656,18]]}}}],["tool.id",{"_index":855,"t":{"48":{"position":[[4402,7],[6632,7]]}}}],["tool_call_id",{"_index":854,"t":{"48":{"position":[[4387,12],[4640,13],[6617,12],[6870,13]]}}}],["tool_output_array",{"_index":853,"t":{"48":{"position":[[4323,17],[6553,17]]}}}],["tool_output_array.append({\"tool_call_id",{"_index":861,"t":{"48":{"position":[[4598,41],[6828,41]]}}}],["tool_outputs=tool_output_array",{"_index":864,"t":{"48":{"position":[[4762,30],[6992,30]]}}}],["tools_to_cal",{"_index":852,"t":{"48":{"position":[[4307,15],[4358,14],[6537,15],[6588,14]]}}}],["top",{"_index":571,"t":{"25":{"position":[[497,3]]},"268":{"position":[[17,3]]}}}],["topic",{"_index":184,"t":{"7":{"position":[[1007,6],[1342,6]]},"11":{"position":[[570,6]]},"25":{"position":[[313,6]]},"33":{"position":[[158,7]]},"35":{"position":[[20,6]]},"40":{"position":[[106,5]]},"44":{"position":[[109,7],[425,6]]},"79":{"position":[[461,6]]},"81":{"position":[[333,6]]},"83":{"position":[[503,6],[710,5]]},"87":{"position":[[936,6],[1048,5]]},"89":{"position":[[202,6]]},"412":{"position":[[279,6]]},"414":{"position":[[387,6]]},"419":{"position":[[282,5]]}}}],["total",{"_index":1516,"t":{"162":{"position":[[1836,5]]}}}],["toward",{"_index":79,"t":{"3":{"position":[[1145,6]]},"15":{"position":[[52,6]]},"77":{"position":[[384,7]]}}}],["trace",{"_index":1541,"t":{"164":{"position":[[553,5]]}}}],["track",{"_index":50,"t":{"3":{"position":[[608,5],[779,5]]},"13":{"position":[[389,6]]},"35":{"position":[[198,8]]},"89":{"position":[[1327,5]]},"115":{"position":[[140,9]]},"206":{"position":[[919,5]]},"211":{"position":[[330,5]]},"291":{"position":[[62,5]]}}}],["trade",{"_index":425,"t":{"19":{"position":[[891,7]]},"150":{"position":[[642,7]]}}}],["train",{"_index":145,"t":{"7":{"position":[[122,8],[154,7]]},"83":{"position":[[470,7]]},"204":{"position":[[149,7]]}}}],["transformers/al",{"_index":2100,"t":{"355":{"position":[[352,16]]}}}],["transpar",{"_index":1538,"t":{"164":{"position":[[212,13],[243,12]]}}}],["transport",{"_index":1678,"t":{"239":{"position":[[351,9]]}}}],["trend",{"_index":373,"t":{"17":{"position":[[827,6]]},"19":{"position":[[767,5],[855,6],[1654,7]]},"27":{"position":[[1622,6],[1943,6],[1988,7]]},"75":{"position":[[580,6]]},"93":{"position":[[906,6],[1082,8]]},"132":{"position":[[475,6]]},"134":{"position":[[504,6]]},"136":{"position":[[259,7]]},"439":{"position":[[340,8]]}}}],["tri",{"_index":68,"t":{"3":{"position":[[927,3]]},"77":{"position":[[423,6]]},"107":{"position":[[283,3]]},"200":{"position":[[371,3]]},"313":{"position":[[250,3]]},"323":{"position":[[374,3]]},"325":{"position":[[222,3]]},"327":{"position":[[99,3]]},"329":{"position":[[775,3]]},"331":{"position":[[324,4]]},"382":{"position":[[647,4]]}}}],["trial",{"_index":412,"t":{"19":{"position":[[500,5]]}}}],["trigger",{"_index":230,"t":{"9":{"position":[[831,7]]},"13":{"position":[[259,7]]},"48":{"position":[[1220,7],[3067,7],[4873,8]]},"83":{"position":[[624,10]]},"87":{"position":[[350,7],[552,9]]},"105":{"position":[[390,7]]},"206":{"position":[[744,7]]},"243":{"position":[[123,9]]},"427":{"position":[[386,7]]}}}],["troubleshoot",{"_index":1536,"t":{"164":{"position":[[0,16]]}}}],["true",{"_index":839,"t":{"48":{"position":[[3756,5],[6241,5],[7900,5]]},"87":{"position":[[2494,5],[2507,5],[2521,4]]},"93":{"position":[[428,5]]},"423":{"position":[[365,5],[714,5],[964,5],[1149,5],[1162,5],[1176,4],[1255,5],[1429,5]]},"433":{"position":[[821,4]]}}}],["truli",{"_index":474,"t":{"21":{"position":[[145,5]]}}}],["trustworthi",{"_index":2325,"t":{"439":{"position":[[31,11]]}}}],["turbo",{"_index":794,"t":{"48":{"position":[[2180,5]]},"87":{"position":[[2573,7]]}}}],["turn",{"_index":1057,"t":{"85":{"position":[[932,5]]}}}],["tutori",{"_index":766,"t":{"48":{"position":[[759,8]]},"75":{"position":[[836,9]]},"355":{"position":[[106,8]]}}}],["twenties,y",{"_index":1413,"t":{"150":{"position":[[1702,12]]}}}],["twicea",{"_index":1418,"t":{"150":{"position":[[1906,7]]}}}],["two",{"_index":107,"t":{"5":{"position":[[378,3]]},"7":{"position":[[270,3]]},"85":{"position":[[802,3]]},"150":{"position":[[2062,4]]},"168":{"position":[[104,3]]}}}],["txt",{"_index":1316,"t":{"128":{"position":[[99,5]]},"130":{"position":[[111,5]]}}}],["type",{"_index":493,"t":{"23":{"position":[[89,6],[1216,5]]},"38":{"position":[[115,4]]},"48":{"position":[[363,5],[2407,7],[2547,7],[2590,8],[7389,7],[7529,7],[7572,8]]},"52":{"position":[[220,4]]},"89":{"position":[[589,5]]},"101":{"position":[[154,6]]},"158":{"position":[[144,5]]},"160":{"position":[[484,5],[590,5]]},"162":{"position":[[54,5]]},"168":{"position":[[108,5]]},"172":{"position":[[72,4]]},"192":{"position":[[92,4]]},"198":{"position":[[77,4]]},"255":{"position":[[366,5]]},"257":{"position":[[107,6],[694,4],[1616,7]]},"404":{"position":[[29,5]]}}}],["typic",{"_index":664,"t":{"33":{"position":[[239,7]]},"44":{"position":[[252,7]]},"48":{"position":[[844,7]]},"136":{"position":[[133,9]]},"140":{"position":[[19,7]]}}}],["u21899.vm.elestio.app:57987\"llm_model",{"_index":2164,"t":{"382":{"position":[[299,37]]}}}],["ubuntu",{"_index":1659,"t":{"234":{"position":[[12,6],[214,6]]}}}],["ug3qr",{"_index":2163,"t":{"382":{"position":[[293,5]]}}}],["ui",{"_index":1648,"t":{"224":{"position":[[144,2]]},"378":{"position":[[188,3]]},"380":{"position":[[377,2]]},"382":{"position":[[985,3]]}}}],["ultim",{"_index":86,"t":{"5":{"position":[[92,10]]},"29":{"position":[[529,10]]}}}],["unbias",{"_index":141,"t":{"7":{"position":[[62,8],[934,9],[1049,9],[1081,9],[1445,8]]},"15":{"position":[[381,8]]}}}],["uncertainti",{"_index":123,"t":{"5":{"position":[[717,11]]}}}],["uncom",{"_index":1262,"t":{"107":{"position":[[383,11]]},"200":{"position":[[471,11]]},"429":{"position":[[299,11]]}}}],["undefin",{"_index":1943,"t":{"317":{"position":[[1062,9],[1107,10]]}}}],["under",{"_index":480,"t":{"21":{"position":[[259,5]]},"25":{"position":[[109,5]]},"83":{"position":[[879,5]]},"87":{"position":[[2144,5]]}}}],["underli",{"_index":1385,"t":{"150":{"position":[[1013,10]]}}}],["understand",{"_index":309,"t":{"15":{"position":[[496,10]]},"21":{"position":[[202,13]]},"27":{"position":[[27,13]]},"150":{"position":[[998,10]]},"162":{"position":[[479,10]]},"164":{"position":[[84,10],[386,13]]},"172":{"position":[[579,14],[717,13]]},"298":{"position":[[484,10]]}}}],["unexpect",{"_index":1537,"t":{"164":{"position":[[45,11]]}}}],["uninstal",{"_index":2002,"t":{"329":{"position":[[555,9]]}}}],["uniqu",{"_index":455,"t":{"19":{"position":[[1834,7]]},"162":{"position":[[39,6]]},"196":{"position":[[103,6]]}}}],["unlik",{"_index":826,"t":{"48":{"position":[[3263,6]]}}}],["unreli",{"_index":362,"t":{"17":{"position":[[632,10]]}}}],["unstructur",{"_index":654,"t":{"29":{"position":[[634,12]]}}}],["unstructuredcsvload",{"_index":501,"t":{"23":{"position":[[270,22]]}}}],["unstructuredcsvloader(file_path",{"_index":520,"t":{"23":{"position":[[816,32]]}}}],["unstructuredexcelload",{"_index":502,"t":{"23":{"position":[[293,24]]}}}],["unstructuredexcelloader(file_path",{"_index":522,"t":{"23":{"position":[[892,34]]}}}],["unstructuredmarkdownload",{"_index":503,"t":{"23":{"position":[[318,27]]}}}],["unstructuredmarkdownloader(file_path",{"_index":524,"t":{"23":{"position":[[968,37]]}}}],["unstructuredpowerpointload",{"_index":504,"t":{"23":{"position":[[346,29]]}}}],["unstructuredpowerpointloader(file_path",{"_index":526,"t":{"23":{"position":[[1049,39]]}}}],["unstructuredworddocumentloader(file_path",{"_index":528,"t":{"23":{"position":[[1132,41]]}}}],["unstructuredworddocumentloader)from",{"_index":505,"t":{"23":{"position":[[376,35]]}}}],["until",{"_index":1027,"t":{"83":{"position":[[1099,5]]},"419":{"position":[[521,5]]}}}],["up",{"_index":419,"t":{"19":{"position":[[651,2]]},"23":{"position":[[188,3]]},"27":{"position":[[229,2]]},"83":{"position":[[406,2]]},"85":{"position":[[2866,2]]},"87":{"position":[[1571,2]]},"107":{"position":[[245,2],[331,2]]},"111":{"position":[[181,2]]},"119":{"position":[[194,2]]},"188":{"position":[[181,2]]},"198":{"position":[[165,2]]},"200":{"position":[[333,2],[419,2]]},"220":{"position":[[315,2]]},"236":{"position":[[14,2]]},"239":{"position":[[585,2],[3277,2]]},"331":{"position":[[114,2]]},"351":{"position":[[5,2]]},"357":{"position":[[5,2]]},"374":{"position":[[570,2]]},"414":{"position":[[26,2]]},"425":{"position":[[35,2]]},"429":{"position":[[247,2]]}}}],["updat",{"_index":416,"t":{"19":{"position":[[592,7]]},"48":{"position":[[2815,6]]},"85":{"position":[[988,6]]},"89":{"position":[[1372,7]]},"140":{"position":[[925,8]]},"228":{"position":[[42,8]]},"239":{"position":[[9,9],[843,6]]},"349":{"position":[[69,6]]},"351":{"position":[[36,6]]},"353":{"position":[[98,6]]},"355":{"position":[[122,6]]},"357":{"position":[[55,6]]},"384":{"position":[[899,7]]},"421":{"position":[[64,6]]}}}],["updatesudo",{"_index":1707,"t":{"239":{"position":[[902,10]]}}}],["upgrad",{"_index":1654,"t":{"228":{"position":[[129,7]]},"239":{"position":[[1621,7],[1672,10],[1884,7],[1935,10],[2159,7],[2210,10],[2422,7],[2473,10]]}}}],["upload",{"_index":1243,"t":{"105":{"position":[[247,9]]},"427":{"position":[[243,9]]}}}],["upon",{"_index":93,"t":{"5":{"position":[[222,4]]},"95":{"position":[[45,4]]}}}],["urg",{"_index":981,"t":{"75":{"position":[[593,4]]}}}],["url",{"_index":221,"t":{"9":{"position":[[662,3],[856,4]]},"11":{"position":[[838,4]]},"38":{"position":[[206,4]]},"42":{"position":[[455,4]]},"48":{"position":[[2057,3],[5924,3]]},"93":{"position":[[94,5],[260,4]]},"130":{"position":[[43,3]]},"146":{"position":[[95,3]]},"160":{"position":[[1032,5]]},"162":{"position":[[1030,3],[1112,3],[1190,3],[1457,5],[1490,4],[1606,5],[1885,4],[1989,5]]},"164":{"position":[[309,4]]},"166":{"position":[[164,4]]},"257":{"position":[[1689,3]]},"279":{"position":[[16,4]]},"382":{"position":[[892,3]]},"390":{"position":[[363,3]]},"394":{"position":[[114,6],[189,6]]},"400":{"position":[[773,3]]}}}],["urlopenai_base_url=\"http://localhost:1234/v1",{"_index":2030,"t":{"337":{"position":[[122,46],[437,46]]}}}],["us",{"_index":6,"t":{"3":{"position":[[74,3],[367,5]]},"11":{"position":[[508,5]]},"17":{"position":[[877,4]]},"19":{"position":[[454,3],[1573,3],[2083,3]]},"21":{"position":[[548,5]]},"23":{"position":[[1286,3]]},"25":{"position":[[369,4],[711,5]]},"27":{"position":[[2532,5],[2639,3]]},"29":{"position":[[258,5]]},"33":{"position":[[184,6]]},"38":{"position":[[280,6]]},"42":{"position":[[19,3]]},"48":{"position":[[714,5],[1634,3],[1892,3],[1990,3],[2157,5],[2230,5],[2645,4],[5274,4],[5309,5],[5759,3],[5857,3],[7627,4],[8668,5]]},"60":{"position":[[16,5]]},"62":{"position":[[96,5],[127,5],[218,3],[298,5]]},"75":{"position":[[806,5]]},"77":{"position":[[405,3]]},"81":{"position":[[176,5]]},"85":{"position":[[1416,5]]},"87":{"position":[[2691,5]]},"89":{"position":[[620,3]]},"101":{"position":[[1257,5]]},"105":{"position":[[282,4]]},"109":{"position":[[23,5]]},"111":{"position":[[216,3]]},"119":{"position":[[225,5]]},"140":{"position":[[217,3]]},"158":{"position":[[431,7]]},"162":{"position":[[361,4],[683,3]]},"164":{"position":[[148,5]]},"166":{"position":[[111,4],[169,5]]},"170":{"position":[[539,3],[594,4]]},"172":{"position":[[383,3],[768,6]]},"180":{"position":[[106,5],[309,3],[633,5]]},"182":{"position":[[1144,4]]},"190":{"position":[[21,5]]},"204":{"position":[[579,5]]},"206":{"position":[[426,5]]},"211":{"position":[[242,3],[363,4]]},"215":{"position":[[334,5]]},"220":{"position":[[115,3],[167,3]]},"222":{"position":[[315,3],[388,4]]},"224":{"position":[[316,4]]},"228":{"position":[[68,5]]},"239":{"position":[[1999,5]]},"243":{"position":[[87,5]]},"253":{"position":[[15,5],[894,5],[951,3]]},"255":{"position":[[38,5],[873,3],[1029,3],[1167,4]]},"257":{"position":[[1352,5]]},"261":{"position":[[401,5]]},"279":{"position":[[31,4]]},"298":{"position":[[8,3]]},"305":{"position":[[34,4]]},"307":{"position":[[39,4]]},"309":{"position":[[17,3]]},"311":{"position":[[0,3],[157,3]]},"317":{"position":[[1224,3]]},"321":{"position":[[41,3]]},"323":{"position":[[54,4],[291,5],[443,5]]},"325":{"position":[[42,5],[109,5],[518,6]]},"327":{"position":[[6,5]]},"329":{"position":[[173,5]]},"337":{"position":[[26,5]]},"339":{"position":[[142,4]]},"341":{"position":[[89,3]]},"345":{"position":[[213,5]]},"382":{"position":[[42,3]]},"388":{"position":[[27,5],[106,3],[377,3]]},"390":{"position":[[13,3],[128,3],[207,4]]},"412":{"position":[[3,5],[446,4]]},"414":{"position":[[266,5]]},"423":{"position":[[206,3]]},"425":{"position":[[88,3]]},"427":{"position":[[278,4]]},"431":{"position":[[34,3]]},"433":{"position":[[55,3],[1406,5]]},"435":{"position":[[192,5]]}}}],["usag",{"_index":442,"t":{"19":{"position":[[1241,5]]},"60":{"position":[[84,7]]},"154":{"position":[[110,7]]},"218":{"position":[[162,5]]},"220":{"position":[[555,5]]},"291":{"position":[[92,6]]},"388":{"position":[[241,5]]}}}],["use_jsonb=tru",{"_index":1222,"t":{"101":{"position":[[629,15]]},"152":{"position":[[389,15]]}}}],["user",{"_index":778,"t":{"48":{"position":[[1103,4],[1165,4],[1416,6],[2832,4]]},"105":{"position":[[228,4]]},"115":{"position":[[468,4]]},"160":{"position":[[881,4]]},"162":{"position":[[2963,4],[3111,4],[3423,4],[3605,4],[3765,4],[4231,4],[4374,4]]},"164":{"position":[[544,5]]},"168":{"position":[[19,4]]},"170":{"position":[[1060,4],[1203,5]]},"172":{"position":[[851,4]]},"182":{"position":[[731,4]]},"215":{"position":[[229,4]]},"220":{"position":[[217,4]]},"224":{"position":[[208,5]]},"239":{"position":[[1021,4],[1097,10]]},"298":{"position":[[478,5]]},"305":{"position":[[421,4]]},"307":{"position":[[326,4]]},"311":{"position":[[317,4]]},"325":{"position":[[173,5]]},"329":{"position":[[5,5]]},"331":{"position":[[416,7]]},"382":{"position":[[595,7]]},"423":{"position":[[375,4]]},"427":{"position":[[224,4]]}}}],["user_input",{"_index":902,"t":{"48":{"position":[[7906,10]]}}}],["user_input.low",{"_index":903,"t":{"48":{"position":[[7937,18]]}}}],["usermod",{"_index":1712,"t":{"239":{"position":[[1078,7]]}}}],["using:sudo",{"_index":1671,"t":{"239":{"position":[[86,10]]}}}],["usingazure_openai_endpoint=\"https://changemen.openai.azure.com",{"_index":1774,"t":{"253":{"position":[[381,64]]}}}],["usr/share/keyrings/dock",{"_index":1691,"t":{"239":{"position":[[531,26]]}}}],["usual",{"_index":39,"t":{"3":{"position":[[504,7]]},"150":{"position":[[686,7]]},"170":{"position":[[120,7],[1167,7]]}}}],["util",{"_index":1894,"t":{"298":{"position":[[499,7]]}}}],["uuid",{"_index":1611,"t":{"196":{"position":[[110,5]]}}}],["uvicorn",{"_index":1275,"t":{"109":{"position":[[203,7]]},"176":{"position":[[107,7]]},"184":{"position":[[124,7]]},"273":{"position":[[699,7]]},"325":{"position":[[546,7]]}}}],["v1.2",{"_index":787,"t":{"48":{"position":[[1660,4]]}}}],["v1.5",{"_index":2094,"t":{"353":{"position":[[371,5]]},"363":{"position":[[345,5]]},"370":{"position":[[34,5]]}}}],["v18.17.0",{"_index":1280,"t":{"111":{"position":[[86,9],[220,8]]}}}],["v18.17.0npm",{"_index":2281,"t":{"431":{"position":[[38,11]]}}}],["v1:0\"embedding=\"bedrock:amazon.titan",{"_index":2133,"t":{"365":{"position":[[175,36]]}}}],["v1:0\"smart_llm=\"bedrock:anthropic.claud",{"_index":2131,"t":{"365":{"position":[[53,40]]}}}],["v1:0\"strategic_llm=\"bedrock:anthropic.claud",{"_index":2132,"t":{"365":{"position":[[112,44]]}}}],["v2",{"_index":2103,"t":{"355":{"position":[[379,3]]}}}],["v2:0",{"_index":2134,"t":{"365":{"position":[[223,5]]}}}],["v3.0",{"_index":2123,"t":{"361":{"position":[[154,5]]}}}],["valid",{"_index":1015,"t":{"81":{"position":[[421,9]]},"83":{"position":[[959,9]]},"414":{"position":[[475,9]]},"419":{"position":[[407,9]]}}}],["valu",{"_index":1182,"t":{"93":{"position":[[442,5]]},"154":{"position":[[237,5]]},"257":{"position":[[595,6]]},"398":{"position":[[274,6],[375,6],[479,6],[586,6],[727,6],[825,6],[912,6]]}}}],["valuabl",{"_index":1034,"t":{"83":{"position":[[1502,8]]},"255":{"position":[[923,8]]}}}],["valueerror(f\"unsupport",{"_index":530,"t":{"23":{"position":[[1186,24]]}}}],["var",{"_index":2072,"t":{"349":{"position":[[98,5]]},"351":{"position":[[65,5]]},"353":{"position":[[123,5]]},"355":{"position":[[137,5]]},"357":{"position":[[80,5]]},"388":{"position":[[163,4]]},"390":{"position":[[92,4],[324,5]]},"423":{"position":[[686,4]]}}}],["vari",{"_index":1333,"t":{"140":{"position":[[66,6]]},"198":{"position":[[23,4]]}}}],["variabl",{"_index":592,"t":{"27":{"position":[[431,9]]},"68":{"position":[[218,8]]},"97":{"position":[[238,8]]},"105":{"position":[[364,10]]},"125":{"position":[[36,10],[350,8]]},"188":{"position":[[201,10]]},"253":{"position":[[134,9]]},"261":{"position":[[212,10]]},"302":{"position":[[81,9]]},"331":{"position":[[96,9]]},"341":{"position":[[138,9]]},"345":{"position":[[223,8]]},"347":{"position":[[78,10]]},"374":{"position":[[331,9]]},"400":{"position":[[112,9],[256,9],[407,9],[551,9],[689,9],[818,9]]},"421":{"position":[[75,9]]},"427":{"position":[[360,10]]},"433":{"position":[[402,9]]}}}],["varieti",{"_index":490,"t":{"23":{"position":[[21,7]]}}}],["variou",{"_index":631,"t":{"27":{"position":[[2126,7]]},"48":{"position":[[3616,7]]},"81":{"position":[[700,7]]},"93":{"position":[[305,7]]},"115":{"position":[[384,7]]},"170":{"position":[[261,7]]},"294":{"position":[[18,7]]},"296":{"position":[[58,7]]},"414":{"position":[[754,7]]}}}],["vcpu",{"_index":1664,"t":{"234":{"position":[[152,4]]}}}],["vector",{"_index":548,"t":{"23":{"position":[[1665,6]]},"25":{"position":[[467,6]]},"152":{"position":[[232,6]]},"154":{"position":[[86,6],[192,6],[839,6]]},"433":{"position":[[957,6]]}}}],["vector_store.asimilarity_search(\"gpt",{"_index":1477,"t":{"154":{"position":[[876,36]]}}}],["vector_store=vector_stor",{"_index":1454,"t":{"150":{"position":[[3263,28]]},"152":{"position":[[797,26]]},"154":{"position":[[655,26]]}}}],["vector_storeawait",{"_index":1475,"t":{"154":{"position":[[749,17]]}}}],["vectorstore.similarity_search(queri",{"_index":560,"t":{"23":{"position":[[1935,36]]}}}],["vendor",{"_index":587,"t":{"27":{"position":[[299,6]]}}}],["ventur",{"_index":1373,"t":{"150":{"position":[[627,7]]}}}],["venv",{"_index":1572,"t":{"180":{"position":[[116,4],[258,4]]}}}],["verbos",{"_index":1869,"t":{"289":{"position":[[16,7]]},"423":{"position":[[951,7],[1418,10]]}}}],["verbose=tru",{"_index":1878,"t":{"294":{"position":[[283,13]]}}}],["veri",{"_index":272,"t":{"11":{"position":[[1039,4]]},"85":{"position":[[3029,4]]},"140":{"position":[[179,4]]},"150":{"position":[[607,4],[2549,4]]},"222":{"position":[[170,4]]},"343":{"position":[[228,4]]}}}],["verifi",{"_index":396,"t":{"19":{"position":[[173,9]]},"239":{"position":[[119,6],[941,6],[1355,6],[3127,6]]},"331":{"position":[[55,6]]}}}],["verify_ssl=fals",{"_index":2173,"t":{"382":{"position":[[500,16]]}}}],["version",{"_index":1169,"t":{"89":{"position":[[1237,7]]},"182":{"position":[[73,7],[318,9],[1115,8]]},"215":{"position":[[496,7],[531,8]]},"222":{"position":[[137,7],[324,7],[430,7]]},"228":{"position":[[85,8],[345,8]]},"239":{"position":[[51,7],[177,10]]},"325":{"position":[[257,7]]},"329":{"position":[[83,7],[292,9],[313,7],[430,8],[578,7],[647,7]]}}}],["version:git",{"_index":1673,"t":{"239":{"position":[[163,11]]}}}],["via",{"_index":743,"t":{"46":{"position":[[150,3]]},"93":{"position":[[170,3],[498,3]]},"105":{"position":[[420,3]]},"144":{"position":[[21,3]]},"243":{"position":[[176,3]]},"311":{"position":[[214,3]]},"378":{"position":[[303,3]]},"427":{"position":[[416,3]]}}}],["video",{"_index":311,"t":{"15":{"position":[[548,7]]}}}],["view",{"_index":1565,"t":{"172":{"position":[[449,4]]}}}],["vim",{"_index":1747,"t":{"239":{"position":[[3067,3]]}}}],["virtual",{"_index":1570,"t":{"180":{"position":[[17,7],[86,7],[288,7],[419,7],[553,7]]},"182":{"position":[[41,7],[146,7],[392,7],[648,7],[884,7]]},"184":{"position":[[42,7]]}}}],["vision",{"_index":1162,"t":{"89":{"position":[[939,6]]},"435":{"position":[[218,6]]}}}],["visit",{"_index":202,"t":{"9":{"position":[[185,8]]},"107":{"position":[[551,5]]},"140":{"position":[[941,5]]},"164":{"position":[[169,8],[319,8]]},"184":{"position":[[155,5]]},"200":{"position":[[639,5]]},"211":{"position":[[351,7]]},"329":{"position":[[215,5]]},"429":{"position":[[467,5]]}}}],["visual",{"_index":1297,"t":{"115":{"position":[[150,6]]},"160":{"position":[[833,6]]}}}],["voyag",{"_index":1374,"t":{"150":{"position":[[650,7]]}}}],["voyage_api_key=[your",{"_index":2139,"t":{"372":{"position":[[0,20]]}}}],["wait",{"_index":636,"t":{"27":{"position":[[2461,5]]},"48":{"position":[[3604,7],[3676,4],[6161,4],[8228,4]]},"307":{"position":[[177,5]]}}}],["wait_for_run_completion(thread.id",{"_index":872,"t":{"48":{"position":[[5164,34],[8259,34],[8496,34]]}}}],["wait_for_run_completion(thread_id",{"_index":837,"t":{"48":{"position":[[3706,34],[6191,34]]}}}],["walk",{"_index":1302,"t":{"119":{"position":[[154,4]]},"384":{"position":[[99,4]]}}}],["want",{"_index":1175,"t":{"93":{"position":[[32,4],[194,4]]},"107":{"position":[[205,4]]},"150":{"position":[[379,6]]},"154":{"position":[[27,4]]},"192":{"position":[[41,4]]},"291":{"position":[[54,4]]},"339":{"position":[[134,4]]},"378":{"position":[[37,4]]},"429":{"position":[[205,4]]}}}],["warn",{"_index":1548,"t":{"170":{"position":[[159,8]]}}}],["watch",{"_index":1201,"t":{"99":{"position":[[242,5]]}}}],["way",{"_index":1370,"t":{"150":{"position":[[501,3],[1373,3]]},"215":{"position":[[31,4]]},"257":{"position":[[1794,3],[1926,3]]},"296":{"position":[[66,5]]}}}],["we'll",{"_index":484,"t":{"21":{"position":[[500,5],[635,5]]},"378":{"position":[[342,5]]}}}],["we'r",{"_index":383,"t":{"17":{"position":[[1003,5]]},"21":{"position":[[232,5]]},"60":{"position":[[92,5]]},"64":{"position":[[0,5],[65,5],[199,5]]},"222":{"position":[[393,5]]},"327":{"position":[[0,5]]},"435":{"position":[[8,5],[103,5],[309,5]]}}}],["we'v",{"_index":331,"t":{"17":{"position":[[25,5]]},"25":{"position":[[9,5],[831,5]]},"27":{"position":[[2156,5]]},"222":{"position":[[0,5]]},"439":{"position":[[91,5],[324,5]]}}}],["wealth",{"_index":1449,"t":{"150":{"position":[[3030,6]]}}}],["weasyprint",{"_index":1974,"t":{"323":{"position":[[33,10]]}}}],["web",{"_index":344,"t":{"17":{"position":[[224,3],[300,3],[526,3],[1145,3]]},"19":{"position":[[13,3],[609,4],[633,3],[1046,3],[1450,3],[1621,3],[1930,3]]},"21":{"position":[[299,3],[460,3],[737,3]]},"27":{"position":[[1968,4],[2444,3]]},"29":{"position":[[264,3]]},"48":{"position":[[2247,3],[2524,6],[4205,3],[7506,6]]},"58":{"position":[[171,3]]},"70":{"position":[[99,3]]},"89":{"position":[[548,3]]},"97":{"position":[[942,5]]},"99":{"position":[[131,3],[324,3]]},"119":{"position":[[27,3]]},"136":{"position":[[84,3]]},"140":{"position":[[447,3],[886,3]]},"170":{"position":[[333,3]]},"184":{"position":[[190,3]]},"204":{"position":[[420,3],[450,3]]},"211":{"position":[[151,3],[246,3],[285,3],[368,3]]},"239":{"position":[[1217,3]]},"317":{"position":[[1682,6]]},"329":{"position":[[161,3]]},"374":{"position":[[69,3],[203,3]]},"378":{"position":[[184,3]]},"380":{"position":[[373,3]]},"382":{"position":[[981,3]]},"388":{"position":[[519,3]]},"423":{"position":[[637,3],[1227,6]]},"439":{"position":[[520,3]]}}}],["webdriv",{"_index":1907,"t":{"307":{"position":[[534,9]]},"309":{"position":[[148,9],[280,9]]},"313":{"position":[[56,9]]}}}],["webhook",{"_index":1923,"t":{"317":{"position":[[394,7]]}}}],["webhook');async",{"_index":1971,"t":{"317":{"position":[[2290,15]]}}}],["webhook.j",{"_index":1922,"t":{"317":{"position":[[349,10],[550,10]]}}}],["websit",{"_index":1178,"t":{"93":{"position":[[319,8],[477,8]]},"305":{"position":[[317,8]]},"307":{"position":[[413,8]]},"311":{"position":[[39,8],[185,8]]},"313":{"position":[[342,8],[563,8]]},"329":{"position":[[225,7],[732,7]]}}}],["websocket",{"_index":690,"t":{"38":{"position":[[302,10],[313,9]]},"42":{"position":[[233,11],[814,11]]},"144":{"position":[[59,9]]},"257":{"position":[[964,9]]},"317":{"position":[[172,9],[305,9],[567,9],[1897,9],[2382,13]]}}}],["websocket(ws_uri",{"_index":1934,"t":{"317":{"position":[[771,18]]}}}],["websocket.accept",{"_index":727,"t":{"42":{"position":[[832,18]]}}}],["websocket.open",{"_index":1956,"t":{"317":{"position":[[1569,15],[1945,15]]}}}],["websocket.send_text(report",{"_index":728,"t":{"42":{"position":[[899,27]]}}}],["websocket=custom_logs_handl",{"_index":1810,"t":{"257":{"position":[[1147,29]]}}}],["websocket=websocket",{"_index":721,"t":{"42":{"position":[[526,20]]}}}],["websocket_endpoint(websocket",{"_index":726,"t":{"42":{"position":[[784,29]]}}}],["websocketfrom",{"_index":705,"t":{"42":{"position":[[99,13]]}}}],["webui",{"_index":2145,"t":{"378":{"position":[[23,6],[60,5]]},"384":{"position":[[185,5]]}}}],["week",{"_index":21,"t":{"3":{"position":[[214,6]]},"204":{"position":[[81,5]]}}}],["welcom",{"_index":739,"t":{"46":{"position":[[21,7]]}}}],["well",{"_index":27,"t":{"3":{"position":[[277,4]]},"11":{"position":[[678,4]]},"19":{"position":[[1319,4]]},"44":{"position":[[74,4],[386,4]]},"105":{"position":[[160,5]]},"150":{"position":[[1552,4]]},"234":{"position":[[56,5]]},"305":{"position":[[293,4]]},"307":{"position":[[378,4]]},"425":{"position":[[130,4]]},"427":{"position":[[156,5]]}}}],["we’d",{"_index":1073,"t":{"85":{"position":[[2044,4]]}}}],["we’ll",{"_index":812,"t":{"48":{"position":[[2783,5],[3026,5]]},"85":{"position":[[468,5]]},"87":{"position":[[849,5],[1215,5]]}}}],["we’r",{"_index":847,"t":{"48":{"position":[[4121,5]]}}}],["we’v",{"_index":278,"t":{"13":{"position":[[9,5]]},"85":{"position":[[1894,5],[1960,5]]},"87":{"position":[[712,5],[2093,5]]}}}],["whatev",{"_index":1773,"t":{"253":{"position":[[364,8]]},"257":{"position":[[1992,8]]}}}],["wherea",{"_index":1620,"t":{"206":{"position":[[58,7]]}}}],["whole",{"_index":1161,"t":{"89":{"position":[[839,5],[1116,5]]},"150":{"position":[[1394,5]]}}}],["whowould",{"_index":1425,"t":{"150":{"position":[[2137,8]]}}}],["wide",{"_index":1588,"t":{"182":{"position":[[509,4],[991,4]]},"321":{"position":[[84,6]]},"390":{"position":[[200,6]]}}}],["width=80)if",{"_index":2315,"t":{"433":{"position":[[1591,11]]}}}],["win",{"_index":1836,"t":{"263":{"position":[[606,3]]},"275":{"position":[[964,3]]}}}],["window",{"_index":1520,"t":{"162":{"position":[[2282,6],[2385,6],[3986,6],[4071,6]]}}}],["wish",{"_index":2000,"t":{"329":{"position":[[325,4]]}}}],["with:sudo",{"_index":1751,"t":{"239":{"position":[[3146,9]]}}}],["within",{"_index":88,"t":{"5":{"position":[[142,6]]},"15":{"position":[[398,6],[703,6]]},"17":{"position":[[330,6]]},"87":{"position":[[286,6]]},"107":{"position":[[138,6]]},"182":{"position":[[759,6]]},"200":{"position":[[288,6]]},"249":{"position":[[85,6]]},"378":{"position":[[360,6]]},"429":{"position":[[138,6]]}}}],["without",{"_index":91,"t":{"5":{"position":[[169,7]]},"107":{"position":[[298,7]]},"150":{"position":[[2559,7]]},"200":{"position":[[386,7]]},"239":{"position":[[1060,7]]},"439":{"position":[[219,7]]}}}],["won’t",{"_index":1168,"t":{"89":{"position":[[1199,5]]}}}],["word",{"_index":186,"t":{"7":{"position":[[1126,6]]},"11":{"position":[[774,5]]},"15":{"position":[[671,5]]},"68":{"position":[[182,4]]},"97":{"position":[[202,4]]},"150":{"position":[[544,4]]},"204":{"position":[[390,7]]},"211":{"position":[[122,6],[415,4]]}}}],["work",{"_index":71,"t":{"3":{"position":[[961,4]]},"9":{"position":[[38,5],[400,5],[491,4]]},"21":{"position":[[171,5]]},"25":{"position":[[30,4],[103,5]]},"27":{"position":[[64,6]]},"48":{"position":[[5237,7]]},"64":{"position":[[17,7],[81,7],[210,7]]},"75":{"position":[[611,5]]},"79":{"position":[[416,4]]},"87":{"position":[[49,7],[281,4],[373,4],[2136,4]]},"99":{"position":[[381,5]]},"107":{"position":[[277,5]]},"150":{"position":[[1160,4],[1400,7],[1441,7],[1489,4],[1601,7],[1832,4],[1901,4],[2541,7],[2628,4]]},"182":{"position":[[1062,7]]},"200":{"position":[[365,5]]},"209":{"position":[[34,5]]},"222":{"position":[[399,7]]},"234":{"position":[[50,5],[84,4]]},"305":{"position":[[287,5]]},"307":{"position":[[372,5]]},"313":{"position":[[313,5]]},"325":{"position":[[208,5]]},"329":{"position":[[761,5]]},"355":{"position":[[41,5]]},"394":{"position":[[28,4]]},"412":{"position":[[234,4]]},"423":{"position":[[442,4]]},"435":{"position":[[25,7],[114,7]]}}}],["workaround",{"_index":1987,"t":{"325":{"position":[[147,10]]}}}],["workflow",{"_index":973,"t":{"75":{"position":[[356,9],[441,9],[695,9]]},"85":{"position":[[2341,8],[2968,8]]},"87":{"position":[[1366,8]]},"215":{"position":[[161,10]]},"218":{"position":[[203,9]]}}}],["workflow.add_conditional_edges('review",{"_index":1129,"t":{"87":{"position":[[1747,42]]}}}],["workflow.add_edge('brows",{"_index":1093,"t":{"85":{"position":[[2694,28]]}}}],["workflow.add_edge('plann",{"_index":1095,"t":{"85":{"position":[[2734,28]]}}}],["workflow.add_edge('publish",{"_index":1099,"t":{"85":{"position":[[2925,30]]}}}],["workflow.add_edge('research",{"_index":1096,"t":{"85":{"position":[[2777,31]]},"87":{"position":[[1662,31]]}}}],["workflow.add_edge('revis",{"_index":1128,"t":{"87":{"position":[[1706,28]]}}}],["workflow.add_edge('writ",{"_index":1097,"t":{"85":{"position":[[2819,27]]}}}],["workflow.add_node(\"brows",{"_index":1083,"t":{"85":{"position":[[2405,28]]}}}],["workflow.add_node(\"plann",{"_index":1085,"t":{"85":{"position":[[2471,28]]}}}],["workflow.add_node(\"publish",{"_index":1091,"t":{"85":{"position":[[2642,30]]}}}],["workflow.add_node(\"research",{"_index":1087,"t":{"85":{"position":[[2528,31]]},"87":{"position":[[1400,31]]}}}],["workflow.add_node(\"review",{"_index":1123,"t":{"87":{"position":[[1467,29]]}}}],["workflow.add_node(\"revis",{"_index":1125,"t":{"87":{"position":[[1517,28]]}}}],["workflow.add_node(\"writ",{"_index":1089,"t":{"85":{"position":[[2596,27]]}}}],["workflow.set_entry_point(\"brows",{"_index":1098,"t":{"85":{"position":[[2889,35]]}}}],["workflow.set_entry_point(\"research",{"_index":1127,"t":{"87":{"position":[[1623,38]]}}}],["world",{"_index":72,"t":{"3":{"position":[[975,6]]},"17":{"position":[[1136,6]]},"89":{"position":[[1126,5]]}}}],["worth",{"_index":470,"t":{"21":{"position":[[38,5]]},"150":{"position":[[1823,5],[2482,5],[2633,5]]}}}],["write",{"_index":243,"t":{"11":{"position":[[108,5],[394,5],[821,5],[894,5]]},"40":{"position":[[274,6]]},"52":{"position":[[444,5]]},"81":{"position":[[615,7]]},"83":{"position":[[146,7],[808,6],[1178,6]]},"85":{"position":[[1795,5]]},"150":{"position":[[3313,5]]},"152":{"position":[[848,5]]},"162":{"position":[[2900,5],[2990,7],[3138,7],[4168,7]]},"257":{"position":[[1281,5]]},"347":{"position":[[287,7]]},"414":{"position":[[669,7]]},"416":{"position":[[121,7]]},"419":{"position":[[380,6],[600,6]]}}}],["writer",{"_index":1018,"t":{"81":{"position":[[576,6]]},"83":{"position":[[1156,6]]},"85":{"position":[[2809,9]]},"414":{"position":[[630,6]]},"419":{"position":[[578,6]]}}}],["writer_ag",{"_index":1078,"t":{"85":{"position":[[2207,12]]}}}],["writer_agent.run",{"_index":1090,"t":{"85":{"position":[[2624,17]]}}}],["writerag",{"_index":1079,"t":{"85":{"position":[[2222,13]]}}}],["writing_conclus",{"_index":1534,"t":{"162":{"position":[[4117,19]]}}}],["writing_introduct",{"_index":1525,"t":{"162":{"position":[[2843,21]]}}}],["writing_report",{"_index":1531,"t":{"162":{"position":[[3649,15]]}}}],["written",{"_index":681,"t":{"35":{"position":[[218,7]]},"40":{"position":[[238,7]]},"87":{"position":[[2617,7],[2819,7]]},"162":{"position":[[3548,7],[4265,7],[4341,7],[4408,7]]},"298":{"position":[[157,7]]},"423":{"position":[[537,7],[1351,7],[1395,7]]}}}],["written_contents=some_written_cont",{"_index":1892,"t":{"298":{"position":[[372,39]]}}}],["ws",{"_index":1355,"t":{"146":{"position":[[134,2]]}}}],["ws://${host}/w",{"_index":1933,"t":{"317":{"position":[[739,18]]}}}],["ws_uri",{"_index":1932,"t":{"317":{"position":[[730,6]]}}}],["ws|upload|files|outputs|getconfig|setconfig",{"_index":1730,"t":{"239":{"position":[[1759,47],[2297,47]]}}}],["x",{"_index":988,"t":{"75":{"position":[[903,1]]},"87":{"position":[[3302,1]]},"222":{"position":[[523,1]]},"275":{"position":[[892,1]]}}}],["y",{"_index":1672,"t":{"239":{"position":[[114,4],[416,4],[936,4],[1270,4]]}}}],["ye",{"_index":1649,"t":{"224":{"position":[[150,3]]}}}],["year",{"_index":330,"t":{"17":{"position":[[18,6]]},"75":{"position":[[19,4],[487,4]]},"150":{"position":[[533,6],[1478,6],[1754,5],[1841,4],[2498,4]]}}}],["year..........\"\"\"docu",{"_index":1440,"t":{"150":{"position":[[2658,25]]}}}],["years.instead",{"_index":1401,"t":{"150":{"position":[[1424,13]]}}}],["you'll",{"_index":387,"t":{"17":{"position":[[1061,6]]},"27":{"position":[[339,6]]},"309":{"position":[[51,6]]},"378":{"position":[[30,6]]}}}],["you'r",{"_index":741,"t":{"46":{"position":[[77,6],[179,6]]},"56":{"position":[[26,6],[48,6],[179,6]]},"64":{"position":[[349,6]]},"68":{"position":[[337,6],[463,6]]},"146":{"position":[[3,6]]},"150":{"position":[[1669,6],[2404,6]]},"228":{"position":[[61,6]]},"239":{"position":[[1992,6]]},"255":{"position":[[17,6]]},"313":{"position":[[572,6]]}}}],["you'v",{"_index":1917,"t":{"313":{"position":[[171,6]]},"329":{"position":[[402,6]]},"355":{"position":[[86,6]]}}}],["your_nam",{"_index":1573,"t":{"180":{"position":[[155,12]]}}}],["your_openai_api_key_here'os.environ['tavily_api_key",{"_index":1311,"t":{"125":{"position":[[241,54]]}}}],["your_tavily_api_key_her",{"_index":1312,"t":{"125":{"position":[[298,26]]}}}],["you’ll",{"_index":1105,"t":{"85":{"position":[[3325,6]]},"87":{"position":[[2106,6]]}}}],["you’v",{"_index":1104,"t":{"85":{"position":[[3267,6]]}}}],["yyyi",{"_index":1484,"t":{"160":{"position":[[42,4]]}}}],["zero",{"_index":970,"t":{"75":{"position":[[248,4]]}}}]],"pipeline":["stemmer"]}}] \ No newline at end of file diff --git a/search.html b/search.html index e2ae7c45e..ac3469f64 100644 --- a/search.html +++ b/search.html @@ -7,13 +7,13 @@ <link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="GPT Researcher RSS Feed"> <link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="GPT Researcher Atom Feed"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"><title data-react-helmet="true">Search the documentation | GPT Researcher</title><meta data-react-helmet="true" property="og:title" content="Search the documentation | GPT Researcher"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:url" content="https://docs.gptr.dev/search"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><meta data-react-helmet="true" property="robots" content="noindex, follow"><link data-react-helmet="true" rel="shortcut icon" href="/img/gptr-logo.png"><link data-react-helmet="true" rel="canonical" href="https://docs.gptr.dev/search"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/search" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://docs.gptr.dev/search" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.ec55c1be.css"> -<link rel="preload" href="/assets/js/runtime~main.4ee0cc3b.js" as="script"> -<link rel="preload" href="/assets/js/main.6953f0b6.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.8e06e228.js" as="script"> +<link rel="preload" href="/assets/js/main.b373ac20.js" as="script"> </head> <body> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div><a href="#" class="skipToContent_OuoZ">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--light_4Vu1"><img src="/img/gptr-logo.png" alt="GPT Researcher" class="themedImage_TMUO themedImage--dark_uzRr"></div><b class="navbar__title">GPT Researcher</b></a><a class="navbar__item navbar__link" href="/docs/welcome">Docs</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a class="navbar__item navbar__link" href="/docs/faq">FAQ</a><a href="mailto:assaf.elovic@gmail.com" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/assafelovic/gpt-researcher" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a><div class="toggle_iYfV toggle_2i4l toggleDisabled_xj38"><div class="toggleTrack_t-f2" role="button" tabindex="-1"><div class="toggleTrackCheck_mk7D"><span class="toggleIcon_pHJ9">🌜</span></div><div class="toggleTrackX_dm8H"><span class="toggleIcon_pHJ9">🌞</span></div><div class="toggleTrackThumb_W6To"></div></div><input type="checkbox" class="toggleScreenReader_h9qa" aria-label="Switch between dark and light mode"></div><div class="navbar__search searchBarContainer_I7kZ"><input placeholder="Search" aria-label="Search" class="navbar__search-input"><div class="loadingRing_Zg7X searchBarLoadingRing_J5Ez"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_CDc6"><kbd class="searchHint_2RRg">ctrl</kbd><kbd class="searchHint_2RRg">K</kbd></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><div class="container margin-vert--lg"><h1>Search the documentation</h1><input type="search" name="q" class="searchQueryInput_5r-w" aria-label="Search" autocomplete="off" autofocus=""><section></section></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://discord.gg/8YkBcCED5y" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/assaf_elovic" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="https://www.linkedin.com/in/assafe/" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>LinkedIn<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">Company</div><ul class="footer__items"><li class="footer__item"><a href="https://gptr.dev" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Homepage<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li><li class="footer__item"><a href="mailto:assafelovic@gmail.com" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Contact<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_wgqa"><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"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 GPT Researcher.</div></div></div></footer></div> -<script src="/assets/js/runtime~main.4ee0cc3b.js"></script> -<script src="/assets/js/main.6953f0b6.js"></script> +<script src="/assets/js/runtime~main.8e06e228.js"></script> +<script src="/assets/js/main.b373ac20.js"></script> </body> </html> \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 5ca15d8ff..5296fd274 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://docs.gptr.dev/blog</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/archive</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/building-gpt-researcher</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/building-openai-assistant</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/gptr-hybrid</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/gptr-langgraph</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/assistant-api</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/autonomous-agent</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/github</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/gpt-researcher</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/hybrid-research</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/langchain</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/langgraph</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/multi-skills</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/openai</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/opensource</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/search-api</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/tavily</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/search</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/contribute</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/examples/detailed_report</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/examples/examples</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/examples/hybrid_research</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/faq</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/filtering-by-domain</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/local-docs</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/vector-stores</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/frontend/frontend</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/frontend/playing-with-webhooks</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/cli</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/how-to-choose</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/introduction</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/automated-tests</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/config</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/example</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/handling-logs-as-they-stream</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/querying-the-backend</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/scraping</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/troubleshooting</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/llms/llms</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/llms/running-with-ollama</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/llms/testing-your-llm</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/search-engines/test-your-retriever</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/config/config</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/config/singleton</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/processing/html</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/processing/text</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/roadmap</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/welcome</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://docs.gptr.dev/blog</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/archive</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/building-gpt-researcher</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/building-openai-assistant</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/gptr-hybrid</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/gptr-langgraph</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/assistant-api</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/autonomous-agent</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/github</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/gpt-researcher</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/hybrid-research</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/langchain</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/langgraph</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/multi-skills</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/openai</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/opensource</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/search-api</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/blog/tags/tavily</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/search</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/contribute</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/examples/detailed_report</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/examples/examples</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/examples/hybrid_research</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/faq</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/filtering-by-domain</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/local-docs</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/tailored-research</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/context/vector-stores</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/frontend/frontend</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/frontend/logs</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/frontend/playing-with-webhooks</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/cli</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/getting-started-with-docker</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/how-to-choose</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/introduction</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/getting-started/linux-deployment</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/automated-tests</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/config</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/example</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/handling-logs-as-they-stream</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/pip-package</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/querying-the-backend</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/scraping</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/gptr/troubleshooting</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/llms/llms</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/llms/running-with-ollama</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/llms/testing-your-llm</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/multi_agents/langgraph</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/search-engines/retrievers</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/gpt-researcher/search-engines/test-your-retriever</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/config/config</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/config/singleton</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/processing/html</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/reference/processing/text</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/roadmap</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/docs/welcome</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://docs.gptr.dev/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset> \ No newline at end of file