final version

This commit is contained in:
2026-02-18 23:39:39 +08:00
parent 72ab0c0b56
commit 32d0bca5f9
3975 changed files with 781 additions and 1106509 deletions

View File

@@ -13,7 +13,7 @@ import requests
import json
# 设置基础URL和认证令牌
BASE_URL = "http://localhost:8000/api/v1"
BASE_URL = "http://localhost:8001/api/v1"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
@@ -23,7 +23,7 @@ headers = {
### JavaScript 示例
```javascript
const BASE_URL = "http://localhost:8000/api/v1";
const BASE_URL = "http://localhost:8001/api/v1";
const headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
@@ -828,7 +828,7 @@ from algorithm_showcase.client import AlgorithmShowcaseClient
# 初始化客户端
client = AlgorithmShowcaseClient(
base_url="http://localhost:8000",
base_url="http://localhost:8001",
api_key="YOUR_API_KEY"
)
@@ -851,7 +851,7 @@ import { AlgorithmShowcaseClient } from '@algorithm-showcase/sdk';
// 初始化客户端
const client = new AlgorithmShowcaseClient({
baseUrl: 'http://localhost:8000',
baseUrl: 'http://localhost:8001',
apiKey: 'YOUR_API_KEY'
});

View File

@@ -7,7 +7,7 @@
### 基础URL
```
http://localhost:8000/api/v1
http://localhost:8001/api/v1
```
### 认证

View File

@@ -25,14 +25,14 @@ python -m sdk.cli.algorithm-showcase-cli --help
algorithm-showcase config set-api-key YOUR_API_KEY
# 或者设置基础URL
algorithm-showcase config set-base-url http://localhost:8000
algorithm-showcase config set-base-url http://localhost:8001
```
您也可以通过环境变量设置:
```bash
export ALGORITHM_SHOWCASE_API_KEY=your_api_key_here
export ALGORITHM_SHOWCASE_BASE_URL=http://localhost:8000
export ALGORITHM_SHOWCASE_BASE_URL=http://localhost:8001
```
## 基本操作示例
@@ -223,7 +223,7 @@ algorithm-showcase openai generate-data \
```json
{
"api_key": "your_api_key_here",
"base_url": "http://localhost:8000",
"base_url": "http://localhost:8001",
"default_headers": {
"User-Agent": "algorithm-showcase-cli/1.0"
},
@@ -352,7 +352,7 @@ CLI工具支持以下环境变量
```bash
export ALGORITHM_SHOWCASE_API_KEY="your_api_key" # API密钥
export ALGORITHM_SHOWCASE_BASE_URL="http://localhost:8000" # API基础URL
export ALGORITHM_SHOWCASE_BASE_URL="http://localhost:8001" # API基础URL
export ALGORITHM_SHOWCASE_TIMEOUT="30" # 请求超时时间(秒)
export ALGORITHM_SHOWCASE_RETRY_COUNT="3" # 重试次数
export ALGORITHM_SHOWCASE_OUTPUT_FORMAT="table" # 默认输出格式