generate_cga
Generate CGA rule source code from a natural-language building description or apply text instructions to existing CGA rules for CityEngine; returns editable source for parsing or model generation.
Instructions
自然语言一句话 → NL2CGA → CGA 规则源码(不渲染,同步返回)。
两种模式二选一:
text:自然语言描述,如「三层小楼,坡屋顶,底层商铺」。
base_cga + instruction:在既有 CGA 上按指令修改(如「把立面材质改成红砖」)。
LLM 兜底模式最长约 90s,属正常现象。
Returns: cga_source(可喂给 parse_cga / generate_model 的 cga_edit 回传)、 engine_path(self/kimi_fallback/hybrid)、warnings、usage。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_cga"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| base_cga | No | ||
| instruction | No |