mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
update examples
This commit is contained in:
parent
19c16bf9f1
commit
7816488445
7 changed files with 54 additions and 69 deletions
|
|
@ -400,7 +400,7 @@ class Role(BaseModel):
|
|||
observed_pure = [msg.dict(exclude={"id": True}) for msg in observed]
|
||||
existed_pure = [msg.dict(exclude={"id": True}) for msg in existed]
|
||||
for idx, new in enumerate(observed_pure):
|
||||
if new["cause_by"] in self._rc.watch and new not in existed_pure:
|
||||
if (new["cause_by"] in self._rc.watch and new not in existed_pure) or (not self._rc.watch):
|
||||
news.append(observed[idx])
|
||||
return news
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@
|
|||
"""
|
||||
|
||||
from pydantic import Field
|
||||
from semantic_kernel import Kernel
|
||||
from semantic_kernel.orchestration.sk_function_base import SKFunctionBase
|
||||
from semantic_kernel.planning import SequentialPlanner
|
||||
from semantic_kernel.planning.action_planner.action_planner import ActionPlanner
|
||||
from semantic_kernel.planning.basic_planner import BasicPlanner
|
||||
from semantic_kernel.planning.basic_planner import BasicPlanner, Plan
|
||||
|
||||
from metagpt.actions import UserRequirement
|
||||
from metagpt.actions.execute_task import ExecuteTask
|
||||
from metagpt.llm import LLM
|
||||
from metagpt.logs import logger
|
||||
from metagpt.provider.base_gpt_api import BaseGPTAPI
|
||||
from metagpt.roles import Role
|
||||
from metagpt.schema import Message
|
||||
|
|
@ -37,9 +40,14 @@ class SkAgent(Role):
|
|||
profile: str = "sk_agent"
|
||||
goal: str = "Execute task based on passed in task description"
|
||||
constraints: str = ""
|
||||
|
||||
plan: Plan = None
|
||||
planner_cls: BasicPlanner = BasicPlanner
|
||||
planner: BasicPlanner = Field(default_factory=BasicPlanner)
|
||||
llm: BaseGPTAPI = Field(default_factory=LLM)
|
||||
kernel: Kernel = Field(default_factory=Kernel)
|
||||
import_semantic_skill_from_directory: str = ""
|
||||
import_skill: dict[str, SKFunctionBase] = dict()
|
||||
|
||||
def __init__(self, **kwargs) -> None:
|
||||
"""Initializes the Engineer role with given attributes."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue