Skip to main content

GEN_AI__INPUT__MESSAGES

Constant GEN_AI__INPUT__MESSAGES 

Source
pub const GEN_AI__INPUT__MESSAGES: &str = "gen_ai.input.messages";
Expand description

The messages passed to the model. It has to be a stringified version of an array of objects in the format {role: "...", parts: [...]}. The role must be "user", "assistant", "tool", or "system". Each part is an object with a type, such as {type: "text", content: "..."}. Other part types include "reasoning", "tool_call", and "tool_call_response". Put the model’s thinking in a {type: "reasoning", content: "..."} part, not a "text" part. Sentry shows reasoning separately from user-visible messages. The legacy format {role, content} is also accepted. The first example shows this shape. Some operations use a different shape. See the additional context.

  • Scrubbing: Manual
  • Rewriting behavior: None

§Aliases