haystack-core-integrations icon indicating copy to clipboard operation
haystack-core-integrations copied to clipboard

Langfuse: generation_kwargs not logged for LLM generators

Open henryclw opened this issue 9 months ago • 0 comments

If the generation_kwargs was set like this: https://github.com/deepset-ai/haystack-core-integrations/blob/00c43748edac70fbcd4efbca1a467138446c7edf/integrations/langfuse/example/basic_rag.py#L42

It would not be logged.

{
    "haystack.component.input_types": {
        "messages": "list",
        "generation_kwargs": "NoneType",
        "tools": "NoneType"
    },
    "haystack.component.input_spec": {
        "messages": {
            "type": "typing.List[haystack.dataclasses.chat_message.ChatMessage]",
            "senders": [
                "resume_formatter_prompt"
            ]
        },
        "generation_kwargs": {
            "type": "typing.Optional[typing.Dict[str, typing.Any]]",
            "senders": []
        },
        "tools": {
            "type": "typing.Optional[typing.List[haystack.tools.tool.Tool]]",
            "senders": []
        }
    },
    "haystack.component.output_spec": {
        "replies": {
            "type": "typing.List[haystack.dataclasses.chat_message.ChatMessage]",
            "receivers": []
        }
    },
}

Is there a way to log generation_kwargs? The information such as temperature might be useful.

henryclw avatar Mar 09 '25 19:03 henryclw