Bafchat
虽然已经有不少模组将 OpenAI 的 API 引入 Minecraft,但至今尚未有同样丰富的模组致力于将本地大语言模型(LLM)带入游戏。Bafchat 正是为此而生!你可以向这位新 AI 伙伴提问,或者在忘记指令或合成配方时寻求它的帮助。只要你的模型能做到,Bafchat 也能做到(前提是你已在 Bafmod3Config.json 中正确配置了提示词)。
此外,OpenAI 的 API 并非无限免费使用,一旦额度用完便需要付费。Bafchat 由托管在你自己电脑(或局域网)上的 LLM 提供支持,因此你可以放心实验,无需担心产生额外费用。
默认配置
默认情况下,Bafchat 已预配置为与 local.ai 服务器 配合工作,但我相信它也能与其他服务配合,例如 Kobold 和 Oobabooga 提供的服务。
目前推荐的模型是 RedPajama-INCITE-Chat-3B-v1,因为它是一个小型模型,能够在 CPU 上相对快速地处理提示词,但作为权衡,其回复质量仍有待提高。
注意: 如果你选择其他模型,则必须修改 Bafmod3Config.json 中的提示词风格,否则可能会得到意想不到的结果。
其他注意: 在编辑 Bafmod3Config.json 中的提示词时,请确保保留占位符 {{message}},并将其放置在你希望游戏内消息出现在模板中的位置。
功能
- 一个用于本地托管的大型语言模型 API 的主要功能前端。
- 使用
/llm 向你的模型发送消息。
- 在游戏中修改
Bafmod3Config.json!只需使用 /bafmod set,如果出错,可以使用 /bafmod reset 将其恢复为默认值。
- 可在
.minecraft/config 目录下的 Bafmod3Config.json 中调整提示词和 API URL。
依赖项
- 本地托管的 LLM API
- Fabric Kotlin
- Fabric API
- Fabric
- Minecraft 1.20 及更高版本
已知小问题
- 如果你的 API 托管在与 Minecraft 服务器(如果是单人游戏则包括客户端)相同的机器上,且你的电脑性能不是特别强大,在处理提示词期间游戏可能会出现暂时性的卡顿。使用更小、经过量化的语言模型有助于缓解这一问题。
Bafchat
While there are already plenty of mods around which bring OpenAI's API into Minecraft, there hasn't yet been the same abundance of mods seeking to bring local LLMs into the game. Bafchat is here to save the day! Ask your new AI buddy questions, or maybe get some help when you've forgotten a command or crafting recipe. If your model can do it, Bafchat can do it too (provided you have the prompt correctly configured in Bafmod3Config.json).
Also, OpenAI's API doesn't have unlimited free use, so once you run out of credits you have to pay. Bafchat is powered by LLMs hosted on your own computer (or local network), so you can experiment without worry of racking up charges.
Default Configuration
By default, Bafchat is pre-configured to work with local.ai's server, but I believe it should work with others such as those provided by Kobold and Oobabooga.
The recommended model as of right now is RedPajama-INCITE-Chat-3B-v1 because it is a small model that processes prompts relatively fast on CPU, however as a trade-off, its responses leave much to be desired.
NOTE: If you do elect to choose a different model, you will have to modify the prompting style in Bafmod3Config.json, otherwise you may get unexpected results.
OTHER NOTE: When editing the prompt in Bafmod3Config.json, please ensure you keep the placeholder {{message}} in the prompt, placing it where you want your in-game messages to go in the template.
Features
- A mostly functional front-end for locally hosted APIs of large language models.
- Use
/llm to send a message to your model.
- Modify the Bafmod3Config.json in-game! Just use
/bafmod set, or if you mess it up you can use /bafmod reset to return it to default.
- Prompts and API URL can be adjusted in the Bafmod3Config.json located in your .minecraft/config
Requirements
- A locally hosted API for an LLM
- Fabric Kotlin
- Fabric API
- Fabric
- Minecraft 1.20 and newer
Slight issues
- If the API is hosted on the same machine as your Minecraft server (which includes the client if playing singleplayer) and your computer isn't particularly powerful, your game may temporarily slow down while the prompt is processed. Using smaller, and quantised language models can help counteract this.
评论 0
登录后参与评分
还没有评论,来抢沙发吧