Class: Kward::RPC::TranscriptNormalizer
- Inherits:
-
Object
- Object
- Kward::RPC::TranscriptNormalizer
- Defined in:
- lib/kward/rpc/transcript_normalizer.rb
Overview
Normalizes Kward transcript messages into Tauren-compatible RPC payloads.
Constant Summary collapse
- IMAGE_MIME_TYPES =
["image/png", "image/jpeg", "image/gif", "image/webp"].freeze
- THINKING_CONTENT_TYPES =
["thinking", "reasoning"].freeze
Instance Method Summary collapse
-
#initialize(messages) ⇒ TranscriptNormalizer
constructor
A new instance of TranscriptNormalizer.
- #normalize ⇒ Object
Constructor Details
#initialize(messages) ⇒ TranscriptNormalizer
Returns a new instance of TranscriptNormalizer.
13 14 15 16 |
# File 'lib/kward/rpc/transcript_normalizer.rb', line 13 def initialize() @messages = Array() @tool_calls_by_id = {} end |
Instance Method Details
#normalize ⇒ Object
18 19 20 |
# File 'lib/kward/rpc/transcript_normalizer.rb', line 18 def normalize @messages.filter_map { || () } end |