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) #

[View source]

Instance Method Detail

def last_id : String | Nil #

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

[View source]
def on_message(&on_message : EventMessage, self -> ) : self #

[View source]
def response : HTTP::Client::Response #

[View source]
def run : Nil #

[View source]
def stop : Nil #

[View source]