Module: OmniAI::Google::Chat::ThinkingSerializer
- Defined in:
- lib/omniai/google/chat/thinking_serializer.rb
Overview
Overrides thinking serialize / deserialize.
Class Method Summary collapse
Class Method Details
.deserialize(data, context: nil) ⇒ OmniAI::Chat::Thinking
12 13 14 15 |
# File 'lib/omniai/google/chat/thinking_serializer.rb', line 12 def self.deserialize(data, context: nil) # rubocop:disable Lint/UnusedMethodArgument # Google uses "thought: true" as a flag, with content in "text" OmniAI::Chat::Thinking.new(data["text"]) end |
.serialize(thinking, context: nil) ⇒ Hash
21 22 23 |
# File 'lib/omniai/google/chat/thinking_serializer.rb', line 21 def self.serialize(thinking, context: nil) # rubocop:disable Lint/UnusedMethodArgument { thought: true, text: thinking.thinking } end |