lib/gen_ai/chat/gemini.rb in gen-ai-0.4.0.alpha.3 vs lib/gen_ai/chat/gemini.rb in gen-ai-0.4.0
- old
+ new
@@ -3,12 +3,9 @@
module GenAI
class Chat
class Gemini < Base
include GenAI::Api::Format::Gemini
- USER_ROLE = 'user'
- ASSISTANT_ROLE = 'model'
-
private
def build_history(messages, context, examples)
history = format_messages(messages.drop(1))
history.prepend({ role: USER_ROLE, parts: [{text: build_first_message(context, examples, messages.first)}] })