diff --git a/docs/channels/dingtalk.md b/docs/channels/dingtalk.md index 47d234e..34e551e 100644 --- a/docs/channels/dingtalk.md +++ b/docs/channels/dingtalk.md @@ -35,19 +35,40 @@ In **Permissions & Scopes**, ensure the following permissions are granted: ### 5. Configure PicoClaw +#### 1. WebUI Configuration + +We recommend using the WebUI first because it is faster and more convenient. + +![WebUI DingTalk Connection Interface](/img/channels/webui_dingtalk.png) + +Fill in the Client ID (`YOUR_CLIENT_ID`) and Client Secret (`YOUR_CLIENT_SECRET`) in order, then click **Save**. + +#### 2. Configuration Files + +Edit `~/.picoclaw/.security.yml`: + +```yaml +dingtalk: + settings: + client_secret: YOUR_CLIENT_SECRET +``` + +Edit `~/.picoclaw/config.json`: + ```json { "channels": { - "dingtalk": { "enabled": true, - "client_id": "YOUR_CLIENT_ID", - "client_secret": "YOUR_CLIENT_SECRET", - "allow_from": [], - "group_trigger": { - "mention_only": true + "type": "dingtalk", + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, + "placeholder": { + "enabled": false }, - "reasoning_channel_id": "" - } + "settings": { + "client_id": "YOUR_CLIENT_ID" + } } } ``` diff --git a/docs/channels/discord.md b/docs/channels/discord.md index 2b88772..32fca1b 100644 --- a/docs/channels/discord.md +++ b/docs/channels/discord.md @@ -24,14 +24,43 @@ title: Discord ### 4. Configure +#### 1. WebUI Configuration + +We recommend using the WebUI first because it is faster and more convenient. + +![WebUI Discord Connection Interface](/img/channels/webui_discord.png) + +Fill in the Bot Token (`YOUR_BOT_TOKEN`) and Allowed Sources (`YOUR_USER_ID`) in order, then click **Save**. + +#### 2. Configuration Files + +Edit `~/.picoclaw/.security.yml`: + +```yaml +discord: + settings: + token: YOUR_BOT_TOKEN +``` + +Edit `~/.picoclaw/config.json`: + ```json { "channels": { "discord": { "enabled": true, - "token": "YOUR_BOT_TOKEN", - "allow_from": ["YOUR_USER_ID"], - "group_trigger": { + "type": "discord", + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, + "placeholder": { + "enabled": false + }, + "settings": { + "proxy": "", "mention_only": false } } diff --git a/docs/channels/feishu.md b/docs/channels/feishu.md index 58483e5..0e48009 100644 --- a/docs/channels/feishu.md +++ b/docs/channels/feishu.md @@ -51,30 +51,53 @@ For development/testing, you can leave `encrypt_key` and `verification_token` em ### 5. Configure PicoClaw +#### 1. WebUI Configuration + +We recommend using the WebUI first because it is faster and more convenient. + +![WebUI Feishu Connection Interface](/img/channels/webui_feishu.png) + +Fill in the App ID (`YOUR_APP_ID`), App Secret (`YOUR_APP_SECRET`), Encrypt Key (`YOUR_ENCRYPT_KEY`), and Verification Token (`YOUR_VERIFICATION_TOKEN`) in order, then click **Save**. + +#### 2. Configuration Files + +Edit `~/.picoclaw/config.json`: + ```json { "channels": { "feishu": { "enabled": true, - "app_id": "cli_xxx", - "app_secret": "YOUR_APP_SECRET", - "encrypt_key": "YOUR_ENCRYPT_KEY", - "verification_token": "YOUR_VERIFICATION_TOKEN", - "allow_from": [], - "group_trigger": { - "mention_only": true - }, + "type": "feishu", + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, "placeholder": { - "enabled": true, - "text": "Thinking..." + "enabled": false }, - "random_reaction_emoji": [], - "reasoning_channel_id": "" + "settings": { + "app_id": "YOUR_APP_ID", + "random_reaction_emoji": null, + "is_lark": false + } } } } ``` +Edit `~/.picoclaw/.security.yml`: + +```yaml +feishu: + settings: + app_secret: "YOUR_APP_SECRET" + encrypt_key: "YOUR_ENCRYPT_KEY" + verification_token: "YOUR_VERIFICATION_TOKEN" +``` + ### 6. Publish the App 1. Go to **Version Management & Release** diff --git a/docs/channels/telegram.md b/docs/channels/telegram.md index c0b6b3d..20a0369 100644 --- a/docs/channels/telegram.md +++ b/docs/channels/telegram.md @@ -22,13 +22,36 @@ Telegram is the **recommended** channel. It's easy to set up and supports voice ### 3. Configure +#### 1. WebUI Configuration + +We recommend using the WebUI first because it is faster and more convenient. + +![WebUI Telegram Connection Interface](/img/channels/webui_telegram.png) + +Fill in the Bot Token (`YOUR_BOT_TOKEN`) and Allowed Sources (`YOUR_USER_ID`) in order, then click **Save**. + +#### 2. Configuration Files + +Edit `~/.picoclaw/.security.yml`: + +```yaml +telegram: + settings: + token: YOUR_BOT_TOKEN +``` + +Edit `~/.picoclaw/config.json`: + ```json { "channels": { "telegram": { "enabled": true, - "token": "YOUR_BOT_TOKEN", - "allow_from": ["YOUR_USER_ID"] + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {} } } } diff --git a/docs/providers/anthropic.md b/docs/providers/anthropic.md new file mode 100644 index 0000000..34fa1bb --- /dev/null +++ b/docs/providers/anthropic.md @@ -0,0 +1,101 @@ +--- +id: anthropic-api +title: Claude(Anthropic) API +--- + +# Claude (Anthropic) API Configuration Guide + +## Overview + +**Claude (Anthropic)** uses a **pay-as-you-go** pricing model. Access is provided through an official Anthropic API key, and charges are based on actual token usage. + +> ⚠️ **Important notes** +> +> - Claude **subscription plans** (Pro / Max / Team / Enterprise) and the **API** are **completely separate** products. Subscriptions work only on claude.ai web, desktop, and mobile apps. They **do not include API access** and cannot be used in developer tools like PicoClaw. +> - The native Anthropic API uses the `/v1/messages` format, **not** the OpenAI-compatible `/v1/chat/completions` format. Using OpenAI compatibility mode disables key features such as Prompt Caching, Extended Thinking, and PDF processing. +> - Using an OAuth token from a subscription account to call Claude in third-party tools **violates Anthropic's Terms of Service**. Anthropic officially blocked this path in April 2026, so do not attempt it. + +Official docs: https://docs.anthropic.com/en/api/getting-started + + + +![image-20260409215655752](/img/providers/Claude(Anthropic)1.png) + +## Get API Key + +1. Visit the [Anthropic Console](https://console.anthropic.com/), sign up, and log in. +2. Open the **API Keys** page in the left navigation and click **Create Key** to generate an API key. +3. On the **Billing** page, add a payment method and top up your balance. API usage is deducted from that balance based on actual token consumption. + +![image-20260409215733096](/img/providers/Claude(Anthropic)2.png) + +### Pricing + +Anthropic API billing is usage-based. There is no monthly fee, and you are charged only for the tokens you consume. Reference rates below may change over time: + +| Model | Input (per million tokens) | Output (per million tokens) | +| :---------------: | :------------------------: | :-------------------------: | +| claude-sonnet-4.7 | \$3 | \$15 | +| claude-opus-4.7 | \$15 | \$75 | +| claude-haiku-4.7 | \$0.25 | \$1.25 | + +Latest pricing always follows Anthropic's official pricing page. + +### Supported Models + +| Model | Description | +| :------------------------: | :----------------------------------------------------------: | +| claude-sonnet-4.7 | Recommended; balanced performance and cost, excellent long context | +| claude-opus-4.7 | High-end model for complex reasoning and large context | +| claude-haiku-4.7 | Lightweight, fast response, lower cost | +| claude-3-5-sonnet-20241022 | Classic stable version with broad compatibility | +> For daily coding, prefer **claude-sonnet-4.7** and switch to Opus only for more complex tasks. +## Configure PicoClaw + +### Web UI Configuration + +Open PicoClaw WebUI, go to **Models** in the left sidebar, and click **Add Model** in the top-right corner. + +![image-20260409221239555](/img/providers/Claude(Anthropic)3.png) +| Field | Value to enter | +| :----------: | :----------------------------------------------------: | +| Model Alias | Custom name, for example `anthropic` | +| Model ID | anthropic/claude-sonnet-4.7 (or another supported model) | +| API Key | API key generated in Anthropic Console | +| API Base URL | https://api.anthropic.com/v1 | +### Edit Config Files + +`config.json`: + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "claude-sonnet-4.7", + "model": "anthropic/claude-sonnet-4.7", + "api_base": "https://api.anthropic.com/v1" + } + ], + "agents": { + "defaults": { + "model_name": "claude-sonnet-4.7" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + claude-sonnet-4.7:0: + api_keys: + - "your-anthropic-api-key" +``` +## Notes + +- Pay-as-you-go costs scale directly with usage. For frequent or long-context tasks, set usage alerts on the Console billing page. +- Claude Opus is significantly more expensive than Sonnet, so avoid long-running Opus usage unless needed. +- Subscription plans and API balances are separate and non-transferable. Balance added in Console is for API calls only and is unrelated to claude.ai subscriptions. + diff --git a/docs/providers/groq.md b/docs/providers/groq.md new file mode 100644 index 0000000..7036d3e --- /dev/null +++ b/docs/providers/groq.md @@ -0,0 +1,99 @@ +--- +id: groq-api +title: Groq API +--- +# Groq API Configuration Guide + +## Overview + +Groq is an AI inference platform focused on **ultra-low latency and lightning-fast inference**. Powered by its proprietary Tensor architecture, it delivers exceptional speed in code generation and chat interaction. Supports popular open models like Llama and Mixtral, available via pay-as-you-go. + +Official Docs: https://console.groq.com/docs/quickstart + +--- + +## Get API Key + +### Step 1: Access Platform + +Go to [GroqCloud](https://console.groq.com/home) + +register and log in. + +### Step 2: Create API Key + +1. Go to the API Keys page +2. Click **Create API Key** +3. Copy and save your API Key + +> ⚠️ **Note**: The API key is shown only once. Save it immediately and keep it secure. + +--- + +![image-20260410163359795](/img/providers/groq1.png) + +## Configure PicoClaw + +### Pay-as-you-go (Groq only supports pay-as-you-go) + +#### Supported Models + +| Model | Description | +| :---------------------: | :-------------------------------------------: | +| llama-3.3-70b-versatile | Recommended, balanced performance, ultra-fast | +| llama-3.3-8b-chat | Lightweight, low-cost, fast response | +| mixtral-8x7b-instruct | Mixture-of-experts, strong long-text handling | +| gemma-2-9b-it | Google lightweight chat model | + +#### Method 1: Web UI (Recommended) + +Open PicoClaw WebUI, go to **Models**, and click **Add Model** in the top-right corner. + +![image-20260410163514016](/img/providers/groq2.png) + +| Field | Fill Content | +| :--------------: | :----------------------------------------------------------: | +| Model Alias | Custom name, e.g.,`groq` | +| Model Identifier | `groq/llama-3.3-70b-versatile` (or other supported models) | +| API Key | Your Groq API Key | +| API Base URL | `https://api.groq.com/openai/v1` | + +#### Method 2: Edit Config Files + +`config.json`: + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "llama-3.3-70b", + "model": "groq/llama-3.3-70b-versatile", + "api_base": "https://api.groq.com/openai/v1" + } + ], + "agents": { + "defaults": { + "model_name": "llama-3.3-70b" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + llama-3.3-70b:0: + api_keys: + - "your-groq-api-key" +``` + +--- + +## Notes + +- Groq has **no subscription plans** and supports only pay-as-you-go billing. +- Fixed default endpoint: `https://api.groq.com/openai/v1` (cannot be omitted). +- For production, store API Key in `.security.yml` — avoid plaintext in `config.json`. +- Inference is extremely fast; monitor usage to prevent unexpected overconsumption. diff --git a/docs/providers/nvidia.md b/docs/providers/nvidia.md new file mode 100644 index 0000000..5e6eb85 --- /dev/null +++ b/docs/providers/nvidia.md @@ -0,0 +1,100 @@ +--- +id: nvidia-api +title: Nim(NVIDIA) API +--- +# NVIDIA NIM API Configuration Guide + +## Overview + +**NVIDIA NIM (NVIDIA Inference Microservice)** is NVIDIA's GPU-accelerated inference microservice. It provides industry-standard OpenAI-compatible APIs, supports mainstream models from multiple providers, and offers fast, stable inference. Free quotas are available for individual developers, making it a good fit for coding, long-context tasks, and multi-model switching. + +Official Site: https://build.nvidia.com/ + +Official API Docs: https://docs.nvidia.com/nim/ + +--- + +## Get API Key + +### Step 1: Access Platform + +Go to [Try NVIDIA NIM APIs](https://build.nvidia.com/) on the NVIDIA Build platform, then register and log in. + +### Step 2: Create API Key + +1. Click your profile in the top-right, then select **API Keys** (direct link: [API Keys](https://build.nvidia.com/settings/api-keys)) +2. Click **Generate API Key**, name it, set expiration +3. Copy and save your API Key (starts with `nvapi-`) + +> ⚠️ **Note**: The API key is displayed only once. Save it immediately and do not share it. + +--- + +![image-20260410164719609](/img/providers/nim1.png) + +## Configure PicoClaw + +### Pay-as-you-go (NVIDIA NIM only supports free quota + pay-as-you-go) + +#### Supported Models + +| Model | Description | +| :-------------------------------: | :--------------------------------------: | +| moonshotai/kimi-k2.5 | Recommended, excellent long context | +| zhipuai/GLM-4.7 | Balanced value, great for Chinese coding | +| minimaxai/minimax-m2.5 | Balanced chat & code capabilities | +| meta/llama-3.3-70b-versatile | High-performance open model | +| nvidia/nemotron-3-super-120b-a12b | NVIDIA flagship MoE model | +| google/gemma-4-31b-it | Google latest chat model | + +#### Method 1: Web UI (Recommended) + +Open PicoClaw WebUI, go to **Models**, and click **Add Model** in the top-right corner. + +![image-20260410164756785](/img/providers/nim2.png) + +| Field | Fill Content | +| :--------------: | :---------------------------------------------------------: | +| Model Alias | Custom name, e.g.,`nvidia-nim` | +| Model Identifier | `nvidia/moonshotai/kimi-k2.5` (or other supported models) | +| API Key | Your NVIDIA NIM API Key | +| API Base URL | `https://integrate.api.nvidia.com/v1` | + +#### Method 2: Edit Config Files + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "nemotron-4-340b", + "model": "nvidia/nemotron-3-super-120b-a12b", + "api_base": "https://integrate.api.nvidia.com/v1" + } + ], + "agents": { + "defaults": { + "model_name": "nemotron-4-340b" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + nemotron-4-340b:0: + api_keys: + - "nvapi-your-nvidia-api-key" +``` + +--- + +## Notes + +- NVIDIA NIM has **no subscription plans** and supports only free quota plus pay-as-you-go billing. +- Fixed API endpoint: `https://integrate.api.nvidia.com/v1` (do not omit or misconfigure). +- API Key starts with `nvapi-` — must be generated on the official API Keys page. +- For production, store API Key in `.security.yml` — avoid plaintext in `config.json`. +- Free quota is limited; monitor remaining calls for frequent use. diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/dingtalk.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/dingtalk.md index d9591b3..2b640cf 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/dingtalk.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/dingtalk.md @@ -35,19 +35,40 @@ Em **Permissions & Scopes**, garanta que as seguintes permissões estejam conced ### 5. Configurar o PicoClaw +#### 1. Configuracao pelo WebUI + +Recomendamos priorizar a configuracao pelo WebUI, pois e mais rapida e conveniente. + +![WebUI DingTalk Connection Interface](/img/channels/webui_dingtalk.png) + +Preencha, nesta ordem, o Client ID (`YOUR_CLIENT_ID`) e o Client Secret (`YOUR_CLIENT_SECRET`), depois clique em **Salvar**. + +#### 2. Arquivos de Configuracao + +Edite `~/.picoclaw/.security.yml`: + +```yaml +dingtalk: + settings: + client_secret: YOUR_CLIENT_SECRET +``` + +Edite `~/.picoclaw/config.json`: + ```json { "channels": { - "dingtalk": { "enabled": true, - "client_id": "YOUR_CLIENT_ID", - "client_secret": "YOUR_CLIENT_SECRET", - "allow_from": [], - "group_trigger": { - "mention_only": true + "type": "dingtalk", + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, + "placeholder": { + "enabled": false }, - "reasoning_channel_id": "" - } + "settings": { + "client_id": "YOUR_CLIENT_ID" + } } } ``` diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/discord.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/discord.md index 1fa776b..d744093 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/discord.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/discord.md @@ -24,14 +24,43 @@ title: Discord ### 4. Configurar {#4-configure} +#### 1. Configuracao pelo WebUI + +Recomendamos priorizar a configuracao pelo WebUI, pois e mais rapida e conveniente. + +![WebUI Discord Connection Interface](/img/channels/webui_discord.png) + +Preencha, nesta ordem, o Bot Token (`YOUR_BOT_TOKEN`) e as Origens Permitidas (`YOUR_USER_ID`), depois clique em **Salvar**. + +#### 2. Arquivos de Configuracao + +Edite `~/.picoclaw/.security.yml`: + +```yaml +discord: + settings: + token: YOUR_BOT_TOKEN +``` + +Edite `~/.picoclaw/config.json`: + ```json { "channels": { "discord": { "enabled": true, - "token": "YOUR_BOT_TOKEN", - "allow_from": ["YOUR_USER_ID"], - "group_trigger": { + "type": "discord", + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, + "placeholder": { + "enabled": false + }, + "settings": { + "proxy": "", "mention_only": false } } diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/feishu.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/feishu.md index 08af413..5d85009 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/feishu.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/feishu.md @@ -51,30 +51,53 @@ Para desenvolvimento/testes, você pode deixar `encrypt_key` e `verification_tok ### 5. Configurar o PicoClaw +#### 1. Configuracao pelo WebUI + +Recomendamos priorizar a configuracao pelo WebUI, pois e mais rapida e conveniente. + +![WebUI Feishu Connection Interface](/img/channels/webui_feishu.png) + +Preencha, nesta ordem, o App ID (`YOUR_APP_ID`), App Secret (`YOUR_APP_SECRET`), Encrypt Key (`YOUR_ENCRYPT_KEY`) e Verification Token (`YOUR_VERIFICATION_TOKEN`), depois clique em **Salvar**. + +#### 2. Arquivos de Configuracao + +Edite `~/.picoclaw/config.json`: + ```json { "channels": { "feishu": { "enabled": true, - "app_id": "cli_xxx", - "app_secret": "YOUR_APP_SECRET", - "encrypt_key": "YOUR_ENCRYPT_KEY", - "verification_token": "YOUR_VERIFICATION_TOKEN", - "allow_from": [], - "group_trigger": { - "mention_only": true - }, + "type": "feishu", + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, "placeholder": { - "enabled": true, - "text": "Thinking..." + "enabled": false }, - "random_reaction_emoji": [], - "reasoning_channel_id": "" + "settings": { + "app_id": "YOUR_APP_ID", + "random_reaction_emoji": null, + "is_lark": false + } } } } ``` +Edite `~/.picoclaw/.security.yml`: + +```yaml +feishu: + settings: + app_secret: "YOUR_APP_SECRET" + encrypt_key: "YOUR_ENCRYPT_KEY" + verification_token: "YOUR_VERIFICATION_TOKEN" +``` + ### 6. Publicar o App 1. Vá em **Version Management & Release** diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/telegram.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/telegram.md index 39662e7..6496421 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/telegram.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/channels/telegram.md @@ -22,13 +22,36 @@ O Telegram é o canal **recomendado**. É fácil de configurar e suporta transcr ### 3. Configurar +#### 1. Configuracao pelo WebUI + +Recomendamos priorizar a configuracao pelo WebUI, pois e mais rapida e conveniente. + +![WebUI Telegram Connection Interface](/img/channels/webui_telegram.png) + +Preencha, nesta ordem, o Bot Token (`YOUR_BOT_TOKEN`) e as Origens Permitidas (`YOUR_USER_ID`), depois clique em **Salvar**. + +#### 2. Arquivos de Configuracao + +Edite `~/.picoclaw/.security.yml`: + +```yaml +telegram: + settings: + token: YOUR_BOT_TOKEN +``` + +Edite `~/.picoclaw/config.json`: + ```json { "channels": { "telegram": { "enabled": true, - "token": "YOUR_BOT_TOKEN", - "allow_from": ["YOUR_USER_ID"] + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {} } } } diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/anthropic.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/anthropic.md new file mode 100644 index 0000000..647fe5c --- /dev/null +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/anthropic.md @@ -0,0 +1,104 @@ +--- +id: anthropic-api +title: Claude(Anthropic) API +--- +# Guia de Configuração da API do Claude (Anthropic) + +## Visão geral + +O **Claude (Anthropic)** oferece o método de **pagamento por uso (Pay-as-you-go)**, realizado por meio da chave API oficial da Anthropic, com cobrança baseada na quantidade real de tokens consumidos. + +> ⚠️ **Observação importante** +> +> - Os **planos de assinatura** do Claude (Pro / Max / Team / Enterprise) e a **API** são dois produtos **totalmente separados**. Os planos de assinatura são válidos apenas para a interface web, desktop e mobile do claude.ai, **não incluem permissão de uso da API** e não podem ser utilizados em ferramentas de desenvolvimento como o PicoClaw. +> - A API nativa da Anthropic utiliza o formato de interface `/v1/messages`, **não sendo** compatível com a interface da OpenAI (`/v1/chat/completions`). O uso do modo compatível com a OpenAI desativará funções essenciais como cache de prompt, raciocínio estendido e processamento de PDF. +> - A chamada do Claude em ferramentas de terceiros por meio do token OAuth da conta de assinatura **viola os Termos de Serviço da Anthropic** e esse método foi oficialmente bloqueado em abril de 2026; não tente utilizá-lo. + +Documentação oficial: https://docs.anthropic.com/en/api/getting-started + +--- + +![image-20260409215655752](/img/providers/Claude(Anthropic)1.png) + +## Obtenção da chave API + +1. Acesse o [Anthropic Console](https://console.anthropic.com/), registre-se e faça login. +2. No menu à esquerda, abra a página **API Keys** e clique em **Create Key** para gerar a chave de API. +3. Na página **Billing**, adicione um método de pagamento e faça um depósito. As chamadas da API serão descontadas do saldo conforme o uso real de tokens. + +![image-20260409215733096](/img/providers/Claude(Anthropic)2.png) + +### Modalidade de cobrança + +| Modelo | Entrada (por milhão de tokens) | Saída (por milhão de tokens) | +| :---------------: | :-----------------------------: | :----------------------------: | +| claude-sonnet-4.7 | \$3 | \$15 | +| claude-opus-4.7 | \$15 | \$75 | +| claude-haiku-4.7 | \$0.25 | \$1.25 | + +> Os preços mais recentes seguem a página oficial de preços da Anthropic. + +### Modelos suportados + +| Modelo | Descrição | +| :------------------------: | :-------------------------------------------------------------------------: | +| claude-sonnet-4.7 | Recomendado, equilíbrio entre desempenho e custo, excelente contexto longo | +| claude-opus-4.7 | Modelo avançado, raciocínio complexo, contexto muito extenso | +| claude-haiku-4.7 | Modelo leve, resposta rápida, baixo custo | +| claude-3-5-sonnet-20241022 | Versão estável clássica, ampla compatibilidade | + +> Para codificação diária, priorize o **claude-sonnet-4.7**; mude para o Opus apenas em tarefas complexas para evitar consumo excessivo de créditos. + +## Configuração do PicoClaw + +### Configuração na interface web + +Abra a WebUI do PicoClaw, acesse a página **Modelos** no menu lateral esquerdo e clique em **Adicionar modelo** no canto superior direito. + +![image-20260409221239555](/img/providers/Claude(Anthropic)3.png) + +| Campo | Conteúdo a preencher | +| :---------------------: | :-----------------------------------------------------: | +| Nome do modelo | Nome personalizado, ex: anthropic | +| Identificador do modelo | anthropic/claude-sonnet-4.7 (ou outro modelo suportado) | +| Chave API | Chave API gerada no Console da Anthropic | +| URL base da API | https://api.anthropic.com/v1 | + +### Edição do arquivo de configuração + +Configuração no config.json + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "claude-sonnet-4.7", + "model": "anthropic/claude-sonnet-4.7", + "api_base": "https://api.anthropic.com/v1" + } + ], + "agents": { + "defaults": { + "model_name": "claude-sonnet-4.6" + } + } +} +``` + +--- + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + claude-sonnet-4.7:0: + api_keys: + - "your-anthropic-api-key" +``` + +## Observações + +- Cobrança por uso: quanto mais utilizado, maior o custo. Tarefas frequentes ou de contexto longo aumentam os gastos rapidamente; recomenda-se configurar alertas de uso na página de cobrança do Console. +- O custo da série Claude Opus é significativamente maior que o Sonnet; evite o uso prolongado sem necessidade. +- Os planos de assinatura e o saldo da API são independentes e não intercambiáveis: o saldo depositado no Console é válido apenas para chamadas da API, não tendo relação com os planos de assinatura do claude.ai. diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/groq.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/groq.md new file mode 100644 index 0000000..db49534 --- /dev/null +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/groq.md @@ -0,0 +1,99 @@ +--- +id: groq-api +title: Groq API +--- +# Guia de Configuração da API do Groq + +## Visão geral + +O Groq é uma plataforma de inferência de IA com **latência ultrabaixa e inferência ultrarrápida**, baseada em arquitetura Tensor proprietária. Oferece resposta extremamente rápida em cenários como geração de código e interação por chat, ideal para desenvolvimento com chamadas frequentes e rápidas. Suporta modelos open source principais como Llama e Mixtral, com método de pagamento por uso. + +Documentação oficial: https://console.groq.com/docs/quickstart + +--- + +## Obtenção da chave API + +### Passo 1: Acesse a plataforma + +Acesse [GroqCloud](https://console.groq.com/home) + + registre-se e faça login. + +### Passo 2: Crie a chave API + +1. Acesse a página de gerenciamento de Chaves API +2. Clique em **Create API Key** para gerar a chave +3. Copie e salve a chave API + +> ⚠️ **Aviso**: A chave API é exibida apenas uma vez; salve imediatamente e evite vazamentos. + +--- + +![image-20260410163359795](/img/providers/groq1.png) + +## Configuração do PicoClaw + +### Pagamento por uso (Groq suporta apenas pagamento por uso) + +#### Modelos suportados + +| Modelo | Descrição | +| :---------------------: | :------------------------------------------------------------------------: | +| llama-3.3-70b-versatile | Recomendado, desempenho geral equilibrado, velocidade extremamente rápida | +| llama-3.3-8b-chat | Modelo leve, resposta rápida e baixo custo | +| mixtral-8x7b-instruct | Modelo de múltiplos especialistas, excelente processamento de texto longo | +| gemma-2-9b-it | Modelo de chat leve do Google | + +#### Método 1: Uso da WebUI (recomendado) + +Abra a WebUI do PicoClaw, acesse a página **Modelos** no menu lateral esquerdo e clique em **Adicionar modelo** no canto superior direito: + +![image-20260410163514016](/img/providers/groq2.png) + +| Campo | Conteúdo a preencher | +| :---------------------: | :----------------------------------------------------------: | +| Nome do modelo | Nome personalizado, ex:`groq` | +| Identificador do modelo | `groq/llama-3.3-70b-versatile` (ou outro modelo suportado) | +| Chave API | Sua chave API do Groq | +| URL base da API | `https://api.groq.com/openai/v1` | + +#### Método 2: Edição do arquivo de configuração + +`config.json`: + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "llama-3.3-70b", + "model": "groq/llama-3.3-70b-versatile", + "api_base": "https://api.groq.com/openai/v1" + } + ], + "agents": { + "defaults": { + "model_name": "llama-3.3-70b" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + llama-3.3-70b:0: + api_keys: + - "your-groq-api-key" +``` + +--- + +## Observações + +- O Groq **não possui planos de assinatura**, suportando apenas pagamento por uso, com dedução em tempo real do saldo por token. +- O endpoint padrão é fixo: `https://api.groq.com/openai/v1`, não pode ser omitido. +- Em ambiente de produção, armazene a chave API no `.security.yml` para evitar gravação em texto claro no `config.json`. +- A velocidade de chamada dos modelos é extremamente rápida; controle a frequência de chamadas para evitar consumo excessivo acidental. diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/nvidia.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/nvidia.md new file mode 100644 index 0000000..26ba82c --- /dev/null +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/providers/nvidia.md @@ -0,0 +1,100 @@ +--- +id: nvidia-api +title: Nim(NVIDIA) API +--- +# Guia de Configuração da API do NVIDIA NIM + +## Visão geral + +**NVIDIA NIM (NVIDIA Inference Microservice)** é um microserviço de inferência acelerado por GPU lançado pela NVIDIA, oferecendo interface compatível com a OpenAI padrão do setor. Suporta chamada com um clique dos modelos principais de diversos fabricantes, com velocidade de inferência rápida e alta estabilidade. Desenvolvedores individuais podem obter cota gratuita, sendo a solução ideal para programação, texto longo e troca de múltiplos modelos. + +Documentação oficial: https://build.nvidia.com/ + +Documentação oficial da API: https://docs.nvidia.com/nim/ + +--- + +## Obtenção da chave API + +### Passo 1: Acesse a plataforma + +Acesse a plataforma [Try NVIDIA NIM APIs](https://build.nvidia.com/) da NVIDIA Build, registre-se e faça login. + +### Passo 2: Crie a chave API + +1. Clique no avatar no canto superior direito e selecione **API Keys** (acesso direto: [API Keys](https://build.nvidia.com/settings/api-keys)) +2. Clique em **Generate API Key**, preencha o nome e selecione a validade +3. Após gerar, copie e salve a chave API (começa com `nvapi-`) + +> ⚠️ **Aviso**: A chave API é exibida apenas uma vez; salve imediatamente e não divulgue. + +--- + +![image-20260410164719609](/img/providers/nim1.png) + +## Configuração do PicoClaw + +### Pagamento por uso (NVIDIA NIM suporta apenas cota gratuita + pagamento por uso) + +#### Modelos suportados + +| Modelo | Descrição | +| :-------------------------------: | :-------------------------------------------------------------------: | +| moonshotai/kimi-k2.5 | Recomendado, excelente contexto longo | +| zhipuai/GLM-4.7 | Equilíbrio custo-benefício, amigável para programação em chinês | +| minimaxai/minimax-m2.5 | Equilíbrio entre capacidade de chat e código | +| meta/llama-3.3-70b-versatile | Modelo open source de alto desempenho | +| nvidia/nemotron-3-super-120b-a12b | Modelo MoE flagship proprietário da NVIDIA | +| google/gemma-4-31b-it | Modelo de chat mais recente do Google | + +#### Método 1: Uso da WebUI (recomendado) + +Abra a WebUI do PicoClaw, acesse a página **Modelos** no menu lateral esquerdo e clique em **Adicionar modelo** no canto superior direito + +![image-20260410164756785](/img/providers/nim2.png) + +| Campo | Conteúdo a preencher | +| :---------------------: | :-----------------------------------------------------: | +| Nome do modelo | Nome personalizado, ex:`nvidia-nim` | +| Identificador do modelo | nvidia/moonshotai/kimi-k2.5 (ou outro modelo suportado) | +| Chave API | Sua chave API do NVIDIA NIM | +| URL base da API | https://integrate.api.nvidia.com/v1 | + +#### Método 2: Edição do arquivo de configuração + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "nemotron-4-340b", + "model": "nvidia/nemotron-3-super-120b-a12b", + "api_base": "https://integrate.api.nvidia.com/v1" + } + ], + "agents": { + "defaults": { + "model_name": "nemotron-4-340b" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + nemotron-4-340b:0: + api_keys: + - "nvapi-your-nvidia-api-key" +``` + +--- + +## Observações + +- O NVIDIA NIM **não possui planos de assinatura**, suportando apenas cota gratuita + pagamento por uso, com cobrança em tempo real por token. +- Endpoint API fixo: `https://integrate.api.nvidia.com/v1`, não pode ser omitido ou preenchido incorretamente. +- A chave API começa com `nvapi-`; certifique-se de gerá-la na página oficial de Chaves API. +- Em ambiente de produção, armazene a chave API no `.security.yml` para evitar gravação em texto claro no `config.json`. +- A cota gratuita é limitada; para uso frequente, acompanhe o número restante de chamadas na conta. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/dingtalk.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/dingtalk.md index f09f9da..3717e20 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/dingtalk.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/dingtalk.md @@ -35,19 +35,40 @@ title: 钉钉 ### 5. 配置 PicoClaw +#### 1. WebUI 配置 + +优先推荐使用 WebUI 配置,方便快捷。 + +![WebUI DingTalk Connection Interface](/img/channels/webui_dingtalk.png) + +依次填入 Client ID(`YOUR_CLIENT_ID`)和 Client Secret(`YOUR_CLIENT_SECRET`),然后点击 **保存** 即可。 + +#### 2. 配置文件 + +修改 `~/.picoclaw/.security.yml`: + +```yaml +dingtalk: + settings: + client_secret: YOUR_CLIENT_SECRET +``` + +修改 `~/.picoclaw/config.json`: + ```json { "channels": { - "dingtalk": { "enabled": true, - "client_id": "YOUR_CLIENT_ID", - "client_secret": "YOUR_CLIENT_SECRET", - "allow_from": [], - "group_trigger": { - "mention_only": true + "type": "dingtalk", + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, + "placeholder": { + "enabled": false }, - "reasoning_channel_id": "" - } + "settings": { + "client_id": "YOUR_CLIENT_ID" + } } } ``` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/discord.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/discord.md index 9c9ef7e..494d786 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/discord.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/discord.md @@ -24,14 +24,43 @@ title: Discord ### 4. 配置 +#### 1. WebUI 配置 + +优先推荐使用 WebUI 配置,方便快捷。 + +![WebUI Discord Connection Interface](/img/channels/webui_discord.png) + +依次填入 Bot Token(`YOUR_BOT_TOKEN`)和允许来源(`YOUR_USER_ID`),然后点击 **保存** 即可。 + +#### 2. 配置文件 + +修改 `~/.picoclaw/.security.yml`: + +```yaml +discord: + settings: + token: YOUR_BOT_TOKEN +``` + +修改 `~/.picoclaw/config.json`: + ```json { "channels": { "discord": { "enabled": true, - "token": "YOUR_BOT_TOKEN", - "allow_from": ["YOUR_USER_ID"], - "group_trigger": { + "type": "discord", + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, + "placeholder": { + "enabled": false + }, + "settings": { + "proxy": "", "mention_only": false } } diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/feishu.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/feishu.md index 940f947..d64f3c1 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/feishu.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/feishu.md @@ -51,29 +51,53 @@ title: 飞书 ### 5. 配置 PicoClaw +#### 1. WebUI 配置 + +优先推荐使用 WebUI 配置,方便快捷。 + +![WebUI 飞书连接界面](/img/channels/webui_feishu.png) + +依次填入 App ID(`YOUR_APP_ID`)、App Secret(`YOUR_APP_SECRET`)、Encrypt Key(`YOUR_ENCRYPT_KEY`)和 Verification Token(`YOUR_VERIFICATION_TOKEN`),然后点击 **保存** 即可。 + +#### 2. 配置文件 + +修改 `~/.picoclaw/config.json`: + ```json { "channels": { "feishu": { "enabled": true, - "app_id": "cli_xxx", - "app_secret": "YOUR_APP_SECRET", - "encrypt_key": "YOUR_ENCRYPT_KEY", - "verification_token": "YOUR_VERIFICATION_TOKEN", - "allow_from": [], - "group_trigger": { - "mention_only": true - }, + "type": "feishu", + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {}, + "typing": {}, "placeholder": { - "enabled": true, - "text": "正在思考..." + "enabled": false }, - "random_reaction_emoji": [], - "reasoning_channel_id": "" + "settings": { + "app_id": "YOUR_APP_ID", + "random_reaction_emoji": null, + "is_lark": false + } } } } ``` +修改 `~/.picoclaw/.security.yml`: + +```yaml +feishu: + settings: + app_secret: "YOUR_APP_SECRET" + encrypt_key: "YOUR_ENCRYPT_KEY" + verification_token: "YOUR_VERIFICATION_TOKEN" +``` + + ### 6. 发布应用 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/telegram.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/telegram.md index c5d17b5..34e8810 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/telegram.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/channels/telegram.md @@ -22,13 +22,36 @@ Telegram 是**推荐**的通道。设置简单,支持语音转写。 ### 3. 配置 +#### 1. WebUI 配置 + +优先推荐 WebUI 配置,方便快捷。 + +![WebUI Telegram Connection Interface](/img/channels/webui_telegram.png) + +依次填入 Bot Token(`YOUR_BOT_TOKEN`)和允许来源(`YOUR_USER_ID`),然后点击 **保存** 即可。 + +#### 2. 配置文件 + +修改 `~/.picoclaw/.security.yml` + +```yaml +telegram: + settings: + token: YOUR_BOT_TOKEN +``` + +修改 `~/.picoclaw/config.json` + ```json { "channels": { "telegram": { "enabled": true, - "token": "YOUR_BOT_TOKEN", - "allow_from": ["YOUR_USER_ID"] + "allow_from": [ + "YOUR_USER_ID" + ], + "reasoning_channel_id": "", + "group_trigger": {} } } } @@ -72,7 +95,7 @@ Telegram 语音消息可通过 Groq 的 Whisper 自动转写: **"Conflict: terminated by other getUpdates"**:同一时间只能运行一个 `picoclaw gateway`,请停止其他实例。 -**代理**:如果你所在地区无法直接访问 Telegram,使用 `proxy` 字段: +**代理**:如果你所在地区无法直接访问 Telegram,可使用 `proxy` 字段: ```json { diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/anthropic.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/anthropic.md new file mode 100644 index 0000000..b027013 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/anthropic.md @@ -0,0 +1,106 @@ +--- +id: anthropic-api +title: Claude(Anthropic) API +--- +# Claude (Anthropic) 配置指南 + +## 概述 + +**Claude (Anthropic)** 提供 **按量付费** (Pay-as-you-go)方式,通过 Anthropic 官方 API Key 调用,按实际消耗的 Token 数量计费。 + +> ⚠️ **重要说明** +> +> * Claude **订阅套餐** (Pro / Max / Team / Enterprise)与 **API** 是**完全独立**的两套产品,订阅套餐仅用于 claude.ai 网页端、桌面端、移动端, **不包含 API 调用权限** ,无法用于 PicoClaw 等开发工具 +> * Anthropic 原生 API 使用 `/v1/messages` 接口格式,**不是** OpenAI 兼容接口(`/v1/chat/completions`);使用 OpenAI 兼容模式会导致 Prompt Caching、Extended Thinking、PDF 处理等核心功能不可用 +> * 通过订阅账号 OAuth Token 在第三方工具中调用 Claude **违反 Anthropic ToS** ,且该路径已于 2026 年 4 月被官方封堵,请勿尝试 + +官方文档:https://docs.anthropic.com/en/api/getting-started + +--- + +![image-20260409215655752](/img/providers/Claude(Anthropic)1.png) + +## 获取 API Key + +1. 访问 Anthropic 控制台 [Anthropic Console](https://console.anthropic.com/),注册并登录 +2. 在左侧导航进入 API Keys 页面,点击「Create Key」生成 API Key +3. Billing 页面添加付款方式并充值,API 调用将按实际 Token 用量从余额中扣除 + +![image-20260409215733096](/img/providers/Claude(Anthropic)2.png) + +### 计费方式 + +按量付费,按实际消耗的输入/输出 Token 数量计费,无月费,不用不扣款。费率参考(价格可能随 Anthropic 官方调整): + +| 模型 | 输入(每百万 Token) | 输出(每百万 Token) | +| :---------------: | :------------------: | :------------------: | +| claude-sonnet-4.7 | \$3 | \$15 | +| claude-opus-4.7 | \$15 | \$75 | +| claude-haiku-4.7 | \$0.25 | \$1.25 | + +> 最新价格以 Anthropic 官方定价页为准 + +### 支持的模型 + +| 模型 | 说明 | +| :------------------------: | :----------------------------------------: | +| claude-sonnet-4.7 | 性价比之王,日常任务与中等复杂度场景的首选 | +| claude-opus-4.7 | 高阶模型,复杂推理、超大上下文 | +| claude-haiku-4.7 | 轻量模型,快速响应、低成本 | +| claude-3-5-sonnet-20241022 | 经典稳定版,兼容广泛 | + +> 日常编码优先使用 **claude-sonnet-4.7**,复杂任务再切换 Opus,避免额度消耗过快 + +## 配置 PicoClaw + +### 网页端配置 + +打开 PicoClaw WebUI,进入左侧导航 **模型** 页面,点击右上角「添加模型」 + +![image-20260409221239555](/img/providers/Claude(Anthropic)3.png) + +| 字段 | 填写内容 | +| :----------: | :-------------------------------------------: | +| 模型别名 | 自定义名称,如 anthropic | +| 模型标识符 | anthropic/claude-sonnet-4.7(或其他支持模型) | +| API Key | Anthropic Console 生成的 API Key | +| API Base URL | https://api.anthropic.com/v1 | + +### 编辑配置文件 + +config.json 配置 + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "claude-sonnet-4.7", + "model": "anthropic/claude-sonnet-4.7", + "api_base": "https://api.anthropic.com/v1" + } + ], + "agents": { + "defaults": { + "model_name": "claude-sonnet-4.7" + } + } +} +``` + +--- + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + claude-sonnet-4.7:0: + api_keys: + - "your-anthropic-api-key" +``` + +## 注意事项 + +* 按量计费,用多少扣多少:高频、长上下文任务费用增长较快,建议在 Console Billing 页面设置用量告警 +* Claude Opus 系列成本显著高于 Sonnet,非必要不长期使用 +* 订阅套餐与 API 余额相互独立,不可互通:充值到 Console 的余额仅用于 API 调用,与 claude.ai 的订阅套餐无关 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/groq.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/groq.md new file mode 100644 index 0000000..5970396 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/groq.md @@ -0,0 +1,99 @@ +--- +id: groq-api +title: Groq API +--- +# Groq 配置指南 + +## 概述 + +Groq 是主打**超低延迟、极速推理**的 AI 推理平台,依托自研 Tensor 架构,在代码生成、对话交互等场景下响应速度极快,适合需要高频、快速调用的开发场景,支持 Llama、Mixtral 等主流开源模型,提供按量付费使用方式。 + +官方文档:https://console.groq.com/docs/quickstart + +--- + +## 获取 API Key + +### 第一步:访问平台 + +前往 [GroqCloud](https://console.groq.com/home) + +注册并登录。 + +### 第二步:创建 API Key + +1. 进入 API Keys 管理页面 +2. 点击「Create API Key」创建密钥 +3. 复制并保存 API Key + +> ⚠️ **注意**:API Key 仅显示一次,请立即保存,避免泄露。 + +--- + +![image-20260410163359795](/img/providers/groq1.png) + +## 配置 PicoClaw + +### 按量付费(Groq 仅支持按量付费) + +#### 支持的模型 + +| 模型 | 说明 | +| :---------------------: | :--------------------------: | +| llama-3.3-70b-versatile | 推荐,综合性能均衡,速度极快 | +| llama-3.3-8b-chat | 轻量模型,低成本快速响应 | +| mixtral-8x7b-instruct | 多专家模型,长文本处理优秀 | +| gemma-2-9b-it | Google 轻量对话模型 | + +#### 方式一:使用 WebUI(推荐) + +打开 PicoClaw WebUI,进入左侧导航 **模型** 页面,点击右上角「添加模型」: + +![image-20260410163514016](/img/providers/groq2.png) + +| 字段 | 填写内容 | +| :----------: | :------------------------------------------------: | +| 模型别名 | 自定义名称,如 `groq` | +| 模型标识符 | `groq/llama-3.3-70b-versatile`(或其他支持模型) | +| API Key | 你的 Groq API Key | +| API Base URL | `https://api.groq.com/openai/v1` | + +#### 方式二:编辑配置文件 + +`config.json`: + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "llama-3.3-70b", + "model": "groq/llama-3.3-70b-versatile", + "api_base": "https://api.groq.com/openai/v1" + } + ], + "agents": { + "defaults": { + "model_name": "llama-3.3-70b" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + llama-3.3-70b:0: + api_keys: + - "your-groq-api-key" +``` + +--- + +## 注意事项 + +- Groq **无订阅套餐**,仅支持按量付费,按 Token 实时扣除账户余额。 +- 默认端点固定为 `https://api.groq.com/openai/v1`,不可省略。 +- 生产环境请将 API Key 存放在 `.security.yml`,避免明文写入 `config.json`。 +- 模型调用速度极快,注意控制调用频率,避免意外超额消耗。 diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/nvidia.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/nvidia.md new file mode 100644 index 0000000..45b9ee3 --- /dev/null +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/providers/nvidia.md @@ -0,0 +1,100 @@ +--- +id: nvidia-api +title: Nim(NVIDIA) API +--- +# NVIDIA NIM 配置指南 + +## 概述 + +**NVIDIA NIM(NVIDIA Inference Microservice)**是英伟达推出的**GPU 加速推理微服务**,提供行业标准 OpenAI 兼容接口,支持多厂商主流模型一键调用,推理速度快、稳定性强,个人开发者可免费获取额度使用,是编程、长文本、多模型切换场景的优选方案。 + +官方文档:https://build.nvidia.com/ + +官方 API 文档:https://docs.nvidia.com/nim/ + +--- + +## 获取 API Key + +### 第一步:访问平台 + +前往 [Try NVIDIA NIM APIs](https://build.nvidia.com/) NVIDIA Build 平台,注册并登录账号。 + +### 第二步:创建 API Key + +1. 点击右上角头像,选择 **API Keys**(直达:[API Keys](https://build.nvidia.com/settings/api-keys)) +2. 点击 **Generate API Key**,填写名称,选择有效期 +3. 生成后复制保存 API Key(以 `nvapi-` 开头) + +> ⚠️ **注意**:API Key 仅显示一次,请立即保存,切勿泄露。 + +--- + +![image-20260410164719609](/img/providers/nim1.png) + +## 配置 PicoClaw + +### 按量付费(NVIDIA NIM 仅支持按量 / 免费额度) + +#### 支持的模型 + +| 模型 | 说明 | +| :-------------------------------: | :----------------------: | +| moonshotai/kimi-k2.5 | 推荐,长上下文优秀 | +| zhipuai/GLM-4.7 | 均衡性价比,中文编程友好 | +| minimaxai/minimax-m2.5 | 对话与代码能力均衡 | +| meta/llama-3.3-70b-versatile | 开源强性能模型 | +| nvidia/nemotron-3-super-120b-a12b | 英伟达自研旗舰 MoE 模型 | +| google/gemma-4-31b-it | Google 最新对话模型 | + +#### 方式一:使用 WebUI(推荐) + +打开 PicoClaw WebUI,进入左侧导航 **模型** 页面,点击右上角「添加模型」: + +![image-20260410164756785](/img/providers/nim2.png) + +| 字段 | 填写内容 | +| :----------: | :-------------------------------------------: | +| 模型别名 | 自定义名称,如 `nvidia-nim` | +| 模型标识符 | nvidia/moonshotai/kimi-k2.5(或其他支持模型) | +| API Key | 你的 NVIDIA NIM API Key | +| API Base URL | https://integrate.api.nvidia.com/v1 | + +#### 方式二:编辑配置文件 + +```json +{ + "version": 2, + "model_list": [ + { + "model_name": "nemotron-4-340b", + "model": "nvidia/nemotron-3-super-120b-a12b", + "api_base": "https://integrate.api.nvidia.com/v1" + } + ], + "agents": { + "defaults": { + "model_name": "nemotron-4-340b" + } + } +} +``` + +`~/.picoclaw/.security.yml`: + +```yaml +model_list: + nemotron-4-340b:0: + api_keys: + - "nvapi-your-nvidia-api-key" +``` + +--- + +## 注意事项 + +- NVIDIA NIM **无订阅套餐**,仅支持免费额度 + 按量付费,按 Token 实时结算。 +- 固定 API 端点:`https://integrate.api.nvidia.com/v1`,不可省略或填错。 +- API Key 以 `nvapi-` 开头,务必在官方 API Keys 页面生成。 +- 生产环境请将 API Key 存放在 `.security.yml`,避免明文写入 `config.json`。 +- 免费额度有限,高频使用建议关注账户剩余调用次数。 diff --git a/sidebars.js b/sidebars.js index c0dcc26..a107883 100644 --- a/sidebars.js +++ b/sidebars.js @@ -85,6 +85,9 @@ const sidebars = { items: [ 'providers/antigravity', 'providers/antigravity-usage', + 'providers/groq-api', + 'providers/anthropic-api', + 'providers/nvidia-api', 'providers/openai-api', 'providers/gemini-api', 'providers/openrouter-api', diff --git a/static/img/channels/webui_dingtalk.png b/static/img/channels/webui_dingtalk.png new file mode 100644 index 0000000..f039e8f Binary files /dev/null and b/static/img/channels/webui_dingtalk.png differ diff --git a/static/img/channels/webui_discord.png b/static/img/channels/webui_discord.png new file mode 100644 index 0000000..2cf1ff3 Binary files /dev/null and b/static/img/channels/webui_discord.png differ diff --git a/static/img/channels/webui_feishu.png b/static/img/channels/webui_feishu.png new file mode 100644 index 0000000..ad0390f Binary files /dev/null and b/static/img/channels/webui_feishu.png differ diff --git a/static/img/channels/webui_telegram.png b/static/img/channels/webui_telegram.png new file mode 100644 index 0000000..935cd5c Binary files /dev/null and b/static/img/channels/webui_telegram.png differ diff --git a/static/img/providers/Claude(Anthropic)1.png b/static/img/providers/Claude(Anthropic)1.png new file mode 100644 index 0000000..323fbee Binary files /dev/null and b/static/img/providers/Claude(Anthropic)1.png differ diff --git a/static/img/providers/Claude(Anthropic)2.png b/static/img/providers/Claude(Anthropic)2.png new file mode 100644 index 0000000..50136e3 Binary files /dev/null and b/static/img/providers/Claude(Anthropic)2.png differ diff --git a/static/img/providers/Claude(Anthropic)3.png b/static/img/providers/Claude(Anthropic)3.png new file mode 100644 index 0000000..8f46962 Binary files /dev/null and b/static/img/providers/Claude(Anthropic)3.png differ diff --git a/static/img/providers/groq1.png b/static/img/providers/groq1.png new file mode 100644 index 0000000..2624a8d Binary files /dev/null and b/static/img/providers/groq1.png differ diff --git a/static/img/providers/groq2.png b/static/img/providers/groq2.png new file mode 100644 index 0000000..8f46962 Binary files /dev/null and b/static/img/providers/groq2.png differ diff --git a/static/img/providers/nim1.png b/static/img/providers/nim1.png new file mode 100644 index 0000000..15b8040 Binary files /dev/null and b/static/img/providers/nim1.png differ diff --git a/static/img/providers/nim2.png b/static/img/providers/nim2.png new file mode 100644 index 0000000..8f46962 Binary files /dev/null and b/static/img/providers/nim2.png differ