Interacts with the Forge AI platform API using src/forge-skill/forge_client.py.
bash
python3 src/forge-skill/forge_client.py <command> [args]
CommandUsageLoginforge_client.py login <email> <password>Meforge_client.py meLogoutforge_client.py logout
CommandUsageListforge_client.py article list [--name <keyword>]Createforge_client.py article create <file.json>Updateforge_client.py article update <file.json>
Lists local .forgeai/articles/ JSON files. Use --name to filter by title.
CommandUsageListforge_client.py evaluation list [--name <keyword>]Createforge_client.py evaluation create <file.json>Updateforge_client.py evaluation update <file.json>
Lists local .forgeai/evaluations/ JSON files. Use --name to filter by title.
CommandUsageListforge_client.py tag listCreateforge_client.py tag create <name> [--color #6366F1]
CommandUsageUploadforge_client.py upload <file> [--storage-path <path>]
Uploads an image or file to cloud storage and returns a URL.
The JSON file is the exact data field sent in the API request body.
article-crud)#json
{
"title": "My Article Title",
"content": "# Content in markdown...",
"tags": ["tag_id_1", "tag_id_2"],
"coverImage": "https://example.com/cover.jpg",
"type": 0
}
article-crud)#Add articleId with the pending wrapper:
json
{
"articleId": "art_xxx",
"pending": {
"title": "Updated Title",
"content": "# Updated content...",
"tags": ["tag_id_1"],
"coverImage": "https://example.com/new-cover.jpg"
}
}
evaluation-crud)#json
{
"pending": {
"modelName": "GPT-4",
"skillName": "Code Generation",
"title": "Evaluation Title",
"content": "# Evaluation content...",
"modelVersion": "2024-05",
"skillDescription": "Generate production code",
"skillTags": "python, go",
"overallScore": 85,
"dimensions": {
"准确性": 90,
"推理能力": 80
},
"remark": "Good overall performance"
}
}
evaluation-crud)#Add evaluationId:
json
{
"evaluationId": "ev_xxx",
"pending": {
"modelName": "GPT-4",
"skillName": "Code Generation",
"title": "Updated Evaluation",
"content": "# Updated content..."
}
}
FilePurpose.forgeai/session.jsonAuth token and user info (auto-managed).forgeai/tags.jsonCached tags (auto-managed).forgeai/articles/Article JSON files (user-managed).forgeai/evaluations/Evaluation JSON files (user-managed)
forge_client.py login user@example.com mypassword.json file matching the HTTP body structureforge_client.py article create .forgeai/articles/my-article.jsonforge_client.py article update .forgeai/articles/my-article.json