Sha256: 600de7561b2bf9d0c3242309173f7d8cfa82a53a85d7da75735a09d955f979db

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
easy_talk-0.1.7 lib/easy_talk/tools/function_builder.rb