anthropic 1.1.1 → 1.9.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 +170 -0
- data/README.md +32 -16
- data/lib/anthropic/client.rb +5 -2
- data/lib/anthropic/errors.rb +22 -0
- data/lib/anthropic/helpers/bedrock/client.rb +34 -4
- data/lib/anthropic/helpers/input_schema/array_of.rb +41 -0
- data/lib/anthropic/helpers/input_schema/base_model.rb +86 -0
- data/lib/anthropic/helpers/input_schema/boolean.rb +29 -0
- data/lib/anthropic/helpers/input_schema/enum_of.rb +63 -0
- data/lib/anthropic/helpers/input_schema/json_schema_converter.rb +199 -0
- data/lib/anthropic/helpers/input_schema/parsed_json.rb +39 -0
- data/lib/anthropic/helpers/input_schema/property_mapping.rb +47 -0
- data/lib/anthropic/helpers/input_schema/union_of.rb +56 -0
- data/lib/anthropic/helpers/input_schema.rb +16 -0
- data/lib/anthropic/helpers/streaming/events.rb +141 -0
- data/lib/anthropic/helpers/streaming/message_stream.rb +278 -0
- data/lib/anthropic/helpers/streaming.rb +37 -0
- data/lib/anthropic/helpers/vertex/client.rb +4 -1
- data/lib/anthropic/input_schema.rb +10 -0
- data/lib/anthropic/internal/stream.rb +6 -3
- data/lib/anthropic/internal/transport/base_client.rb +30 -5
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/anthropic/internal/type/array_of.rb +7 -1
- data/lib/anthropic/internal/type/base_model.rb +81 -32
- data/lib/anthropic/internal/type/base_stream.rb +3 -1
- data/lib/anthropic/internal/type/boolean.rb +7 -1
- data/lib/anthropic/internal/type/converter.rb +69 -34
- data/lib/anthropic/internal/type/enum.rb +16 -5
- data/lib/anthropic/internal/type/file_input.rb +6 -1
- data/lib/anthropic/internal/type/hash_of.rb +7 -1
- data/lib/anthropic/internal/type/union.rb +26 -16
- data/lib/anthropic/internal/type/unknown.rb +7 -1
- data/lib/anthropic/internal/util.rb +10 -11
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +1 -65
- data/lib/anthropic/models/beta/beta_bash_code_execution_output_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_output_block_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_result_block.rb +44 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_result_block_param.rb +44 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rb +53 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rb +39 -0
- data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rb +39 -0
- data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_config.rb +19 -0
- data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -1
- data/lib/anthropic/models/beta/beta_citation_search_result_location.rb +55 -0
- data/lib/anthropic/models/beta/beta_citation_search_result_location_param.rb +55 -0
- data/lib/anthropic/models/beta/beta_citations_delta.rb +5 -3
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +40 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +12 -5
- data/lib/anthropic/models/beta/beta_content_block_param.rb +28 -17
- data/lib/anthropic/models/beta/beta_document_block.rb +56 -0
- data/lib/anthropic/models/beta/beta_message.rb +6 -2
- data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +14 -7
- data/lib/anthropic/models/beta/beta_request_document_block.rb +75 -0
- data/lib/anthropic/models/beta/beta_search_result_block_param.rb +55 -0
- data/lib/anthropic/models/beta/beta_server_tool_usage.rb +9 -1
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +3 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +3 -0
- data/lib/anthropic/models/beta/beta_text_block.rb +2 -2
- data/lib/anthropic/models/beta/beta_text_block_param.rb +2 -2
- data/lib/anthropic/models/beta/beta_text_citation.rb +3 -1
- data/lib/anthropic/models/beta/beta_text_citation_param.rb +3 -1
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rb +26 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rb +49 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb +50 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rb +47 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rb +57 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rb +45 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rb +46 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rb +61 -0
- data/lib/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rb +62 -0
- data/lib/anthropic/models/beta/beta_tool.rb +7 -1
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +8 -4
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +49 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +12 -6
- data/lib/anthropic/models/beta/beta_web_fetch_block.rb +42 -0
- data/lib/anthropic/models/beta/beta_web_fetch_block_param.rb +42 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +82 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +53 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rb +25 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +23 -36
- data/lib/anthropic/models/beta/message_create_params.rb +10 -27
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +13 -37
- data/lib/anthropic/models/beta/messages/beta_message_batch.rb +1 -4
- data/lib/anthropic/models/beta_error_response.rb +7 -1
- data/lib/anthropic/models/cache_control_ephemeral.rb +39 -1
- data/lib/anthropic/models/cache_creation.rb +24 -0
- data/lib/anthropic/models/citation_char_location.rb +7 -1
- data/lib/anthropic/models/citation_content_block_location.rb +7 -1
- data/lib/anthropic/models/citation_page_location.rb +7 -1
- data/lib/anthropic/models/citation_search_result_location_param.rb +51 -0
- data/lib/anthropic/models/citations_delta.rb +5 -3
- data/lib/anthropic/models/citations_search_result_location.rb +51 -0
- data/lib/anthropic/models/content_block.rb +5 -5
- data/lib/anthropic/models/content_block_param.rb +14 -11
- data/lib/anthropic/models/document_block_param.rb +2 -2
- data/lib/anthropic/models/error_response.rb +7 -1
- data/lib/anthropic/models/message.rb +6 -2
- data/lib/anthropic/models/message_count_tokens_params.rb +10 -27
- data/lib/anthropic/models/message_count_tokens_tool.rb +5 -1
- data/lib/anthropic/models/message_create_params.rb +10 -27
- data/lib/anthropic/models/message_param.rb +3 -3
- data/lib/anthropic/models/messages/batch_create_params.rb +11 -31
- data/lib/anthropic/models/model.rb +16 -21
- data/lib/anthropic/models/raw_content_block_start_event.rb +7 -7
- data/lib/anthropic/models/search_result_block_param.rb +51 -0
- data/lib/anthropic/models/text_block.rb +2 -2
- data/lib/anthropic/models/text_block_param.rb +2 -2
- data/lib/anthropic/models/text_citation.rb +3 -1
- data/lib/anthropic/models/text_citation_param.rb +3 -1
- data/lib/anthropic/models/tool.rb +7 -1
- data/lib/anthropic/models/tool_result_block_param.rb +8 -4
- data/lib/anthropic/models/tool_text_editor_20250429.rb +36 -0
- data/lib/anthropic/models/tool_text_editor_20250728.rb +45 -0
- data/lib/anthropic/models/tool_union.rb +5 -1
- data/lib/anthropic/models/tool_use_block.rb +14 -0
- data/lib/anthropic/models/usage.rb +9 -1
- data/lib/anthropic/models.rb +16 -4
- data/lib/anthropic/resources/beta/messages.rb +73 -6
- data/lib/anthropic/resources/messages.rb +152 -7
- data/lib/anthropic/streaming.rb +5 -0
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +54 -0
- data/rbi/anthropic/errors.rbi +18 -2
- data/rbi/anthropic/helpers/bedrock/client.rbi +17 -6
- data/rbi/anthropic/helpers/input_schema/array_of.rbi +16 -0
- data/rbi/anthropic/helpers/input_schema/base_model.rbi +21 -0
- data/rbi/anthropic/helpers/input_schema/boolean.rbi +11 -0
- data/rbi/anthropic/helpers/input_schema/enum_of.rbi +30 -0
- data/rbi/anthropic/helpers/input_schema/json_schema_converter.rbi +89 -0
- data/rbi/anthropic/helpers/input_schema/union_of.rbi +23 -0
- data/rbi/anthropic/helpers/streaming/events.rbi +95 -0
- data/rbi/anthropic/helpers/streaming/message_stream.rbi +73 -0
- data/rbi/anthropic/helpers/structured_output.rbi +16 -0
- data/rbi/anthropic/helpers/vertex/client.rbi +17 -6
- data/rbi/anthropic/input_schema.rbi +12 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +1 -1
- data/rbi/anthropic/internal/type/base_stream.rbi +8 -1
- data/rbi/anthropic/internal/type/boolean.rbi +2 -0
- data/rbi/anthropic/internal/type/converter.rbi +69 -15
- data/rbi/anthropic/internal/type/union.rbi +14 -2
- data/rbi/anthropic/internal/type/unknown.rbi +2 -0
- data/rbi/anthropic/internal/util.rbi +2 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_base64_pdf_block.rbi +1 -128
- data/rbi/anthropic/models/beta/beta_bash_code_execution_output_block.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_output_block_param.rbi +34 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_result_block.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_result_block_param.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rbi +86 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rbi +110 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rbi +101 -0
- data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rbi +101 -0
- data/rbi/anthropic/models/beta/beta_citation_char_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_config.rbi +30 -0
- data/rbi/anthropic/models/beta/beta_citation_content_block_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_page_location.rbi +6 -0
- data/rbi/anthropic/models/beta/beta_citation_search_result_location.rbi +78 -0
- data/rbi/anthropic/models/beta/beta_citation_search_result_location_param.rbi +79 -0
- data/rbi/anthropic/models/beta/beta_citations_delta.rbi +4 -2
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +6 -3
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +11 -7
- data/rbi/anthropic/models/beta/beta_document_block.rbi +95 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +14 -3
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +12 -6
- data/rbi/anthropic/models/beta/beta_request_document_block.rbi +142 -0
- data/rbi/anthropic/models/beta/beta_search_result_block_param.rbi +91 -0
- data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +17 -2
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +15 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +15 -0
- data/rbi/anthropic/models/beta/beta_text_block.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_text_block_param.rbi +6 -3
- data/rbi/anthropic/models/beta/beta_text_citation.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_text_citation_param.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rbi +41 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rbi +41 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rbi +73 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbi +73 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rbi +90 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rbi +118 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rbi +110 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rbi +110 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rbi +118 -0
- data/rbi/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rbi +118 -0
- data/rbi/anthropic/models/beta/beta_tool.rbi +14 -5
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +7 -4
- data/rbi/anthropic/models/beta/beta_web_fetch_block.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_block_param.rbi +71 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +125 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +81 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +109 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbi +51 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbi +50 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbi +70 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +51 -70
- data/rbi/anthropic/models/beta/message_create_params.rbi +44 -66
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +44 -66
- data/rbi/anthropic/models/beta_error_response.rbi +10 -2
- data/rbi/anthropic/models/cache_control_ephemeral.rbi +68 -3
- data/rbi/anthropic/models/cache_creation.rbi +45 -0
- data/rbi/anthropic/models/citation_char_location.rbi +6 -0
- data/rbi/anthropic/models/citation_content_block_location.rbi +6 -0
- data/rbi/anthropic/models/citation_page_location.rbi +6 -0
- data/rbi/anthropic/models/citation_search_result_location_param.rbi +74 -0
- data/rbi/anthropic/models/citations_delta.rbi +4 -2
- data/rbi/anthropic/models/citations_search_result_location.rbi +74 -0
- data/rbi/anthropic/models/content_block.rbi +3 -3
- data/rbi/anthropic/models/content_block_param.rbi +6 -5
- data/rbi/anthropic/models/document_block_param.rbi +7 -3
- data/rbi/anthropic/models/error_response.rbi +10 -2
- data/rbi/anthropic/models/message.rbi +11 -3
- data/rbi/anthropic/models/message_count_tokens_params.rbi +24 -50
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -0
- data/rbi/anthropic/models/message_create_params.rbi +24 -50
- data/rbi/anthropic/models/messages/batch_create_params.rbi +24 -50
- data/rbi/anthropic/models/model.rbi +4 -8
- data/rbi/anthropic/models/raw_content_block_start_event.rbi +6 -6
- data/rbi/anthropic/models/search_result_block_param.rbi +77 -0
- data/rbi/anthropic/models/text_block.rbi +2 -1
- data/rbi/anthropic/models/text_block_param.rbi +6 -3
- data/rbi/anthropic/models/text_citation.rbi +2 -1
- data/rbi/anthropic/models/text_citation_param.rbi +2 -1
- data/rbi/anthropic/models/tool.rbi +16 -5
- data/rbi/anthropic/models/tool_result_block_param.rbi +6 -1
- data/rbi/anthropic/models/tool_text_editor_20250429.rbi +62 -0
- data/rbi/anthropic/models/tool_text_editor_20250728.rbi +72 -0
- data/rbi/anthropic/models/tool_union.rbi +2 -0
- data/rbi/anthropic/models/usage.rbi +13 -0
- data/rbi/anthropic/models.rbi +14 -0
- data/rbi/anthropic/resources/beta/messages.rbi +45 -87
- data/rbi/anthropic/resources/messages.rbi +315 -69
- data/rbi/anthropic/streaming.rbi +5 -0
- data/sig/anthropic/errors.rbs +9 -0
- data/sig/anthropic/helpers/streaming/events.rbs +117 -0
- data/sig/anthropic/helpers/streaming/message_stream.rbs +57 -0
- data/sig/anthropic/internal/transport/base_client.rbs +1 -1
- data/sig/anthropic/internal/type/base_stream.rbs +4 -0
- data/sig/anthropic/internal/type/converter.rbs +24 -1
- data/sig/anthropic/internal/type/union.rbs +2 -2
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +1 -58
- data/sig/anthropic/models/beta/beta_bash_code_execution_output_block.rbs +23 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_output_block_param.rbs +23 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_result_block_param.rbs +44 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rbs +48 -0
- data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rbs +48 -0
- data/sig/anthropic/models/beta/beta_citation_char_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_config.rbs +17 -0
- data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_page_location.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_search_result_location.rbs +54 -0
- data/sig/anthropic/models/beta/beta_citation_search_result_location_param.rbs +54 -0
- data/sig/anthropic/models/beta/beta_citations_delta.rbs +1 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +34 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +5 -2
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +12 -8
- data/sig/anthropic/models/beta/beta_document_block.rbs +49 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +5 -2
- data/sig/anthropic/models/beta/beta_request_document_block.rbs +62 -0
- data/sig/anthropic/models/beta/beta_search_result_block_param.rbs +53 -0
- data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +12 -3
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +9 -1
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +9 -1
- data/sig/anthropic/models/beta/beta_text_citation.rbs +1 -0
- data/sig/anthropic/models/beta/beta_text_citation_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rbs +29 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rbs +49 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rbs +46 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rbs +51 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rbs +53 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rbs +53 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rbs +61 -0
- data/sig/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rbs +61 -0
- data/sig/anthropic/models/beta/beta_tool.rbs +14 -3
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +39 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +7 -4
- data/sig/anthropic/models/beta/beta_web_fetch_block.rbs +39 -0
- data/sig/anthropic/models/beta/beta_web_fetch_block_param.rbs +39 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +59 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbs +29 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbs +32 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +7 -4
- data/sig/anthropic/models/beta_error_response.rbs +13 -2
- data/sig/anthropic/models/cache_control_ephemeral.rbs +27 -3
- data/sig/anthropic/models/cache_creation.rbs +25 -0
- data/sig/anthropic/models/citation_char_location.rbs +5 -0
- data/sig/anthropic/models/citation_content_block_location.rbs +5 -0
- data/sig/anthropic/models/citation_page_location.rbs +5 -0
- data/sig/anthropic/models/citation_search_result_location_param.rbs +50 -0
- data/sig/anthropic/models/citations_delta.rbs +1 -0
- data/sig/anthropic/models/citations_search_result_location.rbs +50 -0
- data/sig/anthropic/models/content_block.rbs +2 -2
- data/sig/anthropic/models/content_block_param.rbs +6 -5
- data/sig/anthropic/models/document_block_param.rbs +4 -8
- data/sig/anthropic/models/error_response.rbs +13 -2
- data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -0
- data/sig/anthropic/models/model.rbs +4 -10
- data/sig/anthropic/models/raw_content_block_start_event.rbs +2 -2
- data/sig/anthropic/models/search_result_block_param.rbs +49 -0
- data/sig/anthropic/models/text_citation.rbs +1 -0
- data/sig/anthropic/models/text_citation_param.rbs +1 -0
- data/sig/anthropic/models/tool.rbs +14 -3
- data/sig/anthropic/models/tool_result_block_param.rbs +5 -1
- data/sig/anthropic/models/tool_text_editor_20250429.rbs +30 -0
- data/sig/anthropic/models/tool_text_editor_20250728.rbs +35 -0
- data/sig/anthropic/models/tool_union.rbs +2 -0
- data/sig/anthropic/models/usage.rbs +5 -0
- data/sig/anthropic/models.rbs +12 -0
- data/sig/anthropic/streaming.rbs +3 -0
- metadata +152 -3
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionOutputBlockParam < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute file_id
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :file_id, String
|
11
|
+
|
12
|
+
# @!attribute type
|
13
|
+
#
|
14
|
+
# @return [Symbol, :bash_code_execution_output]
|
15
|
+
required :type, const: :bash_code_execution_output
|
16
|
+
|
17
|
+
# @!method initialize(file_id:, type: :bash_code_execution_output)
|
18
|
+
# @param file_id [String]
|
19
|
+
# @param type [Symbol, :bash_code_execution_output]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
BetaBashCodeExecutionOutputBlockParam = Beta::BetaBashCodeExecutionOutputBlockParam
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute content
|
8
|
+
#
|
9
|
+
# @return [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlock>]
|
10
|
+
required :content,
|
11
|
+
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaBashCodeExecutionOutputBlock] }
|
12
|
+
|
13
|
+
# @!attribute return_code
|
14
|
+
#
|
15
|
+
# @return [Integer]
|
16
|
+
required :return_code, Integer
|
17
|
+
|
18
|
+
# @!attribute stderr
|
19
|
+
#
|
20
|
+
# @return [String]
|
21
|
+
required :stderr, String
|
22
|
+
|
23
|
+
# @!attribute stdout
|
24
|
+
#
|
25
|
+
# @return [String]
|
26
|
+
required :stdout, String
|
27
|
+
|
28
|
+
# @!attribute type
|
29
|
+
#
|
30
|
+
# @return [Symbol, :bash_code_execution_result]
|
31
|
+
required :type, const: :bash_code_execution_result
|
32
|
+
|
33
|
+
# @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
|
34
|
+
# @param content [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlock>]
|
35
|
+
# @param return_code [Integer]
|
36
|
+
# @param stderr [String]
|
37
|
+
# @param stdout [String]
|
38
|
+
# @param type [Symbol, :bash_code_execution_result]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
BetaBashCodeExecutionResultBlock = Beta::BetaBashCodeExecutionResultBlock
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute content
|
8
|
+
#
|
9
|
+
# @return [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlockParam>]
|
10
|
+
required :content,
|
11
|
+
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaBashCodeExecutionOutputBlockParam] }
|
12
|
+
|
13
|
+
# @!attribute return_code
|
14
|
+
#
|
15
|
+
# @return [Integer]
|
16
|
+
required :return_code, Integer
|
17
|
+
|
18
|
+
# @!attribute stderr
|
19
|
+
#
|
20
|
+
# @return [String]
|
21
|
+
required :stderr, String
|
22
|
+
|
23
|
+
# @!attribute stdout
|
24
|
+
#
|
25
|
+
# @return [String]
|
26
|
+
required :stdout, String
|
27
|
+
|
28
|
+
# @!attribute type
|
29
|
+
#
|
30
|
+
# @return [Symbol, :bash_code_execution_result]
|
31
|
+
required :type, const: :bash_code_execution_result
|
32
|
+
|
33
|
+
# @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
|
34
|
+
# @param content [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlockParam>]
|
35
|
+
# @param return_code [Integer]
|
36
|
+
# @param stderr [String]
|
37
|
+
# @param stdout [String]
|
38
|
+
# @param type [Symbol, :bash_code_execution_result]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
BetaBashCodeExecutionResultBlockParam = Beta::BetaBashCodeExecutionResultBlockParam
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute content
|
8
|
+
#
|
9
|
+
# @return [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlock]
|
10
|
+
required :content, union: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlock::Content }
|
11
|
+
|
12
|
+
# @!attribute tool_use_id
|
13
|
+
#
|
14
|
+
# @return [String]
|
15
|
+
required :tool_use_id, String
|
16
|
+
|
17
|
+
# @!attribute type
|
18
|
+
#
|
19
|
+
# @return [Symbol, :bash_code_execution_tool_result]
|
20
|
+
required :type, const: :bash_code_execution_tool_result
|
21
|
+
|
22
|
+
# @!method initialize(content:, tool_use_id:, type: :bash_code_execution_tool_result)
|
23
|
+
# @param content [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlock]
|
24
|
+
# @param tool_use_id [String]
|
25
|
+
# @param type [Symbol, :bash_code_execution_tool_result]
|
26
|
+
|
27
|
+
# @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock#content
|
28
|
+
module Content
|
29
|
+
extend Anthropic::Internal::Type::Union
|
30
|
+
|
31
|
+
variant -> { Anthropic::Beta::BetaBashCodeExecutionToolResultError }
|
32
|
+
|
33
|
+
variant -> { Anthropic::Beta::BetaBashCodeExecutionResultBlock }
|
34
|
+
|
35
|
+
# @!method self.variants
|
36
|
+
# @return [Array(Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlock)]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
BetaBashCodeExecutionToolResultBlock = Beta::BetaBashCodeExecutionToolResultBlock
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute content
|
8
|
+
#
|
9
|
+
# @return [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlockParam]
|
10
|
+
required :content, union: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlockParam::Content }
|
11
|
+
|
12
|
+
# @!attribute tool_use_id
|
13
|
+
#
|
14
|
+
# @return [String]
|
15
|
+
required :tool_use_id, String
|
16
|
+
|
17
|
+
# @!attribute type
|
18
|
+
#
|
19
|
+
# @return [Symbol, :bash_code_execution_tool_result]
|
20
|
+
required :type, const: :bash_code_execution_tool_result
|
21
|
+
|
22
|
+
# @!attribute cache_control
|
23
|
+
# Create a cache control breakpoint at this content block.
|
24
|
+
#
|
25
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
26
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
27
|
+
|
28
|
+
# @!method initialize(content:, tool_use_id:, cache_control: nil, type: :bash_code_execution_tool_result)
|
29
|
+
# @param content [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlockParam]
|
30
|
+
#
|
31
|
+
# @param tool_use_id [String]
|
32
|
+
#
|
33
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
34
|
+
#
|
35
|
+
# @param type [Symbol, :bash_code_execution_tool_result]
|
36
|
+
|
37
|
+
# @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam#content
|
38
|
+
module Content
|
39
|
+
extend Anthropic::Internal::Type::Union
|
40
|
+
|
41
|
+
variant -> { Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam }
|
42
|
+
|
43
|
+
variant -> { Anthropic::Beta::BetaBashCodeExecutionResultBlockParam }
|
44
|
+
|
45
|
+
# @!method self.variants
|
46
|
+
# @return [Array(Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlockParam)]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
BetaBashCodeExecutionToolResultBlockParam = Beta::BetaBashCodeExecutionToolResultBlockParam
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionToolResultError < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute error_code
|
8
|
+
#
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError::ErrorCode]
|
10
|
+
required :error_code, enum: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode }
|
11
|
+
|
12
|
+
# @!attribute type
|
13
|
+
#
|
14
|
+
# @return [Symbol, :bash_code_execution_tool_result_error]
|
15
|
+
required :type, const: :bash_code_execution_tool_result_error
|
16
|
+
|
17
|
+
# @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
|
18
|
+
# @param error_code [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError::ErrorCode]
|
19
|
+
# @param type [Symbol, :bash_code_execution_tool_result_error]
|
20
|
+
|
21
|
+
# @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError#error_code
|
22
|
+
module ErrorCode
|
23
|
+
extend Anthropic::Internal::Type::Enum
|
24
|
+
|
25
|
+
INVALID_TOOL_INPUT = :invalid_tool_input
|
26
|
+
UNAVAILABLE = :unavailable
|
27
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
28
|
+
EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
|
29
|
+
OUTPUT_FILE_TOO_LARGE = :output_file_too_large
|
30
|
+
|
31
|
+
# @!method self.values
|
32
|
+
# @return [Array<Symbol>]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
BetaBashCodeExecutionToolResultError = Beta::BetaBashCodeExecutionToolResultError
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaBashCodeExecutionToolResultErrorParam < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute error_code
|
8
|
+
#
|
9
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode]
|
10
|
+
required :error_code, enum: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode }
|
11
|
+
|
12
|
+
# @!attribute type
|
13
|
+
#
|
14
|
+
# @return [Symbol, :bash_code_execution_tool_result_error]
|
15
|
+
required :type, const: :bash_code_execution_tool_result_error
|
16
|
+
|
17
|
+
# @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
|
18
|
+
# @param error_code [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode]
|
19
|
+
# @param type [Symbol, :bash_code_execution_tool_result_error]
|
20
|
+
|
21
|
+
# @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam#error_code
|
22
|
+
module ErrorCode
|
23
|
+
extend Anthropic::Internal::Type::Enum
|
24
|
+
|
25
|
+
INVALID_TOOL_INPUT = :invalid_tool_input
|
26
|
+
UNAVAILABLE = :unavailable
|
27
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
28
|
+
EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
|
29
|
+
OUTPUT_FILE_TOO_LARGE = :output_file_too_large
|
30
|
+
|
31
|
+
# @!method self.values
|
32
|
+
# @return [Array<Symbol>]
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
BetaBashCodeExecutionToolResultErrorParam = Beta::BetaBashCodeExecutionToolResultErrorParam
|
38
|
+
end
|
39
|
+
end
|
@@ -24,6 +24,11 @@ module Anthropic
|
|
24
24
|
# @return [Integer]
|
25
25
|
required :end_char_index, Integer
|
26
26
|
|
27
|
+
# @!attribute file_id
|
28
|
+
#
|
29
|
+
# @return [String, nil]
|
30
|
+
required :file_id, String, nil?: true
|
31
|
+
|
27
32
|
# @!attribute start_char_index
|
28
33
|
#
|
29
34
|
# @return [Integer]
|
@@ -34,11 +39,12 @@ module Anthropic
|
|
34
39
|
# @return [Symbol, :char_location]
|
35
40
|
required :type, const: :char_location
|
36
41
|
|
37
|
-
# @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, start_char_index:, type: :char_location)
|
42
|
+
# @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, file_id:, start_char_index:, type: :char_location)
|
38
43
|
# @param cited_text [String]
|
39
44
|
# @param document_index [Integer]
|
40
45
|
# @param document_title [String, nil]
|
41
46
|
# @param end_char_index [Integer]
|
47
|
+
# @param file_id [String, nil]
|
42
48
|
# @param start_char_index [Integer]
|
43
49
|
# @param type [Symbol, :char_location]
|
44
50
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaCitationConfig < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute enabled
|
8
|
+
#
|
9
|
+
# @return [Boolean]
|
10
|
+
required :enabled, Anthropic::Internal::Type::Boolean
|
11
|
+
|
12
|
+
# @!method initialize(enabled:)
|
13
|
+
# @param enabled [Boolean]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
BetaCitationConfig = Beta::BetaCitationConfig
|
18
|
+
end
|
19
|
+
end
|
@@ -24,6 +24,11 @@ module Anthropic
|
|
24
24
|
# @return [Integer]
|
25
25
|
required :end_block_index, Integer
|
26
26
|
|
27
|
+
# @!attribute file_id
|
28
|
+
#
|
29
|
+
# @return [String, nil]
|
30
|
+
required :file_id, String, nil?: true
|
31
|
+
|
27
32
|
# @!attribute start_block_index
|
28
33
|
#
|
29
34
|
# @return [Integer]
|
@@ -34,11 +39,12 @@ module Anthropic
|
|
34
39
|
# @return [Symbol, :content_block_location]
|
35
40
|
required :type, const: :content_block_location
|
36
41
|
|
37
|
-
# @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, start_block_index:, type: :content_block_location)
|
42
|
+
# @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, file_id:, start_block_index:, type: :content_block_location)
|
38
43
|
# @param cited_text [String]
|
39
44
|
# @param document_index [Integer]
|
40
45
|
# @param document_title [String, nil]
|
41
46
|
# @param end_block_index [Integer]
|
47
|
+
# @param file_id [String, nil]
|
42
48
|
# @param start_block_index [Integer]
|
43
49
|
# @param type [Symbol, :content_block_location]
|
44
50
|
end
|
@@ -24,6 +24,11 @@ module Anthropic
|
|
24
24
|
# @return [Integer]
|
25
25
|
required :end_page_number, Integer
|
26
26
|
|
27
|
+
# @!attribute file_id
|
28
|
+
#
|
29
|
+
# @return [String, nil]
|
30
|
+
required :file_id, String, nil?: true
|
31
|
+
|
27
32
|
# @!attribute start_page_number
|
28
33
|
#
|
29
34
|
# @return [Integer]
|
@@ -34,11 +39,12 @@ module Anthropic
|
|
34
39
|
# @return [Symbol, :page_location]
|
35
40
|
required :type, const: :page_location
|
36
41
|
|
37
|
-
# @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, start_page_number:, type: :page_location)
|
42
|
+
# @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, file_id:, start_page_number:, type: :page_location)
|
38
43
|
# @param cited_text [String]
|
39
44
|
# @param document_index [Integer]
|
40
45
|
# @param document_title [String, nil]
|
41
46
|
# @param end_page_number [Integer]
|
47
|
+
# @param file_id [String, nil]
|
42
48
|
# @param start_page_number [Integer]
|
43
49
|
# @param type [Symbol, :page_location]
|
44
50
|
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaCitationSearchResultLocation < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute cited_text
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :cited_text, String
|
11
|
+
|
12
|
+
# @!attribute end_block_index
|
13
|
+
#
|
14
|
+
# @return [Integer]
|
15
|
+
required :end_block_index, Integer
|
16
|
+
|
17
|
+
# @!attribute search_result_index
|
18
|
+
#
|
19
|
+
# @return [Integer]
|
20
|
+
required :search_result_index, Integer
|
21
|
+
|
22
|
+
# @!attribute source
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
required :source, String
|
26
|
+
|
27
|
+
# @!attribute start_block_index
|
28
|
+
#
|
29
|
+
# @return [Integer]
|
30
|
+
required :start_block_index, Integer
|
31
|
+
|
32
|
+
# @!attribute title
|
33
|
+
#
|
34
|
+
# @return [String, nil]
|
35
|
+
required :title, String, nil?: true
|
36
|
+
|
37
|
+
# @!attribute type
|
38
|
+
#
|
39
|
+
# @return [Symbol, :search_result_location]
|
40
|
+
required :type, const: :search_result_location
|
41
|
+
|
42
|
+
# @!method initialize(cited_text:, end_block_index:, search_result_index:, source:, start_block_index:, title:, type: :search_result_location)
|
43
|
+
# @param cited_text [String]
|
44
|
+
# @param end_block_index [Integer]
|
45
|
+
# @param search_result_index [Integer]
|
46
|
+
# @param source [String]
|
47
|
+
# @param start_block_index [Integer]
|
48
|
+
# @param title [String, nil]
|
49
|
+
# @param type [Symbol, :search_result_location]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
BetaCitationSearchResultLocation = Beta::BetaCitationSearchResultLocation
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaCitationSearchResultLocationParam < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute cited_text
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :cited_text, String
|
11
|
+
|
12
|
+
# @!attribute end_block_index
|
13
|
+
#
|
14
|
+
# @return [Integer]
|
15
|
+
required :end_block_index, Integer
|
16
|
+
|
17
|
+
# @!attribute search_result_index
|
18
|
+
#
|
19
|
+
# @return [Integer]
|
20
|
+
required :search_result_index, Integer
|
21
|
+
|
22
|
+
# @!attribute source
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
required :source, String
|
26
|
+
|
27
|
+
# @!attribute start_block_index
|
28
|
+
#
|
29
|
+
# @return [Integer]
|
30
|
+
required :start_block_index, Integer
|
31
|
+
|
32
|
+
# @!attribute title
|
33
|
+
#
|
34
|
+
# @return [String, nil]
|
35
|
+
required :title, String, nil?: true
|
36
|
+
|
37
|
+
# @!attribute type
|
38
|
+
#
|
39
|
+
# @return [Symbol, :search_result_location]
|
40
|
+
required :type, const: :search_result_location
|
41
|
+
|
42
|
+
# @!method initialize(cited_text:, end_block_index:, search_result_index:, source:, start_block_index:, title:, type: :search_result_location)
|
43
|
+
# @param cited_text [String]
|
44
|
+
# @param end_block_index [Integer]
|
45
|
+
# @param search_result_index [Integer]
|
46
|
+
# @param source [String]
|
47
|
+
# @param start_block_index [Integer]
|
48
|
+
# @param title [String, nil]
|
49
|
+
# @param type [Symbol, :search_result_location]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
BetaCitationSearchResultLocationParam = Beta::BetaCitationSearchResultLocationParam
|
54
|
+
end
|
55
|
+
end
|
@@ -6,7 +6,7 @@ module Anthropic
|
|
6
6
|
class BetaCitationsDelta < Anthropic::Internal::Type::BaseModel
|
7
7
|
# @!attribute citation
|
8
8
|
#
|
9
|
-
# @return [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation]
|
9
|
+
# @return [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation]
|
10
10
|
required :citation, union: -> { Anthropic::Beta::BetaCitationsDelta::Citation }
|
11
11
|
|
12
12
|
# @!attribute type
|
@@ -15,7 +15,7 @@ module Anthropic
|
|
15
15
|
required :type, const: :citations_delta
|
16
16
|
|
17
17
|
# @!method initialize(citation:, type: :citations_delta)
|
18
|
-
# @param citation [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation]
|
18
|
+
# @param citation [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation]
|
19
19
|
# @param type [Symbol, :citations_delta]
|
20
20
|
|
21
21
|
# @see Anthropic::Models::Beta::BetaCitationsDelta#citation
|
@@ -32,8 +32,10 @@ module Anthropic
|
|
32
32
|
|
33
33
|
variant :web_search_result_location, -> { Anthropic::Beta::BetaCitationsWebSearchResultLocation }
|
34
34
|
|
35
|
+
variant :search_result_location, -> { Anthropic::Beta::BetaCitationSearchResultLocation }
|
36
|
+
|
35
37
|
# @!method self.variants
|
36
|
-
# @return [Array(Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation)]
|
38
|
+
# @return [Array(Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation)]
|
37
39
|
end
|
38
40
|
end
|
39
41
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
class BetaCodeExecutionTool20250825 < Anthropic::Internal::Type::BaseModel
|
7
|
+
# @!attribute name
|
8
|
+
# Name of the tool.
|
9
|
+
#
|
10
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
11
|
+
#
|
12
|
+
# @return [Symbol, :code_execution]
|
13
|
+
required :name, const: :code_execution
|
14
|
+
|
15
|
+
# @!attribute type
|
16
|
+
#
|
17
|
+
# @return [Symbol, :code_execution_20250825]
|
18
|
+
required :type, const: :code_execution_20250825
|
19
|
+
|
20
|
+
# @!attribute cache_control
|
21
|
+
# Create a cache control breakpoint at this content block.
|
22
|
+
#
|
23
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
24
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
25
|
+
|
26
|
+
# @!method initialize(cache_control: nil, name: :code_execution, type: :code_execution_20250825)
|
27
|
+
# Some parameter documentations has been truncated, see
|
28
|
+
# {Anthropic::Models::Beta::BetaCodeExecutionTool20250825} for more details.
|
29
|
+
#
|
30
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
31
|
+
#
|
32
|
+
# @param name [Symbol, :code_execution] Name of the tool.
|
33
|
+
#
|
34
|
+
# @param type [Symbol, :code_execution_20250825]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
BetaCodeExecutionTool20250825 = Beta::BetaCodeExecutionTool20250825
|
39
|
+
end
|
40
|
+
end
|
@@ -11,14 +11,25 @@ module Anthropic
|
|
11
11
|
|
12
12
|
variant :text, -> { Anthropic::Beta::BetaTextBlock }
|
13
13
|
|
14
|
+
variant :thinking, -> { Anthropic::Beta::BetaThinkingBlock }
|
15
|
+
|
16
|
+
variant :redacted_thinking, -> { Anthropic::Beta::BetaRedactedThinkingBlock }
|
17
|
+
|
14
18
|
variant :tool_use, -> { Anthropic::Beta::BetaToolUseBlock }
|
15
19
|
|
16
20
|
variant :server_tool_use, -> { Anthropic::Beta::BetaServerToolUseBlock }
|
17
21
|
|
18
22
|
variant :web_search_tool_result, -> { Anthropic::Beta::BetaWebSearchToolResultBlock }
|
19
23
|
|
24
|
+
variant :web_fetch_tool_result, -> { Anthropic::Beta::BetaWebFetchToolResultBlock }
|
25
|
+
|
20
26
|
variant :code_execution_tool_result, -> { Anthropic::Beta::BetaCodeExecutionToolResultBlock }
|
21
27
|
|
28
|
+
variant :bash_code_execution_tool_result, -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlock }
|
29
|
+
|
30
|
+
variant :text_editor_code_execution_tool_result,
|
31
|
+
-> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock }
|
32
|
+
|
22
33
|
variant :mcp_tool_use, -> { Anthropic::Beta::BetaMCPToolUseBlock }
|
23
34
|
|
24
35
|
variant :mcp_tool_result, -> { Anthropic::Beta::BetaMCPToolResultBlock }
|
@@ -26,12 +37,8 @@ module Anthropic
|
|
26
37
|
# Response model for a file uploaded to the container.
|
27
38
|
variant :container_upload, -> { Anthropic::Beta::BetaContainerUploadBlock }
|
28
39
|
|
29
|
-
variant :thinking, -> { Anthropic::Beta::BetaThinkingBlock }
|
30
|
-
|
31
|
-
variant :redacted_thinking, -> { Anthropic::Beta::BetaRedactedThinkingBlock }
|
32
|
-
|
33
40
|
# @!method self.variants
|
34
|
-
# @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::
|
41
|
+
# @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock)]
|
35
42
|
end
|
36
43
|
end
|
37
44
|
|