OpenTelemetry SDK
    Preparing search index...

    Variable ATTR_GEN_AI_OUTPUT_MESSAGESConst Experimental

    ATTR_GEN_AI_OUTPUT_MESSAGES: "gen_ai.output.messages" = ...

    Messages returned by the model where each message represents a specific model response (choice, candidate).

    [
    {
    "role": "assistant",
    "parts": [
    {
    "type": "text",
    "content": "The weather in Paris is currently rainy with a temperature of 57°F."
    }
    ],
    "finish_reason": "stop"
    }
    ]

    Instrumentations MUST follow Output messages JSON schema

    Each message represents a single output choice/candidate generated by the model. Each message corresponds to exactly one generation (choice/candidate) and vice versa - one choice cannot be split across multiple messages or one message cannot contain parts from multiple choices.

    When the attribute is recorded on events, it MUST be recorded in structured form. When recorded on spans, it MAY be recorded as a JSON string if structured format is not supported and SHOULD be recorded in structured form otherwise.

    Instrumentations MAY provide a way for users to filter or truncate output messages.

    Warning

    This attribute is likely to contain sensitive information including user/PII data.

    See Recording content on attributes section for more details.

    This attribute is experimental and is subject to breaking changes in minor releases of @opentelemetry/semantic-conventions.