Skip to content

Commit

Permalink
refactor: rename libro config key
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk authored and BroKun committed Oct 8, 2024
1 parent 35f143b commit 7e93bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libro-ai/src/libro_ai/chat/openai_chat_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class OpenAIChat(LLMChat):
def load(self):
if is_langchain_installed():
extra_params = {}
libro_ai_config = libro_config.get_config().get("libro-ai")
libro_ai_config = libro_config.get_config().get("llm")
if libro_ai_config is not None:
if api_key := libro_ai_config.get("OPENAI_API_KEY"):
extra_params["api_key"] = api_key
Expand Down
4 changes: 2 additions & 2 deletions libro-sql/src/libro_sql/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ class DatabaseManager():
db: Optional[Database] = None

def __init__(self) -> None:
libro_sql_config = libro_config.get_config().get("libro-sql")
libro_sql_config = libro_config.get_config().get("db")
if libro_sql_config is not None:
self.config(libro_sql_config)
else:
raise ValueError(f"Can not find config of libro-sql")
raise ValueError(f"Can not find config of db")

def config(self, c: dict):
config = DatabaseConfig.model_validate(c)
Expand Down

0 comments on commit 7e93bf1

Please sign in to comment.