Spaces:
Running
Running
| <html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>demo/client-server-chat/test_agent | agent-swarm-kit</title><meta name="description" content="Documentation for agent-swarm-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">agent-swarm-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">agent-swarm-kit</a></li><li><a href="demo_client-server-chat_test_agent.html">demo/client-server-chat/test_agent</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="test_agent" class="tsd-anchor"></a><h1 class="tsd-anchor-link">test_agent<a href="#test_agent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><blockquote> | |
| <p>This agent acts as a pharmaceutical seller, providing consultations about pharma products to users, utilizing the Saiga Yandex GPT model for responses, and calling the add-to-cart tool only when necessary to assist with purchases.</p> | |
| </blockquote> | |
| <p><strong>Completion:</strong> <code>saiga_yandex_gpt_completion</code></p> | |
| <p><img src="../media/agent_schema_test_agent.svg" alt="schema"></p> | |
| <a id="main-prompt" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Main prompt<a href="#main-prompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code><span class="hl-2">You</span><span class="hl-1"> </span><span class="hl-2">are</span><span class="hl-1"> </span><span class="hl-2">the</span><span class="hl-1"> </span><span class="hl-2">pharma</span><span class="hl-1"> </span><span class="hl-2">seller</span><span class="hl-1"> </span><span class="hl-2">agent</span><span class="hl-1">.</span><br/><span class="hl-2">Provide</span><span class="hl-1"> </span><span class="hl-2">me</span><span class="hl-1"> </span><span class="hl-2">the</span><span class="hl-1"> </span><span class="hl-2">consultation</span><span class="hl-1"> </span><span class="hl-2">about</span><span class="hl-1"> </span><span class="hl-2">the</span><span class="hl-1"> </span><span class="hl-2">pharma</span><span class="hl-1"> </span><span class="hl-2">product</span><br/><span class="hl-2">Call</span><span class="hl-1"> </span><span class="hl-2">the</span><span class="hl-1"> </span><span class="hl-2">tools</span><span class="hl-1"> </span><span class="hl-2">only</span><span class="hl-1"> </span><span class="hl-2">when</span><span class="hl-1"> </span><span class="hl-2">nessesary</span><span class="hl-1">, </span><span class="hl-5">if</span><span class="hl-1"> </span><span class="hl-2">not</span><span class="hl-1"> </span><span class="hl-2">required</span><span class="hl-1">, </span><span class="hl-2">just</span><span class="hl-1"> </span><span class="hl-2">speek</span><span class="hl-1"> </span><span class="hl-5">with</span><span class="hl-1"> </span><span class="hl-2">users</span> | |
| </code><button>Copy</button></pre> | |
| <a id="system-prompt" class="tsd-anchor"></a><h2 class="tsd-anchor-link">System prompt<a href="#system-prompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ol> | |
| <li><code>To add the pharma product to the cart call the next tool: add_to_cart_tool</code></li> | |
| </ol> | |
| <a id="depends-on" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Depends on<a href="#depends-on" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="used-tools" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Used tools<a href="#used-tools" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="1-add_to_cart_tool" class="tsd-anchor"></a><h3 class="tsd-anchor-link">1. add_to_cart_tool<a href="#1-add_to_cart_tool" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><a id="name-for-model" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Name for model<a href="#name-for-model" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>add_to_cart_tool</code></p> | |
| <a id="description-for-model" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Description for model<a href="#description-for-model" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>Add the pharma product to cart</code></p> | |
| <a id="parameters-for-model" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Parameters for model<a href="#parameters-for-model" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><blockquote> | |
| <p><strong>1. title</strong></p> | |
| </blockquote> | |
| <p><em>Type:</em> <code>string</code></p> | |
| <p><em>Description:</em> <code>Name of pharma product to be appended to cart</code></p> | |
| <p><em>Required:</em> [ ]</p> | |
| <a id="note-for-developer" class="tsd-anchor"></a><h4 class="tsd-anchor-link">Note for developer<a href="#note-for-developer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><em>This tool enables adding a pharmaceutical product to the cart by taking a product title as input, logging the action for debugging, and notifying the user of successful addition through both tool output and an emitted message.</em></p> | |
| </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#test_agent"><span>test_<wbr/>agent</span></a><ul><li><a href="#main-prompt"><span>Main prompt</span></a></li><li><a href="#system-prompt"><span>System prompt</span></a></li><li><a href="#depends-on"><span>Depends on</span></a></li><li><a href="#used-tools"><span>Used tools</span></a></li><li><ul><li><a href="#1-add_to_cart_tool"><span>1. add_<wbr/>to_<wbr/>cart_<wbr/>tool</span></a></li><li><ul><li><a href="#name-for-model"><span>Name for model</span></a></li><li><a href="#description-for-model"><span>Description for model</span></a></li><li><a href="#parameters-for-model"><span>Parameters for model</span></a></li><li><a href="#note-for-developer"><span>Note for developer</span></a></li></ul></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">agent-swarm-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> | |
| <!-- Yandex.Metrika counter --> | |
| <script type="text/javascript" > | |
| (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; | |
| m[i].l=1*new Date(); | |
| for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }} | |
| k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) | |
| (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); | |
| ym(100273846, "init", { | |
| clickmap:true, | |
| trackLinks:true, | |
| accurateTrackBounce:true, | |
| webvisor:true, | |
| ecommerce:"dataLayer" | |
| }); | |
| </script> | |
| <noscript><div><img src="https://mc.yandex.ru/watch/100273846" style="position:absolute; left:-9999px;" alt="" /></div></noscript> | |
| <!-- /Yandex.Metrika counter --> | |
| <!-- Google tag (gtag.js) --> | |
| <script async src="https://www.googletagmanager.com/gtag/js?id=G-85RYYZDT35"></script> | |
| <script> | |
| window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', 'G-85RYYZDT35'); | |
| </script> | |