refactor(docker): consolidate compose files and move config to config/ directory
- Deleted docker-compose.discord.yml and merged into docker-compose.yml - Moved config.example.json to config/ - Updated volume mounts to use ./config/config.json - Updated verify script permissions (implied if valid)
This commit is contained in:
committed by
lxowalle
parent
2997ea0b01
commit
759f4cfe25
77
README.ja.md
77
README.ja.md
@@ -129,18 +129,17 @@ git clone https://github.com/Sunwood-AI-OSS-Hub/picoclaw.git
|
||||
cd picoclaw
|
||||
|
||||
# 2. API キーを設定
|
||||
cp .env.example .env
|
||||
vim .env # DISCORD_BOT_TOKEN, OPENROUTER_API_KEY などを設定
|
||||
vim config/config.json # プロバイダーの API キーを設定
|
||||
cp config.example.json config/config.json
|
||||
vim config/config.json # DISCORD_BOT_TOKEN, プロバイダーの API キーを設定
|
||||
|
||||
# 3. ビルドと起動
|
||||
docker compose -f docker-compose.discord.yml up -d
|
||||
docker compose --profile gateway up -d
|
||||
|
||||
# 4. ログ確認
|
||||
docker compose -f docker-compose.discord.yml logs -f picoclaw
|
||||
docker compose logs -f picoclaw-gateway
|
||||
|
||||
# 5. 停止
|
||||
docker compose -f docker-compose.discord.yml down
|
||||
docker compose --profile gateway down
|
||||
```
|
||||
|
||||
### Agent モード(ワンショット)
|
||||
@@ -156,8 +155,8 @@ docker compose run --rm picoclaw-agent
|
||||
### リビルド
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.discord.yml build --no-cache
|
||||
docker compose -f docker-compose.discord.yml up -d
|
||||
docker compose --profile gateway build --no-cache
|
||||
docker compose --profile gateway up -d
|
||||
```
|
||||
|
||||
### 🚀 クイックスタート(ネイティブ)
|
||||
@@ -306,53 +305,37 @@ picoclaw gateway
|
||||
|
||||
</details>
|
||||
|
||||
## ⚙️ 設定
|
||||
## 設定 (Configuration)
|
||||
|
||||
設定ファイル: `~/.picoclaw/config.json`
|
||||
PicoClaw は設定に `config.json` を使用します。
|
||||
|
||||
### プロバイダー
|
||||
1. **設定ファイルの作成:**
|
||||
|
||||
> [!NOTE]
|
||||
> Groq は Whisper 経由の無料音声文字起こしを提供します。設定すると、Telegram の音声メッセージが自動的に文字起こしされます。
|
||||
サンプル設定ファイルをコピーします:
|
||||
|
||||
| プロバイダー | 用途 | API キー取得先 |
|
||||
|-------------|------|---------------|
|
||||
| `gemini` | LLM (Gemini 直接) | [aistudio.google.com](https://aistudio.google.com) |
|
||||
| `zhipu` | LLM (Zhipu 直接) | [bigmodel.cn](bigmodel.cn) |
|
||||
| `openrouter(テスト中)` | LLM(推奨、全モデルアクセス) | [openrouter.ai](https://openrouter.ai) |
|
||||
| `anthropic(テスト中)` | LLM (Claude 直接) | [console.anthropic.com](https://console.anthropic.com) |
|
||||
| `openai(テスト中)` | LLM (GPT 直接) | [platform.openai.com](https://platform.openai.com) |
|
||||
| `deepseek(テスト中)` | LLM (DeepSeek 直接) | [platform.deepseek.com](https://platform.deepseek.com) |
|
||||
| `groq` | LLM + **音声文字起こし** (Whisper) | [console.groq.com](https://console.groq.com) |
|
||||
```bash
|
||||
cp config.example.json config/config.json
|
||||
```
|
||||
|
||||
2. **設定の編集:**
|
||||
|
||||
<details>
|
||||
<summary><b>Zhipu</b></summary>
|
||||
`config/config.json` を開き、APIキーや設定を記述します。
|
||||
|
||||
**1. API キーとベース URL を取得**
|
||||
- [API キー](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) を取得
|
||||
|
||||
**2. 設定**
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"workspace": "~/.picoclaw/workspace",
|
||||
"model": "glm-4.7",
|
||||
"max_tokens": 8192,
|
||||
"temperature": 0.7,
|
||||
"max_tool_iterations": 20
|
||||
```json
|
||||
{
|
||||
"providers": {
|
||||
"openrouter": {
|
||||
"api_key": "sk-or-v1-..."
|
||||
}
|
||||
},
|
||||
"channels": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"token": "YOUR_DISCORD_BOT_TOKEN"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"zhipu": {
|
||||
"api_key": "Your API Key",
|
||||
"api_base": "https://open.bigmodel.cn/api/paas/v4"
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
**3. 実行**
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -132,18 +132,17 @@ git clone https://github.com/Sunwood-AI-OSS-Hub/picoclaw.git
|
||||
cd picoclaw
|
||||
|
||||
# 2. Set your API keys
|
||||
cp .env.example .env
|
||||
vim .env # Set DISCORD_BOT_TOKEN, OPENROUTER_API_KEY, etc.
|
||||
vim config/config.json # Set provider API keys
|
||||
cp config.example.json config/config.json
|
||||
vim config/config.json # Set DISCORD_BOT_TOKEN, API keys, etc.
|
||||
|
||||
# 3. Build & Start
|
||||
docker compose -f docker-compose.discord.yml up -d
|
||||
docker compose --profile gateway up -d
|
||||
|
||||
# 4. Check logs
|
||||
docker compose -f docker-compose.discord.yml logs -f picoclaw
|
||||
docker compose logs -f picoclaw-gateway
|
||||
|
||||
# 5. Stop
|
||||
docker compose -f docker-compose.discord.yml down
|
||||
docker compose --profile gateway down
|
||||
```
|
||||
|
||||
### Agent Mode (One-shot)
|
||||
@@ -159,8 +158,8 @@ docker compose run --rm picoclaw-agent
|
||||
### Rebuild
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.discord.yml build --no-cache
|
||||
docker compose -f docker-compose.discord.yml up -d
|
||||
docker compose --profile gateway build --no-cache
|
||||
docker compose --profile gateway up -d
|
||||
```
|
||||
|
||||
### 🚀 Quick Start
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
services:
|
||||
# ─────────────────────────────────────────────
|
||||
# PicoClaw Discord Bot
|
||||
# ─────────────────────────────────────────────
|
||||
picoclaw:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: picoclaw-discord
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- PICOCLAW_CHANNELS_DISCORD_ENABLED=true
|
||||
- PICOCLAW_CHANNELS_DISCORD_TOKEN=${DISCORD_BOT_TOKEN}
|
||||
volumes:
|
||||
# Configuration file
|
||||
- ./config/config.json:/root/.picoclaw/config.json:ro
|
||||
# Persistent workspace (sessions, memory, logs)
|
||||
- picoclaw-workspace:/root/.picoclaw/workspace
|
||||
command: ["gateway"]
|
||||
|
||||
volumes:
|
||||
picoclaw-workspace:
|
||||
@@ -1,6 +1,4 @@
|
||||
services:
|
||||
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# PicoClaw Agent (one-shot query)
|
||||
# docker compose run --rm picoclaw-agent -m "Hello"
|
||||
@@ -12,8 +10,6 @@ services:
|
||||
container_name: picoclaw-agent
|
||||
profiles:
|
||||
- agent
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./config/config.json:/root/.picoclaw/config.json:ro
|
||||
- picoclaw-workspace:/root/.picoclaw/workspace
|
||||
@@ -21,5 +17,24 @@ services:
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
# ─────────────────────────────────────────────
|
||||
# PicoClaw Gateway (Long-running Bot)
|
||||
# docker compose up picoclaw-gateway
|
||||
# ─────────────────────────────────────────────
|
||||
picoclaw-gateway:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: picoclaw-gateway
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- gateway
|
||||
volumes:
|
||||
# Configuration file
|
||||
- ./config/config.json:/root/.picoclaw/config.json:ro
|
||||
# Persistent workspace (sessions, memory, logs)
|
||||
- picoclaw-workspace:/root/.picoclaw/workspace
|
||||
command: ["gateway"]
|
||||
|
||||
volumes:
|
||||
picoclaw-workspace:
|
||||
|
||||
Reference in New Issue
Block a user