Skip to main content

nonebot_plugin_writer

✨ 基于 百度文心大模型 的 NoneBot2 promote索引文字生成插件 ✨

python onebot11 nonebot2 AABT AABT

修改自 nonebot-plugin-drawer 同时给我提供了非常多的思路

[百度文心大模型] https://wenxin.baidu.com/moduleApi/ernie3

一切开发旨在学习,请勿用于非法用途

侵权联系angjustin@163.com

前提: nonebot2的部署

[nonebot2 官方] https://nb2.baka.icu/

[昂昂bot的安装流程] https://github.com/ANGJustinl/ANGANGBOT/edit/main/README.md

[带佬提供的教程] https://zhuanlan.zhihu.com/p/371264976


| 使用未在其他环境编译的插件可能会遇到各种花里胡哨的麻烦,如果没有一些基础的话,前面可是困难重重啊少年

| 本文内容请您自行判断是否可信可靠可用,若您根据本文内容建立和使用AABT时出了任何问题和不良结果,鄙人概不负责。

| 安装流程 🚀

Ⅰ.通过nb-cli安装(推荐)

nb plugin install nonebot-plugin-drawer

Ⅱ.通过pip安装

1.pip install nonebot-plugin-writer 进行安装  
2.在bot.py添加nonebot.load_plugin('nonebot_plugin_writrer')

Ⅲ.配置env.*

请在env.*配置文件中加入如下几行

wenxin_ak = "xxxxxxxxxxxxxxxx"
wenxin_sk = "xxxxxxxxxxxxxxxx"
wenxin_cd_time = 300 # 技能冷却时间,以秒为单位
wenxin_manager_list = ["123456789", "98765432"] # 管理员列表(不触发冷却时间限制)

文心的ak和sk申请链接:https://wenxin.baidu.com/younger/apiDetail?id=20008

| 使用方法(仅支持群聊)

触发菜单命令:写作帮助

当前支持 作文zuowen, 文案adtext, 摘要Summarization, 对联couplet, 自由问答PARAGRAPH, 小说novel, 补全文本cloze 如: PARAGRAPH 疯狂星期四v我50

| 非常重要的配置(动手能力强者自改)

详见插件安装目录

[nonebot_plugin_writer/writer.py]中20至30行

async def get_rst(input_text,input_len_max,input_topp,input_len_min,input_penalty,input_mode): input_dict = { "text": input_text, "seq_len": 512, "topp": 0.8, "penalty_score": 1.2, "min_dec_len": 128, "is_unidirectional": 0, "task_prompt": input_mode, "logits_bias": "-5" }

此段为文心模型input内容

具体命令及其用法详见 https://wenxin.baidu.com/wenxin/docs#dl6tgxw5f

可根据任务需求进行配置

| 👥反馈与交流

Issue for sure

QQ:77139032

群聊:696748432

ANGANGBOT研磨会

mail:angjustin@163.com

bilibili:https://space.bilibili.com/213993950?spm_id_from=333.1007.0.0

Metadata

Release files for nonebot-plugin-writer 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-writer 0.2.1
File Size Uploaded Provenance
nonebot_plugin_writer-0.2.1.tar.gz 18.6 kB Without provenance Details

Release files / nonebot_plugin_writer-0.2.1.tar.gz

Download URL nonebot_plugin_writer-0.2.1.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9a8b4d98d6f61b05299d1bd754f6b68b1887b0360e853bda1c8f661ed1d21d36
BLAKE2b-256 checksum
How to use checksums
b27739100b9f689f4a3a91902cbb6214d94651dd10803a57e508759e49a04a43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Security for nonebot-plugin-writer 0.2.1

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page