接入dify工作流内容
This commit is contained in:
@@ -27,6 +27,7 @@ from base.func_claude import Claude
|
||||
from beautyleg.beauty_leg import BeautyLeg
|
||||
from configuration import Config
|
||||
from constants import ChatType
|
||||
from dify.dify_chat import DifyChat
|
||||
from douyin_parser.main import DouyinParser
|
||||
from game_task.game_task_encyclopedia import game_process_message, setup_schedule, get_group_ids, \
|
||||
run_random_task_assignment
|
||||
@@ -102,6 +103,8 @@ class Robot(Job):
|
||||
self.group_add = GroupAdd(wcf, self.gbm)
|
||||
# 抖音转视频
|
||||
self.douyin = DouyinParser(wcf, self.gbm)
|
||||
# DIFY 插件
|
||||
self.dify = DifyChat(wcf, self.gbm)
|
||||
|
||||
if ChatType.is_in_chat_types(chat_type):
|
||||
if chat_type == ChatType.TIGER_BOT.value and TigerBot.value_check(self.config.TIGERBOT):
|
||||
@@ -143,7 +146,6 @@ class Robot(Job):
|
||||
else:
|
||||
self.LOG.warning("未配置模型")
|
||||
self.chat = None
|
||||
|
||||
self.LOG.info(f"已选择: {self.chat}")
|
||||
|
||||
@staticmethod
|
||||
@@ -381,6 +383,11 @@ class Robot(Job):
|
||||
self.douyin.handle_douyin_links(message=msg)
|
||||
except Exception as e:
|
||||
self.LOG.error(f"douyin.handle_douyin_links error: {e}")
|
||||
# dify AI聊天
|
||||
try:
|
||||
self.dify.handle_message(message=msg)
|
||||
except Exception as e:
|
||||
self.LOG.error(f"douyin.handle_douyin_links error: {e}")
|
||||
|
||||
if msg.is_at(self.wxid): # 被@
|
||||
self.toAt(msg)
|
||||
|
||||
Reference in New Issue
Block a user