mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
fix ask human problem
This commit is contained in:
parent
1f9a66ea60
commit
f0df3144d6
1 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
import inspect
|
||||
import json
|
||||
import traceback
|
||||
from typing import Literal, Tuple
|
||||
from typing import Callable, Literal, Tuple
|
||||
|
||||
from pydantic import model_validator
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ class RoleZero(Role):
|
|||
# Tools
|
||||
tools: list[str] = [] # Use special symbol ["<all>"] to indicate use of all registered tools
|
||||
tool_recommender: ToolRecommender = None
|
||||
tool_execution_map: dict[str, callable] = {}
|
||||
tool_execution_map: dict[str, Callable] = {}
|
||||
special_tool_commands: list[str] = ["Plan.finish_current_task", "end"]
|
||||
# Equipped with three basic tools by default for optional use
|
||||
editor: Editor = Editor()
|
||||
|
|
@ -247,7 +247,7 @@ class RoleZero(Role):
|
|||
|
||||
if not isinstance(self.rc.env, MGXEnv):
|
||||
return "Not in MGXEnv, command will not be executed."
|
||||
return await self.rc.env.get_human_input(question, sent_from=self)
|
||||
return await self.rc.env.ask_human(question, sent_from=self)
|
||||
|
||||
async def reply_to_human(self, content: str) -> str:
|
||||
"""Reply to human user with the content provided. Use this when you have a clear answer or solution to the user's question."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue