Module: Elelem::Tools
- Defined in:
- lib/elelem/tools/exec.rb,
lib/elelem/tools/fork.rb,
lib/elelem/tools/version.rb,
lib/elelem/tools/permissions.rb
Defined Under Namespace
Classes: Permissions
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
Class Method Details
.exec(toolbox, *args) ⇒ Object
5 6 7 8 |
# File 'lib/elelem/tools/exec.rb', line 5 def self.exec(toolbox, *args) command = args.flatten.map { |a| Shellwords.escape(a.to_s) }.join(" ") toolbox.run("execute", { "command" => command }) end |
.fork(agent, system_prompt:) ⇒ Object
5 6 7 |
# File 'lib/elelem/tools/fork.rb', line 5 def self.fork(agent, system_prompt:) Elelem::Agent.new(agent.provider, toolbox: agent.toolbox, output: agent.output, input: agent.input, system_prompt: system_prompt) end |