mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-07 15:51:28 +08:00
feat(agent): upgrade langchain to v1.0+
This commit is contained in:
@@ -9,12 +9,11 @@ from typing import Optional, List, Dict, Tuple, Set
|
||||
|
||||
import websocket
|
||||
|
||||
from app.chain.message import MessageChain
|
||||
from app.core.cache import FileCache
|
||||
from app.core.config import settings
|
||||
from app.core.context import MediaInfo, Context
|
||||
from app.core.metainfo import MetaInfo
|
||||
from app.log import logger
|
||||
from app.schemas.types import MessageChannel
|
||||
from app.utils.string import StringUtils
|
||||
|
||||
|
||||
@@ -27,6 +26,7 @@ class WeChatBot:
|
||||
"""
|
||||
|
||||
_default_ws_url = "wss://openws.work.weixin.qq.com"
|
||||
_ds_url = f"http://127.0.0.1:{settings.PORT}/api/v1/message?token={settings.API_TOKEN}"
|
||||
_heartbeat_interval = 30
|
||||
_ack_timeout = 10
|
||||
|
||||
@@ -361,13 +361,14 @@ class WeChatBot:
|
||||
def _forward_to_message_chain(self, userid: str, text: str) -> None:
|
||||
def _run():
|
||||
try:
|
||||
MessageChain().handle_message(
|
||||
# FIXME
|
||||
"""MessageChain().handle_message(
|
||||
channel=MessageChannel.Wechat,
|
||||
source=self._config_name,
|
||||
userid=userid,
|
||||
username=userid,
|
||||
text=text,
|
||||
)
|
||||
)"""
|
||||
except Exception as err:
|
||||
logger.error(f"企业微信智能机器人转发消息失败:{err}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user