Sha256: abf5c881595d44bde3dfc490256f383c0bd0d27782ebcc3af133cf0bcfffd5d9
Contents?: true
Size: 599 Bytes
Versions: 7
Compression:
Stored size: 599 Bytes
Contents
# frozen_string_literal: true module GenAI class Chat class GooglePalm < Base private def build_history(messages, context, examples) history = [] history << { role: SYSTEM_ROLE, content: context } if context history.concat(examples) history.concat(messages) history end def role(message) message[:role] end def transform_message(message) message end def append_to_message(message) @history.last[:content] = "#{@history.last[:content]}\n#{message}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems