struct

Crig::StreamingPromptRequest(M)

Inherits Struct < Value < Object

Deprecated: use agent.runner(prompt).stream() instead.

Constructors

from_agent(agent : Crig::Agent(M), prompt : Crig::Completion::Message | String) : self
Source
new(agent : Crig::Agent(M), prompt : Crig::Completion::Message, chat_history : Array(Crig::Completion::Message) | Nil = nil, max_turns : Int32 = 1, memory : Crig::Memory::ConversationMemory | Nil = nil, conversation_id : String | Nil = nil)
Source

Instance methods

agent
Source
chat_history
Source
conversation(id : String) : self

Set the conversation id used to load and persist memory for this request.

Source
conversation_id
Source
max_turns(turns : Int) : self
Source
max_turns
Source
memory
Source
prompt
Source
send
Source
send_async
Source
send_items
Source
with_history(history : Array(Crig::Completion::Message)) : self
Source
with_hook(hook : AgentHook) : self
Source
without_memory

Disable conversation memory for this request.

Source