Module: OxAiWorkers
- Defined in:
- lib/oxaiworkers/tool_definition.rb,
lib/ox-ai-workers.rb,
lib/oxaiworkers/engine.rb,
lib/oxaiworkers/request.rb,
lib/oxaiworkers/version.rb,
lib/oxaiworkers/iterator.rb,
lib/oxaiworkers/load_i18n.rb,
lib/oxaiworkers/tool/eval.rb,
lib/oxaiworkers/state_batch.rb,
lib/oxaiworkers/state_tools.rb,
lib/oxaiworkers/state_helper.rb,
lib/oxaiworkers/tool/database.rb,
lib/oxaiworkers/module_request.rb,
lib/oxaiworkers/present_compat.rb,
lib/oxaiworkers/assistant/coder.rb,
lib/oxaiworkers/assistant/sysop.rb,
lib/oxaiworkers/delayed_request.rb,
lib/oxaiworkers/tool/file_system.rb,
lib/oxaiworkers/contextual_logger.rb,
lib/oxaiworkers/dependency_helper.rb,
lib/oxaiworkers/assistant/localizer.rb,
lib/oxaiworkers/assistant/module_base.rb
Overview
Extends a class to be used as a tool in the assistant. A tool is a collection of functions (methods) used to perform specific tasks.
Usage
-
Extend your class with ToolDefinition
-
Use #define_function to define each function of the tool
Key Concepts
-
#define_function: Defines a new function (method) for the tool
-
ParameterBuilder#property: Defines properties for the function parameters
-
ParameterBuilder#item: Alias for ParameterBuilder#property, used for array items
These methods support various data types and nested structures, allowing for flexible and expressive tool definitions.
Defined Under Namespace
Modules: Assistant, CamelizeCompat, DependencyHelper, LoadI18n, PresentCompat, StateHelper, Tool, ToolDefinition Classes: Configuration, ConfigurationError, ContextualLogger, DelayedRequest, Engine, Error, Iterator, ModuleRequest, Request, StateBatch, StateTools
Constant Summary collapse
- DEFAULT_MODEL =
'gpt-4o-mini'
- DEFAULT_MAX_TOKEN =
4096
- DEFAULT_TEMPERATURE =
0.7
- VERSION =
'0.7.4'
Class Attribute Summary collapse
- .configuration ⇒ Object
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
Class Attribute Details
.configuration ⇒ Object
75 76 77 |
# File 'lib/ox-ai-workers.rb', line 75 def self.configuration @configuration ||= OxAiWorkers::Configuration.new end |
.logger ⇒ Object
Returns the value of attribute logger.
64 65 66 |
# File 'lib/ox-ai-workers.rb', line 64 def logger @logger end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
79 80 81 |
# File 'lib/ox-ai-workers.rb', line 79 def self.configure yield(configuration) end |