Tài liệu/Sử dụng RexLLM với Droid CLI

Sử dụng RexLLM với Droid CLI

Cấu hình Droid CLI để sử dụng RexLLM làm API backend.

Cài đặt Droid CLI

# macOS / Linux

bash
curl -fsSL https://app.factory.ai/cli | sh

# Windows

powershell
irm https://app.factory.ai/cli/windows | iex

Cấu hình Model

Chỉnh sửa file ~/.factory/config.json, thay đổi nội dung như sau, nhớ thay YOUR_REXLLM_API_KEY bằng API Key RexLLM của bạn:

json
{
  "custom_models": [
    {
      "model_display_name": "rexllm-sonnet",
      "model": "claude-sonnet-4-6",
      "base_url": "https://your-rexllm-domain.com/v1",
      "api_key": "YOUR_REXLLM_API_KEY",
      "provider": "generic-chat-completion-api",
      "max_tokens": 1280000
    }
  ]
}

Khởi chạy trực tiếp

Sau khi cấu hình xong, gõ droid trong dòng lệnh, trong giao diện hiện ra gõ /model, và chọn rexllm-sonnet trong Custom Model để bắt đầu sử dụng.

bash
# Khởi chạy Droid CLI
droid

# Sau đó trong Droid, gõ:
/model
# Chọn rexllm-sonnet từ Custom Model