Skip to content

litellm/langfuse observability #12

@almex-m-bulbul

Description

@almex-m-bulbul

Trying to log my input/output along with tag, metadata etc. Couldn't find any information on that.

Did a bit hack as usual litellm.success_callback = ["langfuse"] didn't work.

import litellm
litellm.success_callback.extend(["langfuse"])
litellm.failure_callback.extend(["langfuse"])

which can log input/output. But unable to log additional information.
tried adding metadata in llm_generation_chain, didn't work.

llm_generation_chain(
            template_file=template_file,
            engine=self.model,
            max_tokens=max_tokens,
            temperature=temperature,
        ).ainvoke(variables, config={"metadata": {"language": language, ....}})

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions