Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持上下文存储 & 持续对话能力 #30

Merged
merged 10 commits into from
Feb 16, 2023
Merged

Conversation

chapin666
Copy link
Contributor

@chapin666 chapin666 commented Feb 13, 2023

支持上下文存储 & 持续对话能力

实现参考:#3

    1. 使用sessionId设置唯一标识。sessionId = chatId + userId
    1. 当某个 sessionId 会话达到 OPENAI_MAX_TOKEN, 则从第一条历史记录开始删除
    1. 使用 “/clear” 指令清理历史记录 ,使用 "/help" 指令获取帮助

@chapin666 chapin666 changed the title Master 支持上下文存储 & 持续对话能力 Feb 13, 2023
@lidaobing
Copy link
Contributor

建议使用 /clear 来做清除指令,然后加上 /help 来返回支持的指令

event.js Outdated Show resolved Hide resolved
Copy link
Owner

@bestony bestony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要根据 aircode 的 DB 做一定的修改

@chapin666
Copy link
Contributor Author

需要根据 aircode 的 DB 做一定的修改

已更新代码

@chapin666 chapin666 requested a review from bestony February 15, 2023 03:12
@ThomasLiuSeu
Copy link

666 刚试了一下,可以支持上下文的

@bestony bestony marked this pull request as draft February 16, 2023 06:19
@bestony bestony marked this pull request as ready for review February 16, 2023 10:42
@bestony bestony merged commit ae26295 into bestony:master Feb 16, 2023
@bestony
Copy link
Owner

bestony commented Feb 16, 2023

@chapin666 我已经合并了你的代码,但希望你可以在当前的 master 的基础之上补充更多的 Logger 函数,以协助处理更多的场景下的问题。

@bestony bestony mentioned this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants