Class: Mindee::V2::Search::RAGDocuments::RAGDocumentSearchResponse

Inherits:
Parsing::Search::BaseSearchResponse show all
Defined in:
lib/mindee/v2/search/rag_documents/rag_document_search_response.rb

Overview

RAG Documents search response.

Instance Attribute Summary collapse

Attributes inherited from Parsing::Search::BaseSearchResponse

#pagination

Attributes inherited from Parsing::CommonResponse

#raw_http

Instance Method Summary collapse

Methods inherited from Parsing::Search::BaseSearchResponse

#pagination_metadata, #to_s

Constructor Details

#initialize(raw_response) ⇒ RAGDocumentSearchResponse

Returns a new instance of RAGDocumentSearchResponse.

Parameters:

  • raw_response (Hash) —

    The parsed JSON payload from the API.



13
14
15
16
17
# File 'lib/mindee/v2/search/rag_documents/rag_document_search_response.rb', line 13

def initialize(raw_response)
  super

  @rag_documents = Mindee::V2::Parsing::Search::SearchRAGDocuments.new(raw_response['rag_documents'])
end

Instance Attribute Details

#rag_documents ⇒ Mindee::V2::Parsing::Search::SearchRAGDocuments (readonly)

Returns Paginated list of matching RAG documents.

Returns:



10
11
12
# File 'lib/mindee/v2/search/rag_documents/rag_document_search_response.rb', line 10

def rag_documents
  @rag_documents
end

Instance Method Details

#body_lines ⇒ Array<String>

Lines composing the response-specific body (header + items).

Returns:

  • (Array<String>)


21
22
23
# File 'lib/mindee/v2/search/rag_documents/rag_document_search_response.rb', line 21

def body_lines
  ['RAG Documents', '#############', @rag_documents.to_s]
end