mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
28 lines
610 B
Python
28 lines
610 B
Python
from ..aamgr import AbstractCommandNode, Context
|
|
|
|
|
|
@AbstractCommandNode.register(
|
|
parent=None,
|
|
name="continue",
|
|
description="继续未完成的响应",
|
|
usage="!continue",
|
|
aliases=[],
|
|
privilege=1
|
|
)
|
|
class ContinueCommand(AbstractCommandNode):
|
|
@classmethod
|
|
def process(cls, ctx: Context) -> tuple[bool, list]:
|
|
import pkg.openai.session
|
|
import config
|
|
session_name = ctx.session_name
|
|
|
|
reply = []
|
|
|
|
session = pkg.openai.session.get_session(session_name)
|
|
|
|
text, _, _ = session.append()
|
|
|
|
reply = [text]
|
|
|
|
return True, reply
|