struct Anthropic::Messages

Defined in:

messages.cr

Instance Method Summary

Instance methods inherited from struct Anthropic::API

client : Client client

Constructor methods inherited from struct Anthropic::API

new(client : Anthropic::Client) new

Instance Method Detail

def create(*, model : String, max_tokens : Int32, messages : Array(Anthropic::Message), system : String | Nil = nil, temperature : Float64 | Nil = nil, top_k : Int64 | Nil = nil, top_p : Float64 | Nil = nil, tools : Array | Nil = nil, run_tools : Bool = true) : GeneratedMessage #

def create(*, model : String, max_tokens : Int32, messages : Array(Anthropic::Message), system : String | Nil = nil, temperature : Float64 | Nil = nil, top_k : Int64 | Nil = nil, top_p : Float64 | Nil = nil, &block : Event -> T) forall T #

Send your prompt to the API and yield Events as they are fed back in.

EXPERIMENTAL