🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
add android agent
better6299d3571469c4b
diff --cc metagpt/actions/action_node.pyindex 27dde5a8c,bbf4aabcd..4563ec150--- a/metagpt/actions/action_node.py+++ b/metagpt/actions/action_node.py@@@ -449,11 -388,8 +449,10 @@@ class ActionNodedef set_context(self, context):self.set_recursive("context", context)- async def simple_fill(self, schema, mode, images: Optional[Union[str, list[str]]] = None, timeout=3, exclude=None):+ async def simple_fill(+ self, schema, mode, images: Optional[Union[str, list[str]]] = None, timeout=USE_CONFIG_TIMEOUT, exclude=None+ ):prompt = self.compile(context=self.context, schema=schema, mode=mode, exclude=exclude)-if schema != "raw":mapping = self.get_mapping(mode, exclude=exclude)class_name = f"{self.key}_AN"diff --cc metagpt/config2.pyindex f3273419f,2b9cdc78e..eb4c38368--- a/metagpt/config2.py+++ b/metagpt/config2.py@@@ -67,14 -66,21 +67,15 @@@ class Config(CLIParams, YamlModel)code_review_k_times: int = 2# Will be removed in the future- llm_for_researcher_summary: str = "gpt3"- llm_for_researcher_report: str = "gpt3"- METAGPT_TEXT_TO_IMAGE_MODEL_URL: str = ""+ metagpt_tti_url: str = ""language: str = "English"redis_key: str = "placeholder"- mmdc: str = "mmdc"- puppeteer_config: str = ""- pyppeteer_executable_path: str = ""- IFLYTEK_APP_ID: str = ""- IFLYTEK_API_SECRET: str = ""- IFLYTEK_API_KEY: str = ""- AZURE_TTS_SUBSCRIPTION_KEY: str = ""- AZURE_TTS_REGION: str = ""- mermaid_engine: str = "nodejs"+ iflytek_app_id: str = ""+ iflytek_api_secret: str = ""+ iflytek_api_key: str = ""+ azure_tts_subscription_key: str = ""+ azure_tts_region: str = ""+ other: dict = dict() # other dict@classmethoddef from_home(cls, path):@@@ -127,6 -119,16 +128,15 @@@self.reqa_file = reqa_fileself.max_auto_summarize_code = max_auto_summarize_code+ def set_other(self, other: dict):+ self.other = other++ def get_other(self, key: str, default_value: str = None):+ if default_value is None:+ return self.other.get(key)+ else:+ return self.other.get(key, default_value)+-def get_openai_llm(self) -> Optional[LLMConfig]:"""Get OpenAI LLMConfig by name. If no OpenAI, raise Exception"""if self.llm.api_type == LLMType.OPENAI:diff --cc metagpt/environment/api/env_api.pyindex 1e6df544d,6469e5b4c..924f6b104--- a/metagpt/environment/api/env_api.py+++ b/metagpt/environment/api/env_api.py@@@ -18,11 -18,9 +18,11 @@@ class EnvAPIAbstract(BaseModel)class EnvAPIRegistry(BaseModel):"""the registry to store environment w&r api/interface"""- registry: dict[str, dict[str, Union[dict, Any, str]]] = Field(default=dict(), exclude=True)+ registry: dict[str, Callable] = Field(default=dict(), exclude=True)def get(self, api_name: str):+ if api_name not in self.registry:- raise ValueError++ raise KeyError(f"api_name: {api_name} not found")return self.registry.get(api_name)def __getitem__(self, api_name: str) -> Callable: