try few things
This commit is contained in:
parent
d5827b3fff
commit
6a513f25ee
1 changed files with 4 additions and 3 deletions
|
|
@ -2,8 +2,9 @@
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
import json
|
import json
|
||||||
import logging
|
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
|
# Define an Enum for LLM Providers
|
||||||
class LLMProvider(Enum):
|
class LLMProvider(Enum):
|
||||||
OPENAI = "openai"
|
OPENAI = "openai"
|
||||||
|
|
@ -13,8 +14,8 @@ class LLMProvider(Enum):
|
||||||
|
|
||||||
def get_llm_client():
|
def get_llm_client():
|
||||||
"""Get the LLM client based on the configuration using Enums."""
|
"""Get the LLM client based on the configuration using Enums."""
|
||||||
logging.error(json.dumps(llm_config.to_dict()))
|
# logging.error(json.dumps(llm_config.to_dict()))
|
||||||
provider = LLMProvider(llm_config.llm_provider)
|
provider = LLMProvider(Config.llm_provider)
|
||||||
|
|
||||||
if provider == LLMProvider.OPENAI:
|
if provider == LLMProvider.OPENAI:
|
||||||
from .openai.adapter import OpenAIAdapter
|
from .openai.adapter import OpenAIAdapter
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue