0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Pi×ollama導入メモ

0
Last updated at Posted at 2026-11-02

Piを導入したメモ

前提

個人の備忘録です。

環境

推論エンジンはollamaを使っています。(色々モデル使いたいので)

インストール

https://pi.dev/

curl -fsSL https://pi.dev/install.sh | sh

基本的にY

モデルの登録

https://pi.dev/docs/latest/models#configure-a-compatible-endpoint
root/.pi/agentとかのフォルダが作成される。
多分DLした時にもログで流れると思うが
agent配下にmodels.jsonを作成する。
内容は下記のような感じ

{
  "$schema": "https://pi.dev/schemas/models.schema.json",
  "providers": {
    "ollama": {
      "baseUrl": "http://host.docker.internal:11434/v1",
      "api": "openai-completions",
      "apiKey": "ollama",
      "models": [
        { "id": "huggingface.co/llm-jp/llm-jp-4.1-32b-a3b-thinking-gguf:latest" },
        { "id": "lfm3:1.7b" },
        { "id": "bonsai-2:27b" },
        { "id": "hf.co/InternScience/Agents-A1-Q4_K_M-GGUF:latest" }
      ]
    }
  }
}

あとはpiで起動する感じ

skills作成

https://github.com/anthropics/skills/tree/main
これをクローンして使う

pjフォルダに入れてから、シンボリックリンクを作って所定の場所におく
https://pi.dev/docs/latest/skills

ls -la .agent
total 12
drwxr-xr-x 3 root root 4096 Nov  2 08:19 .
drwxrwxr-x 5 1000 1000 4096 Nov  2 08:19 ..
drwxr-xr-x 7 root root 4096 Nov  2 08:14 skills

ls -la .agent/skills
total 28
drwxr-xr-x 7 root root 4096 Nov  2 08:14 .
drwxr-xr-x 3 root root 4096 Nov  2 08:19 ..
drwxrwxr-x 7 1000 1000 4096 Nov  2 08:06 skill-creator
drwxr-xr-x 2 root root 4096 Nov  2 08:12 コードレビュー
drwxr-xr-x 2 root root 4096 Nov  2 08:13 コード作成
drwxr-xr-x 2 root root 4096 Nov  2 08:12 原因調査
drwxr-xr-x 2 root root 4096 Nov  2 08:14 日本語で分かりやすく解答

mkdir -p ~/.agents
ln -s /app/.agent/skills ~/.agents/skills

そしたらskillコマンドが出てくる

終わり

思ったよりpiいいかも
カスタマイズの自由度が高いから面白い

今入れている感じだとbonsai-2かAgents-A1あたりが動いてくれそうかな~
llm-jpも動くけど、感覚としてはまだかな

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?