Module: OmniAI::Anthropic::Chat::ChoiceSerializer
- Defined in:
- lib/omniai/anthropic/chat/choice_serializer.rb
Overview
Overrides choice serialize / deserialize.
Class Method Summary collapse
Class Method Details
.deserialize(data, context:) ⇒ OmniAI::Chat::Choice
18 19 20 21 |
# File 'lib/omniai/anthropic/chat/choice_serializer.rb', line 18 def self.deserialize(data, context:) = OmniAI::Chat::Message.deserialize(data, context:) OmniAI::Chat::Choice.new(message:) end |
.serialize(choice, context:) ⇒ Hash
11 12 13 |
# File 'lib/omniai/anthropic/chat/choice_serializer.rb', line 11 def self.serialize(choice, context:) choice..serialize(context:) end |