Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion common/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,17 @@
try:
with open(os.path.join(get_project_base_directory(), "conf", "llm_factories.json"), "r") as f:
FACTORY_LLM_INFOS = json.load(f)["factory_llm_infos"]
except Exception:
except FileNotFoundError:
logging.warning(f"LLM factories config not found at {config_path}")

Check failure on line 183 in common/settings.py

View workflow job for this annotation

GitHub Actions / ragflow_tests

Ruff (F821)

common/settings.py:183:62: F821 Undefined name `config_path`
FACTORY_LLM_INFOS = []
except KeyError:
logging.warning("Invalid LLM factories config format")
FACTORY_LLM_INFOS = []
except json.JSONDecodeError:
logging.error("Invalid JSON in LLM factories config")
FACTORY_LLM_INFOS = []
except Exception as e:
logging.error(f"Unexpected error loading LLM factories config: {e}")
FACTORY_LLM_INFOS = []

global API_KEY
Expand Down
Loading