Benutzer-Werkzeuge

Webseiten-Werkzeuge


ollama

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

ollama [2024/08/03 13:46]
ollama [2025/11/01 20:52] (aktuell)
Zeile 1: Zeile 1:
 +Siehe [[llm]]
  
 +<code>
 +C:\Users\manuel>ollama
 +Usage:
 +  ollama [flags]
 +  ollama [command]
 +
 +Available Commands:
 +  serve       Start ollama
 +  create      Create a model from a Modelfile
 +  show        Show information for a model
 +  run         Run a model
 +  pull        Pull a model from a registry
 +  push        Push a model to a registry
 +  list        List models
 +  ps          List running models
 +  cp          Copy a model
 +  rm          Remove a model
 +  help        Help about any command
 +
 +Flags:
 +  -h, --help      help for ollama
 +  -v, --version   Show version information
 +
 +Use "ollama [command] --help" for more information about a command.
 +</code>
 +
 +Start ollama
 +<code>
 +// with debug output
 +ollama serve
 +
 +// in background
 +start /B ollama serve >NUL 2>&1
 +</code>
 +
 +<code>
 +set /p content=<test.txt
 +ollama run llama3 "Summarize this file: %content%"
 +</code>
 +
 +Generate a response
 +<code>
 +curl http://localhost:11434/api/generate -d '{
 +  "model": "llama3",
 +  "prompt":"Why is the sky blue?"
 +}'
 +</code>
 +
 +Chat with a model
 +<code>
 +curl http://localhost:11434/api/chat -d '{
 +  "model": "llama3",
 +  "messages": [
 +    { "role": "user", "content": "why is the sky blue?" }
 +  ]
 +}'
 +</code>
 +
 +Stop ollama
 +<code>
 +tasklist | findstr ollama
 +ollama app.exe               12580 Console                    1        19.184 K
 +ollama.exe                   12628 Console                    1        44.324 K
 +ollama_llama_server.exe      11772 Console                    1     5.174.068 K
 +
 +taskkill /IM ollama_llama_server.exe
 +</code>
 +
 +=====Links=====
 +
 +  * [[https://ollama.com/|Homepage]]
 +  * [[https://www.youtube.com/watch?v=GWB9ApTPTv4|Ollama Course – Build AI Apps Locally - FreeCodeCamp]]