Generate Minecraft 3D Build Plan
Call Craftsman Agent API OneKey Router to generate a Minecraft 3D scene build plan.
Quick Start
- 1. Set your environment variable
DEEPNLP_ONEKEY_ROUTER_ACCESS. - Use the CLI (primary suggested method) or the provided scripts.
Usage
1. CLI (Recommended)
CLI Illustration
onekey agent <unique_id> <api_id> $JSON --timeout 30000
- -
<unique_id>: the unique identifier of the onekey routed agents, "owner/repo". - INLINECODE2 : refers to the unique endpoint name of API.
- INLINECODE3 : the json string passed to cli.
- INLINECODE4 : controlls the timeout of API calling, unit is mill seconds.
Example
CODEBLOCK1
2. Python REST API
CODEBLOCK2
3. TypeScript REST API
CODEBLOCK3
Authentication
Remember to set the environment variable:
export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_ACCESS_KEY
Get your key at
DeepNLP Workspace.
Demo Result
CODEBLOCK5
生成Minecraft 3D建筑方案
调用Craftsman Agent API OneKey Router生成Minecraft 3D场景建筑方案。
快速开始
- 1. 设置环境变量 DEEPNLPONEKEYROUTER_ACCESS。
- 使用CLI(推荐方式)或提供的脚本。
使用方法
1. CLI(推荐)
CLI说明
shell
onekey agent <唯一标识>
$JSON --timeout 30000
- - <唯一标识>:OneKey路由代理的唯一标识,格式为所有者/仓库。
- :API的端点名称。
- $JSON:传递给CLI的JSON字符串。
- --timeout:控制API调用的超时时间,单位为毫秒。
示例
bash
export DEEPNLPONEKEYROUTERACCESS=YOURACCESS_KEY
onekey agent craftsman-agent/craftsman-agent generateminecraftbuild_plan {prompt:Minecraft场景:草地、TNT方块和紫色水晶,images:[],mode:basic} --timeout 30000
2. Python REST API
bash
python3 scripts/generateminecraftbuild_plan.py --prompt Minecraft场景:草地、TNT方块和紫色水晶 --mode basic
3. TypeScript REST API
bash
node scripts/generateminecraftbuild_plan.ts --prompt Minecraft场景:草地、TNT方块和紫色水晶 --mode basic
身份验证
请记得设置环境变量:
bash
export DEEPNLPONEKEYROUTERACCESS=YOURACCESS_KEY
在DeepNLP工作台获取您的密钥。
演示结果
json
{success:true,text:,images:[{url:https://us-static.aiagenta2z.com/local/files-wd/onekeyllmrouter/efd67a8f-a427-4e56-8b00-c02d4eb332d5.png}]}