clean up poetry
This commit is contained in:
parent
10ece0638f
commit
2413b7272b
3 changed files with 10 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ from typing import Optional, ClassVar
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||||
from pydantic import model_validator
|
from pydantic import model_validator
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from baml_py import ClientRegistry
|
from baml_py import ClientRegistry
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ async def extract_summary(content: str, response_model: Type[BaseModel]):
|
||||||
config = get_llm_config()
|
config = get_llm_config()
|
||||||
|
|
||||||
if config.baml_registry is None:
|
if config.baml_registry is None:
|
||||||
raise ImportError("BAML is not available. Please install with 'pip install cognee[baml]' to use BAML extraction features.")
|
raise ImportError(
|
||||||
|
"BAML is not available. Please install with 'pip install cognee[baml]' to use BAML extraction features."
|
||||||
|
)
|
||||||
|
|
||||||
# Use BAML's SummarizeContent function
|
# Use BAML's SummarizeContent function
|
||||||
summary_result = await b.SummarizeContent(
|
summary_result = await b.SummarizeContent(
|
||||||
|
|
@ -81,7 +83,9 @@ async def extract_code_summary(content: str):
|
||||||
config = get_llm_config()
|
config = get_llm_config()
|
||||||
|
|
||||||
if config.baml_registry is None:
|
if config.baml_registry is None:
|
||||||
raise ImportError("BAML is not available. Please install with 'pip install cognee[baml]' to use BAML extraction features.")
|
raise ImportError(
|
||||||
|
"BAML is not available. Please install with 'pip install cognee[baml]' to use BAML extraction features."
|
||||||
|
)
|
||||||
|
|
||||||
result = await b.SummarizeCode(
|
result = await b.SummarizeCode(
|
||||||
content, baml_options={"client_registry": config.baml_registry}
|
content, baml_options={"client_registry": config.baml_registry}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ async def extract_content_graph(
|
||||||
get_logger(level="INFO")
|
get_logger(level="INFO")
|
||||||
|
|
||||||
if config.baml_registry is None:
|
if config.baml_registry is None:
|
||||||
raise ImportError("BAML is not available. Please install with 'pip install cognee[baml]' to use BAML extraction features.")
|
raise ImportError(
|
||||||
|
"BAML is not available. Please install with 'pip install cognee[baml]' to use BAML extraction features."
|
||||||
|
)
|
||||||
|
|
||||||
# if response_model:
|
# if response_model:
|
||||||
# # tb = TypeBuilder()
|
# # tb = TypeBuilder()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue