Sha256: d7a852a8d84251feb50d38ab351c3cc308ecc3ba2116f4ab8e3d66e1691f1d18
Contents?: true
Size: 676 Bytes
Versions: 1
Compression:
Stored size: 676 Bytes
Contents
# frozen_string_literal: true module OpenaiAssistant module Assistant # An openai assistant class Retrieve < Base # @param assistant_id [String] The id of assistant after create # @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 OpenaiAssistant::ErrorResponse.from_json(response.body) unless response.code == "200" OpenaiAssistant::Mapper::Assistant.from_json(JSON.parse(response.body)) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
openai-assistant-1.1.0 | lib/openai_assistant/clients/assistant/retrieve.rb |