{"id":398580,"date":"2024-04-22T08:00:00","date_gmt":"2024-04-22T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/alpaca-bot\/"},"modified":"2024-07-06T10:27:00","modified_gmt":"2024-07-06T10:27:00","slug":"alpaca-bot","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/alpaca-bot\/","title":{"rendered":"Alpaca Bot"},"content":{"rendered":"<p>Easily draft a post or page from any conversation. Dynamically create new content on the fly or with remote resources collected via <code>agents<\/code>. <strong>Alpaca Bot<\/strong> offers a familiar chat interface on both desktop and mobile. You can expect a seamless chat experience on any device!<\/p>\n<p>An <a href=\"https:\/\/github.com\/ollama\/ollama\" rel=\"nofollow ugc\">Ollama<\/a> instance is required. <a href=\"https:\/\/github.com\/ollama\/ollama\" rel=\"nofollow ugc\">Ollama<\/a> makes it incredibly easy to self-host large language models locally or in the cloud.<\/p>\n<h3>Features<\/h3>\n<ul>\n<li>Chose to store conversation history <strong>privately<\/strong> in your <code>wp_<\/code> database or not at all.<\/li>\n<li>Use <code>[alpacabot_agent]<\/code> to execute tasks on your behalf, generate dynamic content and more.<\/li>\n<li>Chat with dozens of pre-trained LLMs or <a href=\"https:\/\/github.com\/ollama\/ollama\/blob\/main\/docs\/api.md#generate-embeddings\" rel=\"nofollow ugc\">train your own<\/a>.<\/li>\n<li>Switch conversational model on the fly.<\/li>\n<li>Create your own custom <a href=\"https:\/\/github.com\/ollama\/ollama\/blob\/main\/docs\/modelfile.md#system\" rel=\"nofollow ugc\">system messages<\/a> for highly predictable or formatted responses.<\/li>\n<\/ul>\n<h3>Usage<\/h3>\n<h4>Text Completion<\/h4>\n<p>You have two options to communicate with your AI models;<\/p>\n<ol>\n<li>Click <strong>Alpaca Bot<\/strong> found in the admin menu, below Dashboard and above Posts.<\/li>\n<li><strong>Use the shortcode<\/strong> <code>[alpacabot]<\/code> to generate a response within any post or page.<\/li>\n<\/ol>\n<h4>Agents<\/h4>\n<p>Use the <code>[alpacabot_agent]<\/code> shortcode to execute tasks on your behalf. Agents are a powerful way to empower your AI models to perform tasks on your behalf.<\/p>\n<p>For example, you can use the <code>[alpacabot_agent]<\/code> shortcode to retrieve content from a remote source. <code>[alpacabot_agent]<\/code>s can interact directly with your models and help summarize a webpage or rewrite content.<\/p>\n<p>Example<\/p>\n<p>Basic webpage summarization:<\/p>\n<pre><code>[alpacabot_agent name=summarize model=tinyllama url=https:\/\/example.com\/]\n<\/code><\/pre>\n<h3>Shortcodes<\/h3>\n<h4><code>[alpacabot]<\/code> \u2013 Chat with Alpaca Bot<\/h4>\n<p><em>Chat with Alpaca Bot from any post or page.<\/em><\/p>\n<p>Attributes<\/p>\n<ul>\n<li><code>model<\/code> \u2013 The model to use for the text generation. <em>(optional)<\/em><\/li>\n<li><code>system<\/code> \u2013 Specifies the <a href=\"https:\/\/github.com\/ollama\/ollama\/blob\/main\/docs\/modelfile.md#system\" rel=\"nofollow ugc\">system message<\/a> that will be set in the template. <em>(optional)<\/em><\/li>\n<\/ul>\n<h4><code>[alpacabot_agent]<\/code> \u2013 Execute tasks on your behalf<\/h4>\n<p><em>Execute tasks via Agents.<\/em><\/p>\n<p>Attributes<\/p>\n<p>The following are core attributes that are supported by all agents.<\/p>\n<ul>\n<li><code>name<\/code> \u2013 The agent to execute.<\/li>\n<\/ul>\n<p>Agent\u2019s communicating with <a href=\"https:\/github.com\/ollama\/ollama\" rel=\"nofollow ugc\">Ollama<\/a> support <code>[alpacabot]<\/code> attributes.<\/p>\n<h4>Caching<\/h4>\n<p>Requests can be cached by setting the <code>cache<\/code> attribute. <code>cache<\/code> supports short and long term options.<\/p>\n<p>By default responses are cached to the current post or page.<\/p>\n<p>Transient<\/p>\n<p>Numeric values are treated as seconds and will cache the response for the specified duration.<\/p>\n<ul>\n<li><code>cache=60<\/code> \u2013 Cache the response for 60 seconds.<\/li>\n<li><code>cache=3600<\/code> \u2013 Cache the response for 1 hour.<\/li>\n<\/ul>\n<p>Post Meta<\/p>\n<p>This is useful for caching responses permanently and associating them with a specific post or page.<\/p>\n<ul>\n<li><code>cache=postmeta<\/code> \u2013 Cache to current post or page.<\/li>\n<\/ul>\n<p>Option<\/p>\n<p>Use WordPress option storage to cache permanently but not associated with a specific post or page.<\/p>\n<p>This can be useful for sharing responses across multiple pages.<\/p>\n<ul>\n<li><code>cache=option<\/code> \u2013 Cache to WordPress options.<\/li>\n<\/ul>\n<p>Disable<\/p>\n<p>The following values can disable caching.<\/p>\n<ul>\n<li><code>cache=0<\/code> \u2013 Disable caching.<\/li>\n<li><code>cache=disable<\/code> \u2013 Disable caching.<\/li>\n<li><code>cache=false<\/code> \u2013 Disable caching.<\/li>\n<\/ul>\n<h3>Core Agents<\/h3>\n<p>The following are core agents that are provided by the <strong>Alpaca Bot<\/strong> plugin.<\/p>\n<h4><code>get<\/code><\/h4>\n<p>Retrieve content from a remote source.<\/p>\n<p>Attributes<\/p>\n<ul>\n<li><code>url<\/code> \u2013 The URL to retrieve content from.<\/li>\n<\/ul>\n<h4><code>summarize<\/code><\/h4>\n<p>Summarize remote content.<\/p>\n<p>Attributes<\/p>\n<ul>\n<li><code>url<\/code> \u2013 The URL to summarize.<\/li>\n<li><code>length<\/code> \u2013 Describe the length of the summary.<\/li>\n<li><code>content<\/code> \u2013 The type of content we want to summarize.<\/li>\n<\/ul>\n<h3>Support<\/h3>\n<p>If you need help or have questions, please join our <a href=\"https:\/\/discord.gg\/vWQTHphkVt\" rel=\"nofollow ugc\">Discord<\/a> community.<\/p>\n<p>Premium support and video calls are available to our <a href=\"https:\/\/www.patreon.com\/carmelosantana\" rel=\"nofollow ugc\">Patreon<\/a> subscribers. We can help setup your <a href=\"https:\/\/github.com\/ollama\/ollama\" rel=\"nofollow ugc\">Ollama<\/a> instance, troubleshoot issues, demonstrate shortcode functionality and more.<\/p>\n<p>Patreon\u2019s also receive;<\/p>\n<ul>\n<li>Access to our hosted <a href=\"https:\/github.com\/ollama\/ollama\" rel=\"nofollow ugc\">Ollama<\/a> instances.<\/li>\n<li>Priority feature requests.<\/li>\n<li>Early access to new features and releases.<\/li>\n<li>Video and community support.<\/li>\n<\/ul>\n<p>Please consider <a href=\"https:\/\/www.patreon.com\/carmelosantana\" rel=\"nofollow ugc\">becoming a Patreon<\/a> today!<\/p>\n<h3>Made Possible By<\/h3>\n<ul>\n<li>Emma Delaney\u2019s <a href=\"https:\/\/emma-delaney.medium.com\/how-to-create-your-own-chatgpt-in-html-css-and-javascript-78e32b70b4be\" rel=\"nofollow ugc\">How to Create Your Own ChatGPT in HTML CSS and JavaScript<\/a><\/li>\n<li>Google <a href=\"https:\/\/material.io\/resources\/icons\/?style=baseline\" rel=\"nofollow ugc\">Material Design Icons<\/a> \u2013 Apache-2.0 license<\/li>\n<li><a href=\"https:\/\/github.com\/chinchang\/hint.css\" rel=\"nofollow ugc\">Hint.css<\/a> A CSS only tooltip library \u2013 MIT license<\/li>\n<li><a href=\"https:\/\/github.com\/DavidBelicza\/PHP-Science-TextRank\" rel=\"nofollow ugc\">TextRank<\/a> Automatic text summarization for PHP \u2013 MIT license<\/li>\n<li><a href=\"https:\/\/github.com\/ollama\/ollama\" rel=\"nofollow ugc\">Ollama<\/a> Get up and running with large language models locally \u2013 MIT license<\/li>\n<li><a href=\"https:\/\/github.com\/erusev\/parsedown\" rel=\"nofollow ugc\">Parsedown<\/a> A better Markdown parser \u2013 MIT license<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A privately hosted WordPress AI chatbot. Chat with your own hosted LLMs and automate workflows with agents.<\/p>\n","protected":false},"author":65,"featured_media":398581,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Alpaca Bot - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"A privately hosted WordPress AI chatbot. Chat with your own hosted LLMs and automate workflows with agents."},"footnotes":""},"categories":[1],"tags":[1566,1567,18924,54650,54651],"class_list":["post-398580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-ai","tag-chatbot","tag-embedding","tag-large-language-model","tag-ollama"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/398580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=398580"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/398580\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/398581"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=398580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=398580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=398580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}