anthropic-sdk-beta 0.1.0.pre.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +343 -0
- data/lib/anthropic/bedrock/client.rb +261 -0
- data/lib/anthropic/client.rb +107 -0
- data/lib/anthropic/errors.rb +192 -0
- data/lib/anthropic/internal/jsonl_stream.rb +26 -0
- data/lib/anthropic/internal/page.rb +109 -0
- data/lib/anthropic/internal/stream.rb +58 -0
- data/lib/anthropic/internal/transport/base_client.rb +473 -0
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +193 -0
- data/lib/anthropic/internal/type/array_of.rb +128 -0
- data/lib/anthropic/internal/type/base_model.rb +380 -0
- data/lib/anthropic/internal/type/base_page.rb +46 -0
- data/lib/anthropic/internal/type/base_stream.rb +73 -0
- data/lib/anthropic/internal/type/boolean.rb +58 -0
- data/lib/anthropic/internal/type/converter.rb +247 -0
- data/lib/anthropic/internal/type/enum.rb +113 -0
- data/lib/anthropic/internal/type/hash_of.rb +148 -0
- data/lib/anthropic/internal/type/io_like.rb +75 -0
- data/lib/anthropic/internal/type/request_parameters.rb +49 -0
- data/lib/anthropic/internal/type/union.rb +216 -0
- data/lib/anthropic/internal/type/unknown.rb +62 -0
- data/lib/anthropic/internal/util.rb +755 -0
- data/lib/anthropic/internal.rb +8 -0
- data/lib/anthropic/models/anthropic_beta.rb +44 -0
- data/lib/anthropic/models/api_error_object.rb +25 -0
- data/lib/anthropic/models/authentication_error.rb +25 -0
- data/lib/anthropic/models/base64_image_source.rb +47 -0
- data/lib/anthropic/models/base64_pdf_source.rb +31 -0
- data/lib/anthropic/models/beta/beta_base64_image_source.rb +51 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +76 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_source.rb +35 -0
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +23 -0
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_char_location_param.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location_param.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +63 -0
- data/lib/anthropic/models/beta/beta_citation_page_location_param.rb +63 -0
- data/lib/anthropic/models/beta/beta_citations_config_param.rb +27 -0
- data/lib/anthropic/models/beta/beta_citations_delta.rb +46 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +27 -0
- data/lib/anthropic/models/beta/beta_content_block_param.rb +33 -0
- data/lib/anthropic/models/beta/beta_content_block_source.rb +45 -0
- data/lib/anthropic/models/beta/beta_content_block_source_content.rb +23 -0
- data/lib/anthropic/models/beta/beta_image_block_param.rb +50 -0
- data/lib/anthropic/models/beta/beta_input_json_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_message.rb +143 -0
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +24 -0
- data/lib/anthropic/models/beta/beta_message_param.rb +59 -0
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +26 -0
- data/lib/anthropic/models/beta/beta_metadata.rb +28 -0
- data/lib/anthropic/models/beta/beta_model_info.rb +49 -0
- data/lib/anthropic/models/beta/beta_plain_text_source.rb +35 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +35 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +55 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rb +29 -0
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +71 -0
- data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +29 -0
- data/lib/anthropic/models/beta/beta_raw_message_stop_event.rb +23 -0
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +31 -0
- data/lib/anthropic/models/beta/beta_redacted_thinking_block.rb +29 -0
- data/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rb +29 -0
- data/lib/anthropic/models/beta/beta_signature_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_stop_reason.rb +24 -0
- data/lib/anthropic/models/beta/beta_text_block.rb +42 -0
- data/lib/anthropic/models/beta/beta_text_block_param.rb +43 -0
- data/lib/anthropic/models/beta/beta_text_citation.rb +25 -0
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_text_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_thinking_block.rb +35 -0
- data/lib/anthropic/models/beta/beta_thinking_block_param.rb +35 -0
- data/lib/anthropic/models/beta/beta_thinking_config_disabled.rb +23 -0
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +38 -0
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +32 -0
- data/lib/anthropic/models/beta/beta_thinking_delta.rb +29 -0
- data/lib/anthropic/models/beta/beta_tool.rb +103 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_choice.rb +33 -0
- data/lib/anthropic/models/beta/beta_tool_choice_any.rb +39 -0
- data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +39 -0
- data/lib/anthropic/models/beta/beta_tool_choice_none.rb +25 -0
- data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +46 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +69 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +69 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +85 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +31 -0
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +41 -0
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +47 -0
- data/lib/anthropic/models/beta/beta_url_image_source.rb +29 -0
- data/lib/anthropic/models/beta/beta_url_pdf_source.rb +29 -0
- data/lib/anthropic/models/beta/beta_usage.rb +45 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +315 -0
- data/lib/anthropic/models/beta/message_create_params.rb +395 -0
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +463 -0
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +71 -0
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +34 -0
- data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +34 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +140 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rb +23 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +29 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rb +23 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +42 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +60 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +32 -0
- data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +29 -0
- data/lib/anthropic/models/beta/model_list_params.rb +58 -0
- data/lib/anthropic/models/beta/model_retrieve_params.rb +21 -0
- data/lib/anthropic/models/beta_api_error.rb +25 -0
- data/lib/anthropic/models/beta_authentication_error.rb +25 -0
- data/lib/anthropic/models/beta_billing_error.rb +25 -0
- data/lib/anthropic/models/beta_error.rb +33 -0
- data/lib/anthropic/models/beta_error_response.rb +25 -0
- data/lib/anthropic/models/beta_gateway_timeout_error.rb +25 -0
- data/lib/anthropic/models/beta_invalid_request_error.rb +25 -0
- data/lib/anthropic/models/beta_not_found_error.rb +25 -0
- data/lib/anthropic/models/beta_overloaded_error.rb +25 -0
- data/lib/anthropic/models/beta_permission_error.rb +25 -0
- data/lib/anthropic/models/beta_rate_limit_error.rb +25 -0
- data/lib/anthropic/models/billing_error.rb +25 -0
- data/lib/anthropic/models/cache_control_ephemeral.rb +19 -0
- data/lib/anthropic/models/citation_char_location.rb +59 -0
- data/lib/anthropic/models/citation_char_location_param.rb +59 -0
- data/lib/anthropic/models/citation_content_block_location.rb +59 -0
- data/lib/anthropic/models/citation_content_block_location_param.rb +59 -0
- data/lib/anthropic/models/citation_page_location.rb +59 -0
- data/lib/anthropic/models/citation_page_location_param.rb +59 -0
- data/lib/anthropic/models/citations_config_param.rb +23 -0
- data/lib/anthropic/models/citations_delta.rb +42 -0
- data/lib/anthropic/models/completion.rb +63 -0
- data/lib/anthropic/models/completion_create_params.rb +152 -0
- data/lib/anthropic/models/content_block.rb +23 -0
- data/lib/anthropic/models/content_block_param.rb +29 -0
- data/lib/anthropic/models/content_block_source.rb +41 -0
- data/lib/anthropic/models/content_block_source_content.rb +19 -0
- data/lib/anthropic/models/document_block_param.rb +72 -0
- data/lib/anthropic/models/error_object.rb +33 -0
- data/lib/anthropic/models/error_response.rb +25 -0
- data/lib/anthropic/models/gateway_timeout_error.rb +25 -0
- data/lib/anthropic/models/image_block_param.rb +46 -0
- data/lib/anthropic/models/input_json_delta.rb +25 -0
- data/lib/anthropic/models/invalid_request_error.rb +25 -0
- data/lib/anthropic/models/message.rb +138 -0
- data/lib/anthropic/models/message_count_tokens_params.rb +265 -0
- data/lib/anthropic/models/message_count_tokens_tool.rb +19 -0
- data/lib/anthropic/models/message_create_params.rb +380 -0
- data/lib/anthropic/models/message_delta_usage.rb +20 -0
- data/lib/anthropic/models/message_param.rb +55 -0
- data/lib/anthropic/models/message_tokens_count.rb +22 -0
- data/lib/anthropic/models/messages/batch_cancel_params.rb +21 -0
- data/lib/anthropic/models/messages/batch_create_params.rb +449 -0
- data/lib/anthropic/models/messages/batch_delete_params.rb +21 -0
- data/lib/anthropic/models/messages/batch_list_params.rb +58 -0
- data/lib/anthropic/models/messages/batch_results_params.rb +21 -0
- data/lib/anthropic/models/messages/batch_retrieve_params.rb +21 -0
- data/lib/anthropic/models/messages/deleted_message_batch.rb +32 -0
- data/lib/anthropic/models/messages/message_batch.rb +139 -0
- data/lib/anthropic/models/messages/message_batch_canceled_result.rb +23 -0
- data/lib/anthropic/models/messages/message_batch_errored_result.rb +29 -0
- data/lib/anthropic/models/messages/message_batch_expired_result.rb +23 -0
- data/lib/anthropic/models/messages/message_batch_individual_response.rb +42 -0
- data/lib/anthropic/models/messages/message_batch_request_counts.rb +60 -0
- data/lib/anthropic/models/messages/message_batch_result.rb +32 -0
- data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +29 -0
- data/lib/anthropic/models/metadata.rb +24 -0
- data/lib/anthropic/models/model.rb +93 -0
- data/lib/anthropic/models/model_info.rb +45 -0
- data/lib/anthropic/models/model_list_params.rb +56 -0
- data/lib/anthropic/models/model_retrieve_params.rb +19 -0
- data/lib/anthropic/models/not_found_error.rb +25 -0
- data/lib/anthropic/models/overloaded_error.rb +25 -0
- data/lib/anthropic/models/permission_error.rb +25 -0
- data/lib/anthropic/models/plain_text_source.rb +31 -0
- data/lib/anthropic/models/rate_limit_error.rb +25 -0
- data/lib/anthropic/models/raw_content_block_delta.rb +25 -0
- data/lib/anthropic/models/raw_content_block_delta_event.rb +31 -0
- data/lib/anthropic/models/raw_content_block_start_event.rb +50 -0
- data/lib/anthropic/models/raw_content_block_stop_event.rb +25 -0
- data/lib/anthropic/models/raw_message_delta_event.rb +67 -0
- data/lib/anthropic/models/raw_message_start_event.rb +25 -0
- data/lib/anthropic/models/raw_message_stop_event.rb +19 -0
- data/lib/anthropic/models/raw_message_stream_event.rb +27 -0
- data/lib/anthropic/models/redacted_thinking_block.rb +25 -0
- data/lib/anthropic/models/redacted_thinking_block_param.rb +25 -0
- data/lib/anthropic/models/signature_delta.rb +25 -0
- data/lib/anthropic/models/stop_reason.rb +20 -0
- data/lib/anthropic/models/text_block.rb +38 -0
- data/lib/anthropic/models/text_block_param.rb +39 -0
- data/lib/anthropic/models/text_citation.rb +21 -0
- data/lib/anthropic/models/text_citation_param.rb +21 -0
- data/lib/anthropic/models/text_delta.rb +25 -0
- data/lib/anthropic/models/thinking_block.rb +31 -0
- data/lib/anthropic/models/thinking_block_param.rb +31 -0
- data/lib/anthropic/models/thinking_config_disabled.rb +19 -0
- data/lib/anthropic/models/thinking_config_enabled.rb +34 -0
- data/lib/anthropic/models/thinking_config_param.rb +28 -0
- data/lib/anthropic/models/thinking_delta.rb +25 -0
- data/lib/anthropic/models/tool.rb +80 -0
- data/lib/anthropic/models/tool_bash_20250124.rb +34 -0
- data/lib/anthropic/models/tool_choice.rb +29 -0
- data/lib/anthropic/models/tool_choice_any.rb +35 -0
- data/lib/anthropic/models/tool_choice_auto.rb +35 -0
- data/lib/anthropic/models/tool_choice_none.rb +21 -0
- data/lib/anthropic/models/tool_choice_tool.rb +42 -0
- data/lib/anthropic/models/tool_result_block_param.rb +81 -0
- data/lib/anthropic/models/tool_text_editor_20250124.rb +34 -0
- data/lib/anthropic/models/tool_union.rb +19 -0
- data/lib/anthropic/models/tool_use_block.rb +37 -0
- data/lib/anthropic/models/tool_use_block_param.rb +43 -0
- data/lib/anthropic/models/url_image_source.rb +25 -0
- data/lib/anthropic/models/url_pdf_source.rb +25 -0
- data/lib/anthropic/models/usage.rb +41 -0
- data/lib/anthropic/request_options.rb +75 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +198 -0
- data/lib/anthropic/resources/beta/messages.rb +158 -0
- data/lib/anthropic/resources/beta/models.rb +65 -0
- data/lib/anthropic/resources/beta.rb +22 -0
- data/lib/anthropic/resources/completions.rb +100 -0
- data/lib/anthropic/resources/messages/batches.rb +179 -0
- data/lib/anthropic/resources/messages.rb +145 -0
- data/lib/anthropic/resources/models.rb +63 -0
- data/lib/anthropic/version.rb +5 -0
- data/lib/anthropic/vertex/client.rb +210 -0
- data/lib/anthropic.rb +265 -0
- data/manifest.yaml +15 -0
- data/rbi/lib/anthropic/bedrock/client.rbi +80 -0
- data/rbi/lib/anthropic/client.rbi +70 -0
- data/rbi/lib/anthropic/errors.rbi +143 -0
- data/rbi/lib/anthropic/internal/jsonl_stream.rbi +16 -0
- data/rbi/lib/anthropic/internal/page.rbi +26 -0
- data/rbi/lib/anthropic/internal/stream.rbi +16 -0
- data/rbi/lib/anthropic/internal/transport/base_client.rbi +204 -0
- data/rbi/lib/anthropic/internal/transport/pooled_net_requester.rbi +60 -0
- data/rbi/lib/anthropic/internal/type/array_of.rbi +82 -0
- data/rbi/lib/anthropic/internal/type/base_model.rbi +197 -0
- data/rbi/lib/anthropic/internal/type/base_page.rbi +36 -0
- data/rbi/lib/anthropic/internal/type/base_stream.rbi +51 -0
- data/rbi/lib/anthropic/internal/type/boolean.rbi +49 -0
- data/rbi/lib/anthropic/internal/type/converter.rbi +112 -0
- data/rbi/lib/anthropic/internal/type/enum.rbi +63 -0
- data/rbi/lib/anthropic/internal/type/hash_of.rbi +82 -0
- data/rbi/lib/anthropic/internal/type/io_like.rbi +47 -0
- data/rbi/lib/anthropic/internal/type/request_parameters.rbi +21 -0
- data/rbi/lib/anthropic/internal/type/union.rbi +68 -0
- data/rbi/lib/anthropic/internal/type/unknown.rbi +41 -0
- data/rbi/lib/anthropic/internal/util.rbi +282 -0
- data/rbi/lib/anthropic/internal.rbi +12 -0
- data/rbi/lib/anthropic/models/anthropic_beta.rbi +30 -0
- data/rbi/lib/anthropic/models/api_error_object.rbi +19 -0
- data/rbi/lib/anthropic/models/authentication_error.rbi +19 -0
- data/rbi/lib/anthropic/models/base64_image_source.rbi +46 -0
- data/rbi/lib/anthropic/models/base64_pdf_source.rbi +22 -0
- data/rbi/lib/anthropic/models/beta/beta_base64_image_source.rbi +56 -0
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_block.rbi +104 -0
- data/rbi/lib/anthropic/models/beta/beta_base64_pdf_source.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_cache_control_ephemeral.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_char_location.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_char_location_param.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_content_block_location.rbi +63 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_content_block_location_param.rbi +63 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_page_location.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citation_page_location_param.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_citations_config_param.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_citations_delta.rbi +66 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block_param.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block_source.rbi +74 -0
- data/rbi/lib/anthropic/models/beta/beta_content_block_source_content.rbi +19 -0
- data/rbi/lib/anthropic/models/beta/beta_image_block_param.rbi +68 -0
- data/rbi/lib/anthropic/models/beta/beta_input_json_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_message.rbi +180 -0
- data/rbi/lib/anthropic/models/beta/beta_message_delta_usage.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_message_param.rbi +126 -0
- data/rbi/lib/anthropic/models/beta/beta_message_tokens_count.rbi +22 -0
- data/rbi/lib/anthropic/models/beta/beta_metadata.rbi +25 -0
- data/rbi/lib/anthropic/models/beta/beta_model_info.rbi +38 -0
- data/rbi/lib/anthropic/models/beta/beta_plain_text_source.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +65 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_start_event.rbi +74 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_delta_event.rbi +96 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_start_event.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_stop_event.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/beta_raw_message_stream_event.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_redacted_thinking_block.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_signature_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_stop_reason.rbi +24 -0
- data/rbi/lib/anthropic/models/beta/beta_text_block.rbi +76 -0
- data/rbi/lib/anthropic/models/beta/beta_text_block_param.rbi +84 -0
- data/rbi/lib/anthropic/models/beta/beta_text_citation.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_text_citation_param.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_text_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_block.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_block_param.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_disabled.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_enabled.rbi +32 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_config_param.rbi +30 -0
- data/rbi/lib/anthropic/models/beta/beta_thinking_delta.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_tool.rbi +112 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20241022.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_bash_20250124.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_any.rbi +31 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_auto.rbi +31 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_none.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_choice_tool.rbi +37 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +77 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +77 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_result_block_param.rbi +129 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +49 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_union.rbi +21 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/beta_tool_use_block_param.rbi +60 -0
- data/rbi/lib/anthropic/models/beta/beta_url_image_source.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_url_pdf_source.rbi +23 -0
- data/rbi/lib/anthropic/models/beta/beta_usage.rbi +52 -0
- data/rbi/lib/anthropic/models/beta/message_count_tokens_params.rbi +409 -0
- data/rbi/lib/anthropic/models/beta/message_create_params.rbi +489 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_cancel_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_create_params.rbi +572 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_delete_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_list_params.rbi +72 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_results_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/batch_retrieve_params.rbi +41 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +27 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch.rbi +148 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +20 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +68 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rbi +63 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_result.rbi +26 -0
- data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +29 -0
- data/rbi/lib/anthropic/models/beta/model_list_params.rbi +59 -0
- data/rbi/lib/anthropic/models/beta/model_retrieve_params.rbi +21 -0
- data/rbi/lib/anthropic/models/beta_api_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_authentication_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_billing_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_error.rbi +17 -0
- data/rbi/lib/anthropic/models/beta_error_response.rbi +68 -0
- data/rbi/lib/anthropic/models/beta_gateway_timeout_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_invalid_request_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_not_found_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_overloaded_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_permission_error.rbi +19 -0
- data/rbi/lib/anthropic/models/beta_rate_limit_error.rbi +19 -0
- data/rbi/lib/anthropic/models/billing_error.rbi +19 -0
- data/rbi/lib/anthropic/models/cache_control_ephemeral.rbi +16 -0
- data/rbi/lib/anthropic/models/citation_char_location.rbi +61 -0
- data/rbi/lib/anthropic/models/citation_char_location_param.rbi +61 -0
- data/rbi/lib/anthropic/models/citation_content_block_location.rbi +59 -0
- data/rbi/lib/anthropic/models/citation_content_block_location_param.rbi +59 -0
- data/rbi/lib/anthropic/models/citation_page_location.rbi +61 -0
- data/rbi/lib/anthropic/models/citation_page_location_param.rbi +61 -0
- data/rbi/lib/anthropic/models/citations_config_param.rbi +19 -0
- data/rbi/lib/anthropic/models/citations_delta.rbi +62 -0
- data/rbi/lib/anthropic/models/completion.rbi +65 -0
- data/rbi/lib/anthropic/models/completion_create_params.rbi +142 -0
- data/rbi/lib/anthropic/models/content_block.rbi +17 -0
- data/rbi/lib/anthropic/models/content_block_param.rbi +17 -0
- data/rbi/lib/anthropic/models/content_block_source.rbi +56 -0
- data/rbi/lib/anthropic/models/content_block_source_content.rbi +12 -0
- data/rbi/lib/anthropic/models/document_block_param.rbi +97 -0
- data/rbi/lib/anthropic/models/error_object.rbi +17 -0
- data/rbi/lib/anthropic/models/error_response.rbi +68 -0
- data/rbi/lib/anthropic/models/gateway_timeout_error.rbi +19 -0
- data/rbi/lib/anthropic/models/image_block_param.rbi +57 -0
- data/rbi/lib/anthropic/models/input_json_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/invalid_request_error.rbi +19 -0
- data/rbi/lib/anthropic/models/message.rbi +176 -0
- data/rbi/lib/anthropic/models/message_count_tokens_params.rbi +363 -0
- data/rbi/lib/anthropic/models/message_count_tokens_tool.rbi +17 -0
- data/rbi/lib/anthropic/models/message_create_params.rbi +453 -0
- data/rbi/lib/anthropic/models/message_delta_usage.rbi +17 -0
- data/rbi/lib/anthropic/models/message_param.rbi +121 -0
- data/rbi/lib/anthropic/models/message_tokens_count.rbi +18 -0
- data/rbi/lib/anthropic/models/messages/batch_cancel_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/batch_create_params.rbi +535 -0
- data/rbi/lib/anthropic/models/messages/batch_delete_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/batch_list_params.rbi +59 -0
- data/rbi/lib/anthropic/models/messages/batch_results_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/batch_retrieve_params.rbi +21 -0
- data/rbi/lib/anthropic/models/messages/deleted_message_batch.rbi +25 -0
- data/rbi/lib/anthropic/models/messages/message_batch.rbi +143 -0
- data/rbi/lib/anthropic/models/messages/message_batch_canceled_result.rbi +20 -0
- data/rbi/lib/anthropic/models/messages/message_batch_errored_result.rbi +29 -0
- data/rbi/lib/anthropic/models/messages/message_batch_expired_result.rbi +20 -0
- data/rbi/lib/anthropic/models/messages/message_batch_individual_response.rbi +68 -0
- data/rbi/lib/anthropic/models/messages/message_batch_request_counts.rbi +63 -0
- data/rbi/lib/anthropic/models/messages/message_batch_result.rbi +26 -0
- data/rbi/lib/anthropic/models/messages/message_batch_succeeded_result.rbi +29 -0
- data/rbi/lib/anthropic/models/metadata.rbi +21 -0
- data/rbi/lib/anthropic/models/model.rbi +54 -0
- data/rbi/lib/anthropic/models/model_info.rbi +34 -0
- data/rbi/lib/anthropic/models/model_list_params.rbi +57 -0
- data/rbi/lib/anthropic/models/model_retrieve_params.rbi +19 -0
- data/rbi/lib/anthropic/models/not_found_error.rbi +19 -0
- data/rbi/lib/anthropic/models/overloaded_error.rbi +19 -0
- data/rbi/lib/anthropic/models/permission_error.rbi +19 -0
- data/rbi/lib/anthropic/models/plain_text_source.rbi +22 -0
- data/rbi/lib/anthropic/models/rate_limit_error.rbi +19 -0
- data/rbi/lib/anthropic/models/raw_content_block_delta.rbi +17 -0
- data/rbi/lib/anthropic/models/raw_content_block_delta_event.rbi +61 -0
- data/rbi/lib/anthropic/models/raw_content_block_start_event.rbi +70 -0
- data/rbi/lib/anthropic/models/raw_content_block_stop_event.rbi +19 -0
- data/rbi/lib/anthropic/models/raw_message_delta_event.rbi +81 -0
- data/rbi/lib/anthropic/models/raw_message_start_event.rbi +25 -0
- data/rbi/lib/anthropic/models/raw_message_stop_event.rbi +16 -0
- data/rbi/lib/anthropic/models/raw_message_stream_event.rbi +17 -0
- data/rbi/lib/anthropic/models/redacted_thinking_block.rbi +19 -0
- data/rbi/lib/anthropic/models/redacted_thinking_block_param.rbi +19 -0
- data/rbi/lib/anthropic/models/signature_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/stop_reason.rbi +20 -0
- data/rbi/lib/anthropic/models/text_block.rbi +72 -0
- data/rbi/lib/anthropic/models/text_block_param.rbi +80 -0
- data/rbi/lib/anthropic/models/text_citation.rbi +17 -0
- data/rbi/lib/anthropic/models/text_citation_param.rbi +17 -0
- data/rbi/lib/anthropic/models/text_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/thinking_block.rbi +22 -0
- data/rbi/lib/anthropic/models/thinking_block_param.rbi +22 -0
- data/rbi/lib/anthropic/models/thinking_config_disabled.rbi +16 -0
- data/rbi/lib/anthropic/models/thinking_config_enabled.rbi +28 -0
- data/rbi/lib/anthropic/models/thinking_config_param.rbi +21 -0
- data/rbi/lib/anthropic/models/thinking_delta.rbi +19 -0
- data/rbi/lib/anthropic/models/tool.rbi +88 -0
- data/rbi/lib/anthropic/models/tool_bash_20250124.rbi +43 -0
- data/rbi/lib/anthropic/models/tool_choice.rbi +19 -0
- data/rbi/lib/anthropic/models/tool_choice_any.rbi +27 -0
- data/rbi/lib/anthropic/models/tool_choice_auto.rbi +27 -0
- data/rbi/lib/anthropic/models/tool_choice_none.rbi +17 -0
- data/rbi/lib/anthropic/models/tool_choice_tool.rbi +33 -0
- data/rbi/lib/anthropic/models/tool_result_block_param.rbi +102 -0
- data/rbi/lib/anthropic/models/tool_text_editor_20250124.rbi +43 -0
- data/rbi/lib/anthropic/models/tool_union.rbi +17 -0
- data/rbi/lib/anthropic/models/tool_use_block.rbi +25 -0
- data/rbi/lib/anthropic/models/tool_use_block_param.rbi +56 -0
- data/rbi/lib/anthropic/models/url_image_source.rbi +19 -0
- data/rbi/lib/anthropic/models/url_pdf_source.rbi +19 -0
- data/rbi/lib/anthropic/models/usage.rbi +47 -0
- data/rbi/lib/anthropic/request_options.rbi +46 -0
- data/rbi/lib/anthropic/resources/beta/messages/batches.rbi +164 -0
- data/rbi/lib/anthropic/resources/beta/messages.rbi +823 -0
- data/rbi/lib/anthropic/resources/beta/models.rbi +55 -0
- data/rbi/lib/anthropic/resources/beta.rbi +17 -0
- data/rbi/lib/anthropic/resources/completions.rbi +190 -0
- data/rbi/lib/anthropic/resources/messages/batches.rbi +142 -0
- data/rbi/lib/anthropic/resources/messages.rbi +800 -0
- data/rbi/lib/anthropic/resources/models.rbi +53 -0
- data/rbi/lib/anthropic/version.rbi +5 -0
- data/rbi/lib/anthropic/vertex/client.rbi +56 -0
- data/sig/anthropic/bedrock/client.rbs +41 -0
- data/sig/anthropic/client.rbs +39 -0
- data/sig/anthropic/errors.rbs +101 -0
- data/sig/anthropic/internal/jsonl_stream.rbs +9 -0
- data/sig/anthropic/internal/page.rbs +17 -0
- data/sig/anthropic/internal/stream.rbs +9 -0
- data/sig/anthropic/internal/transport/base_client.rbs +110 -0
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +41 -0
- data/sig/anthropic/internal/type/array_of.rbs +41 -0
- data/sig/anthropic/internal/type/base_model.rbs +82 -0
- data/sig/anthropic/internal/type/base_page.rbs +24 -0
- data/sig/anthropic/internal/type/base_stream.rbs +31 -0
- data/sig/anthropic/internal/type/boolean.rbs +23 -0
- data/sig/anthropic/internal/type/converter.rbs +50 -0
- data/sig/anthropic/internal/type/enum.rbs +27 -0
- data/sig/anthropic/internal/type/hash_of.rbs +41 -0
- data/sig/anthropic/internal/type/io_like.rbs +23 -0
- data/sig/anthropic/internal/type/request_parameters.rbs +15 -0
- data/sig/anthropic/internal/type/union.rbs +45 -0
- data/sig/anthropic/internal/type/unknown.rbs +23 -0
- data/sig/anthropic/internal/util.rbs +154 -0
- data/sig/anthropic/internal.rbs +5 -0
- data/sig/anthropic/models/anthropic_beta.rbs +36 -0
- data/sig/anthropic/models/api_error_object.rbs +15 -0
- data/sig/anthropic/models/authentication_error.rbs +15 -0
- data/sig/anthropic/models/base64_image_source.rbs +40 -0
- data/sig/anthropic/models/base64_pdf_source.rbs +22 -0
- data/sig/anthropic/models/beta/beta_base64_image_source.rbs +44 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +58 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +26 -0
- data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +17 -0
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +42 -0
- data/sig/anthropic/models/beta/beta_citations_config_param.rbs +19 -0
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +37 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +19 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +22 -0
- data/sig/anthropic/models/beta/beta_content_block_source.rbs +41 -0
- data/sig/anthropic/models/beta/beta_content_block_source_content.rbs +17 -0
- data/sig/anthropic/models/beta/beta_image_block_param.rbs +40 -0
- data/sig/anthropic/models/beta/beta_input_json_delta.rbs +20 -0
- data/sig/anthropic/models/beta/beta_message.rbs +50 -0
- data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +17 -0
- data/sig/anthropic/models/beta/beta_message_param.rbs +51 -0
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +17 -0
- data/sig/anthropic/models/beta/beta_metadata.rbs +17 -0
- data/sig/anthropic/models/beta/beta_model_info.rbs +29 -0
- data/sig/anthropic/models/beta/beta_plain_text_source.rbs +26 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_delta.rbs +20 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_delta_event.rbs +30 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +42 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_stop_event.rbs +20 -0
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +49 -0
- data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +23 -0
- data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +17 -0
- data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +21 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +20 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +20 -0
- data/sig/anthropic/models/beta/beta_signature_delta.rbs +19 -0
- data/sig/anthropic/models/beta/beta_stop_reason.rbs +21 -0
- data/sig/anthropic/models/beta/beta_text_block.rbs +30 -0
- data/sig/anthropic/models/beta/beta_text_block_param.rbs +34 -0
- data/sig/anthropic/models/beta/beta_text_citation.rbs +18 -0
- data/sig/anthropic/models/beta/beta_text_citation_param.rbs +18 -0
- data/sig/anthropic/models/beta/beta_text_delta.rbs +19 -0
- data/sig/anthropic/models/beta/beta_thinking_block.rbs +26 -0
- data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +26 -0
- data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +17 -0
- data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +20 -0
- data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +17 -0
- data/sig/anthropic/models/beta/beta_thinking_delta.rbs +19 -0
- data/sig/anthropic/models/beta/beta_tool.rbs +62 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_choice.rbs +19 -0
- data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +22 -0
- data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +22 -0
- data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +17 -0
- data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +28 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +42 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +42 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +69 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +30 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +22 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +38 -0
- data/sig/anthropic/models/beta/beta_url_image_source.rbs +19 -0
- data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +19 -0
- data/sig/anthropic/models/beta/beta_usage.rbs +34 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +98 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +119 -0
- data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +161 -0
- data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/batch_list_params.rbs +49 -0
- data/sig/anthropic/models/beta/messages/batch_results_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +29 -0
- data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +20 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +70 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +17 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +23 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +17 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +26 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +38 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_result.rbs +19 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbs +23 -0
- data/sig/anthropic/models/beta/model_list_params.rbs +35 -0
- data/sig/anthropic/models/beta/model_retrieve_params.rbs +17 -0
- data/sig/anthropic/models/beta_api_error.rbs +15 -0
- data/sig/anthropic/models/beta_authentication_error.rbs +16 -0
- data/sig/anthropic/models/beta_billing_error.rbs +15 -0
- data/sig/anthropic/models/beta_error.rbs +20 -0
- data/sig/anthropic/models/beta_error_response.rbs +19 -0
- data/sig/anthropic/models/beta_gateway_timeout_error.rbs +15 -0
- data/sig/anthropic/models/beta_invalid_request_error.rbs +16 -0
- data/sig/anthropic/models/beta_not_found_error.rbs +15 -0
- data/sig/anthropic/models/beta_overloaded_error.rbs +15 -0
- data/sig/anthropic/models/beta_permission_error.rbs +15 -0
- data/sig/anthropic/models/beta_rate_limit_error.rbs +15 -0
- data/sig/anthropic/models/billing_error.rbs +15 -0
- data/sig/anthropic/models/cache_control_ephemeral.rbs +13 -0
- data/sig/anthropic/models/citation_char_location.rbs +38 -0
- data/sig/anthropic/models/citation_char_location_param.rbs +38 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +38 -0
- data/sig/anthropic/models/citation_content_block_location_param.rbs +38 -0
- data/sig/anthropic/models/citation_page_location.rbs +38 -0
- data/sig/anthropic/models/citation_page_location_param.rbs +38 -0
- data/sig/anthropic/models/citations_config_param.rbs +15 -0
- data/sig/anthropic/models/citations_delta.rbs +33 -0
- data/sig/anthropic/models/completion.rbs +34 -0
- data/sig/anthropic/models/completion_create_params.rbs +63 -0
- data/sig/anthropic/models/content_block.rbs +15 -0
- data/sig/anthropic/models/content_block_param.rbs +18 -0
- data/sig/anthropic/models/content_block_source.rbs +36 -0
- data/sig/anthropic/models/content_block_source_content.rbs +12 -0
- data/sig/anthropic/models/document_block_param.rbs +54 -0
- data/sig/anthropic/models/error_object.rbs +20 -0
- data/sig/anthropic/models/error_response.rbs +19 -0
- data/sig/anthropic/models/gateway_timeout_error.rbs +15 -0
- data/sig/anthropic/models/image_block_param.rbs +35 -0
- data/sig/anthropic/models/input_json_delta.rbs +15 -0
- data/sig/anthropic/models/invalid_request_error.rbs +16 -0
- data/sig/anthropic/models/message.rbs +46 -0
- data/sig/anthropic/models/message_count_tokens_params.rbs +71 -0
- data/sig/anthropic/models/message_count_tokens_tool.rbs +14 -0
- data/sig/anthropic/models/message_create_params.rbs +107 -0
- data/sig/anthropic/models/message_delta_usage.rbs +13 -0
- data/sig/anthropic/models/message_param.rbs +46 -0
- data/sig/anthropic/models/message_tokens_count.rbs +13 -0
- data/sig/anthropic/models/messages/batch_cancel_params.rbs +17 -0
- data/sig/anthropic/models/messages/batch_create_params.rbs +150 -0
- data/sig/anthropic/models/messages/batch_delete_params.rbs +17 -0
- data/sig/anthropic/models/messages/batch_list_params.rbs +35 -0
- data/sig/anthropic/models/messages/batch_results_params.rbs +17 -0
- data/sig/anthropic/models/messages/batch_retrieve_params.rbs +17 -0
- data/sig/anthropic/models/messages/deleted_message_batch.rbs +17 -0
- data/sig/anthropic/models/messages/message_batch.rbs +70 -0
- data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +17 -0
- data/sig/anthropic/models/messages/message_batch_errored_result.rbs +23 -0
- data/sig/anthropic/models/messages/message_batch_expired_result.rbs +17 -0
- data/sig/anthropic/models/messages/message_batch_individual_response.rbs +26 -0
- data/sig/anthropic/models/messages/message_batch_request_counts.rbs +38 -0
- data/sig/anthropic/models/messages/message_batch_result.rbs +19 -0
- data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +23 -0
- data/sig/anthropic/models/metadata.rbs +13 -0
- data/sig/anthropic/models/model.rbs +73 -0
- data/sig/anthropic/models/model_info.rbs +25 -0
- data/sig/anthropic/models/model_list_params.rbs +33 -0
- data/sig/anthropic/models/model_retrieve_params.rbs +15 -0
- data/sig/anthropic/models/not_found_error.rbs +15 -0
- data/sig/anthropic/models/overloaded_error.rbs +15 -0
- data/sig/anthropic/models/permission_error.rbs +15 -0
- data/sig/anthropic/models/plain_text_source.rbs +22 -0
- data/sig/anthropic/models/rate_limit_error.rbs +15 -0
- data/sig/anthropic/models/raw_content_block_delta.rbs +16 -0
- data/sig/anthropic/models/raw_content_block_delta_event.rbs +26 -0
- data/sig/anthropic/models/raw_content_block_start_event.rbs +38 -0
- data/sig/anthropic/models/raw_content_block_stop_event.rbs +16 -0
- data/sig/anthropic/models/raw_message_delta_event.rbs +42 -0
- data/sig/anthropic/models/raw_message_start_event.rbs +19 -0
- data/sig/anthropic/models/raw_message_stop_event.rbs +13 -0
- data/sig/anthropic/models/raw_message_stream_event.rbs +17 -0
- data/sig/anthropic/models/redacted_thinking_block.rbs +15 -0
- data/sig/anthropic/models/redacted_thinking_block_param.rbs +16 -0
- data/sig/anthropic/models/signature_delta.rbs +15 -0
- data/sig/anthropic/models/stop_reason.rbs +16 -0
- data/sig/anthropic/models/text_block.rbs +26 -0
- data/sig/anthropic/models/text_block_param.rbs +30 -0
- data/sig/anthropic/models/text_citation.rbs +14 -0
- data/sig/anthropic/models/text_citation_param.rbs +14 -0
- data/sig/anthropic/models/text_delta.rbs +15 -0
- data/sig/anthropic/models/thinking_block.rbs +22 -0
- data/sig/anthropic/models/thinking_block_param.rbs +22 -0
- data/sig/anthropic/models/thinking_config_disabled.rbs +13 -0
- data/sig/anthropic/models/thinking_config_enabled.rbs +15 -0
- data/sig/anthropic/models/thinking_config_param.rbs +13 -0
- data/sig/anthropic/models/thinking_delta.rbs +15 -0
- data/sig/anthropic/models/tool.rbs +44 -0
- data/sig/anthropic/models/tool_bash_20250124.rbs +26 -0
- data/sig/anthropic/models/tool_choice.rbs +15 -0
- data/sig/anthropic/models/tool_choice_any.rbs +17 -0
- data/sig/anthropic/models/tool_choice_auto.rbs +17 -0
- data/sig/anthropic/models/tool_choice_none.rbs +13 -0
- data/sig/anthropic/models/tool_choice_tool.rbs +24 -0
- data/sig/anthropic/models/tool_result_block_param.rbs +64 -0
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +26 -0
- data/sig/anthropic/models/tool_union.rbs +14 -0
- data/sig/anthropic/models/tool_use_block.rbs +25 -0
- data/sig/anthropic/models/tool_use_block_param.rbs +34 -0
- data/sig/anthropic/models/url_image_source.rbs +15 -0
- data/sig/anthropic/models/url_pdf_source.rbs +15 -0
- data/sig/anthropic/models/usage.rbs +30 -0
- data/sig/anthropic/request_options.rbs +34 -0
- data/sig/anthropic/resources/beta/messages/batches.rbs +49 -0
- data/sig/anthropic/resources/beta/messages.rbs +56 -0
- data/sig/anthropic/resources/beta/models.rbs +21 -0
- data/sig/anthropic/resources/beta.rbs +11 -0
- data/sig/anthropic/resources/completions.rbs +31 -0
- data/sig/anthropic/resources/messages/batches.rbs +41 -0
- data/sig/anthropic/resources/messages.rbs +51 -0
- data/sig/anthropic/resources/models.rbs +19 -0
- data/sig/anthropic/version.rbs +3 -0
- data/sig/anthropic/vertex/client.rbs +34 -0
- metadata +746 -0
@@ -0,0 +1,176 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class Message < Anthropic::Internal::Type::BaseModel
|
6
|
+
# Unique object identifier.
|
7
|
+
#
|
8
|
+
# The format and length of IDs may change over time.
|
9
|
+
sig { returns(String) }
|
10
|
+
attr_accessor :id
|
11
|
+
|
12
|
+
# Content generated by the model.
|
13
|
+
#
|
14
|
+
# This is an array of content blocks, each of which has a `type` that determines
|
15
|
+
# its shape.
|
16
|
+
#
|
17
|
+
# Example:
|
18
|
+
#
|
19
|
+
# ```json
|
20
|
+
# [{ "type": "text", "text": "Hi, I'm Claude." }]
|
21
|
+
# ```
|
22
|
+
#
|
23
|
+
# If the request input `messages` ended with an `assistant` turn, then the
|
24
|
+
# response `content` will continue directly from that last turn. You can use this
|
25
|
+
# to constrain the model's output.
|
26
|
+
#
|
27
|
+
# For example, if the input `messages` were:
|
28
|
+
#
|
29
|
+
# ```json
|
30
|
+
# [
|
31
|
+
# {
|
32
|
+
# "role": "user",
|
33
|
+
# "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
34
|
+
# },
|
35
|
+
# { "role": "assistant", "content": "The best answer is (" }
|
36
|
+
# ]
|
37
|
+
# ```
|
38
|
+
#
|
39
|
+
# Then the response `content` might be:
|
40
|
+
#
|
41
|
+
# ```json
|
42
|
+
# [{ "type": "text", "text": "B)" }]
|
43
|
+
# ```
|
44
|
+
sig do
|
45
|
+
returns(
|
46
|
+
T::Array[
|
47
|
+
T.any(
|
48
|
+
Anthropic::Models::TextBlock,
|
49
|
+
Anthropic::Models::ToolUseBlock,
|
50
|
+
Anthropic::Models::ThinkingBlock,
|
51
|
+
Anthropic::Models::RedactedThinkingBlock
|
52
|
+
)
|
53
|
+
]
|
54
|
+
)
|
55
|
+
end
|
56
|
+
attr_accessor :content
|
57
|
+
|
58
|
+
# The model that will complete your prompt.\n\nSee
|
59
|
+
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
60
|
+
# details and options.
|
61
|
+
sig { returns(T.any(Anthropic::Models::Model::TaggedSymbol, String)) }
|
62
|
+
attr_accessor :model
|
63
|
+
|
64
|
+
# Conversational role of the generated message.
|
65
|
+
#
|
66
|
+
# This will always be `"assistant"`.
|
67
|
+
sig { returns(Symbol) }
|
68
|
+
attr_accessor :role
|
69
|
+
|
70
|
+
# The reason that we stopped.
|
71
|
+
#
|
72
|
+
# This may be one the following values:
|
73
|
+
#
|
74
|
+
# - `"end_turn"`: the model reached a natural stopping point
|
75
|
+
# - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
|
76
|
+
# - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
|
77
|
+
# - `"tool_use"`: the model invoked one or more tools
|
78
|
+
#
|
79
|
+
# In non-streaming mode this value is always non-null. In streaming mode, it is
|
80
|
+
# null in the `message_start` event and non-null otherwise.
|
81
|
+
sig { returns(T.nilable(Anthropic::Models::StopReason::TaggedSymbol)) }
|
82
|
+
attr_accessor :stop_reason
|
83
|
+
|
84
|
+
# Which custom stop sequence was generated, if any.
|
85
|
+
#
|
86
|
+
# This value will be a non-null string if one of your custom stop sequences was
|
87
|
+
# generated.
|
88
|
+
sig { returns(T.nilable(String)) }
|
89
|
+
attr_accessor :stop_sequence
|
90
|
+
|
91
|
+
# Object type.
|
92
|
+
#
|
93
|
+
# For Messages, this is always `"message"`.
|
94
|
+
sig { returns(Symbol) }
|
95
|
+
attr_accessor :type
|
96
|
+
|
97
|
+
# Billing and rate-limit usage.
|
98
|
+
#
|
99
|
+
# Anthropic's API bills and rate-limits by token counts, as tokens represent the
|
100
|
+
# underlying cost to our systems.
|
101
|
+
#
|
102
|
+
# Under the hood, the API transforms requests into a format suitable for the
|
103
|
+
# model. The model's output then goes through a parsing stage before becoming an
|
104
|
+
# API response. As a result, the token counts in `usage` will not match one-to-one
|
105
|
+
# with the exact visible content of an API request or response.
|
106
|
+
#
|
107
|
+
# For example, `output_tokens` will be non-zero, even for an empty string response
|
108
|
+
# from Claude.
|
109
|
+
#
|
110
|
+
# Total input tokens in a request is the summation of `input_tokens`,
|
111
|
+
# `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
112
|
+
sig { returns(Anthropic::Models::Usage) }
|
113
|
+
attr_reader :usage
|
114
|
+
|
115
|
+
sig { params(usage: T.any(Anthropic::Models::Usage, Anthropic::Internal::AnyHash)).void }
|
116
|
+
attr_writer :usage
|
117
|
+
|
118
|
+
sig do
|
119
|
+
params(
|
120
|
+
id: String,
|
121
|
+
content: T::Array[
|
122
|
+
T.any(
|
123
|
+
Anthropic::Models::TextBlock,
|
124
|
+
Anthropic::Internal::AnyHash,
|
125
|
+
Anthropic::Models::ToolUseBlock,
|
126
|
+
Anthropic::Models::ThinkingBlock,
|
127
|
+
Anthropic::Models::RedactedThinkingBlock
|
128
|
+
)
|
129
|
+
],
|
130
|
+
model: T.any(Anthropic::Models::Model::OrSymbol, String),
|
131
|
+
stop_reason: T.nilable(Anthropic::Models::StopReason::OrSymbol),
|
132
|
+
stop_sequence: T.nilable(String),
|
133
|
+
usage: T.any(Anthropic::Models::Usage, Anthropic::Internal::AnyHash),
|
134
|
+
role: Symbol,
|
135
|
+
type: Symbol
|
136
|
+
)
|
137
|
+
.returns(T.attached_class)
|
138
|
+
end
|
139
|
+
def self.new(
|
140
|
+
id:,
|
141
|
+
content:,
|
142
|
+
model:,
|
143
|
+
stop_reason:,
|
144
|
+
stop_sequence:,
|
145
|
+
usage:,
|
146
|
+
role: :assistant,
|
147
|
+
type: :message
|
148
|
+
)
|
149
|
+
end
|
150
|
+
|
151
|
+
sig do
|
152
|
+
override
|
153
|
+
.returns(
|
154
|
+
{
|
155
|
+
id: String,
|
156
|
+
content: T::Array[
|
157
|
+
T.any(
|
158
|
+
Anthropic::Models::TextBlock,
|
159
|
+
Anthropic::Models::ToolUseBlock,
|
160
|
+
Anthropic::Models::ThinkingBlock,
|
161
|
+
Anthropic::Models::RedactedThinkingBlock
|
162
|
+
)
|
163
|
+
],
|
164
|
+
model: T.any(Anthropic::Models::Model::TaggedSymbol, String),
|
165
|
+
role: Symbol,
|
166
|
+
stop_reason: T.nilable(Anthropic::Models::StopReason::TaggedSymbol),
|
167
|
+
stop_sequence: T.nilable(String),
|
168
|
+
type: Symbol,
|
169
|
+
usage: Anthropic::Models::Usage
|
170
|
+
}
|
171
|
+
)
|
172
|
+
end
|
173
|
+
def to_hash; end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
@@ -0,0 +1,363 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
class MessageCountTokensParams < Anthropic::Internal::Type::BaseModel
|
6
|
+
extend Anthropic::Internal::Type::RequestParameters::Converter
|
7
|
+
include Anthropic::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
# Input messages.
|
10
|
+
#
|
11
|
+
# Our models are trained to operate on alternating `user` and `assistant`
|
12
|
+
# conversational turns. When creating a new `Message`, you specify the prior
|
13
|
+
# conversational turns with the `messages` parameter, and the model then generates
|
14
|
+
# the next `Message` in the conversation. Consecutive `user` or `assistant` turns
|
15
|
+
# in your request will be combined into a single turn.
|
16
|
+
#
|
17
|
+
# Each input message must be an object with a `role` and `content`. You can
|
18
|
+
# specify a single `user`-role message, or you can include multiple `user` and
|
19
|
+
# `assistant` messages.
|
20
|
+
#
|
21
|
+
# If the final message uses the `assistant` role, the response content will
|
22
|
+
# continue immediately from the content in that message. This can be used to
|
23
|
+
# constrain part of the model's response.
|
24
|
+
#
|
25
|
+
# Example with a single `user` message:
|
26
|
+
#
|
27
|
+
# ```json
|
28
|
+
# [{ "role": "user", "content": "Hello, Claude" }]
|
29
|
+
# ```
|
30
|
+
#
|
31
|
+
# Example with multiple conversational turns:
|
32
|
+
#
|
33
|
+
# ```json
|
34
|
+
# [
|
35
|
+
# { "role": "user", "content": "Hello there." },
|
36
|
+
# { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
|
37
|
+
# { "role": "user", "content": "Can you explain LLMs in plain English?" }
|
38
|
+
# ]
|
39
|
+
# ```
|
40
|
+
#
|
41
|
+
# Example with a partially-filled response from Claude:
|
42
|
+
#
|
43
|
+
# ```json
|
44
|
+
# [
|
45
|
+
# {
|
46
|
+
# "role": "user",
|
47
|
+
# "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
48
|
+
# },
|
49
|
+
# { "role": "assistant", "content": "The best answer is (" }
|
50
|
+
# ]
|
51
|
+
# ```
|
52
|
+
#
|
53
|
+
# Each input message `content` may be either a single `string` or an array of
|
54
|
+
# content blocks, where each block has a specific `type`. Using a `string` for
|
55
|
+
# `content` is shorthand for an array of one content block of type `"text"`. The
|
56
|
+
# following input messages are equivalent:
|
57
|
+
#
|
58
|
+
# ```json
|
59
|
+
# { "role": "user", "content": "Hello, Claude" }
|
60
|
+
# ```
|
61
|
+
#
|
62
|
+
# ```json
|
63
|
+
# { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
64
|
+
# ```
|
65
|
+
#
|
66
|
+
# Starting with Claude 3 models, you can also send image content blocks:
|
67
|
+
#
|
68
|
+
# ```json
|
69
|
+
# {
|
70
|
+
# "role": "user",
|
71
|
+
# "content": [
|
72
|
+
# {
|
73
|
+
# "type": "image",
|
74
|
+
# "source": {
|
75
|
+
# "type": "base64",
|
76
|
+
# "media_type": "image/jpeg",
|
77
|
+
# "data": "/9j/4AAQSkZJRg..."
|
78
|
+
# }
|
79
|
+
# },
|
80
|
+
# { "type": "text", "text": "What is in this image?" }
|
81
|
+
# ]
|
82
|
+
# }
|
83
|
+
# ```
|
84
|
+
#
|
85
|
+
# We currently support the `base64` source type for images, and the `image/jpeg`,
|
86
|
+
# `image/png`, `image/gif`, and `image/webp` media types.
|
87
|
+
#
|
88
|
+
# See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
|
89
|
+
# more input examples.
|
90
|
+
#
|
91
|
+
# Note that if you want to include a
|
92
|
+
# [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
|
93
|
+
# the top-level `system` parameter — there is no `"system"` role for input
|
94
|
+
# messages in the Messages API.
|
95
|
+
sig { returns(T::Array[Anthropic::Models::MessageParam]) }
|
96
|
+
attr_accessor :messages
|
97
|
+
|
98
|
+
# The model that will complete your prompt.\n\nSee
|
99
|
+
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
100
|
+
# details and options.
|
101
|
+
sig { returns(T.any(Anthropic::Models::Model::OrSymbol, String)) }
|
102
|
+
attr_accessor :model
|
103
|
+
|
104
|
+
# System prompt.
|
105
|
+
#
|
106
|
+
# A system prompt is a way of providing context and instructions to Claude, such
|
107
|
+
# as specifying a particular goal or role. See our
|
108
|
+
# [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
|
109
|
+
sig { returns(T.nilable(T.any(String, T::Array[Anthropic::Models::TextBlockParam]))) }
|
110
|
+
attr_reader :system_
|
111
|
+
|
112
|
+
sig do
|
113
|
+
params(
|
114
|
+
system_: T.any(String, T::Array[T.any(Anthropic::Models::TextBlockParam, Anthropic::Internal::AnyHash)])
|
115
|
+
)
|
116
|
+
.void
|
117
|
+
end
|
118
|
+
attr_writer :system_
|
119
|
+
|
120
|
+
# Configuration for enabling Claude's extended thinking.
|
121
|
+
#
|
122
|
+
# When enabled, responses include `thinking` content blocks showing Claude's
|
123
|
+
# thinking process before the final answer. Requires a minimum budget of 1,024
|
124
|
+
# tokens and counts towards your `max_tokens` limit.
|
125
|
+
#
|
126
|
+
# See
|
127
|
+
# [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
|
128
|
+
# for details.
|
129
|
+
sig do
|
130
|
+
returns(
|
131
|
+
T.nilable(T.any(Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled))
|
132
|
+
)
|
133
|
+
end
|
134
|
+
attr_reader :thinking
|
135
|
+
|
136
|
+
sig do
|
137
|
+
params(
|
138
|
+
thinking: T.any(
|
139
|
+
Anthropic::Models::ThinkingConfigEnabled,
|
140
|
+
Anthropic::Internal::AnyHash,
|
141
|
+
Anthropic::Models::ThinkingConfigDisabled
|
142
|
+
)
|
143
|
+
)
|
144
|
+
.void
|
145
|
+
end
|
146
|
+
attr_writer :thinking
|
147
|
+
|
148
|
+
# How the model should use the provided tools. The model can use a specific tool,
|
149
|
+
# any available tool, decide by itself, or not use tools at all.
|
150
|
+
sig do
|
151
|
+
returns(
|
152
|
+
T.nilable(
|
153
|
+
T.any(
|
154
|
+
Anthropic::Models::ToolChoiceAuto,
|
155
|
+
Anthropic::Models::ToolChoiceAny,
|
156
|
+
Anthropic::Models::ToolChoiceTool,
|
157
|
+
Anthropic::Models::ToolChoiceNone
|
158
|
+
)
|
159
|
+
)
|
160
|
+
)
|
161
|
+
end
|
162
|
+
attr_reader :tool_choice
|
163
|
+
|
164
|
+
sig do
|
165
|
+
params(
|
166
|
+
tool_choice: T.any(
|
167
|
+
Anthropic::Models::ToolChoiceAuto,
|
168
|
+
Anthropic::Internal::AnyHash,
|
169
|
+
Anthropic::Models::ToolChoiceAny,
|
170
|
+
Anthropic::Models::ToolChoiceTool,
|
171
|
+
Anthropic::Models::ToolChoiceNone
|
172
|
+
)
|
173
|
+
)
|
174
|
+
.void
|
175
|
+
end
|
176
|
+
attr_writer :tool_choice
|
177
|
+
|
178
|
+
# Definitions of tools that the model may use.
|
179
|
+
#
|
180
|
+
# If you include `tools` in your API request, the model may return `tool_use`
|
181
|
+
# content blocks that represent the model's use of those tools. You can then run
|
182
|
+
# those tools using the tool input generated by the model and then optionally
|
183
|
+
# return results back to the model using `tool_result` content blocks.
|
184
|
+
#
|
185
|
+
# Each tool definition includes:
|
186
|
+
#
|
187
|
+
# - `name`: Name of the tool.
|
188
|
+
# - `description`: Optional, but strongly-recommended description of the tool.
|
189
|
+
# - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
|
190
|
+
# tool `input` shape that the model will produce in `tool_use` output content
|
191
|
+
# blocks.
|
192
|
+
#
|
193
|
+
# For example, if you defined `tools` as:
|
194
|
+
#
|
195
|
+
# ```json
|
196
|
+
# [
|
197
|
+
# {
|
198
|
+
# "name": "get_stock_price",
|
199
|
+
# "description": "Get the current stock price for a given ticker symbol.",
|
200
|
+
# "input_schema": {
|
201
|
+
# "type": "object",
|
202
|
+
# "properties": {
|
203
|
+
# "ticker": {
|
204
|
+
# "type": "string",
|
205
|
+
# "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
|
206
|
+
# }
|
207
|
+
# },
|
208
|
+
# "required": ["ticker"]
|
209
|
+
# }
|
210
|
+
# }
|
211
|
+
# ]
|
212
|
+
# ```
|
213
|
+
#
|
214
|
+
# And then asked the model "What's the S&P 500 at today?", the model might produce
|
215
|
+
# `tool_use` content blocks in the response like this:
|
216
|
+
#
|
217
|
+
# ```json
|
218
|
+
# [
|
219
|
+
# {
|
220
|
+
# "type": "tool_use",
|
221
|
+
# "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
222
|
+
# "name": "get_stock_price",
|
223
|
+
# "input": { "ticker": "^GSPC" }
|
224
|
+
# }
|
225
|
+
# ]
|
226
|
+
# ```
|
227
|
+
#
|
228
|
+
# You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
|
229
|
+
# input, and return the following back to the model in a subsequent `user`
|
230
|
+
# message:
|
231
|
+
#
|
232
|
+
# ```json
|
233
|
+
# [
|
234
|
+
# {
|
235
|
+
# "type": "tool_result",
|
236
|
+
# "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
|
237
|
+
# "content": "259.75 USD"
|
238
|
+
# }
|
239
|
+
# ]
|
240
|
+
# ```
|
241
|
+
#
|
242
|
+
# Tools can be used for workflows that include running client-side tools and
|
243
|
+
# functions, or more generally whenever you want the model to produce a particular
|
244
|
+
# JSON structure of output.
|
245
|
+
#
|
246
|
+
# See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
|
247
|
+
sig do
|
248
|
+
returns(
|
249
|
+
T.nilable(
|
250
|
+
T::Array[
|
251
|
+
T.any(
|
252
|
+
Anthropic::Models::Tool,
|
253
|
+
Anthropic::Models::ToolBash20250124,
|
254
|
+
Anthropic::Models::ToolTextEditor20250124
|
255
|
+
)
|
256
|
+
]
|
257
|
+
)
|
258
|
+
)
|
259
|
+
end
|
260
|
+
attr_reader :tools
|
261
|
+
|
262
|
+
sig do
|
263
|
+
params(
|
264
|
+
tools: T::Array[
|
265
|
+
T.any(
|
266
|
+
Anthropic::Models::Tool,
|
267
|
+
Anthropic::Internal::AnyHash,
|
268
|
+
Anthropic::Models::ToolBash20250124,
|
269
|
+
Anthropic::Models::ToolTextEditor20250124
|
270
|
+
)
|
271
|
+
]
|
272
|
+
)
|
273
|
+
.void
|
274
|
+
end
|
275
|
+
attr_writer :tools
|
276
|
+
|
277
|
+
sig do
|
278
|
+
params(
|
279
|
+
messages: T::Array[T.any(Anthropic::Models::MessageParam, Anthropic::Internal::AnyHash)],
|
280
|
+
model: T.any(Anthropic::Models::Model::OrSymbol, String),
|
281
|
+
system_: T.any(String, T::Array[T.any(Anthropic::Models::TextBlockParam, Anthropic::Internal::AnyHash)]),
|
282
|
+
thinking: T.any(
|
283
|
+
Anthropic::Models::ThinkingConfigEnabled,
|
284
|
+
Anthropic::Internal::AnyHash,
|
285
|
+
Anthropic::Models::ThinkingConfigDisabled
|
286
|
+
),
|
287
|
+
tool_choice: T.any(
|
288
|
+
Anthropic::Models::ToolChoiceAuto,
|
289
|
+
Anthropic::Internal::AnyHash,
|
290
|
+
Anthropic::Models::ToolChoiceAny,
|
291
|
+
Anthropic::Models::ToolChoiceTool,
|
292
|
+
Anthropic::Models::ToolChoiceNone
|
293
|
+
),
|
294
|
+
tools: T::Array[
|
295
|
+
T.any(
|
296
|
+
Anthropic::Models::Tool,
|
297
|
+
Anthropic::Internal::AnyHash,
|
298
|
+
Anthropic::Models::ToolBash20250124,
|
299
|
+
Anthropic::Models::ToolTextEditor20250124
|
300
|
+
)
|
301
|
+
],
|
302
|
+
request_options: T.any(Anthropic::RequestOptions, Anthropic::Internal::AnyHash)
|
303
|
+
)
|
304
|
+
.returns(T.attached_class)
|
305
|
+
end
|
306
|
+
def self.new(
|
307
|
+
messages:,
|
308
|
+
model:,
|
309
|
+
system_: nil,
|
310
|
+
thinking: nil,
|
311
|
+
tool_choice: nil,
|
312
|
+
tools: nil,
|
313
|
+
request_options: {}
|
314
|
+
)
|
315
|
+
end
|
316
|
+
|
317
|
+
sig do
|
318
|
+
override
|
319
|
+
.returns(
|
320
|
+
{
|
321
|
+
messages: T::Array[Anthropic::Models::MessageParam],
|
322
|
+
model: T.any(Anthropic::Models::Model::OrSymbol, String),
|
323
|
+
system_: T.any(String, T::Array[Anthropic::Models::TextBlockParam]),
|
324
|
+
thinking: T.any(Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled),
|
325
|
+
tool_choice: T.any(
|
326
|
+
Anthropic::Models::ToolChoiceAuto,
|
327
|
+
Anthropic::Models::ToolChoiceAny,
|
328
|
+
Anthropic::Models::ToolChoiceTool,
|
329
|
+
Anthropic::Models::ToolChoiceNone
|
330
|
+
),
|
331
|
+
tools: T::Array[
|
332
|
+
T.any(
|
333
|
+
Anthropic::Models::Tool,
|
334
|
+
Anthropic::Models::ToolBash20250124,
|
335
|
+
Anthropic::Models::ToolTextEditor20250124
|
336
|
+
)
|
337
|
+
],
|
338
|
+
request_options: Anthropic::RequestOptions
|
339
|
+
}
|
340
|
+
)
|
341
|
+
end
|
342
|
+
def to_hash; end
|
343
|
+
|
344
|
+
# System prompt.
|
345
|
+
#
|
346
|
+
# A system prompt is a way of providing context and instructions to Claude, such
|
347
|
+
# as specifying a particular goal or role. See our
|
348
|
+
# [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
|
349
|
+
module System
|
350
|
+
extend Anthropic::Internal::Type::Union
|
351
|
+
|
352
|
+
sig { override.returns([String, T::Array[Anthropic::Models::TextBlockParam]]) }
|
353
|
+
def self.variants; end
|
354
|
+
|
355
|
+
TextBlockParamArray =
|
356
|
+
T.let(
|
357
|
+
Anthropic::Internal::Type::ArrayOf[Anthropic::Models::TextBlockParam],
|
358
|
+
Anthropic::Internal::Type::Converter
|
359
|
+
)
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
363
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module MessageCountTokensTool
|
6
|
+
extend Anthropic::Internal::Type::Union
|
7
|
+
|
8
|
+
sig do
|
9
|
+
override
|
10
|
+
.returns(
|
11
|
+
[Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124]
|
12
|
+
)
|
13
|
+
end
|
14
|
+
def self.variants; end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|