Class: ActionAgent::AgentMessageSerializer
- Inherits:
-
Object
- Object
- ActionAgent::AgentMessageSerializer
- Defined in:
- app/serializers/action_agent/agent_message_serializer.rb
Overview
Serializes AgentMessage records for the shared InteractionStream UI (Interactions view and the agent Conversation History run detail).
Class Method Summary collapse
Class Method Details
.call(message) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/serializers/action_agent/agent_message_serializer.rb', line 7 def self.call() { id: .id, role: .role, content: .content, tool_name: .tool_name, tool_call_id: .tool_call_id, tool_calls: .tool_calls_data, tool_arguments: .tool_arguments.presence, tool_result: .tool_result, duration_ms: .&.dig("duration_ms"), content_checksum: .content_checksum, created_at: .created_at.iso8601(3) } end |