Class: Foobara::Ai::OpenAiApi::ListModels
- Inherits:
-
BaseCommand
- Object
- Command
- BaseCommand
- Foobara::Ai::OpenAiApi::ListModels
- Includes:
- CachedCommand
- Defined in:
- foobara-open-ai-api-1.0.2/src/foobara/ai/open_ai_api/list_models.rb
Constant Summary
Constants included from TruncatedInspect
Instance Method Summary collapse
Methods inherited from BaseCommand
#api_token, #api_token_from_env, #build_request_headers, #issue_http_request
Methods inherited from Command
Methods included from CommandPatternImplementation
install_state_machine_callback_methods
Methods included from TruncatedInspect
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Instance Method Details
#build_result ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'src/foobara/ai/open_ai_api/list_models.rb', line 17 def build_result response_body["data"].map do |model_attributes| Types::Model.new( model_attributes, # Set to false and run test suite with new cassettes if trying to find new attributes ignore_unexpected_attributes: true ) end end |