npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

koishi-plugin-koishiaimix

v1.2.5

Published

基于AiHubMix API的AI对话和绘图插件,支持多种AI模型的聊天对话和图像生成功能,现已支持xAI Grok绘图

Downloads

144

Readme

KoishiAiMix

npm

基于AiHubMix API的Koishi插件,提供AI对话和绘图功能。

功能特性

  • 🤖 AI对话: 支持多种AI模型的智能对话
  • 🎨 AI绘图: 支持文生图和图文生图功能
  • 🖼️ 图片编辑: 支持基于描述的图片编辑
  • 💬 上下文管理: 智能的多轮对话上下文管理
  • ⚙️ 灵活配置: 可配置API密钥、模型选择、参数设置等
  • 📝 丰富指令: 提供友好的指令系统

安装方法

  1. 确保已安装Koishi框架
  2. 将插件放置在external目录下
  3. 在Koishi配置中启用koishiaimix插件
  4. 配置AiHubMix API密钥

使用方法

AI对话

aimix 你好,请介绍一下自己
ai 今天天气怎么样?

支持图文混合对话,可以发送图片并询问相关问题。

AI绘图

aimix.draw 一只可爱的小猫
draw 夕阳下的城市 -s 1536x1024 -q high
paint 科幻风格的机器人 --size=1024x1536 --quality=high --count=2

绘图参数

  • -s, --size: 图片尺寸
  • -q, --quality: 图片质量
  • -n, --count: 生成数量(1-4)

图片编辑

aimix.edit 把背景改成蓝天白云

需要先上传要编辑的图片。

其他指令

aimix.clear          # 清除对话上下文
aimix.config         # 查看配置信息
aimix.test           # 测试API连接
aimix.help           # 显示帮助信息

API密钥获取

  1. 访问 AiHubMix官网
  2. 注册账号并登录
  3. 前往 API密钥页面
  4. 创建新的API密钥
  5. 将密钥配置到插件中

配置说明

必需配置

  • apiKey: AiHubMix API密钥(必填)

可选配置

API配置

  • baseUrl: API基础URL(默认: https://aihubmix.com/v1
  • timeout: 请求超时时间,单位秒(默认: 60
  • retryCount: 重试次数(默认: 2

对话配置

  • chatModel: 对话模型(默认: gpt-3.5-turbo
  • maxTokens: 最大token数(默认: 2048
  • temperature: 温度参数,0-2(默认: 0.7

绘图配置

  • imageModel: 绘图模型(默认: gpt-image-1
  • imageSize: 图片尺寸(默认: 1024x1024
  • imageQuality: 图片质量(默认: medium

功能开关

  • enableChat: 启用AI对话功能(默认: true
  • enableImage: 启用AI绘图功能(默认: true

支持的模型

对话模型

  • gpt-3.5-turbogpt-4gpt-4-turbo
  • claude-3-sonnetclaude-3-haiku
  • 更多模型请查看AiHubMix官方文档

绘图模型

  • gpt-image-1: OpenAI官方绘图模型
  • gpt-4o-image: GPT-4o绘图(逆向)
  • gpt-4o-image-vip: GPT-4o绘图VIP版本

常见问题

Q: API密钥无效怎么办?

A: 请检查API密钥是否正确,确保以sk-开头且长度足够。

Q: 请求超时怎么办?

A: 可以增加timeout配置值,或检查网络连接。

Q: 绘图失败怎么办?

A: 检查描述是否包含敏感内容,避免使用在世艺术家名称。

Q: 如何清除对话历史?

A: 使用aimix.clear指令清除当前用户的对话上下文。

相关链接


如果这个插件对您有帮助,请考虑给项目点个⭐️!