Giter Site home page Giter Site logo

balh55y / nonebot-plugin-xinghuo-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alpaca4610/nonebot-plugin-xinghuo-api

0.0 0.0 0.0 31 KB

本插件是适配科大讯飞星火大模型官方API的聊天机器人插件,同时具有上下文记忆回复功能。

Python 100.00%

nonebot-plugin-xinghuo-api's Introduction

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-chatgpt-turbo

介绍

  • 本插件是适配科大讯飞星火大模型官方API的聊天机器人插件,同时具有上下文记忆回复功能。已适配V3.0版API及星火助手API。

安装

  • 手动安装

    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 = ""    #星火大模型的版本,默认为v1.5。使用2.0版本请填入v2,使用3.0版本请填入v3。使用助手API请输入助手id,在https://xinghuo.xfyun.cn/botcenter/createbot获取

使用方法

  • @机器人进行问答时,机器人没有上下文回复的能力
  • xh 使用该命令进行问答时,机器人具有上下文回复的能力
  • xh_clear 清除当前用户的聊天记录

nonebot-plugin-xinghuo-api's People

Contributors

alpaca4610 avatar nxhp98 avatar flakowesh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.