Fix: AI fails to send media files when tool-calling mode is set to "skills-like". (#6317)
* fix: improve send_message_to_user tool description for skills_like mode * fix: enhance description for send_message_to_user tool to clarify usage --------- Co-authored-by: Soulter <905617992@qq.com>
This commit is contained in:
@@ -188,7 +188,12 @@ class KnowledgeBaseQueryTool(FunctionTool[AstrAgentContext]):
|
|||||||
@dataclass
|
@dataclass
|
||||||
class SendMessageToUserTool(FunctionTool[AstrAgentContext]):
|
class SendMessageToUserTool(FunctionTool[AstrAgentContext]):
|
||||||
name: str = "send_message_to_user"
|
name: str = "send_message_to_user"
|
||||||
description: str = "Directly send message to the user. Only use this tool when you need to proactively message the user. Otherwise you can directly output the reply in the conversation."
|
description: str = (
|
||||||
|
"Send message to the user. "
|
||||||
|
"Supports various message types including `plain`, `image`, `record`, `video`, `file`, and `mention_user`. "
|
||||||
|
"Use this tool to send media files (`image`, `record`, `video`, `file`), "
|
||||||
|
"or when you need to proactively message the user(such as cron job). For normal text replies, you can output directly."
|
||||||
|
)
|
||||||
|
|
||||||
parameters: dict = Field(
|
parameters: dict = Field(
|
||||||
default_factory=lambda: {
|
default_factory=lambda: {
|
||||||
|
|||||||
Reference in New Issue
Block a user