Class: OmniAI::Tool::Parameters

Inherits:
Object
  • Object
show all
Defined in:
lib/omniai/tool/parameters.rb

Overview

Parameters are used to define the arguments for a tool.

Examples:

parameters = OmniAI::Tool::Parameters.new(properties: {
  people: OmniAI::Tool::Parameters.array(
    items: OmniAI::Tool::Parameters.object(
      properties: {
        name: OmniAI::Tool::Parameters.string(description: 'The name of the person.'),
        age: OmniAI::Tool::Parameters.integer(description: 'The age of the person.'),
        employeed: OmniAI::Tool::Parameters.boolean(description: 'Is the person employeed?'),
      }
  n: OmniAI::Tool::Parameters.integer(description: 'The nth number to calculate.')
  required: %i[n]
})
tool = OmniAI::Tool.new(fibonacci, parameters: parameters)

Constant Summary

Constants inherited from Object

Object::TYPE

Instance Attribute Summary

Attributes inherited from Object

#description, #properties, #required

Method Summary

Methods inherited from Object

#initialize, #parse, #serialize

Constructor Details

This class inherits a constructor from OmniAI::Tool::Object