try few things

This commit is contained in:
Vasilije 2024-05-25 14:37:42 +02:00
parent d5827b3fff
commit 6a513f25ee

View file

@ -2,8 +2,9 @@
from enum import Enum
import json
import logging
from cognee.infrastructure.llm import llm_config
# from cognee.infrastructure.llm import llm_config
from cognee.config import Config
# Define an Enum for LLM Providers
class LLMProvider(Enum):
OPENAI = "openai"
@ -13,8 +14,8 @@ class LLMProvider(Enum):
def get_llm_client():
"""Get the LLM client based on the configuration using Enums."""
logging.error(json.dumps(llm_config.to_dict()))
provider = LLMProvider(llm_config.llm_provider)
# logging.error(json.dumps(llm_config.to_dict()))
provider = LLMProvider(Config.llm_provider)
if provider == LLMProvider.OPENAI:
from .openai.adapter import OpenAIAdapter