Module: LLM::Sequel::Agent::ClassMethods

Defined in:
lib/llm/sequel/agent.rb

Instance Method Summary collapse

Instance Method Details

#agentObject



66
67
68
# File 'lib/llm/sequel/agent.rb', line 66

def agent
  @agent ||= Class.new(LLM::Agent)
end

#concurrency(concurrency = nil) ⇒ Object



56
57
58
59
# File 'lib/llm/sequel/agent.rb', line 56

def concurrency(concurrency = nil)
  return agent.concurrency if concurrency.nil?
  agent.concurrency(concurrency)
end

#instructions(instructions = nil) ⇒ Object



51
52
53
54
# File 'lib/llm/sequel/agent.rb', line 51

def instructions(instructions = nil)
  return agent.instructions if instructions.nil?
  agent.instructions(instructions)
end

#llm_plugin_optionsObject



32
33
34
# File 'lib/llm/sequel/agent.rb', line 32

def llm_plugin_options
  @llm_agent_options || Agent::DEFAULTS
end

#model(model = nil) ⇒ Object



36
37
38
39
# File 'lib/llm/sequel/agent.rb', line 36

def model(model = nil)
  return agent.model if model.nil?
  agent.model(model)
end

#schema(schema = nil) ⇒ Object



46
47
48
49
# File 'lib/llm/sequel/agent.rb', line 46

def schema(schema = nil)
  return agent.schema if schema.nil?
  agent.schema(schema)
end

#tools(*tools) ⇒ Object



41
42
43
44
# File 'lib/llm/sequel/agent.rb', line 41

def tools(*tools)
  return agent.tools if tools.empty?
  agent.tools(*tools)
end

#tracer(tracer = nil, &block) ⇒ Object



61
62
63
64
# File 'lib/llm/sequel/agent.rb', line 61

def tracer(tracer = nil, &block)
  return agent.tracer if tracer.nil? && !block
  agent.tracer(tracer, &block)
end