class Anthropic::EventSource

Defined in:

event_source.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(response : HTTP::Client::Response, last_id : Nil | String = nil) #

Instance Method Detail

def last_id : String | Nil #

def on_error(&on_error : NamedTuple(status_code: Int32, message: String) -> ) : self #

def on_message(&on_message : EventMessage, self -> ) : self #

def response : HTTP::Client::Response #

def run : Nil #

def stop : Nil #