Skip to content

Commit

Permalink
actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Asankilp committed Oct 1, 2024
1 parent f5e8f43 commit 2406a2b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 10 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
username: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ _✨ 使用 Azure OpenAI 推理服务的聊天机器人插件 ✨_

## 📖 介绍

通过调用由 Azure OpenAI 驱动,GitHub Models 提供访问的生成式 AI 推理 API 来实现聊天的插件。
插件内置了猫娘小棉(Marsho)的人物设定,可以进行可爱的聊天!
*谁不喜欢回复消息快又可爱的猫娘呢?*
**※对 Azure AI Studio等的支持待定。**
通过调用由 Azure OpenAI 驱动,GitHub Models 提供访问的生成式 AI 推理 API 来实现聊天的插件。
插件内置了猫娘小棉(Marsho)的人物设定,可以进行可爱的聊天!
*谁不喜欢回复消息快又可爱的猫娘呢?*
**※对 Azure AI Studio等的支持待定。对 OneBot 以外的适配器支持未经过完全验证。**

## 🐱 设定
#### 基本信息
Expand Down Expand Up @@ -94,8 +94,8 @@ _✨ 使用 Azure OpenAI 推理服务的聊天机器人插件 ✨_
发送`marsho`指令可以获取使用说明

## 👍 夸赞名单
夸赞名单存储于 Bot 工作目录的`praises.json`下,当配置项为`true`时发起一次聊天后自动生成,包含人物名字与人物优点两个基本数据。
存储于其中的人物会被 Marsho “认识”和“喜欢”。
夸赞名单存储于 Bot 工作目录的`praises.json`下,当配置项为`true`时发起一次聊天后自动生成,包含人物名字与人物优点两个基本数据。
存储于其中的人物会被 Marsho “认识”和“喜欢”。
其结构类似于:
```json
{
Expand All @@ -120,7 +120,7 @@ _✨ 使用 Azure OpenAI 推理服务的聊天机器人插件 ✨_
| 配置项 | 必填 | 默认值 | 说明 |
| :---------------: | :--: | :----: | :----------------------------------------------------------: |
| MARSHOAI_TOKEN ||| 调用 API 必需的 token |
| MARSHOAI_DEFAULT_MODEL || `gpt-4o` | Marsho 默认调用的模型 |
| MARSHOAI_DEFAULT_MODEL || `gpt-4o-mini` | Marsho 默认调用的模型 |
| MARSHOAI_PROMPT || 猫娘 Marsho 人设提示词 | Marsho 的基本系统提示词 |
| MARSHOAI_ADDITIONAL_PROMPT ||| Marsho 的扩展系统提示词 |
| MARSHOAI_ENABLE_PRAISES || `true` | 是否启用夸赞名单功能 |
Expand Down
1 change: 0 additions & 1 deletion nonebot_plugin_marshoai/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from nonebot.adapters import Message
from nonebot.params import CommandArg
from nonebot.permission import SUPERUSER
#from .acgnapis import *
from nonebot_plugin_alconna import on_alconna, MsgTarget
from nonebot_plugin_alconna.uniseg import UniMessage, UniMsg
from arclet.alconna import Alconna, Args, AllParam
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "nonebot-plugin-marshoai"
version = "0.1"
description = "Nonebot2插件,从哔哩哔哩会员购获取简易展览数据"
description = "Nonebot2插件,调用Azure OpenAI服务实现猫娘聊天"
readme = "README.md"
requires-python = "<4.0,>=3.9"
authors = [{ name = "Asankilp", email = "[email protected]" }]
Expand All @@ -10,7 +10,8 @@ dependencies = [
"nonebot-plugin-alconna>=0.48.0",
"azure-ai-inference>=1.0.0b4",
"zhDatetime>=1.1.0",
"aiohttp>=3.9"
"aiohttp>=3.9",
"httpx>=0.27.0"
]
license = { text = "MIT" }

Expand Down

0 comments on commit 2406a2b

Please sign in to comment.