docs: 调整文档结构并更新logo路径

- 将"高级配置"章节与"授权文件存储路径"和"Ollama协议使用示例"章节顺序调换
- 更新README各语言版本中的logo图片路径
- 优化文档结构,使内容组织更合理
This commit is contained in:
hex2077 2026-01-03 19:57:39 +08:00
parent f69eb3acae
commit 86a82bf41b
3 changed files with 152 additions and 152 deletions

View file

@ -1,6 +1,6 @@
<div align="center">
<img src="src/img/logo-min.webp" alt="logo" style="width: 128px; height: 128px;margin-bottom: 3px;">
<img src="src/img/logo-mid.webp" alt="logo" style="width: 128px; height: 128px;margin-bottom: 3px;">
# AIClient-2-API 🚀
@ -83,9 +83,9 @@
- [🐳 Docker デプロイ](https://hub.docker.com/r/justlikemaki/aiclient-2-api)
- [📋 コア機能](#-コア機能)
- [🔐 認証設定ガイド](#-認証設定ガイド)
- [⚙️ 高度な設定](#高度な設定)
- [📁 認証ファイル保存パス](#-認証ファイル保存パス)
- [🦙 Ollamaプロトコル使用例](#-ollamaプロトコル使用例)
- [⚙️ 高度な設定](#高度な設定)
- [❓ よくある質問](#-よくある質問)
- [📄 オープンソースライセンス](#-オープンソースライセンス)
- [🙏 謝辞](#-謝辞)
@ -230,6 +230,55 @@ Web UI管理インターフェースでは、極めて迅速に認証設定を
3. **起動パラメータ設定**`--provider-pools-file <path>` パラメータを使用してプール設定ファイルのパスを指定します
4. **ヘルスチェック**:システムは定期的にヘルスチェックを自動実行し、健全でないプロバイダーを使用しません
### 📁 認証ファイル保存パス
各サービスの認証情報ファイルのデフォルト保存場所:
| サービス | デフォルトパス | 説明 |
|------|---------|------|
| **Gemini** | `~/.gemini/oauth_creds.json` | OAuth認証情報 |
| **Kiro** | `~/.aws/sso/cache/kiro-auth-token.json` | Kiro認証トークン |
| **Qwen** | `~/.qwen/oauth_creds.json` | Qwen OAuth認証情報 |
| **Antigravity** | `~/.antigravity/oauth_creds.json` | Antigravity OAuth認証情報 (Claude 4.5 Opus サポート) |
> **説明**`~`はユーザーホームディレクトリを表しますWindows: `C:\Users\ユーザー名`、Linux/macOS: `/home/ユーザー名`または`/Users/ユーザー名`
>
> **カスタムパス**:設定ファイルの関連パラメータまたは環境変数でカスタム保存場所を指定可能
---
### 🦙 Ollamaプロトコル使用例
本プロジェクトはOllamaプロトコルをサポートしており、統一インターフェースを通じてすべてのサポートモデルにアクセスできます。Ollamaエンドポイントは`/api/tags`、`/api/chat`、`/api/generate`などの標準インターフェースを提供します。
**Ollama API呼び出し例**
1. **利用可能なすべてのモデルをリスト表示**
```bash
curl http://localhost:3000/ollama/api/tags
```
2. **チャットインターフェース**
```bash
curl http://localhost:3000/ollama/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "[Claude] claude-sonnet-4.5",
"messages": [
{"role": "user", "content": "こんにちは"}
]
}'
```
3. **モデルプレフィックスを使用してプロバイダーを指定**
- `[Kiro]` - Kiro APIを使用してClaudeモデルにアクセス
- `[Claude]` - 公式Claude APIを使用
- `[Gemini CLI]` - Gemini CLI OAuth経由でアクセス
- `[OpenAI]` - 公式OpenAI APIを使用
- `[Qwen CLI]` - Qwen OAuth経由でアクセス
---
### 高度な設定
#### 1. プロキシ設定
@ -348,55 +397,6 @@ Web UI管理インターフェースでは、極めて迅速に認証設定を
---
### 📁 認証ファイル保存パス
各サービスの認証情報ファイルのデフォルト保存場所:
| サービス | デフォルトパス | 説明 |
|------|---------|------|
| **Gemini** | `~/.gemini/oauth_creds.json` | OAuth認証情報 |
| **Kiro** | `~/.aws/sso/cache/kiro-auth-token.json` | Kiro認証トークン |
| **Qwen** | `~/.qwen/oauth_creds.json` | Qwen OAuth認証情報 |
| **Antigravity** | `~/.antigravity/oauth_creds.json` | Antigravity OAuth認証情報 (Claude 4.5 Opus サポート) |
> **説明**`~`はユーザーホームディレクトリを表しますWindows: `C:\Users\ユーザー名`、Linux/macOS: `/home/ユーザー名`または`/Users/ユーザー名`
>
> **カスタムパス**:設定ファイルの関連パラメータまたは環境変数でカスタム保存場所を指定可能
---
### 🦙 Ollamaプロトコル使用例
本プロジェクトはOllamaプロトコルをサポートしており、統一インターフェースを通じてすべてのサポートモデルにアクセスできます。Ollamaエンドポイントは`/api/tags`、`/api/chat`、`/api/generate`などの標準インターフェースを提供します。
**Ollama API呼び出し例**
1. **利用可能なすべてのモデルをリスト表示**
```bash
curl http://localhost:3000/ollama/api/tags
```
2. **チャットインターフェース**
```bash
curl http://localhost:3000/ollama/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "[Claude] claude-sonnet-4.5",
"messages": [
{"role": "user", "content": "こんにちは"}
]
}'
```
3. **モデルプレフィックスを使用してプロバイダーを指定**
- `[Kiro]` - Kiro APIを使用してClaudeモデルにアクセス
- `[Claude]` - 公式Claude APIを使用
- `[Gemini CLI]` - Gemini CLI OAuth経由でアクセス
- `[OpenAI]` - 公式OpenAI APIを使用
- `[Qwen CLI]` - Qwen OAuth経由でアクセス
---
## ❓ よくある質問
### 1. OAuth認証失敗

View file

@ -82,9 +82,9 @@
- [🐳 Docker 部署](https://hub.docker.com/r/justlikemaki/aiclient-2-api)
- [📋 核心功能](#-核心功能)
- [🔐 授权配置指南](#-授权配置指南)
- [⚙️ 高级配置](#高级配置)
- [📁 授权文件存储路径](#-授权文件存储路径)
- [🦙 Ollama 协议使用示例](#-ollama-协议使用示例)
- [⚙️ 高级配置](#高级配置)
- [❓ 常见问题](#-常见问题)
- [📄 开源许可](#-开源许可)
- [🙏 致谢](#-致谢)
@ -229,6 +229,55 @@ docker run -d -p 3000:3000 -p 8085:8085 -p 8086:8086 -p 19876-19880:19876-19880
3. **启动参数配置**:使用 `--provider-pools-file <path>` 参数指定号池配置文件路径
4. **健康检查**:系统会定期自动执行健康检查,不使用不健康的提供商
### 📁 授权文件存储路径
各服务的授权凭据文件默认存储位置:
| 服务 | 默认路径 | 说明 |
|------|---------|------|
| **Gemini** | `~/.gemini/oauth_creds.json` | OAuth 认证凭据 |
| **Kiro** | `~/.aws/sso/cache/kiro-auth-token.json` | Kiro 认证令牌 |
| **Qwen** | `~/.qwen/oauth_creds.json` | Qwen OAuth 凭据 |
| **Antigravity** | `~/.antigravity/oauth_creds.json` | Antigravity OAuth 凭据 (支持 Claude 4.5 Opus) |
> **说明**`~` 表示用户主目录Windows: `C:\Users\用户名`Linux/macOS: `/home/用户名``/Users/用户名`
> **自定义路径**:可通过配置文件中的相关参数或环境变量指定自定义存储位置
---
### 🦙 Ollama 协议使用示例
本项目支持 Ollama 协议可以通过统一接口访问所有支持的模型。Ollama 端点提供 `/api/tags`、`/api/chat`、`/api/generate` 等标准接口。
**Ollama API 调用示例**
1. **列出所有可用模型**
```bash
curl http://localhost:3000/ollama/api/tags
```
2. **聊天接口**
```bash
curl http://localhost:3000/ollama/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "[Claude] claude-sonnet-4.5",
"messages": [
{"role": "user", "content": "你好"}
]
}'
```
3. **使用模型前缀指定提供商**
- `[Kiro]` - 使用 Kiro API 访问 Claude 模型
- `[Claude]` - 使用 Claude 官方 API
- `[Gemini CLI]` - 通过 Gemini CLI OAuth 访问
- `[OpenAI]` - 使用 OpenAI 官方 API
- `[Qwen CLI]` - 通过 Qwen OAuth 访问
---
### 高级配置
#### 1. 代理配置
@ -347,55 +396,6 @@ docker run -d -p 3000:3000 -p 8085:8085 -p 8086:8086 -p 19876-19880:19876-19880
---
### 📁 授权文件存储路径
各服务的授权凭据文件默认存储位置:
| 服务 | 默认路径 | 说明 |
|------|---------|------|
| **Gemini** | `~/.gemini/oauth_creds.json` | OAuth 认证凭据 |
| **Kiro** | `~/.aws/sso/cache/kiro-auth-token.json` | Kiro 认证令牌 |
| **Qwen** | `~/.qwen/oauth_creds.json` | Qwen OAuth 凭据 |
| **Antigravity** | `~/.antigravity/oauth_creds.json` | Antigravity OAuth 凭据 (支持 Claude 4.5 Opus) |
> **说明**`~` 表示用户主目录Windows: `C:\Users\用户名`Linux/macOS: `/home/用户名``/Users/用户名`
> **自定义路径**:可通过配置文件中的相关参数或环境变量指定自定义存储位置
---
### 🦙 Ollama 协议使用示例
本项目支持 Ollama 协议可以通过统一接口访问所有支持的模型。Ollama 端点提供 `/api/tags`、`/api/chat`、`/api/generate` 等标准接口。
**Ollama API 调用示例**
1. **列出所有可用模型**
```bash
curl http://localhost:3000/ollama/api/tags
```
2. **聊天接口**
```bash
curl http://localhost:3000/ollama/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "[Claude] claude-sonnet-4.5",
"messages": [
{"role": "user", "content": "你好"}
]
}'
```
3. **使用模型前缀指定提供商**
- `[Kiro]` - 使用 Kiro API 访问 Claude 模型
- `[Claude]` - 使用 Claude 官方 API
- `[Gemini CLI]` - 通过 Gemini CLI OAuth 访问
- `[OpenAI]` - 使用 OpenAI 官方 API
- `[Qwen CLI]` - 通过 Qwen OAuth 访问
---
## ❓ 常见问题
### 1. OAuth 授权失败

102
README.md
View file

@ -1,6 +1,6 @@
<div align="center">
<img src="src/img/logo-min.webp" alt="logo" style="width: 128px; height: 128px;margin-bottom: 3px;">
<img src="src/img/logo-mid.webp" alt="logo" style="width: 128px; height: 128px;margin-bottom: 3px;">
# AIClient-2-API 🚀
@ -83,9 +83,9 @@
- [🐳 Docker Deployment](https://hub.docker.com/r/justlikemaki/aiclient-2-api)
- [📋 Core Features](#-core-features)
- [🔐 Authorization Configuration Guide](#-authorization-configuration-guide)
- [⚙️ Advanced Configuration](#advanced-configuration)
- [📁 Authorization File Storage Paths](#-authorization-file-storage-paths)
- [🦙 Ollama Protocol Usage Examples](#-ollama-protocol-usage-examples)
- [⚙️ Advanced Configuration](#advanced-configuration)
- [❓ FAQ](#-faq)
- [📄 Open Source License](#-open-source-license)
- [🙏 Acknowledgements](#-acknowledgements)
@ -230,6 +230,55 @@ In the Web UI management interface, you can complete authorization configuration
3. **Startup Parameter Configuration**: Use the `--provider-pools-file <path>` parameter to specify the pool configuration file path
4. **Health Check**: The system will automatically perform periodic health checks and avoid using unhealthy providers
### 📁 Authorization File Storage Paths
Default storage locations for authorization credential files of each service:
| Service | Default Path | Description |
|------|---------|------|
| **Gemini** | `~/.gemini/oauth_creds.json` | OAuth authentication credentials |
| **Kiro** | `~/.aws/sso/cache/kiro-auth-token.json` | Kiro authentication token |
| **Qwen** | `~/.qwen/oauth_creds.json` | Qwen OAuth credentials |
| **Antigravity** | `~/.antigravity/oauth_creds.json` | Antigravity OAuth credentials (supports Claude 4.5 Opus) |
> **Note**: `~` represents the user home directory (Windows: `C:\Users\username`, Linux/macOS: `/home/username` or `/Users/username`)
>
> **Custom Path**: Can specify custom storage location via relevant parameters in configuration file or environment variables
---
### 🦙 Ollama Protocol Usage Examples
This project supports the Ollama protocol, allowing access to all supported models through a unified interface. The Ollama endpoint provides standard interfaces such as `/api/tags`, `/api/chat`, `/api/generate`, etc.
**Ollama API Call Examples**:
1. **List all available models**:
```bash
curl http://localhost:3000/ollama/api/tags
```
2. **Chat interface**:
```bash
curl http://localhost:3000/ollama/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "[Claude] claude-sonnet-4.5",
"messages": [
{"role": "user", "content": "Hello"}
]
}'
```
3. **Specify provider using model prefix**:
- `[Kiro]` - Access Claude models using Kiro API
- `[Claude]` - Use official Claude API
- `[Gemini CLI]` - Access via Gemini CLI OAuth
- `[OpenAI]` - Use official OpenAI API
- `[Qwen CLI]` - Access via Qwen OAuth
---
### Advanced Configuration
#### 1. Proxy Configuration
@ -348,55 +397,6 @@ When all accounts under a Provider Type (e.g., `gemini-cli-oauth`) are exhausted
---
### 📁 Authorization File Storage Paths
Default storage locations for authorization credential files of each service:
| Service | Default Path | Description |
|------|---------|------|
| **Gemini** | `~/.gemini/oauth_creds.json` | OAuth authentication credentials |
| **Kiro** | `~/.aws/sso/cache/kiro-auth-token.json` | Kiro authentication token |
| **Qwen** | `~/.qwen/oauth_creds.json` | Qwen OAuth credentials |
| **Antigravity** | `~/.antigravity/oauth_creds.json` | Antigravity OAuth credentials (supports Claude 4.5 Opus) |
> **Note**: `~` represents the user home directory (Windows: `C:\Users\username`, Linux/macOS: `/home/username` or `/Users/username`)
>
> **Custom Path**: Can specify custom storage location via relevant parameters in configuration file or environment variables
---
### 🦙 Ollama Protocol Usage Examples
This project supports the Ollama protocol, allowing access to all supported models through a unified interface. The Ollama endpoint provides standard interfaces such as `/api/tags`, `/api/chat`, `/api/generate`, etc.
**Ollama API Call Examples**:
1. **List all available models**:
```bash
curl http://localhost:3000/ollama/api/tags
```
2. **Chat interface**:
```bash
curl http://localhost:3000/ollama/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "[Claude] claude-sonnet-4.5",
"messages": [
{"role": "user", "content": "Hello"}
]
}'
```
3. **Specify provider using model prefix**:
- `[Kiro]` - Access Claude models using Kiro API
- `[Claude]` - Use official Claude API
- `[Gemini CLI]` - Access via Gemini CLI OAuth
- `[OpenAI]` - Use official OpenAI API
- `[Qwen CLI]` - Access via Qwen OAuth
---
## ❓ FAQ
### 1. OAuth Authorization Failed