Skip to content

开启 server(llama.cpp) ​

以下为常见写法,具体参数以你使用的 llama.cpp 版本 README 为准。

启动示例 ​

bash
./llama-server -m /path/to/model.gguf --host 0.0.0.0 --port 8080

要点:

  • --host 0.0.0.0:允许局域网访问(只写 127.0.0.1 时手机连不上)
  • --port:自定义端口,并在防火墙放行
  • 视版本可能需额外打开 OpenAI 兼容路由(新版 server 通常已带 /v1/chat/completions)

自测 ​

text
http://127.0.0.1:8080/v1/models
http://YOUR_PC_IP:8080/v1/models

给 MiniTavern ​

字段示例
Base URLhttp://YOUR_PC_IP:8080/v1
API Key可留空或占位
模型名与 /v1/models 中的 id 一致(有的版本为文件名)

下一步 ​

在 MiniTavern 中配置 · 排错