Class: Ultrasafeai::Types::UltraparserSseEvent

Inherits:
Internal::Types::Model show all
Extended by:
Internal::Types::Union
Defined in:
lib/ultrasafeai/types/ultraparser_sse_event.rb

Overview

A single server-sent event on a parser/OCR (POST /parser/stream, POST /ocr/stream) SSE stream. Each event is a JSON object carried in the SSE data: field — there is no SSE event: line. While the document is processed the server emits UltraparserProgressEvent objects (discriminated by status); the stream concludes with a terminal result object (UltraparserParseResponse, identified by its object field, e.g. parser.completion). A literal [DONE] sentinel may or may not be sent after the terminal result.

Method Summary

Methods included from Internal::Types::Union

coerce, discriminant, load, member, members, type_member?

Methods included from Internal::Types::Type

#coerce, #strict!, #strict?

Methods included from Internal::JSON::Serializable

#dump, #load

Methods inherited from Internal::Types::Model

#==, ===, add_extra_field_definition, coerce, extra_fields, field, fields, #initialize, #inspect, literal, load, #to_h

Constructor Details

This class inherits a constructor from Ultrasafeai::Internal::Types::Model