mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 11:29:39 +08:00
refactor: session append重命名为query
This commit is contained in:
@@ -194,7 +194,7 @@ class Session:
|
|||||||
|
|
||||||
# 请求回复
|
# 请求回复
|
||||||
# 这个函数是阻塞的
|
# 这个函数是阻塞的
|
||||||
def append(self, text: str=None) -> tuple[str, str, list[str]]:
|
def query(self, text: str=None) -> tuple[str, str, list[str]]:
|
||||||
"""向session中添加一条消息,返回接口回复
|
"""向session中添加一条消息,返回接口回复
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def process_normal_message(text_message: str, mgr, config, launcher_type: str,
|
|||||||
try:
|
try:
|
||||||
prefix = "[GPT]" if config.show_prefix else ""
|
prefix = "[GPT]" if config.show_prefix else ""
|
||||||
|
|
||||||
text, finish_reason, funcs = session.append(text_message)
|
text, finish_reason, funcs = session.query(text_message)
|
||||||
|
|
||||||
# 触发插件事件
|
# 触发插件事件
|
||||||
args = {
|
args = {
|
||||||
|
|||||||
Reference in New Issue
Block a user