支持我
信息
这是一个适用于 1.21.11 的客户端 Fabric 模组,它会向 Google Gemini AI API 发送 HTTP 请求,以使用 Gemini 自动回复聊天消息。在服务器上使用该模组的风险由你自己承担。
依赖项
Cloth Config API(必需)
Mod Menu(可选,但建议安装以便更轻松地访问配置)
设置
要设置该模组,你必须在 Google AI Studio 中创建自己的 Gemini API 密钥并将其输入到配置中。切勿与他人分享你的 API 密钥。Gemini 有免费和付费的使用计划——请谨慎选择。你可以在 AI Studio 中跟踪你的使用情况。
要使模组正常工作,配置中必须填写的字段包括:启用模组、API 密钥、模型代码、消息延迟、最大令牌数和前缀。
配置
Gemini 模型代码 - 指定要向哪个模型发送 API 请求。详见此处
前缀 - 标记聊天中 Gemini 问题的开始。如果玩家的聊天消息包含该前缀,则其聊天消息中前缀之后的内容将被发送至 Gemini
最大令牌数 - 决定 Gemini 回复的长度。请注意 AI Studio 中的令牌使用限制
上下文消息 - 作为系统指令传递给 Gemini(可选)
初始介绍消息 - 即使它包含前缀,也会被忽略且不会发送给 Gemini。该模组不会自动发送此消息;如果你想用它来“自我介绍”为 Gemini,你需要手动发送它。

故障排除
如果你在聊天中没有收到来自 Gemini 的任何回复,请检查 Google AI Studio 中的使用页面,查看是否发出了 API 请求以及是否存在任何错误。你也可以在 Minecraft 启动器的控制台中查看任何模组错误消息。
如果你看到存在 API 错误,请尝试尝试不同的 Gemini 模型代码。有时某些 Gemini 模型会出现问题,而其他模型则可以正常工作。
如果无论使用哪个 Gemini 模型模组都无法工作,可能是你的防火墙或 ISP 阻止了 API 请求。在某些国家/地区,Gemini API 的免费和/或付费层级也可能会受到限制。
公开使用
如果你希望在自己的项目中使用本模组的资源/修改版本并公开分享它们,请注明我的署名并链接到此页面或我的 YouTube 视频。
- 只要你注明了我的署名, 你就可以在你的公共社交媒体帖子、整合包、资源包和基岩版移植版中使用此模组或来自此模组的资源
- 请勿 创建新的展示网页、下载链接,或声称是你制作了这个模组或来自此模组的资源。
- 如果你不确定, 请在 Discord 上联系我 (L33tfox) 获取许可
Support Me
Information
this is a clientside fabric mod for 1.21.11 that makes http requests to the google gemini ai api to automatically respond to chat messages using gemini. using this mod on servers is at your own risk.
Dependencies
Cloth Config API (Required)
Mod Menu (Optional, but recommended for easier config access)
Setup
To setup the mod, you must create your own Gemini API Key in Google AI Studio and enter it into the Config. Do not share your API Key with anyone. There are free and paid usage plans for Gemini - be careful about what you choose. You can track your usage in the AI Studio.
The only necessary fields in the Config for the mod to work are Mod Enabled, the API Key, Model Code, Message Delay, Max Tokens, and Prefix.
Config
Gemini Model Code - identifies what model to send api request to. Found here
Prefix - marks the start of a question for Gemini in chat. If a player's chat message contains the prefix, the contents of their chat message after the prefix will be sent to Gemini
Max Number of Tokens - determines how long Gemini's responses are. be conscious about token usage limits in AI Studio
Context Message - passed as a system instruction to Gemini (optional)
Initial Intro Message - even if it contains the prefix, it will be ignored and not sent to Gemini. this message will not be automatically sent by the mod; if you want to use it to "introduce yourself" as Gemini, you'll have to send it manually.

Troubleshooting
If you don't get any responses from Gemini in chat, check your Usage page in Google AI Studio to see if an API request was made and if there were any errors. You can also see any mod error messages in your Minecraft launcher's console.
If you see that there was an API error, try experimenting with different Gemini model codes. I've sometimes had issues with certain Gemini models but others have worked.
If the mod doesn't work no matter the Gemini model, it could be an issue with your Firewall or ISP blocking the API request. There are also certain countries where the Gemini API free and/or paid tiers are restricted.
Public Usage
if you'd like to use assets/modified versions of this mod in your own projects and publicly share them, credit me and link this page or my YouTube video.
- as long as you credit me, you may use this mod or assets from this mod in your own public social media posts, mod packs, resource packs, and bedrock ports
- please do not create new showcase webpages, download links, or claim credit for making this mod or assets from this mod.
- if you are unsure, message me on discord (L33tfox) for permission
评论 0
登录后参与评分
还没有评论,来抢沙发吧