本模组添加了一个 /buildgpt 命令,允许玩家使用自定义提示词将 AI 生成的结构放置到世界中。
设置
要使本模组正常工作,需要一个 OpenAI Key(API 密钥)。
在 config 文件夹中创建一个名为 .openaikey 的文件,或者运行一次带有有效参数的 /buildbpt 命令以生成该文件,然后将你的 API Key 填入其中。
现在命令应该可以正常工作了!
此外,API Key 还需要 OpenAI 账户拥有可用的额度!
命令
该命令有两种模式:
Bound(有界)
/buildgpt bound <x> <y> <z> <x> <y> <z> <prompt>
此模式允许用户设置一个包围盒,模组不会在包围盒之外放置任何方块。
提示词用于指导 ChatGPT 在该范围内生成结构,但模组在收到响应后还会进行检查,过滤掉任何超出包围盒的方块。
Unbound(无界)
/buildgpt unbound <x> <y> <z> <prompt>
此模式仅有一个起始点,AI 通常会(在大多数情况下)从该点开始向坐标增大的方向生成结构。
当然,这并不总是成立,因为 ChatGPT 有时会返回具有意外行为的有趣响应,这也是 bound 模式存在的原因。unbound 模式应谨慎使用,因为已放置的方块无法撤销。在测试过程中,我注意到除非特别提示,否则结构通常不会超过 20x20x20 方块的立方体范围。
提示词
模组中预设了一个提示词,这意味着用户只需在命令的 <prompt> 字段中输入建筑名称或描述即可,因为模组要求响应以特定格式返回。
你也可以通过在命令的 <prompt> 字段中输入自定义提示词来覆盖默认提示词。
This mod adds a /buildgpt command that allows the player to place AI generated structures into the world with a customizable prompt.
Setup
An OpenAI Key is required for this mod in order to work.
create a file .openaikey in the config folder or run the /buildbpt command with valid parameters once to generate the file and then place your API Key in there.
The command should now work!
Additionally The API Key requires account credits on OpenAI!
Command
The command has 2 modes:
Bound
/buildgpt bound <x> <y> <z> <x> <y> <z> <prompt>
This mode allows the user to set a bounding box outside of which the mod won't place any blocks.
The prompt is directing ChatGPT to generate a structure within those bounds but the mod also has a check after the response, that filters out any blocks outside the bounding box.
Unbound
/buildgpt unbound <x> <y> <z> <prompt>
This mode only has a starting point from which the AI will (in most cases) generate the structure towards increasing coordinates.
Of course this is not always the case as ChatGPT can sometimes return funny responses with unexpected behaviour, which is why the bound mode exists and the unbound mode should by used with caution, since placed blocks cannot be undone. During testing, I noticed that structures will usually not exceed a 20x20x20 block cube unless prompted to do otherwhise.
Prompt
There is a predefined prompt in the Mod, meaning that the user is only required to input the building name or description into the <prompt> field of the command, since the mod requires the response to be formatted a certain way.
The prompt can also be overwritten by inputting a custom prompt into the <prompt> field of the command.
评论 0
登录后参与评分
还没有评论,来抢沙发吧