回复器你不许传dict
This commit is contained in:
@@ -300,7 +300,7 @@ class DefaultReplyer:
|
|||||||
enable_tool: bool = True,
|
enable_tool: bool = True,
|
||||||
from_plugin: bool = True,
|
from_plugin: bool = True,
|
||||||
stream_id: str | None = None,
|
stream_id: str | None = None,
|
||||||
reply_message: dict[str, Any] | None = None,
|
reply_message: DatabaseMessages | None = None,
|
||||||
) -> tuple[bool, dict[str, Any] | None, str | None]:
|
) -> tuple[bool, dict[str, Any] | None, str | None]:
|
||||||
# sourcery skip: merge-nested-ifs
|
# sourcery skip: merge-nested-ifs
|
||||||
"""
|
"""
|
||||||
@@ -334,7 +334,7 @@ class DefaultReplyer:
|
|||||||
extra_info=extra_info,
|
extra_info=extra_info,
|
||||||
available_actions=available_actions,
|
available_actions=available_actions,
|
||||||
enable_tool=enable_tool,
|
enable_tool=enable_tool,
|
||||||
reply_message=DatabaseMessages(**reply_message) if isinstance(reply_message, dict) else reply_message,
|
reply_message=reply_message,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not prompt:
|
if not prompt:
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ from rich.traceback import install
|
|||||||
|
|
||||||
from src.chat.message_receive.chat_stream import ChatStream
|
from src.chat.message_receive.chat_stream import ChatStream
|
||||||
from src.chat.utils.utils import process_llm_response
|
from src.chat.utils.utils import process_llm_response
|
||||||
|
from src.common.data_models.database_data_model import DatabaseMessages
|
||||||
from src.common.logger import get_logger
|
from src.common.logger import get_logger
|
||||||
from src.plugin_system.base.component_types import ActionInfo
|
from src.plugin_system.base.component_types import ActionInfo
|
||||||
|
|
||||||
@@ -81,7 +82,7 @@ async def generate_reply(
|
|||||||
chat_id: str | None = None,
|
chat_id: str | None = None,
|
||||||
action_data: dict[str, Any] | None = None,
|
action_data: dict[str, Any] | None = None,
|
||||||
reply_to: str = "",
|
reply_to: str = "",
|
||||||
reply_message: dict[str, Any] | None = None,
|
reply_message: DatabaseMessages | None = None,
|
||||||
extra_info: str = "",
|
extra_info: str = "",
|
||||||
available_actions: dict[str, ActionInfo] | None = None,
|
available_actions: dict[str, ActionInfo] | None = None,
|
||||||
enable_tool: bool = False,
|
enable_tool: bool = False,
|
||||||
|
|||||||
Reference in New Issue
Block a user