mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-27 14:25:20 +02:00
fix pydantic not support future issue
This commit is contained in:
parent
f4198dc111
commit
e772ffdc1e
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ action_subclass_registry = {}
|
|||
class Action(BaseModel):
|
||||
name: str = ""
|
||||
llm: BaseGPTAPI = Field(default_factory=LLM, exclude=True)
|
||||
context: dict | CodingContext | CodeSummarizeContext | TestingContext | RunCodeContext | str | None = ""
|
||||
context: Union[dict, CodingContext, CodeSummarizeContext, TestingContext, RunCodeContext, str, None] = ""
|
||||
prefix = "" # aask*时会加上prefix,作为system_message
|
||||
desc = "" # for skill manager
|
||||
# node: ActionNode = Field(default_factory=ActionNode, exclude=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue