anthropic 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +33 -9
- data/lib/anthropic/client.rb +30 -0
- data/lib/anthropic/models/anthropic_beta.rb +26 -8
- data/lib/anthropic/models/base64_image_source.rb +3 -3
- data/lib/anthropic/models/beta/beta_base64_image_source.rb +3 -3
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +10 -8
- data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +39 -1
- data/lib/anthropic/models/beta/beta_cache_creation.rb +28 -0
- data/lib/anthropic/models/beta/beta_citations_delta.rb +4 -4
- data/lib/anthropic/models/beta/beta_code_execution_output_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_code_execution_output_block_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_code_execution_result_block.rb +44 -0
- data/lib/anthropic/models/beta/beta_code_execution_result_block_param.rb +44 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +40 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block.rb +31 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_content.rb +20 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param.rb +41 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rb +20 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_error.rb +25 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_error_code.rb +21 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_error_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_container.rb +31 -0
- data/lib/anthropic/models/beta/beta_container_upload_block.rb +27 -0
- data/lib/anthropic/models/beta/beta_container_upload_block_param.rb +37 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +11 -1
- data/lib/anthropic/models/beta/beta_content_block_param.rb +23 -5
- data/lib/anthropic/models/beta/beta_content_block_source.rb +5 -5
- data/lib/anthropic/models/beta/beta_content_block_source_content.rb +1 -1
- data/lib/anthropic/models/beta/beta_file_document_source.rb +25 -0
- data/lib/anthropic/models/beta/beta_file_image_source.rb +25 -0
- data/lib/anthropic/models/beta/beta_image_block_param.rb +8 -6
- data/lib/anthropic/models/beta/beta_mcp_tool_result_block.rb +52 -0
- data/lib/anthropic/models/beta/beta_mcp_tool_use_block.rb +49 -0
- data/lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb +56 -0
- data/lib/anthropic/models/beta/beta_message.rb +19 -10
- data/lib/anthropic/models/beta/beta_message_delta_usage.rb +2 -2
- data/lib/anthropic/models/beta/beta_message_param.rb +8 -8
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +1 -1
- data/lib/anthropic/models/beta/beta_metadata.rb +1 -1
- data/lib/anthropic/models/beta/beta_model_info.rb +1 -1
- data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +1 -1
- data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +18 -4
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +22 -9
- data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +1 -1
- data/lib/anthropic/models/beta/beta_request_mcp_server_tool_configuration.rb +25 -0
- data/lib/anthropic/models/beta/beta_request_mcp_server_url_definition.rb +47 -0
- data/lib/anthropic/models/beta/beta_request_mcp_tool_result_block_param.rb +65 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +15 -4
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +17 -6
- data/lib/anthropic/models/beta/beta_text_block.rb +3 -3
- data/lib/anthropic/models/beta/beta_text_block_param.rb +4 -4
- data/lib/anthropic/models/beta/beta_text_citation.rb +1 -1
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +1 -1
- data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool.rb +9 -9
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +3 -3
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +3 -3
- data/lib/anthropic/models/beta/beta_tool_choice.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_choice_any.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +3 -3
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +3 -3
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +8 -8
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +3 -3
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +3 -3
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +40 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +5 -1
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +2 -2
- data/lib/anthropic/models/beta/beta_usage.rb +33 -3
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +8 -7
- data/lib/anthropic/models/beta/beta_web_search_tool_request_error.rb +3 -17
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +2 -2
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_content.rb +2 -2
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +4 -4
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rb +2 -4
- data/lib/anthropic/models/beta/beta_web_search_tool_result_error.rb +3 -17
- data/lib/anthropic/models/beta/beta_web_search_tool_result_error_code.rb +22 -0
- data/lib/anthropic/models/beta/deleted_file.rb +46 -0
- data/lib/anthropic/models/beta/file_delete_params.rb +24 -0
- data/lib/anthropic/models/beta/file_download_params.rb +24 -0
- data/lib/anthropic/models/beta/file_list_params.rb +55 -0
- data/lib/anthropic/models/beta/file_metadata.rb +74 -0
- data/lib/anthropic/models/beta/file_retrieve_metadata_params.rb +24 -0
- data/lib/anthropic/models/beta/file_upload_params.rb +32 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +31 -18
- data/lib/anthropic/models/beta/message_create_params.rb +63 -19
- data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +77 -29
- data/lib/anthropic/models/beta/messages/batch_delete_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_list_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_results_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +1 -1
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +6 -6
- data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +2 -2
- data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +3 -3
- data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +2 -1
- data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +1 -1
- data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +2 -2
- data/lib/anthropic/models/beta/model_list_params.rb +2 -2
- data/lib/anthropic/models/beta/model_retrieve_params.rb +2 -2
- data/lib/anthropic/models/beta_error.rb +1 -1
- data/lib/anthropic/models/beta_error_response.rb +2 -2
- data/lib/anthropic/models/citations_delta.rb +4 -4
- data/lib/anthropic/models/completion.rb +4 -4
- data/lib/anthropic/models/completion_create_params.rb +6 -6
- data/lib/anthropic/models/content_block.rb +1 -1
- data/lib/anthropic/models/content_block_param.rb +13 -5
- data/lib/anthropic/models/content_block_source.rb +5 -5
- data/lib/anthropic/models/content_block_source_content.rb +1 -1
- data/lib/anthropic/models/document_block_param.rb +8 -8
- data/lib/anthropic/models/error_object.rb +1 -1
- data/lib/anthropic/models/error_response.rb +2 -2
- data/lib/anthropic/models/image_block_param.rb +6 -6
- data/lib/anthropic/models/message.rb +10 -10
- data/lib/anthropic/models/message_count_tokens_params.rb +14 -14
- data/lib/anthropic/models/message_count_tokens_tool.rb +1 -1
- data/lib/anthropic/models/message_create_params.rb +44 -17
- data/lib/anthropic/models/message_delta_usage.rb +2 -2
- data/lib/anthropic/models/message_param.rb +8 -8
- data/lib/anthropic/models/message_tokens_count.rb +1 -1
- data/lib/anthropic/models/messages/batch_create_params.rb +58 -27
- data/lib/anthropic/models/messages/deleted_message_batch.rb +1 -1
- data/lib/anthropic/models/messages/message_batch.rb +6 -6
- data/lib/anthropic/models/messages/message_batch_errored_result.rb +2 -2
- data/lib/anthropic/models/messages/message_batch_individual_response.rb +3 -3
- data/lib/anthropic/models/messages/message_batch_request_counts.rb +1 -1
- data/lib/anthropic/models/messages/message_batch_result.rb +1 -1
- data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +2 -2
- data/lib/anthropic/models/metadata.rb +2 -2
- data/lib/anthropic/models/model.rb +45 -15
- data/lib/anthropic/models/model_info.rb +2 -2
- data/lib/anthropic/models/model_list_params.rb +2 -2
- data/lib/anthropic/models/model_retrieve_params.rb +2 -2
- data/lib/anthropic/models/raw_content_block_delta.rb +1 -1
- data/lib/anthropic/models/raw_content_block_delta_event.rb +2 -2
- data/lib/anthropic/models/raw_content_block_start_event.rb +4 -4
- data/lib/anthropic/models/raw_message_delta_event.rb +8 -8
- data/lib/anthropic/models/raw_message_start_event.rb +2 -2
- data/lib/anthropic/models/raw_message_stream_event.rb +1 -1
- data/lib/anthropic/models/server_tool_use_block_param.rb +2 -2
- data/lib/anthropic/models/text_block.rb +4 -4
- data/lib/anthropic/models/text_block_param.rb +4 -4
- data/lib/anthropic/models/text_citation.rb +1 -1
- data/lib/anthropic/models/text_citation_param.rb +1 -1
- data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
- data/lib/anthropic/models/thinking_config_param.rb +1 -1
- data/lib/anthropic/models/tool.rb +10 -10
- data/lib/anthropic/models/tool_bash_20250124.rb +3 -3
- data/lib/anthropic/models/tool_choice.rb +1 -1
- data/lib/anthropic/models/tool_choice_any.rb +2 -2
- data/lib/anthropic/models/tool_choice_auto.rb +1 -1
- data/lib/anthropic/models/tool_choice_tool.rb +1 -1
- data/lib/anthropic/models/tool_result_block_param.rb +8 -8
- data/lib/anthropic/models/tool_text_editor_20250124.rb +3 -3
- data/lib/anthropic/models/tool_union.rb +1 -1
- data/lib/anthropic/models/tool_use_block_param.rb +2 -2
- data/lib/anthropic/models/usage.rb +25 -3
- data/lib/anthropic/models/web_search_tool_20250305.rb +7 -7
- data/lib/anthropic/models/web_search_tool_request_error.rb +3 -3
- data/lib/anthropic/models/web_search_tool_result_block.rb +2 -2
- data/lib/anthropic/models/web_search_tool_result_block_content.rb +2 -2
- data/lib/anthropic/models/web_search_tool_result_block_param.rb +4 -4
- data/lib/anthropic/models/web_search_tool_result_block_param_content.rb +2 -2
- data/lib/anthropic/models/web_search_tool_result_error.rb +3 -3
- data/lib/anthropic/resources/beta/files.rb +153 -0
- data/lib/anthropic/resources/beta/messages/batches.rb +13 -13
- data/lib/anthropic/resources/beta/messages.rb +57 -30
- data/lib/anthropic/resources/beta/models.rb +4 -4
- data/lib/anthropic/resources/beta.rb +4 -0
- data/lib/anthropic/resources/completions.rb +8 -8
- data/lib/anthropic/resources/messages/batches.rb +7 -7
- data/lib/anthropic/resources/messages.rb +43 -26
- data/lib/anthropic/resources/models.rb +4 -4
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +34 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +24 -0
- data/rbi/anthropic/models/beta/beta_base64_pdf_block.rbi +8 -4
- data/rbi/anthropic/models/beta/beta_cache_control_ephemeral.rbi +87 -3
- data/rbi/anthropic/models/beta/beta_cache_creation.rbi +52 -0
- data/rbi/anthropic/models/beta/beta_code_execution_output_block.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_code_execution_output_block_param.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_code_execution_result_block.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_code_execution_result_block_param.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block.rbi +59 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbi +32 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_error.rbi +51 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_error_code.rbi +51 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_error_param.rbi +52 -0
- data/rbi/anthropic/models/beta/beta_container.rbi +39 -0
- data/rbi/anthropic/models/beta/beta_container_upload_block.rbi +34 -0
- data/rbi/anthropic/models/beta/beta_container_upload_block_param.rbi +68 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +8 -3
- data/rbi/anthropic/models/beta/beta_file_document_source.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_file_image_source.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_image_block_param.rbi +8 -4
- data/rbi/anthropic/models/beta/beta_mcp_tool_result_block.rbi +85 -0
- data/rbi/anthropic/models/beta/beta_mcp_tool_use_block.rbi +70 -0
- data/rbi/anthropic/models/beta/beta_mcp_tool_use_block_param.rbi +86 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +21 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +16 -1
- data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +21 -1
- data/rbi/anthropic/models/beta/beta_request_mcp_server_tool_configuration.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_request_mcp_server_url_definition.rbi +86 -0
- data/rbi/anthropic/models/beta/beta_request_mcp_tool_result_block_param.rbi +125 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +42 -4
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +38 -4
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_usage.rbi +66 -3
- data/rbi/anthropic/models/beta/beta_web_search_tool_request_error.rbi +3 -54
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_error.rbi +3 -52
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_error_code.rbi +55 -0
- data/rbi/anthropic/models/beta/deleted_file.rbi +81 -0
- data/rbi/anthropic/models/beta/file_delete_params.rbi +62 -0
- data/rbi/anthropic/models/beta/file_download_params.rbi +62 -0
- data/rbi/anthropic/models/beta/file_list_params.rbi +100 -0
- data/rbi/anthropic/models/beta/file_metadata.rbi +98 -0
- data/rbi/anthropic/models/beta/file_retrieve_metadata_params.rbi +62 -0
- data/rbi/anthropic/models/beta/file_upload_params.rbi +70 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +43 -5
- data/rbi/anthropic/models/beta/message_create_params.rbi +116 -4
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +121 -4
- data/rbi/anthropic/models/content_block_param.rbi +3 -2
- data/rbi/anthropic/models/message_create_params.rbi +61 -0
- data/rbi/anthropic/models/messages/batch_create_params.rbi +71 -0
- data/rbi/anthropic/models/model.rbi +26 -2
- data/rbi/anthropic/models/usage.rbi +32 -3
- data/rbi/anthropic/resources/beta/files.rbi +109 -0
- data/rbi/anthropic/resources/beta/messages.rbi +49 -3
- data/rbi/anthropic/resources/beta.rbi +3 -0
- data/rbi/anthropic/resources/messages.rbi +14 -0
- data/sig/anthropic/models/anthropic_beta.rbs +12 -0
- data/sig/anthropic/models/api_error_object.rbs +2 -0
- data/sig/anthropic/models/authentication_error.rbs +2 -0
- data/sig/anthropic/models/base64_image_source.rbs +10 -4
- data/sig/anthropic/models/base64_pdf_source.rbs +6 -0
- data/sig/anthropic/models/beta/beta_base64_image_source.rbs +10 -4
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +14 -4
- data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +6 -0
- data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +31 -2
- data/sig/anthropic/models/beta/beta_cache_creation.rbs +29 -0
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +9 -0
- data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +9 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +9 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +9 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +9 -0
- data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +9 -0
- data/sig/anthropic/models/beta/beta_citation_web_search_result_location_param.rbs +8 -0
- data/sig/anthropic/models/beta/beta_citations_config_param.rbs +2 -0
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +9 -4
- data/sig/anthropic/models/beta/beta_citations_web_search_result_location.rbs +8 -0
- data/sig/anthropic/models/beta/beta_code_execution_output_block.rbs +20 -0
- data/sig/anthropic/models/beta/beta_code_execution_output_block_param.rbs +20 -0
- data/sig/anthropic/models/beta/beta_code_execution_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_code_execution_result_block_param.rbs +44 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +34 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_block.rbs +34 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbs +17 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_param.rbs +39 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbs +17 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_error.rbs +29 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_error_code.rbs +24 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_error_param.rbs +29 -0
- data/sig/anthropic/models/beta/beta_container.rbs +19 -0
- data/sig/anthropic/models/beta/beta_container_upload_block.rbs +20 -0
- data/sig/anthropic/models/beta/beta_container_upload_block_param.rbs +34 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +4 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +7 -3
- data/sig/anthropic/models/beta/beta_content_block_source.rbs +9 -4
- data/sig/anthropic/models/beta/beta_file_document_source.rbs +19 -0
- data/sig/anthropic/models/beta/beta_file_image_source.rbs +19 -0
- data/sig/anthropic/models/beta/beta_image_block_param.rbs +11 -4
- data/sig/anthropic/models/beta/beta_input_json_delta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_result_block.rbs +49 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_use_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_message.rbs +16 -0
- data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +8 -0
- data/sig/anthropic/models/beta/beta_message_param.rbs +13 -8
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +2 -0
- data/sig/anthropic/models/beta/beta_metadata.rbs +2 -0
- data/sig/anthropic/models/beta/beta_model_info.rbs +7 -0
- data/sig/anthropic/models/beta/beta_plain_text_source.rbs +2 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_delta_event.rbs +6 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +14 -4
- data/sig/anthropic/models/beta/beta_raw_content_block_stop_event.rbs +2 -0
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +16 -0
- data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +5 -0
- data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +2 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +2 -0
- data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +2 -0
- data/sig/anthropic/models/beta/beta_request_mcp_server_tool_configuration.rbs +23 -0
- data/sig/anthropic/models/beta/beta_request_mcp_server_url_definition.rbs +44 -0
- data/sig/anthropic/models/beta/beta_request_mcp_tool_result_block_param.rbs +60 -0
- data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +2 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +26 -3
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +22 -3
- data/sig/anthropic/models/beta/beta_signature_delta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_text_block.rbs +6 -0
- data/sig/anthropic/models/beta/beta_text_block_param.rbs +7 -0
- data/sig/anthropic/models/beta/beta_text_delta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_thinking_block.rbs +2 -0
- data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +2 -0
- data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +2 -0
- data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +2 -0
- data/sig/anthropic/models/beta/beta_thinking_delta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool.rbs +14 -4
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +6 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +6 -0
- data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +6 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +9 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +9 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +16 -8
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +6 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +6 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +34 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +7 -0
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +8 -0
- data/sig/anthropic/models/beta/beta_url_image_source.rbs +2 -0
- data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +2 -0
- data/sig/anthropic/models/beta/beta_usage.rbs +32 -2
- data/sig/anthropic/models/beta/beta_web_search_result_block.rbs +8 -0
- data/sig/anthropic/models/beta/beta_web_search_result_block_param.rbs +8 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +18 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_request_error.rbs +7 -21
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block.rbs +6 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param.rbs +7 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_error.rbs +7 -21
- data/sig/anthropic/models/beta/beta_web_search_tool_result_error_code.rbs +26 -0
- data/sig/anthropic/models/beta/deleted_file.rbs +38 -0
- data/sig/anthropic/models/beta/file_delete_params.rbs +30 -0
- data/sig/anthropic/models/beta/file_download_params.rbs +30 -0
- data/sig/anthropic/models/beta/file_list_params.rbs +53 -0
- data/sig/anthropic/models/beta/file_metadata.rbs +54 -0
- data/sig/anthropic/models/beta/file_retrieve_metadata_params.rbs +30 -0
- data/sig/anthropic/models/beta/file_upload_params.rbs +37 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +28 -6
- data/sig/anthropic/models/beta/message_create_params.rbs +51 -0
- data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +67 -6
- data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_list_params.rbs +8 -0
- data/sig/anthropic/models/beta/messages/batch_results_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +2 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +17 -4
- data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +2 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +5 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +2 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +5 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +8 -0
- data/sig/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbs +5 -0
- data/sig/anthropic/models/beta/model_list_params.rbs +8 -0
- data/sig/anthropic/models/beta/model_retrieve_params.rbs +5 -0
- data/sig/anthropic/models/beta_api_error.rbs +2 -0
- data/sig/anthropic/models/beta_authentication_error.rbs +2 -0
- data/sig/anthropic/models/beta_billing_error.rbs +2 -0
- data/sig/anthropic/models/beta_error_response.rbs +2 -0
- data/sig/anthropic/models/beta_gateway_timeout_error.rbs +2 -0
- data/sig/anthropic/models/beta_invalid_request_error.rbs +2 -0
- data/sig/anthropic/models/beta_not_found_error.rbs +2 -0
- data/sig/anthropic/models/beta_overloaded_error.rbs +2 -0
- data/sig/anthropic/models/beta_permission_error.rbs +2 -0
- data/sig/anthropic/models/beta_rate_limit_error.rbs +2 -0
- data/sig/anthropic/models/billing_error.rbs +2 -0
- data/sig/anthropic/models/cache_control_ephemeral.rbs +2 -0
- data/sig/anthropic/models/citation_char_location.rbs +9 -0
- data/sig/anthropic/models/citation_char_location_param.rbs +9 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +9 -0
- data/sig/anthropic/models/citation_content_block_location_param.rbs +9 -0
- data/sig/anthropic/models/citation_page_location.rbs +9 -0
- data/sig/anthropic/models/citation_page_location_param.rbs +9 -0
- data/sig/anthropic/models/citation_web_search_result_location_param.rbs +8 -0
- data/sig/anthropic/models/citations_config_param.rbs +2 -0
- data/sig/anthropic/models/citations_delta.rbs +12 -4
- data/sig/anthropic/models/citations_web_search_result_location.rbs +8 -0
- data/sig/anthropic/models/completion.rbs +8 -0
- data/sig/anthropic/models/completion_create_params.rbs +13 -0
- data/sig/anthropic/models/content_block_param.rbs +3 -3
- data/sig/anthropic/models/content_block_source.rbs +12 -4
- data/sig/anthropic/models/document_block_param.rbs +13 -4
- data/sig/anthropic/models/error_response.rbs +2 -0
- data/sig/anthropic/models/gateway_timeout_error.rbs +2 -0
- data/sig/anthropic/models/image_block_param.rbs +10 -4
- data/sig/anthropic/models/input_json_delta.rbs +2 -0
- data/sig/anthropic/models/invalid_request_error.rbs +2 -0
- data/sig/anthropic/models/message.rbs +11 -0
- data/sig/anthropic/models/message_count_tokens_params.rbs +10 -0
- data/sig/anthropic/models/message_create_params.rbs +36 -0
- data/sig/anthropic/models/message_delta_usage.rbs +8 -0
- data/sig/anthropic/models/message_param.rbs +13 -8
- data/sig/anthropic/models/message_tokens_count.rbs +2 -0
- data/sig/anthropic/models/messages/batch_cancel_params.rbs +2 -0
- data/sig/anthropic/models/messages/batch_create_params.rbs +52 -6
- data/sig/anthropic/models/messages/batch_delete_params.rbs +2 -0
- data/sig/anthropic/models/messages/batch_list_params.rbs +7 -0
- data/sig/anthropic/models/messages/batch_results_params.rbs +2 -0
- data/sig/anthropic/models/messages/batch_retrieve_params.rbs +2 -0
- data/sig/anthropic/models/messages/deleted_message_batch.rbs +2 -0
- data/sig/anthropic/models/messages/message_batch.rbs +17 -4
- data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +2 -0
- data/sig/anthropic/models/messages/message_batch_errored_result.rbs +2 -0
- data/sig/anthropic/models/messages/message_batch_expired_result.rbs +2 -0
- data/sig/anthropic/models/messages/message_batch_individual_response.rbs +5 -0
- data/sig/anthropic/models/messages/message_batch_request_counts.rbs +8 -0
- data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +2 -0
- data/sig/anthropic/models/metadata.rbs +2 -0
- data/sig/anthropic/models/model.rbs +26 -2
- data/sig/anthropic/models/model_info.rbs +7 -0
- data/sig/anthropic/models/model_list_params.rbs +8 -0
- data/sig/anthropic/models/model_retrieve_params.rbs +5 -0
- data/sig/anthropic/models/not_found_error.rbs +2 -0
- data/sig/anthropic/models/overloaded_error.rbs +2 -0
- data/sig/anthropic/models/permission_error.rbs +2 -0
- data/sig/anthropic/models/plain_text_source.rbs +2 -0
- data/sig/anthropic/models/rate_limit_error.rbs +2 -0
- data/sig/anthropic/models/raw_content_block_delta_event.rbs +6 -0
- data/sig/anthropic/models/raw_content_block_start_event.rbs +10 -4
- data/sig/anthropic/models/raw_content_block_stop_event.rbs +2 -0
- data/sig/anthropic/models/raw_message_delta_event.rbs +11 -0
- data/sig/anthropic/models/raw_message_start_event.rbs +2 -0
- data/sig/anthropic/models/raw_message_stop_event.rbs +2 -0
- data/sig/anthropic/models/redacted_thinking_block.rbs +2 -0
- data/sig/anthropic/models/redacted_thinking_block_param.rbs +2 -0
- data/sig/anthropic/models/server_tool_usage.rbs +2 -0
- data/sig/anthropic/models/server_tool_use_block.rbs +7 -0
- data/sig/anthropic/models/server_tool_use_block_param.rbs +8 -0
- data/sig/anthropic/models/signature_delta.rbs +2 -0
- data/sig/anthropic/models/text_block.rbs +6 -0
- data/sig/anthropic/models/text_block_param.rbs +7 -0
- data/sig/anthropic/models/text_delta.rbs +2 -0
- data/sig/anthropic/models/thinking_block.rbs +2 -0
- data/sig/anthropic/models/thinking_block_param.rbs +2 -0
- data/sig/anthropic/models/thinking_config_disabled.rbs +2 -0
- data/sig/anthropic/models/thinking_config_enabled.rbs +2 -0
- data/sig/anthropic/models/thinking_delta.rbs +2 -0
- data/sig/anthropic/models/tool.rbs +14 -4
- data/sig/anthropic/models/tool_bash_20250124.rbs +6 -0
- data/sig/anthropic/models/tool_choice_any.rbs +2 -0
- data/sig/anthropic/models/tool_choice_auto.rbs +2 -0
- data/sig/anthropic/models/tool_choice_none.rbs +2 -0
- data/sig/anthropic/models/tool_choice_tool.rbs +6 -0
- data/sig/anthropic/models/tool_result_block_param.rbs +17 -8
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +6 -0
- data/sig/anthropic/models/tool_use_block.rbs +2 -0
- data/sig/anthropic/models/tool_use_block_param.rbs +8 -0
- data/sig/anthropic/models/url_image_source.rbs +2 -0
- data/sig/anthropic/models/url_pdf_source.rbs +2 -0
- data/sig/anthropic/models/usage.rbs +27 -2
- data/sig/anthropic/models/web_search_result_block.rbs +8 -0
- data/sig/anthropic/models/web_search_result_block_param.rbs +8 -0
- data/sig/anthropic/models/web_search_tool_20250305.rbs +18 -0
- data/sig/anthropic/models/web_search_tool_request_error.rbs +9 -4
- data/sig/anthropic/models/web_search_tool_result_block.rbs +6 -0
- data/sig/anthropic/models/web_search_tool_result_block_param.rbs +7 -0
- data/sig/anthropic/models/web_search_tool_result_error.rbs +9 -4
- data/sig/anthropic/resources/beta/files.rbs +41 -0
- data/sig/anthropic/resources/beta/messages.rbs +8 -1
- data/sig/anthropic/resources/beta.rbs +2 -0
- data/sig/anthropic/resources/messages.rbs +2 -0
- metadata +104 -2
@@ -15,6 +15,13 @@ module Anthropic
|
|
15
15
|
# @return [String]
|
16
16
|
required :id, String
|
17
17
|
|
18
|
+
# @!attribute container
|
19
|
+
# Information about the container used in the request (for the code execution
|
20
|
+
# tool)
|
21
|
+
#
|
22
|
+
# @return [Anthropic::Models::Beta::BetaContainer, nil]
|
23
|
+
required :container, -> { Anthropic::Beta::BetaContainer }, nil?: true
|
24
|
+
|
18
25
|
# @!attribute content
|
19
26
|
# Content generated by the model.
|
20
27
|
#
|
@@ -49,7 +56,7 @@ module Anthropic
|
|
49
56
|
# [{ "type": "text", "text": "B)" }]
|
50
57
|
# ```
|
51
58
|
#
|
52
|
-
# @return [Array<Anthropic::Beta::BetaTextBlock, Anthropic::Beta::BetaToolUseBlock, Anthropic::Beta::BetaServerToolUseBlock, Anthropic::Beta::BetaWebSearchToolResultBlock, Anthropic::Beta::BetaThinkingBlock, Anthropic::Beta::BetaRedactedThinkingBlock>]
|
59
|
+
# @return [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock>]
|
53
60
|
required :content, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaContentBlock] }
|
54
61
|
|
55
62
|
# @!attribute model
|
@@ -57,7 +64,7 @@ module Anthropic
|
|
57
64
|
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
58
65
|
# details and options.
|
59
66
|
#
|
60
|
-
# @return [Symbol, String, Anthropic::Model]
|
67
|
+
# @return [Symbol, String, Anthropic::Models::Model]
|
61
68
|
required :model, union: -> { Anthropic::Model }
|
62
69
|
|
63
70
|
# @!attribute role
|
@@ -81,7 +88,7 @@ module Anthropic
|
|
81
88
|
# In non-streaming mode this value is always non-null. In streaming mode, it is
|
82
89
|
# null in the `message_start` event and non-null otherwise.
|
83
90
|
#
|
84
|
-
# @return [Symbol, Anthropic::Beta::BetaStopReason, nil]
|
91
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaStopReason, nil]
|
85
92
|
required :stop_reason, enum: -> { Anthropic::Beta::BetaStopReason }, nil?: true
|
86
93
|
|
87
94
|
# @!attribute stop_sequence
|
@@ -118,24 +125,26 @@ module Anthropic
|
|
118
125
|
# Total input tokens in a request is the summation of `input_tokens`,
|
119
126
|
# `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
120
127
|
#
|
121
|
-
# @return [Anthropic::Beta::BetaUsage]
|
128
|
+
# @return [Anthropic::Models::Beta::BetaUsage]
|
122
129
|
required :usage, -> { Anthropic::Beta::BetaUsage }
|
123
130
|
|
124
|
-
# @!method initialize(id:, content:, model:, stop_reason:, stop_sequence:, usage:, role: :assistant, type: :message)
|
131
|
+
# @!method initialize(id:, container:, content:, model:, stop_reason:, stop_sequence:, usage:, role: :assistant, type: :message)
|
125
132
|
# Some parameter documentations has been truncated, see
|
126
|
-
# {Anthropic::Beta::BetaMessage} for more details.
|
133
|
+
# {Anthropic::Models::Beta::BetaMessage} for more details.
|
127
134
|
#
|
128
135
|
# @param id [String] Unique object identifier.
|
129
136
|
#
|
130
|
-
# @param
|
137
|
+
# @param container [Anthropic::Models::Beta::BetaContainer, nil] Information about the container used in the request (for the code execution tool
|
138
|
+
#
|
139
|
+
# @param content [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock>] Content generated by the model.
|
131
140
|
#
|
132
|
-
# @param model [Symbol, String, Anthropic::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
141
|
+
# @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
|
133
142
|
#
|
134
|
-
# @param stop_reason [Symbol, Anthropic::Beta::BetaStopReason, nil] The reason that we stopped.
|
143
|
+
# @param stop_reason [Symbol, Anthropic::Models::Beta::BetaStopReason, nil] The reason that we stopped.
|
135
144
|
#
|
136
145
|
# @param stop_sequence [String, nil] Which custom stop sequence was generated, if any.
|
137
146
|
#
|
138
|
-
# @param usage [Anthropic::Beta::BetaUsage] Billing and rate-limit usage.
|
147
|
+
# @param usage [Anthropic::Models::Beta::BetaUsage] Billing and rate-limit usage.
|
139
148
|
#
|
140
149
|
# @param role [Symbol, :assistant] Conversational role of the generated message.
|
141
150
|
#
|
@@ -31,7 +31,7 @@ module Anthropic
|
|
31
31
|
# @!attribute server_tool_use
|
32
32
|
# The number of server tool requests.
|
33
33
|
#
|
34
|
-
# @return [Anthropic::Beta::BetaServerToolUsage, nil]
|
34
|
+
# @return [Anthropic::Models::Beta::BetaServerToolUsage, nil]
|
35
35
|
required :server_tool_use, -> { Anthropic::Beta::BetaServerToolUsage }, nil?: true
|
36
36
|
|
37
37
|
# @!method initialize(cache_creation_input_tokens:, cache_read_input_tokens:, input_tokens:, output_tokens:, server_tool_use:)
|
@@ -43,7 +43,7 @@ module Anthropic
|
|
43
43
|
#
|
44
44
|
# @param output_tokens [Integer] The cumulative number of output tokens which were used.
|
45
45
|
#
|
46
|
-
# @param server_tool_use [Anthropic::Beta::BetaServerToolUsage, nil] The number of server tool requests.
|
46
|
+
# @param server_tool_use [Anthropic::Models::Beta::BetaServerToolUsage, nil] The number of server tool requests.
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -6,35 +6,35 @@ module Anthropic
|
|
6
6
|
class BetaMessageParam < Anthropic::Internal::Type::BaseModel
|
7
7
|
# @!attribute content
|
8
8
|
#
|
9
|
-
# @return [String, Array<Anthropic::Beta::
|
9
|
+
# @return [String, Array<Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaBase64PDFBlock, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>]
|
10
10
|
required :content, union: -> { Anthropic::Beta::BetaMessageParam::Content }
|
11
11
|
|
12
12
|
# @!attribute role
|
13
13
|
#
|
14
|
-
# @return [Symbol, Anthropic::Beta::BetaMessageParam::Role]
|
14
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaMessageParam::Role]
|
15
15
|
required :role, enum: -> { Anthropic::Beta::BetaMessageParam::Role }
|
16
16
|
|
17
17
|
# @!method initialize(content:, role:)
|
18
|
-
# @param content [String, Array<Anthropic::Beta::
|
19
|
-
# @param role [Symbol, Anthropic::Beta::BetaMessageParam::Role]
|
18
|
+
# @param content [String, Array<Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaBase64PDFBlock, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>]
|
19
|
+
# @param role [Symbol, Anthropic::Models::Beta::BetaMessageParam::Role]
|
20
20
|
|
21
|
-
# @see Anthropic::Beta::BetaMessageParam#content
|
21
|
+
# @see Anthropic::Models::Beta::BetaMessageParam#content
|
22
22
|
module Content
|
23
23
|
extend Anthropic::Internal::Type::Union
|
24
24
|
|
25
25
|
variant String
|
26
26
|
|
27
|
-
variant -> { Anthropic::Beta::BetaMessageParam::Content::BetaContentBlockParamArray }
|
27
|
+
variant -> { Anthropic::Models::Beta::BetaMessageParam::Content::BetaContentBlockParamArray }
|
28
28
|
|
29
29
|
# @!method self.variants
|
30
|
-
# @return [Array(String, Array<Anthropic::Beta::
|
30
|
+
# @return [Array(String, Array<Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaBase64PDFBlock, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>)]
|
31
31
|
|
32
32
|
# @type [Anthropic::Internal::Type::Converter]
|
33
33
|
BetaContentBlockParamArray =
|
34
34
|
Anthropic::Internal::Type::ArrayOf[union: -> { Anthropic::Beta::BetaContentBlockParam }]
|
35
35
|
end
|
36
36
|
|
37
|
-
# @see Anthropic::Beta::BetaMessageParam#role
|
37
|
+
# @see Anthropic::Models::Beta::BetaMessageParam#role
|
38
38
|
module Role
|
39
39
|
extend Anthropic::Internal::Type::Enum
|
40
40
|
|
@@ -14,7 +14,7 @@ module Anthropic
|
|
14
14
|
|
15
15
|
# @!method initialize(input_tokens:)
|
16
16
|
# Some parameter documentations has been truncated, see
|
17
|
-
# {Anthropic::Beta::BetaMessageTokensCount} for more details.
|
17
|
+
# {Anthropic::Models::Beta::BetaMessageTokensCount} for more details.
|
18
18
|
#
|
19
19
|
# @param input_tokens [Integer] The total number of tokens across the provided list of messages, system prompt,
|
20
20
|
end
|
@@ -16,7 +16,7 @@ module Anthropic
|
|
16
16
|
|
17
17
|
# @!method initialize(user_id: nil)
|
18
18
|
# Some parameter documentations has been truncated, see
|
19
|
-
# {Anthropic::Beta::BetaMetadata} for more details.
|
19
|
+
# {Anthropic::Models::Beta::BetaMetadata} for more details.
|
20
20
|
#
|
21
21
|
# @param user_id [String, nil] An external identifier for the user who is associated with the request.
|
22
22
|
end
|
@@ -34,7 +34,7 @@ module Anthropic
|
|
34
34
|
|
35
35
|
# @!method initialize(id:, created_at:, display_name:, type: :model)
|
36
36
|
# Some parameter documentations has been truncated, see
|
37
|
-
# {Anthropic::Beta::BetaModelInfo} for more details.
|
37
|
+
# {Anthropic::Models::Beta::BetaModelInfo} for more details.
|
38
38
|
#
|
39
39
|
# @param id [String] Unique model identifier.
|
40
40
|
#
|
@@ -19,7 +19,7 @@ module Anthropic
|
|
19
19
|
variant :signature_delta, -> { Anthropic::Beta::BetaSignatureDelta }
|
20
20
|
|
21
21
|
# @!method self.variants
|
22
|
-
# @return [Array(Anthropic::Beta::BetaTextDelta, Anthropic::Beta::BetaInputJSONDelta, Anthropic::Beta::BetaCitationsDelta, Anthropic::Beta::BetaThinkingDelta, Anthropic::Beta::BetaSignatureDelta)]
|
22
|
+
# @return [Array(Anthropic::Models::Beta::BetaTextDelta, Anthropic::Models::Beta::BetaInputJSONDelta, Anthropic::Models::Beta::BetaCitationsDelta, Anthropic::Models::Beta::BetaThinkingDelta, Anthropic::Models::Beta::BetaSignatureDelta)]
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -6,7 +6,7 @@ module Anthropic
|
|
6
6
|
class BetaRawContentBlockDeltaEvent < Anthropic::Internal::Type::BaseModel
|
7
7
|
# @!attribute delta
|
8
8
|
#
|
9
|
-
# @return [Anthropic::Beta::BetaTextDelta, Anthropic::Beta::BetaInputJSONDelta, Anthropic::Beta::BetaCitationsDelta, Anthropic::Beta::BetaThinkingDelta, Anthropic::Beta::BetaSignatureDelta]
|
9
|
+
# @return [Anthropic::Models::Beta::BetaTextDelta, Anthropic::Models::Beta::BetaInputJSONDelta, Anthropic::Models::Beta::BetaCitationsDelta, Anthropic::Models::Beta::BetaThinkingDelta, Anthropic::Models::Beta::BetaSignatureDelta]
|
10
10
|
required :delta, union: -> { Anthropic::Beta::BetaRawContentBlockDelta }
|
11
11
|
|
12
12
|
# @!attribute index
|
@@ -20,7 +20,7 @@ module Anthropic
|
|
20
20
|
required :type, const: :content_block_delta
|
21
21
|
|
22
22
|
# @!method initialize(delta:, index:, type: :content_block_delta)
|
23
|
-
# @param delta [Anthropic::Beta::BetaTextDelta, Anthropic::Beta::BetaInputJSONDelta, Anthropic::Beta::BetaCitationsDelta, Anthropic::Beta::BetaThinkingDelta, Anthropic::Beta::BetaSignatureDelta]
|
23
|
+
# @param delta [Anthropic::Models::Beta::BetaTextDelta, Anthropic::Models::Beta::BetaInputJSONDelta, Anthropic::Models::Beta::BetaCitationsDelta, Anthropic::Models::Beta::BetaThinkingDelta, Anthropic::Models::Beta::BetaSignatureDelta]
|
24
24
|
# @param index [Integer]
|
25
25
|
# @param type [Symbol, :content_block_delta]
|
26
26
|
end
|
@@ -5,8 +5,9 @@ module Anthropic
|
|
5
5
|
module Beta
|
6
6
|
class BetaRawContentBlockStartEvent < Anthropic::Internal::Type::BaseModel
|
7
7
|
# @!attribute content_block
|
8
|
+
# Response model for a file uploaded to the container.
|
8
9
|
#
|
9
|
-
# @return [Anthropic::Beta::BetaTextBlock, Anthropic::Beta::BetaToolUseBlock, Anthropic::Beta::BetaServerToolUseBlock, Anthropic::Beta::BetaWebSearchToolResultBlock, Anthropic::Beta::BetaThinkingBlock, Anthropic::Beta::BetaRedactedThinkingBlock]
|
10
|
+
# @return [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock]
|
10
11
|
required :content_block, union: -> { Anthropic::Beta::BetaRawContentBlockStartEvent::ContentBlock }
|
11
12
|
|
12
13
|
# @!attribute index
|
@@ -20,11 +21,15 @@ module Anthropic
|
|
20
21
|
required :type, const: :content_block_start
|
21
22
|
|
22
23
|
# @!method initialize(content_block:, index:, type: :content_block_start)
|
23
|
-
# @param content_block [Anthropic::Beta::BetaTextBlock, Anthropic::Beta::BetaToolUseBlock, Anthropic::Beta::BetaServerToolUseBlock, Anthropic::Beta::BetaWebSearchToolResultBlock, Anthropic::Beta::BetaThinkingBlock, Anthropic::Beta::BetaRedactedThinkingBlock]
|
24
|
+
# @param content_block [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock] Response model for a file uploaded to the container.
|
25
|
+
#
|
24
26
|
# @param index [Integer]
|
27
|
+
#
|
25
28
|
# @param type [Symbol, :content_block_start]
|
26
29
|
|
27
|
-
#
|
30
|
+
# Response model for a file uploaded to the container.
|
31
|
+
#
|
32
|
+
# @see Anthropic::Models::Beta::BetaRawContentBlockStartEvent#content_block
|
28
33
|
module ContentBlock
|
29
34
|
extend Anthropic::Internal::Type::Union
|
30
35
|
|
@@ -38,12 +43,21 @@ module Anthropic
|
|
38
43
|
|
39
44
|
variant :web_search_tool_result, -> { Anthropic::Beta::BetaWebSearchToolResultBlock }
|
40
45
|
|
46
|
+
variant :code_execution_tool_result, -> { Anthropic::Beta::BetaCodeExecutionToolResultBlock }
|
47
|
+
|
48
|
+
variant :mcp_tool_use, -> { Anthropic::Beta::BetaMCPToolUseBlock }
|
49
|
+
|
50
|
+
variant :mcp_tool_result, -> { Anthropic::Beta::BetaMCPToolResultBlock }
|
51
|
+
|
52
|
+
# Response model for a file uploaded to the container.
|
53
|
+
variant :container_upload, -> { Anthropic::Beta::BetaContainerUploadBlock }
|
54
|
+
|
41
55
|
variant :thinking, -> { Anthropic::Beta::BetaThinkingBlock }
|
42
56
|
|
43
57
|
variant :redacted_thinking, -> { Anthropic::Beta::BetaRedactedThinkingBlock }
|
44
58
|
|
45
59
|
# @!method self.variants
|
46
|
-
# @return [Array(Anthropic::Beta::BetaTextBlock, Anthropic::Beta::BetaToolUseBlock, Anthropic::Beta::BetaServerToolUseBlock, Anthropic::Beta::BetaWebSearchToolResultBlock, Anthropic::Beta::BetaThinkingBlock, Anthropic::Beta::BetaRedactedThinkingBlock)]
|
60
|
+
# @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock)]
|
47
61
|
end
|
48
62
|
end
|
49
63
|
end
|
@@ -6,7 +6,7 @@ module Anthropic
|
|
6
6
|
class BetaRawMessageDeltaEvent < Anthropic::Internal::Type::BaseModel
|
7
7
|
# @!attribute delta
|
8
8
|
#
|
9
|
-
# @return [Anthropic::Beta::BetaRawMessageDeltaEvent::Delta]
|
9
|
+
# @return [Anthropic::Models::Beta::BetaRawMessageDeltaEvent::Delta]
|
10
10
|
required :delta, -> { Anthropic::Beta::BetaRawMessageDeltaEvent::Delta }
|
11
11
|
|
12
12
|
# @!attribute type
|
@@ -31,24 +31,31 @@ module Anthropic
|
|
31
31
|
# Total input tokens in a request is the summation of `input_tokens`,
|
32
32
|
# `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
33
33
|
#
|
34
|
-
# @return [Anthropic::Beta::BetaMessageDeltaUsage]
|
34
|
+
# @return [Anthropic::Models::Beta::BetaMessageDeltaUsage]
|
35
35
|
required :usage, -> { Anthropic::Beta::BetaMessageDeltaUsage }
|
36
36
|
|
37
37
|
# @!method initialize(delta:, usage:, type: :message_delta)
|
38
38
|
# Some parameter documentations has been truncated, see
|
39
|
-
# {Anthropic::Beta::BetaRawMessageDeltaEvent} for more details.
|
39
|
+
# {Anthropic::Models::Beta::BetaRawMessageDeltaEvent} for more details.
|
40
40
|
#
|
41
|
-
# @param delta [Anthropic::Beta::BetaRawMessageDeltaEvent::Delta]
|
41
|
+
# @param delta [Anthropic::Models::Beta::BetaRawMessageDeltaEvent::Delta]
|
42
42
|
#
|
43
|
-
# @param usage [Anthropic::Beta::BetaMessageDeltaUsage] Billing and rate-limit usage.
|
43
|
+
# @param usage [Anthropic::Models::Beta::BetaMessageDeltaUsage] Billing and rate-limit usage.
|
44
44
|
#
|
45
45
|
# @param type [Symbol, :message_delta]
|
46
46
|
|
47
|
-
# @see Anthropic::Beta::BetaRawMessageDeltaEvent#delta
|
47
|
+
# @see Anthropic::Models::Beta::BetaRawMessageDeltaEvent#delta
|
48
48
|
class Delta < Anthropic::Internal::Type::BaseModel
|
49
|
+
# @!attribute container
|
50
|
+
# Information about the container used in the request (for the code execution
|
51
|
+
# tool)
|
52
|
+
#
|
53
|
+
# @return [Anthropic::Models::Beta::BetaContainer, nil]
|
54
|
+
required :container, -> { Anthropic::Beta::BetaContainer }, nil?: true
|
55
|
+
|
49
56
|
# @!attribute stop_reason
|
50
57
|
#
|
51
|
-
# @return [Symbol, Anthropic::Beta::BetaStopReason, nil]
|
58
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaStopReason, nil]
|
52
59
|
required :stop_reason, enum: -> { Anthropic::Beta::BetaStopReason }, nil?: true
|
53
60
|
|
54
61
|
# @!attribute stop_sequence
|
@@ -56,8 +63,14 @@ module Anthropic
|
|
56
63
|
# @return [String, nil]
|
57
64
|
required :stop_sequence, String, nil?: true
|
58
65
|
|
59
|
-
# @!method initialize(stop_reason:, stop_sequence:)
|
60
|
-
#
|
66
|
+
# @!method initialize(container:, stop_reason:, stop_sequence:)
|
67
|
+
# Some parameter documentations has been truncated, see
|
68
|
+
# {Anthropic::Models::Beta::BetaRawMessageDeltaEvent::Delta} for more details.
|
69
|
+
#
|
70
|
+
# @param container [Anthropic::Models::Beta::BetaContainer, nil] Information about the container used in the request (for the code execution tool
|
71
|
+
#
|
72
|
+
# @param stop_reason [Symbol, Anthropic::Models::Beta::BetaStopReason, nil]
|
73
|
+
#
|
61
74
|
# @param stop_sequence [String, nil]
|
62
75
|
end
|
63
76
|
end
|
@@ -6,7 +6,7 @@ module Anthropic
|
|
6
6
|
class BetaRawMessageStartEvent < Anthropic::Internal::Type::BaseModel
|
7
7
|
# @!attribute message
|
8
8
|
#
|
9
|
-
# @return [Anthropic::Beta::BetaMessage]
|
9
|
+
# @return [Anthropic::Models::Beta::BetaMessage]
|
10
10
|
required :message, -> { Anthropic::Beta::BetaMessage }
|
11
11
|
|
12
12
|
# @!attribute type
|
@@ -15,7 +15,7 @@ module Anthropic
|
|
15
15
|
required :type, const: :message_start
|
16
16
|
|
17
17
|
# @!method initialize(message:, type: :message_start)
|
18
|
-
# @param message [Anthropic::Beta::BetaMessage]
|
18
|
+
# @param message [Anthropic::Models::Beta::BetaMessage]
|
19
19
|
# @param type [Symbol, :message_start]
|
20
20
|
end
|
21
21
|
end
|
@@ -21,7 +21,7 @@ module Anthropic
|
|
21
21
|
variant :content_block_stop, -> { Anthropic::Beta::BetaRawContentBlockStopEvent }
|
22
22
|
|
23
23
|
# @!method self.variants
|
24
|
-
# @return [Array(Anthropic::Beta::BetaRawMessageStartEvent, Anthropic::Beta::BetaRawMessageDeltaEvent, Anthropic::Beta::BetaRawMessageStopEvent, Anthropic::Beta::BetaRawContentBlockStartEvent, Anthropic::Beta::BetaRawContentBlockDeltaEvent, Anthropic::Beta::BetaRawContentBlockStopEvent)]
|
24
|
+
# @return [Array(Anthropic::Models::Beta::BetaRawMessageStartEvent, Anthropic::Models::Beta::BetaRawMessageDeltaEvent, Anthropic::Models::Beta::BetaRawMessageStopEvent, Anthropic::Models::Beta::BetaRawContentBlockStartEvent, Anthropic::Models::Beta::BetaRawContentBlockDeltaEvent, Anthropic::Models::Beta::BetaRawContentBlockStopEvent)]
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaRequestMCPServerToolConfiguration < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute allowed_tools
|
8
|
+
#
|
9
|
+
# @return [Array<String>, nil]
|
10
|
+
optional :allowed_tools, Anthropic::Internal::Type::ArrayOf[String], nil?: true
|
11
|
+
|
12
|
+
# @!attribute enabled
|
13
|
+
#
|
14
|
+
# @return [Boolean, nil]
|
15
|
+
optional :enabled, Anthropic::Internal::Type::Boolean, nil?: true
|
16
|
+
|
17
|
+
# @!method initialize(allowed_tools: nil, enabled: nil)
|
18
|
+
# @param allowed_tools [Array<String>, nil]
|
19
|
+
# @param enabled [Boolean, nil]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
BetaRequestMCPServerToolConfiguration = Beta::BetaRequestMCPServerToolConfiguration
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaRequestMCPServerURLDefinition < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute name
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :name, String
|
11
|
+
|
12
|
+
# @!attribute type
|
13
|
+
#
|
14
|
+
# @return [Symbol, :url]
|
15
|
+
required :type, const: :url
|
16
|
+
|
17
|
+
# @!attribute url
|
18
|
+
#
|
19
|
+
# @return [String]
|
20
|
+
required :url, String
|
21
|
+
|
22
|
+
# @!attribute authorization_token
|
23
|
+
#
|
24
|
+
# @return [String, nil]
|
25
|
+
optional :authorization_token, String, nil?: true
|
26
|
+
|
27
|
+
# @!attribute tool_configuration
|
28
|
+
#
|
29
|
+
# @return [Anthropic::Models::Beta::BetaRequestMCPServerToolConfiguration, nil]
|
30
|
+
optional :tool_configuration,
|
31
|
+
-> {
|
32
|
+
Anthropic::Beta::BetaRequestMCPServerToolConfiguration
|
33
|
+
},
|
34
|
+
nil?: true
|
35
|
+
|
36
|
+
# @!method initialize(name:, url:, authorization_token: nil, tool_configuration: nil, type: :url)
|
37
|
+
# @param name [String]
|
38
|
+
# @param url [String]
|
39
|
+
# @param authorization_token [String, nil]
|
40
|
+
# @param tool_configuration [Anthropic::Models::Beta::BetaRequestMCPServerToolConfiguration, nil]
|
41
|
+
# @param type [Symbol, :url]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
BetaRequestMCPServerURLDefinition = Beta::BetaRequestMCPServerURLDefinition
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaRequestMCPToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute tool_use_id
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :tool_use_id, String
|
11
|
+
|
12
|
+
# @!attribute type
|
13
|
+
#
|
14
|
+
# @return [Symbol, :mcp_tool_result]
|
15
|
+
required :type, const: :mcp_tool_result
|
16
|
+
|
17
|
+
# @!attribute cache_control
|
18
|
+
# Create a cache control breakpoint at this content block.
|
19
|
+
#
|
20
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
21
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
22
|
+
|
23
|
+
# @!attribute content
|
24
|
+
#
|
25
|
+
# @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>, nil]
|
26
|
+
optional :content, union: -> { Anthropic::Beta::BetaRequestMCPToolResultBlockParam::Content }
|
27
|
+
|
28
|
+
# @!attribute is_error
|
29
|
+
#
|
30
|
+
# @return [Boolean, nil]
|
31
|
+
optional :is_error, Anthropic::Internal::Type::Boolean
|
32
|
+
|
33
|
+
# @!method initialize(tool_use_id:, cache_control: nil, content: nil, is_error: nil, type: :mcp_tool_result)
|
34
|
+
# @param tool_use_id [String]
|
35
|
+
#
|
36
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
37
|
+
#
|
38
|
+
# @param content [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>]
|
39
|
+
#
|
40
|
+
# @param is_error [Boolean]
|
41
|
+
#
|
42
|
+
# @param type [Symbol, :mcp_tool_result]
|
43
|
+
|
44
|
+
# @see Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam#content
|
45
|
+
module Content
|
46
|
+
extend Anthropic::Internal::Type::Union
|
47
|
+
|
48
|
+
variant String
|
49
|
+
|
50
|
+
variant -> { Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam::Content::BetaTextBlockParamArray }
|
51
|
+
|
52
|
+
# @!method self.variants
|
53
|
+
# @return [Array(String, Array<Anthropic::Models::Beta::BetaTextBlockParam>)]
|
54
|
+
|
55
|
+
# @type [Anthropic::Internal::Type::Converter]
|
56
|
+
BetaTextBlockParamArray = Anthropic::Internal::Type::ArrayOf[-> {
|
57
|
+
Anthropic::Beta::BetaTextBlockParam
|
58
|
+
}]
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
BetaRequestMCPToolResultBlockParam = Beta::BetaRequestMCPToolResultBlockParam
|
64
|
+
end
|
65
|
+
end
|
@@ -16,19 +16,30 @@ module Anthropic
|
|
16
16
|
|
17
17
|
# @!attribute name
|
18
18
|
#
|
19
|
-
# @return [Symbol,
|
20
|
-
required :name,
|
19
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaServerToolUseBlock::Name]
|
20
|
+
required :name, enum: -> { Anthropic::Beta::BetaServerToolUseBlock::Name }
|
21
21
|
|
22
22
|
# @!attribute type
|
23
23
|
#
|
24
24
|
# @return [Symbol, :server_tool_use]
|
25
25
|
required :type, const: :server_tool_use
|
26
26
|
|
27
|
-
# @!method initialize(id:, input:, name
|
27
|
+
# @!method initialize(id:, input:, name:, type: :server_tool_use)
|
28
28
|
# @param id [String]
|
29
29
|
# @param input [Object]
|
30
|
-
# @param name [Symbol,
|
30
|
+
# @param name [Symbol, Anthropic::Models::Beta::BetaServerToolUseBlock::Name]
|
31
31
|
# @param type [Symbol, :server_tool_use]
|
32
|
+
|
33
|
+
# @see Anthropic::Models::Beta::BetaServerToolUseBlock#name
|
34
|
+
module Name
|
35
|
+
extend Anthropic::Internal::Type::Enum
|
36
|
+
|
37
|
+
WEB_SEARCH = :web_search
|
38
|
+
CODE_EXECUTION = :code_execution
|
39
|
+
|
40
|
+
# @!method self.values
|
41
|
+
# @return [Array<Symbol>]
|
42
|
+
end
|
32
43
|
end
|
33
44
|
end
|
34
45
|
|
@@ -16,8 +16,8 @@ module Anthropic
|
|
16
16
|
|
17
17
|
# @!attribute name
|
18
18
|
#
|
19
|
-
# @return [Symbol,
|
20
|
-
required :name,
|
19
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaServerToolUseBlockParam::Name]
|
20
|
+
required :name, enum: -> { Anthropic::Beta::BetaServerToolUseBlockParam::Name }
|
21
21
|
|
22
22
|
# @!attribute type
|
23
23
|
#
|
@@ -27,19 +27,30 @@ module Anthropic
|
|
27
27
|
# @!attribute cache_control
|
28
28
|
# Create a cache control breakpoint at this content block.
|
29
29
|
#
|
30
|
-
# @return [Anthropic::Beta::BetaCacheControlEphemeral, nil]
|
30
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
31
31
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
32
32
|
|
33
|
-
# @!method initialize(id:, input:, cache_control: nil,
|
33
|
+
# @!method initialize(id:, input:, name:, cache_control: nil, type: :server_tool_use)
|
34
34
|
# @param id [String]
|
35
35
|
#
|
36
36
|
# @param input [Object]
|
37
37
|
#
|
38
|
-
# @param
|
38
|
+
# @param name [Symbol, Anthropic::Models::Beta::BetaServerToolUseBlockParam::Name]
|
39
39
|
#
|
40
|
-
# @param
|
40
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
41
41
|
#
|
42
42
|
# @param type [Symbol, :server_tool_use]
|
43
|
+
|
44
|
+
# @see Anthropic::Models::Beta::BetaServerToolUseBlockParam#name
|
45
|
+
module Name
|
46
|
+
extend Anthropic::Internal::Type::Enum
|
47
|
+
|
48
|
+
WEB_SEARCH = :web_search
|
49
|
+
CODE_EXECUTION = :code_execution
|
50
|
+
|
51
|
+
# @!method self.values
|
52
|
+
# @return [Array<Symbol>]
|
53
|
+
end
|
43
54
|
end
|
44
55
|
end
|
45
56
|
|
@@ -11,7 +11,7 @@ module Anthropic
|
|
11
11
|
# Citing a PDF results in `page_location`, plain text results in `char_location`,
|
12
12
|
# and content document results in `content_block_location`.
|
13
13
|
#
|
14
|
-
# @return [Array<Anthropic::Beta::BetaCitationCharLocation, Anthropic::Beta::BetaCitationPageLocation, Anthropic::Beta::BetaCitationContentBlockLocation, Anthropic::Beta::BetaCitationsWebSearchResultLocation>, nil]
|
14
|
+
# @return [Array<Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation>, nil]
|
15
15
|
required :citations,
|
16
16
|
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaTextCitation] },
|
17
17
|
nil?: true
|
@@ -28,9 +28,9 @@ module Anthropic
|
|
28
28
|
|
29
29
|
# @!method initialize(citations:, text:, type: :text)
|
30
30
|
# Some parameter documentations has been truncated, see
|
31
|
-
# {Anthropic::Beta::BetaTextBlock} for more details.
|
31
|
+
# {Anthropic::Models::Beta::BetaTextBlock} for more details.
|
32
32
|
#
|
33
|
-
# @param citations [Array<Anthropic::Beta::BetaCitationCharLocation, Anthropic::Beta::BetaCitationPageLocation, Anthropic::Beta::BetaCitationContentBlockLocation, Anthropic::Beta::BetaCitationsWebSearchResultLocation>, nil] Citations supporting the text block.
|
33
|
+
# @param citations [Array<Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation>, nil] Citations supporting the text block.
|
34
34
|
#
|
35
35
|
# @param text [String]
|
36
36
|
#
|
@@ -17,12 +17,12 @@ module Anthropic
|
|
17
17
|
# @!attribute cache_control
|
18
18
|
# Create a cache control breakpoint at this content block.
|
19
19
|
#
|
20
|
-
# @return [Anthropic::Beta::BetaCacheControlEphemeral, nil]
|
20
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
21
21
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
22
22
|
|
23
23
|
# @!attribute citations
|
24
24
|
#
|
25
|
-
# @return [Array<Anthropic::Beta::BetaCitationCharLocationParam, Anthropic::Beta::BetaCitationPageLocationParam, Anthropic::Beta::BetaCitationContentBlockLocationParam, Anthropic::Beta::BetaCitationWebSearchResultLocationParam>, nil]
|
25
|
+
# @return [Array<Anthropic::Models::Beta::BetaCitationCharLocationParam, Anthropic::Models::Beta::BetaCitationPageLocationParam, Anthropic::Models::Beta::BetaCitationContentBlockLocationParam, Anthropic::Models::Beta::BetaCitationWebSearchResultLocationParam>, nil]
|
26
26
|
optional :citations,
|
27
27
|
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaTextCitationParam] },
|
28
28
|
nil?: true
|
@@ -30,9 +30,9 @@ module Anthropic
|
|
30
30
|
# @!method initialize(text:, cache_control: nil, citations: nil, type: :text)
|
31
31
|
# @param text [String]
|
32
32
|
#
|
33
|
-
# @param cache_control [Anthropic::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
33
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
34
34
|
#
|
35
|
-
# @param citations [Array<Anthropic::Beta::BetaCitationCharLocationParam, Anthropic::Beta::BetaCitationPageLocationParam, Anthropic::Beta::BetaCitationContentBlockLocationParam, Anthropic::Beta::BetaCitationWebSearchResultLocationParam>, nil]
|
35
|
+
# @param citations [Array<Anthropic::Models::Beta::BetaCitationCharLocationParam, Anthropic::Models::Beta::BetaCitationPageLocationParam, Anthropic::Models::Beta::BetaCitationContentBlockLocationParam, Anthropic::Models::Beta::BetaCitationWebSearchResultLocationParam>, nil]
|
36
36
|
#
|
37
37
|
# @param type [Symbol, :text]
|
38
38
|
end
|
@@ -17,7 +17,7 @@ module Anthropic
|
|
17
17
|
variant :web_search_result_location, -> { Anthropic::Beta::BetaCitationsWebSearchResultLocation }
|
18
18
|
|
19
19
|
# @!method self.variants
|
20
|
-
# @return [Array(Anthropic::Beta::BetaCitationCharLocation, Anthropic::Beta::BetaCitationPageLocation, Anthropic::Beta::BetaCitationContentBlockLocation, Anthropic::Beta::BetaCitationsWebSearchResultLocation)]
|
20
|
+
# @return [Array(Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation)]
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|