diff --git a/cognee/infrastructure/llm/structured_output_framework/baml_src/__init__.py b/cognee/infrastructure/llm/structured_output_framework/baml_src/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/cognee/infrastructure/llm/structured_output_framework/baml_src/extraction/knowledge_graph/__init__.py b/cognee/infrastructure/llm/structured_output_framework/baml_src/extraction/knowledge_graph/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/cognee/infrastructure/llm/structured_output_framework/baml_src/extraction/knowledge_graph/extract_content_graph.py b/cognee/infrastructure/llm/structured_output_framework/baml_src/extraction/knowledge_graph/extract_content_graph.py index d81254351..8cabed157 100644 --- a/cognee/infrastructure/llm/structured_output_framework/baml_src/extraction/knowledge_graph/extract_content_graph.py +++ b/cognee/infrastructure/llm/structured_output_framework/baml_src/extraction/knowledge_graph/extract_content_graph.py @@ -5,14 +5,23 @@ from cognee.infrastructure.llm.structured_output_framework.baml.async_client imp from cognee.infrastructure.llm.structured_output_framework.baml.type_builder import TypeBuilder from cognee.infrastructure.llm.structured_output_framework.baml_src.config import get_llm_config +from cognee.shared.logging_utils import get_logger, setup_logging + + + async def extract_content_graph(content: str, response_model: Type[BaseModel]): # tb = TypeBuilder() config = get_llm_config() + setup_logging() + get_logger(level="INFO") # country = tb.union \ # ([tb.literal_string("USA"), tb.literal_string("UK"), tb.literal_string("Germany"), tb.literal_string("other")]) # tb.Node.add_property("country", country) + + graph = await b.ExtractContentGraph(content, mode="simple", baml_options={ "tb": config.baml_registry}) + return graph