olivebot/ai_module/nlp_yuan.py
xszyou 8a4c9d7329 重构nlp模块逻辑
+ 重构NLP模块管理逻辑,便于自由扩展;
+ gpt:拆分为ChatGPT及GPT、更换新的GPT接口、可单独配置代理服务器;
+ 指定yolov8包版本,解决yolo不兼容问题;
+ 修复:自言自语bug、接收多个待处理消息bug。
2023-06-28 19:44:34 +08:00

11 lines
311 B
Python

from utils import config_util as cfg
from ai_module.yuan1_0.yuan1_0_dialog import Yuan1Dialog
def question(text):
account = cfg.key_yuan_1_0_account
phone = cfg.key_yuan_1_0_phone
yuan1_dialog = Yuan1Dialog(account, phone)
prompt = text
a_msg = yuan1_dialog.dialog(prompt)
return a_msg