Skip to content

Include role attribute in LangChain LlmChatCompletionMessages #3583

@amychisholm03

Description

@amychisholm03

Description

The role field on LangChain LlmChatCompletionMessages is not present in the UI. We need to define this attribute as we do with the other LLM packages.

Customer complaint: "Missing Role Field: Our current logic for identifying request ('user') and response ('assistant') messages relies on the presence of the role field. Unlike other LLM vendors, the New Relic agent is not capturing the role field within the LangChain instrumentation. Because the role field is missing for LangChain messages, our filtering mechanism fails. It defaults to retrieving the latest available message content that does contain a role within the same trace."

Acceptance Criteria

  • role should be present on LangChain LlmChatCompletionMessages in the UI

Additional context

Jira link

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Reviewed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions