anthropic-sdk-beta 0.1.0.pre.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +343 -0
- data/lib/anthropic/bedrock/client.rb +261 -0
- data/lib/anthropic/client.rb +107 -0
- data/lib/anthropic/errors.rb +192 -0
- data/lib/anthropic/internal/jsonl_stream.rb +26 -0
- data/lib/anthropic/internal/page.rb +109 -0
- data/lib/anthropic/internal/stream.rb +58 -0
- data/lib/anthropic/internal/transport/base_client.rb +473 -0
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +193 -0
- data/lib/anthropic/internal/type/array_of.rb +128 -0
- data/lib/anthropic/internal/type/base_model.rb +380 -0
- data/lib/anthropic/internal/type/base_page.rb +46 -0
- data/lib/anthropic/internal/type/base_stream.rb +73 -0
- data/lib/anthropic/internal/type/boolean.rb +58 -0
- data/lib/anthropic/internal/type/converter.rb +247 -0
- data/lib/anthropic/internal/type/enum.rb +113 -0
- data/lib/anthropic/internal/type/hash_of.rb +148 -0
- data/lib/anthropic/internal/type/io_like.rb +75 -0
- data/lib/anthropic/internal/type/request_parameters.rb +49 -0
- data/lib/anthropic/internal/type/union.rb +216 -0
- data/lib/anthropic/internal/type/unknown.rb +62 -0
- data/lib/anthropic/internal/util.rb +755 -0
- data/lib/anthropic/internal.rb +8 -0
- data/lib/anthropic/models/anthropic_beta.rb +44 -0
- data/lib/anthropic/models/api_error_object.rb +25 -0
- data/lib/anthropic/models/authentication_error.rb +25 -0
- data/lib/anthropic/models/base64_image_source.rb +47 -0
- data/lib/anthropic/models/base64_pdf_source.rb +31 -0
- data/lib/anthropic/models/beta/beta_base64_image_source.rb +51 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +76 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_source.rb +35 -0
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +23 -0
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_char_location_param.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location_param.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_page_location_param.rb +63 -0
- data/lib/anthropic/models/beta/beta_citations_config_param.rb +27 -0
- data/lib/anthropic/models/beta/beta_citations_delta.rb +46 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +27 -0
- data/lib/anthropic/models/beta/beta_content_block_param.rb +33 -0
- data/lib/anthropic/models/beta/beta_content_block_source.rb +45 -0
- data/lib/anthropic/models/beta/beta_content_block_source_content.rb +23 -0
- data/lib/anthropic/models/beta/beta_image_block_param.rb +50 -0
- data/lib/anthropic/models/beta/beta_input_json_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_message.rb +143 -0
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +24 -0
- data/lib/anthropic/models/beta/beta_message_param.rb +59 -0
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +26 -0
- data/lib/anthropic/models/beta/beta_metadata.rb +28 -0
- data/lib/anthropic/models/beta/beta_model_info.rb +49 -0
- data/lib/anthropic/models/beta/beta_plain_text_source.rb +35 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +35 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +55 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rb +29 -0
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +71 -0
- data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +29 -0
- data/lib/anthropic/models/beta/beta_raw_message_stop_event.rb +23 -0
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +31 -0
- data/lib/anthropic/models/beta/beta_redacted_thinking_block.rb +29 -0
- data/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rb +29 -0
- data/lib/anthropic/models/beta/beta_signature_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_stop_reason.rb +24 -0
- data/lib/anthropic/models/beta/beta_text_block.rb +42 -0
- data/lib/anthropic/models/beta/beta_text_block_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_text_citation.rb +25 -0
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_text_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_thinking_block.rb +35 -0
- data/lib/anthropic/models/beta/beta_thinking_block_param.rb +35 -0
- data/lib/anthropic/models/beta/beta_thinking_config_disabled.rb +23 -0
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +38 -0
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +32 -0
- data/lib/anthropic/models/beta/beta_thinking_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_tool.rb +103 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_choice.rb +33 -0
- data/lib/anthropic/models/beta/beta_tool_choice_any.rb +39 -0
- data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +39 -0
- data/lib/anthropic/models/beta/beta_tool_choice_none.rb +25 -0
- data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +46 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +69 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +69 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +85 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +31 -0
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +41 -0
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +47 -0
- data/lib/anthropic/models/beta/beta_url_image_source.rb +29 -0
- data/lib/anthropic/models/beta/beta_url_pdf_source.rb +29 -0
- data/lib/anthropic/models/beta/beta_usage.rb +45 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +315 -0
- data/lib/anthropic/models/beta/message_create_params.rb +395 -0
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +463 -0
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +71 -0
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +34 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +140 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rb +23 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +29 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rb +23 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +42 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +60 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +32 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +29 -0
- data/lib/anthropic/models/beta/model_list_params.rb +58 -0
- data/lib/anthropic/models/beta/model_retrieve_params.rb +21 -0
- data/lib/anthropic/models/beta_api_error.rb +25 -0
- data/lib/anthropic/models/beta_authentication_error.rb +25 -0
- data/lib/anthropic/models/beta_billing_error.rb +25 -0
- data/lib/anthropic/models/beta_error.rb +33 -0
- data/lib/anthropic/models/beta_error_response.rb +25 -0
- data/lib/anthropic/models/beta_gateway_timeout_error.rb +25 -0
- data/lib/anthropic/models/beta_invalid_request_error.rb +25 -0
- data/lib/anthropic/models/beta_not_found_error.rb +25 -0
- data/lib/anthropic/models/beta_overloaded_error.rb +25 -0
- data/lib/anthropic/models/beta_permission_error.rb +25 -0
- data/lib/anthropic/models/beta_rate_limit_error.rb +25 -0
- data/lib/anthropic/models/billing_error.rb +25 -0
- data/lib/anthropic/models/cache_control_ephemeral.rb +19 -0
- data/lib/anthropic/models/citation_char_location.rb +59 -0
- data/lib/anthropic/models/citation_char_location_param.rb +59 -0
- data/lib/anthropic/models/citation_content_block_location.rb +59 -0
- data/lib/anthropic/models/citation_content_block_location_param.rb +59 -0
- data/lib/anthropic/models/citation_page_location.rb +59 -0
- data/lib/anthropic/models/citation_page_location_param.rb +59 -0
- data/lib/anthropic/models/citations_config_param.rb +23 -0
- data/lib/anthropic/models/citations_delta.rb +42 -0
- data/lib/anthropic/models/completion.rb +63 -0
- data/lib/anthropic/models/completion_create_params.rb +152 -0
- data/lib/anthropic/models/content_block.rb +23 -0
- data/lib/anthropic/models/content_block_param.rb +29 -0
- data/lib/anthropic/models/content_block_source.rb +41 -0
- data/lib/anthropic/models/content_block_source_content.rb +19 -0
- data/lib/anthropic/models/document_block_param.rb +72 -0
- data/lib/anthropic/models/error_object.rb +33 -0
- data/lib/anthropic/models/error_response.rb +25 -0
- data/lib/anthropic/models/gateway_timeout_error.rb +25 -0
- data/lib/anthropic/models/image_block_param.rb +46 -0
- data/lib/anthropic/models/input_json_delta.rb +25 -0
- data/lib/anthropic/models/invalid_request_error.rb +25 -0
- data/lib/anthropic/models/message.rb +138 -0
- data/lib/anthropic/models/message_count_tokens_params.rb +265 -0
- data/lib/anthropic/models/message_count_tokens_tool.rb +19 -0
- data/lib/anthropic/models/message_create_params.rb +380 -0
- data/lib/anthropic/models/message_delta_usage.rb +20 -0
- data/lib/anthropic/models/message_param.rb +55 -0
- data/lib/anthropic/models/message_tokens_count.rb +22 -0
- data/lib/anthropic/models/messages/batch_cancel_params.rb +21 -0
- data/lib/anthropic/models/messages/batch_create_params.rb +449 -0
- data/lib/anthropic/models/messages/batch_delete_params.rb +21 -0
- data/lib/anthropic/models/messages/batch_list_params.rb +58 -0
- data/lib/anthropic/models/messages/batch_results_params.rb +21 -0
- data/lib/anthropic/models/messages/batch_retrieve_params.rb +21 -0
- data/lib/anthropic/models/messages/deleted_message_batch.rb +32 -0
- data/lib/anthropic/models/messages/message_batch.rb +139 -0
- data/lib/anthropic/models/messages/message_batch_canceled_result.rb +23 -0
- data/lib/anthropic/models/messages/message_batch_errored_result.rb +29 -0
- data/lib/anthropic/models/messages/message_batch_expired_result.rb +23 -0
- data/lib/anthropic/models/messages/message_batch_individual_response.rb +42 -0
- data/lib/anthropic/models/messages/message_batch_request_counts.rb +60 -0
- data/lib/anthropic/models/messages/message_batch_result.rb +32 -0
- data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +29 -0
- data/lib/anthropic/models/metadata.rb +24 -0
- data/lib/anthropic/models/model.rb +93 -0
- data/lib/anthropic/models/model_info.rb +45 -0
- data/lib/anthropic/models/model_list_params.rb +56 -0
- data/lib/anthropic/models/model_retrieve_params.rb +19 -0
- data/lib/anthropic/models/not_found_error.rb +25 -0
- data/lib/anthropic/models/overloaded_error.rb +25 -0
- data/lib/anthropic/models/permission_error.rb +25 -0
- data/lib/anthropic/models/plain_text_source.rb +31 -0
- data/lib/anthropic/models/rate_limit_error.rb +25 -0
- data/lib/anthropic/models/raw_content_block_delta.rb +25 -0
- data/lib/anthropic/models/raw_content_block_delta_event.rb +31 -0
- data/lib/anthropic/models/raw_content_block_start_event.rb +50 -0
- data/lib/anthropic/models/raw_content_block_stop_event.rb +25 -0
- data/lib/anthropic/models/raw_message_delta_event.rb +67 -0
- data/lib/anthropic/models/raw_message_start_event.rb +25 -0
- data/lib/anthropic/models/raw_message_stop_event.rb +19 -0
- data/lib/anthropic/models/raw_message_stream_event.rb +27 -0
- data/lib/anthropic/models/redacted_thinking_block.rb +25 -0
- data/lib/anthropic/models/redacted_thinking_block_param.rb +25 -0
- data/lib/anthropic/models/signature_delta.rb +25 -0
- data/lib/anthropic/models/stop_reason.rb +20 -0
- data/lib/anthropic/models/text_block.rb +38 -0
- data/lib/anthropic/models/text_block_param.rb +39 -0
- data/lib/anthropic/models/text_citation.rb +21 -0
- data/lib/anthropic/models/text_citation_param.rb +21 -0
- data/lib/anthropic/models/text_delta.rb +25 -0
- data/lib/anthropic/models/thinking_block.rb +31 -0
- data/lib/anthropic/models/thinking_block_param.rb +31 -0
- data/lib/anthropic/models/thinking_config_disabled.rb +19 -0
- data/lib/anthropic/models/thinking_config_enabled.rb +34 -0
- data/lib/anthropic/models/thinking_config_param.rb +28 -0
- data/lib/anthropic/models/thinking_delta.rb +25 -0
- data/lib/anthropic/models/tool.rb +80 -0
- data/lib/anthropic/models/tool_bash_20250124.rb +34 -0
- data/lib/anthropic/models/tool_choice.rb +29 -0
- data/lib/anthropic/models/tool_choice_any.rb +35 -0
- data/lib/anthropic/models/tool_choice_auto.rb +35 -0
- data/lib/anthropic/models/tool_choice_none.rb +21 -0
- data/lib/anthropic/models/tool_choice_tool.rb +42 -0
- data/lib/anthropic/models/tool_result_block_param.rb +81 -0
- data/lib/anthropic/models/tool_text_editor_20250124.rb +34 -0
- data/lib/anthropic/models/tool_union.rb +19 -0
- data/lib/anthropic/models/tool_use_block.rb +37 -0
- data/lib/anthropic/models/tool_use_block_param.rb +43 -0
- data/lib/anthropic/models/url_image_source.rb +25 -0
- data/lib/anthropic/models/url_pdf_source.rb +25 -0
- data/lib/anthropic/models/usage.rb +41 -0
- data/lib/anthropic/request_options.rb +75 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +198 -0
- data/lib/anthropic/resources/beta/messages.rb +158 -0
- data/lib/anthropic/resources/beta/models.rb +65 -0
- data/lib/anthropic/resources/beta.rb +22 -0
- data/lib/anthropic/resources/completions.rb +100 -0
- data/lib/anthropic/resources/messages/batches.rb +179 -0
- data/lib/anthropic/resources/messages.rb +145 -0
- data/lib/anthropic/resources/models.rb +63 -0
- data/lib/anthropic/version.rb +5 -0
- data/lib/anthropic/vertex/client.rb +210 -0
- data/lib/anthropic.rb +265 -0
- data/manifest.yaml +15 -0
- data/rbi/lib/anthropic/bedrock/client.rbi +80 -0
- data/rbi/lib/anthropic/client.rbi +70 -0
- data/rbi/lib/anthropic/errors.rbi +143 -0
- data/rbi/lib/anthropic/internal/jsonl_stream.rbi +16 -0
- data/rbi/lib/anthropic/internal/page.rbi +26 -0
- data/rbi/lib/anthropic/internal/stream.rbi +16 -0
- data/rbi/lib/anthropic/internal/transport/base_client.rbi +204 -0
- data/rbi/lib/anthropic/internal/transport/pooled_net_requester.rbi +60 -0
- data/rbi/lib/anthropic/internal/type/array_of.rbi +82 -0
- data/rbi/lib/anthropic/internal/type/base_model.rbi +197 -0
- data/rbi/lib/anthropic/internal/type/base_page.rbi +36 -0
- data/rbi/lib/anthropic/internal/type/base_stream.rbi +51 -0
- data/rbi/lib/anthropic/internal/type/boolean.rbi +49 -0
- data/rbi/lib/anthropic/internal/type/converter.rbi +112 -0
- data/rbi/lib/anthropic/internal/type/enum.rbi +63 -0
- data/rbi/lib/anthropic/internal/type/hash_of.rbi +82 -0
- data/rbi/lib/anthropic/internal/type/io_like.rbi +47 -0
- data/rbi/lib/anthropic/internal/type/request_parameters.rbi +21 -0
- data/rbi/lib/anthropic/internal/type/union.rbi +68 -0
- data/rbi/lib/anthropic/internal/type/unknown.rbi +41 -0
- data/rbi/lib/anthropic/internal/util.rbi +282 -0
- data/rbi/lib/anthropic/internal.rbi +12 -0
- data/rbi/lib/anthropic/models/anthropic_beta.rbi +30 -0
- data/rbi/lib/anthropic/models/api_error_object.rbi +19 -0
- data/rbi/lib/anthropic/models/authentication_error.rbi +19 -0
- data/rbi/lib/anthropic/models/base64_image_source.rbi +46 -0
- data/rbi/lib/anthropic/models/base64_pdf_source.rbi +22 -0
- data/rbi/lib/anthropic/models/beta/beta_base64_image_source.rbi +56 -0
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_block.rbi +104 -0
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_source.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_cache_control_ephemeral.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_char_location.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_char_location_param.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_content_block_location.rbi +63 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_content_block_location_param.rbi +63 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_page_location.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_page_location_param.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citations_config_param.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_citations_delta.rbi +66 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block_param.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block_source.rbi +74 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block_source_content.rbi +19 -0
- data/rbi/lib/anthropic/models/beta/beta_image_block_param.rbi +68 -0
- data/rbi/lib/anthropic/models/beta/beta_input_json_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_message.rbi +180 -0
- data/rbi/lib/anthropic/models/beta/beta_message_delta_usage.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_message_param.rbi +126 -0
- data/rbi/lib/anthropic/models/beta/beta_message_tokens_count.rbi +22 -0
- data/rbi/lib/anthropic/models/beta/beta_metadata.rbi +25 -0
- data/rbi/lib/anthropic/models/beta/beta_model_info.rbi +38 -0
- data/rbi/lib/anthropic/models/beta/beta_plain_text_source.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_start_event.rbi +74 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_delta_event.rbi +96 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_start_event.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_stop_event.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_stream_event.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_redacted_thinking_block.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_signature_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_stop_reason.rbi +24 -0
- data/rbi/lib/anthropic/models/beta/beta_text_block.rbi +76 -0
- data/rbi/lib/anthropic/models/beta/beta_text_block_param.rbi +84 -0
- data/rbi/lib/anthropic/models/beta/beta_text_citation.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_text_citation_param.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_text_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_block.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_block_param.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_disabled.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_enabled.rbi +32 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_param.rbi +30 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_tool.rbi +112 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20241022.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20250124.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_any.rbi +31 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_auto.rbi +31 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_none.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_tool.rbi +37 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +77 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +77 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_result_block_param.rbi +129 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_union.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block_param.rbi +60 -0
- data/rbi/lib/anthropic/models/beta/beta_url_image_source.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_url_pdf_source.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_usage.rbi +52 -0
- data/rbi/lib/anthropic/models/beta/message_count_tokens_params.rbi +409 -0
- data/rbi/lib/anthropic/models/beta/message_create_params.rbi +489 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_cancel_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_create_params.rbi +572 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_delete_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_list_params.rbi +72 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_results_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_retrieve_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +27 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch.rbi +148 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +68 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rbi +63 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_result.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/model_list_params.rbi +59 -0
- data/rbi/lib/anthropic/models/beta/model_retrieve_params.rbi +21 -0
- data/rbi/lib/anthropic/models/beta_api_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_authentication_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_billing_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_error.rbi +17 -0
- data/rbi/lib/anthropic/models/beta_error_response.rbi +68 -0
- data/rbi/lib/anthropic/models/beta_gateway_timeout_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_invalid_request_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_not_found_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_overloaded_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_permission_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_rate_limit_error.rbi +19 -0
- data/rbi/lib/anthropic/models/billing_error.rbi +19 -0
- data/rbi/lib/anthropic/models/cache_control_ephemeral.rbi +16 -0
- data/rbi/lib/anthropic/models/citation_char_location.rbi +61 -0
- data/rbi/lib/anthropic/models/citation_char_location_param.rbi +61 -0
- data/rbi/lib/anthropic/models/citation_content_block_location.rbi +59 -0
- data/rbi/lib/anthropic/models/citation_content_block_location_param.rbi +59 -0
- data/rbi/lib/anthropic/models/citation_page_location.rbi +61 -0
- data/rbi/lib/anthropic/models/citation_page_location_param.rbi +61 -0
- data/rbi/lib/anthropic/models/citations_config_param.rbi +19 -0
- data/rbi/lib/anthropic/models/citations_delta.rbi +62 -0
- data/rbi/lib/anthropic/models/completion.rbi +65 -0
- data/rbi/lib/anthropic/models/completion_create_params.rbi +142 -0
- data/rbi/lib/anthropic/models/content_block.rbi +17 -0
- data/rbi/lib/anthropic/models/content_block_param.rbi +17 -0
- data/rbi/lib/anthropic/models/content_block_source.rbi +56 -0
- data/rbi/lib/anthropic/models/content_block_source_content.rbi +12 -0
- data/rbi/lib/anthropic/models/document_block_param.rbi +97 -0
- data/rbi/lib/anthropic/models/error_object.rbi +17 -0
- data/rbi/lib/anthropic/models/error_response.rbi +68 -0
- data/rbi/lib/anthropic/models/gateway_timeout_error.rbi +19 -0
- data/rbi/lib/anthropic/models/image_block_param.rbi +57 -0
- data/rbi/lib/anthropic/models/input_json_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/invalid_request_error.rbi +19 -0
- data/rbi/lib/anthropic/models/message.rbi +176 -0
- data/rbi/lib/anthropic/models/message_count_tokens_params.rbi +363 -0
- data/rbi/lib/anthropic/models/message_count_tokens_tool.rbi +17 -0
- data/rbi/lib/anthropic/models/message_create_params.rbi +453 -0
- data/rbi/lib/anthropic/models/message_delta_usage.rbi +17 -0
- data/rbi/lib/anthropic/models/message_param.rbi +121 -0
- data/rbi/lib/anthropic/models/message_tokens_count.rbi +18 -0
- data/rbi/lib/anthropic/models/messages/batch_cancel_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/batch_create_params.rbi +535 -0
- data/rbi/lib/anthropic/models/messages/batch_delete_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/batch_list_params.rbi +59 -0
- data/rbi/lib/anthropic/models/messages/batch_results_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/batch_retrieve_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/deleted_message_batch.rbi +25 -0
- data/rbi/lib/anthropic/models/messages/message_batch.rbi +143 -0
- data/rbi/lib/anthropic/models/messages/message_batch_canceled_result.rbi +20 -0
- data/rbi/lib/anthropic/models/messages/message_batch_errored_result.rbi +29 -0
- data/rbi/lib/anthropic/models/messages/message_batch_expired_result.rbi +20 -0
- data/rbi/lib/anthropic/models/messages/message_batch_individual_response.rbi +68 -0
- data/rbi/lib/anthropic/models/messages/message_batch_request_counts.rbi +63 -0
- data/rbi/lib/anthropic/models/messages/message_batch_result.rbi +26 -0
- data/rbi/lib/anthropic/models/messages/message_batch_succeeded_result.rbi +29 -0
- data/rbi/lib/anthropic/models/metadata.rbi +21 -0
- data/rbi/lib/anthropic/models/model.rbi +54 -0
- data/rbi/lib/anthropic/models/model_info.rbi +34 -0
- data/rbi/lib/anthropic/models/model_list_params.rbi +57 -0
- data/rbi/lib/anthropic/models/model_retrieve_params.rbi +19 -0
- data/rbi/lib/anthropic/models/not_found_error.rbi +19 -0
- data/rbi/lib/anthropic/models/overloaded_error.rbi +19 -0
- data/rbi/lib/anthropic/models/permission_error.rbi +19 -0
- data/rbi/lib/anthropic/models/plain_text_source.rbi +22 -0
- data/rbi/lib/anthropic/models/rate_limit_error.rbi +19 -0
- data/rbi/lib/anthropic/models/raw_content_block_delta.rbi +17 -0
- data/rbi/lib/anthropic/models/raw_content_block_delta_event.rbi +61 -0
- data/rbi/lib/anthropic/models/raw_content_block_start_event.rbi +70 -0
- data/rbi/lib/anthropic/models/raw_content_block_stop_event.rbi +19 -0
- data/rbi/lib/anthropic/models/raw_message_delta_event.rbi +81 -0
- data/rbi/lib/anthropic/models/raw_message_start_event.rbi +25 -0
- data/rbi/lib/anthropic/models/raw_message_stop_event.rbi +16 -0
- data/rbi/lib/anthropic/models/raw_message_stream_event.rbi +17 -0
- data/rbi/lib/anthropic/models/redacted_thinking_block.rbi +19 -0
- data/rbi/lib/anthropic/models/redacted_thinking_block_param.rbi +19 -0
- data/rbi/lib/anthropic/models/signature_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/stop_reason.rbi +20 -0
- data/rbi/lib/anthropic/models/text_block.rbi +72 -0
- data/rbi/lib/anthropic/models/text_block_param.rbi +80 -0
- data/rbi/lib/anthropic/models/text_citation.rbi +17 -0
- data/rbi/lib/anthropic/models/text_citation_param.rbi +17 -0
- data/rbi/lib/anthropic/models/text_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/thinking_block.rbi +22 -0
- data/rbi/lib/anthropic/models/thinking_block_param.rbi +22 -0
- data/rbi/lib/anthropic/models/thinking_config_disabled.rbi +16 -0
- data/rbi/lib/anthropic/models/thinking_config_enabled.rbi +28 -0
- data/rbi/lib/anthropic/models/thinking_config_param.rbi +21 -0
- data/rbi/lib/anthropic/models/thinking_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/tool.rbi +88 -0
- data/rbi/lib/anthropic/models/tool_bash_20250124.rbi +43 -0
- data/rbi/lib/anthropic/models/tool_choice.rbi +19 -0
- data/rbi/lib/anthropic/models/tool_choice_any.rbi +27 -0
- data/rbi/lib/anthropic/models/tool_choice_auto.rbi +27 -0
- data/rbi/lib/anthropic/models/tool_choice_none.rbi +17 -0
- data/rbi/lib/anthropic/models/tool_choice_tool.rbi +33 -0
- data/rbi/lib/anthropic/models/tool_result_block_param.rbi +102 -0
- data/rbi/lib/anthropic/models/tool_text_editor_20250124.rbi +43 -0
- data/rbi/lib/anthropic/models/tool_union.rbi +17 -0
- data/rbi/lib/anthropic/models/tool_use_block.rbi +25 -0
- data/rbi/lib/anthropic/models/tool_use_block_param.rbi +56 -0
- data/rbi/lib/anthropic/models/url_image_source.rbi +19 -0
- data/rbi/lib/anthropic/models/url_pdf_source.rbi +19 -0
- data/rbi/lib/anthropic/models/usage.rbi +47 -0
- data/rbi/lib/anthropic/request_options.rbi +46 -0
- data/rbi/lib/anthropic/resources/beta/messages/batches.rbi +164 -0
- data/rbi/lib/anthropic/resources/beta/messages.rbi +823 -0
- data/rbi/lib/anthropic/resources/beta/models.rbi +55 -0
- data/rbi/lib/anthropic/resources/beta.rbi +17 -0
- data/rbi/lib/anthropic/resources/completions.rbi +190 -0
- data/rbi/lib/anthropic/resources/messages/batches.rbi +142 -0
- data/rbi/lib/anthropic/resources/messages.rbi +800 -0
- data/rbi/lib/anthropic/resources/models.rbi +53 -0
- data/rbi/lib/anthropic/version.rbi +5 -0
- data/rbi/lib/anthropic/vertex/client.rbi +56 -0
- data/sig/anthropic/bedrock/client.rbs +41 -0
- data/sig/anthropic/client.rbs +39 -0
- data/sig/anthropic/errors.rbs +101 -0
- data/sig/anthropic/internal/jsonl_stream.rbs +9 -0
- data/sig/anthropic/internal/page.rbs +17 -0
- data/sig/anthropic/internal/stream.rbs +9 -0
- data/sig/anthropic/internal/transport/base_client.rbs +110 -0
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +41 -0
- data/sig/anthropic/internal/type/array_of.rbs +41 -0
- data/sig/anthropic/internal/type/base_model.rbs +82 -0
- data/sig/anthropic/internal/type/base_page.rbs +24 -0
- data/sig/anthropic/internal/type/base_stream.rbs +31 -0
- data/sig/anthropic/internal/type/boolean.rbs +23 -0
- data/sig/anthropic/internal/type/converter.rbs +50 -0
- data/sig/anthropic/internal/type/enum.rbs +27 -0
- data/sig/anthropic/internal/type/hash_of.rbs +41 -0
- data/sig/anthropic/internal/type/io_like.rbs +23 -0
- data/sig/anthropic/internal/type/request_parameters.rbs +15 -0
- data/sig/anthropic/internal/type/union.rbs +45 -0
- data/sig/anthropic/internal/type/unknown.rbs +23 -0
- data/sig/anthropic/internal/util.rbs +154 -0
- data/sig/anthropic/internal.rbs +5 -0
- data/sig/anthropic/models/anthropic_beta.rbs +36 -0
- data/sig/anthropic/models/api_error_object.rbs +15 -0
- data/sig/anthropic/models/authentication_error.rbs +15 -0
- data/sig/anthropic/models/base64_image_source.rbs +40 -0
- data/sig/anthropic/models/base64_pdf_source.rbs +22 -0
- data/sig/anthropic/models/beta/beta_base64_image_source.rbs +44 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +58 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +26 -0
- data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +17 -0
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citations_config_param.rbs +19 -0
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +37 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +19 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +22 -0
- data/sig/anthropic/models/beta/beta_content_block_source.rbs +41 -0
- data/sig/anthropic/models/beta/beta_content_block_source_content.rbs +17 -0
- data/sig/anthropic/models/beta/beta_image_block_param.rbs +40 -0
- data/sig/anthropic/models/beta/beta_input_json_delta.rbs +20 -0
- data/sig/anthropic/models/beta/beta_message.rbs +50 -0
- data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +17 -0
- data/sig/anthropic/models/beta/beta_message_param.rbs +51 -0
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +17 -0
- data/sig/anthropic/models/beta/beta_metadata.rbs +17 -0
- data/sig/anthropic/models/beta/beta_model_info.rbs +29 -0
- data/sig/anthropic/models/beta/beta_plain_text_source.rbs +26 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_delta.rbs +20 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_delta_event.rbs +30 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +42 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_stop_event.rbs +20 -0
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +49 -0
- data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +23 -0
- data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +17 -0
- data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +21 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +20 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +20 -0
- data/sig/anthropic/models/beta/beta_signature_delta.rbs +19 -0
- data/sig/anthropic/models/beta/beta_stop_reason.rbs +21 -0
- data/sig/anthropic/models/beta/beta_text_block.rbs +30 -0
- data/sig/anthropic/models/beta/beta_text_block_param.rbs +34 -0
- data/sig/anthropic/models/beta/beta_text_citation.rbs +18 -0
- data/sig/anthropic/models/beta/beta_text_citation_param.rbs +18 -0
- data/sig/anthropic/models/beta/beta_text_delta.rbs +19 -0
- data/sig/anthropic/models/beta/beta_thinking_block.rbs +26 -0
- data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +26 -0
- data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +17 -0
- data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +20 -0
- data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +17 -0
- data/sig/anthropic/models/beta/beta_thinking_delta.rbs +19 -0
- data/sig/anthropic/models/beta/beta_tool.rbs +62 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_choice.rbs +19 -0
- data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +22 -0
- data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +22 -0
- data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +17 -0
- data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +28 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +42 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +42 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +69 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +22 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +38 -0
- data/sig/anthropic/models/beta/beta_url_image_source.rbs +19 -0
- data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +19 -0
- data/sig/anthropic/models/beta/beta_usage.rbs +34 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +98 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +119 -0
- data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +161 -0
- data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/batch_list_params.rbs +49 -0
- data/sig/anthropic/models/beta/messages/batch_results_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +20 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +70 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +17 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +23 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +17 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +26 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +38 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_result.rbs +19 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbs +23 -0
- data/sig/anthropic/models/beta/model_list_params.rbs +35 -0
- data/sig/anthropic/models/beta/model_retrieve_params.rbs +17 -0
- data/sig/anthropic/models/beta_api_error.rbs +15 -0
- data/sig/anthropic/models/beta_authentication_error.rbs +16 -0
- data/sig/anthropic/models/beta_billing_error.rbs +15 -0
- data/sig/anthropic/models/beta_error.rbs +20 -0
- data/sig/anthropic/models/beta_error_response.rbs +19 -0
- data/sig/anthropic/models/beta_gateway_timeout_error.rbs +15 -0
- data/sig/anthropic/models/beta_invalid_request_error.rbs +16 -0
- data/sig/anthropic/models/beta_not_found_error.rbs +15 -0
- data/sig/anthropic/models/beta_overloaded_error.rbs +15 -0
- data/sig/anthropic/models/beta_permission_error.rbs +15 -0
- data/sig/anthropic/models/beta_rate_limit_error.rbs +15 -0
- data/sig/anthropic/models/billing_error.rbs +15 -0
- data/sig/anthropic/models/cache_control_ephemeral.rbs +13 -0
- data/sig/anthropic/models/citation_char_location.rbs +38 -0
- data/sig/anthropic/models/citation_char_location_param.rbs +38 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +38 -0
- data/sig/anthropic/models/citation_content_block_location_param.rbs +38 -0
- data/sig/anthropic/models/citation_page_location.rbs +38 -0
- data/sig/anthropic/models/citation_page_location_param.rbs +38 -0
- data/sig/anthropic/models/citations_config_param.rbs +15 -0
- data/sig/anthropic/models/citations_delta.rbs +33 -0
- data/sig/anthropic/models/completion.rbs +34 -0
- data/sig/anthropic/models/completion_create_params.rbs +63 -0
- data/sig/anthropic/models/content_block.rbs +15 -0
- data/sig/anthropic/models/content_block_param.rbs +18 -0
- data/sig/anthropic/models/content_block_source.rbs +36 -0
- data/sig/anthropic/models/content_block_source_content.rbs +12 -0
- data/sig/anthropic/models/document_block_param.rbs +54 -0
- data/sig/anthropic/models/error_object.rbs +20 -0
- data/sig/anthropic/models/error_response.rbs +19 -0
- data/sig/anthropic/models/gateway_timeout_error.rbs +15 -0
- data/sig/anthropic/models/image_block_param.rbs +35 -0
- data/sig/anthropic/models/input_json_delta.rbs +15 -0
- data/sig/anthropic/models/invalid_request_error.rbs +16 -0
- data/sig/anthropic/models/message.rbs +46 -0
- data/sig/anthropic/models/message_count_tokens_params.rbs +71 -0
- data/sig/anthropic/models/message_count_tokens_tool.rbs +14 -0
- data/sig/anthropic/models/message_create_params.rbs +107 -0
- data/sig/anthropic/models/message_delta_usage.rbs +13 -0
- data/sig/anthropic/models/message_param.rbs +46 -0
- data/sig/anthropic/models/message_tokens_count.rbs +13 -0
- data/sig/anthropic/models/messages/batch_cancel_params.rbs +17 -0
- data/sig/anthropic/models/messages/batch_create_params.rbs +150 -0
- data/sig/anthropic/models/messages/batch_delete_params.rbs +17 -0
- data/sig/anthropic/models/messages/batch_list_params.rbs +35 -0
- data/sig/anthropic/models/messages/batch_results_params.rbs +17 -0
- data/sig/anthropic/models/messages/batch_retrieve_params.rbs +17 -0
- data/sig/anthropic/models/messages/deleted_message_batch.rbs +17 -0
- data/sig/anthropic/models/messages/message_batch.rbs +70 -0
- data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +17 -0
- data/sig/anthropic/models/messages/message_batch_errored_result.rbs +23 -0
- data/sig/anthropic/models/messages/message_batch_expired_result.rbs +17 -0
- data/sig/anthropic/models/messages/message_batch_individual_response.rbs +26 -0
- data/sig/anthropic/models/messages/message_batch_request_counts.rbs +38 -0
- data/sig/anthropic/models/messages/message_batch_result.rbs +19 -0
- data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +23 -0
- data/sig/anthropic/models/metadata.rbs +13 -0
- data/sig/anthropic/models/model.rbs +73 -0
- data/sig/anthropic/models/model_info.rbs +25 -0
- data/sig/anthropic/models/model_list_params.rbs +33 -0
- data/sig/anthropic/models/model_retrieve_params.rbs +15 -0
- data/sig/anthropic/models/not_found_error.rbs +15 -0
- data/sig/anthropic/models/overloaded_error.rbs +15 -0
- data/sig/anthropic/models/permission_error.rbs +15 -0
- data/sig/anthropic/models/plain_text_source.rbs +22 -0
- data/sig/anthropic/models/rate_limit_error.rbs +15 -0
- data/sig/anthropic/models/raw_content_block_delta.rbs +16 -0
- data/sig/anthropic/models/raw_content_block_delta_event.rbs +26 -0
- data/sig/anthropic/models/raw_content_block_start_event.rbs +38 -0
- data/sig/anthropic/models/raw_content_block_stop_event.rbs +16 -0
- data/sig/anthropic/models/raw_message_delta_event.rbs +42 -0
- data/sig/anthropic/models/raw_message_start_event.rbs +19 -0
- data/sig/anthropic/models/raw_message_stop_event.rbs +13 -0
- data/sig/anthropic/models/raw_message_stream_event.rbs +17 -0
- data/sig/anthropic/models/redacted_thinking_block.rbs +15 -0
- data/sig/anthropic/models/redacted_thinking_block_param.rbs +16 -0
- data/sig/anthropic/models/signature_delta.rbs +15 -0
- data/sig/anthropic/models/stop_reason.rbs +16 -0
- data/sig/anthropic/models/text_block.rbs +26 -0
- data/sig/anthropic/models/text_block_param.rbs +30 -0
- data/sig/anthropic/models/text_citation.rbs +14 -0
- data/sig/anthropic/models/text_citation_param.rbs +14 -0
- data/sig/anthropic/models/text_delta.rbs +15 -0
- data/sig/anthropic/models/thinking_block.rbs +22 -0
- data/sig/anthropic/models/thinking_block_param.rbs +22 -0
- data/sig/anthropic/models/thinking_config_disabled.rbs +13 -0
- data/sig/anthropic/models/thinking_config_enabled.rbs +15 -0
- data/sig/anthropic/models/thinking_config_param.rbs +13 -0
- data/sig/anthropic/models/thinking_delta.rbs +15 -0
- data/sig/anthropic/models/tool.rbs +44 -0
- data/sig/anthropic/models/tool_bash_20250124.rbs +26 -0
- data/sig/anthropic/models/tool_choice.rbs +15 -0
- data/sig/anthropic/models/tool_choice_any.rbs +17 -0
- data/sig/anthropic/models/tool_choice_auto.rbs +17 -0
- data/sig/anthropic/models/tool_choice_none.rbs +13 -0
- data/sig/anthropic/models/tool_choice_tool.rbs +24 -0
- data/sig/anthropic/models/tool_result_block_param.rbs +64 -0
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +26 -0
- data/sig/anthropic/models/tool_union.rbs +14 -0
- data/sig/anthropic/models/tool_use_block.rbs +25 -0
- data/sig/anthropic/models/tool_use_block_param.rbs +34 -0
- data/sig/anthropic/models/url_image_source.rbs +15 -0
- data/sig/anthropic/models/url_pdf_source.rbs +15 -0
- data/sig/anthropic/models/usage.rbs +30 -0
- data/sig/anthropic/request_options.rbs +34 -0
- data/sig/anthropic/resources/beta/messages/batches.rbs +49 -0
- data/sig/anthropic/resources/beta/messages.rbs +56 -0
- data/sig/anthropic/resources/beta/models.rbs +21 -0
- data/sig/anthropic/resources/beta.rbs +11 -0
- data/sig/anthropic/resources/completions.rbs +31 -0
- data/sig/anthropic/resources/messages/batches.rbs +41 -0
- data/sig/anthropic/resources/messages.rbs +51 -0
- data/sig/anthropic/resources/models.rbs +19 -0
- data/sig/anthropic/version.rbs +3 -0
- data/sig/anthropic/vertex/client.rbs +34 -0
- metadata +746 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Resources
|
5
|
+
class Models
|
6
|
+
# Get a specific model.
|
7
|
+
#
|
8
|
+
# The Models API response can be used to determine information about a specific
|
9
|
+
# model or resolve a model alias to a model ID.
|
10
|
+
sig do
|
11
|
+
params(
|
12
|
+
model_id: String,
|
13
|
+
request_options: T.nilable(T.any(Anthropic::RequestOptions, Anthropic::Internal::AnyHash))
|
14
|
+
)
|
15
|
+
.returns(Anthropic::Models::ModelInfo)
|
16
|
+
end
|
17
|
+
def retrieve(
|
18
|
+
# Model identifier or alias.
|
19
|
+
model_id,
|
20
|
+
request_options: {}
|
21
|
+
); end
|
22
|
+
# List available models.
|
23
|
+
#
|
24
|
+
# The Models API response can be used to determine which models are available for
|
25
|
+
# use in the API. More recently released models are listed first.
|
26
|
+
sig do
|
27
|
+
params(
|
28
|
+
after_id: String,
|
29
|
+
before_id: String,
|
30
|
+
limit: Integer,
|
31
|
+
request_options: T.nilable(T.any(Anthropic::RequestOptions, Anthropic::Internal::AnyHash))
|
32
|
+
)
|
33
|
+
.returns(Anthropic::Internal::Page[Anthropic::Models::ModelInfo])
|
34
|
+
end
|
35
|
+
def list(
|
36
|
+
# ID of the object to use as a cursor for pagination. When provided, returns the
|
37
|
+
# page of results immediately after this object.
|
38
|
+
after_id: nil,
|
39
|
+
# ID of the object to use as a cursor for pagination. When provided, returns the
|
40
|
+
# page of results immediately before this object.
|
41
|
+
before_id: nil,
|
42
|
+
# Number of items to return per page.
|
43
|
+
#
|
44
|
+
# Defaults to `20`. Ranges from `1` to `1000`.
|
45
|
+
limit: nil,
|
46
|
+
request_options: {}
|
47
|
+
); end
|
48
|
+
# @api private
|
49
|
+
sig { params(client: Anthropic::Client).returns(T.attached_class) }
|
50
|
+
def self.new(client:); end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Vertex
|
5
|
+
class Client < Anthropic::Client
|
6
|
+
DEFAULT_VERSION = "vertex-2023-10-16"
|
7
|
+
|
8
|
+
sig { returns(String) }
|
9
|
+
attr_reader :region
|
10
|
+
|
11
|
+
sig { returns(String) }
|
12
|
+
attr_reader :project_id
|
13
|
+
|
14
|
+
sig { returns(Anthropic::Resources::Messages) }
|
15
|
+
attr_reader :messages
|
16
|
+
|
17
|
+
sig { returns(Anthropic::Resources::Beta) }
|
18
|
+
attr_reader :beta
|
19
|
+
|
20
|
+
# @api private
|
21
|
+
sig do
|
22
|
+
override
|
23
|
+
.params(req: Anthropic::Internal::Transport::BaseClient::RequestComponentsShape, opts: Anthropic::Internal::AnyHash)
|
24
|
+
.returns(Anthropic::Internal::Transport::BaseClient::RequestInputShape)
|
25
|
+
end
|
26
|
+
private def build_request(req, opts); end
|
27
|
+
|
28
|
+
sig do
|
29
|
+
params(request_components: Anthropic::Internal::Transport::BaseClient::RequestComponentsShape)
|
30
|
+
.returns(Anthropic::Internal::Transport::BaseClient::RequestComponentsShape)
|
31
|
+
end
|
32
|
+
private def fit_req_to_vertex_specs!(request_components) end
|
33
|
+
|
34
|
+
sig do
|
35
|
+
params(
|
36
|
+
region: T.nilable(String),
|
37
|
+
project_id: T.nilable(String),
|
38
|
+
base_url: T.nilable(String),
|
39
|
+
max_retries: Integer,
|
40
|
+
timeout: Float,
|
41
|
+
initial_retry_delay: Float,
|
42
|
+
max_retry_delay: Float
|
43
|
+
).returns(T.attached_class)
|
44
|
+
end
|
45
|
+
def self.new(
|
46
|
+
region: ENV["CLOUD_ML_REGION"],
|
47
|
+
project_id: ENV["ANTHROPIC_VERTEX_PROJECT_ID"],
|
48
|
+
base_url: nil,
|
49
|
+
max_retries: Anthropic::Client::DEFAULT_MAX_RETRIES,
|
50
|
+
timeout: Anthropic::Client::DEFAULT_TIMEOUT_IN_SECONDS,
|
51
|
+
initial_retry_delay: Anthropic::Client::DEFAULT_INITIAL_RETRY_DELAY,
|
52
|
+
max_retry_delay: Anthropic::Client::DEFAULT_MAX_RETRY_DELAY
|
53
|
+
) end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Bedrock
|
3
|
+
class Client < Anthropic::Client
|
4
|
+
DEFAULT_VERSION: String
|
5
|
+
|
6
|
+
attr_reader aws_region: String
|
7
|
+
|
8
|
+
attr_reader completions: Anthropic::Resources::Completions
|
9
|
+
|
10
|
+
attr_reader messages: Anthropic::Resources::Messages
|
11
|
+
|
12
|
+
attr_reader beta: Anthropic::Resources::Beta
|
13
|
+
|
14
|
+
private def build_request: (
|
15
|
+
Anthropic::Internal::Transport::BaseClient::request_components req,
|
16
|
+
Anthropic::request_options opts
|
17
|
+
) -> Anthropic::Internal::Transport::BaseClient::request_input
|
18
|
+
|
19
|
+
def resolve_region_and_credentials: -> top
|
20
|
+
|
21
|
+
private def signer: -> top
|
22
|
+
|
23
|
+
private def fit_req_to_bedrock_specs!: (
|
24
|
+
Anthropic::Internal::Transport::BaseClient::request_components request_components
|
25
|
+
) -> Anthropic::Internal::Transport::BaseClient::request_components
|
26
|
+
|
27
|
+
def initialize: (
|
28
|
+
aws_region: String?,
|
29
|
+
base_url: String?,
|
30
|
+
max_retries: Integer,
|
31
|
+
timeout: Float,
|
32
|
+
initial_retry_delay: Float,
|
33
|
+
max_retry_delay: Float,
|
34
|
+
aws_access_key: String?,
|
35
|
+
aws_secret_key: String?,
|
36
|
+
aws_session_token: String?,
|
37
|
+
aws_profile: String?
|
38
|
+
) -> void
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Anthropic
|
2
|
+
class Client < Anthropic::Internal::Transport::BaseClient
|
3
|
+
DEFAULT_MAX_RETRIES: 2
|
4
|
+
|
5
|
+
DEFAULT_TIMEOUT_IN_SECONDS: Float
|
6
|
+
|
7
|
+
DEFAULT_INITIAL_RETRY_DELAY: Float
|
8
|
+
|
9
|
+
DEFAULT_MAX_RETRY_DELAY: Float
|
10
|
+
|
11
|
+
attr_reader api_key: String?
|
12
|
+
|
13
|
+
attr_reader auth_token: String?
|
14
|
+
|
15
|
+
attr_reader completions: Anthropic::Resources::Completions
|
16
|
+
|
17
|
+
attr_reader messages: Anthropic::Resources::Messages
|
18
|
+
|
19
|
+
attr_reader models: Anthropic::Resources::Models
|
20
|
+
|
21
|
+
attr_reader beta: Anthropic::Resources::Beta
|
22
|
+
|
23
|
+
private def auth_headers: -> ::Hash[String, String]
|
24
|
+
|
25
|
+
private def api_key_auth: -> ::Hash[String, String]
|
26
|
+
|
27
|
+
private def bearer_auth: -> ::Hash[String, String]
|
28
|
+
|
29
|
+
def initialize: (
|
30
|
+
?api_key: String?,
|
31
|
+
?auth_token: String?,
|
32
|
+
?base_url: String?,
|
33
|
+
?max_retries: Integer,
|
34
|
+
?timeout: Float,
|
35
|
+
?initial_retry_delay: Float,
|
36
|
+
?max_retry_delay: Float
|
37
|
+
) -> void
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Errors
|
3
|
+
class Error < StandardError
|
4
|
+
attr_accessor cause: StandardError?
|
5
|
+
end
|
6
|
+
|
7
|
+
class ConversionError < Anthropic::Errors::Error
|
8
|
+
end
|
9
|
+
|
10
|
+
class APIError < Anthropic::Errors::Error
|
11
|
+
attr_accessor url: URI::Generic
|
12
|
+
|
13
|
+
attr_accessor status: Integer?
|
14
|
+
|
15
|
+
attr_accessor body: top?
|
16
|
+
|
17
|
+
def initialize: (
|
18
|
+
url: URI::Generic,
|
19
|
+
?status: Integer?,
|
20
|
+
?body: Object?,
|
21
|
+
?request: nil,
|
22
|
+
?response: nil,
|
23
|
+
?message: String?
|
24
|
+
) -> void
|
25
|
+
end
|
26
|
+
|
27
|
+
class APIConnectionError < Anthropic::Errors::APIError
|
28
|
+
def initialize: (
|
29
|
+
url: URI::Generic,
|
30
|
+
?status: nil,
|
31
|
+
?body: nil,
|
32
|
+
?request: nil,
|
33
|
+
?response: nil,
|
34
|
+
?message: String?
|
35
|
+
) -> void
|
36
|
+
end
|
37
|
+
|
38
|
+
class APITimeoutError < Anthropic::Errors::APIConnectionError
|
39
|
+
def initialize: (
|
40
|
+
url: URI::Generic,
|
41
|
+
?status: nil,
|
42
|
+
?body: nil,
|
43
|
+
?request: nil,
|
44
|
+
?response: nil,
|
45
|
+
?message: String?
|
46
|
+
) -> void
|
47
|
+
end
|
48
|
+
|
49
|
+
class APIStatusError < Anthropic::Errors::APIError
|
50
|
+
def self.for: (
|
51
|
+
url: URI::Generic,
|
52
|
+
status: Integer,
|
53
|
+
body: Object?,
|
54
|
+
request: nil,
|
55
|
+
response: nil,
|
56
|
+
?message: String?
|
57
|
+
) -> instance
|
58
|
+
|
59
|
+
def initialize: (
|
60
|
+
url: URI::Generic,
|
61
|
+
status: Integer,
|
62
|
+
body: Object?,
|
63
|
+
request: nil,
|
64
|
+
response: nil,
|
65
|
+
?message: String?
|
66
|
+
) -> void
|
67
|
+
end
|
68
|
+
|
69
|
+
class BadRequestError < Anthropic::Errors::APIStatusError
|
70
|
+
HTTP_STATUS: 400
|
71
|
+
end
|
72
|
+
|
73
|
+
class AuthenticationError < Anthropic::Errors::APIStatusError
|
74
|
+
HTTP_STATUS: 401
|
75
|
+
end
|
76
|
+
|
77
|
+
class PermissionDeniedError < Anthropic::Errors::APIStatusError
|
78
|
+
HTTP_STATUS: 403
|
79
|
+
end
|
80
|
+
|
81
|
+
class NotFoundError < Anthropic::Errors::APIStatusError
|
82
|
+
HTTP_STATUS: 404
|
83
|
+
end
|
84
|
+
|
85
|
+
class ConflictError < Anthropic::Errors::APIStatusError
|
86
|
+
HTTP_STATUS: 409
|
87
|
+
end
|
88
|
+
|
89
|
+
class UnprocessableEntityError < Anthropic::Errors::APIStatusError
|
90
|
+
HTTP_STATUS: 422
|
91
|
+
end
|
92
|
+
|
93
|
+
class RateLimitError < Anthropic::Errors::APIStatusError
|
94
|
+
HTTP_STATUS: 429
|
95
|
+
end
|
96
|
+
|
97
|
+
class InternalServerError < Anthropic::Errors::APIStatusError
|
98
|
+
HTTP_STATUS: Range[Integer]
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
class Page[Elem]
|
4
|
+
include Anthropic::Internal::Type::BasePage[Elem]
|
5
|
+
|
6
|
+
attr_accessor data: ::Array[Elem]?
|
7
|
+
|
8
|
+
attr_accessor has_more: bool
|
9
|
+
|
10
|
+
attr_accessor first_id: String?
|
11
|
+
|
12
|
+
attr_accessor last_id: String?
|
13
|
+
|
14
|
+
def inspect: -> String
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Transport
|
4
|
+
class BaseClient
|
5
|
+
type request_components =
|
6
|
+
{
|
7
|
+
method: Symbol,
|
8
|
+
path: String | ::Array[String],
|
9
|
+
query: ::Hash[String, (::Array[String] | String)?]?,
|
10
|
+
headers: ::Hash[String, (String
|
11
|
+
| Integer
|
12
|
+
| ::Array[(String | Integer)?])?]?,
|
13
|
+
body: top?,
|
14
|
+
unwrap: Symbol?,
|
15
|
+
page: Class?,
|
16
|
+
stream: Class?,
|
17
|
+
model: Anthropic::Internal::Type::Converter::input?,
|
18
|
+
options: Anthropic::request_opts?
|
19
|
+
}
|
20
|
+
|
21
|
+
type request_input =
|
22
|
+
{
|
23
|
+
method: Symbol,
|
24
|
+
url: URI::Generic,
|
25
|
+
headers: ::Hash[String, String],
|
26
|
+
body: top,
|
27
|
+
max_retries: Integer,
|
28
|
+
timeout: Float
|
29
|
+
}
|
30
|
+
|
31
|
+
MAX_REDIRECTS: 20
|
32
|
+
|
33
|
+
PLATFORM_HEADERS: ::Hash[String, String]
|
34
|
+
|
35
|
+
def self.validate!: (
|
36
|
+
Anthropic::Internal::Transport::BaseClient::request_components req
|
37
|
+
) -> void
|
38
|
+
|
39
|
+
def self.should_retry?: (
|
40
|
+
Integer status,
|
41
|
+
headers: ::Hash[String, String]
|
42
|
+
) -> bool
|
43
|
+
|
44
|
+
def self.follow_redirect: (
|
45
|
+
Anthropic::Internal::Transport::BaseClient::request_input request,
|
46
|
+
status: Integer,
|
47
|
+
response_headers: ::Hash[String, String]
|
48
|
+
) -> Anthropic::Internal::Transport::BaseClient::request_input
|
49
|
+
|
50
|
+
def self.reap_connection!: (
|
51
|
+
Integer | Anthropic::Errors::APIConnectionError status,
|
52
|
+
stream: Enumerable[String]?
|
53
|
+
) -> void
|
54
|
+
|
55
|
+
# @api private
|
56
|
+
attr_accessor requester: Anthropic::Internal::Transport::PooledNetRequester
|
57
|
+
|
58
|
+
def initialize: (
|
59
|
+
base_url: String,
|
60
|
+
?timeout: Float,
|
61
|
+
?max_retries: Integer,
|
62
|
+
?initial_retry_delay: Float,
|
63
|
+
?max_retry_delay: Float,
|
64
|
+
?headers: ::Hash[String, (String
|
65
|
+
| Integer
|
66
|
+
| ::Array[(String | Integer)?])?],
|
67
|
+
?idempotency_header: String?
|
68
|
+
) -> void
|
69
|
+
|
70
|
+
private def auth_headers: -> ::Hash[String, String]
|
71
|
+
|
72
|
+
private def generate_idempotency_key: -> String
|
73
|
+
|
74
|
+
private def build_request: (
|
75
|
+
Anthropic::Internal::Transport::BaseClient::request_components req,
|
76
|
+
Anthropic::request_options opts
|
77
|
+
) -> Anthropic::Internal::Transport::BaseClient::request_input
|
78
|
+
|
79
|
+
private def retry_delay: (
|
80
|
+
::Hash[String, String] headers,
|
81
|
+
retry_count: Integer
|
82
|
+
) -> Float
|
83
|
+
|
84
|
+
private def send_request: (
|
85
|
+
Anthropic::Internal::Transport::BaseClient::request_input request,
|
86
|
+
redirect_count: Integer,
|
87
|
+
retry_count: Integer,
|
88
|
+
send_retry_header: bool
|
89
|
+
) -> [Integer, top, Enumerable[String]]
|
90
|
+
|
91
|
+
def request: (
|
92
|
+
Symbol method,
|
93
|
+
String | ::Array[String] path,
|
94
|
+
?query: ::Hash[String, (::Array[String] | String)?]?,
|
95
|
+
?headers: ::Hash[String, (String
|
96
|
+
| Integer
|
97
|
+
| ::Array[(String | Integer)?])?]?,
|
98
|
+
?body: top?,
|
99
|
+
?unwrap: Symbol?,
|
100
|
+
?page: Class?,
|
101
|
+
?stream: Class?,
|
102
|
+
?model: Anthropic::Internal::Type::Converter::input?,
|
103
|
+
?options: Anthropic::request_opts?
|
104
|
+
) -> top
|
105
|
+
|
106
|
+
def inspect: -> String
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Transport
|
4
|
+
class PooledNetRequester
|
5
|
+
type request =
|
6
|
+
{
|
7
|
+
method: Symbol,
|
8
|
+
url: URI::Generic,
|
9
|
+
headers: ::Hash[String, String],
|
10
|
+
body: top,
|
11
|
+
deadline: Float
|
12
|
+
}
|
13
|
+
|
14
|
+
KEEP_ALIVE_TIMEOUT: 30
|
15
|
+
|
16
|
+
def self.connect: (URI::Generic url) -> top
|
17
|
+
|
18
|
+
def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
|
19
|
+
|
20
|
+
def self.build_request: (
|
21
|
+
Anthropic::Internal::Transport::PooledNetRequester::request request
|
22
|
+
) {
|
23
|
+
(String arg0) -> void
|
24
|
+
} -> [top, (^-> void)]
|
25
|
+
|
26
|
+
private def with_pool: (
|
27
|
+
URI::Generic url,
|
28
|
+
deadline: Float
|
29
|
+
) {
|
30
|
+
(top arg0) -> void
|
31
|
+
} -> void
|
32
|
+
|
33
|
+
def execute: (
|
34
|
+
Anthropic::Internal::Transport::PooledNetRequester::request request
|
35
|
+
) -> [Integer, top, Enumerable[String]]
|
36
|
+
|
37
|
+
def initialize: (?size: Integer) -> void
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Type
|
4
|
+
class ArrayOf[Elem]
|
5
|
+
include Anthropic::Internal::Type::Converter
|
6
|
+
|
7
|
+
def self.[]: (
|
8
|
+
::Hash[Symbol, top]
|
9
|
+
| ^-> Anthropic::Internal::Type::Converter::input
|
10
|
+
| Anthropic::Internal::Type::Converter::input type_info,
|
11
|
+
?::Hash[Symbol, top] spec
|
12
|
+
) -> instance
|
13
|
+
|
14
|
+
def ===: (top other) -> bool
|
15
|
+
|
16
|
+
def ==: (top other) -> bool
|
17
|
+
|
18
|
+
def coerce: (
|
19
|
+
::Array[top] | top value,
|
20
|
+
state: Anthropic::Internal::Type::Converter::coerce_state
|
21
|
+
) -> (::Array[top] | top)
|
22
|
+
|
23
|
+
def dump: (
|
24
|
+
::Array[top] | top value,
|
25
|
+
state: Anthropic::Internal::Type::Converter::dump_state
|
26
|
+
) -> (::Array[top] | top)
|
27
|
+
|
28
|
+
def item_type: -> Elem
|
29
|
+
|
30
|
+
def nilable?: -> bool
|
31
|
+
|
32
|
+
def initialize: (
|
33
|
+
::Hash[Symbol, top]
|
34
|
+
| ^-> Anthropic::Internal::Type::Converter::input
|
35
|
+
| Anthropic::Internal::Type::Converter::input type_info,
|
36
|
+
?::Hash[Symbol, top] spec
|
37
|
+
) -> void
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Type
|
4
|
+
class BaseModel
|
5
|
+
extend Anthropic::Internal::Type::Converter
|
6
|
+
|
7
|
+
type known_field =
|
8
|
+
{ mode: (:coerce | :dump)?, required: bool, nilable: bool }
|
9
|
+
|
10
|
+
def self.known_fields: -> ::Hash[Symbol, (Anthropic::Internal::Type::BaseModel::known_field
|
11
|
+
& { type_fn: (^-> Anthropic::Internal::Type::Converter::input) })]
|
12
|
+
|
13
|
+
def self.fields: -> ::Hash[Symbol, (Anthropic::Internal::Type::BaseModel::known_field
|
14
|
+
& { type: Anthropic::Internal::Type::Converter::input })]
|
15
|
+
|
16
|
+
private def self.add_field: (
|
17
|
+
Symbol name_sym,
|
18
|
+
required: bool,
|
19
|
+
type_info: {
|
20
|
+
const: (nil | bool | Integer | Float | Symbol)?,
|
21
|
+
enum: ^-> Anthropic::Internal::Type::Converter::input?,
|
22
|
+
union: ^-> Anthropic::Internal::Type::Converter::input?,
|
23
|
+
api_name: Symbol
|
24
|
+
}
|
25
|
+
| ^-> Anthropic::Internal::Type::Converter::input
|
26
|
+
| Anthropic::Internal::Type::Converter::input,
|
27
|
+
spec: ::Hash[Symbol, top]
|
28
|
+
) -> void
|
29
|
+
|
30
|
+
def self.required: (
|
31
|
+
Symbol name_sym,
|
32
|
+
::Hash[Symbol, top]
|
33
|
+
| ^-> Anthropic::Internal::Type::Converter::input
|
34
|
+
| Anthropic::Internal::Type::Converter::input type_info,
|
35
|
+
?::Hash[Symbol, top] spec
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def self.optional: (
|
39
|
+
Symbol name_sym,
|
40
|
+
::Hash[Symbol, top]
|
41
|
+
| ^-> Anthropic::Internal::Type::Converter::input
|
42
|
+
| Anthropic::Internal::Type::Converter::input type_info,
|
43
|
+
?::Hash[Symbol, top] spec
|
44
|
+
) -> void
|
45
|
+
|
46
|
+
private def self.request_only: { -> void } -> void
|
47
|
+
|
48
|
+
private def self.response_only: { -> void } -> void
|
49
|
+
|
50
|
+
def self.==: (top other) -> bool
|
51
|
+
|
52
|
+
def ==: (top other) -> bool
|
53
|
+
|
54
|
+
def self.coerce: (
|
55
|
+
Anthropic::Internal::Type::BaseModel | ::Hash[top, top] | top value,
|
56
|
+
state: Anthropic::Internal::Type::Converter::coerce_state
|
57
|
+
) -> (instance | top)
|
58
|
+
|
59
|
+
def self.dump: (
|
60
|
+
instance | top value,
|
61
|
+
state: Anthropic::Internal::Type::Converter::dump_state
|
62
|
+
) -> (::Hash[top, top] | top)
|
63
|
+
|
64
|
+
def []: (Symbol key) -> top?
|
65
|
+
|
66
|
+
def to_h: -> ::Hash[Symbol, top]
|
67
|
+
|
68
|
+
alias to_hash to_h
|
69
|
+
|
70
|
+
def deconstruct_keys: (::Array[Symbol]? keys) -> ::Hash[Symbol, top]
|
71
|
+
|
72
|
+
def to_json: (*top a) -> String
|
73
|
+
|
74
|
+
def to_yaml: (*top a) -> String
|
75
|
+
|
76
|
+
def initialize: (?::Hash[Symbol, top] | self data) -> void
|
77
|
+
|
78
|
+
def inspect: -> String
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Type
|
4
|
+
module BasePage[Elem]
|
5
|
+
def next_page?: -> bool
|
6
|
+
|
7
|
+
def next_page: -> self
|
8
|
+
|
9
|
+
def auto_paging_each: { (Elem arg0) -> void } -> void
|
10
|
+
|
11
|
+
def to_enum: -> Enumerable[Elem]
|
12
|
+
|
13
|
+
alias enum_for to_enum
|
14
|
+
|
15
|
+
def initialize: (
|
16
|
+
client: Anthropic::Internal::Transport::BaseClient,
|
17
|
+
req: Anthropic::Internal::Transport::BaseClient::request_components,
|
18
|
+
headers: ::Hash[String, String],
|
19
|
+
page_data: top
|
20
|
+
) -> void
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Type
|
4
|
+
module BaseStream[Message, Elem]
|
5
|
+
include Enumerable[Elem]
|
6
|
+
|
7
|
+
def self.defer_closing: (
|
8
|
+
Enumerable[top] stream
|
9
|
+
) -> (^(Integer arg0) -> void)
|
10
|
+
|
11
|
+
def close: -> void
|
12
|
+
|
13
|
+
private def iterator: -> Enumerable[Elem]
|
14
|
+
|
15
|
+
def each: { (Elem arg0) -> void } -> void
|
16
|
+
|
17
|
+
def to_enum: -> Enumerator[Elem]
|
18
|
+
|
19
|
+
alias enum_for to_enum
|
20
|
+
|
21
|
+
def initialize: (
|
22
|
+
model: Class | Anthropic::Internal::Type::Converter,
|
23
|
+
url: URI::Generic,
|
24
|
+
status: Integer,
|
25
|
+
response: top,
|
26
|
+
stream: Enumerable[Message]
|
27
|
+
) -> void
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Internal
|
3
|
+
module Type
|
4
|
+
class Boolean
|
5
|
+
extend Anthropic::Internal::Type::Converter
|
6
|
+
|
7
|
+
def self.===: (top other) -> bool
|
8
|
+
|
9
|
+
def self.==: (top other) -> bool
|
10
|
+
|
11
|
+
def self.coerce: (
|
12
|
+
bool | top value,
|
13
|
+
state: Anthropic::Internal::Type::Converter::coerce_state
|
14
|
+
) -> (bool | top)
|
15
|
+
|
16
|
+
def self.dump: (
|
17
|
+
bool | top value,
|
18
|
+
state: Anthropic::Internal::Type::Converter::dump_state
|
19
|
+
) -> (bool | top)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|