介绍
- 本插件是适配科大讯飞星火大模型官方API的聊天机器人插件,同时具有上下文记忆回复和自定义人格功能。已适配版本:Ultra,Max,Pro,Pro-128K,V2.0,Lite。
- 当前版本可能会与LittlePaimon机器人冲突
安装
-
手动安装
git clone https://github.com/Alpaca4610/nonebot-plugin-xinghuo-api.git下载完成后在bot项目的pyproject.toml文件手动添加插件:
plugin_dirs = ["xxxxxx","xxxxxx",......,"下载完成的插件路径/nonebot-plugin-xinghuo-api"] -
使用 pip
pip install nonebot-plugin-xinghuo-api
配置文件
必选内容: 在Bot根目录下的.env文件中填入科大讯飞提供的API调用鉴权信息:
xinghuo_app_id = xxxxxxxx
xinghuo_api_secret = xxxxxxxx
xinghuo_api_key = xxxxxxxx
可选内容:
xinghuo_enable_private_chat = True # 私聊开关,默认开启,改为False关闭
xinghuo_api_version = "" #星火大模型的版本,默认为免费的Lite模型,可选填:Ultra,Max,Pro,Pro-128K,V2.0,Lite
xinghuo_api_prompt = "" # 星火大模型人格prompt,留空默认不开启,人格设置是否成功与人格prompt有关
使用方法
- xh 获取回复,没有上下文回复的能力
- XH 获取回复,具有上下文回复的能力
- xh_clear 清除当前用户的聊天记录
Metadata
Release files for nonebot-plugin-xinghuo-api 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_xinghuo_api-2.4.0.tar.gz | 4.2 kB | Without provenance | Details for nonebot_plugin_xinghuo_api-2.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_xinghuo_api-2.4.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_xinghuo_api-2.4.0-py3-none-any.whl |
Total release size: 9.3 kB
Release files / nonebot_plugin_xinghuo_api-2.4.0.tar.gz
| Download URL | nonebot_plugin_xinghuo_api-2.4.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ec11a62ba24b52d5f9949f8ab6f57d904e257e1d71b3ad98a422f5caa5e4a6
|
|
BLAKE2b-256 checksum How to use checksums |
13839918e7bdd2c2fb78ed905d1caa981aa14f206e89d8e798538a5b5aa1627b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.8.0 Windows/10
|
Release files / nonebot_plugin_xinghuo_api-2.4.0-py3-none-any.whl
| Download URL | nonebot_plugin_xinghuo_api-2.4.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c2583665a1faad1fc0954ba0986d4503b14faf2a198ab520028e6795231c15b
|
|
BLAKE2b-256 checksum How to use checksums |
326e62f4b51f8c9fa064fb9b4fe2372cb182defabf587fa61bbebaba55073e4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.8.0 Windows/10
|
Security for nonebot-plugin-xinghuo-api 2.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.