mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
use exclude
This commit is contained in:
parent
24e03d97ac
commit
2222cf3379
2 changed files with 8 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
from pydantic import Field, model_validator
|
||||
|
||||
from metagpt.actions.di.execute_nb_code import ExecuteNbCode
|
||||
|
|
@ -31,7 +33,7 @@ class DataAnalyst(RoleZero):
|
|||
tools: list[str] = ["Plan", "DataAnalyst", "RoleZero", "Browser"]
|
||||
custom_tools: list[str] = ["web scraping", "Terminal"]
|
||||
custom_tool_recommender: ToolRecommender = None
|
||||
experience_retriever: ExpRetriever = KeywordExpRetriever()
|
||||
experience_retriever: Annotated[ExpRetriever, Field(exclude=True)] = KeywordExpRetriever()
|
||||
|
||||
use_reflection: bool = True
|
||||
write_code: WriteAnalysisCode = Field(default_factory=WriteAnalysisCode, exclude=True)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from metagpt.actions.di.run_command import RunCommand
|
||||
from metagpt.prompts.di.team_leader import (
|
||||
FINISH_CURRENT_TASK_CMD,
|
||||
|
|
@ -24,7 +28,7 @@ class TeamLeader(RoleZero):
|
|||
|
||||
tools: list[str] = ["Plan", "RoleZero", "TeamLeader"]
|
||||
|
||||
experience_retriever: ExpRetriever = SimpleExpRetriever()
|
||||
experience_retriever: Annotated[ExpRetriever, Field(exclude=True)] = SimpleExpRetriever()
|
||||
|
||||
def _update_tool_execution(self):
|
||||
self.tool_execution_map.update(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue