Skip to main content

All-in-One Large Model Chat Plugin

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-aiochatllm

✨ 多合一LLM聊天插件 ✨

GitHub License pypi python

[!important] 本项目仅支持 Python3.10及以上 的版本

[!note] 代码质量不高。作者没有什么时间维护本项目。

项目依赖

介绍

本插件为Bot提供LLM聊天服务,包含输出内容审核、长期记忆。

安装

前置步骤:将pyproject.toml内的3.9修改为3.10

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-aiochatllm
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-aiochatllm
pdm
pdm add nonebot-plugin-aiochatllm

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_aiochatllm"]

配置

配置项 描述 示例值或说明
聊天大模型配置
CHAT__BASE_URL 聊天服务的基本URL https://api.example.com
CHAT__API_KEY 访问聊天服务所需的API密钥 your_chat_api_key_here
CHAT__MODEL_NAME 使用的聊天模型名称 ChatModel
CHAT__PRESETS 预设字典 {"preset1": "value1", "preset2": "value2"}
CHAT__DEFAULT_PRESET 默认使用的预设值 default
摘要大模型配置
SUMMARY__BASE_URL 摘要服务的基本URL https://api.example.com
SUMMARY__API_KEY 访问摘要服务所需的API密钥 your_summary_api_key_here
SUMMARY__MODEL_NAME 使用的摘要模型名称 SummaryModel
嵌入模型配置 配置后禁止更改
EMBED__BASE_URL 嵌入服务的基本URL https://api.example.com
EMBED__API_KEY 访问嵌入服务所需的API密钥 your_embed_api_key_here
EMBED__MODEL_NAME 使用的嵌入模型名称 EmbedModel
EMBED__DIMENSION 嵌入向量的维度 1024
阿里云内容审核配置
CENSOR__ACCESS_KEY_ID 访问阿里云内容审核服务的Access Key ID your_censor_access_key_id_here
CENSOR__ACCESS_KEY_SECRET 访问阿里云内容审核服务的Access Key Secret your_censor_access_key_secret_here

注意事项:

  • 嵌入模型配置一旦设置后禁止更改,请谨慎配置。

TODO

  • 完善命令
  • 完善配置
  • 完善记忆系统
  • 增加识图功能
  • 增加语音识别
  • 增加更多向量数据库

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_aiochatllm-0.1.3.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_aiochatllm-0.1.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_aiochatllm-0.1.3.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_aiochatllm-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c5162a2b202f93dfe99d7439484d80b69b84420067022c4f3a58b19a17fe8924
MD5 a59fcb2096dbf0eebaa05792fef51d0f
BLAKE2b-256 64942f56c214c81ab206e4af096df32dccc40de3089530908dae33e6c4968a3f

See more details on using hashes here.

File details

Details for the file nonebot_plugin_aiochatllm-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_aiochatllm-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5561167d3d96aac84aeb47eeae2f7310f54aae702fd4ad8b9507e79d4d3b6191
MD5 8ad188693a7ba2bd96f0af33b5e28e67
BLAKE2b-256 f114ada97d906c948d3de43bc39506f01d084c91c97cd1a1ee07fd34a4dc26c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page