You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import os
from chainlite import llm_generation_chain, load_config_from_file
current_dir = os.path.dirname(os.path.realpath(__file__))
load_config_from_file(os.path.join(current_dir, "llm_config.yaml"))
When I run it I get the following error:
File "/home/usr/worksheets/worksheets/environment.py", line 14, in <module>
from chainlite import llm_generation_chain, load_config_from_file
File "/home/usr/.conda/envs/worksheets-chainlite/lib/python3.11/site-packages/chainlite/__init__.py", line 3, in <module>
from .llm_config import (
File "/home/usr/.conda/envs/worksheets-chainlite/lib/python3.11/site-packages/chainlite/llm_config.py", line 148, in <module>
load_config_from_file("./llm_config.yaml")
File "/home/usr/.conda/envs/worksheets-chainlite/lib/python3.11/site-packages/chainlite/llm_config.py", line 81, in load_config_from_file
with open(config_file, "r") as config_file:
^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './llm_config.yaml'
The library assumes that the project's root directory contains a ./llm_config.yaml file and tries to load it even if load_config_from_file() is used.
I believe the issue is L148 in llm_config.py, which hardcodes the config file path.
The text was updated successfully, but these errors were encountered:
I put it there because some code bases don't have a good starting point to put load_config_from_file() in, such that it always gets loaded first. Any suggestions?
I have code that looks like this:
When I run it I get the following error:
The library assumes that the project's root directory contains a
./llm_config.yaml
file and tries to load it even ifload_config_from_file()
is used.I believe the issue is L148 in
llm_config.py
, which hardcodes the config file path.The text was updated successfully, but these errors were encountered: