koishi-plugin-image-prompt 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.js +802 -0
- package/package.json +28 -0
- package/readme.md +46 -0
- package/src/index.ts +874 -0
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "koishi-plugin-image-prompt",
|
|
3
|
+
"description": "多功能 AI 图像处理插件,支持手办化、Coser化、Minecraft化等47种风格转换,并提供自定义提示词和多图融合功能",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"typings": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib",
|
|
9
|
+
"src"
|
|
10
|
+
],
|
|
11
|
+
"license": "GPL-3.0",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"chatbot",
|
|
14
|
+
"koishi",
|
|
15
|
+
"plugin",
|
|
16
|
+
"手办化"
|
|
17
|
+
],
|
|
18
|
+
"contributors": [
|
|
19
|
+
"maimai993 <3544815113@qq.com>"
|
|
20
|
+
],
|
|
21
|
+
"homepage": "https://github.com/maimai993/image-prompt",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/maimai993/image-prompt/issues"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"koishi": "^4.18.7"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# koishi-plugin-image-prompt
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/koishi-plugin-image-prompt)
|
|
4
|
+
|
|
5
|
+
🎯 **一键将图片转换为手办风格!**
|
|
6
|
+
|
|
7
|
+
基于 OpenAI 兼容的 Chat Completions 接口,支持多种 AI 绘图模型,让你的图片瞬间变成精美手办。
|
|
8
|
+
|
|
9
|
+
## ⚙️ 插件设置
|
|
10
|
+
|
|
11
|
+
直接在 Koishi 控制台的插件设置中填写「API 设置」即可:
|
|
12
|
+
|
|
13
|
+
| 配置项 | 说明 | 默认值 |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| API 服务器地址(baseUrl) | OpenAI 兼容的 Chat Completions 接口地址 | `https://api.gptgod.online/v1/chat/completions` |
|
|
16
|
+
| 使用的模型(model) | 生成图片所使用的模型名称 | `gemini-2.5-flash-image` |
|
|
17
|
+
| API 密钥(apiKey) | 你的 API Key(请求会携带 `Authorization: Bearer <key>`) | 空 |
|
|
18
|
+
| 最大重试次数 | 请求失败后的最大重试次数 | 3 |
|
|
19
|
+
| 重试间隔(毫秒) | 每次重试之间的等待时间 | 1000 |
|
|
20
|
+
|
|
21
|
+
建议前往[gptgod](https://gptgod.online/register/n7iydg8nf09ghbikik3jytod)获取你的api key
|
|
22
|
+
|
|
23
|
+
> 注意:请填写支持图片输入(vision / image)的模型,否则无法正常生成图片。
|
|
24
|
+
|
|
25
|
+
## 📖 使用说明
|
|
26
|
+
|
|
27
|
+
配置完成后即可使用内置指令生成图片,例如:
|
|
28
|
+
|
|
29
|
+
- 手办化
|
|
30
|
+
- 手办化2
|
|
31
|
+
- 手办化3
|
|
32
|
+
- coser化
|
|
33
|
+
- mc化
|
|
34
|
+
- 合并图片(自定义指令,允许附带自定义提示词)
|
|
35
|
+
- 修图(自定义指令)
|
|
36
|
+
|
|
37
|
+
## 🔧 常见问题
|
|
38
|
+
|
|
39
|
+
### Q: 提示生成失败
|
|
40
|
+
**A:** 检查 baseUrl 是否可访问、apiKey 是否正确、所用模型是否支持图片输入。
|
|
41
|
+
|
|
42
|
+
### Q: API 返回 401
|
|
43
|
+
**A:** 确认 apiKey 已正确填写,并且服务端允许 Bearer Token 鉴权。
|
|
44
|
+
|
|
45
|
+
### Q: API 返回 429 或配额不足
|
|
46
|
+
**A:** 检查账户额度,插件检测到配额不足会自动停止重试。
|