Skip to content

Commit

Permalink
added support for optiona; loading of legacy config
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgrim committed Mar 10, 2024
1 parent 05f4506 commit 6668af2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neon_llm_core/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import json
import os

from dataclasses import dataclass
from os.path import join, dirname, isfile
Expand All @@ -38,7 +39,7 @@ def load_config() -> dict:
"""
Load and return a configuration object,
"""
legacy_config_path = "/app/app/config.json"
legacy_config_path = os.getenv("NEON_LLM_LEGACY_CONFIG", "/app/app/config.json")
if isfile(legacy_config_path):
LOG.warning(f"Deprecated configuration found at {legacy_config_path}")
with open(legacy_config_path) as f:
Expand Down

0 comments on commit 6668af2

Please sign in to comment.