mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-07-02 16:01:04 +02:00
refine code
This commit is contained in:
parent
f5bb850f25
commit
5cd5eebc5b
12 changed files with 67 additions and 56 deletions
|
|
@ -14,8 +14,6 @@ from pydantic import BaseModel, ConfigDict, Field, model_validator
|
|||
|
||||
from metagpt.actions.action_node import ActionNode
|
||||
from metagpt.context import ContextMixin
|
||||
from metagpt.llm import LLM
|
||||
from metagpt.provider.base_llm import BaseLLM
|
||||
from metagpt.schema import (
|
||||
CodeSummarizeContext,
|
||||
CodingContext,
|
||||
|
|
@ -30,7 +28,6 @@ class Action(SerializationMixin, ContextMixin, BaseModel):
|
|||
model_config = ConfigDict(arbitrary_types_allowed=True, exclude=["llm"])
|
||||
|
||||
name: str = ""
|
||||
llm: BaseLLM = Field(default_factory=LLM, exclude=True)
|
||||
i_context: Union[dict, CodingContext, CodeSummarizeContext, TestingContext, RunCodeContext, str, None] = ""
|
||||
prefix: str = "" # aask*时会加上prefix,作为system_message
|
||||
desc: str = "" # for skill manager
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ class GenerateTable(Action):
|
|||
|
||||
name: str = "GenerateTable"
|
||||
i_context: Optional[str] = None
|
||||
llm: BaseLLM = Field(default_factory=LLM)
|
||||
language: str = "ch"
|
||||
|
||||
async def run(self, ocr_results: list, filename: str, *args, **kwargs) -> dict[str, str]:
|
||||
|
|
|
|||
|
|
@ -178,7 +178,6 @@ class WebBrowseAndSummarize(Action):
|
|||
|
||||
name: str = "WebBrowseAndSummarize"
|
||||
i_context: Optional[str] = None
|
||||
llm: BaseLLM = Field(default_factory=LLM)
|
||||
desc: str = "Explore the web and provide summaries of articles and webpages."
|
||||
browse_func: Union[Callable[[list[str]], None], None] = None
|
||||
web_browser_engine: Optional[WebBrowserEngine] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue