class Guppi::Agent

Direct Known Subclasses

Defined in:

agent.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(prompts : Crinja, client : OpenAIClient, model : String = "gpt-3.5-turbo") #

[View source]

Instance Method Detail

def add_agent_message(content : String) #

[View source]
def add_message(role : String, content : String) #

[View source]
def add_system_message(content : String) #

[View source]
def add_user_message(content : String) #

[View source]
def chat(options : Hash | Nil = nil, &block : String -> Nil) #

[View source]
def client : OpenAI::Client #

[View source]
def end_conversation #

[View source]
def messages : Array({role: String, content: String}) #

[View source]
def model : String #

[View source]
def prompts : Crinja #

[View source]
def render(template_name, context) #

[View source]