Commit
·
7a12aab
1
Parent(s):
4110805
update env load path
Browse files- examples/run.py +5 -1
- examples/run_azure_openai.py +6 -2
- examples/run_deepseek_zh.py +6 -6
- examples/run_gaia_roleplaying.py +6 -2
- examples/run_mcp.py +5 -1
- examples/run_mini.py +6 -1
- examples/run_ollama.py +6 -2
- examples/run_openai_compatiable_model.py +6 -2
- examples/run_qwen_mini_zh.py +6 -2
- examples/run_qwen_zh.py +7 -2
- examples/run_terminal.py +6 -3
- examples/run_terminal_zh.py +5 -4
examples/run.py
CHANGED
@@ -29,7 +29,11 @@ from camel.societies import RolePlaying
|
|
29 |
|
30 |
from owl.utils import run_society, DocumentProcessingToolkit
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
set_log_level(level="DEBUG")
|
35 |
|
|
|
29 |
|
30 |
from owl.utils import run_society, DocumentProcessingToolkit
|
31 |
|
32 |
+
import pathlib
|
33 |
+
|
34 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
35 |
+
env_path = base_dir / "owl" / ".env"
|
36 |
+
load_dotenv(dotenv_path=str(env_path))
|
37 |
|
38 |
set_log_level(level="DEBUG")
|
39 |
|
examples/run_azure_openai.py
CHANGED
@@ -29,9 +29,13 @@ from owl.utils import OwlRolePlaying, run_society
|
|
29 |
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
|
36 |
|
37 |
def construct_society(question: str) -> OwlRolePlaying:
|
|
|
29 |
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
+
import pathlib
|
33 |
+
|
34 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
35 |
+
env_path = base_dir / "owl" / ".env"
|
36 |
+
load_dotenv(dotenv_path=str(env_path))
|
37 |
|
38 |
+
set_log_level(level="DEBUG")
|
39 |
|
40 |
|
41 |
def construct_society(question: str) -> OwlRolePlaying:
|
examples/run_deepseek_zh.py
CHANGED
@@ -20,7 +20,6 @@
|
|
20 |
|
21 |
from dotenv import load_dotenv
|
22 |
|
23 |
-
|
24 |
from camel.models import ModelFactory
|
25 |
from camel.toolkits import (
|
26 |
ExcelToolkit,
|
@@ -29,17 +28,18 @@ from camel.toolkits import (
|
|
29 |
CodeExecutionToolkit,
|
30 |
)
|
31 |
from camel.types import ModelPlatformType, ModelType
|
32 |
-
|
|
|
33 |
|
34 |
from owl.utils import run_society
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
from camel.logger import set_log_level
|
39 |
|
40 |
set_log_level(level="DEBUG")
|
41 |
|
42 |
-
|
|
|
|
|
43 |
|
44 |
|
45 |
def construct_society(question: str) -> RolePlaying:
|
|
|
20 |
|
21 |
from dotenv import load_dotenv
|
22 |
|
|
|
23 |
from camel.models import ModelFactory
|
24 |
from camel.toolkits import (
|
25 |
ExcelToolkit,
|
|
|
28 |
CodeExecutionToolkit,
|
29 |
)
|
30 |
from camel.types import ModelPlatformType, ModelType
|
31 |
+
from camel.societies import RolePlaying
|
32 |
+
from camel.logger import set_log_level
|
33 |
|
34 |
from owl.utils import run_society
|
35 |
|
36 |
+
import pathlib
|
|
|
|
|
37 |
|
38 |
set_log_level(level="DEBUG")
|
39 |
|
40 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
41 |
+
env_path = base_dir / "owl" / ".env"
|
42 |
+
load_dotenv(dotenv_path=str(env_path))
|
43 |
|
44 |
|
45 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_gaia_roleplaying.py
CHANGED
@@ -35,9 +35,13 @@ from camel.configs import ChatGPTConfig
|
|
35 |
from owl.utils import GAIABenchmark
|
36 |
from camel.logger import set_log_level
|
37 |
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
|
42 |
logger = get_logger(__name__)
|
43 |
|
|
|
35 |
from owl.utils import GAIABenchmark
|
36 |
from camel.logger import set_log_level
|
37 |
|
38 |
+
import pathlib
|
39 |
+
|
40 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
41 |
+
env_path = base_dir / "owl" / ".env"
|
42 |
+
load_dotenv(dotenv_path=str(env_path))
|
43 |
|
44 |
+
set_log_level(level="DEBUG")
|
45 |
|
46 |
logger = get_logger(__name__)
|
47 |
|
examples/run_mcp.py
CHANGED
@@ -104,8 +104,12 @@ from camel.toolkits import MCPToolkit
|
|
104 |
|
105 |
from owl.utils.enhanced_role_playing import OwlRolePlaying, arun_society
|
106 |
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
-
load_dotenv()
|
109 |
set_log_level(level="DEBUG")
|
110 |
|
111 |
|
|
|
104 |
|
105 |
from owl.utils.enhanced_role_playing import OwlRolePlaying, arun_society
|
106 |
|
107 |
+
import pathlib
|
108 |
+
|
109 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
110 |
+
env_path = base_dir / "owl" / ".env"
|
111 |
+
load_dotenv(dotenv_path=str(env_path))
|
112 |
|
|
|
113 |
set_log_level(level="DEBUG")
|
114 |
|
115 |
|
examples/run_mini.py
CHANGED
@@ -26,7 +26,12 @@ from owl.utils import run_society
|
|
26 |
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
set_log_level(level="DEBUG")
|
31 |
|
32 |
|
|
|
26 |
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
+
import pathlib
|
30 |
+
|
31 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
32 |
+
env_path = base_dir / "owl" / ".env"
|
33 |
+
load_dotenv(dotenv_path=str(env_path))
|
34 |
+
|
35 |
set_log_level(level="DEBUG")
|
36 |
|
37 |
|
examples/run_ollama.py
CHANGED
@@ -31,9 +31,13 @@ from camel.societies import RolePlaying
|
|
31 |
|
32 |
from camel.logger import set_log_level
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
|
39 |
def construct_society(question: str) -> RolePlaying:
|
|
|
31 |
|
32 |
from camel.logger import set_log_level
|
33 |
|
34 |
+
import pathlib
|
35 |
+
|
36 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
37 |
+
env_path = base_dir / "owl" / ".env"
|
38 |
+
load_dotenv(dotenv_path=str(env_path))
|
39 |
|
40 |
+
set_log_level(level="DEBUG")
|
41 |
|
42 |
|
43 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_openai_compatiable_model.py
CHANGED
@@ -29,9 +29,13 @@ from owl.utils import run_society
|
|
29 |
from camel.societies import RolePlaying
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
|
36 |
|
37 |
def construct_society(question: str) -> RolePlaying:
|
|
|
29 |
from camel.societies import RolePlaying
|
30 |
from camel.logger import set_log_level
|
31 |
|
32 |
+
import pathlib
|
33 |
+
|
34 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
35 |
+
env_path = base_dir / "owl" / ".env"
|
36 |
+
load_dotenv(dotenv_path=str(env_path))
|
37 |
|
38 |
+
set_log_level(level="DEBUG")
|
39 |
|
40 |
|
41 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_qwen_mini_zh.py
CHANGED
@@ -28,9 +28,13 @@ from camel.societies import RolePlaying
|
|
28 |
|
29 |
from camel.logger import set_log_level
|
30 |
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
|
34 |
|
35 |
|
36 |
def construct_society(question: str) -> RolePlaying:
|
|
|
28 |
|
29 |
from camel.logger import set_log_level
|
30 |
|
31 |
+
import pathlib
|
32 |
+
|
33 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
34 |
+
env_path = base_dir / "owl" / ".env"
|
35 |
+
load_dotenv(dotenv_path=str(env_path))
|
36 |
|
37 |
+
set_log_level(level="DEBUG")
|
38 |
|
39 |
|
40 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_qwen_zh.py
CHANGED
@@ -34,9 +34,14 @@ from owl.utils import run_society, DocumentProcessingToolkit
|
|
34 |
|
35 |
from camel.logger import set_log_level
|
36 |
|
37 |
-
set_log_level(level="DEBUG")
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
|
42 |
def construct_society(question: str) -> RolePlaying:
|
|
|
34 |
|
35 |
from camel.logger import set_log_level
|
36 |
|
|
|
37 |
|
38 |
+
import pathlib
|
39 |
+
|
40 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
41 |
+
env_path = base_dir / "owl" / ".env"
|
42 |
+
load_dotenv(dotenv_path=str(env_path))
|
43 |
+
|
44 |
+
set_log_level(level="DEBUG")
|
45 |
|
46 |
|
47 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_terminal.py
CHANGED
@@ -26,10 +26,13 @@ from camel.logger import set_log_level
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
set_log_level(level="DEBUG")
|
31 |
-
# Get current script directory
|
32 |
-
base_dir = os.path.dirname(os.path.abspath(__file__))
|
33 |
|
34 |
|
35 |
def construct_society(question: str) -> RolePlaying:
|
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
+
import pathlib
|
30 |
+
|
31 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
32 |
+
env_path = base_dir / "owl" / ".env"
|
33 |
+
load_dotenv(dotenv_path=str(env_path))
|
34 |
+
|
35 |
set_log_level(level="DEBUG")
|
|
|
|
|
36 |
|
37 |
|
38 |
def construct_society(question: str) -> RolePlaying:
|
examples/run_terminal_zh.py
CHANGED
@@ -26,12 +26,13 @@ from camel.logger import set_log_level
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
-
|
30 |
-
set_log_level(level="DEBUG")
|
31 |
|
|
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
base_dir = os.path.dirname(os.path.abspath(__file__))
|
35 |
|
36 |
|
37 |
def construct_society(question: str) -> RolePlaying:
|
|
|
26 |
from owl.utils import run_society
|
27 |
from camel.societies import RolePlaying
|
28 |
|
29 |
+
import pathlib
|
|
|
30 |
|
31 |
+
base_dir = pathlib.Path(__file__).parent.parent
|
32 |
+
env_path = base_dir / "owl" / ".env"
|
33 |
+
load_dotenv(dotenv_path=str(env_path))
|
34 |
|
35 |
+
set_log_level(level="DEBUG")
|
|
|
36 |
|
37 |
|
38 |
def construct_society(question: str) -> RolePlaying:
|