Class: LLMs::Parsers::GoogleGeminiChatResponseStreamParser

Inherits:
SSEChatResponseStreamParser show all
Defined in:
lib/llms/parsers/google_gemini_chat_response_stream_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SSEChatResponseStreamParser

#add_data, #initialize

Methods included from PartialJsonParser

#attempt_parse_json

Constructor Details

This class inherits a constructor from LLMs::Parsers::SSEChatResponseStreamParser

Instance Attribute Details

#current_message_idObject (readonly)

Returns the value of attribute current_message_id.



8
9
10
# File 'lib/llms/parsers/google_gemini_chat_response_stream_parser.rb', line 8

def current_message_id
  @current_message_id
end

Instance Method Details

#full_responseObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/llms/parsers/google_gemini_chat_response_stream_parser.rb', line 10

def full_response
  fr = {
    'candidates' => @candidates,
    'modelVersion' => @model_version,
    'usageMetadata' => @usage_metadata
  }

  pp fr

  fr
end