feat(core): Upgrade pydantic to 2.x (#1428)

This commit is contained in:
Fangyin Cheng
2024-04-20 09:41:16 +08:00
committed by GitHub
parent baa1e3f9f6
commit 57be1ece18
103 changed files with 1146 additions and 534 deletions

View File

@@ -34,8 +34,6 @@ class DashboardAssistantAgent(ConversableAgent):
"professional reports"
)
max_retry_count: int = 3
def __init__(self, **kwargs):
"""Create a new instance of DashboardAssistantAgent."""
super().__init__(**kwargs)

View File

@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
class DataScientistAgent(ConversableAgent):
"""Data Scientist Agent."""
name = "Edgar"
name: str = "Edgar"
profile: str = "DataScientist"
goal: str = (
"Use correct {dialect} SQL to analyze and solve tasks based on the data"

View File

@@ -16,7 +16,7 @@ class PluginAssistantAgent(ConversableAgent):
plugin_generator: Optional[PluginPromptGenerator] = None
name = "LuBan"
name: str = "LuBan"
profile: str = "ToolExpert"
goal: str = (
"Read and understand the tool information given in the resources below to "

View File

@@ -244,7 +244,7 @@ class RetrieveSummaryAssistantAgent(ConversableAgent):
**act_extent_param,
)
if act_out:
reply_message.action_report = act_out.dict()
reply_message.action_report = act_out.to_dict()
# 4.Reply information verification
check_pass, reason = await self.verify(reply_message, sender, reviewer)
is_success = check_pass

View File

@@ -11,7 +11,7 @@ logger = logging.getLogger(__name__)
class SummaryAssistantAgent(ConversableAgent):
"""Summary Assistant Agent."""
name = "Aristotle"
name: str = "Aristotle"
profile: str = "Summarizer"
goal: str = (
"Summarize answer summaries based on user questions from provided "