Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

ErisPulse-AIChat 模块文档

简介

ErisPulse-AIChat 是一个基于OpenAI的智能聊天机器人模块,支持多种触发方式和上下文管理。

安装

ep install AIChat

配置

安装完毕后首次加载模块时,会自动创建一个名为 AIChat 的配置文件,配置文件内容如下:

[AIChat]
trigger_words = ["AI"]  # 触发词列表,可以是单个或多个
system_prompt = "你是一个AI助手,你叫AI,你是一个智能聊天机器人"
clear_command = "/clear"  # 清除历史记录指令
max_history_length = 10  # 最大历史消息长度

触发方式说明

  1. 默认模式:

    • 消息中包含任意触发词即可触发
    • 例如: "你好AI"、"AI你好"、"这个AI很聪明"
  2. 通配符模式:

    • 触发词列表中定义的触发词可以包含通配符 */?
    • 例如: "AI*"、"AI?你好"

其他功能

  • 使用 /clear 指令可以清除当前会话的历史记录
  • 自动管理对话上下文,可配置最大历史消息长度
  • 支持在消息前显示用户昵称,帮助AI区分不同用户

依赖

本模块依赖 ErisPulse 的 OpenAI 模块,以下是 OpenAI 模块的配置文件示例:

[OpenAI]
base_url = "https://api.openai.com/v1"
key = "您的API密钥"
model = "使用的模型"

[OpenAI.Args]
temperature = 0.7
max_tokens = 1024

参考链接

Download files

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

Source Distribution

erispulse_aichat-3.0.4.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

erispulse_aichat-3.0.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file erispulse_aichat-3.0.4.tar.gz.

File metadata

  • Download URL: erispulse_aichat-3.0.4.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for erispulse_aichat-3.0.4.tar.gz
Algorithm Hash digest
SHA256 84ab03e7a677909d51f68c317a71b3ad7892889a75904f4942effb0d760c4e5c
MD5 fa75225214eacb800b502ac7b49f9a6f
BLAKE2b-256 84912951f18dac5d5b5d7ef896bd081bfd2fa49ca11fdc258574636b0343e82d

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_aichat-3.0.4.tar.gz:

Publisher: python-publish.yml on wsu2059q/ErisPulse-AIChat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erispulse_aichat-3.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for erispulse_aichat-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 65ddf4338d6b43c13b5bf98a87d2ed27ffea91060267737ee6d513867a9913b1
MD5 64f6322ec7ee548d6693038693dfbece
BLAKE2b-256 513fd27a26ade612ea7397638b65c47bd0253bb015e9b61198700f410355aab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_aichat-3.0.4-py3-none-any.whl:

Publisher: python-publish.yml on wsu2059q/ErisPulse-AIChat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.0.4 This release

2 files

3.0.3

2 files

3.0.2

2 files

Supported by

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