<> = ollama = * https://ollama.com/ * https://ollama.com/search * https://github.com/ollama/ollama {{{#!highlight sh cd ~ curl -fsSL https://ollama.com/install.sh | sh # >>> The Ollama API is now available at 127.0.0.1:11434. curl localhost:11434 # Ollama is running ollama run llama3.2:1b ollama show llama3.2:1b ollama list ollama ps ollama serve # start server ollama stop llama3.2:1b ollama rm llama3.2:1b }}} == Setup proxy == {{{#!highlight sh sudo nano /etc/systemd/system/ollama.service }}} {{{#!highlight sh [Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/usr/local/bin/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="PATH=/home/vagrant/.dotnet/tools:/home/vagrant/dotnetcore9:/usr/local/bin:/usr/bin:/bin:/home/vagrant/jdk-17.0.7+7/bin/:/home/vagrant/gradle-8.1/bin/" Environment="HTTPS_PROXY=http://192.168.0.123:3128/" Environment="HTTP_PROXY=http://192.168.0.123:3128/" [Install] WantedBy=default.target }}} {{{#!highlight sh sudo systemctl daemon-reload sudo systemctl restart ollama systemctl show ollama ollama run llama3.2:1b }}} == Chatbots - LLM - AI accessible via browser == * Gemini prompt - https://gemini.google.com/ * Copilot prompt - https://copilot.microsoft.com/ * Grok prompt - https://grok.com/ * ChatGPT prompt - https://chatgpt.com/ == Stuff == Does a local run of ollama spends tokens ? No LLMs might generate different versions because they are probabilistic. They predict the next word/token based on probabilities. The reason for results variation is called temperature. High temperature [0.8 - 1.0] the model takes more risks that leads to creative code. Low temperature [0.0 - 0.2] becomes very focused and predictable. At temperature 0 (zero) it will choose the most likely word/token. Seed value, in ollama, if not specified a random one is generated for each request. If you want the same code every time set the same seed and temperature 0. RAG, retrieved augmented generation. Create a domain-specialized assistant. Tools like copilot chat looks at the .md files and source code and perform a RAG workflow. RAG. * R retrieval, the tool searches for the relevant code or markdown text * A augmentation, takes those snippets and pastes them into the prompt and send it to the model * G the model reads the code/docs and generates an answer based only on the specific context A specific project is the domain. Project memory/domain (markdown + code) Local LLM runner (ollama) VS code extension continue RAM local models * 8GB RAM -> llama3:8b * 16GB - 32GB -> codestral Continue talks with ollama via a local REST API A chatbot just talks. An agent can do things. Continue is agentic. It has perception (context awareness). It sees the prompt, sees open files, the git git history and terminal errors. Tool use: can perform actions on my behalf. Reasoning: if i prompt "fix this error", looks at the stack trace, reasons which file is causing the bug and proposes a fix. Continue is a "human in the loop" agent, asks my command/prompt, performs complex task, ask for approval. Ollama is the brain. Continue (private coding agent) is the agentic body lives inside vscode . === Private JARVIS-style assistant === Openclaw + ollama {{{#!highlight sh ollama run llama3:8b # http://localhost:11434 cd ~ git clone https://github.com/openclaw/OpenClaw.git cd OpenClaw npm i # .env file AI_PROVIDER=ollama OLLAMA_BASE_URL=http://localhost:11434 MODEL=llama3:8b API_KEY=ollama OPENCLAW_WORKSPACE_DIR=/tmp # launch openclaw npm start # http://localhost:3000 }}} TextToSPeech (TTS) or SpeechToText (STT) * whisper (STT) * piper (TTS) Private alexa * ears, whisper * brain, ollama * hand, openclaw * tools, MCP servers * mouth, piper * wake word, openwakeword or porcupine MCP Servers act as the workshop full of tools (the hammers, wrenches, and drills). RAG, looks up information in a book Skill, a specific task to be done with that info A skill is hybrid, it's part human language (instructions) and part code (logic and parameters). A skill is like a job description: * input parameters, the materials * system instructions: expertise for the hypothetical worker * you are an actor X * you must A skill turns a complex logic into a reusable template "Persona" in systems instructions tells which parts if the model/brain it is allowed to be used: * Persona 2 years old child * Persona 10 years old child * Goal: divide a 10 by 2 ( 10/2 ) Persona also sets the output target audience. Persona is the speaker, target audience the listener. You are X. Your task is to xyz. You must follow these rules/constraints asdf. A model is a giant library and the persona tells which shelves to visit. Shelves might also be functional clusters, features or circuits. Ask LLM to write a skill for itself is called meta-prompting. Autonomous role discovery, let the LLM analyze the task and choose the most efficient speaker and listener to get the task done. Meta-prompt template: * I have a specific task: <>. I want you to create a professional skill for this task. * clean meta-prompt * Convert this task into a skillx.md skill: ensure indentation is OK.Autonomously choose the ideal persona, rules and output format to ensure a professional, zero regression result. Use structured markdown. A skill represents a single expert. A toolchain represents a whole department. == Meta-prompt == Convert this task into a x.md skill: I want to update the version in a pom.xml. It must use the current date and time in ISO8601 format with only numbers. Convert this task into a y.md skill: I wnat to bump up the minor version in Java pom files of this project. It must add 1 to the minor version. In VSCode copilot to run the skill use {{{#SkillName}}} .