anthropic-sdk-beta 0.1.0.pre.beta.6 → 0.1.0.pre.beta.7
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 +88 -0
- data/README.md +171 -126
- data/lib/anthropic/bedrock.rb +5 -0
- data/lib/anthropic/client.rb +7 -6
- data/lib/anthropic/errors.rb +10 -10
- 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/page.rb +28 -38
- data/lib/anthropic/internal/transport/base_client.rb +104 -19
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +20 -4
- data/lib/anthropic/internal/type/array_of.rb +28 -2
- data/lib/anthropic/internal/type/base_model.rb +125 -31
- data/lib/anthropic/internal/type/base_page.rb +10 -1
- data/lib/anthropic/internal/type/base_stream.rb +19 -2
- data/lib/anthropic/internal/type/boolean.rb +16 -11
- data/lib/anthropic/internal/type/converter.rb +46 -1
- data/lib/anthropic/internal/type/enum.rb +43 -23
- data/lib/anthropic/internal/type/{io_like.rb → file_input.rb} +36 -15
- data/lib/anthropic/internal/type/hash_of.rb +28 -2
- data/lib/anthropic/internal/type/request_parameters.rb +7 -14
- data/lib/anthropic/internal/type/union.rb +32 -8
- data/lib/anthropic/internal/type/unknown.rb +16 -11
- data/lib/anthropic/internal/util.rb +180 -73
- data/lib/anthropic/internal.rb +11 -2
- data/lib/anthropic/models/anthropic_beta.rb +14 -11
- data/lib/anthropic/models/api_error_object.rb +3 -7
- data/lib/anthropic/models/authentication_error.rb +3 -7
- data/lib/anthropic/models/base64_image_source.rb +9 -16
- data/lib/anthropic/models/base64_pdf_source.rb +4 -8
- data/lib/anthropic/models/beta/beta_base64_image_source.rb +9 -16
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +38 -30
- data/lib/anthropic/models/beta/beta_base64_pdf_source.rb +4 -8
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +2 -6
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_char_location_param.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_content_block_location_param.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -21
- data/lib/anthropic/models/beta/beta_citation_page_location_param.rb +7 -21
- 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 +3 -11
- data/lib/anthropic/models/beta/beta_citations_delta.rb +24 -16
- data/lib/anthropic/models/beta/beta_citations_web_search_result_location.rb +43 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +23 -7
- data/lib/anthropic/models/beta/beta_content_block_param.rb +29 -10
- data/lib/anthropic/models/beta/beta_content_block_source.rb +23 -15
- data/lib/anthropic/models/beta/beta_content_block_source_content.rb +8 -5
- data/lib/anthropic/models/beta/beta_image_block_param.rb +22 -18
- data/lib/anthropic/models/beta/beta_input_json_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_message.rb +27 -22
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +33 -5
- data/lib/anthropic/models/beta/beta_message_param.rb +37 -23
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +5 -6
- data/lib/anthropic/models/beta/beta_metadata.rb +5 -6
- data/lib/anthropic/models/beta/beta_model_info.rb +11 -9
- data/lib/anthropic/models/beta/beta_plain_text_source.rb +4 -8
- data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +19 -8
- data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +6 -10
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +30 -19
- data/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rb +3 -7
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +19 -22
- data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +5 -9
- data/lib/anthropic/models/beta/beta_raw_message_stop_event.rb +2 -6
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +21 -9
- data/lib/anthropic/models/beta/beta_redacted_thinking_block.rb +3 -7
- data/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rb +3 -7
- 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 +3 -7
- data/lib/anthropic/models/beta/beta_stop_reason.rb +4 -5
- data/lib/anthropic/models/beta/beta_text_block.rb +11 -10
- data/lib/anthropic/models/beta/beta_text_block_param.rb +13 -13
- data/lib/anthropic/models/beta/beta_text_citation.rb +18 -6
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +18 -6
- data/lib/anthropic/models/beta/beta_text_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_thinking_block.rb +4 -8
- data/lib/anthropic/models/beta/beta_thinking_block_param.rb +4 -8
- data/lib/anthropic/models/beta/beta_thinking_config_disabled.rb +2 -6
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +7 -7
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +10 -5
- data/lib/anthropic/models/beta/beta_thinking_delta.rb +3 -7
- data/lib/anthropic/models/beta/beta_tool.rb +34 -41
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_choice.rb +18 -8
- data/lib/anthropic/models/beta/beta_tool_choice_any.rb +10 -14
- data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +10 -14
- data/lib/anthropic/models/beta/beta_tool_choice_none.rb +4 -8
- data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +12 -15
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +19 -24
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +19 -24
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +47 -35
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +13 -11
- data/lib/anthropic/models/beta/beta_tool_union.rb +26 -10
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +5 -9
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +13 -12
- data/lib/anthropic/models/beta/beta_url_image_source.rb +3 -7
- data/lib/anthropic/models/beta/beta_url_pdf_source.rb +3 -7
- data/lib/anthropic/models/beta/beta_usage.rb +15 -8
- 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 +33 -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 +35 -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 +80 -84
- data/lib/anthropic/models/beta/message_create_params.rb +71 -111
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +105 -140
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +20 -34
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +8 -16
- data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +7 -7
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +32 -39
- data/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rb +2 -6
- data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +5 -9
- data/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rb +2 -6
- data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +13 -12
- data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +13 -10
- data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +17 -7
- data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +5 -9
- data/lib/anthropic/models/beta/model_list_params.rb +22 -25
- data/lib/anthropic/models/beta/model_retrieve_params.rb +10 -7
- data/lib/anthropic/models/beta_api_error.rb +3 -7
- data/lib/anthropic/models/beta_authentication_error.rb +3 -7
- data/lib/anthropic/models/beta_billing_error.rb +3 -7
- data/lib/anthropic/models/beta_error.rb +27 -12
- data/lib/anthropic/models/beta_error_response.rb +5 -9
- data/lib/anthropic/models/beta_gateway_timeout_error.rb +3 -7
- data/lib/anthropic/models/beta_invalid_request_error.rb +3 -7
- data/lib/anthropic/models/beta_not_found_error.rb +3 -7
- data/lib/anthropic/models/beta_overloaded_error.rb +3 -7
- data/lib/anthropic/models/beta_permission_error.rb +3 -7
- data/lib/anthropic/models/beta_rate_limit_error.rb +3 -7
- data/lib/anthropic/models/billing_error.rb +3 -7
- data/lib/anthropic/models/cache_control_ephemeral.rb +2 -6
- data/lib/anthropic/models/citation_char_location.rb +7 -21
- data/lib/anthropic/models/citation_char_location_param.rb +7 -21
- data/lib/anthropic/models/citation_content_block_location.rb +7 -21
- data/lib/anthropic/models/citation_content_block_location_param.rb +7 -21
- data/lib/anthropic/models/citation_page_location.rb +7 -21
- data/lib/anthropic/models/citation_page_location_param.rb +7 -21
- data/lib/anthropic/models/citation_web_search_result_location_param.rb +39 -0
- data/lib/anthropic/models/citations_config_param.rb +3 -11
- data/lib/anthropic/models/citations_delta.rb +24 -16
- data/lib/anthropic/models/citations_web_search_result_location.rb +39 -0
- data/lib/anthropic/models/completion.rb +15 -12
- data/lib/anthropic/models/completion_create_params.rb +38 -57
- data/lib/anthropic/models/content_block.rb +23 -7
- data/lib/anthropic/models/content_block_param.rb +29 -10
- data/lib/anthropic/models/content_block_source.rb +17 -15
- data/lib/anthropic/models/content_block_source_content.rb +8 -5
- data/lib/anthropic/models/document_block_param.rb +38 -30
- data/lib/anthropic/models/error_object.rb +27 -12
- data/lib/anthropic/models/error_response.rb +5 -9
- data/lib/anthropic/models/gateway_timeout_error.rb +3 -7
- data/lib/anthropic/models/image_block_param.rb +20 -18
- data/lib/anthropic/models/input_json_delta.rb +3 -7
- data/lib/anthropic/models/invalid_request_error.rb +3 -7
- data/lib/anthropic/models/message.rb +27 -21
- data/lib/anthropic/models/message_count_tokens_params.rb +45 -52
- data/lib/anthropic/models/message_count_tokens_tool.rb +18 -6
- data/lib/anthropic/models/message_create_params.rb +64 -101
- data/lib/anthropic/models/message_delta_usage.rb +33 -5
- data/lib/anthropic/models/message_param.rb +39 -24
- data/lib/anthropic/models/message_tokens_count.rb +5 -6
- data/lib/anthropic/models/messages/batch_cancel_params.rb +3 -8
- data/lib/anthropic/models/messages/batch_create_params.rb +92 -131
- data/lib/anthropic/models/messages/batch_delete_params.rb +3 -8
- data/lib/anthropic/models/messages/batch_list_params.rb +15 -26
- data/lib/anthropic/models/messages/batch_results_params.rb +3 -8
- data/lib/anthropic/models/messages/batch_retrieve_params.rb +3 -8
- data/lib/anthropic/models/messages/deleted_message_batch.rb +7 -7
- data/lib/anthropic/models/messages/message_batch.rb +30 -39
- data/lib/anthropic/models/messages/message_batch_canceled_result.rb +2 -6
- data/lib/anthropic/models/messages/message_batch_errored_result.rb +5 -9
- data/lib/anthropic/models/messages/message_batch_expired_result.rb +2 -6
- data/lib/anthropic/models/messages/message_batch_individual_response.rb +12 -12
- data/lib/anthropic/models/messages/message_batch_request_counts.rb +13 -10
- data/lib/anthropic/models/messages/message_batch_result.rb +17 -7
- data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +5 -9
- data/lib/anthropic/models/metadata.rb +5 -6
- data/lib/anthropic/models/model.rb +19 -16
- data/lib/anthropic/models/model_info.rb +11 -9
- data/lib/anthropic/models/model_list_params.rb +22 -25
- data/lib/anthropic/models/model_retrieve_params.rb +10 -7
- data/lib/anthropic/models/not_found_error.rb +3 -7
- data/lib/anthropic/models/overloaded_error.rb +3 -7
- data/lib/anthropic/models/permission_error.rb +3 -7
- data/lib/anthropic/models/plain_text_source.rb +4 -8
- data/lib/anthropic/models/rate_limit_error.rb +3 -7
- data/lib/anthropic/models/raw_content_block_delta.rb +19 -8
- data/lib/anthropic/models/raw_content_block_delta_event.rb +6 -10
- data/lib/anthropic/models/raw_content_block_start_event.rb +30 -18
- data/lib/anthropic/models/raw_content_block_stop_event.rb +3 -7
- data/lib/anthropic/models/raw_message_delta_event.rb +19 -22
- data/lib/anthropic/models/raw_message_start_event.rb +5 -9
- data/lib/anthropic/models/raw_message_stop_event.rb +2 -6
- data/lib/anthropic/models/raw_message_stream_event.rb +21 -9
- data/lib/anthropic/models/redacted_thinking_block.rb +3 -7
- data/lib/anthropic/models/redacted_thinking_block_param.rb +3 -7
- 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 +3 -7
- data/lib/anthropic/models/stop_reason.rb +4 -5
- data/lib/anthropic/models/text_block.rb +13 -10
- data/lib/anthropic/models/text_block_param.rb +13 -13
- data/lib/anthropic/models/text_citation.rb +18 -6
- data/lib/anthropic/models/text_citation_param.rb +18 -6
- data/lib/anthropic/models/text_delta.rb +3 -7
- data/lib/anthropic/models/thinking_block.rb +4 -8
- data/lib/anthropic/models/thinking_block_param.rb +4 -8
- data/lib/anthropic/models/thinking_config_disabled.rb +2 -6
- data/lib/anthropic/models/thinking_config_enabled.rb +7 -7
- data/lib/anthropic/models/thinking_config_param.rb +8 -5
- data/lib/anthropic/models/thinking_delta.rb +3 -7
- data/lib/anthropic/models/tool.rb +42 -30
- data/lib/anthropic/models/tool_bash_20250124.rb +13 -11
- data/lib/anthropic/models/tool_choice.rb +17 -7
- data/lib/anthropic/models/tool_choice_any.rb +10 -14
- data/lib/anthropic/models/tool_choice_auto.rb +10 -14
- data/lib/anthropic/models/tool_choice_none.rb +4 -8
- data/lib/anthropic/models/tool_choice_tool.rb +12 -15
- data/lib/anthropic/models/tool_result_block_param.rb +37 -35
- data/lib/anthropic/models/tool_text_editor_20250124.rb +13 -11
- data/lib/anthropic/models/tool_union.rb +18 -6
- data/lib/anthropic/models/tool_use_block.rb +5 -9
- data/lib/anthropic/models/tool_use_block_param.rb +13 -12
- data/lib/anthropic/models/url_image_source.rb +3 -7
- data/lib/anthropic/models/url_pdf_source.rb +3 -7
- data/lib/anthropic/models/usage.rb +15 -8
- 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 +23 -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 +26 -0
- data/lib/anthropic/models/web_search_tool_result_error.rb +35 -0
- data/lib/anthropic/models.rb +250 -0
- data/lib/anthropic/request_options.rb +8 -6
- data/lib/anthropic/resources/beta/messages/batches.rb +58 -38
- data/lib/anthropic/resources/beta/messages.rb +86 -44
- data/lib/anthropic/resources/beta/models.rb +28 -13
- data/lib/anthropic/resources/completions.rb +61 -29
- data/lib/anthropic/resources/messages/batches.rb +36 -22
- data/lib/anthropic/resources/messages.rb +80 -41
- data/lib/anthropic/resources/models.rb +28 -13
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic/vertex.rb +5 -0
- data/lib/anthropic.rb +37 -12
- data/rbi/anthropic/bedrock.rbi +5 -0
- data/rbi/{lib/anthropic → anthropic}/client.rbi +16 -12
- data/rbi/{lib/anthropic → anthropic}/errors.rbi +34 -15
- 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/{lib/anthropic → anthropic}/internal/jsonl_stream.rbi +3 -2
- data/rbi/{lib/anthropic → anthropic}/internal/page.rbi +3 -1
- data/rbi/{lib/anthropic → anthropic}/internal/stream.rbi +6 -2
- data/rbi/anthropic/internal/transport/base_client.rbi +310 -0
- data/rbi/{lib/anthropic → anthropic}/internal/transport/pooled_net_requester.rbi +32 -13
- data/rbi/anthropic/internal/type/array_of.rbi +98 -0
- data/rbi/anthropic/internal/type/base_model.rbi +299 -0
- data/rbi/{lib/anthropic → anthropic}/internal/type/base_page.rbi +14 -8
- data/rbi/{lib/anthropic → anthropic}/internal/type/base_stream.rbi +27 -10
- data/rbi/anthropic/internal/type/boolean.rbi +50 -0
- data/rbi/{lib/anthropic → anthropic}/internal/type/converter.rbi +76 -26
- data/rbi/{lib/anthropic → anthropic}/internal/type/enum.rbi +33 -19
- data/rbi/{lib/anthropic/internal/type/io_like.rbi → anthropic/internal/type/file_input.rbi} +18 -11
- data/rbi/anthropic/internal/type/hash_of.rbi +98 -0
- data/rbi/anthropic/internal/type/request_parameters.rbi +29 -0
- data/rbi/anthropic/internal/type/union.rbi +111 -0
- data/rbi/anthropic/internal/type/unknown.rbi +50 -0
- data/rbi/anthropic/internal/util.rbi +451 -0
- data/rbi/{lib/anthropic → anthropic}/internal.rbi +3 -2
- data/rbi/anthropic/models/anthropic_beta.rbi +54 -0
- data/rbi/{lib/anthropic → anthropic}/models/api_error_object.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/authentication_error.rbi +10 -3
- 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/{lib/anthropic → anthropic}/models/beta/beta_cache_control_ephemeral.rbi +15 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_char_location.rbi +23 -16
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_char_location_param.rbi +23 -16
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_content_block_location.rbi +26 -17
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_content_block_location_param.rbi +27 -17
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_page_location.rbi +23 -16
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_page_location_param.rbi +23 -16
- data/rbi/anthropic/models/beta/beta_citation_web_search_result_location_param.rbi +67 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citations_config_param.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_citations_delta.rbi +88 -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 +110 -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 +268 -0
- data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +85 -0
- data/rbi/anthropic/models/beta/beta_message_param.rbi +162 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_message_tokens_count.rbi +19 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_metadata.rbi +19 -5
- 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 +74 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +103 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_raw_content_block_stop_event.rbi +15 -5
- 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/{lib/anthropic → anthropic}/models/beta/beta_raw_message_stop_event.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +33 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_redacted_thinking_block.rbi +15 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_redacted_thinking_block_param.rbi +15 -5
- 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 +94 -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/{lib/anthropic → anthropic}/models/beta/beta_text_delta.rbi +12 -5
- 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/{lib/anthropic → anthropic}/models/beta/beta_thinking_config_disabled.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +56 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_config_param.rbi +15 -7
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_delta.rbi +15 -5
- 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/{lib/anthropic → anthropic}/models/beta/beta_tool_choice.rbi +15 -7
- 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/{lib/anthropic → anthropic}/models/beta/beta_tool_choice_none.rbi +15 -5
- data/rbi/anthropic/models/beta/beta_tool_choice_tool.rbi +68 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_computer_use_20241022.rbi +42 -23
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_computer_use_20250124.rbi +42 -23
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +187 -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/{lib/anthropic → anthropic}/models/beta/beta_url_image_source.rbi +15 -5
- data/rbi/{lib/anthropic → anthropic}/models/beta/beta_url_pdf_source.rbi +15 -5
- 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 +65 -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 +656 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +759 -0
- data/rbi/anthropic/models/beta/messages/batch_cancel_params.rbi +65 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +906 -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 +89 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta/messages/beta_message_batch_request_counts.rbi +41 -12
- 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/{lib/anthropic → anthropic}/models/beta_api_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_authentication_error.rbi +13 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_billing_error.rbi +10 -3
- data/rbi/anthropic/models/beta_error.rbi +28 -0
- data/rbi/anthropic/models/beta_error_response.rbi +74 -0
- data/rbi/{lib/anthropic → anthropic}/models/beta_gateway_timeout_error.rbi +13 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_invalid_request_error.rbi +13 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_not_found_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_overloaded_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_permission_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/beta_rate_limit_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/billing_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/cache_control_ephemeral.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/citation_char_location.rbi +18 -14
- data/rbi/{lib/anthropic → anthropic}/models/citation_char_location_param.rbi +21 -14
- data/rbi/{lib/anthropic → anthropic}/models/citation_content_block_location.rbi +24 -15
- data/rbi/{lib/anthropic → anthropic}/models/citation_content_block_location_param.rbi +24 -15
- data/rbi/{lib/anthropic → anthropic}/models/citation_page_location.rbi +18 -14
- data/rbi/{lib/anthropic → anthropic}/models/citation_page_location_param.rbi +21 -14
- data/rbi/anthropic/models/citation_web_search_result_location_param.rbi +62 -0
- data/rbi/{lib/anthropic → anthropic}/models/citations_config_param.rbi +10 -3
- data/rbi/anthropic/models/citations_delta.rbi +81 -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 +92 -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 +74 -0
- data/rbi/{lib/anthropic → anthropic}/models/gateway_timeout_error.rbi +10 -3
- data/rbi/anthropic/models/image_block_param.rbi +80 -0
- data/rbi/anthropic/models/input_json_delta.rbi +28 -0
- data/rbi/{lib/anthropic → anthropic}/models/invalid_request_error.rbi +10 -3
- data/rbi/anthropic/models/message.rbi +259 -0
- data/rbi/anthropic/models/message_count_tokens_params.rbi +569 -0
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +25 -0
- data/rbi/anthropic/models/message_create_params.rbi +699 -0
- data/rbi/anthropic/models/message_delta_usage.rbi +76 -0
- data/rbi/anthropic/models/message_param.rbi +147 -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 +840 -0
- data/rbi/anthropic/models/messages/batch_delete_params.rbi +32 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/batch_list_params.rbi +34 -12
- 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/{lib/anthropic → anthropic}/models/messages/message_batch_canceled_result.rbi +15 -5
- data/rbi/anthropic/models/messages/message_batch_errored_result.rbi +42 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_expired_result.rbi +15 -5
- data/rbi/anthropic/models/messages/message_batch_individual_response.rbi +89 -0
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_request_counts.rbi +43 -14
- data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_result.rbi +17 -7
- 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/{lib/anthropic → anthropic}/models/not_found_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/overloaded_error.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/permission_error.rbi +10 -3
- data/rbi/anthropic/models/plain_text_source.rbi +35 -0
- data/rbi/{lib/anthropic → anthropic}/models/rate_limit_error.rbi +10 -3
- data/rbi/anthropic/models/raw_content_block_delta.rbi +26 -0
- data/rbi/anthropic/models/raw_content_block_delta_event.rbi +70 -0
- data/rbi/anthropic/models/raw_content_block_start_event.rbi +99 -0
- data/rbi/{lib/anthropic → anthropic}/models/raw_content_block_stop_event.rbi +13 -3
- 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/{lib/anthropic → anthropic}/models/redacted_thinking_block.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/redacted_thinking_block_param.rbi +13 -3
- 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/{lib/anthropic → anthropic}/models/signature_delta.rbi +10 -3
- data/rbi/anthropic/models/stop_reason.rbi +23 -0
- data/rbi/anthropic/models/text_block.rbi +90 -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/{lib/anthropic → anthropic}/models/text_delta.rbi +10 -3
- data/rbi/anthropic/models/thinking_block.rbi +35 -0
- data/rbi/anthropic/models/thinking_block_param.rbi +35 -0
- data/rbi/{lib/anthropic → anthropic}/models/thinking_config_disabled.rbi +10 -3
- data/rbi/anthropic/models/thinking_config_enabled.rbi +49 -0
- data/rbi/{lib/anthropic → anthropic}/models/thinking_config_param.rbi +13 -2
- data/rbi/{lib/anthropic → anthropic}/models/thinking_delta.rbi +10 -3
- 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/{lib/anthropic → anthropic}/models/tool_choice_none.rbi +10 -3
- data/rbi/anthropic/models/tool_choice_tool.rbi +57 -0
- data/rbi/anthropic/models/tool_result_block_param.rbi +162 -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/{lib/anthropic → anthropic}/models/url_image_source.rbi +10 -3
- data/rbi/{lib/anthropic → anthropic}/models/url_pdf_source.rbi +10 -3
- 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 +61 -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/{lib/anthropic → anthropic}/request_options.rbi +18 -5
- data/rbi/{lib/anthropic → anthropic}/resources/beta/messages/batches.rbi +54 -32
- data/rbi/{lib/anthropic → anthropic}/resources/beta/messages.rbi +131 -106
- data/rbi/{lib/anthropic → anthropic}/resources/beta/models.rbi +23 -14
- data/rbi/{lib/anthropic → anthropic}/resources/beta.rbi +2 -1
- data/rbi/{lib/anthropic → anthropic}/resources/completions.rbi +38 -29
- data/rbi/{lib/anthropic → anthropic}/resources/messages/batches.rbi +38 -24
- data/rbi/{lib/anthropic → anthropic}/resources/messages.rbi +104 -91
- data/rbi/anthropic/resources/models.rbi +62 -0
- data/rbi/anthropic/vertex.rbi +5 -0
- data/sig/anthropic/bedrock.rbs +3 -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/transport/base_client.rbs +25 -4
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +4 -0
- data/sig/anthropic/internal/type/array_of.rbs +4 -0
- data/sig/anthropic/internal/type/base_model.rbs +19 -1
- data/sig/anthropic/internal/type/base_page.rbs +1 -1
- data/sig/anthropic/internal/type/base_stream.rbs +2 -0
- data/sig/anthropic/internal/type/converter.rbs +6 -0
- data/sig/anthropic/internal/type/enum.rbs +5 -2
- data/sig/anthropic/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/anthropic/internal/type/hash_of.rbs +4 -0
- data/sig/anthropic/internal/type/request_parameters.rbs +5 -1
- data/sig/anthropic/internal/type/union.rbs +5 -0
- data/sig/anthropic/internal/util.rbs +31 -12
- data/sig/anthropic/internal.rbs +3 -1
- data/sig/anthropic/models/anthropic_beta.rbs +1 -8
- data/sig/anthropic/models/api_error_object.rbs +0 -2
- data/sig/anthropic/models/authentication_error.rbs +0 -2
- data/sig/anthropic/models/base64_image_source.rbs +4 -6
- data/sig/anthropic/models/base64_pdf_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_base64_image_source.rbs +4 -6
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +16 -18
- data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +0 -2
- data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +0 -2
- 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 +0 -2
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +8 -9
- data/sig/anthropic/models/beta/beta_citations_web_search_result_location.rbs +36 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +7 -5
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +10 -8
- data/sig/anthropic/models/beta/beta_content_block_source.rbs +5 -10
- data/sig/anthropic/models/beta/beta_content_block_source_content.rbs +3 -3
- data/sig/anthropic/models/beta/beta_image_block_param.rbs +9 -11
- data/sig/anthropic/models/beta/beta_input_json_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_message.rbs +3 -5
- data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +22 -3
- data/sig/anthropic/models/beta/beta_message_param.rbs +9 -14
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +0 -2
- data/sig/anthropic/models/beta/beta_metadata.rbs +0 -2
- data/sig/anthropic/models/beta/beta_model_info.rbs +0 -2
- data/sig/anthropic/models/beta/beta_plain_text_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_content_block_delta.rbs +6 -6
- data/sig/anthropic/models/beta/beta_raw_content_block_delta_event.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +10 -10
- data/sig/anthropic/models/beta/beta_raw_content_block_stop_event.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +6 -10
- data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +3 -5
- data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +0 -2
- data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +7 -7
- data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +0 -2
- 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 +0 -2
- data/sig/anthropic/models/beta/beta_stop_reason.rbs +8 -1
- data/sig/anthropic/models/beta/beta_text_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_text_block_param.rbs +3 -5
- data/sig/anthropic/models/beta/beta_text_citation.rbs +5 -4
- data/sig/anthropic/models/beta/beta_text_citation_param.rbs +5 -4
- data/sig/anthropic/models/beta/beta_text_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +0 -2
- data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +3 -3
- data/sig/anthropic/models/beta/beta_thinking_delta.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool.rbs +10 -14
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_choice.rbs +5 -5
- data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +14 -19
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +3 -5
- data/sig/anthropic/models/beta/beta_tool_union.rbs +9 -8
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +0 -2
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +3 -5
- data/sig/anthropic/models/beta/beta_url_image_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +0 -2
- data/sig/anthropic/models/beta/beta_usage.rbs +6 -4
- 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 +20 -25
- data/sig/anthropic/models/beta/message_create_params.rbs +11 -17
- data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +22 -31
- data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_list_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_results_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +7 -9
- data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +3 -5
- data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +0 -2
- data/sig/anthropic/models/beta/messages/beta_message_batch_result.rbs +5 -5
- data/sig/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbs +3 -5
- data/sig/anthropic/models/beta/model_list_params.rbs +13 -3
- data/sig/anthropic/models/beta/model_retrieve_params.rbs +11 -3
- data/sig/anthropic/models/beta_api_error.rbs +0 -2
- data/sig/anthropic/models/beta_authentication_error.rbs +0 -2
- data/sig/anthropic/models/beta_billing_error.rbs +0 -2
- data/sig/anthropic/models/beta_error.rbs +10 -10
- data/sig/anthropic/models/beta_error_response.rbs +0 -2
- data/sig/anthropic/models/beta_gateway_timeout_error.rbs +0 -2
- data/sig/anthropic/models/beta_invalid_request_error.rbs +0 -2
- data/sig/anthropic/models/beta_not_found_error.rbs +0 -2
- data/sig/anthropic/models/beta_overloaded_error.rbs +0 -2
- data/sig/anthropic/models/beta_permission_error.rbs +0 -2
- data/sig/anthropic/models/beta_rate_limit_error.rbs +0 -2
- data/sig/anthropic/models/billing_error.rbs +0 -2
- data/sig/anthropic/models/cache_control_ephemeral.rbs +0 -2
- data/sig/anthropic/models/citation_char_location.rbs +0 -2
- data/sig/anthropic/models/citation_char_location_param.rbs +0 -2
- data/sig/anthropic/models/citation_content_block_location.rbs +0 -2
- data/sig/anthropic/models/citation_content_block_location_param.rbs +0 -2
- data/sig/anthropic/models/citation_page_location.rbs +0 -2
- data/sig/anthropic/models/citation_page_location_param.rbs +0 -2
- data/sig/anthropic/models/citation_web_search_result_location_param.rbs +32 -0
- data/sig/anthropic/models/citations_config_param.rbs +0 -2
- data/sig/anthropic/models/citations_delta.rbs +8 -12
- data/sig/anthropic/models/citations_web_search_result_location.rbs +32 -0
- data/sig/anthropic/models/completion.rbs +0 -2
- data/sig/anthropic/models/completion_create_params.rbs +13 -9
- data/sig/anthropic/models/content_block.rbs +7 -5
- data/sig/anthropic/models/content_block_param.rbs +10 -8
- data/sig/anthropic/models/content_block_source.rbs +5 -13
- data/sig/anthropic/models/content_block_source_content.rbs +2 -2
- data/sig/anthropic/models/document_block_param.rbs +16 -18
- data/sig/anthropic/models/error_object.rbs +10 -10
- data/sig/anthropic/models/error_response.rbs +0 -2
- data/sig/anthropic/models/gateway_timeout_error.rbs +0 -2
- data/sig/anthropic/models/image_block_param.rbs +8 -11
- data/sig/anthropic/models/input_json_delta.rbs +0 -2
- data/sig/anthropic/models/invalid_request_error.rbs +0 -2
- data/sig/anthropic/models/message.rbs +3 -5
- data/sig/anthropic/models/message_count_tokens_params.rbs +6 -10
- data/sig/anthropic/models/message_count_tokens_tool.rbs +5 -4
- data/sig/anthropic/models/message_create_params.rbs +10 -16
- data/sig/anthropic/models/message_delta_usage.rbs +22 -3
- data/sig/anthropic/models/message_param.rbs +9 -14
- data/sig/anthropic/models/message_tokens_count.rbs +0 -2
- data/sig/anthropic/models/messages/batch_cancel_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_create_params.rbs +21 -34
- data/sig/anthropic/models/messages/batch_delete_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_list_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_results_params.rbs +0 -2
- data/sig/anthropic/models/messages/batch_retrieve_params.rbs +0 -2
- data/sig/anthropic/models/messages/deleted_message_batch.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch.rbs +7 -9
- data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_errored_result.rbs +3 -5
- data/sig/anthropic/models/messages/message_batch_expired_result.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_individual_response.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_request_counts.rbs +0 -2
- data/sig/anthropic/models/messages/message_batch_result.rbs +5 -5
- data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +3 -8
- data/sig/anthropic/models/metadata.rbs +0 -2
- data/sig/anthropic/models/model.rbs +1 -13
- data/sig/anthropic/models/model_info.rbs +0 -2
- data/sig/anthropic/models/model_list_params.rbs +13 -3
- data/sig/anthropic/models/model_retrieve_params.rbs +11 -3
- data/sig/anthropic/models/not_found_error.rbs +0 -2
- data/sig/anthropic/models/overloaded_error.rbs +0 -2
- data/sig/anthropic/models/permission_error.rbs +0 -2
- data/sig/anthropic/models/plain_text_source.rbs +0 -2
- data/sig/anthropic/models/rate_limit_error.rbs +0 -2
- data/sig/anthropic/models/raw_content_block_delta.rbs +6 -6
- data/sig/anthropic/models/raw_content_block_delta_event.rbs +0 -2
- data/sig/anthropic/models/raw_content_block_start_event.rbs +10 -10
- data/sig/anthropic/models/raw_content_block_stop_event.rbs +0 -2
- data/sig/anthropic/models/raw_message_delta_event.rbs +6 -10
- data/sig/anthropic/models/raw_message_start_event.rbs +3 -5
- data/sig/anthropic/models/raw_message_stop_event.rbs +0 -2
- data/sig/anthropic/models/raw_message_stream_event.rbs +7 -7
- data/sig/anthropic/models/redacted_thinking_block.rbs +0 -2
- data/sig/anthropic/models/redacted_thinking_block_param.rbs +0 -2
- 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 +0 -2
- data/sig/anthropic/models/stop_reason.rbs +9 -1
- data/sig/anthropic/models/text_block.rbs +0 -2
- data/sig/anthropic/models/text_block_param.rbs +3 -5
- data/sig/anthropic/models/text_citation.rbs +5 -4
- data/sig/anthropic/models/text_citation_param.rbs +5 -4
- data/sig/anthropic/models/text_delta.rbs +0 -2
- data/sig/anthropic/models/thinking_block.rbs +0 -2
- data/sig/anthropic/models/thinking_block_param.rbs +0 -2
- data/sig/anthropic/models/thinking_config_disabled.rbs +0 -2
- data/sig/anthropic/models/thinking_config_enabled.rbs +0 -2
- data/sig/anthropic/models/thinking_config_param.rbs +2 -3
- data/sig/anthropic/models/thinking_delta.rbs +0 -2
- data/sig/anthropic/models/tool.rbs +21 -11
- data/sig/anthropic/models/tool_bash_20250124.rbs +3 -5
- data/sig/anthropic/models/tool_choice.rbs +5 -5
- data/sig/anthropic/models/tool_choice_any.rbs +0 -2
- data/sig/anthropic/models/tool_choice_auto.rbs +0 -2
- data/sig/anthropic/models/tool_choice_none.rbs +0 -2
- data/sig/anthropic/models/tool_choice_tool.rbs +0 -2
- data/sig/anthropic/models/tool_result_block_param.rbs +13 -20
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +3 -5
- data/sig/anthropic/models/tool_union.rbs +5 -4
- data/sig/anthropic/models/tool_use_block.rbs +0 -2
- data/sig/anthropic/models/tool_use_block_param.rbs +3 -5
- data/sig/anthropic/models/url_image_source.rbs +0 -2
- data/sig/anthropic/models/url_pdf_source.rbs +0 -2
- data/sig/anthropic/models/usage.rbs +6 -4
- 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 +1 -1
- data/sig/anthropic/resources/beta/messages/batches.rbs +7 -7
- data/sig/anthropic/resources/beta/messages.rbs +8 -8
- data/sig/anthropic/resources/beta/models.rbs +4 -2
- data/sig/anthropic/resources/completions.rbs +6 -4
- data/sig/anthropic/resources/messages/batches.rbs +7 -7
- data/sig/anthropic/resources/messages.rbs +7 -7
- data/sig/anthropic/resources/models.rbs +4 -2
- data/sig/anthropic/vertex.rbs +3 -0
- metadata +335 -238
- data/lib/anthropic/bedrock/client.rb +0 -261
- data/lib/anthropic/vertex/client.rb +0 -210
- data/rbi/lib/anthropic/bedrock/client.rbi +0 -80
- data/rbi/lib/anthropic/internal/transport/base_client.rbi +0 -204
- data/rbi/lib/anthropic/internal/type/array_of.rbi +0 -82
- data/rbi/lib/anthropic/internal/type/base_model.rbi +0 -197
- data/rbi/lib/anthropic/internal/type/boolean.rbi +0 -49
- data/rbi/lib/anthropic/internal/type/hash_of.rbi +0 -82
- data/rbi/lib/anthropic/internal/type/request_parameters.rbi +0 -21
- data/rbi/lib/anthropic/internal/type/union.rbi +0 -68
- data/rbi/lib/anthropic/internal/type/unknown.rbi +0 -41
- data/rbi/lib/anthropic/internal/util.rbi +0 -282
- data/rbi/lib/anthropic/models/anthropic_beta.rbi +0 -30
- data/rbi/lib/anthropic/models/base64_image_source.rbi +0 -46
- data/rbi/lib/anthropic/models/base64_pdf_source.rbi +0 -22
- data/rbi/lib/anthropic/models/beta/beta_base64_image_source.rbi +0 -56
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_block.rbi +0 -104
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_source.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_citations_delta.rbi +0 -66
- data/rbi/lib/anthropic/models/beta/beta_content_block.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_content_block_param.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_content_block_source.rbi +0 -74
- data/rbi/lib/anthropic/models/beta/beta_content_block_source_content.rbi +0 -19
- data/rbi/lib/anthropic/models/beta/beta_image_block_param.rbi +0 -68
- data/rbi/lib/anthropic/models/beta/beta_input_json_delta.rbi +0 -23
- data/rbi/lib/anthropic/models/beta/beta_message.rbi +0 -180
- data/rbi/lib/anthropic/models/beta/beta_message_delta_usage.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_message_param.rbi +0 -126
- data/rbi/lib/anthropic/models/beta/beta_model_info.rbi +0 -38
- data/rbi/lib/anthropic/models/beta/beta_plain_text_source.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +0 -65
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_start_event.rbi +0 -74
- data/rbi/lib/anthropic/models/beta/beta_raw_message_delta_event.rbi +0 -96
- data/rbi/lib/anthropic/models/beta/beta_raw_message_start_event.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/beta_raw_message_stream_event.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_signature_delta.rbi +0 -23
- data/rbi/lib/anthropic/models/beta/beta_stop_reason.rbi +0 -24
- data/rbi/lib/anthropic/models/beta/beta_text_block.rbi +0 -76
- data/rbi/lib/anthropic/models/beta/beta_text_block_param.rbi +0 -84
- data/rbi/lib/anthropic/models/beta/beta_text_citation.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_text_citation_param.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_thinking_block.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_thinking_block_param.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_enabled.rbi +0 -32
- data/rbi/lib/anthropic/models/beta/beta_tool.rbi +0 -112
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20241022.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20250124.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_any.rbi +0 -31
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_auto.rbi +0 -31
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_tool.rbi +0 -37
- data/rbi/lib/anthropic/models/beta/beta_tool_result_block_param.rbi +0 -129
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +0 -49
- data/rbi/lib/anthropic/models/beta/beta_tool_union.rbi +0 -21
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block_param.rbi +0 -60
- data/rbi/lib/anthropic/models/beta/beta_usage.rbi +0 -52
- data/rbi/lib/anthropic/models/beta/message_count_tokens_params.rbi +0 -409
- data/rbi/lib/anthropic/models/beta/message_create_params.rbi +0 -489
- data/rbi/lib/anthropic/models/beta/messages/batch_cancel_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/batch_create_params.rbi +0 -572
- data/rbi/lib/anthropic/models/beta/messages/batch_delete_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/batch_list_params.rbi +0 -72
- data/rbi/lib/anthropic/models/beta/messages/batch_results_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/batch_retrieve_params.rbi +0 -41
- data/rbi/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +0 -27
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch.rbi +0 -148
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +0 -20
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +0 -20
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +0 -68
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_result.rbi +0 -26
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +0 -29
- data/rbi/lib/anthropic/models/beta/model_list_params.rbi +0 -59
- data/rbi/lib/anthropic/models/beta/model_retrieve_params.rbi +0 -21
- data/rbi/lib/anthropic/models/beta_error.rbi +0 -17
- data/rbi/lib/anthropic/models/beta_error_response.rbi +0 -68
- data/rbi/lib/anthropic/models/citations_delta.rbi +0 -62
- data/rbi/lib/anthropic/models/completion.rbi +0 -65
- data/rbi/lib/anthropic/models/completion_create_params.rbi +0 -142
- data/rbi/lib/anthropic/models/content_block.rbi +0 -17
- data/rbi/lib/anthropic/models/content_block_param.rbi +0 -17
- data/rbi/lib/anthropic/models/content_block_source.rbi +0 -56
- data/rbi/lib/anthropic/models/content_block_source_content.rbi +0 -12
- data/rbi/lib/anthropic/models/document_block_param.rbi +0 -97
- data/rbi/lib/anthropic/models/error_object.rbi +0 -17
- data/rbi/lib/anthropic/models/error_response.rbi +0 -68
- data/rbi/lib/anthropic/models/image_block_param.rbi +0 -57
- data/rbi/lib/anthropic/models/input_json_delta.rbi +0 -19
- data/rbi/lib/anthropic/models/message.rbi +0 -176
- data/rbi/lib/anthropic/models/message_count_tokens_params.rbi +0 -363
- data/rbi/lib/anthropic/models/message_count_tokens_tool.rbi +0 -17
- data/rbi/lib/anthropic/models/message_create_params.rbi +0 -453
- data/rbi/lib/anthropic/models/message_delta_usage.rbi +0 -17
- data/rbi/lib/anthropic/models/message_param.rbi +0 -121
- data/rbi/lib/anthropic/models/message_tokens_count.rbi +0 -18
- data/rbi/lib/anthropic/models/messages/batch_cancel_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/batch_create_params.rbi +0 -535
- data/rbi/lib/anthropic/models/messages/batch_delete_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/batch_results_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/batch_retrieve_params.rbi +0 -21
- data/rbi/lib/anthropic/models/messages/deleted_message_batch.rbi +0 -25
- data/rbi/lib/anthropic/models/messages/message_batch.rbi +0 -143
- data/rbi/lib/anthropic/models/messages/message_batch_errored_result.rbi +0 -29
- data/rbi/lib/anthropic/models/messages/message_batch_individual_response.rbi +0 -68
- data/rbi/lib/anthropic/models/messages/message_batch_succeeded_result.rbi +0 -29
- data/rbi/lib/anthropic/models/metadata.rbi +0 -21
- data/rbi/lib/anthropic/models/model.rbi +0 -54
- data/rbi/lib/anthropic/models/model_info.rbi +0 -34
- data/rbi/lib/anthropic/models/model_list_params.rbi +0 -57
- data/rbi/lib/anthropic/models/model_retrieve_params.rbi +0 -19
- data/rbi/lib/anthropic/models/plain_text_source.rbi +0 -22
- data/rbi/lib/anthropic/models/raw_content_block_delta.rbi +0 -17
- data/rbi/lib/anthropic/models/raw_content_block_delta_event.rbi +0 -61
- data/rbi/lib/anthropic/models/raw_content_block_start_event.rbi +0 -70
- data/rbi/lib/anthropic/models/raw_message_delta_event.rbi +0 -81
- data/rbi/lib/anthropic/models/raw_message_start_event.rbi +0 -25
- data/rbi/lib/anthropic/models/raw_message_stop_event.rbi +0 -16
- data/rbi/lib/anthropic/models/raw_message_stream_event.rbi +0 -17
- data/rbi/lib/anthropic/models/stop_reason.rbi +0 -20
- data/rbi/lib/anthropic/models/text_block.rbi +0 -72
- data/rbi/lib/anthropic/models/text_block_param.rbi +0 -80
- data/rbi/lib/anthropic/models/text_citation.rbi +0 -17
- data/rbi/lib/anthropic/models/text_citation_param.rbi +0 -17
- data/rbi/lib/anthropic/models/thinking_block.rbi +0 -22
- data/rbi/lib/anthropic/models/thinking_block_param.rbi +0 -22
- data/rbi/lib/anthropic/models/thinking_config_enabled.rbi +0 -28
- data/rbi/lib/anthropic/models/tool.rbi +0 -88
- data/rbi/lib/anthropic/models/tool_bash_20250124.rbi +0 -43
- data/rbi/lib/anthropic/models/tool_choice.rbi +0 -19
- data/rbi/lib/anthropic/models/tool_choice_any.rbi +0 -27
- data/rbi/lib/anthropic/models/tool_choice_auto.rbi +0 -27
- data/rbi/lib/anthropic/models/tool_choice_tool.rbi +0 -33
- data/rbi/lib/anthropic/models/tool_result_block_param.rbi +0 -102
- data/rbi/lib/anthropic/models/tool_text_editor_20250124.rbi +0 -43
- data/rbi/lib/anthropic/models/tool_union.rbi +0 -17
- data/rbi/lib/anthropic/models/tool_use_block.rbi +0 -25
- data/rbi/lib/anthropic/models/tool_use_block_param.rbi +0 -56
- data/rbi/lib/anthropic/models/usage.rbi +0 -47
- data/rbi/lib/anthropic/resources/models.rbi +0 -53
- data/rbi/lib/anthropic/vertex/client.rbi +0 -56
- data/sig/anthropic/bedrock/client.rbs +0 -41
- data/sig/anthropic/vertex/client.rbs +0 -34
- /data/rbi/{lib/anthropic → anthropic}/version.rbi +0 -0
@@ -0,0 +1,656 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class MessageCountTokensParams < Anthropic::Internal::Type::BaseModel
|
7
|
+
extend Anthropic::Internal::Type::RequestParameters::Converter
|
8
|
+
include Anthropic::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Anthropic::Beta::MessageCountTokensParams,
|
14
|
+
Anthropic::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Input messages.
|
19
|
+
#
|
20
|
+
# Our models are trained to operate on alternating `user` and `assistant`
|
21
|
+
# conversational turns. When creating a new `Message`, you specify the prior
|
22
|
+
# conversational turns with the `messages` parameter, and the model then generates
|
23
|
+
# the next `Message` in the conversation. Consecutive `user` or `assistant` turns
|
24
|
+
# in your request will be combined into a single turn.
|
25
|
+
#
|
26
|
+
# Each input message must be an object with a `role` and `content`. You can
|
27
|
+
# specify a single `user`-role message, or you can include multiple `user` and
|
28
|
+
# `assistant` messages.
|
29
|
+
#
|
30
|
+
# If the final message uses the `assistant` role, the response content will
|
31
|
+
# continue immediately from the content in that message. This can be used to
|
32
|
+
# constrain part of the model's response.
|
33
|
+
#
|
34
|
+
# Example with a single `user` message:
|
35
|
+
#
|
36
|
+
# ```json
|
37
|
+
# [{ "role": "user", "content": "Hello, Claude" }]
|
38
|
+
# ```
|
39
|
+
#
|
40
|
+
# Example with multiple conversational turns:
|
41
|
+
#
|
42
|
+
# ```json
|
43
|
+
# [
|
44
|
+
# { "role": "user", "content": "Hello there." },
|
45
|
+
# { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
|
46
|
+
# { "role": "user", "content": "Can you explain LLMs in plain English?" }
|
47
|
+
# ]
|
48
|
+
# ```
|
49
|
+
#
|
50
|
+
# Example with a partially-filled response from Claude:
|
51
|
+
#
|
52
|
+
# ```json
|
53
|
+
# [
|
54
|
+
# {
|
55
|
+
# "role": "user",
|
56
|
+
# "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
57
|
+
# },
|
58
|
+
# { "role": "assistant", "content": "The best answer is (" }
|
59
|
+
# ]
|
60
|
+
# ```
|
61
|
+
#
|
62
|
+
# Each input message `content` may be either a single `string` or an array of
|
63
|
+
# content blocks, where each block has a specific `type`. Using a `string` for
|
64
|
+
# `content` is shorthand for an array of one content block of type `"text"`. The
|
65
|
+
# following input messages are equivalent:
|
66
|
+
#
|
67
|
+
# ```json
|
68
|
+
# { "role": "user", "content": "Hello, Claude" }
|
69
|
+
# ```
|
70
|
+
#
|
71
|
+
# ```json
|
72
|
+
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
73
|
+
# ```
|
74
|
+
#
|
75
|
+
# Starting with Claude 3 models, you can also send image content blocks:
|
76
|
+
#
|
77
|
+
# ```json
|
78
|
+
# {
|
79
|
+
# "role": "user",
|
80
|
+
# "content": [
|
81
|
+
# {
|
82
|
+
# "type": "image",
|
83
|
+
# "source": {
|
84
|
+
# "type": "base64",
|
85
|
+
# "media_type": "image/jpeg",
|
86
|
+
# "data": "/9j/4AAQSkZJRg..."
|
87
|
+
# }
|
88
|
+
# },
|
89
|
+
# { "type": "text", "text": "What is in this image?" }
|
90
|
+
# ]
|
91
|
+
# }
|
92
|
+
# ```
|
93
|
+
#
|
94
|
+
# We currently support the `base64` source type for images, and the `image/jpeg`,
|
95
|
+
# `image/png`, `image/gif`, and `image/webp` media types.
|
96
|
+
#
|
97
|
+
# See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
|
98
|
+
# more input examples.
|
99
|
+
#
|
100
|
+
# Note that if you want to include a
|
101
|
+
# [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
|
102
|
+
# the top-level `system` parameter — there is no `"system"` role for input
|
103
|
+
# messages in the Messages API.
|
104
|
+
#
|
105
|
+
# There is a limit of 100000 messages in a single request.
|
106
|
+
sig { returns(T::Array[Anthropic::Beta::BetaMessageParam]) }
|
107
|
+
attr_accessor :messages
|
108
|
+
|
109
|
+
# The model that will complete your prompt.\n\nSee
|
110
|
+
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
111
|
+
# details and options.
|
112
|
+
sig { returns(T.any(Anthropic::Model::OrSymbol, String)) }
|
113
|
+
attr_accessor :model
|
114
|
+
|
115
|
+
# System prompt.
|
116
|
+
#
|
117
|
+
# A system prompt is a way of providing context and instructions to Claude, such
|
118
|
+
# as specifying a particular goal or role. See our
|
119
|
+
# [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
|
120
|
+
sig do
|
121
|
+
returns(
|
122
|
+
T.nilable(
|
123
|
+
T.any(String, T::Array[Anthropic::Beta::BetaTextBlockParam])
|
124
|
+
)
|
125
|
+
)
|
126
|
+
end
|
127
|
+
attr_reader :system_
|
128
|
+
|
129
|
+
sig do
|
130
|
+
params(
|
131
|
+
system_:
|
132
|
+
T.any(
|
133
|
+
String,
|
134
|
+
T::Array[Anthropic::Beta::BetaTextBlockParam::OrHash]
|
135
|
+
)
|
136
|
+
).void
|
137
|
+
end
|
138
|
+
attr_writer :system_
|
139
|
+
|
140
|
+
# Configuration for enabling Claude's extended thinking.
|
141
|
+
#
|
142
|
+
# When enabled, responses include `thinking` content blocks showing Claude's
|
143
|
+
# thinking process before the final answer. Requires a minimum budget of 1,024
|
144
|
+
# tokens and counts towards your `max_tokens` limit.
|
145
|
+
#
|
146
|
+
# See
|
147
|
+
# [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
148
|
+
# for details.
|
149
|
+
sig do
|
150
|
+
returns(
|
151
|
+
T.nilable(
|
152
|
+
T.any(
|
153
|
+
Anthropic::Beta::BetaThinkingConfigEnabled,
|
154
|
+
Anthropic::Beta::BetaThinkingConfigDisabled
|
155
|
+
)
|
156
|
+
)
|
157
|
+
)
|
158
|
+
end
|
159
|
+
attr_reader :thinking
|
160
|
+
|
161
|
+
sig do
|
162
|
+
params(
|
163
|
+
thinking:
|
164
|
+
T.any(
|
165
|
+
Anthropic::Beta::BetaThinkingConfigEnabled::OrHash,
|
166
|
+
Anthropic::Beta::BetaThinkingConfigDisabled::OrHash
|
167
|
+
)
|
168
|
+
).void
|
169
|
+
end
|
170
|
+
attr_writer :thinking
|
171
|
+
|
172
|
+
# How the model should use the provided tools. The model can use a specific tool,
|
173
|
+
# any available tool, decide by itself, or not use tools at all.
|
174
|
+
sig do
|
175
|
+
returns(
|
176
|
+
T.nilable(
|
177
|
+
T.any(
|
178
|
+
Anthropic::Beta::BetaToolChoiceAuto,
|
179
|
+
Anthropic::Beta::BetaToolChoiceAny,
|
180
|
+
Anthropic::Beta::BetaToolChoiceTool,
|
181
|
+
Anthropic::Beta::BetaToolChoiceNone
|
182
|
+
)
|
183
|
+
)
|
184
|
+
)
|
185
|
+
end
|
186
|
+
attr_reader :tool_choice
|
187
|
+
|
188
|
+
sig do
|
189
|
+
params(
|
190
|
+
tool_choice:
|
191
|
+
T.any(
|
192
|
+
Anthropic::Beta::BetaToolChoiceAuto::OrHash,
|
193
|
+
Anthropic::Beta::BetaToolChoiceAny::OrHash,
|
194
|
+
Anthropic::Beta::BetaToolChoiceTool::OrHash,
|
195
|
+
Anthropic::Beta::BetaToolChoiceNone::OrHash
|
196
|
+
)
|
197
|
+
).void
|
198
|
+
end
|
199
|
+
attr_writer :tool_choice
|
200
|
+
|
201
|
+
# Definitions of tools that the model may use.
|
202
|
+
#
|
203
|
+
# If you include `tools` in your API request, the model may return `tool_use`
|
204
|
+
# content blocks that represent the model's use of those tools. You can then run
|
205
|
+
# those tools using the tool input generated by the model and then optionally
|
206
|
+
# return results back to the model using `tool_result` content blocks.
|
207
|
+
#
|
208
|
+
# Each tool definition includes:
|
209
|
+
#
|
210
|
+
# - `name`: Name of the tool.
|
211
|
+
# - `description`: Optional, but strongly-recommended description of the tool.
|
212
|
+
# - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
|
213
|
+
# tool `input` shape that the model will produce in `tool_use` output content
|
214
|
+
# blocks.
|
215
|
+
#
|
216
|
+
# For example, if you defined `tools` as:
|
217
|
+
#
|
218
|
+
# ```json
|
219
|
+
# [
|
220
|
+
# {
|
221
|
+
# "name": "get_stock_price",
|
222
|
+
# "description": "Get the current stock price for a given ticker symbol.",
|
223
|
+
# "input_schema": {
|
224
|
+
# "type": "object",
|
225
|
+
# "properties": {
|
226
|
+
# "ticker": {
|
227
|
+
# "type": "string",
|
228
|
+
# "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
|
229
|
+
# }
|
230
|
+
# },
|
231
|
+
# "required": ["ticker"]
|
232
|
+
# }
|
233
|
+
# }
|
234
|
+
# ]
|
235
|
+
# ```
|
236
|
+
#
|
237
|
+
# And then asked the model "What's the S&P 500 at today?", the model might produce
|
238
|
+
# `tool_use` content blocks in the response like this:
|
239
|
+
#
|
240
|
+
# ```json
|
241
|
+
# [
|
242
|
+
# {
|
243
|
+
# "type": "tool_use",
|
244
|
+
# "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
245
|
+
# "name": "get_stock_price",
|
246
|
+
# "input": { "ticker": "^GSPC" }
|
247
|
+
# }
|
248
|
+
# ]
|
249
|
+
# ```
|
250
|
+
#
|
251
|
+
# You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
|
252
|
+
# input, and return the following back to the model in a subsequent `user`
|
253
|
+
# message:
|
254
|
+
#
|
255
|
+
# ```json
|
256
|
+
# [
|
257
|
+
# {
|
258
|
+
# "type": "tool_result",
|
259
|
+
# "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
260
|
+
# "content": "259.75 USD"
|
261
|
+
# }
|
262
|
+
# ]
|
263
|
+
# ```
|
264
|
+
#
|
265
|
+
# Tools can be used for workflows that include running client-side tools and
|
266
|
+
# functions, or more generally whenever you want the model to produce a particular
|
267
|
+
# JSON structure of output.
|
268
|
+
#
|
269
|
+
# See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
|
270
|
+
sig do
|
271
|
+
returns(
|
272
|
+
T.nilable(
|
273
|
+
T::Array[
|
274
|
+
T.any(
|
275
|
+
Anthropic::Beta::BetaTool,
|
276
|
+
Anthropic::Beta::BetaToolComputerUse20241022,
|
277
|
+
Anthropic::Beta::BetaToolBash20241022,
|
278
|
+
Anthropic::Beta::BetaToolTextEditor20241022,
|
279
|
+
Anthropic::Beta::BetaToolComputerUse20250124,
|
280
|
+
Anthropic::Beta::BetaToolBash20250124,
|
281
|
+
Anthropic::Beta::BetaToolTextEditor20250124,
|
282
|
+
Anthropic::Beta::BetaWebSearchTool20250305
|
283
|
+
)
|
284
|
+
]
|
285
|
+
)
|
286
|
+
)
|
287
|
+
end
|
288
|
+
attr_reader :tools
|
289
|
+
|
290
|
+
sig do
|
291
|
+
params(
|
292
|
+
tools:
|
293
|
+
T::Array[
|
294
|
+
T.any(
|
295
|
+
Anthropic::Beta::BetaTool::OrHash,
|
296
|
+
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
297
|
+
Anthropic::Beta::BetaToolBash20241022::OrHash,
|
298
|
+
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
299
|
+
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
300
|
+
Anthropic::Beta::BetaToolBash20250124::OrHash,
|
301
|
+
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
302
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
303
|
+
)
|
304
|
+
]
|
305
|
+
).void
|
306
|
+
end
|
307
|
+
attr_writer :tools
|
308
|
+
|
309
|
+
# Optional header to specify the beta version(s) you want to use.
|
310
|
+
sig do
|
311
|
+
returns(
|
312
|
+
T.nilable(
|
313
|
+
T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
|
314
|
+
)
|
315
|
+
)
|
316
|
+
end
|
317
|
+
attr_reader :betas
|
318
|
+
|
319
|
+
sig do
|
320
|
+
params(
|
321
|
+
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
|
322
|
+
).void
|
323
|
+
end
|
324
|
+
attr_writer :betas
|
325
|
+
|
326
|
+
sig do
|
327
|
+
params(
|
328
|
+
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
329
|
+
model: T.any(Anthropic::Model::OrSymbol, String),
|
330
|
+
system_:
|
331
|
+
T.any(
|
332
|
+
String,
|
333
|
+
T::Array[Anthropic::Beta::BetaTextBlockParam::OrHash]
|
334
|
+
),
|
335
|
+
thinking:
|
336
|
+
T.any(
|
337
|
+
Anthropic::Beta::BetaThinkingConfigEnabled::OrHash,
|
338
|
+
Anthropic::Beta::BetaThinkingConfigDisabled::OrHash
|
339
|
+
),
|
340
|
+
tool_choice:
|
341
|
+
T.any(
|
342
|
+
Anthropic::Beta::BetaToolChoiceAuto::OrHash,
|
343
|
+
Anthropic::Beta::BetaToolChoiceAny::OrHash,
|
344
|
+
Anthropic::Beta::BetaToolChoiceTool::OrHash,
|
345
|
+
Anthropic::Beta::BetaToolChoiceNone::OrHash
|
346
|
+
),
|
347
|
+
tools:
|
348
|
+
T::Array[
|
349
|
+
T.any(
|
350
|
+
Anthropic::Beta::BetaTool::OrHash,
|
351
|
+
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
352
|
+
Anthropic::Beta::BetaToolBash20241022::OrHash,
|
353
|
+
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
354
|
+
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
355
|
+
Anthropic::Beta::BetaToolBash20250124::OrHash,
|
356
|
+
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
357
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
358
|
+
)
|
359
|
+
],
|
360
|
+
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
361
|
+
request_options: Anthropic::RequestOptions::OrHash
|
362
|
+
).returns(T.attached_class)
|
363
|
+
end
|
364
|
+
def self.new(
|
365
|
+
# Input messages.
|
366
|
+
#
|
367
|
+
# Our models are trained to operate on alternating `user` and `assistant`
|
368
|
+
# conversational turns. When creating a new `Message`, you specify the prior
|
369
|
+
# conversational turns with the `messages` parameter, and the model then generates
|
370
|
+
# the next `Message` in the conversation. Consecutive `user` or `assistant` turns
|
371
|
+
# in your request will be combined into a single turn.
|
372
|
+
#
|
373
|
+
# Each input message must be an object with a `role` and `content`. You can
|
374
|
+
# specify a single `user`-role message, or you can include multiple `user` and
|
375
|
+
# `assistant` messages.
|
376
|
+
#
|
377
|
+
# If the final message uses the `assistant` role, the response content will
|
378
|
+
# continue immediately from the content in that message. This can be used to
|
379
|
+
# constrain part of the model's response.
|
380
|
+
#
|
381
|
+
# Example with a single `user` message:
|
382
|
+
#
|
383
|
+
# ```json
|
384
|
+
# [{ "role": "user", "content": "Hello, Claude" }]
|
385
|
+
# ```
|
386
|
+
#
|
387
|
+
# Example with multiple conversational turns:
|
388
|
+
#
|
389
|
+
# ```json
|
390
|
+
# [
|
391
|
+
# { "role": "user", "content": "Hello there." },
|
392
|
+
# { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
|
393
|
+
# { "role": "user", "content": "Can you explain LLMs in plain English?" }
|
394
|
+
# ]
|
395
|
+
# ```
|
396
|
+
#
|
397
|
+
# Example with a partially-filled response from Claude:
|
398
|
+
#
|
399
|
+
# ```json
|
400
|
+
# [
|
401
|
+
# {
|
402
|
+
# "role": "user",
|
403
|
+
# "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
404
|
+
# },
|
405
|
+
# { "role": "assistant", "content": "The best answer is (" }
|
406
|
+
# ]
|
407
|
+
# ```
|
408
|
+
#
|
409
|
+
# Each input message `content` may be either a single `string` or an array of
|
410
|
+
# content blocks, where each block has a specific `type`. Using a `string` for
|
411
|
+
# `content` is shorthand for an array of one content block of type `"text"`. The
|
412
|
+
# following input messages are equivalent:
|
413
|
+
#
|
414
|
+
# ```json
|
415
|
+
# { "role": "user", "content": "Hello, Claude" }
|
416
|
+
# ```
|
417
|
+
#
|
418
|
+
# ```json
|
419
|
+
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
420
|
+
# ```
|
421
|
+
#
|
422
|
+
# Starting with Claude 3 models, you can also send image content blocks:
|
423
|
+
#
|
424
|
+
# ```json
|
425
|
+
# {
|
426
|
+
# "role": "user",
|
427
|
+
# "content": [
|
428
|
+
# {
|
429
|
+
# "type": "image",
|
430
|
+
# "source": {
|
431
|
+
# "type": "base64",
|
432
|
+
# "media_type": "image/jpeg",
|
433
|
+
# "data": "/9j/4AAQSkZJRg..."
|
434
|
+
# }
|
435
|
+
# },
|
436
|
+
# { "type": "text", "text": "What is in this image?" }
|
437
|
+
# ]
|
438
|
+
# }
|
439
|
+
# ```
|
440
|
+
#
|
441
|
+
# We currently support the `base64` source type for images, and the `image/jpeg`,
|
442
|
+
# `image/png`, `image/gif`, and `image/webp` media types.
|
443
|
+
#
|
444
|
+
# See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
|
445
|
+
# more input examples.
|
446
|
+
#
|
447
|
+
# Note that if you want to include a
|
448
|
+
# [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
|
449
|
+
# the top-level `system` parameter — there is no `"system"` role for input
|
450
|
+
# messages in the Messages API.
|
451
|
+
#
|
452
|
+
# There is a limit of 100000 messages in a single request.
|
453
|
+
messages:,
|
454
|
+
# The model that will complete your prompt.\n\nSee
|
455
|
+
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
456
|
+
# details and options.
|
457
|
+
model:,
|
458
|
+
# System prompt.
|
459
|
+
#
|
460
|
+
# A system prompt is a way of providing context and instructions to Claude, such
|
461
|
+
# as specifying a particular goal or role. See our
|
462
|
+
# [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
|
463
|
+
system_: nil,
|
464
|
+
# Configuration for enabling Claude's extended thinking.
|
465
|
+
#
|
466
|
+
# When enabled, responses include `thinking` content blocks showing Claude's
|
467
|
+
# thinking process before the final answer. Requires a minimum budget of 1,024
|
468
|
+
# tokens and counts towards your `max_tokens` limit.
|
469
|
+
#
|
470
|
+
# See
|
471
|
+
# [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
472
|
+
# for details.
|
473
|
+
thinking: nil,
|
474
|
+
# How the model should use the provided tools. The model can use a specific tool,
|
475
|
+
# any available tool, decide by itself, or not use tools at all.
|
476
|
+
tool_choice: nil,
|
477
|
+
# Definitions of tools that the model may use.
|
478
|
+
#
|
479
|
+
# If you include `tools` in your API request, the model may return `tool_use`
|
480
|
+
# content blocks that represent the model's use of those tools. You can then run
|
481
|
+
# those tools using the tool input generated by the model and then optionally
|
482
|
+
# return results back to the model using `tool_result` content blocks.
|
483
|
+
#
|
484
|
+
# Each tool definition includes:
|
485
|
+
#
|
486
|
+
# - `name`: Name of the tool.
|
487
|
+
# - `description`: Optional, but strongly-recommended description of the tool.
|
488
|
+
# - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
|
489
|
+
# tool `input` shape that the model will produce in `tool_use` output content
|
490
|
+
# blocks.
|
491
|
+
#
|
492
|
+
# For example, if you defined `tools` as:
|
493
|
+
#
|
494
|
+
# ```json
|
495
|
+
# [
|
496
|
+
# {
|
497
|
+
# "name": "get_stock_price",
|
498
|
+
# "description": "Get the current stock price for a given ticker symbol.",
|
499
|
+
# "input_schema": {
|
500
|
+
# "type": "object",
|
501
|
+
# "properties": {
|
502
|
+
# "ticker": {
|
503
|
+
# "type": "string",
|
504
|
+
# "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
|
505
|
+
# }
|
506
|
+
# },
|
507
|
+
# "required": ["ticker"]
|
508
|
+
# }
|
509
|
+
# }
|
510
|
+
# ]
|
511
|
+
# ```
|
512
|
+
#
|
513
|
+
# And then asked the model "What's the S&P 500 at today?", the model might produce
|
514
|
+
# `tool_use` content blocks in the response like this:
|
515
|
+
#
|
516
|
+
# ```json
|
517
|
+
# [
|
518
|
+
# {
|
519
|
+
# "type": "tool_use",
|
520
|
+
# "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
521
|
+
# "name": "get_stock_price",
|
522
|
+
# "input": { "ticker": "^GSPC" }
|
523
|
+
# }
|
524
|
+
# ]
|
525
|
+
# ```
|
526
|
+
#
|
527
|
+
# You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
|
528
|
+
# input, and return the following back to the model in a subsequent `user`
|
529
|
+
# message:
|
530
|
+
#
|
531
|
+
# ```json
|
532
|
+
# [
|
533
|
+
# {
|
534
|
+
# "type": "tool_result",
|
535
|
+
# "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
536
|
+
# "content": "259.75 USD"
|
537
|
+
# }
|
538
|
+
# ]
|
539
|
+
# ```
|
540
|
+
#
|
541
|
+
# Tools can be used for workflows that include running client-side tools and
|
542
|
+
# functions, or more generally whenever you want the model to produce a particular
|
543
|
+
# JSON structure of output.
|
544
|
+
#
|
545
|
+
# See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
|
546
|
+
tools: nil,
|
547
|
+
# Optional header to specify the beta version(s) you want to use.
|
548
|
+
betas: nil,
|
549
|
+
request_options: {}
|
550
|
+
)
|
551
|
+
end
|
552
|
+
|
553
|
+
sig do
|
554
|
+
override.returns(
|
555
|
+
{
|
556
|
+
messages: T::Array[Anthropic::Beta::BetaMessageParam],
|
557
|
+
model: T.any(Anthropic::Model::OrSymbol, String),
|
558
|
+
system_:
|
559
|
+
T.any(String, T::Array[Anthropic::Beta::BetaTextBlockParam]),
|
560
|
+
thinking:
|
561
|
+
T.any(
|
562
|
+
Anthropic::Beta::BetaThinkingConfigEnabled,
|
563
|
+
Anthropic::Beta::BetaThinkingConfigDisabled
|
564
|
+
),
|
565
|
+
tool_choice:
|
566
|
+
T.any(
|
567
|
+
Anthropic::Beta::BetaToolChoiceAuto,
|
568
|
+
Anthropic::Beta::BetaToolChoiceAny,
|
569
|
+
Anthropic::Beta::BetaToolChoiceTool,
|
570
|
+
Anthropic::Beta::BetaToolChoiceNone
|
571
|
+
),
|
572
|
+
tools:
|
573
|
+
T::Array[
|
574
|
+
T.any(
|
575
|
+
Anthropic::Beta::BetaTool,
|
576
|
+
Anthropic::Beta::BetaToolComputerUse20241022,
|
577
|
+
Anthropic::Beta::BetaToolBash20241022,
|
578
|
+
Anthropic::Beta::BetaToolTextEditor20241022,
|
579
|
+
Anthropic::Beta::BetaToolComputerUse20250124,
|
580
|
+
Anthropic::Beta::BetaToolBash20250124,
|
581
|
+
Anthropic::Beta::BetaToolTextEditor20250124,
|
582
|
+
Anthropic::Beta::BetaWebSearchTool20250305
|
583
|
+
)
|
584
|
+
],
|
585
|
+
betas:
|
586
|
+
T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
587
|
+
request_options: Anthropic::RequestOptions
|
588
|
+
}
|
589
|
+
)
|
590
|
+
end
|
591
|
+
def to_hash
|
592
|
+
end
|
593
|
+
|
594
|
+
# System prompt.
|
595
|
+
#
|
596
|
+
# A system prompt is a way of providing context and instructions to Claude, such
|
597
|
+
# as specifying a particular goal or role. See our
|
598
|
+
# [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
|
599
|
+
module System
|
600
|
+
extend Anthropic::Internal::Type::Union
|
601
|
+
|
602
|
+
Variants =
|
603
|
+
T.type_alias do
|
604
|
+
T.any(String, T::Array[Anthropic::Beta::BetaTextBlockParam])
|
605
|
+
end
|
606
|
+
|
607
|
+
sig do
|
608
|
+
override.returns(
|
609
|
+
T::Array[
|
610
|
+
Anthropic::Beta::MessageCountTokensParams::System::Variants
|
611
|
+
]
|
612
|
+
)
|
613
|
+
end
|
614
|
+
def self.variants
|
615
|
+
end
|
616
|
+
|
617
|
+
BetaTextBlockParamArray =
|
618
|
+
T.let(
|
619
|
+
Anthropic::Internal::Type::ArrayOf[
|
620
|
+
Anthropic::Beta::BetaTextBlockParam
|
621
|
+
],
|
622
|
+
Anthropic::Internal::Type::Converter
|
623
|
+
)
|
624
|
+
end
|
625
|
+
|
626
|
+
module Tool
|
627
|
+
extend Anthropic::Internal::Type::Union
|
628
|
+
|
629
|
+
Variants =
|
630
|
+
T.type_alias do
|
631
|
+
T.any(
|
632
|
+
Anthropic::Beta::BetaTool,
|
633
|
+
Anthropic::Beta::BetaToolComputerUse20241022,
|
634
|
+
Anthropic::Beta::BetaToolBash20241022,
|
635
|
+
Anthropic::Beta::BetaToolTextEditor20241022,
|
636
|
+
Anthropic::Beta::BetaToolComputerUse20250124,
|
637
|
+
Anthropic::Beta::BetaToolBash20250124,
|
638
|
+
Anthropic::Beta::BetaToolTextEditor20250124,
|
639
|
+
Anthropic::Beta::BetaWebSearchTool20250305
|
640
|
+
)
|
641
|
+
end
|
642
|
+
|
643
|
+
sig do
|
644
|
+
override.returns(
|
645
|
+
T::Array[
|
646
|
+
Anthropic::Beta::MessageCountTokensParams::Tool::Variants
|
647
|
+
]
|
648
|
+
)
|
649
|
+
end
|
650
|
+
def self.variants
|
651
|
+
end
|
652
|
+
end
|
653
|
+
end
|
654
|
+
end
|
655
|
+
end
|
656
|
+
end
|