mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-29 19:51:54 +08:00
feat: add WebAgent support for streaming and notifications
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import Optional, Type
|
||||
|
||||
from pydantic import BaseModel, Field, model_validator
|
||||
|
||||
from app.agent.tools.base import MoviePilotTool, ToolChain
|
||||
from app.agent.tools.base import MoviePilotTool
|
||||
from app.agent.tools.tags import ToolTag
|
||||
from app.log import logger
|
||||
from app.schemas import Notification, NotificationType
|
||||
@@ -96,7 +96,7 @@ class SendLocalFileTool(MoviePilotTool):
|
||||
resolved_path,
|
||||
)
|
||||
|
||||
await ToolChain().async_post_message(
|
||||
await self.send_notification_message(
|
||||
Notification(
|
||||
channel=channel,
|
||||
source=self._source,
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Optional, Type
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.agent.llm.capability import AgentCapabilityManager
|
||||
from app.agent.tools.base import MoviePilotTool, ToolChain
|
||||
from app.agent.tools.base import MoviePilotTool
|
||||
from app.agent.tools.tags import ToolTag
|
||||
from app.core.config import settings
|
||||
from app.log import logger
|
||||
@@ -86,7 +86,7 @@ class SendVoiceMessageTool(MoviePilotTool):
|
||||
f"use_voice={used_voice}, text_len={len(message)}"
|
||||
)
|
||||
|
||||
await ToolChain().async_post_message(
|
||||
await self.send_notification_message(
|
||||
Notification(
|
||||
channel=self._channel,
|
||||
source=self._source,
|
||||
|
||||
Reference in New Issue
Block a user