Class: Foobara::Ai::AnthropicApi::GetPageOfModels
- Inherits:
-
BaseCommand
- Object
- Command
- BaseCommand
- Foobara::Ai::AnthropicApi::GetPageOfModels
- Defined in:
- foobara-anthropic-api-1.0.5/src/foobara/ai/anthropic_api/get_page_of_models.rb
Constant Summary
Constants included from TruncatedInspect
Instance Method Summary collapse
Methods inherited from BaseCommand
#anthropic_version, #api_token, #api_token_from_env, #build_request_headers, #issue_http_request
Methods inherited from Command
Methods included from TruncatedInspect
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Instance Method Details
#build_request_body ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'src/foobara/ai/anthropic_api/get_page_of_models.rb', line 17 def build_request_body body = {} body[:before_id] = before_id if before_id body[:after_id] = after_id if after_id body[:limit] = limit if limit self.request_body = body end |
#build_result ⇒ Object
27 28 29 |
# File 'src/foobara/ai/anthropic_api/get_page_of_models.rb', line 27 def build_result Types::PageOfModels.new(response_body, ignore_unexpected_attributes: true) end |