mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 13:52:38 +02:00
extra='ignore'
This commit is contained in:
parent
4003f124bb
commit
9a95bcd6e9
3 changed files with 3 additions and 3 deletions
|
|
@ -73,7 +73,7 @@ class Action(SerializationMixin, ContextMixin, BaseModel):
|
|||
def _init_with_instruction(cls, values):
|
||||
if "instruction" in values:
|
||||
name = values["name"]
|
||||
i = values["instruction"]
|
||||
i = values.pop("instruction")
|
||||
values["node"] = ActionNode(key=name, expected_type=str, instruction=i, example="", schema="raw")
|
||||
return values
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class ContextMixin(BaseModel):
|
|||
@property
|
||||
def llm(self) -> BaseLLM:
|
||||
"""Role llm: role llm > context llm"""
|
||||
# logger.info(f"class:{self.__class__.__name__}, llm: {self._llm}, llm_config: {self._llm_config}")
|
||||
print(f"class:{self.__class__.__name__}, llm: {self._llm}, llm_config: {self._llm_config}")
|
||||
if self._llm_config and not self._llm:
|
||||
self._llm = self.context.llm(self._llm_config.name, self._llm_config.provider)
|
||||
return self._llm or self.context.llm()
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class RoleContext(BaseModel):
|
|||
class Role(SerializationMixin, ContextMixin, BaseModel):
|
||||
"""Role/Agent"""
|
||||
|
||||
model_config = ConfigDict(arbitrary_types_allowed=True, exclude=["llm"])
|
||||
model_config = ConfigDict(arbitrary_types_allowed=True, extra="ignore")
|
||||
|
||||
name: str = ""
|
||||
profile: str = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue