Class: Kward::RPC::TranscriptNormalizer
- Inherits:
-
Object
- Object
- Kward::RPC::TranscriptNormalizer
- Defined in:
- lib/kward/rpc/transcript_normalizer.rb
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.
10 11 12 13 |
# File 'lib/kward/rpc/transcript_normalizer.rb', line 10 def initialize() @messages = Array() @tool_calls_by_id = {} end |
Instance Method Details
#normalize ⇒ Object
15 16 17 |
# File 'lib/kward/rpc/transcript_normalizer.rb', line 15 def normalize @messages.filter_map { || () } end |