anthropic 0.4.0 → 1.0.0
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 +4 -4
- data/.ignore +2 -0
- data/CHANGELOG.md +639 -24
- data/README.md +255 -274
- data/SECURITY.md +27 -0
- data/lib/anthropic/bedrock.rb +5 -0
- data/lib/anthropic/client.rb +90 -95
- data/lib/anthropic/errors.rb +192 -0
- data/lib/anthropic/file_part.rb +55 -0
- data/lib/anthropic/helpers/bedrock/client.rb +259 -0
- data/lib/anthropic/helpers/vertex/client.rb +218 -0
- data/lib/anthropic/internal/jsonl_stream.rb +26 -0
- data/lib/anthropic/internal/page.rb +99 -0
- data/lib/anthropic/internal/stream.rb +58 -0
- data/lib/anthropic/internal/transport/base_client.rb +558 -0
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +209 -0
- data/lib/anthropic/internal/type/array_of.rb +162 -0
- data/lib/anthropic/internal/type/base_model.rb +481 -0
- data/lib/anthropic/internal/type/base_page.rb +55 -0
- data/lib/anthropic/internal/type/base_stream.rb +90 -0
- data/lib/anthropic/internal/type/boolean.rb +71 -0
- data/lib/anthropic/internal/type/converter.rb +292 -0
- data/lib/anthropic/internal/type/enum.rb +145 -0
- data/lib/anthropic/internal/type/file_input.rb +103 -0
- data/lib/anthropic/internal/type/hash_of.rb +182 -0
- data/lib/anthropic/internal/type/request_parameters.rb +42 -0
- data/lib/anthropic/internal/type/union.rb +252 -0
- data/lib/anthropic/internal/type/unknown.rb +75 -0
- data/lib/anthropic/internal/util.rb +907 -0
- data/lib/anthropic/internal.rb +20 -0
- data/lib/anthropic/models/anthropic_beta.rb +47 -0
- data/lib/anthropic/models/api_error_object.rb +21 -0
- data/lib/anthropic/models/authentication_error.rb +21 -0
- data/lib/anthropic/models/base64_image_source.rb +40 -0
- data/lib/anthropic/models/base64_pdf_source.rb +27 -0
- data/lib/anthropic/models/beta/beta_base64_image_source.rb +44 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +73 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_source.rb +31 -0
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +19 -0
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +49 -0
- data/lib/anthropic/models/beta/beta_citation_char_location_param.rb +49 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +49 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location_param.rb +49 -0
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +49 -0
- data/lib/anthropic/models/beta/beta_citation_page_location_param.rb +49 -0
- data/lib/anthropic/models/beta/beta_citation_web_search_result_location_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_citations_config_param.rb +19 -0
- data/lib/anthropic/models/beta/beta_citations_delta.rb +43 -0
- data/lib/anthropic/models/beta/beta_citations_web_search_result_location.rb +43 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +30 -0
- data/lib/anthropic/models/beta/beta_content_block_param.rb +36 -0
- data/lib/anthropic/models/beta/beta_content_block_source.rb +41 -0
- data/lib/anthropic/models/beta/beta_content_block_source_content.rb +22 -0
- data/lib/anthropic/models/beta/beta_image_block_param.rb +48 -0
- data/lib/anthropic/models/beta/beta_input_json_delta.rb +25 -0
- data/lib/anthropic/models/beta/beta_message.rb +148 -0
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +52 -0
- data/lib/anthropic/models/beta/beta_message_param.rb +52 -0
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +25 -0
- data/lib/anthropic/models/beta/beta_metadata.rb +27 -0
- data/lib/anthropic/models/beta/beta_model_info.rb +51 -0
- data/lib/anthropic/models/beta/beta_plain_text_source.rb +31 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +28 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +31 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +53 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rb +25 -0
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +68 -0
- data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +25 -0
- data/lib/anthropic/models/beta/beta_raw_message_stop_event.rb +19 -0
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +30 -0
- data/lib/anthropic/models/beta/beta_redacted_thinking_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_server_tool_usage.rb +20 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +37 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +48 -0
- data/lib/anthropic/models/beta/beta_signature_delta.rb +25 -0
- data/lib/anthropic/models/beta/beta_stop_reason.rb +23 -0
- data/lib/anthropic/models/beta/beta_text_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_text_block_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_text_citation.rb +26 -0
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +26 -0
- data/lib/anthropic/models/beta/beta_text_delta.rb +25 -0
- data/lib/anthropic/models/beta/beta_thinking_block.rb +31 -0
- data/lib/anthropic/models/beta/beta_thinking_block_param.rb +31 -0
- data/lib/anthropic/models/beta/beta_thinking_config_disabled.rb +19 -0
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +38 -0
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +31 -0
- data/lib/anthropic/models/beta/beta_thinking_delta.rb +25 -0
- data/lib/anthropic/models/beta/beta_tool.rb +96 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +40 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +40 -0
- data/lib/anthropic/models/beta/beta_tool_choice.rb +32 -0
- data/lib/anthropic/models/beta/beta_tool_choice_any.rb +35 -0
- data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +35 -0
- data/lib/anthropic/models/beta/beta_tool_choice_none.rb +21 -0
- data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +43 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +64 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +64 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +79 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +40 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +40 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +32 -0
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +37 -0
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +48 -0
- data/lib/anthropic/models/beta/beta_url_image_source.rb +25 -0
- data/lib/anthropic/models/beta/beta_url_pdf_source.rb +25 -0
- data/lib/anthropic/models/beta/beta_usage.rb +52 -0
- data/lib/anthropic/models/beta/beta_web_search_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_web_search_result_block_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +126 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_request_error.rb +39 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +31 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_content.rb +24 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +41 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rb +26 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_error.rb +39 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +292 -0
- data/lib/anthropic/models/beta/message_create_params.rb +351 -0
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +26 -0
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +424 -0
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +26 -0
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +57 -0
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +26 -0
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +26 -0
- data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +34 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +133 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rb +19 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +25 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rb +19 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +43 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +63 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +31 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +25 -0
- data/lib/anthropic/models/beta/model_list_params.rb +55 -0
- data/lib/anthropic/models/beta/model_retrieve_params.rb +24 -0
- data/lib/anthropic/models/beta_api_error.rb +21 -0
- data/lib/anthropic/models/beta_authentication_error.rb +21 -0
- data/lib/anthropic/models/beta_billing_error.rb +21 -0
- data/lib/anthropic/models/beta_error.rb +32 -0
- data/lib/anthropic/models/beta_error_response.rb +21 -0
- data/lib/anthropic/models/beta_gateway_timeout_error.rb +21 -0
- data/lib/anthropic/models/beta_invalid_request_error.rb +21 -0
- data/lib/anthropic/models/beta_not_found_error.rb +21 -0
- data/lib/anthropic/models/beta_overloaded_error.rb +21 -0
- data/lib/anthropic/models/beta_permission_error.rb +21 -0
- data/lib/anthropic/models/beta_rate_limit_error.rb +21 -0
- data/lib/anthropic/models/billing_error.rb +21 -0
- data/lib/anthropic/models/cache_control_ephemeral.rb +15 -0
- data/lib/anthropic/models/citation_char_location.rb +45 -0
- data/lib/anthropic/models/citation_char_location_param.rb +45 -0
- data/lib/anthropic/models/citation_content_block_location.rb +45 -0
- data/lib/anthropic/models/citation_content_block_location_param.rb +45 -0
- data/lib/anthropic/models/citation_page_location.rb +45 -0
- data/lib/anthropic/models/citation_page_location_param.rb +45 -0
- data/lib/anthropic/models/citation_web_search_result_location_param.rb +39 -0
- data/lib/anthropic/models/citations_config_param.rb +15 -0
- data/lib/anthropic/models/citations_delta.rb +39 -0
- data/lib/anthropic/models/citations_web_search_result_location.rb +39 -0
- data/lib/anthropic/models/completion.rb +66 -0
- data/lib/anthropic/models/completion_create_params.rb +133 -0
- data/lib/anthropic/models/content_block.rb +26 -0
- data/lib/anthropic/models/content_block_param.rb +32 -0
- data/lib/anthropic/models/content_block_source.rb +37 -0
- data/lib/anthropic/models/content_block_source_content.rb +18 -0
- data/lib/anthropic/models/document_block_param.rb +69 -0
- data/lib/anthropic/models/error_object.rb +32 -0
- data/lib/anthropic/models/error_response.rb +21 -0
- data/lib/anthropic/models/gateway_timeout_error.rb +21 -0
- data/lib/anthropic/models/image_block_param.rb +44 -0
- data/lib/anthropic/models/input_json_delta.rb +21 -0
- data/lib/anthropic/models/invalid_request_error.rb +21 -0
- data/lib/anthropic/models/message.rb +144 -0
- data/lib/anthropic/models/message_count_tokens_params.rb +254 -0
- data/lib/anthropic/models/message_count_tokens_tool.rb +20 -0
- data/lib/anthropic/models/message_create_params.rb +339 -0
- data/lib/anthropic/models/message_delta_usage.rb +48 -0
- data/lib/anthropic/models/message_param.rb +49 -0
- data/lib/anthropic/models/message_tokens_count.rb +21 -0
- data/lib/anthropic/models/messages/batch_cancel_params.rb +16 -0
- data/lib/anthropic/models/messages/batch_create_params.rb +406 -0
- data/lib/anthropic/models/messages/batch_delete_params.rb +16 -0
- data/lib/anthropic/models/messages/batch_list_params.rb +47 -0
- data/lib/anthropic/models/messages/batch_results_params.rb +16 -0
- data/lib/anthropic/models/messages/batch_retrieve_params.rb +16 -0
- data/lib/anthropic/models/messages/deleted_message_batch.rb +32 -0
- data/lib/anthropic/models/messages/message_batch.rb +130 -0
- data/lib/anthropic/models/messages/message_batch_canceled_result.rb +19 -0
- data/lib/anthropic/models/messages/message_batch_errored_result.rb +25 -0
- data/lib/anthropic/models/messages/message_batch_expired_result.rb +19 -0
- data/lib/anthropic/models/messages/message_batch_individual_response.rb +42 -0
- data/lib/anthropic/models/messages/message_batch_request_counts.rb +63 -0
- data/lib/anthropic/models/messages/message_batch_result.rb +31 -0
- data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +25 -0
- data/lib/anthropic/models/metadata.rb +23 -0
- data/lib/anthropic/models/model.rb +96 -0
- data/lib/anthropic/models/model_info.rb +47 -0
- data/lib/anthropic/models/model_list_params.rb +53 -0
- data/lib/anthropic/models/model_retrieve_params.rb +22 -0
- data/lib/anthropic/models/not_found_error.rb +21 -0
- data/lib/anthropic/models/overloaded_error.rb +21 -0
- data/lib/anthropic/models/permission_error.rb +21 -0
- data/lib/anthropic/models/plain_text_source.rb +27 -0
- data/lib/anthropic/models/rate_limit_error.rb +21 -0
- data/lib/anthropic/models/raw_content_block_delta.rb +24 -0
- data/lib/anthropic/models/raw_content_block_delta_event.rb +27 -0
- data/lib/anthropic/models/raw_content_block_start_event.rb +49 -0
- data/lib/anthropic/models/raw_content_block_stop_event.rb +21 -0
- data/lib/anthropic/models/raw_message_delta_event.rb +64 -0
- data/lib/anthropic/models/raw_message_start_event.rb +21 -0
- data/lib/anthropic/models/raw_message_stop_event.rb +15 -0
- data/lib/anthropic/models/raw_message_stream_event.rb +26 -0
- data/lib/anthropic/models/redacted_thinking_block.rb +21 -0
- data/lib/anthropic/models/redacted_thinking_block_param.rb +21 -0
- data/lib/anthropic/models/server_tool_usage.rb +16 -0
- data/lib/anthropic/models/server_tool_use_block.rb +33 -0
- data/lib/anthropic/models/server_tool_use_block_param.rb +44 -0
- data/lib/anthropic/models/signature_delta.rb +21 -0
- data/lib/anthropic/models/stop_reason.rb +19 -0
- data/lib/anthropic/models/text_block.rb +41 -0
- data/lib/anthropic/models/text_block_param.rb +39 -0
- data/lib/anthropic/models/text_citation.rb +22 -0
- data/lib/anthropic/models/text_citation_param.rb +22 -0
- data/lib/anthropic/models/text_delta.rb +21 -0
- data/lib/anthropic/models/thinking_block.rb +27 -0
- data/lib/anthropic/models/thinking_block_param.rb +27 -0
- data/lib/anthropic/models/thinking_config_disabled.rb +15 -0
- data/lib/anthropic/models/thinking_config_enabled.rb +34 -0
- data/lib/anthropic/models/thinking_config_param.rb +27 -0
- data/lib/anthropic/models/thinking_delta.rb +21 -0
- data/lib/anthropic/models/tool.rb +92 -0
- data/lib/anthropic/models/tool_bash_20250124.rb +36 -0
- data/lib/anthropic/models/tool_choice.rb +28 -0
- data/lib/anthropic/models/tool_choice_any.rb +31 -0
- data/lib/anthropic/models/tool_choice_auto.rb +31 -0
- data/lib/anthropic/models/tool_choice_none.rb +17 -0
- data/lib/anthropic/models/tool_choice_tool.rb +39 -0
- data/lib/anthropic/models/tool_result_block_param.rb +73 -0
- data/lib/anthropic/models/tool_text_editor_20250124.rb +36 -0
- data/lib/anthropic/models/tool_union.rb +20 -0
- data/lib/anthropic/models/tool_use_block.rb +33 -0
- data/lib/anthropic/models/tool_use_block_param.rb +44 -0
- data/lib/anthropic/models/url_image_source.rb +21 -0
- data/lib/anthropic/models/url_pdf_source.rb +21 -0
- data/lib/anthropic/models/usage.rb +48 -0
- data/lib/anthropic/models/web_search_result_block.rb +39 -0
- data/lib/anthropic/models/web_search_result_block_param.rb +39 -0
- data/lib/anthropic/models/web_search_tool_20250305.rb +122 -0
- data/lib/anthropic/models/web_search_tool_request_error.rb +35 -0
- data/lib/anthropic/models/web_search_tool_result_block.rb +27 -0
- data/lib/anthropic/models/web_search_tool_result_block_content.rb +19 -0
- data/lib/anthropic/models/web_search_tool_result_block_param.rb +37 -0
- data/lib/anthropic/models/web_search_tool_result_block_param_content.rb +20 -0
- data/lib/anthropic/models/web_search_tool_result_error.rb +35 -0
- data/lib/anthropic/models.rb +261 -0
- data/lib/anthropic/request_options.rb +77 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +218 -0
- data/lib/anthropic/resources/beta/messages.rb +200 -0
- data/lib/anthropic/resources/beta/models.rb +80 -0
- data/lib/anthropic/resources/beta.rb +22 -0
- data/lib/anthropic/resources/completions.rb +132 -0
- data/lib/anthropic/resources/messages/batches.rb +193 -0
- data/lib/anthropic/resources/messages.rb +184 -0
- data/lib/anthropic/resources/models.rb +78 -0
- data/lib/anthropic/version.rb +3 -1
- data/lib/anthropic/vertex.rb +5 -0
- data/lib/anthropic.rb +286 -68
- data/manifest.yaml +15 -0
- data/rbi/anthropic/bedrock.rbi +5 -0
- data/rbi/anthropic/client.rbi +74 -0
- data/rbi/anthropic/errors.rbi +162 -0
- data/rbi/anthropic/file_part.rbi +37 -0
- data/rbi/anthropic/helpers/bedrock/client.rbi +82 -0
- data/rbi/anthropic/helpers/vertex/client.rbi +58 -0
- data/rbi/anthropic/internal/jsonl_stream.rbi +17 -0
- data/rbi/anthropic/internal/page.rbi +28 -0
- data/rbi/anthropic/internal/stream.rbi +20 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +310 -0
- data/rbi/anthropic/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/anthropic/internal/type/array_of.rbi +104 -0
- data/rbi/anthropic/internal/type/base_model.rbi +304 -0
- data/rbi/anthropic/internal/type/base_page.rbi +42 -0
- data/rbi/anthropic/internal/type/base_stream.rbi +68 -0
- data/rbi/anthropic/internal/type/boolean.rbi +56 -0
- data/rbi/anthropic/internal/type/converter.rbi +162 -0
- data/rbi/anthropic/internal/type/enum.rbi +82 -0
- data/rbi/anthropic/internal/type/file_input.rbi +59 -0
- data/rbi/anthropic/internal/type/hash_of.rbi +104 -0
- data/rbi/anthropic/internal/type/request_parameters.rbi +29 -0
- data/rbi/anthropic/internal/type/union.rbi +116 -0
- data/rbi/anthropic/internal/type/unknown.rbi +56 -0
- data/rbi/anthropic/internal/util.rbi +485 -0
- data/rbi/anthropic/internal.rbi +18 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +54 -0
- data/rbi/anthropic/models/api_error_object.rbi +26 -0
- data/rbi/anthropic/models/authentication_error.rbi +26 -0
- data/rbi/anthropic/models/base64_image_source.rbi +82 -0
- data/rbi/anthropic/models/base64_pdf_source.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_base64_image_source.rbi +95 -0
- data/rbi/anthropic/models/beta/beta_base64_pdf_block.rbi +134 -0
- data/rbi/anthropic/models/beta/beta_base64_pdf_source.rbi +42 -0
- data/rbi/anthropic/models/beta/beta_cache_control_ephemeral.rbi +30 -0
- data/rbi/anthropic/models/beta/beta_citation_char_location.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_citation_char_location_param.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_citation_content_block_location.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_citation_content_block_location_param.rbi +73 -0
- data/rbi/anthropic/models/beta/beta_citation_page_location.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_citation_page_location_param.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_citation_web_search_result_location_param.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_citations_config_param.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_citations_delta.rbi +73 -0
- data/rbi/anthropic/models/beta/beta_citations_web_search_result_location.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +36 -0
- data/rbi/anthropic/models/beta/beta_content_block_source.rbi +80 -0
- data/rbi/anthropic/models/beta/beta_content_block_source_content.rbi +29 -0
- data/rbi/anthropic/models/beta/beta_image_block_param.rbi +101 -0
- data/rbi/anthropic/models/beta/beta_input_json_delta.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +245 -0
- data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +85 -0
- data/rbi/anthropic/models/beta/beta_message_param.rbi +99 -0
- data/rbi/anthropic/models/beta/beta_message_tokens_count.rbi +36 -0
- data/rbi/anthropic/models/beta/beta_metadata.rbi +39 -0
- data/rbi/anthropic/models/beta/beta_model_info.rbi +66 -0
- data/rbi/anthropic/models/beta/beta_plain_text_source.rbi +42 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_delta.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +57 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +89 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_stop_event.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +135 -0
- data/rbi/anthropic/models/beta/beta_raw_message_start_event.rbi +45 -0
- data/rbi/anthropic/models/beta/beta_raw_message_stop_event.rbi +30 -0
- data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_redacted_thinking_block.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_redacted_thinking_block_param.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +34 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +50 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +78 -0
- data/rbi/anthropic/models/beta/beta_signature_delta.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_stop_reason.rbi +37 -0
- data/rbi/anthropic/models/beta/beta_text_block.rbi +78 -0
- data/rbi/anthropic/models/beta/beta_text_block_param.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_text_citation.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_text_citation_param.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_text_delta.rbi +30 -0
- data/rbi/anthropic/models/beta/beta_thinking_block.rbi +44 -0
- data/rbi/anthropic/models/beta/beta_thinking_block_param.rbi +44 -0
- data/rbi/anthropic/models/beta/beta_thinking_config_disabled.rbi +30 -0
- data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +56 -0
- data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +38 -0
- data/rbi/anthropic/models/beta/beta_thinking_delta.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_tool.rbi +165 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_choice.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_tool_choice_any.rbi +56 -0
- data/rbi/anthropic/models/beta/beta_tool_choice_auto.rbi +56 -0
- data/rbi/anthropic/models/beta/beta_tool_choice_none.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_tool_choice_tool.rbi +68 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +96 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +96 -0
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +152 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +50 -0
- data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +78 -0
- data/rbi/anthropic/models/beta/beta_url_image_source.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_url_pdf_source.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_usage.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_web_search_result_block.rbi +66 -0
- data/rbi/anthropic/models/beta/beta_web_search_result_block_param.rbi +66 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +201 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_request_error.rbi +100 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block.rbi +59 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_content.rbi +40 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param.rbi +89 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbi +40 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_error.rbi +100 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +649 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +748 -0
- data/rbi/anthropic/models/beta/messages/batch_cancel_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +897 -0
- data/rbi/anthropic/models/beta/messages/batch_delete_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_list_params.rbi +106 -0
- data/rbi/anthropic/models/beta/messages/batch_results_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_retrieve_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +44 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch.rbi +214 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +30 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +45 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +30 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +77 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_request_counts.rbi +92 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_result.rbi +38 -0
- data/rbi/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +45 -0
- data/rbi/anthropic/models/beta/model_list_params.rbi +103 -0
- data/rbi/anthropic/models/beta/model_retrieve_params.rbi +62 -0
- data/rbi/anthropic/models/beta_api_error.rbi +26 -0
- data/rbi/anthropic/models/beta_authentication_error.rbi +29 -0
- data/rbi/anthropic/models/beta_billing_error.rbi +26 -0
- data/rbi/anthropic/models/beta_error.rbi +28 -0
- data/rbi/anthropic/models/beta_error_response.rbi +46 -0
- data/rbi/anthropic/models/beta_gateway_timeout_error.rbi +29 -0
- data/rbi/anthropic/models/beta_invalid_request_error.rbi +29 -0
- data/rbi/anthropic/models/beta_not_found_error.rbi +26 -0
- data/rbi/anthropic/models/beta_overloaded_error.rbi +26 -0
- data/rbi/anthropic/models/beta_permission_error.rbi +26 -0
- data/rbi/anthropic/models/beta_rate_limit_error.rbi +26 -0
- data/rbi/anthropic/models/billing_error.rbi +26 -0
- data/rbi/anthropic/models/cache_control_ephemeral.rbi +23 -0
- data/rbi/anthropic/models/citation_char_location.rbi +65 -0
- data/rbi/anthropic/models/citation_char_location_param.rbi +68 -0
- data/rbi/anthropic/models/citation_content_block_location.rbi +68 -0
- data/rbi/anthropic/models/citation_content_block_location_param.rbi +68 -0
- data/rbi/anthropic/models/citation_page_location.rbi +65 -0
- data/rbi/anthropic/models/citation_page_location_param.rbi +68 -0
- data/rbi/anthropic/models/citation_web_search_result_location_param.rbi +62 -0
- data/rbi/anthropic/models/citations_config_param.rbi +26 -0
- data/rbi/anthropic/models/citations_delta.rbi +66 -0
- data/rbi/anthropic/models/citations_web_search_result_location.rbi +62 -0
- data/rbi/anthropic/models/completion.rbi +93 -0
- data/rbi/anthropic/models/completion_create_params.rbi +217 -0
- data/rbi/anthropic/models/content_block.rbi +25 -0
- data/rbi/anthropic/models/content_block_param.rbi +28 -0
- data/rbi/anthropic/models/content_block_source.rbi +66 -0
- data/rbi/anthropic/models/content_block_source_content.rbi +22 -0
- data/rbi/anthropic/models/document_block_param.rbi +120 -0
- data/rbi/anthropic/models/error_object.rbi +28 -0
- data/rbi/anthropic/models/error_response.rbi +46 -0
- data/rbi/anthropic/models/gateway_timeout_error.rbi +26 -0
- data/rbi/anthropic/models/image_block_param.rbi +80 -0
- data/rbi/anthropic/models/input_json_delta.rbi +28 -0
- data/rbi/anthropic/models/invalid_request_error.rbi +26 -0
- data/rbi/anthropic/models/message.rbi +236 -0
- data/rbi/anthropic/models/message_count_tokens_params.rbi +571 -0
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +25 -0
- data/rbi/anthropic/models/message_create_params.rbi +697 -0
- data/rbi/anthropic/models/message_delta_usage.rbi +76 -0
- data/rbi/anthropic/models/message_param.rbi +81 -0
- data/rbi/anthropic/models/message_tokens_count.rbi +29 -0
- data/rbi/anthropic/models/messages/batch_cancel_params.rbi +32 -0
- data/rbi/anthropic/models/messages/batch_create_params.rbi +843 -0
- data/rbi/anthropic/models/messages/batch_delete_params.rbi +32 -0
- data/rbi/anthropic/models/messages/batch_list_params.rbi +81 -0
- data/rbi/anthropic/models/messages/batch_results_params.rbi +32 -0
- data/rbi/anthropic/models/messages/batch_retrieve_params.rbi +32 -0
- data/rbi/anthropic/models/messages/deleted_message_batch.rbi +42 -0
- data/rbi/anthropic/models/messages/message_batch.rbi +208 -0
- data/rbi/anthropic/models/messages/message_batch_canceled_result.rbi +30 -0
- data/rbi/anthropic/models/messages/message_batch_errored_result.rbi +42 -0
- data/rbi/anthropic/models/messages/message_batch_expired_result.rbi +30 -0
- data/rbi/anthropic/models/messages/message_batch_individual_response.rbi +74 -0
- data/rbi/anthropic/models/messages/message_batch_request_counts.rbi +92 -0
- data/rbi/anthropic/models/messages/message_batch_result.rbi +36 -0
- data/rbi/anthropic/models/messages/message_batch_succeeded_result.rbi +40 -0
- data/rbi/anthropic/models/metadata.rbi +35 -0
- data/rbi/anthropic/models/model.rbi +68 -0
- data/rbi/anthropic/models/model_info.rbi +62 -0
- data/rbi/anthropic/models/model_list_params.rbi +95 -0
- data/rbi/anthropic/models/model_retrieve_params.rbi +54 -0
- data/rbi/anthropic/models/not_found_error.rbi +26 -0
- data/rbi/anthropic/models/overloaded_error.rbi +26 -0
- data/rbi/anthropic/models/permission_error.rbi +26 -0
- data/rbi/anthropic/models/plain_text_source.rbi +35 -0
- data/rbi/anthropic/models/rate_limit_error.rbi +26 -0
- data/rbi/anthropic/models/raw_content_block_delta.rbi +26 -0
- data/rbi/anthropic/models/raw_content_block_delta_event.rbi +53 -0
- data/rbi/anthropic/models/raw_content_block_start_event.rbi +83 -0
- data/rbi/anthropic/models/raw_content_block_stop_event.rbi +29 -0
- data/rbi/anthropic/models/raw_message_delta_event.rbi +119 -0
- data/rbi/anthropic/models/raw_message_start_event.rbi +33 -0
- data/rbi/anthropic/models/raw_message_stop_event.rbi +23 -0
- data/rbi/anthropic/models/raw_message_stream_event.rbi +27 -0
- data/rbi/anthropic/models/redacted_thinking_block.rbi +26 -0
- data/rbi/anthropic/models/redacted_thinking_block_param.rbi +29 -0
- data/rbi/anthropic/models/server_tool_usage.rbi +27 -0
- data/rbi/anthropic/models/server_tool_use_block.rbi +43 -0
- data/rbi/anthropic/models/server_tool_use_block_param.rbi +71 -0
- data/rbi/anthropic/models/signature_delta.rbi +26 -0
- data/rbi/anthropic/models/stop_reason.rbi +23 -0
- data/rbi/anthropic/models/text_block.rbi +67 -0
- data/rbi/anthropic/models/text_block_param.rbi +95 -0
- data/rbi/anthropic/models/text_citation.rbi +23 -0
- data/rbi/anthropic/models/text_citation_param.rbi +23 -0
- data/rbi/anthropic/models/text_delta.rbi +26 -0
- data/rbi/anthropic/models/thinking_block.rbi +35 -0
- data/rbi/anthropic/models/thinking_block_param.rbi +35 -0
- data/rbi/anthropic/models/thinking_config_disabled.rbi +23 -0
- data/rbi/anthropic/models/thinking_config_enabled.rbi +49 -0
- data/rbi/anthropic/models/thinking_config_param.rbi +32 -0
- data/rbi/anthropic/models/thinking_delta.rbi +26 -0
- data/rbi/anthropic/models/tool.rbi +142 -0
- data/rbi/anthropic/models/tool_bash_20250124.rbi +62 -0
- data/rbi/anthropic/models/tool_choice.rbi +25 -0
- data/rbi/anthropic/models/tool_choice_any.rbi +49 -0
- data/rbi/anthropic/models/tool_choice_auto.rbi +49 -0
- data/rbi/anthropic/models/tool_choice_none.rbi +24 -0
- data/rbi/anthropic/models/tool_choice_tool.rbi +57 -0
- data/rbi/anthropic/models/tool_result_block_param.rbi +127 -0
- data/rbi/anthropic/models/tool_text_editor_20250124.rbi +62 -0
- data/rbi/anthropic/models/tool_union.rbi +23 -0
- data/rbi/anthropic/models/tool_use_block.rbi +43 -0
- data/rbi/anthropic/models/tool_use_block_param.rbi +68 -0
- data/rbi/anthropic/models/url_image_source.rbi +26 -0
- data/rbi/anthropic/models/url_pdf_source.rbi +26 -0
- data/rbi/anthropic/models/usage.rbi +74 -0
- data/rbi/anthropic/models/web_search_result_block.rbi +59 -0
- data/rbi/anthropic/models/web_search_result_block_param.rbi +62 -0
- data/rbi/anthropic/models/web_search_tool_20250305.rbi +181 -0
- data/rbi/anthropic/models/web_search_tool_request_error.rbi +88 -0
- data/rbi/anthropic/models/web_search_tool_result_block.rbi +50 -0
- data/rbi/anthropic/models/web_search_tool_result_block_content.rbi +31 -0
- data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +80 -0
- data/rbi/anthropic/models/web_search_tool_result_block_param_content.rbi +33 -0
- data/rbi/anthropic/models/web_search_tool_result_error.rbi +90 -0
- data/rbi/anthropic/models.rbi +229 -0
- data/rbi/anthropic/request_options.rbi +59 -0
- data/rbi/anthropic/resources/beta/messages/batches.rbi +186 -0
- data/rbi/anthropic/resources/beta/messages.rbi +830 -0
- data/rbi/anthropic/resources/beta/models.rbi +64 -0
- data/rbi/anthropic/resources/beta.rbi +18 -0
- data/rbi/anthropic/resources/completions.rbi +199 -0
- data/rbi/anthropic/resources/messages/batches.rbi +156 -0
- data/rbi/anthropic/resources/messages.rbi +806 -0
- data/rbi/anthropic/resources/models.rbi +62 -0
- data/rbi/anthropic/version.rbi +5 -0
- data/rbi/anthropic/vertex.rbi +5 -0
- data/sig/anthropic/bedrock.rbs +3 -0
- data/sig/anthropic/client.rbs +39 -0
- data/sig/anthropic/errors.rbs +101 -0
- data/sig/anthropic/file_part.rbs +21 -0
- data/sig/anthropic/helpers/bedrock/client.rbs +43 -0
- data/sig/anthropic/helpers/vertex/client.rbs +36 -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 +131 -0
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/anthropic/internal/type/array_of.rbs +48 -0
- data/sig/anthropic/internal/type/base_model.rbs +102 -0
- data/sig/anthropic/internal/type/base_page.rbs +24 -0
- data/sig/anthropic/internal/type/base_stream.rbs +33 -0
- data/sig/anthropic/internal/type/boolean.rbs +26 -0
- data/sig/anthropic/internal/type/converter.rbs +56 -0
- data/sig/anthropic/internal/type/enum.rbs +32 -0
- data/sig/anthropic/internal/type/file_input.rbs +25 -0
- data/sig/anthropic/internal/type/hash_of.rbs +48 -0
- data/sig/anthropic/internal/type/request_parameters.rbs +19 -0
- data/sig/anthropic/internal/type/union.rbs +52 -0
- data/sig/anthropic/internal/type/unknown.rbs +26 -0
- data/sig/anthropic/internal/util.rbs +185 -0
- data/sig/anthropic/internal.rbs +9 -0
- data/sig/anthropic/models/anthropic_beta.rbs +29 -0
- data/sig/anthropic/models/api_error_object.rbs +13 -0
- data/sig/anthropic/models/authentication_error.rbs +13 -0
- data/sig/anthropic/models/base64_image_source.rbs +38 -0
- data/sig/anthropic/models/base64_pdf_source.rbs +20 -0
- data/sig/anthropic/models/beta/beta_base64_image_source.rbs +42 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +56 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +24 -0
- data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +15 -0
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +40 -0
- data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +40 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +40 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +40 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +40 -0
- data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +40 -0
- data/sig/anthropic/models/beta/beta_citation_web_search_result_location_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_citations_config_param.rbs +17 -0
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +36 -0
- data/sig/anthropic/models/beta/beta_citations_web_search_result_location.rbs +36 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +21 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +24 -0
- data/sig/anthropic/models/beta/beta_content_block_source.rbs +36 -0
- data/sig/anthropic/models/beta/beta_content_block_source_content.rbs +17 -0
- data/sig/anthropic/models/beta/beta_image_block_param.rbs +38 -0
- data/sig/anthropic/models/beta/beta_input_json_delta.rbs +18 -0
- data/sig/anthropic/models/beta/beta_message.rbs +48 -0
- data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +36 -0
- data/sig/anthropic/models/beta/beta_message_param.rbs +46 -0
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +15 -0
- data/sig/anthropic/models/beta/beta_metadata.rbs +15 -0
- data/sig/anthropic/models/beta/beta_model_info.rbs +27 -0
- data/sig/anthropic/models/beta/beta_plain_text_source.rbs +24 -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 +28 -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 +18 -0
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +45 -0
- data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +21 -0
- data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +15 -0
- data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +21 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +18 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +18 -0
- data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +15 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +27 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_signature_delta.rbs +17 -0
- data/sig/anthropic/models/beta/beta_stop_reason.rbs +28 -0
- data/sig/anthropic/models/beta/beta_text_block.rbs +28 -0
- data/sig/anthropic/models/beta/beta_text_block_param.rbs +32 -0
- data/sig/anthropic/models/beta/beta_text_citation.rbs +19 -0
- data/sig/anthropic/models/beta/beta_text_citation_param.rbs +19 -0
- data/sig/anthropic/models/beta/beta_text_delta.rbs +17 -0
- data/sig/anthropic/models/beta/beta_thinking_block.rbs +24 -0
- data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +24 -0
- data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +15 -0
- data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +18 -0
- data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +17 -0
- data/sig/anthropic/models/beta/beta_thinking_delta.rbs +17 -0
- data/sig/anthropic/models/beta/beta_tool.rbs +58 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +28 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +28 -0
- data/sig/anthropic/models/beta/beta_tool_choice.rbs +19 -0
- data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +20 -0
- data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +20 -0
- data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +15 -0
- data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +26 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +40 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +40 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +64 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +28 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +28 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +23 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +27 -0
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_url_image_source.rbs +17 -0
- data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +17 -0
- data/sig/anthropic/models/beta/beta_usage.rbs +36 -0
- data/sig/anthropic/models/beta/beta_web_search_result_block.rbs +36 -0
- data/sig/anthropic/models/beta/beta_web_search_result_block_param.rbs +36 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +73 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_request_error.rbs +43 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block.rbs +28 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_content.rbs +19 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param.rbs +32 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbs +19 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_error.rbs +43 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +93 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +113 -0
- data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +27 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +152 -0
- data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +27 -0
- data/sig/anthropic/models/beta/messages/batch_list_params.rbs +47 -0
- data/sig/anthropic/models/beta/messages/batch_results_params.rbs +27 -0
- data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +27 -0
- data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +18 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +68 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +15 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +21 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +15 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +24 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +36 -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 +21 -0
- data/sig/anthropic/models/beta/model_list_params.rbs +45 -0
- data/sig/anthropic/models/beta/model_retrieve_params.rbs +25 -0
- data/sig/anthropic/models/beta_api_error.rbs +13 -0
- data/sig/anthropic/models/beta_authentication_error.rbs +14 -0
- data/sig/anthropic/models/beta_billing_error.rbs +13 -0
- data/sig/anthropic/models/beta_error.rbs +20 -0
- data/sig/anthropic/models/beta_error_response.rbs +17 -0
- data/sig/anthropic/models/beta_gateway_timeout_error.rbs +13 -0
- data/sig/anthropic/models/beta_invalid_request_error.rbs +14 -0
- data/sig/anthropic/models/beta_not_found_error.rbs +13 -0
- data/sig/anthropic/models/beta_overloaded_error.rbs +13 -0
- data/sig/anthropic/models/beta_permission_error.rbs +13 -0
- data/sig/anthropic/models/beta_rate_limit_error.rbs +13 -0
- data/sig/anthropic/models/billing_error.rbs +13 -0
- data/sig/anthropic/models/cache_control_ephemeral.rbs +11 -0
- data/sig/anthropic/models/citation_char_location.rbs +36 -0
- data/sig/anthropic/models/citation_char_location_param.rbs +36 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +36 -0
- data/sig/anthropic/models/citation_content_block_location_param.rbs +36 -0
- data/sig/anthropic/models/citation_page_location.rbs +36 -0
- data/sig/anthropic/models/citation_page_location_param.rbs +36 -0
- data/sig/anthropic/models/citation_web_search_result_location_param.rbs +32 -0
- data/sig/anthropic/models/citations_config_param.rbs +13 -0
- data/sig/anthropic/models/citations_delta.rbs +29 -0
- data/sig/anthropic/models/citations_web_search_result_location.rbs +32 -0
- data/sig/anthropic/models/completion.rbs +32 -0
- data/sig/anthropic/models/completion_create_params.rbs +67 -0
- data/sig/anthropic/models/content_block.rbs +17 -0
- data/sig/anthropic/models/content_block_param.rbs +20 -0
- data/sig/anthropic/models/content_block_source.rbs +28 -0
- data/sig/anthropic/models/content_block_source_content.rbs +12 -0
- data/sig/anthropic/models/document_block_param.rbs +52 -0
- data/sig/anthropic/models/error_object.rbs +20 -0
- data/sig/anthropic/models/error_response.rbs +17 -0
- data/sig/anthropic/models/gateway_timeout_error.rbs +13 -0
- data/sig/anthropic/models/image_block_param.rbs +32 -0
- data/sig/anthropic/models/input_json_delta.rbs +13 -0
- data/sig/anthropic/models/invalid_request_error.rbs +14 -0
- data/sig/anthropic/models/message.rbs +44 -0
- data/sig/anthropic/models/message_count_tokens_params.rbs +67 -0
- data/sig/anthropic/models/message_count_tokens_tool.rbs +15 -0
- data/sig/anthropic/models/message_create_params.rbs +101 -0
- data/sig/anthropic/models/message_delta_usage.rbs +32 -0
- data/sig/anthropic/models/message_param.rbs +41 -0
- data/sig/anthropic/models/message_tokens_count.rbs +11 -0
- data/sig/anthropic/models/messages/batch_cancel_params.rbs +15 -0
- data/sig/anthropic/models/messages/batch_create_params.rbs +137 -0
- data/sig/anthropic/models/messages/batch_delete_params.rbs +15 -0
- data/sig/anthropic/models/messages/batch_list_params.rbs +33 -0
- data/sig/anthropic/models/messages/batch_results_params.rbs +15 -0
- data/sig/anthropic/models/messages/batch_retrieve_params.rbs +15 -0
- data/sig/anthropic/models/messages/deleted_message_batch.rbs +15 -0
- data/sig/anthropic/models/messages/message_batch.rbs +68 -0
- data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +15 -0
- data/sig/anthropic/models/messages/message_batch_errored_result.rbs +21 -0
- data/sig/anthropic/models/messages/message_batch_expired_result.rbs +15 -0
- data/sig/anthropic/models/messages/message_batch_individual_response.rbs +24 -0
- data/sig/anthropic/models/messages/message_batch_request_counts.rbs +36 -0
- data/sig/anthropic/models/messages/message_batch_result.rbs +19 -0
- data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +18 -0
- data/sig/anthropic/models/metadata.rbs +11 -0
- data/sig/anthropic/models/model.rbs +61 -0
- data/sig/anthropic/models/model_info.rbs +23 -0
- data/sig/anthropic/models/model_list_params.rbs +43 -0
- data/sig/anthropic/models/model_retrieve_params.rbs +23 -0
- data/sig/anthropic/models/not_found_error.rbs +13 -0
- data/sig/anthropic/models/overloaded_error.rbs +13 -0
- data/sig/anthropic/models/permission_error.rbs +13 -0
- data/sig/anthropic/models/plain_text_source.rbs +20 -0
- data/sig/anthropic/models/rate_limit_error.rbs +13 -0
- data/sig/anthropic/models/raw_content_block_delta.rbs +16 -0
- data/sig/anthropic/models/raw_content_block_delta_event.rbs +24 -0
- data/sig/anthropic/models/raw_content_block_start_event.rbs +38 -0
- data/sig/anthropic/models/raw_content_block_stop_event.rbs +14 -0
- data/sig/anthropic/models/raw_message_delta_event.rbs +38 -0
- data/sig/anthropic/models/raw_message_start_event.rbs +17 -0
- data/sig/anthropic/models/raw_message_stop_event.rbs +11 -0
- data/sig/anthropic/models/raw_message_stream_event.rbs +17 -0
- data/sig/anthropic/models/redacted_thinking_block.rbs +13 -0
- data/sig/anthropic/models/redacted_thinking_block_param.rbs +14 -0
- data/sig/anthropic/models/server_tool_usage.rbs +11 -0
- data/sig/anthropic/models/server_tool_use_block.rbs +23 -0
- data/sig/anthropic/models/server_tool_use_block_param.rbs +32 -0
- data/sig/anthropic/models/signature_delta.rbs +13 -0
- data/sig/anthropic/models/stop_reason.rbs +24 -0
- data/sig/anthropic/models/text_block.rbs +24 -0
- data/sig/anthropic/models/text_block_param.rbs +28 -0
- data/sig/anthropic/models/text_citation.rbs +15 -0
- data/sig/anthropic/models/text_citation_param.rbs +15 -0
- data/sig/anthropic/models/text_delta.rbs +13 -0
- data/sig/anthropic/models/thinking_block.rbs +20 -0
- data/sig/anthropic/models/thinking_block_param.rbs +20 -0
- data/sig/anthropic/models/thinking_config_disabled.rbs +11 -0
- data/sig/anthropic/models/thinking_config_enabled.rbs +13 -0
- data/sig/anthropic/models/thinking_config_param.rbs +12 -0
- data/sig/anthropic/models/thinking_delta.rbs +13 -0
- data/sig/anthropic/models/tool.rbs +54 -0
- data/sig/anthropic/models/tool_bash_20250124.rbs +24 -0
- data/sig/anthropic/models/tool_choice.rbs +15 -0
- data/sig/anthropic/models/tool_choice_any.rbs +15 -0
- data/sig/anthropic/models/tool_choice_auto.rbs +15 -0
- data/sig/anthropic/models/tool_choice_none.rbs +11 -0
- data/sig/anthropic/models/tool_choice_tool.rbs +22 -0
- data/sig/anthropic/models/tool_result_block_param.rbs +57 -0
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +24 -0
- data/sig/anthropic/models/tool_union.rbs +15 -0
- data/sig/anthropic/models/tool_use_block.rbs +23 -0
- data/sig/anthropic/models/tool_use_block_param.rbs +32 -0
- data/sig/anthropic/models/url_image_source.rbs +13 -0
- data/sig/anthropic/models/url_pdf_source.rbs +13 -0
- data/sig/anthropic/models/usage.rbs +32 -0
- data/sig/anthropic/models/web_search_result_block.rbs +32 -0
- data/sig/anthropic/models/web_search_result_block_param.rbs +32 -0
- data/sig/anthropic/models/web_search_tool_20250305.rbs +69 -0
- data/sig/anthropic/models/web_search_tool_request_error.rbs +39 -0
- data/sig/anthropic/models/web_search_tool_result_block.rbs +24 -0
- data/sig/anthropic/models/web_search_tool_result_block_content.rbs +15 -0
- data/sig/anthropic/models/web_search_tool_result_block_param.rbs +28 -0
- data/sig/anthropic/models/web_search_tool_result_block_param_content.rbs +15 -0
- data/sig/anthropic/models/web_search_tool_result_error.rbs +39 -0
- data/sig/anthropic/models.rbs +221 -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 +23 -0
- data/sig/anthropic/resources/beta.rbs +11 -0
- data/sig/anthropic/resources/completions.rbs +33 -0
- data/sig/anthropic/resources/messages/batches.rbs +41 -0
- data/sig/anthropic/resources/messages.rbs +51 -0
- data/sig/anthropic/resources/models.rbs +21 -0
- data/sig/anthropic/version.rbs +3 -0
- data/sig/anthropic/vertex.rbs +3 -0
- metadata +799 -77
- data/.circleci/config.yml +0 -45
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/dependabot.yml +0 -15
- data/.gitignore +0 -16
- data/.rspec +0 -3
- data/.rubocop.yml +0 -30
- data/CODE_OF_CONDUCT.md +0 -74
- data/CONTRIBUTING.md +0 -3
- data/Gemfile +0 -13
- data/Gemfile.lock +0 -88
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -19
- data/anthropic.gemspec +0 -31
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/anthropic/compatibility.rb +0 -10
- data/lib/anthropic/http.rb +0 -200
- data/lib/anthropic/http_headers.rb +0 -38
- data/lib/anthropic/messages/batches.rb +0 -112
- data/lib/anthropic/messages/client.rb +0 -13
- data/lib/ruby/anthropic.rb +0 -2
- data/pull_request_template.md +0 -5
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class Usage < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute cache_creation_input_tokens
|
7
|
+
# The number of input tokens used to create the cache entry.
|
8
|
+
#
|
9
|
+
# @return [Integer, nil]
|
10
|
+
required :cache_creation_input_tokens, Integer, nil?: true
|
11
|
+
|
12
|
+
# @!attribute cache_read_input_tokens
|
13
|
+
# The number of input tokens read from the cache.
|
14
|
+
#
|
15
|
+
# @return [Integer, nil]
|
16
|
+
required :cache_read_input_tokens, Integer, nil?: true
|
17
|
+
|
18
|
+
# @!attribute input_tokens
|
19
|
+
# The number of input tokens which were used.
|
20
|
+
#
|
21
|
+
# @return [Integer]
|
22
|
+
required :input_tokens, Integer
|
23
|
+
|
24
|
+
# @!attribute output_tokens
|
25
|
+
# The number of output tokens which were used.
|
26
|
+
#
|
27
|
+
# @return [Integer]
|
28
|
+
required :output_tokens, Integer
|
29
|
+
|
30
|
+
# @!attribute server_tool_use
|
31
|
+
# The number of server tool requests.
|
32
|
+
#
|
33
|
+
# @return [Anthropic::ServerToolUsage, nil]
|
34
|
+
required :server_tool_use, -> { Anthropic::ServerToolUsage }, nil?: true
|
35
|
+
|
36
|
+
# @!method initialize(cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, output_tokens:, server_tool_use:)
|
37
|
+
# @param cache_creation_input_tokens [Integer, nil] The number of input tokens used to create the cache entry.
|
38
|
+
#
|
39
|
+
# @param cache_read_input_tokens [Integer, nil] The number of input tokens read from the cache.
|
40
|
+
#
|
41
|
+
# @param input_tokens [Integer] The number of input tokens which were used.
|
42
|
+
#
|
43
|
+
# @param output_tokens [Integer] The number of output tokens which were used.
|
44
|
+
#
|
45
|
+
# @param server_tool_use [Anthropic::ServerToolUsage, nil] The number of server tool requests.
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchResultBlock < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute encrypted_content
|
7
|
+
#
|
8
|
+
# @return [String]
|
9
|
+
required :encrypted_content, String
|
10
|
+
|
11
|
+
# @!attribute page_age
|
12
|
+
#
|
13
|
+
# @return [String, nil]
|
14
|
+
required :page_age, String, nil?: true
|
15
|
+
|
16
|
+
# @!attribute title
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
required :title, String
|
20
|
+
|
21
|
+
# @!attribute type
|
22
|
+
#
|
23
|
+
# @return [Symbol, :web_search_result]
|
24
|
+
required :type, const: :web_search_result
|
25
|
+
|
26
|
+
# @!attribute url
|
27
|
+
#
|
28
|
+
# @return [String]
|
29
|
+
required :url, String
|
30
|
+
|
31
|
+
# @!method initialize(encrypted_content:, page_age:, title:, url:, type: :web_search_result)
|
32
|
+
# @param encrypted_content [String]
|
33
|
+
# @param page_age [String, nil]
|
34
|
+
# @param title [String]
|
35
|
+
# @param url [String]
|
36
|
+
# @param type [Symbol, :web_search_result]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchResultBlockParam < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute encrypted_content
|
7
|
+
#
|
8
|
+
# @return [String]
|
9
|
+
required :encrypted_content, String
|
10
|
+
|
11
|
+
# @!attribute title
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
required :title, String
|
15
|
+
|
16
|
+
# @!attribute type
|
17
|
+
#
|
18
|
+
# @return [Symbol, :web_search_result]
|
19
|
+
required :type, const: :web_search_result
|
20
|
+
|
21
|
+
# @!attribute url
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
required :url, String
|
25
|
+
|
26
|
+
# @!attribute page_age
|
27
|
+
#
|
28
|
+
# @return [String, nil]
|
29
|
+
optional :page_age, String, nil?: true
|
30
|
+
|
31
|
+
# @!method initialize(encrypted_content:, title:, url:, page_age: nil, type: :web_search_result)
|
32
|
+
# @param encrypted_content [String]
|
33
|
+
# @param title [String]
|
34
|
+
# @param url [String]
|
35
|
+
# @param page_age [String, nil]
|
36
|
+
# @param type [Symbol, :web_search_result]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchTool20250305 < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute name
|
7
|
+
# Name of the tool.
|
8
|
+
#
|
9
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
10
|
+
#
|
11
|
+
# @return [Symbol, :web_search]
|
12
|
+
required :name, const: :web_search
|
13
|
+
|
14
|
+
# @!attribute type
|
15
|
+
#
|
16
|
+
# @return [Symbol, :web_search_20250305]
|
17
|
+
required :type, const: :web_search_20250305
|
18
|
+
|
19
|
+
# @!attribute allowed_domains
|
20
|
+
# If provided, only these domains will be included in results. Cannot be used
|
21
|
+
# alongside `blocked_domains`.
|
22
|
+
#
|
23
|
+
# @return [Array<String>, nil]
|
24
|
+
optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
25
|
+
|
26
|
+
# @!attribute blocked_domains
|
27
|
+
# If provided, these domains will never appear in results. Cannot be used
|
28
|
+
# alongside `allowed_domains`.
|
29
|
+
#
|
30
|
+
# @return [Array<String>, nil]
|
31
|
+
optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
32
|
+
|
33
|
+
# @!attribute cache_control
|
34
|
+
# Create a cache control breakpoint at this content block.
|
35
|
+
#
|
36
|
+
# @return [Anthropic::CacheControlEphemeral, nil]
|
37
|
+
optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
|
38
|
+
|
39
|
+
# @!attribute max_uses
|
40
|
+
# Maximum number of times the tool can be used in the API request.
|
41
|
+
#
|
42
|
+
# @return [Integer, nil]
|
43
|
+
optional :max_uses, Integer, nil?: true
|
44
|
+
|
45
|
+
# @!attribute user_location
|
46
|
+
# Parameters for the user's location. Used to provide more relevant search
|
47
|
+
# results.
|
48
|
+
#
|
49
|
+
# @return [Anthropic::WebSearchTool20250305::UserLocation, nil]
|
50
|
+
optional :user_location, -> { Anthropic::WebSearchTool20250305::UserLocation }, nil?: true
|
51
|
+
|
52
|
+
# @!method initialize(allowed_domains: nil, blocked_domains: nil, cache_control: nil, max_uses: nil, user_location: nil, name: :web_search, type: :web_search_20250305)
|
53
|
+
# Some parameter documentations has been truncated, see
|
54
|
+
# {Anthropic::WebSearchTool20250305} for more details.
|
55
|
+
#
|
56
|
+
# @param allowed_domains [Array<String>, nil] If provided, only these domains will be included in results. Cannot be used alon
|
57
|
+
#
|
58
|
+
# @param blocked_domains [Array<String>, nil] If provided, these domains will never appear in results. Cannot be used alongsid
|
59
|
+
#
|
60
|
+
# @param cache_control [Anthropic::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
61
|
+
#
|
62
|
+
# @param max_uses [Integer, nil] Maximum number of times the tool can be used in the API request.
|
63
|
+
#
|
64
|
+
# @param user_location [Anthropic::WebSearchTool20250305::UserLocation, nil] Parameters for the user's location. Used to provide more relevant search results
|
65
|
+
#
|
66
|
+
# @param name [Symbol, :web_search] Name of the tool.
|
67
|
+
#
|
68
|
+
# @param type [Symbol, :web_search_20250305]
|
69
|
+
|
70
|
+
# @see Anthropic::WebSearchTool20250305#user_location
|
71
|
+
class UserLocation < Anthropic::Internal::Type::BaseModel
|
72
|
+
# @!attribute type
|
73
|
+
#
|
74
|
+
# @return [Symbol, :approximate]
|
75
|
+
required :type, const: :approximate
|
76
|
+
|
77
|
+
# @!attribute city
|
78
|
+
# The city of the user.
|
79
|
+
#
|
80
|
+
# @return [String, nil]
|
81
|
+
optional :city, String, nil?: true
|
82
|
+
|
83
|
+
# @!attribute country
|
84
|
+
# The two letter
|
85
|
+
# [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
|
86
|
+
# user.
|
87
|
+
#
|
88
|
+
# @return [String, nil]
|
89
|
+
optional :country, String, nil?: true
|
90
|
+
|
91
|
+
# @!attribute region
|
92
|
+
# The region of the user.
|
93
|
+
#
|
94
|
+
# @return [String, nil]
|
95
|
+
optional :region, String, nil?: true
|
96
|
+
|
97
|
+
# @!attribute timezone
|
98
|
+
# The [IANA timezone](https://nodatime.org/TimeZones) of the user.
|
99
|
+
#
|
100
|
+
# @return [String, nil]
|
101
|
+
optional :timezone, String, nil?: true
|
102
|
+
|
103
|
+
# @!method initialize(city: nil, country: nil, region: nil, timezone: nil, type: :approximate)
|
104
|
+
# Some parameter documentations has been truncated, see
|
105
|
+
# {Anthropic::WebSearchTool20250305::UserLocation} for more details.
|
106
|
+
#
|
107
|
+
# Parameters for the user's location. Used to provide more relevant search
|
108
|
+
# results.
|
109
|
+
#
|
110
|
+
# @param city [String, nil] The city of the user.
|
111
|
+
#
|
112
|
+
# @param country [String, nil] The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha
|
113
|
+
#
|
114
|
+
# @param region [String, nil] The region of the user.
|
115
|
+
#
|
116
|
+
# @param timezone [String, nil] The [IANA timezone](https://nodatime.org/TimeZones) of the user.
|
117
|
+
#
|
118
|
+
# @param type [Symbol, :approximate]
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchToolRequestError < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute error_code
|
7
|
+
#
|
8
|
+
# @return [Symbol, Anthropic::WebSearchToolRequestError::ErrorCode]
|
9
|
+
required :error_code, enum: -> { Anthropic::WebSearchToolRequestError::ErrorCode }
|
10
|
+
|
11
|
+
# @!attribute type
|
12
|
+
#
|
13
|
+
# @return [Symbol, :web_search_tool_result_error]
|
14
|
+
required :type, const: :web_search_tool_result_error
|
15
|
+
|
16
|
+
# @!method initialize(error_code:, type: :web_search_tool_result_error)
|
17
|
+
# @param error_code [Symbol, Anthropic::WebSearchToolRequestError::ErrorCode]
|
18
|
+
# @param type [Symbol, :web_search_tool_result_error]
|
19
|
+
|
20
|
+
# @see Anthropic::WebSearchToolRequestError#error_code
|
21
|
+
module ErrorCode
|
22
|
+
extend Anthropic::Internal::Type::Enum
|
23
|
+
|
24
|
+
INVALID_TOOL_INPUT = :invalid_tool_input
|
25
|
+
UNAVAILABLE = :unavailable
|
26
|
+
MAX_USES_EXCEEDED = :max_uses_exceeded
|
27
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
28
|
+
QUERY_TOO_LONG = :query_too_long
|
29
|
+
|
30
|
+
# @!method self.values
|
31
|
+
# @return [Array<Symbol>]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchToolResultBlock < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute content
|
7
|
+
#
|
8
|
+
# @return [Anthropic::WebSearchToolResultError, Array<Anthropic::WebSearchResultBlock>]
|
9
|
+
required :content, union: -> { Anthropic::WebSearchToolResultBlockContent }
|
10
|
+
|
11
|
+
# @!attribute tool_use_id
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
required :tool_use_id, String
|
15
|
+
|
16
|
+
# @!attribute type
|
17
|
+
#
|
18
|
+
# @return [Symbol, :web_search_tool_result]
|
19
|
+
required :type, const: :web_search_tool_result
|
20
|
+
|
21
|
+
# @!method initialize(content:, tool_use_id:, type: :web_search_tool_result)
|
22
|
+
# @param content [Anthropic::WebSearchToolResultError, Array<Anthropic::WebSearchResultBlock>]
|
23
|
+
# @param tool_use_id [String]
|
24
|
+
# @param type [Symbol, :web_search_tool_result]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module WebSearchToolResultBlockContent
|
6
|
+
extend Anthropic::Internal::Type::Union
|
7
|
+
|
8
|
+
variant -> { Anthropic::WebSearchToolResultError }
|
9
|
+
|
10
|
+
variant -> { Anthropic::WebSearchToolResultBlockContent::WebSearchResultBlockArray }
|
11
|
+
|
12
|
+
# @!method self.variants
|
13
|
+
# @return [Array(Anthropic::WebSearchToolResultError, Array<Anthropic::WebSearchResultBlock>)]
|
14
|
+
|
15
|
+
# @type [Anthropic::Internal::Type::Converter]
|
16
|
+
WebSearchResultBlockArray = Anthropic::Internal::Type::ArrayOf[-> { Anthropic::WebSearchResultBlock }]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute content
|
7
|
+
#
|
8
|
+
# @return [Array<Anthropic::WebSearchResultBlockParam>, Anthropic::WebSearchToolRequestError]
|
9
|
+
required :content, union: -> { Anthropic::WebSearchToolResultBlockParamContent }
|
10
|
+
|
11
|
+
# @!attribute tool_use_id
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
required :tool_use_id, String
|
15
|
+
|
16
|
+
# @!attribute type
|
17
|
+
#
|
18
|
+
# @return [Symbol, :web_search_tool_result]
|
19
|
+
required :type, const: :web_search_tool_result
|
20
|
+
|
21
|
+
# @!attribute cache_control
|
22
|
+
# Create a cache control breakpoint at this content block.
|
23
|
+
#
|
24
|
+
# @return [Anthropic::CacheControlEphemeral, nil]
|
25
|
+
optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
|
26
|
+
|
27
|
+
# @!method initialize(content:, tool_use_id:, cache_control: nil, type: :web_search_tool_result)
|
28
|
+
# @param content [Array<Anthropic::WebSearchResultBlockParam>, Anthropic::WebSearchToolRequestError]
|
29
|
+
#
|
30
|
+
# @param tool_use_id [String]
|
31
|
+
#
|
32
|
+
# @param cache_control [Anthropic::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
33
|
+
#
|
34
|
+
# @param type [Symbol, :web_search_tool_result]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module WebSearchToolResultBlockParamContent
|
6
|
+
extend Anthropic::Internal::Type::Union
|
7
|
+
|
8
|
+
variant -> { Anthropic::WebSearchToolResultBlockParamContent::WebSearchResultBlockParamArray }
|
9
|
+
|
10
|
+
variant -> { Anthropic::WebSearchToolRequestError }
|
11
|
+
|
12
|
+
# @!method self.variants
|
13
|
+
# @return [Array(Array<Anthropic::WebSearchResultBlockParam>, Anthropic::WebSearchToolRequestError)]
|
14
|
+
|
15
|
+
# @type [Anthropic::Internal::Type::Converter]
|
16
|
+
WebSearchResultBlockParamArray =
|
17
|
+
Anthropic::Internal::Type::ArrayOf[-> { Anthropic::WebSearchResultBlockParam }]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class WebSearchToolResultError < Anthropic::Internal::Type::BaseModel
|
6
|
+
# @!attribute error_code
|
7
|
+
#
|
8
|
+
# @return [Symbol, Anthropic::WebSearchToolResultError::ErrorCode]
|
9
|
+
required :error_code, enum: -> { Anthropic::WebSearchToolResultError::ErrorCode }
|
10
|
+
|
11
|
+
# @!attribute type
|
12
|
+
#
|
13
|
+
# @return [Symbol, :web_search_tool_result_error]
|
14
|
+
required :type, const: :web_search_tool_result_error
|
15
|
+
|
16
|
+
# @!method initialize(error_code:, type: :web_search_tool_result_error)
|
17
|
+
# @param error_code [Symbol, Anthropic::WebSearchToolResultError::ErrorCode]
|
18
|
+
# @param type [Symbol, :web_search_tool_result_error]
|
19
|
+
|
20
|
+
# @see Anthropic::WebSearchToolResultError#error_code
|
21
|
+
module ErrorCode
|
22
|
+
extend Anthropic::Internal::Type::Enum
|
23
|
+
|
24
|
+
INVALID_TOOL_INPUT = :invalid_tool_input
|
25
|
+
UNAVAILABLE = :unavailable
|
26
|
+
MAX_USES_EXCEEDED = :max_uses_exceeded
|
27
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
28
|
+
QUERY_TOO_LONG = :query_too_long
|
29
|
+
|
30
|
+
# @!method self.values
|
31
|
+
# @return [Array<Symbol>]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,261 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
[Anthropic::Internal::Type::BaseModel, *Anthropic::Internal::Type::BaseModel.subclasses].each do |cls|
|
5
|
+
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Anthropic::Internal::AnyHash) } }
|
6
|
+
end
|
7
|
+
|
8
|
+
Anthropic::Internal::Util.walk_namespaces(Anthropic::Models).each do |mod|
|
9
|
+
case mod
|
10
|
+
in Anthropic::Internal::Type::Enum | Anthropic::Internal::Type::Union
|
11
|
+
mod.constants.each do |name|
|
12
|
+
case mod.const_get(name)
|
13
|
+
in true | false
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
16
|
+
in Integer
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
19
|
+
in Float
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
22
|
+
in Symbol
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
25
|
+
else
|
26
|
+
end
|
27
|
+
end
|
28
|
+
else
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Anthropic::Internal::Util.walk_namespaces(Anthropic::Models)
|
33
|
+
.lazy
|
34
|
+
.grep(Anthropic::Internal::Type::Union)
|
35
|
+
.each do |mod|
|
36
|
+
const = :Variants
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
38
|
+
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
40
|
+
end
|
41
|
+
|
42
|
+
AnthropicBeta = Anthropic::Models::AnthropicBeta
|
43
|
+
|
44
|
+
APIErrorObject = Anthropic::Models::APIErrorObject
|
45
|
+
|
46
|
+
AuthenticationError = Anthropic::Models::AuthenticationError
|
47
|
+
|
48
|
+
Base64ImageSource = Anthropic::Models::Base64ImageSource
|
49
|
+
|
50
|
+
Base64PDFSource = Anthropic::Models::Base64PDFSource
|
51
|
+
|
52
|
+
Beta = Anthropic::Models::Beta
|
53
|
+
|
54
|
+
BetaAPIError = Anthropic::Models::BetaAPIError
|
55
|
+
|
56
|
+
BetaAuthenticationError = Anthropic::Models::BetaAuthenticationError
|
57
|
+
|
58
|
+
BetaBillingError = Anthropic::Models::BetaBillingError
|
59
|
+
|
60
|
+
BetaError = Anthropic::Models::BetaError
|
61
|
+
|
62
|
+
BetaErrorResponse = Anthropic::Models::BetaErrorResponse
|
63
|
+
|
64
|
+
BetaGatewayTimeoutError = Anthropic::Models::BetaGatewayTimeoutError
|
65
|
+
|
66
|
+
BetaInvalidRequestError = Anthropic::Models::BetaInvalidRequestError
|
67
|
+
|
68
|
+
BetaNotFoundError = Anthropic::Models::BetaNotFoundError
|
69
|
+
|
70
|
+
BetaOverloadedError = Anthropic::Models::BetaOverloadedError
|
71
|
+
|
72
|
+
BetaPermissionError = Anthropic::Models::BetaPermissionError
|
73
|
+
|
74
|
+
BetaRateLimitError = Anthropic::Models::BetaRateLimitError
|
75
|
+
|
76
|
+
BillingError = Anthropic::Models::BillingError
|
77
|
+
|
78
|
+
CacheControlEphemeral = Anthropic::Models::CacheControlEphemeral
|
79
|
+
|
80
|
+
CitationCharLocation = Anthropic::Models::CitationCharLocation
|
81
|
+
|
82
|
+
CitationCharLocationParam = Anthropic::Models::CitationCharLocationParam
|
83
|
+
|
84
|
+
CitationContentBlockLocation = Anthropic::Models::CitationContentBlockLocation
|
85
|
+
|
86
|
+
CitationContentBlockLocationParam = Anthropic::Models::CitationContentBlockLocationParam
|
87
|
+
|
88
|
+
CitationPageLocation = Anthropic::Models::CitationPageLocation
|
89
|
+
|
90
|
+
CitationPageLocationParam = Anthropic::Models::CitationPageLocationParam
|
91
|
+
|
92
|
+
CitationsConfigParam = Anthropic::Models::CitationsConfigParam
|
93
|
+
|
94
|
+
CitationsDelta = Anthropic::Models::CitationsDelta
|
95
|
+
|
96
|
+
CitationsWebSearchResultLocation = Anthropic::Models::CitationsWebSearchResultLocation
|
97
|
+
|
98
|
+
CitationWebSearchResultLocationParam = Anthropic::Models::CitationWebSearchResultLocationParam
|
99
|
+
|
100
|
+
Completion = Anthropic::Models::Completion
|
101
|
+
|
102
|
+
CompletionCreateParams = Anthropic::Models::CompletionCreateParams
|
103
|
+
|
104
|
+
ContentBlock = Anthropic::Models::ContentBlock
|
105
|
+
|
106
|
+
ContentBlockParam = Anthropic::Models::ContentBlockParam
|
107
|
+
|
108
|
+
ContentBlockSource = Anthropic::Models::ContentBlockSource
|
109
|
+
|
110
|
+
ContentBlockSourceContent = Anthropic::Models::ContentBlockSourceContent
|
111
|
+
|
112
|
+
DocumentBlockParam = Anthropic::Models::DocumentBlockParam
|
113
|
+
|
114
|
+
ErrorObject = Anthropic::Models::ErrorObject
|
115
|
+
|
116
|
+
ErrorResponse = Anthropic::Models::ErrorResponse
|
117
|
+
|
118
|
+
GatewayTimeoutError = Anthropic::Models::GatewayTimeoutError
|
119
|
+
|
120
|
+
ImageBlockParam = Anthropic::Models::ImageBlockParam
|
121
|
+
|
122
|
+
InputJSONDelta = Anthropic::Models::InputJSONDelta
|
123
|
+
|
124
|
+
InvalidRequestError = Anthropic::Models::InvalidRequestError
|
125
|
+
|
126
|
+
Message = Anthropic::Models::Message
|
127
|
+
|
128
|
+
MessageCountTokensParams = Anthropic::Models::MessageCountTokensParams
|
129
|
+
|
130
|
+
MessageCountTokensTool = Anthropic::Models::MessageCountTokensTool
|
131
|
+
|
132
|
+
MessageCreateParams = Anthropic::Models::MessageCreateParams
|
133
|
+
|
134
|
+
MessageDeltaUsage = Anthropic::Models::MessageDeltaUsage
|
135
|
+
|
136
|
+
MessageParam = Anthropic::Models::MessageParam
|
137
|
+
|
138
|
+
Messages = Anthropic::Models::Messages
|
139
|
+
|
140
|
+
MessageTokensCount = Anthropic::Models::MessageTokensCount
|
141
|
+
|
142
|
+
Metadata = Anthropic::Models::Metadata
|
143
|
+
|
144
|
+
Model = Anthropic::Models::Model
|
145
|
+
|
146
|
+
ModelInfo = Anthropic::Models::ModelInfo
|
147
|
+
|
148
|
+
ModelListParams = Anthropic::Models::ModelListParams
|
149
|
+
|
150
|
+
ModelRetrieveParams = Anthropic::Models::ModelRetrieveParams
|
151
|
+
|
152
|
+
NotFoundError = Anthropic::Models::NotFoundError
|
153
|
+
|
154
|
+
OverloadedError = Anthropic::Models::OverloadedError
|
155
|
+
|
156
|
+
PermissionError = Anthropic::Models::PermissionError
|
157
|
+
|
158
|
+
PlainTextSource = Anthropic::Models::PlainTextSource
|
159
|
+
|
160
|
+
RateLimitError = Anthropic::Models::RateLimitError
|
161
|
+
|
162
|
+
RawContentBlockDelta = Anthropic::Models::RawContentBlockDelta
|
163
|
+
|
164
|
+
RawContentBlockDeltaEvent = Anthropic::Models::RawContentBlockDeltaEvent
|
165
|
+
|
166
|
+
RawContentBlockStartEvent = Anthropic::Models::RawContentBlockStartEvent
|
167
|
+
|
168
|
+
RawContentBlockStopEvent = Anthropic::Models::RawContentBlockStopEvent
|
169
|
+
|
170
|
+
RawMessageDeltaEvent = Anthropic::Models::RawMessageDeltaEvent
|
171
|
+
|
172
|
+
RawMessageStartEvent = Anthropic::Models::RawMessageStartEvent
|
173
|
+
|
174
|
+
RawMessageStopEvent = Anthropic::Models::RawMessageStopEvent
|
175
|
+
|
176
|
+
RawMessageStreamEvent = Anthropic::Models::RawMessageStreamEvent
|
177
|
+
|
178
|
+
RedactedThinkingBlock = Anthropic::Models::RedactedThinkingBlock
|
179
|
+
|
180
|
+
RedactedThinkingBlockParam = Anthropic::Models::RedactedThinkingBlockParam
|
181
|
+
|
182
|
+
ServerToolUsage = Anthropic::Models::ServerToolUsage
|
183
|
+
|
184
|
+
ServerToolUseBlock = Anthropic::Models::ServerToolUseBlock
|
185
|
+
|
186
|
+
ServerToolUseBlockParam = Anthropic::Models::ServerToolUseBlockParam
|
187
|
+
|
188
|
+
SignatureDelta = Anthropic::Models::SignatureDelta
|
189
|
+
|
190
|
+
StopReason = Anthropic::Models::StopReason
|
191
|
+
|
192
|
+
TextBlock = Anthropic::Models::TextBlock
|
193
|
+
|
194
|
+
TextBlockParam = Anthropic::Models::TextBlockParam
|
195
|
+
|
196
|
+
TextCitation = Anthropic::Models::TextCitation
|
197
|
+
|
198
|
+
TextCitationParam = Anthropic::Models::TextCitationParam
|
199
|
+
|
200
|
+
TextDelta = Anthropic::Models::TextDelta
|
201
|
+
|
202
|
+
ThinkingBlock = Anthropic::Models::ThinkingBlock
|
203
|
+
|
204
|
+
ThinkingBlockParam = Anthropic::Models::ThinkingBlockParam
|
205
|
+
|
206
|
+
ThinkingConfigDisabled = Anthropic::Models::ThinkingConfigDisabled
|
207
|
+
|
208
|
+
ThinkingConfigEnabled = Anthropic::Models::ThinkingConfigEnabled
|
209
|
+
|
210
|
+
ThinkingConfigParam = Anthropic::Models::ThinkingConfigParam
|
211
|
+
|
212
|
+
ThinkingDelta = Anthropic::Models::ThinkingDelta
|
213
|
+
|
214
|
+
Tool = Anthropic::Models::Tool
|
215
|
+
|
216
|
+
ToolBash20250124 = Anthropic::Models::ToolBash20250124
|
217
|
+
|
218
|
+
ToolChoice = Anthropic::Models::ToolChoice
|
219
|
+
|
220
|
+
ToolChoiceAny = Anthropic::Models::ToolChoiceAny
|
221
|
+
|
222
|
+
ToolChoiceAuto = Anthropic::Models::ToolChoiceAuto
|
223
|
+
|
224
|
+
ToolChoiceNone = Anthropic::Models::ToolChoiceNone
|
225
|
+
|
226
|
+
ToolChoiceTool = Anthropic::Models::ToolChoiceTool
|
227
|
+
|
228
|
+
ToolResultBlockParam = Anthropic::Models::ToolResultBlockParam
|
229
|
+
|
230
|
+
ToolTextEditor20250124 = Anthropic::Models::ToolTextEditor20250124
|
231
|
+
|
232
|
+
ToolUnion = Anthropic::Models::ToolUnion
|
233
|
+
|
234
|
+
ToolUseBlock = Anthropic::Models::ToolUseBlock
|
235
|
+
|
236
|
+
ToolUseBlockParam = Anthropic::Models::ToolUseBlockParam
|
237
|
+
|
238
|
+
URLImageSource = Anthropic::Models::URLImageSource
|
239
|
+
|
240
|
+
URLPDFSource = Anthropic::Models::URLPDFSource
|
241
|
+
|
242
|
+
Usage = Anthropic::Models::Usage
|
243
|
+
|
244
|
+
WebSearchResultBlock = Anthropic::Models::WebSearchResultBlock
|
245
|
+
|
246
|
+
WebSearchResultBlockParam = Anthropic::Models::WebSearchResultBlockParam
|
247
|
+
|
248
|
+
WebSearchTool20250305 = Anthropic::Models::WebSearchTool20250305
|
249
|
+
|
250
|
+
WebSearchToolRequestError = Anthropic::Models::WebSearchToolRequestError
|
251
|
+
|
252
|
+
WebSearchToolResultBlock = Anthropic::Models::WebSearchToolResultBlock
|
253
|
+
|
254
|
+
WebSearchToolResultBlockContent = Anthropic::Models::WebSearchToolResultBlockContent
|
255
|
+
|
256
|
+
WebSearchToolResultBlockParam = Anthropic::Models::WebSearchToolResultBlockParam
|
257
|
+
|
258
|
+
WebSearchToolResultBlockParamContent = Anthropic::Models::WebSearchToolResultBlockParamContent
|
259
|
+
|
260
|
+
WebSearchToolResultError = Anthropic::Models::WebSearchToolResultError
|
261
|
+
end
|