Ollama.md 2.0 KB


title: Ollama date: 2025-02-05T14:50:55+08:00

lastmod: 2025-02-06T09:27:22+08:00

Ollama

  官方网站:https://ollama.com/

  一、下载符合自己系统的应用程序

  二、选择Models下载自己所需的AI模型

  三、修改模型地址:OLLAMA_MODELS

  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
  stop        Stop a running 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

  默认Ollama的api接口测试实现A电脑​→B电脑

  注意要点:

  一、防火墙规则配置完善

  二、是否开启认证模式

curl http://192.168.2.64:11434/api/tags

响应地址:
StatusCode        : 200
StatusDescription : OK
Content           : {"models":[{"name":"deepseek-r1:7b","model":"deepseek-r1:7b","modified_at":"2025-02-01T13:06:08.629
                    5817+08:00","size":4683075271,"digest":"0a8c266910232fd3291e71e5ba1e058cc5af9d411192cf88b6d30e92b6e
                    73...
RawContent        : HTTP/1.1 200 OK
                    Content-Length: 682
                    Content-Type: application/json; charset=utf-8
                    Date: Wed, 05 Feb 2025 07:02:02 GMT

                    {"models":[{"name":"deepseek-r1:7b","model":"deepseek-r1:7b","modified_at":"...
Forms             : {}
Headers           : {[Content-Length, 682], [Content-Type, application/json; charset=utf-8], [Date, Wed, 05 Feb 2025 07
                    :02:02 GMT]}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 682