Module: Smith::Agent::ChatConstruction

Included in:
Smith::Agent
Defined in:
lib/smith/agent/chat_construction.rb

Instance Method Summary collapse

Instance Method Details

#chat(**kwargs) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/smith/agent/chat_construction.rb', line 6

def chat(**kwargs)
  kwargs, profile = prepare_input_kwargs(kwargs)

  llm_chat = install_tool_execution_context(super)
  normalize_chat(llm_chat, fallback_profile: profile)
  llm_chat
end

#create(**kwargs) ⇒ Object



14
15
16
17
# File 'lib/smith/agent/chat_construction.rb', line 14

def create(**kwargs)
  kwargs, = prepare_input_kwargs(kwargs)
  prepare_persisted_chat(super, kwargs:)
end

#create!(**kwargs) ⇒ Object



19
20
21
22
# File 'lib/smith/agent/chat_construction.rb', line 19

def create!(**kwargs)
  kwargs, = prepare_input_kwargs(kwargs)
  prepare_persisted_chat(super, kwargs:)
end

#find(id, **kwargs) ⇒ Object



24
25
26
27
# File 'lib/smith/agent/chat_construction.rb', line 24

def find(id, **kwargs)
  kwargs, = prepare_input_kwargs(kwargs)
  prepare_persisted_chat(super, kwargs:)
end