1"use strict";(self.webpackChunkmycoder_docs=self.webpackChunkmycoder_docs||[]).push([[989],{4432:(e,l,n)=>{n.r(l),n.d(l,{assets:()=>t,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"providers/ollama","title":"Ollama","description":"Ollama is a platform for running open-source large language models locally. It allows you to run various models on your own hardware, providing privacy and control over your AI interactions.","source":"@site/docs/providers/ollama.md","sourceDirName":"providers","slug":"/providers/ollama","permalink":"/docs/providers/ollama","draft":false,"unlisted":false,"editUrl":"https://github.com/drivecore/mycoder/tree/main/packages/docs/docs/providers/ollama.md","tags":[],"version":"current","sidebarPosition":4,"frontMatter":{"sidebar_position":4},"sidebar":"tutorialSidebar","previous":{"title":"OpenAI","permalink":"/docs/providers/openai"},"next":{"title":"xAI (Grok)","permalink":"/docs/providers/xai"}}');var o=n(612),i=n(4709);const a={sidebar_position:4},s="Ollama",t={},d=[{value:"Setup",id:"setup",level:2},{value:"Installing Ollama",id:"installing-ollama",level:3},{value:"Pulling a Model",id:"pulling-a-model",level:3},{value:"Environment Variables",id:"environment-variables",level:3},{value:"Configuration",id:"configuration",level:3},{value:"Tool Calling Support",id:"tool-calling-support",level:2},{value:"Hardware Requirements",id:"hardware-requirements",level:2},{value:"Best Practices",id:"best-practices",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function c(e){const l={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.header,{children:(0,o.jsx)(l.h1,{id:"ollama",children:"Ollama"})}),"\n",(0,o.jsxs)(l.p,{children:[(0,o.jsx)(l.a,{href:"https://ollama.ai/",children:"Ollama"})," is a platform for running open-source large language models locally. It allows you to run various models on your own hardware, providing privacy and control over your AI interactions."]}),"\n",(0,o.jsx)(l.h2,{id:"setup",children:"Setup"}),"\n",(0,o.jsx)(l.p,{children:"To use Ollama with MyCoder:"}),"\n",(0,o.jsxs)(l.ol,{children:["\n",(0,o.jsxs)(l.li,{children:["Install Ollama from ",(0,o.jsx)(l.a,{href:"https://ollama.ai/",children:"ollama.ai"})]}),"\n",(0,o.jsx)(l.li,{children:"Start the Ollama service"}),"\n",(0,o.jsx)(l.li,{children:"Pull a model that supports tool calling"}),"\n",(0,o.jsx)(l.li,{children:"Configure MyCoder to use Ollama"}),"\n"]}),"\n",(0,o.jsx)(l.h3,{id:"installing-ollama",children:"Installing Ollama"}),"\n",(0,o.jsxs)(l.p,{children:["Follow the installation instructions on the ",(0,o.jsx)(l.a,{href:"https://ollama.ai/",children:"Ollama website"})," for your operating system."]}),"\n",(0,o.jsx)(l.p,{children:"For macOS:"}),"\n",(0,o.jsx)(l.pre,{children:(0,o.jsx)(l.code,{className:"language-bash",children:"curl -fsSL https://ollama.ai/install.sh | sh\n"})}),"\n",(0,o.jsx)(l.p,{children:"For Linux:"}),"\n",(0,o.jsx)(l.pre,{children:(0,o.jsx)(l.code,{className:"language-bash",children:"curl -fsSL https://ollama.ai/install.sh | sh\n"})}),"\n",(0,o.jsx)(l.p,{children:"For Windows, download the installer from the Ollama website."}),"\n",(0,o.jsx)(l.h3,{id:"pulling-a-model",children:"Pulling a Model"}),"\n",(0,o.jsxs)(l.p,{children:["After installing Ollama, you need to pull a model that supports tool calling. ",(0,o.jsx)(l.strong,{children:"Important: Most Ollama models do not support tool calling"}),", which is required for MyCoder."]}),"\n",(0,o.jsx)(l.p,{children:"A recommended model that supports tool calling is:"}),"\n",(0,o.jsx)(l.pre,{children:(0,o.jsx)(l.code,{className:"language-bash",children:"ollama pull medragondot/Sky-T1-32B-Preview:latest\n"})}),"\n",(0,o.jsx)(l.h3,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,o.jsxs)(l.p,{children:["You can set the Ollama base URL as an environment variable (defaults to ",(0,o.jsx)(l.a,{href:"http://localhost:11434",children:"http://localhost:11434"})," if not set):"]}),"\n",(0,o.jsx)(l.pre,{children:(0,o.jsx)(l.code,{className:"language-bash",children:"export OLLAMA_BASE_URL=http://localhost:11434\n"})}),"\n",(0,o.jsx)(l.h3,{id:"configuration",children:"Configuration"}),"\n",(0,o.jsxs)(l.p,{children:["Configure MyCoder to use Ollama in your ",(0,o.jsx)(l.code,{children:"mycoder.config.js"})," file:"]}),"\n",(0,o.jsx)(l.pre,{children:(0,o.jsx)(l.code,{className:"language-javascript",children:"export default {\n // Provider selection\n provider: 'ollama',\n model: 'medragondot/Sky-T1-32B-Preview:latest',\n\n // Optional: Custom base URL (defaults to http://localhost:11434)\n // baseUrl: 'http://localhost:11434',\n\n // Other MyCoder settings\n maxTokens: 4096,\n temperature: 0.7,\n // ...\n};\n"})}),"\n",(0,o.jsx)(l.h2,{id:"tool-calling-support",children:"Tool Calling Support"}),"\n",(0,o.jsxs)(l.p,{children:[(0,o.jsx)(l.strong,{children:"Important"}),": For MyCoder to function properly, the Ollama model must support tool calling (function calling). Most open-source models available through Ollama ",(0,o.jsx)(l.strong,{children:"do not"})," support this feature yet."]}),"\n",(0,o.jsx)(l.p,{children:"Confirmed models with tool calling support:"}),"\n",(0,o.jsxs)(l.ul,{children:["\n",(0,o.jsxs)(l.li,{children:[(0,o.jsx)(l.code,{children:"medragondot/Sky-T1-32B-Preview:latest"})," - Recommended for MyCoder"]}),"\n"]}),"\n",(0,o.jsx)(l.p,{children:"If using other models, verify their tool calling capabilities before attempting to use them with MyCoder."}),"\n",(0,o.jsx)(l.h2,{id:"hardware-requirements",children:"Hardware Requirements"}),"\n",(0,o.jsx)(l.p,{children:"Running large language models locally requires significant hardware resources:"}),"\n",(0,o.jsxs)(l.ul,{children:["\n",(0,o.jsx)(l.li,{children:"Minimum 16GB RAM (32GB+ recommended)"}),"\n",(0,o.jsx)(l.li,{children:"GPU with at least 8GB VRAM for optimal performance"}),"\n",(0,o.jsx)(l.li,{children:"SSD storage for model files (models can be 5-20GB each
1)"}),"\n"]}),"\n",(0,o.jsx)(l.h2,{id:"best-practices",children:"Best Practices"}),"\n",(0,o.jsxs)(l.ul,{children:["\n",(0,o.jsx)(l.li,{children:"Start with smaller models if you have limited hardware"}),"\n",(0,o.jsx)(l.li,{children:"Ensure your model supports tool calling before using with MyCoder"}),"\n",(0,o.jsx)(l.li,{children:"Run on a machine with a dedicated GPU for better performance"}),"\n",(0,o.jsx)(l.li,{children:"Consider using a cloud provider's API for resource-intensive tasks if local hardware is insufficient"}),"\n"]}),"\n",(0,o.jsx)(l.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,o.jsx)(l.p,{children:"If you encounter issues with Ollama:"}),"\n",(0,o.jsxs)(l.ul,{children:["\n",(0,o.jsxs)(l.li,{children:["Verify the Ollama service is running (",(0,o.jsx)(l.code,{children:"ollama serve"}),")"]}),"\n",(0,o.jsx)(l.li,{children:"Check that you've pulled the correct model"}),"\n",(0,o.jsx)(l.li,{children:"Ensure the model supports tool calling"}),"\n",(0,o.jsx)(l.li,{children:"Verify your hardware meets the minimum requirements"}),"\n",(0,o.jsx)(l.li,{children:"Check Ollama logs for specific error messages"}),"\n"]}),"\n",(0,o.jsxs)(l.p,{children:["For more information, visit the ",(0,o.jsx)(l.a,{href:"https://github.com/ollama/ollama/tree/main/docs",children:"Ollama Documentation"}),"."]})]})}function h(e={}){const{wrapper:l}={...(0,i.R)(),...e.components};return l?(0,o.jsx)(l,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},4709:(e,l,n)=>{n.d(l,{R:()=>a,x:()=>s});var r=n(4344);const o={},i=r.createContext(o);function a(e){const l=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(l):{...l,...e}}),[l,e])}function s(e){let l;return l=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(i.Provider,{value:l},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.