gaurav-321-pi-local-llm

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

@gaurav-321/pi-local-llm

Pi coding agent extension for local LLM providers: LM Studio, llama.cpp, and llama-swap.

Features

  • Registers a llama-swap provider with dynamic model discovery
  • Supports LM Studio, llama.cpp, and llama-swap backends
  • Per-model context window detection with overrides
  • Optional config via ~/.pi/agent/pi-llama-swap.json

Install

pi install npm:@gaurav-321/pi-local-llm

Or load directly:

pi -e /path/to/pi-llama-swap

Quick Start

  1. Start your local LLM server (LM Studio, llama.cpp, or llama-swap)
  2. Load the extension: pi -e /path/to/pi-llama-swap
  3. Select a model: /model → pick llama-swap/your-model-id

Config

Create ~/.pi/agent/pi-llama-swap.json:

{
  "origin": "http://127.0.0.1",
  "port": 8080,
  "apiKey": "optional"
}

Commands

Command Description
/llama-swap-set-context-length <n> Override context window for current model

License

MIT