🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Format import according to isort
hongjiongteng0722257cd809
diff --git a/examples/llm_hello_world.py b/examples/llm_hello_world.pyindex 6b42ef5ef..3ba03eea0 100644--- a/examples/llm_hello_world.py+++ b/examples/llm_hello_world.py@@ -7,9 +7,9 @@"""import asyncio+from metagpt.llm import LLM, Claudefrom metagpt.logs import logger-from metagpt.llm import LLM-from metagpt.llm import Claude+async def main():llm = LLM()diff --git a/examples/search_google.py b/examples/search_google.pyindex 44b7cd05f..eed484d1b 100644--- a/examples/search_google.py+++ b/examples/search_google.py@@ -7,6 +7,7 @@"""import asyncio+from metagpt.config import Configfrom metagpt.roles import Searcherdiff --git a/examples/search_kb.py b/examples/search_kb.pyindex c4ade3a10..b6f7d87a0 100644--- a/examples/search_kb.py+++ b/examples/search_kb.py@@ -4,10 +4,11 @@@File : search_kb.py"""import asyncio+from metagpt.const import DATA_PATHfrom metagpt.document_store import FaissStore-from metagpt.roles import Salesfrom metagpt.logs import logger+from metagpt.roles import Salesasync def search():diff --git a/examples/search_with_specific_engine.py b/examples/search_with_specific_engine.pyindex 81333bf83..bbc938055 100644--- a/examples/search_with_specific_engine.py+++ b/examples/search_with_specific_engine.py@@ -1,8 +1,10 @@import asyncio+from metagpt.config import Configfrom metagpt.roles import Searcherfrom metagpt.tools import SearchEngineType+async def main():# Serper APIawait Searcher(engine = SearchEngineType.SERPER_GOOGLE).run("What are some good sun protection products?")diff --git a/metagpt/actions/__init__.py b/metagpt/actions/__init__.pyindex 91b5af49e..0c861aa69 100644--- a/metagpt/actions/__init__.py+++ b/metagpt/actions/__init__.py@@ -9,20 +9,19 @@ from enum import Enumfrom metagpt.actions.action import Actionfrom metagpt.actions.action_output import ActionOutput--from metagpt.actions.write_prd import WritePRD-from metagpt.actions.write_prd_review import WritePRDReview+from metagpt.actions.add_requirement import BossRequirement+from metagpt.actions.debug_error import DebugErrorfrom metagpt.actions.design_api import WriteDesignfrom metagpt.actions.design_api_review import DesignReviewfrom metagpt.actions.design_filenames import DesignFilenames+from metagpt.actions.project_management import AssignTasks, WriteTasks+from metagpt.actions.run_code import RunCode+from metagpt.actions.search_and_summarize import SearchAndSummarizefrom metagpt.actions.write_code import WriteCodefrom metagpt.actions.write_code_review import WriteCodeReview+from metagpt.actions.write_prd import WritePRD+from metagpt.actions.write_prd_review import WritePRDReviewfrom metagpt.actions.write_test import WriteTest-from metagpt.actions.run_code import RunCode-from metagpt.actions.debug_error import DebugError-from metagpt.actions.project_management import WriteTasks, AssignTasks-from metagpt.actions.add_requirement import BossRequirement-from metagpt.actions.search_and_summarize import SearchAndSummarizeclass ActionType(Enum):diff --git a/metagpt/actions/action.py b/metagpt/actions/action.pyindex a390a8350..a2baa1321 100644--- a/metagpt/actions/action.py+++ b/metagpt/actions/action.py@@ -5,13 +5,14 @@@Author : alexanderwu@File : action.py"""-from typing import Optionalfrom abc import ABC+from typing import Optional-from metagpt.llm import LLM-from metagpt.actions.action_output import ActionOutput-from tenacity import retry, stop_after_attempt, wait_fixedfrom pydantic import BaseModel+from tenacity import retry, stop_after_attempt, wait_fixed++from metagpt.actions.action_output import ActionOutput+from metagpt.llm import LLMfrom metagpt.utils.common import OutputParserdiff --git a/metagpt/actions/action_output.py b/metagpt/actions/action_output.pyindex 04f357f7f..c0b88dcf9 100644--- a/metagpt/actions/action_output.py+++ b/metagpt/actions/action_output.py@@ -6,9 +6,10 @@@File : action_output"""-from pydantic import create_model, validator, root_validator, BaseModelfrom typing import Dict, Type+from pydantic import BaseModel, create_model, root_validator, validator+class ActionOutput:content: strdiff --git a/metagpt/actions/analyze_dep_libs.py b/metagpt/actions/analyze_dep_libs.pyindex c90ed63a8..23c35cdf8 100644--- a/metagpt/actions/analyze_dep_libs.py+++ b/metagpt/actions/analyze_dep_libs.py@@ -8,7 +8,6 @@from metagpt.actions import Action-PROMPT = """You are an AI developer, trying to write a program that generates code for users based on their intentions.For the user's prompt:diff --git a/metagpt/actions/azure_tts.py b/metagpt/actions/azure_tts.pyindex c01556303..f528ba001 100644--- a/metagpt/actions/azure_tts.py+++ b/metagpt/actions/azure_tts.py@@ -5,8 +5,9 @@@Author : Leo Xiao@File : azure_tts.py"""+from azure.cognitiveservices.speech import AudioConfig, SpeechConfig, SpeechSynthesizer+from metagpt.actions.action import Action-from azure.cognitiveservices.speech import SpeechConfig, SpeechSynthesizer, AudioConfigfrom metagpt.config import Configdiff --git a/metagpt/actions/design_api.py b/metagpt/actions/design_api.pyindex a8f6a6ceb..d52ccc82d 100644--- a/metagpt/actions/design_api.py+++ b/metagpt/actions/design_api.py@@ -9,12 +9,11 @@ import shutilfrom pathlib import Pathfrom typing import List, Tuple-from metagpt.actions import ActionOutput-from metagpt.actions import Action+from metagpt.actions import Action, ActionOutputfrom metagpt.const import WORKSPACE_ROOT-from metagpt.utils.common import CodeParser-from metagpt.schema import Messagefrom metagpt.logs import logger+from metagpt.schema import Message+from metagpt.utils.common import CodeParserfrom metagpt.utils.mermaid import mermaid_to_filePROMPT_TEMPLATE = """diff --git a/metagpt/actions/design_filenames.py b/metagpt/actions/design_filenames.pyindex 2b0c71670..6c3d8e803 100644--- a/metagpt/actions/design_filenames.py+++ b/metagpt/actions/design_filenames.py@@ -5,9 +5,8 @@@Author : alexanderwu@File : design_filenames.py"""-from metagpt.logs import loggerfrom metagpt.actions import Action-+from metagpt.logs import loggerPROMPT = """You are an AI developer, trying to write a program that generates code for users based on their intentions.When given their intentions, provide a complete and exhaustive list of file paths needed to write the program for the user.diff --git a/metagpt/actions/project_management.py b/metagpt/actions/project_management.pyindex 0d206d1e7..6fb6fa168 100644--- a/metagpt/actions/project_management.py+++ b/metagpt/actions/project_management.py@@ -7,12 +7,13 @@"""from typing import List, Tuple+from tenacity import retry, stop_after_attempt, wait_fixed+from metagpt.actions.action import Actionfrom metagpt.actions.action_output import ActionOutputfrom metagpt.const import WORKSPACE_ROOTfrom metagpt.logs import logger-from metagpt.utils.common import OutputParser, CodeParser-from tenacity import retry, stop_after_attempt, wait_fixed+from metagpt.utils.common import CodeParser, OutputParserPROMPT_TEMPLATE = '''# Contextdiff --git a/metagpt/actions/search_and_summarize.py b/metagpt/actions/search_and_summarize.pyindex 7dce790d2..d048c852b 100644--- a/metagpt/actions/search_and_summarize.py+++ b/metagpt/actions/search_and_summarize.py@@ -7,13 +7,12 @@"""import asyncio-from metagpt.logs import logger-from metagpt.config import SearchEngineType, Configfrom metagpt.actions import Action+from metagpt.config import Config, SearchEngineType+from metagpt.logs import loggerfrom metagpt.schema import Messagefrom metagpt.tools.search_engine import SearchEngine-SEARCH_AND_SUMMARIZE_SYSTEM = """### Requirements1. Please summarize the latest dialogue based on the reference information (secondary) and dialogue history (primary). Do not include text that is irrelevant to the conversation.- The context is for reference only. If it is irrelevant to the user's search request history, please reduce its reference and usage.diff --git a/metagpt/actions/write_prd.py b/metagpt/actions/write_prd.pyindex 449f073c4..8c98207e8 100644--- a/metagpt/actions/write_prd.py+++ b/metagpt/actions/write_prd.py@@ -5,11 +5,16 @@@Author : alexanderwu@File : write_prd.py"""+from typing import List, Tuple+from metagpt.actions import Action, ActionOutput-from metagpt.actions.search_and_summarize import SEARCH_AND_SUMMARIZE_SYSTEM, SearchAndSummarize, \- SEARCH_AND_SUMMARIZE_PROMPT, SEARCH_AND_SUMMARIZE_SYSTEM_EN_US+from metagpt.actions.search_and_summarize import (+ SEARCH_AND_SUMMARIZE_PROMPT,+ SEARCH_AND_SUMMARIZE_SYSTEM,+ SEARCH_AND_SUMMARIZE_SYSTEM_EN_US,+ SearchAndSummarize,+)from metagpt.logs import logger-from typing import List, TuplePROMPT_TEMPLATE = """# Contextdiff --git a/metagpt/config.py b/metagpt/config.pyindex 84867258e..8288f6ec5 100644--- a/metagpt/config.py+++ b/metagpt/config.py@@ -7,11 +7,10 @@ import osimport yaml-from metagpt.logs import logger-from metagpt.const import PROJECT_ROOT-from metagpt.utils.singleton import Singleton+from metagpt.logs import loggerfrom metagpt.tools import SearchEngineType+from metagpt.utils.singleton import Singletonclass NotConfiguredException(Exception):diff --git a/metagpt/document_store/chromadb_store.py b/metagpt/document_store/chromadb_store.pyindex 70ec9d15b..9d4e10590 100644--- a/metagpt/document_store/chromadb_store.py+++ b/metagpt/document_store/chromadb_store.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : chromadb_store.py"""-from sentence_transformers import SentenceTransformerimport chromadb+from sentence_transformers import SentenceTransformerclass ChromaStore:diff --git a/metagpt/document_store/document.py b/metagpt/document_store/document.pyindex 3d55dbcb9..e50f94d00 100644--- a/metagpt/document_store/document.py+++ b/metagpt/document_store/document.py@@ -9,11 +9,13 @@ from pathlib import Pathimport numpy as npimport pandas as pd-from tqdm import tqdm--from langchain.document_loaders import UnstructuredWordDocumentLoader, UnstructuredPDFLoader-from langchain.document_loaders import TextLoader+from langchain.document_loaders import (+ TextLoader,+ UnstructuredPDFLoader,+ UnstructuredWordDocumentLoader,+)from langchain.text_splitter import CharacterTextSplitter+from tqdm import tqdmdef validate_cols(content_col: str, df: pd.DataFrame):diff --git a/metagpt/document_store/faiss_store.py b/metagpt/document_store/faiss_store.pyindex c3c8949f2..5822ddae6 100644--- a/metagpt/document_store/faiss_store.py+++ b/metagpt/document_store/faiss_store.py@@ -5,20 +5,20 @@@Author : alexanderwu@File : faiss_store.py"""-from typing import Optional-from pathlib import Pathimport pickle+from pathlib import Path+from typing import Optionalimport faiss-from langchain.vectorstores import FAISS-from langchain.embeddings import OpenAIEmbeddingsimport pandas as pd+from langchain.embeddings import OpenAIEmbeddings+from langchain.vectorstores import FAISSfrom tqdm import tqdm-from metagpt.logs import loggerfrom metagpt.const import DATA_PATH-from metagpt.document_store.document import Documentfrom metagpt.document_store.base_store import LocalStore+from metagpt.document_store.document import Document+from metagpt.logs import loggerclass FaissStore(LocalStore):diff --git a/metagpt/document_store/milvus_store.py b/metagpt/document_store/milvus_store.pyindex 7faa5410b..431ae249f 100644--- a/metagpt/document_store/milvus_store.py+++ b/metagpt/document_store/milvus_store.py@@ -6,10 +6,11 @@@File : milvus_store.py"""from typing import TypedDict+import numpy as np-from pymilvus import connections, Collection, CollectionSchema, FieldSchema, DataType-from metagpt.document_store.base_store import BaseStore+from pymilvus import Collection, CollectionSchema, DataType, FieldSchema, connections+from metagpt.document_store.base_store import BaseStoretype_mapping = {int: DataType.INT64,diff --git a/metagpt/environment.py b/metagpt/environment.pyindex ea29537f3..206c9cd36 100644--- a/metagpt/environment.py+++ b/metagpt/environment.py@@ -6,21 +6,13 @@@File : environment.py"""import asyncio-from typing import Iterable-from pydantic import (- BaseModel,- BaseSettings,- PyObject,- RedisDsn,- PostgresDsn,- Field,-)+from pydantic import BaseModel, BaseSettings, Field, PostgresDsn, PyObject, RedisDsn+from metagpt.memory import Memoryfrom metagpt.roles import Rolefrom metagpt.schema import Message-from metagpt.memory import Memoryclass Environment(BaseModel):diff --git a/metagpt/inspect_module.py b/metagpt/inspect_module.pyindex c1ebcf4f4..fcdd4f0b7 100644--- a/metagpt/inspect_module.py+++ b/metagpt/inspect_module.py@@ -7,6 +7,7 @@"""import inspect+import metagpt # replace with your modulediff --git a/metagpt/llm.py b/metagpt/llm.pyindex c45dd9806..e25f21ae6 100644--- a/metagpt/llm.py+++ b/metagpt/llm.py@@ -6,8 +6,8 @@@File : llm.py"""-from metagpt.provider.openai_api import OpenAIGPTAPI as LLMfrom metagpt.provider.anthropic_api import Claude2 as Claude+from metagpt.provider.openai_api import OpenAIGPTAPI as LLMDEFAULT_LLM = LLM()CLAUDE_LLM = Claude()diff --git a/metagpt/logs.py b/metagpt/logs.pyindex a056e9afc..fa4befa7d 100644--- a/metagpt/logs.py+++ b/metagpt/logs.py@@ -7,7 +7,9 @@"""import sys+from loguru import logger as _logger+from metagpt.const import PROJECT_ROOTdiff --git a/metagpt/management/skill_manager.py b/metagpt/management/skill_manager.pyindex 84116c4c5..0f8413d4e 100644--- a/metagpt/management/skill_manager.py+++ b/metagpt/management/skill_manager.py@@ -6,13 +6,12 @@@File : skill_manager.py"""from sentence_transformers import SentenceTransformer-from metagpt.logs import logger-from metagpt.const import PROMPT_PATH-from metagpt.llm import LLMfrom metagpt.actions import Action+from metagpt.const import PROMPT_PATHfrom metagpt.document_store.chromadb_store import ChromaStore-+from metagpt.llm import LLM+from metagpt.logs import loggerSkill = Actiondiff --git a/metagpt/manager.py b/metagpt/manager.pyindex 45e020d9c..3cb445108 100644--- a/metagpt/manager.py+++ b/metagpt/manager.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : manager.py"""-from metagpt.logs import loggerfrom metagpt.llm import LLM+from metagpt.logs import loggerfrom metagpt.schema import Messagediff --git a/metagpt/provider/anthropic_api.py b/metagpt/provider/anthropic_api.pyindex 36cd8e27a..7faed1636 100644--- a/metagpt/provider/anthropic_api.py+++ b/metagpt/provider/anthropic_api.py@@ -7,10 +7,13 @@"""import asyncio+import anthropicfrom anthropic import Anthropic+from metagpt.config import CONFIG+class Claude2:def ask(self, prompt):client = Anthropic(api_key=CONFIG.claude_api_key)diff --git a/metagpt/provider/base_gpt_api.py b/metagpt/provider/base_gpt_api.pyindex 972982dc7..f39e708eb 100644--- a/metagpt/provider/base_gpt_api.py+++ b/metagpt/provider/base_gpt_api.py@@ -5,11 +5,11 @@@Author : alexanderwu@File : base_gpt_api.py"""+from abc import abstractmethodfrom typing import Optional-from abc import abstractmethod-from metagpt.provider.base_chatbot import BaseChatbotfrom metagpt.logs import logger+from metagpt.provider.base_chatbot import BaseChatbotclass BaseGPTAPI(BaseChatbot):diff --git a/metagpt/provider/openai_api.py b/metagpt/provider/openai_api.pyindex 89e58c201..db4b950ea 100644--- a/metagpt/provider/openai_api.py+++ b/metagpt/provider/openai_api.py@@ -5,17 +5,22 @@@Author : alexanderwu@File : openai.py"""-from typing import NamedTuple-from functools import wrapsimport asyncioimport time+from functools import wraps+from typing import NamedTuple+import openai-from metagpt.logs import logger-from metagpt.provider.base_gpt_api import BaseGPTAPIfrom metagpt.config import CONFIG+from metagpt.logs import logger+from metagpt.provider.base_gpt_api import BaseGPTAPIfrom metagpt.utils.singleton import Singleton-from metagpt.utils.token_counter import count_message_tokens, TOKEN_COSTS, count_string_tokens+from metagpt.utils.token_counter import (+ TOKEN_COSTS,+ count_message_tokens,+ count_string_tokens,+)def retry(max_retries):diff --git a/metagpt/roles/__init__.py b/metagpt/roles/__init__.pyindex b1911df06..46f9d727b 100644--- a/metagpt/roles/__init__.py+++ b/metagpt/roles/__init__.py@@ -6,12 +6,12 @@@File : __init__.py"""-from metagpt.roles.role import Rolefrom metagpt.roles.architect import Architect+from metagpt.roles.customer_service import CustomerService+from metagpt.roles.engineer import Engineerfrom metagpt.roles.product_manager import ProductManagerfrom metagpt.roles.project_manager import ProjectManager-from metagpt.roles.engineer import Engineerfrom metagpt.roles.qa_engineer import QaEngineer-from metagpt.roles.seacher import Searcher+from metagpt.roles.role import Rolefrom metagpt.roles.sales import Sales-from metagpt.roles.customer_service import CustomerService+from metagpt.roles.seacher import Searcherdiff --git a/metagpt/roles/architect.py b/metagpt/roles/architect.pyindex 9d6cf5be7..d41a18e20 100644--- a/metagpt/roles/architect.py+++ b/metagpt/roles/architect.py@@ -6,8 +6,8 @@@File : architect.py"""+from metagpt.actions import DesignFilenames, WriteDesign, WritePRDfrom metagpt.roles import Role-from metagpt.actions import WriteDesign, WritePRD, DesignFilenamesclass Architect(Role):diff --git a/metagpt/roles/customer_service.py b/metagpt/roles/customer_service.pyindex 558514198..d4ab1adbb 100644--- a/metagpt/roles/customer_service.py+++ b/metagpt/roles/customer_service.py@@ -6,6 +6,7 @@@File : sales.py"""from metagpt.roles import Sales+# from metagpt.actions import SearchAndSummarize# from metagpt.tools import SearchEngineTypediff --git a/metagpt/roles/engineer.py b/metagpt/roles/engineer.pyindex c8cebf680..689eb7b6f 100644--- a/metagpt/roles/engineer.py+++ b/metagpt/roles/engineer.py@@ -5,19 +5,19 @@@Author : alexanderwu@File : engineer.py"""+import astimport asyncioimport re-import astimport shutil+from collections import OrderedDictfrom pathlib import Path+from metagpt.actions import DebugError, RunCode, WriteCode, WriteDesign, WriteTasksfrom metagpt.const import WORKSPACE_ROOTfrom metagpt.logs import loggerfrom metagpt.roles import Role-from metagpt.actions import WriteCode, RunCode, DebugError, WriteTasks, WriteDesignfrom metagpt.schema import Messagefrom metagpt.utils.common import CodeParser-from collections import OrderedDictasync def gather_ordered_k(coros, k) -> list:diff --git a/metagpt/roles/product_manager.py b/metagpt/roles/product_manager.pyindex f9682cc1a..f874bbe0a 100644--- a/metagpt/roles/product_manager.py+++ b/metagpt/roles/product_manager.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : product_manager.py"""+from metagpt.actions import BossRequirement, WritePRDfrom metagpt.roles import Role-from metagpt.actions import WritePRD, BossRequirementfrom metagpt.schema import Messagediff --git a/metagpt/roles/project_manager.py b/metagpt/roles/project_manager.pyindex 8a9465e5d..e8118bb4c 100644--- a/metagpt/roles/project_manager.py+++ b/metagpt/roles/project_manager.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : project_manager.py"""+from metagpt.actions import AssignTasks, WriteDesign, WriteTasksfrom metagpt.roles import Role-from metagpt.actions import WriteTasks, AssignTasks, WriteDesignclass ProjectManager(Role):diff --git a/metagpt/roles/qa_engineer.py b/metagpt/roles/qa_engineer.pyindex 5a64c67e0..3a4f1612a 100644--- a/metagpt/roles/qa_engineer.py+++ b/metagpt/roles/qa_engineer.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : qa_engineer.py"""-from metagpt.actions.run_code import RunCodefrom metagpt.actions import WriteTest+from metagpt.actions.run_code import RunCodefrom metagpt.roles import Rolediff --git a/metagpt/roles/role.py b/metagpt/roles/role.pyindex 36269aed2..584307083 100644--- a/metagpt/roles/role.py+++ b/metagpt/roles/role.py@@ -6,17 +6,17 @@@File : role.py"""from __future__ import annotations-from typing import Type, Iterable-from pydantic import BaseModel, Field+from typing import Iterable, Type-from metagpt.logs import logger+from pydantic import BaseModel, Field# from metagpt.environment import Environmentfrom metagpt.actions import Action, ActionOutputfrom metagpt.llm import LLM-from metagpt.schema import Message+from metagpt.logs import loggerfrom metagpt.memory import Memory+from metagpt.schema import MessagePREFIX_TEMPLATE = """You are a {profile}, named {name}, your goal is {goal}, and the constraint is {constraints}. """diff --git a/metagpt/roles/sales.py b/metagpt/roles/sales.pyindex 6bfd02b51..51b13f487 100644--- a/metagpt/roles/sales.py+++ b/metagpt/roles/sales.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : sales.py"""-from metagpt.roles import Rolefrom metagpt.actions import SearchAndSummarize+from metagpt.roles import Rolefrom metagpt.tools import SearchEngineTypediff --git a/metagpt/roles/seacher.py b/metagpt/roles/seacher.pyindex c4f3ffb56..769a5e07b 100644--- a/metagpt/roles/seacher.py+++ b/metagpt/roles/seacher.py@@ -5,12 +5,12 @@@Author : alexanderwu@File : seacher.py"""+from metagpt.actions import ActionOutput, SearchAndSummarizefrom metagpt.logs import logger-from metagpt.roles import Role-from metagpt.actions import SearchAndSummarize, ActionOutput-from metagpt.tools import SearchEngineTypefrom metagpt.schema import Message+from metagpt.tools import SearchEngineType+class Searcher(Role):def __init__(self, name='Alice', profile='Smart Assistant', goal='Provide search services for users',diff --git a/metagpt/schema.py b/metagpt/schema.pyindex 31b579035..0b0cfdcd8 100644--- a/metagpt/schema.py+++ b/metagpt/schema.py@@ -6,12 +6,13 @@@File : schema.py"""from __future__ import annotations+from dataclasses import dataclass, fieldfrom typing import Type, TypedDict-from metagpt.logs import loggerfrom pydantic import BaseModel+from metagpt.logs import loggerclass RawMessage(TypedDict):diff --git a/metagpt/software_company.py b/metagpt/software_company.pyindex 79ebb1285..ea449bd26 100644--- a/metagpt/software_company.py+++ b/metagpt/software_company.py@@ -7,11 +7,18 @@"""from pydantic import BaseModel, Field-from metagpt.config import CONFIGfrom metagpt.actions import BossRequirement-from metagpt.logs import logger+from metagpt.config import CONFIGfrom metagpt.environment import Environment-from metagpt.roles import ProductManager, Architect, Engineer, QaEngineer, ProjectManager, Role+from metagpt.logs import logger+from metagpt.roles import (+ Architect,+ Engineer,+ ProductManager,+ ProjectManager,+ QaEngineer,+ Role,+)from metagpt.schema import Messagefrom metagpt.utils.common import NoMoneyExceptiondiff --git a/metagpt/tools/search_engine.py b/metagpt/tools/search_engine.pyindex 5b9e1cd23..10bf1b5dd 100644--- a/metagpt/tools/search_engine.py+++ b/metagpt/tools/search_engine.py@@ -9,10 +9,10 @@ from __future__ import annotationsimport json-from metagpt.logs import loggerfrom duckduckgo_search import ddgfrom metagpt.config import Config+from metagpt.logs import loggerfrom metagpt.tools.search_engine_serpapi import SerpAPIWrapperfrom metagpt.tools.search_engine_serper import SerperWrapperdiff --git a/metagpt/tools/search_engine_meilisearch.py b/metagpt/tools/search_engine_meilisearch.pyindex b4fc05982..4a67a3662 100644--- a/metagpt/tools/search_engine_meilisearch.py+++ b/metagpt/tools/search_engine_meilisearch.py@@ -6,10 +6,12 @@@File : search_engine_meilisearch.py"""-from metagpt.logs import logger+from typing import List+import meilisearchfrom meilisearch.index import Index-from typing import List++from metagpt.logs import loggerclass DataSource:diff --git a/metagpt/tools/search_engine_serpapi.py b/metagpt/tools/search_engine_serpapi.pyindex 21db1fd04..813d5e907 100644--- a/metagpt/tools/search_engine_serpapi.py+++ b/metagpt/tools/search_engine_serpapi.py@@ -6,11 +6,12 @@@File : search_engine_serpapi.py"""from typing import Any, Dict, Optional, Tuple-from metagpt.logs import logger+import aiohttpfrom pydantic import BaseModel, Fieldfrom metagpt.config import Config+from metagpt.logs import loggerclass SerpAPIWrapper(BaseModel):diff --git a/metagpt/tools/search_engine_serper.py b/metagpt/tools/search_engine_serper.pyindex 91a8afce9..d0816507d 100644--- a/metagpt/tools/search_engine_serper.py+++ b/metagpt/tools/search_engine_serper.py@@ -5,13 +5,14 @@@Author : alexanderwu@File : search_engine_serpapi.py"""+import jsonfrom typing import Any, Dict, Optional, Tuple-from metagpt.logs import logger+import aiohttp-import jsonfrom pydantic import BaseModel, Fieldfrom metagpt.config import Config+from metagpt.logs import loggerclass SerperWrapper(BaseModel):diff --git a/metagpt/tools/ut_writer.py b/metagpt/tools/ut_writer.pyindex ffe351fac..2f4e1ec21 100644--- a/metagpt/tools/ut_writer.py+++ b/metagpt/tools/ut_writer.py@@ -6,7 +6,6 @@ from pathlib import Pathfrom metagpt.provider.openai_api import OpenAIGPTAPI as GPTAPI-ICL_SAMPLE = '''接口定义:```text接口名称:元素打标签diff --git a/metagpt/utils/__init__.py b/metagpt/utils/__init__.pyindex ee1aa8133..579308a3b 100644--- a/metagpt/utils/__init__.py+++ b/metagpt/utils/__init__.py@@ -6,6 +6,10 @@@File : __init__.py"""-from metagpt.utils.singleton import Singletonfrom metagpt.utils.read_document import read_docx-from metagpt.utils.token_counter import TOKEN_COSTS, count_string_tokens, count_message_tokens+from metagpt.utils.singleton import Singleton+from metagpt.utils.token_counter import (+ TOKEN_COSTS,+ count_message_tokens,+ count_string_tokens,+)diff --git a/metagpt/utils/common.py b/metagpt/utils/common.pyindex 0d3c933af..969a9da8e 100644--- a/metagpt/utils/common.py+++ b/metagpt/utils/common.py@@ -5,12 +5,12 @@@Author : alexanderwu@File : common.py"""-import osimport astimport inspect+import osimport re+from typing import List, Tuple, Union-from typing import Union, List, Tuplefrom metagpt.logs import loggerdiff --git a/metagpt/utils/mermaid.py b/metagpt/utils/mermaid.pyindex 51e54ac33..ca3a928ea 100644--- a/metagpt/utils/mermaid.py+++ b/metagpt/utils/mermaid.py@@ -5,8 +5,8 @@@Author : alexanderwu@File : mermaid.py"""-import subprocessimport os+import subprocessfrom pathlib import Pathfrom metagpt.const import PROJECT_ROOTdiff --git a/metagpt/utils/token_counter.py b/metagpt/utils/token_counter.pyindex fca1cc166..3fe2e9543 100644--- a/metagpt/utils/token_counter.py+++ b/metagpt/utils/token_counter.py@@ -9,8 +9,8 @@ ref2: https://github.com/Significant-Gravitas/Auto-GPT/blob/master/autogpt/llm/tref3: https://github.com/hwchase17/langchain/blob/master/langchain/chat_models/openai.py"""import tiktoken-from metagpt.schema import RawMessage+from metagpt.schema import RawMessageTOKEN_COSTS = {"gpt-3.5-turbo": {"prompt": 0.0015, "completion": 0.002},diff --git a/setup.py b/setup.pyindex 790c90650..7989462f6 100644--- a/setup.py+++ b/setup.py@@ -1,10 +1,10 @@"""wutils: handy tools"""+import subprocessfrom codecs import openfrom os import path-from setuptools import find_packages, setup, Command-import subprocess+from setuptools import Command, find_packages, setupclass InstallMermaidCLI(Command):diff --git a/startup.py b/startup.pyindex fca731541..d700d99f8 100644--- a/startup.py+++ b/startup.py@@ -1,9 +1,11 @@#!/usr/bin/env python# -*- coding: utf-8 -*-import asyncio+import fire++from metagpt.roles import Architect, Engineer, ProductManager, ProjectManagerfrom metagpt.software_company import SoftwareCompany-from metagpt.roles import ProjectManager, ProductManager, Architect, Engineerasync def startup(idea: str, investment: float = 3.0, n_round: int = 5):diff --git a/tests/conftest.py b/tests/conftest.pyindex b440426c5..9c4f02d2c 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -7,9 +7,10 @@"""from unittest.mock import Mock+import pytest-from metagpt.logs import logger+from metagpt.logs import loggerfrom metagpt.provider.openai_api import OpenAIGPTAPI as GPTAPIdiff --git a/tests/metagpt/actions/test_action.py b/tests/metagpt/actions/test_action.pyindex bc55623fa..63a4dc496 100644--- a/tests/metagpt/actions/test_action.py+++ b/tests/metagpt/actions/test_action.py@@ -7,8 +7,9 @@"""import pytest-from metagpt.logs import logger+from metagpt.actions import Action, WritePRD, WriteTest+from metagpt.logs import loggerdef test_action_repr():diff --git a/tests/metagpt/actions/test_action_output.py b/tests/metagpt/actions/test_action_output.pyindex c6df0b0f8..a556789db 100644--- a/tests/metagpt/actions/test_action_output.py+++ b/tests/metagpt/actions/test_action_output.py@@ -5,9 +5,10 @@@Author : chengmaoyu@File : test_action_output"""-from metagpt.actions import ActionOutputfrom typing import List, Tuple+from metagpt.actions import ActionOutput+t_dict = {"Required Python third-party packages": "\"\"\"\nflask==1.1.2\npygame==2.0.1\n\"\"\"\n","Required Other language third-party packages": "\"\"\"\nNo third-party packages required for other languages.\n\"\"\"\n","Full API spec": "\"\"\"\nopenapi: 3.0.0\ninfo:\n title: Web Snake Game API\n version: 1.0.0\npaths:\n /game:\n get:\n summary: Get the current game state\n responses:\n '200':\n description: A JSON object of the game state\n post:\n summary: Send a command to the game\n requestBody:\n required: true\n content:\n application/json:\n schema:\n type: object\n properties:\n command:\n type: string\n responses:\n '200':\n description: A JSON object of the updated game state\n\"\"\"\n",diff --git a/tests/metagpt/actions/test_debug_error.py b/tests/metagpt/actions/test_debug_error.pyindex 5334cdcc1..dfefd50b3 100644--- a/tests/metagpt/actions/test_debug_error.py+++ b/tests/metagpt/actions/test_debug_error.py@@ -6,6 +6,7 @@@File : test_debug_error.py"""import pytest+from metagpt.actions.debug_error import DebugErrordiff --git a/tests/metagpt/actions/test_design_api.py b/tests/metagpt/actions/test_design_api.pyindex fcc249b15..b6d5caa3d 100644--- a/tests/metagpt/actions/test_design_api.py+++ b/tests/metagpt/actions/test_design_api.py@@ -7,10 +7,9 @@"""import pytest-from metagpt.logs import logger-from metagpt.actions.design_api import WriteDesignfrom metagpt.llm import LLM+from metagpt.logs import loggerfrom metagpt.roles.architect import Architectfrom tests.metagpt.actions.mock import PRD_SAMPLEdiff --git a/tests/metagpt/actions/test_project_management.py b/tests/metagpt/actions/test_project_management.pyindex 071033cea..f27205faa 100644--- a/tests/metagpt/actions/test_project_management.py+++ b/tests/metagpt/actions/test_project_management.py@@ -6,7 +6,7 @@@File : test_project_management.py"""-from metagpt.actions.project_management import WriteTasks, AssignTasks+from metagpt.actions.project_management import AssignTasks, WriteTasksclass TestCreateProjectPlan:diff --git a/tests/metagpt/actions/test_run_code.py b/tests/metagpt/actions/test_run_code.pyindex 40d67ab60..2df691d2a 100644--- a/tests/metagpt/actions/test_run_code.py+++ b/tests/metagpt/actions/test_run_code.py@@ -6,6 +6,7 @@@File : test_run_code.py"""import pytest+from metagpt.actions.run_code import RunCodediff --git a/tests/metagpt/actions/test_write_code.py b/tests/metagpt/actions/test_write_code.pyindex a88d7baa1..7bb18ddf2 100644--- a/tests/metagpt/actions/test_write_code.py+++ b/tests/metagpt/actions/test_write_code.py@@ -6,10 +6,11 @@@File : test_write_code.py"""import pytest-from metagpt.logs import logger+from metagpt.actions.write_code import WriteCode-from tests.metagpt.actions.mock import WRITE_CODE_PROMPT_SAMPLE, TASKS_2from metagpt.llm import LLM+from metagpt.logs import logger+from tests.metagpt.actions.mock import TASKS_2, WRITE_CODE_PROMPT_SAMPLE@pytest.mark.asynciodiff --git a/tests/metagpt/actions/test_write_code_review.py b/tests/metagpt/actions/test_write_code_review.pyindex dda33f903..4a8244284 100644--- a/tests/metagpt/actions/test_write_code_review.py+++ b/tests/metagpt/actions/test_write_code_review.py@@ -6,9 +6,10 @@@File : test_write_code_review.py"""import pytest-from metagpt.logs import logger-from metagpt.llm import LLM+from metagpt.actions.write_code_review import WriteCodeReview+from metagpt.llm import LLM+from metagpt.logs import loggerfrom tests.metagpt.actions.mock import SEARCH_CODE_SAMPLEdiff --git a/tests/metagpt/actions/test_write_prd.py b/tests/metagpt/actions/test_write_prd.pyindex 472d780de..6f5a4d39e 100644--- a/tests/metagpt/actions/test_write_prd.py+++ b/tests/metagpt/actions/test_write_prd.py@@ -6,8 +6,9 @@@File : test_write_prd.py"""import pytest++from metagpt.actions import BossRequirement, WritePRDfrom metagpt.logs import logger-from metagpt.actions import WritePRD, BossRequirementfrom metagpt.roles.product_manager import ProductManagerfrom metagpt.schema import Messagediff --git a/tests/metagpt/actions/test_write_prd_review.py b/tests/metagpt/actions/test_write_prd_review.pyindex aa2c07635..5077fa465 100644--- a/tests/metagpt/actions/test_write_prd_review.py+++ b/tests/metagpt/actions/test_write_prd_review.py@@ -6,6 +6,7 @@@File : test_write_prd_review.py"""import pytest+from metagpt.actions.write_prd_review import WritePRDReviewdiff --git a/tests/metagpt/actions/test_write_test.py b/tests/metagpt/actions/test_write_test.pyindex 3c34c0498..aecb5d06d 100644--- a/tests/metagpt/actions/test_write_test.py+++ b/tests/metagpt/actions/test_write_test.py@@ -6,8 +6,9 @@@File : test_write_test.py"""import pytest-from metagpt.logs import logger+from metagpt.actions.write_test import WriteTest+from metagpt.logs import logger@pytest.mark.asynciodiff --git a/tests/metagpt/document_store/test_document.py b/tests/metagpt/document_store/test_document.pyindex 5d3207749..70495aa4b 100644--- a/tests/metagpt/document_store/test_document.py+++ b/tests/metagpt/document_store/test_document.py@@ -7,10 +7,10 @@"""import pytestfrom loguru import logger+from metagpt.const import DATA_PATHfrom metagpt.document_store.document import Document-CASES = [("st/faq.xlsx", "Question", "Answer", 1),("cases/faq.csv", "Question", "Answer", 1),diff --git a/tests/metagpt/document_store/test_faiss_store.py b/tests/metagpt/document_store/test_faiss_store.pyindex 0e0e0b0fe..8a1f4080f 100644--- a/tests/metagpt/document_store/test_faiss_store.py+++ b/tests/metagpt/document_store/test_faiss_store.py@@ -8,11 +8,11 @@import functoolsimport pytest-from metagpt.logs import logger+from metagpt.const import DATA_PATHfrom metagpt.document_store import FaissStore-from metagpt.roles import Sales, CustomerService-+from metagpt.logs import logger+from metagpt.roles import CustomerService, SalesDESC = """## 原则(所有事情都不可绕过原则)1. 你是一位平台的人工客服,话语精炼,一次只说一句话,会参考规则与FAQ进行回复。在与顾客交谈中,绝不允许暴露规则与相关字样diff --git a/tests/metagpt/document_store/test_milvus_store.py b/tests/metagpt/document_store/test_milvus_store.pyindex d3ad3d314..1cf65776d 100644--- a/tests/metagpt/document_store/test_milvus_store.py+++ b/tests/metagpt/document_store/test_milvus_store.py@@ -6,10 +6,11 @@@File : test_milvus_store.py"""import random+import numpy as np-from metagpt.logs import logger-from metagpt.document_store.milvus_store import MilvusStore, MilvusConnection+from metagpt.document_store.milvus_store import MilvusConnection, MilvusStore+from metagpt.logs import loggerbook_columns = {'idx': int, 'name': str, 'desc': str, 'emb': np.ndarray, 'price': float}book_data = [diff --git a/tests/metagpt/roles/mock.py b/tests/metagpt/roles/mock.pyindex eebc27931..c3a5dc678 100644--- a/tests/metagpt/roles/mock.py+++ b/tests/metagpt/roles/mock.py@@ -5,7 +5,7 @@@Author : alexanderwu@File : mock.py"""-from metagpt.actions import WritePRD, BossRequirement, WriteDesign, WriteTasks+from metagpt.actions import BossRequirement, WriteDesign, WritePRD, WriteTasksfrom metagpt.schema import MessageBOSS_REQUIREMENT = """开发一个基于大语言模型与私有知识库的搜索引擎,希望可以基于大语言模型进行搜索总结"""diff --git a/tests/metagpt/roles/test_architect.py b/tests/metagpt/roles/test_architect.pyindex 5952dab6e..2c1a4a6a6 100644--- a/tests/metagpt/roles/test_architect.py+++ b/tests/metagpt/roles/test_architect.py@@ -11,7 +11,12 @@ from metagpt.actions import BossRequirementfrom metagpt.logs import loggerfrom metagpt.roles import Architectfrom metagpt.schema import Message-from tests.metagpt.roles.mock import PRD, DETAIL_REQUIREMENT, BOSS_REQUIREMENT, MockMessages+from tests.metagpt.roles.mock import (+ BOSS_REQUIREMENT,+ DETAIL_REQUIREMENT,+ PRD,+ MockMessages,+)@pytest.mark.asynciodiff --git a/tests/metagpt/roles/test_engineer.py b/tests/metagpt/roles/test_engineer.pyindex 9a37e7697..4f8795e34 100644--- a/tests/metagpt/roles/test_engineer.py+++ b/tests/metagpt/roles/test_engineer.py@@ -5,15 +5,23 @@@Author : alexanderwu@File : test_engineer.py"""-import reimport ast+import re+import pytest+from metagpt.logs import logger-from metagpt.utils.common import CodeParserfrom metagpt.roles.engineer import Engineerfrom metagpt.schema import Message-from tests.metagpt.roles.mock import SYSTEM_DESIGN, TASKS, PRD, MockMessages, STRS_FOR_PARSING, \- TASKS_TOMATO_CLOCK+from metagpt.utils.common import CodeParser+from tests.metagpt.roles.mock import (+ PRD,+ STRS_FOR_PARSING,+ SYSTEM_DESIGN,+ TASKS,+ TASKS_TOMATO_CLOCK,+ MockMessages,+)@pytest.mark.asynciodiff --git a/tests/metagpt/roles/test_product_manager.py b/tests/metagpt/roles/test_product_manager.pyindex 163978a77..7d364ab41 100644--- a/tests/metagpt/roles/test_product_manager.py+++ b/tests/metagpt/roles/test_product_manager.py@@ -6,12 +6,12 @@@File : test_product_manager.py"""import pytest-from metagpt.logs import loggerfrom metagpt.actions import BossRequirement+from metagpt.logs import loggerfrom metagpt.roles import ProductManagerfrom metagpt.schema import Message-from tests.metagpt.roles.mock import DETAIL_REQUIREMENT, BOSS_REQUIREMENT, MockMessages+from tests.metagpt.roles.mock import BOSS_REQUIREMENT, DETAIL_REQUIREMENT, MockMessages@pytest.mark.asynciodiff --git a/tests/metagpt/roles/test_project_manager.py b/tests/metagpt/roles/test_project_manager.pyindex a1c3e91cc..500bd4c65 100644--- a/tests/metagpt/roles/test_project_manager.py+++ b/tests/metagpt/roles/test_project_manager.py@@ -6,6 +6,7 @@@File : test_project_manager.py"""import pytest+from metagpt.logs import loggerfrom metagpt.roles import ProjectManagerfrom metagpt.schema import Messagediff --git a/tests/metagpt/test_environment.py b/tests/metagpt/test_environment.pyindex 578da8b0b..a0f1f6257 100644--- a/tests/metagpt/test_environment.py+++ b/tests/metagpt/test_environment.py@@ -8,12 +8,12 @@import pytest+from metagpt.actions import BossRequirement+from metagpt.environment import Environmentfrom metagpt.logs import loggerfrom metagpt.manager import Manager-from metagpt.environment import Environment-from metagpt.roles import ProductManager, Architect, Role+from metagpt.roles import Architect, ProductManager, Rolefrom metagpt.schema import Message-from metagpt.actions import BossRequirement@pytest.fixturediff --git a/tests/metagpt/test_gpt.py b/tests/metagpt/test_gpt.pyindex 2fca1f56f..d411faad2 100644--- a/tests/metagpt/test_gpt.py+++ b/tests/metagpt/test_gpt.py@@ -7,6 +7,7 @@"""import pytest+from metagpt.logs import loggerdiff --git a/tests/metagpt/test_llm.py b/tests/metagpt/test_llm.pyindex 4aeac7407..bc008bc97 100644--- a/tests/metagpt/test_llm.py+++ b/tests/metagpt/test_llm.py@@ -7,6 +7,7 @@"""import pytest+from metagpt.llm import LLMdiff --git a/tests/metagpt/test_message.py b/tests/metagpt/test_message.pyindex dd9f61747..e26f38381 100644--- a/tests/metagpt/test_message.py+++ b/tests/metagpt/test_message.py@@ -7,7 +7,7 @@"""import pytest-from metagpt.schema import Message, UserMessage, SystemMessage, AIMessage, RawMessage+from metagpt.schema import AIMessage, Message, RawMessage, SystemMessage, UserMessagedef test_message():diff --git a/tests/metagpt/test_schema.py b/tests/metagpt/test_schema.pyindex ee7a84da0..f92d19d0d 100644--- a/tests/metagpt/test_schema.py+++ b/tests/metagpt/test_schema.py@@ -5,7 +5,7 @@@Author : alexanderwu@File : test_schema.py"""-from metagpt.schema import UserMessage, SystemMessage, AIMessage, Message+from metagpt.schema import AIMessage, Message, SystemMessage, UserMessagedef test_messages():diff --git a/tests/metagpt/test_software_company.py b/tests/metagpt/test_software_company.pyindex e21207918..00538442c 100644--- a/tests/metagpt/test_software_company.py+++ b/tests/metagpt/test_software_company.py@@ -6,6 +6,7 @@@File : test_software_company.py"""import pytest+from metagpt.logs import loggerfrom metagpt.software_company import SoftwareCompanydiff --git a/tests/metagpt/tools/test_prompt_generator.py b/tests/metagpt/tools/test_prompt_generator.pyindex 84e5d0d41..d2e870c6d 100644--- a/tests/metagpt/tools/test_prompt_generator.py+++ b/tests/metagpt/tools/test_prompt_generator.py@@ -7,8 +7,14 @@"""import pytest-from metagpt.tools.prompt_writer import GPTPromptGenerator, EnronTemplate, BEAGECTemplate, WikiHowTemplate+from metagpt.logs import logger+from metagpt.tools.prompt_writer import (+ BEAGECTemplate,+ EnronTemplate,+ GPTPromptGenerator,+ WikiHowTemplate,+)@pytest.mark.usefixtures("llm_api")diff --git a/tests/metagpt/tools/test_search_engine.py b/tests/metagpt/tools/test_search_engine.pyindex a1ea673a7..2418c7b26 100644--- a/tests/metagpt/tools/test_search_engine.py+++ b/tests/metagpt/tools/test_search_engine.py@@ -7,6 +7,7 @@"""import pytest+from metagpt.logs import loggerfrom metagpt.tools.search_engine import SearchEnginediff --git a/tests/metagpt/tools/test_search_engine_meilisearch.py b/tests/metagpt/tools/test_search_engine_meilisearch.pyindex 5b8996f01..8d2bb6494 100644--- a/tests/metagpt/tools/test_search_engine_meilisearch.py+++ b/tests/metagpt/tools/test_search_engine_meilisearch.py@@ -5,11 +5,13 @@@Author : alexanderwu@File : test_search_engine_meilisearch.py"""+import subprocessimport time+import pytest-import subprocess+from metagpt.logs import logger-from metagpt.tools.search_engine_meilisearch import MeilisearchEngine, DataSource+from metagpt.tools.search_engine_meilisearch import DataSource, MeilisearchEngineMASTER_KEY = '116Qavl2qpCYNEJNv5-e0RC9kncev1nr1gt7ybEGVLk'diff --git a/tests/metagpt/tools/test_summarize.py b/tests/metagpt/tools/test_summarize.pyindex c2fb14703..42d69e503 100644--- a/tests/metagpt/tools/test_summarize.py+++ b/tests/metagpt/tools/test_summarize.py@@ -7,10 +7,10 @@"""import pytest+from metagpt.logs import loggerfrom metagpt.tools.search_engine import SearchEngine-CASES = ["""# 上下文[{'title': '抗痘 / 控油 / 毛孔調理 臉部保養 商品 | 屈臣氏 Watsons', 'href': 'https://www.watsons.com.tw/%E8%87%89%E9%83%A8%E4%BF%9D%E9%A4%8A/%E6%8A%97%E7%97%98-%E6%8E%A7%E6%B2%B9-%E6%AF%9B%E5%AD%94%E8%AA%BF%E7%90%86/c/10410601', 'body': '抗痘 / 控油 / 毛孔調理等臉部保養用品盡在屈臣氏,多樣抗痘 / 控油 / 毛孔調理商品全面符合您的需求。3M, 3M Nexcare, ARIN, Biore 蜜妮, CEZANNE等眾多推薦品牌快來屈臣氏選購。'}, {'title': '有哪些祛痘印产品曾惊艳过你? - 知乎', 'href': 'https://www.zhihu.com/question/380098171', 'body': '有哪些祛痘印产品曾惊艳过你? ... 素姬水杨酸精华 祛痘产品里绝对不能少了水杨酸这个成分!用这个品牌主要是信赖它的温和性,而且价格便宜,去粉刺痘痘效果又好,对闭口和黑头都有效果。 ... 购买比较方便,我在屈臣氏买的,50RMB. 西班牙IFC duo祛痘凝露 ...'}, {'title': '屈臣氏祛痘系列_百度知道', 'href': 'https://zhidao.baidu.com/question/581355167.html', 'body': '2014-08-28 屈臣氏里有哪些祛痘效果好的产品? 26 2007-08-25 屈臣氏有卖哪些祛痘产品 61 2019-05-27 屈臣氏有哪些祛痘产品 什么方法会比较好?? 2015-09-27 屈臣氏白金祛痘系列的使用顺序 30 2014-11-03 屈臣氏卖的祛痘产品叫什么 1 2011-05-24 屈臣氏的祛痘好用的产品有那些 ...'}, {'title': '屈臣氏里有哪些祛痘效果好的产品? - 百度知道', 'href': 'https://zhidao.baidu.com/question/360679400530686652.html', 'body': '阿达帕林是一款医药系列的祛痘产品,它里面蕴含了非常丰富的甲酸类化合物,涂抹在皮肤上会有很好的消炎效果,对于粉刺、闭口、痘痘等痤疮系列的皮肤问题也有很好的修复,可以让毛囊上的皮肤细胞正常分化。. 用户实测评分:9.663分. 实验室效果评测:9. ...'}, {'title': '33款屈臣氏最值得买的好物! - 知乎 - 知乎专栏', 'href': 'https://zhuanlan.zhihu.com/p/31366278', 'body': '屈臣氏深层卸妆棉. 19.9元/25*2. 一般出差不想带很多瓶瓶罐罐就会带卸妆棉,当时是买一送一,就觉得超划算。. 棉质很好,很舒服,厚度适中,温和不刺激,淡淡的香味,卸得很舒心,卸得也很干净。. 眼妆也可以用这个卸,因为它不含酒精,所以一点也不辣 ...'}, {'title': '屈臣氏官网 - Watsons', 'href': 'https://www.watsons.com.cn/', 'body': '屈臣氏百年正品口碑,现金优惠多多多,2小时闪电送到家,还能屈臣氏门店自提。美妆洗护,口腔保健,日用百货,男士护理,更便捷的操作,满足你更多。屈臣氏始创于1841年,线下门店覆盖全球12个国家地区,超过5500家门店。在中国,400多个城市已超过3000家门店,6000万名会员与你一起放心买好货!'}, {'title': '15款日本最具口碑的祛痘神器! - 知乎 - 知乎专栏', 'href': 'https://zhuanlan.zhihu.com/p/63349036', 'body': '乐敦. Acnes药用祛痘抗痘粉尘暗疮药膏. 药用抗痘药膏清爽啫哩質地,维生素E衍生物,维生素B6组合,膏体不腻,轻透很好吸收,淡淡清香味主要针对红肿且疼痛的大颗痘痘,排出脓液、杀灭细菌、消除红肿,第二天就会有效果。. DHC. 祛痘净痘调理精华. 含有o-Cymen ...'}, {'title': '请问屈臣氏什么产品可以去痘疤的 - Sina', 'href': 'https://iask.sina.com.cn/b/1STygN4RT2wZ.html', 'body': '请问屈臣氏什么产品可以去痘疤的本人很少长痘痘,偶尔冒几颗。脸颊上的痘痘来的快去的快,不怎么留疤,就是额头和下巴嘴角边的痘痘感觉超级敏感,一挤就留疤,苦恼! ... 想问下屈臣氏有什么产品能去痘疤的,要有效哦~谢谢各位了! ...'}, {'title': '屈臣氏祛痘凝胶新款 - 屈臣氏祛痘凝胶2021年新款 - 京东', 'href': 'https://www.jd.com/xinkuan/16729c68245569aae4c3.html', 'body': '屈臣氏芦荟凝胶清凉滋润舒缓祛痘印痘坑痘疤补水保湿晒后修复凝胶 【保湿芦荟凝胶】3瓶900g. 2+ 条评论. 屈臣氏 Leaf Simple简单叶子水杨酸祛痘凝胶去痘印粉刺闭口淡化痘坑研春堂收缩毛孔改善粉刺 两支. 4+ 条评论. 屈臣氏 Leaf Simple简单叶子水杨酸祛痘凝胶去痘印 ...'}]diff --git a/tests/metagpt/tools/test_translate.py b/tests/metagpt/tools/test_translate.pyindex 41ab6eeab..47a9034a5 100644--- a/tests/metagpt/tools/test_translate.py+++ b/tests/metagpt/tools/test_translate.py@@ -7,6 +7,7 @@"""import pytest+from metagpt.logs import loggerfrom metagpt.tools.translator import Translatordiff --git a/tests/metagpt/tools/test_ut_generator.py b/tests/metagpt/tools/test_ut_generator.pyindex 3aabde58f..6f29999d4 100644--- a/tests/metagpt/tools/test_ut_generator.py+++ b/tests/metagpt/tools/test_ut_generator.py@@ -6,9 +6,8 @@@File : test_ut_generator.py"""-from metagpt.tools.ut_writer import UTGenerator-from metagpt.const import SWAGGER_PATH, UT_PY_PATH, API_QUESTIONS_PATH-from metagpt.tools.ut_writer import YFT_PROMPT_PREFIX+from metagpt.const import API_QUESTIONS_PATH, SWAGGER_PATH, UT_PY_PATH+from metagpt.tools.ut_writer import YFT_PROMPT_PREFIX, UTGeneratorclass TestUTWriter:diff --git a/tests/metagpt/utils/test_code_parser.py b/tests/metagpt/utils/test_code_parser.pyindex cf06cce1d..707b558e1 100644--- a/tests/metagpt/utils/test_code_parser.py+++ b/tests/metagpt/utils/test_code_parser.py@@ -7,6 +7,7 @@"""import pytest+from metagpt.utils.common import CodeParsert_text = '''diff --git a/tests/metagpt/utils/test_common.py b/tests/metagpt/utils/test_common.pyindex 1b6a90da0..ec4443175 100644--- a/tests/metagpt/utils/test_common.py+++ b/tests/metagpt/utils/test_common.py@@ -6,8 +6,10 @@@File : test_common.py"""-import pytestimport os++import pytest+from metagpt.const import get_project_rootdiff --git a/tests/metagpt/utils/test_custom_aio_session.py b/tests/metagpt/utils/test_custom_aio_session.pyindex 56d295e72..458466a60 100644--- a/tests/metagpt/utils/test_custom_aio_session.py+++ b/tests/metagpt/utils/test_custom_aio_session.py@@ -9,6 +9,7 @@#!/usr/bin/env python# -*- coding: utf-8 -*-import pytest+from metagpt.logs import loggerfrom metagpt.provider.openai_api import OpenAIGPTAPIfrom metagpt.utils.custom_aio_session import CustomAioSessiondiff --git a/tests/metagpt/utils/test_output_parser.py b/tests/metagpt/utils/test_output_parser.pyindex 4a365648d..ce05ed0b1 100644--- a/tests/metagpt/utils/test_output_parser.py+++ b/tests/metagpt/utils/test_output_parser.py@@ -6,10 +6,12 @@@File : test_output_parser.py"""-import pytest-from typing import List, Tuple-import reimport ast+import re+from typing import List, Tuple++import pytest+from metagpt.utils.common import OutputParserdiff --git a/tests/metagpt/utils/test_read_docx.py b/tests/metagpt/utils/test_read_docx.pyindex d4ff730df..0e97c2644 100644--- a/tests/metagpt/utils/test_read_docx.py+++ b/tests/metagpt/utils/test_read_docx.py@@ -7,6 +7,7 @@"""import pytest+from metagpt.const import PROJECT_ROOTfrom metagpt.utils.read_document import read_docx