fix: updates the acreate_structured_output

This commit is contained in:
hajdul88 2024-12-20 16:19:50 +01:00
parent de2394c392
commit c8a1f04b4c

View file

@ -12,7 +12,8 @@ from cognee.infrastructure.llm.llm_interface import LLMInterface
from cognee.infrastructure.llm.prompts import read_query_prompt
from cognee.base_config import get_base_config
if MonitoringTool.LANGFUSE:
monitoring = get_base_config().monitoring_tool
if monitoring == MonitoringTool.LANGFUSE:
from langfuse.decorators import observe
class OpenAIAdapter(LLMInterface):
@ -43,7 +44,7 @@ class OpenAIAdapter(LLMInterface):
base_config = get_base_config()
@observe()
@observe(as_type='generation')
async def acreate_structured_output(self, text_input: str, system_prompt: str,
response_model: Type[BaseModel]) -> BaseModel: