update env load path

This commit is contained in:
Wendong
2025-03-15 22:59:48 +08:00
parent 35aa778b11
commit 0cf3717f57
12 changed files with 71 additions and 29 deletions

View File

@@ -26,14 +26,15 @@ from camel.logger import set_log_level
from owl.utils import run_society
from camel.societies import RolePlaying
load_dotenv()
import pathlib
base_dir = pathlib.Path(__file__).parent.parent
env_path = base_dir / "owl" / ".env"
load_dotenv(dotenv_path=str(env_path))
set_log_level(level="DEBUG")
# Get current script directory
base_dir = os.path.dirname(os.path.abspath(__file__))
def construct_society(question: str) -> RolePlaying:
r"""Construct a society of agents based on the given question.