Class: OpenaiAssistant::Assistant::Delete
- Defined in:
- lib/openai_assistant/clients/assistant/delete.rb
Overview
An openai assistant
Instance Method Summary collapse
-
#delete_assistant(assistant_id) ⇒ String
Message delete the assistant ok or not.
Methods inherited from Base
Constructor Details
This class inherits a constructor from OpenaiAssistant::Base
Instance Method Details
#delete_assistant(assistant_id) ⇒ String
Returns Message delete the assistant ok or not.
9 10 11 12 13 14 15 16 |
# File 'lib/openai_assistant/clients/assistant/delete.rb', line 9 def delete_assistant(assistant_id) url = "#{@openai_url}/#{assistant_id}" uri = URI(url) response = @http_client.call_delete(uri, default_headers) return OpenaiAssistant::ErrorResponse.from_json(response.body) unless response.code == "200" true end |