forked from erwinmsmith/SOMAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
26 lines (22 loc) · 748 Bytes
/
config.py
File metadata and controls
26 lines (22 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import json
import os
# 加载配置文件
config_path = "config/config.json"
with open(config_path, "r") as f:
config = json.load(f)
# 数据库路径配置
config["database"] = {
"rules_db": os.path.join("database", "rules.json"),
"knowledge_db": os.path.join("database", "knowledge.jsonl"),
"experience_pool": os.path.join("database", "experience_pool.json"),
"vector_db": os.path.join("database", "vector_db")
}
# 智能体配置
config["planner"] = {
"model": config["api_keys"]["deepseek_chat"],
"vector_db_path": config["database"]["vector_db"]
}
# 合并actor配置
config["actor"] = config.get("actor", {})
config["actor"].setdefault("model_paths", {})
config["actor"]["model_paths"] = config["model_paths"]