Sha256: 2cc8c1b474836802e4c91599a7bef332d308c32bf369112b8c98bd1cbca27f02

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module OpenaiAsissistant
  module Assistant
    # An openai assistant
    class Delete < Base
      # @param assistant_id [String] The id of assistant after create
      # @return [String] Message delete the assistant ok or not
      def delete_assistant(assistant_id)
        url = "#{@openai_url}/#{assistant_id}"
        uri = URI(url)
        response = @http_client.call_delete(uri, default_headers)
        return OpenaiAsissistant::ErrorResponse.from_json(response.body) unless response.code == "200"

        true
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openai-assistant-1.0.0 lib/openai_assistant/clients/assistant/delete.rb