final version
This commit is contained in:
@@ -14,7 +14,7 @@ from algorithm_showcase import AlgorithmShowcaseClient
|
||||
def parse_args():
|
||||
"""解析命令行参数"""
|
||||
parser = argparse.ArgumentParser(description='智能算法展示平台命令行工具')
|
||||
parser.add_argument('--base-url', default='http://localhost:8000/api/v1', help='API基础URL')
|
||||
parser.add_argument('--base-url', default='http://localhost:8001/api/v1', help='API基础URL')
|
||||
parser.add_argument('--api-key', default=None, help='API密钥')
|
||||
|
||||
subparsers = parser.add_subparsers(dest='command', help='子命令')
|
||||
|
||||
@@ -4,7 +4,7 @@ info:
|
||||
description: 智能算法展示平台的RESTful API接口文档
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: http://localhost:8000/api/v1
|
||||
- url: http://localhost:8001/api/v1
|
||||
description: 本地开发环境
|
||||
|
||||
components:
|
||||
|
||||
@@ -27,7 +27,7 @@ const AlgorithmShowcaseClient = require('algorithm-showcase-sdk');
|
||||
|
||||
// 初始化客户端
|
||||
const client = new AlgorithmShowcaseClient(
|
||||
'http://localhost:8000/api/v1', // API基础URL
|
||||
'http://localhost:8001/api/v1', // API基础URL
|
||||
'your-api-key' // 可选,API密钥
|
||||
);
|
||||
```
|
||||
|
||||
@@ -13,7 +13,7 @@ class AlgorithmShowcaseClient {
|
||||
* @param {string} baseUrl - API基础URL
|
||||
* @param {string} apiKey - API密钥
|
||||
*/
|
||||
constructor(baseUrl = 'http://localhost:8000/api/v1', apiKey = null) {
|
||||
constructor(baseUrl = 'http://localhost:8001/api/v1', apiKey = null) {
|
||||
this.baseUrl = baseUrl.replace(/\/$/, '');
|
||||
this.apiKey = apiKey;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from algorithm_showcase import AlgorithmShowcaseClient
|
||||
|
||||
# 初始化客户端
|
||||
client = AlgorithmShowcaseClient(
|
||||
base_url="http://localhost:8000/api/v1", # API基础URL
|
||||
base_url="http://localhost:8001/api/v1", # API基础URL
|
||||
api_key="your-api-key" # 可选,API密钥
|
||||
)
|
||||
```
|
||||
|
||||
@@ -10,7 +10,7 @@ from .models import Algorithm, AlgorithmVersion, AlgorithmCallRequest, Algorithm
|
||||
class AlgorithmShowcaseClient:
|
||||
"""智能算法展示平台客户端类"""
|
||||
|
||||
def __init__(self, base_url: str = "http://localhost:8000/api/v1", api_key: Optional[str] = None):
|
||||
def __init__(self, base_url: str = "http://localhost:8001/api/v1", api_key: Optional[str] = None):
|
||||
"""初始化客户端
|
||||
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user