Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ReceivedArtAssistantResponse

Art Assistant finishes answering a message, with the final answer and any entities it found. It fires once per turn, when the agent reports the turn complete.

duration_ms is measured on the client from the moment the message was sent, so it describes how long the user waited for the answer. item_type and item_ids describe the entities shown alongside the answer — artworks today, other entity types later. item_type is free text rather than an enum so the app can name a new entity type without a schema change; its values are the matching OwnerType names.

response carries the agent's own words, so it is only populated while message content tracking is enabled; the rest of the event is always sent. It holds the final answer only, without the intermediate activity updates ("Thinking...", "Searching artworks...") the user saw while waiting.

A turn that ends without an answer is reported by [[artAssistantTurnFailed]] instead.

This schema describes events sent to Segment from [[receivedArtAssistantResponse]]

example
 {
   action: "receivedArtAssistantResponse",
   context_module: "artAssistant",
   context_screen_owner_type: "artAssistant",
   conversation_id: "6f1b8b0e-1f27-4a0e-9d6f-2c2f2a3d1f45",
   duration_ms: 8213,
   item_count: 2,
   item_ids: ["5e9a7a238483bf000e2c4c5e", "5d2c9b1e8b3b310012f1a0c4"],
   item_type: "artwork",
   message_id: "b34d1f88-0c53-4f8a-9c2e-7b1f4a6d5e23",
   prompt_message_id: "a12c9d3e-6a41-4a59-8c0b-5f9b0a1d2e77",
   response: "Here are a few large black and white paintings under $5,000.",
   stop_reason: "end_turn",
   tool_call_count: 3
 }

Hierarchy

  • ReceivedArtAssistantResponse

Index

Properties

action

action: receivedArtAssistantResponse

context_module

context_module: artAssistant

context_screen_owner_type

context_screen_owner_type: artAssistant

conversation_id

conversation_id: string

Client-generated id shared by every message in the same chat

duration_ms

duration_ms: number

Milliseconds from sending the message to the final answer

item_count

item_count: number

Number of entities shown alongside the answer

item_ids

item_ids: string[]

Ids of the entities shown alongside the answer, in display order

Optional item_type

item_type: undefined | string

The type of entity shown alongside the answer, named after the matching OwnerType (artwork, artist, partner, show, viewingRoom, …). Absent when the answer has none.

message_id

message_id: string

Client-generated id of the assistant message holding the answer

prompt_message_id

prompt_message_id: string

message_id of the [[sentArtAssistantMessage]] this answers

Optional response

response: undefined | string

The agent's final answer. Only populated while message content tracking is enabled

stop_reason

stop_reason: string

Why the agent ended the turn, as reported by the server

tool_call_count

tool_call_count: number

Number of tools the agent called while answering

Generated using TypeDoc