fix circular import
This commit is contained in:
parent
5e06e06db9
commit
0132be8604
1 changed files with 13 additions and 1 deletions
|
|
@ -12,11 +12,23 @@ from cognee.infrastructure.llm.structured_output_framework.llitellm_instructor.l
|
||||||
read_query_prompt,
|
read_query_prompt,
|
||||||
)
|
)
|
||||||
from cognee.shared.data_models import SummarizedCode
|
from cognee.shared.data_models import SummarizedCode
|
||||||
from cognee.tasks.summarization.mock_summary import get_mock_summarized_code
|
|
||||||
|
|
||||||
logger = get_logger("extract_summary")
|
logger = get_logger("extract_summary")
|
||||||
|
|
||||||
|
|
||||||
|
def get_mock_summarized_code():
|
||||||
|
"""Local mock function to avoid circular imports."""
|
||||||
|
return SummarizedCode(
|
||||||
|
high_level_summary="Mock code summary",
|
||||||
|
key_features=["Mock feature 1", "Mock feature 2"],
|
||||||
|
imports=["mock_import"],
|
||||||
|
constants=["MOCK_CONSTANT"],
|
||||||
|
classes=[],
|
||||||
|
functions=[],
|
||||||
|
workflow_description="Mock workflow description",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
async def extract_summary(content: str, response_model: Type[BaseModel]):
|
async def extract_summary(content: str, response_model: Type[BaseModel]):
|
||||||
llm_client = get_llm_client()
|
llm_client = get_llm_client()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue