Sha256: 2ace8af6c3498f216fb9f20ce09de6ee6d4a5cde67a064392cb877b9bb63c325

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

module EasyTalk
  module Tools
    module FunctionBuilder
      def self.new(model)
        {
          type: 'function',
          function: {
            name: model.function_name,
            description: generate_description(model),
            parameters: model.json_schema
          }
        }
      end

      def self.generate_description(model)
        "Correctly extracted `#{model.name}` with all the required parameters with correct types"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
easy_talk-0.1.6 lib/easy_talk/tools/function_builder.rb
easy_talk-0.1.5 lib/easy_talk/tools/function_builder.rb