lib/openai_assistant/clients/assistant/retrieve.rb in openai-assistant-1.0.0 vs lib/openai_assistant/clients/assistant/retrieve.rb in openai-assistant-1.1.0
- old
+ new
@@ -1,19 +1,19 @@
# frozen_string_literal: true
-module OpenaiAsissistant
+module OpenaiAssistant
module Assistant
# An openai assistant
class Retrieve < Base
# @param assistant_id [String] The id of assistant after create
- # @return [OpenaiAsissistant::Mapper::OpenaiAsissistant] A new response object of assistant.
+ # @return [OpenaiAssistant::Mapper::OpenaiAssistant] A new response object of assistant.
def retrieve_assistant(assistant_id)
url = "#{@openai_url}/#{assistant_id}"
uri = URI(url)
response = @http_client.call_get(uri, default_headers)
- return OpenaiAsissistant::ErrorResponse.from_json(response.body) unless response.code == "200"
+ return OpenaiAssistant::ErrorResponse.from_json(response.body) unless response.code == "200"
- OpenaiAsissistant::Mapper::Assistant.from_json(JSON.parse(response.body))
+ OpenaiAssistant::Mapper::Assistant.from_json(JSON.parse(response.body))
end
end
end
end