🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fixbug: cannot find metagpt module
莘权 马13a91349f783
diff --git a/examples/llm_hello_world.py b/examples/llm_hello_world.pyindex 3ba03eea0..329247afc 100644--- a/examples/llm_hello_world.py+++ b/examples/llm_hello_world.py@@ -4,9 +4,12 @@@Time : 2023/5/6 14:13@Author : alexanderwu@File : llm_hello_world.py+@Modified By: mashenquan, 2023-8-9, fix-bug: cannot find metagpt module."""import asyncio-+from pathlib import Path+import sys+sys.path.append(str(Path(__file__).resolve().parent.parent))from metagpt.llm import LLM, Claudefrom metagpt.logs import loggerdiff --git a/examples/search_google.py b/examples/search_google.pyindex 9e9521b9c..df45c29ea 100644--- a/examples/search_google.py+++ b/examples/search_google.py@@ -4,10 +4,13 @@@Time : 2023/5/7 18:32@Author : alexanderwu@File : search_google.py+@Modified By: mashenquan, 2023-8-9, fix-bug: cannot find metagpt module."""import asyncio-+from pathlib import Path+import sys+sys.path.append(str(Path(__file__).resolve().parent.parent))from metagpt.roles import Searcherdiff --git a/examples/search_kb.py b/examples/search_kb.pyindex b6f7d87a0..449099380 100644--- a/examples/search_kb.py+++ b/examples/search_kb.py@@ -2,9 +2,12 @@# -*- coding: utf-8 -*-"""@File : search_kb.py+@Modified By: mashenquan, 2023-8-9, fix-bug: cannot find metagpt module."""import asyncio-+from pathlib import Path+import sys+sys.path.append(str(Path(__file__).resolve().parent.parent))from metagpt.const import DATA_PATHfrom metagpt.document_store import FaissStorefrom metagpt.logs import loggerdiff --git a/examples/search_with_specific_engine.py b/examples/search_with_specific_engine.pyindex 7cc431cd4..4423011e4 100644--- a/examples/search_with_specific_engine.py+++ b/examples/search_with_specific_engine.py@@ -1,5 +1,12 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+"""+@Modified By: mashenquan, 2023-8-9, fix-bug: cannot find metagpt module.+"""import asyncio-+from pathlib import Path+import sys+sys.path.append(str(Path(__file__).resolve().parent.parent))from metagpt.roles import Searcherfrom metagpt.tools import SearchEngineTypediff --git a/examples/write_teaching_plan.py b/examples/write_teaching_plan.pyindex 86125f090..5ab7d3ab5 100644--- a/examples/write_teaching_plan.py+++ b/examples/write_teaching_plan.py@@ -1,11 +1,15 @@#!/usr/bin/env python# -*- coding: utf-8 -*-"""-@Modified By: mashenquan, 2023-07-27, + `industry` concept+@Modified By: mashenquan, 2023-07-27, + write teaching plan flow demo+"""import asynciofrom pathlib import Path+import sys++sys.path.append(str(Path(__file__).resolve().parent.parent))import aiofilesimport firefrom metagpt.logs import logger