Skip to content

Commit

Permalink
Merge pull request #397 from topoteretes/langfuse_generation
Browse files Browse the repository at this point in the history
Changes langfuse LLM API call tracing to generation
  • Loading branch information
hajdul88 authored Dec 20, 2024
2 parents 291f1c5 + 0813f9e commit c0ad53c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cognee/infrastructure/llm/openai/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
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):
Expand Down Expand Up @@ -43,7 +44,7 @@ def __init__(
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:

Expand Down

0 comments on commit c0ad53c

Please sign in to comment.