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,54 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaCitationSearchResultLocationParam = Beta::BetaCitationSearchResultLocationParam
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_citation_search_result_location_param =
|
7
|
+
{
|
8
|
+
cited_text: String,
|
9
|
+
end_block_index: Integer,
|
10
|
+
search_result_index: Integer,
|
11
|
+
source: String,
|
12
|
+
start_block_index: Integer,
|
13
|
+
title: String?,
|
14
|
+
type: :search_result_location
|
15
|
+
}
|
16
|
+
|
17
|
+
class BetaCitationSearchResultLocationParam < Anthropic::Internal::Type::BaseModel
|
18
|
+
attr_accessor cited_text: String
|
19
|
+
|
20
|
+
attr_accessor end_block_index: Integer
|
21
|
+
|
22
|
+
attr_accessor search_result_index: Integer
|
23
|
+
|
24
|
+
attr_accessor source: String
|
25
|
+
|
26
|
+
attr_accessor start_block_index: Integer
|
27
|
+
|
28
|
+
attr_accessor title: String?
|
29
|
+
|
30
|
+
attr_accessor type: :search_result_location
|
31
|
+
|
32
|
+
def initialize: (
|
33
|
+
cited_text: String,
|
34
|
+
end_block_index: Integer,
|
35
|
+
search_result_index: Integer,
|
36
|
+
source: String,
|
37
|
+
start_block_index: Integer,
|
38
|
+
title: String?,
|
39
|
+
?type: :search_result_location
|
40
|
+
) -> void
|
41
|
+
|
42
|
+
def to_hash: -> {
|
43
|
+
cited_text: String,
|
44
|
+
end_block_index: Integer,
|
45
|
+
search_result_index: Integer,
|
46
|
+
source: String,
|
47
|
+
start_block_index: Integer,
|
48
|
+
title: String?,
|
49
|
+
type: :search_result_location
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -29,6 +29,7 @@ module Anthropic
|
|
29
29
|
| Anthropic::Beta::BetaCitationPageLocation
|
30
30
|
| Anthropic::Beta::BetaCitationContentBlockLocation
|
31
31
|
| Anthropic::Beta::BetaCitationsWebSearchResultLocation
|
32
|
+
| Anthropic::Beta::BetaCitationSearchResultLocation
|
32
33
|
|
33
34
|
module Citation
|
34
35
|
extend Anthropic::Internal::Type::Union
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaCodeExecutionTool20250825 = Beta::BetaCodeExecutionTool20250825
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_code_execution_tool20250825 =
|
7
|
+
{
|
8
|
+
name: :code_execution,
|
9
|
+
type: :code_execution_20250825,
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
11
|
+
}
|
12
|
+
|
13
|
+
class BetaCodeExecutionTool20250825 < Anthropic::Internal::Type::BaseModel
|
14
|
+
attr_accessor name: :code_execution
|
15
|
+
|
16
|
+
attr_accessor type: :code_execution_20250825
|
17
|
+
|
18
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
19
|
+
|
20
|
+
def initialize: (
|
21
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
22
|
+
?name: :code_execution,
|
23
|
+
?type: :code_execution_20250825
|
24
|
+
) -> void
|
25
|
+
|
26
|
+
def to_hash: -> {
|
27
|
+
name: :code_execution,
|
28
|
+
type: :code_execution_20250825,
|
29
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -5,15 +5,18 @@ module Anthropic
|
|
5
5
|
module Beta
|
6
6
|
type beta_content_block =
|
7
7
|
Anthropic::Beta::BetaTextBlock
|
8
|
+
| Anthropic::Beta::BetaThinkingBlock
|
9
|
+
| Anthropic::Beta::BetaRedactedThinkingBlock
|
8
10
|
| Anthropic::Beta::BetaToolUseBlock
|
9
11
|
| Anthropic::Beta::BetaServerToolUseBlock
|
10
12
|
| Anthropic::Beta::BetaWebSearchToolResultBlock
|
13
|
+
| Anthropic::Beta::BetaWebFetchToolResultBlock
|
11
14
|
| Anthropic::Beta::BetaCodeExecutionToolResultBlock
|
15
|
+
| Anthropic::Beta::BetaBashCodeExecutionToolResultBlock
|
16
|
+
| Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock
|
12
17
|
| Anthropic::Beta::BetaMCPToolUseBlock
|
13
18
|
| Anthropic::Beta::BetaMCPToolResultBlock
|
14
19
|
| Anthropic::Beta::BetaContainerUploadBlock
|
15
|
-
| Anthropic::Beta::BetaThinkingBlock
|
16
|
-
| Anthropic::Beta::BetaRedactedThinkingBlock
|
17
20
|
|
18
21
|
module BetaContentBlock
|
19
22
|
extend Anthropic::Internal::Type::Union
|
@@ -4,18 +4,22 @@ module Anthropic
|
|
4
4
|
|
5
5
|
module Beta
|
6
6
|
type beta_content_block_param =
|
7
|
-
Anthropic::Beta::
|
7
|
+
Anthropic::Beta::BetaTextBlockParam
|
8
|
+
| Anthropic::Beta::BetaImageBlockParam
|
9
|
+
| Anthropic::Beta::BetaRequestDocumentBlock
|
10
|
+
| Anthropic::Beta::BetaSearchResultBlockParam
|
11
|
+
| Anthropic::Beta::BetaThinkingBlockParam
|
12
|
+
| Anthropic::Beta::BetaRedactedThinkingBlockParam
|
13
|
+
| Anthropic::Beta::BetaToolUseBlockParam
|
14
|
+
| Anthropic::Beta::BetaToolResultBlockParam
|
15
|
+
| Anthropic::Beta::BetaServerToolUseBlockParam
|
8
16
|
| Anthropic::Beta::BetaWebSearchToolResultBlockParam
|
17
|
+
| Anthropic::Beta::BetaWebFetchToolResultBlockParam
|
9
18
|
| Anthropic::Beta::BetaCodeExecutionToolResultBlockParam
|
19
|
+
| Anthropic::Beta::BetaBashCodeExecutionToolResultBlockParam
|
20
|
+
| Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlockParam
|
10
21
|
| Anthropic::Beta::BetaMCPToolUseBlockParam
|
11
22
|
| Anthropic::Beta::BetaRequestMCPToolResultBlockParam
|
12
|
-
| Anthropic::Beta::BetaTextBlockParam
|
13
|
-
| Anthropic::Beta::BetaImageBlockParam
|
14
|
-
| Anthropic::Beta::BetaToolUseBlockParam
|
15
|
-
| Anthropic::Beta::BetaToolResultBlockParam
|
16
|
-
| Anthropic::Beta::BetaBase64PDFBlock
|
17
|
-
| Anthropic::Beta::BetaThinkingBlockParam
|
18
|
-
| Anthropic::Beta::BetaRedactedThinkingBlockParam
|
19
23
|
| Anthropic::Beta::BetaContainerUploadBlockParam
|
20
24
|
|
21
25
|
module BetaContentBlockParam
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaDocumentBlock = Beta::BetaDocumentBlock
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_document_block =
|
7
|
+
{
|
8
|
+
citations: Anthropic::Beta::BetaCitationConfig?,
|
9
|
+
source: Anthropic::Models::Beta::BetaDocumentBlock::source,
|
10
|
+
title: String?,
|
11
|
+
type: :document
|
12
|
+
}
|
13
|
+
|
14
|
+
class BetaDocumentBlock < Anthropic::Internal::Type::BaseModel
|
15
|
+
attr_accessor citations: Anthropic::Beta::BetaCitationConfig?
|
16
|
+
|
17
|
+
attr_accessor source: Anthropic::Models::Beta::BetaDocumentBlock::source
|
18
|
+
|
19
|
+
attr_accessor title: String?
|
20
|
+
|
21
|
+
attr_accessor type: :document
|
22
|
+
|
23
|
+
def initialize: (
|
24
|
+
citations: Anthropic::Beta::BetaCitationConfig?,
|
25
|
+
source: Anthropic::Models::Beta::BetaDocumentBlock::source,
|
26
|
+
title: String?,
|
27
|
+
?type: :document
|
28
|
+
) -> void
|
29
|
+
|
30
|
+
def to_hash: -> {
|
31
|
+
citations: Anthropic::Beta::BetaCitationConfig?,
|
32
|
+
source: Anthropic::Models::Beta::BetaDocumentBlock::source,
|
33
|
+
title: String?,
|
34
|
+
type: :document
|
35
|
+
}
|
36
|
+
|
37
|
+
type source =
|
38
|
+
Anthropic::Beta::BetaBase64PDFSource
|
39
|
+
| Anthropic::Beta::BetaPlainTextSource
|
40
|
+
|
41
|
+
module Source
|
42
|
+
extend Anthropic::Internal::Type::Union
|
43
|
+
|
44
|
+
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaDocumentBlock::source]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -31,15 +31,18 @@ module Anthropic
|
|
31
31
|
|
32
32
|
type content_block =
|
33
33
|
Anthropic::Beta::BetaTextBlock
|
34
|
+
| Anthropic::Beta::BetaThinkingBlock
|
35
|
+
| Anthropic::Beta::BetaRedactedThinkingBlock
|
34
36
|
| Anthropic::Beta::BetaToolUseBlock
|
35
37
|
| Anthropic::Beta::BetaServerToolUseBlock
|
36
38
|
| Anthropic::Beta::BetaWebSearchToolResultBlock
|
39
|
+
| Anthropic::Beta::BetaWebFetchToolResultBlock
|
37
40
|
| Anthropic::Beta::BetaCodeExecutionToolResultBlock
|
41
|
+
| Anthropic::Beta::BetaBashCodeExecutionToolResultBlock
|
42
|
+
| Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock
|
38
43
|
| Anthropic::Beta::BetaMCPToolUseBlock
|
39
44
|
| Anthropic::Beta::BetaMCPToolResultBlock
|
40
45
|
| Anthropic::Beta::BetaContainerUploadBlock
|
41
|
-
| Anthropic::Beta::BetaThinkingBlock
|
42
|
-
| Anthropic::Beta::BetaRedactedThinkingBlock
|
43
46
|
|
44
47
|
module ContentBlock
|
45
48
|
extend Anthropic::Internal::Type::Union
|
@@ -0,0 +1,62 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaRequestDocumentBlock = Beta::BetaRequestDocumentBlock
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_request_document_block =
|
7
|
+
{
|
8
|
+
source: Anthropic::Models::Beta::BetaRequestDocumentBlock::source,
|
9
|
+
type: :document,
|
10
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
11
|
+
citations: Anthropic::Beta::BetaCitationsConfigParam?,
|
12
|
+
context: String?,
|
13
|
+
title: String?
|
14
|
+
}
|
15
|
+
|
16
|
+
class BetaRequestDocumentBlock < Anthropic::Internal::Type::BaseModel
|
17
|
+
attr_accessor source: Anthropic::Models::Beta::BetaRequestDocumentBlock::source
|
18
|
+
|
19
|
+
attr_accessor type: :document
|
20
|
+
|
21
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
22
|
+
|
23
|
+
attr_accessor citations: Anthropic::Beta::BetaCitationsConfigParam?
|
24
|
+
|
25
|
+
attr_accessor context: String?
|
26
|
+
|
27
|
+
attr_accessor title: String?
|
28
|
+
|
29
|
+
def initialize: (
|
30
|
+
source: Anthropic::Models::Beta::BetaRequestDocumentBlock::source,
|
31
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
32
|
+
?citations: Anthropic::Beta::BetaCitationsConfigParam?,
|
33
|
+
?context: String?,
|
34
|
+
?title: String?,
|
35
|
+
?type: :document
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def to_hash: -> {
|
39
|
+
source: Anthropic::Models::Beta::BetaRequestDocumentBlock::source,
|
40
|
+
type: :document,
|
41
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
42
|
+
citations: Anthropic::Beta::BetaCitationsConfigParam?,
|
43
|
+
context: String?,
|
44
|
+
title: String?
|
45
|
+
}
|
46
|
+
|
47
|
+
type source =
|
48
|
+
Anthropic::Beta::BetaBase64PDFSource
|
49
|
+
| Anthropic::Beta::BetaPlainTextSource
|
50
|
+
| Anthropic::Beta::BetaContentBlockSource
|
51
|
+
| Anthropic::Beta::BetaURLPDFSource
|
52
|
+
| Anthropic::Beta::BetaFileDocumentSource
|
53
|
+
|
54
|
+
module Source
|
55
|
+
extend Anthropic::Internal::Type::Union
|
56
|
+
|
57
|
+
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaRequestDocumentBlock::source]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaSearchResultBlockParam = Beta::BetaSearchResultBlockParam
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_search_result_block_param =
|
7
|
+
{
|
8
|
+
content: ::Array[Anthropic::Beta::BetaTextBlockParam],
|
9
|
+
source: String,
|
10
|
+
title: String,
|
11
|
+
type: :search_result,
|
12
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
13
|
+
citations: Anthropic::Beta::BetaCitationsConfigParam
|
14
|
+
}
|
15
|
+
|
16
|
+
class BetaSearchResultBlockParam < Anthropic::Internal::Type::BaseModel
|
17
|
+
attr_accessor content: ::Array[Anthropic::Beta::BetaTextBlockParam]
|
18
|
+
|
19
|
+
attr_accessor source: String
|
20
|
+
|
21
|
+
attr_accessor title: String
|
22
|
+
|
23
|
+
attr_accessor type: :search_result
|
24
|
+
|
25
|
+
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
26
|
+
|
27
|
+
attr_reader citations: Anthropic::Beta::BetaCitationsConfigParam?
|
28
|
+
|
29
|
+
def citations=: (
|
30
|
+
Anthropic::Beta::BetaCitationsConfigParam
|
31
|
+
) -> Anthropic::Beta::BetaCitationsConfigParam
|
32
|
+
|
33
|
+
def initialize: (
|
34
|
+
content: ::Array[Anthropic::Beta::BetaTextBlockParam],
|
35
|
+
source: String,
|
36
|
+
title: String,
|
37
|
+
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
38
|
+
?citations: Anthropic::Beta::BetaCitationsConfigParam,
|
39
|
+
?type: :search_result
|
40
|
+
) -> void
|
41
|
+
|
42
|
+
def to_hash: -> {
|
43
|
+
content: ::Array[Anthropic::Beta::BetaTextBlockParam],
|
44
|
+
source: String,
|
45
|
+
title: String,
|
46
|
+
type: :search_result,
|
47
|
+
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
48
|
+
citations: Anthropic::Beta::BetaCitationsConfigParam
|
49
|
+
}
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -3,14 +3,23 @@ module Anthropic
|
|
3
3
|
class BetaServerToolUsage = Beta::BetaServerToolUsage
|
4
4
|
|
5
5
|
module Beta
|
6
|
-
type beta_server_tool_usage =
|
6
|
+
type beta_server_tool_usage =
|
7
|
+
{ web_fetch_requests: Integer, web_search_requests: Integer }
|
7
8
|
|
8
9
|
class BetaServerToolUsage < Anthropic::Internal::Type::BaseModel
|
10
|
+
attr_accessor web_fetch_requests: Integer
|
11
|
+
|
9
12
|
attr_accessor web_search_requests: Integer
|
10
13
|
|
11
|
-
def initialize: (
|
14
|
+
def initialize: (
|
15
|
+
web_fetch_requests: Integer,
|
16
|
+
web_search_requests: Integer
|
17
|
+
) -> void
|
12
18
|
|
13
|
-
def to_hash: -> {
|
19
|
+
def to_hash: -> {
|
20
|
+
web_fetch_requests: Integer,
|
21
|
+
web_search_requests: Integer
|
22
|
+
}
|
14
23
|
end
|
15
24
|
end
|
16
25
|
end
|
@@ -34,13 +34,21 @@ module Anthropic
|
|
34
34
|
type: :server_tool_use
|
35
35
|
}
|
36
36
|
|
37
|
-
type name_ =
|
37
|
+
type name_ =
|
38
|
+
:web_search
|
39
|
+
| :web_fetch
|
40
|
+
| :code_execution
|
41
|
+
| :bash_code_execution
|
42
|
+
| :text_editor_code_execution
|
38
43
|
|
39
44
|
module Name
|
40
45
|
extend Anthropic::Internal::Type::Enum
|
41
46
|
|
42
47
|
WEB_SEARCH: :web_search
|
48
|
+
WEB_FETCH: :web_fetch
|
43
49
|
CODE_EXECUTION: :code_execution
|
50
|
+
BASH_CODE_EXECUTION: :bash_code_execution
|
51
|
+
TEXT_EDITOR_CODE_EXECUTION: :text_editor_code_execution
|
44
52
|
|
45
53
|
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaServerToolUseBlock::name_]
|
46
54
|
end
|
@@ -39,13 +39,21 @@ module Anthropic
|
|
39
39
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
40
40
|
}
|
41
41
|
|
42
|
-
type name_ =
|
42
|
+
type name_ =
|
43
|
+
:web_search
|
44
|
+
| :web_fetch
|
45
|
+
| :code_execution
|
46
|
+
| :bash_code_execution
|
47
|
+
| :text_editor_code_execution
|
43
48
|
|
44
49
|
module Name
|
45
50
|
extend Anthropic::Internal::Type::Enum
|
46
51
|
|
47
52
|
WEB_SEARCH: :web_search
|
53
|
+
WEB_FETCH: :web_fetch
|
48
54
|
CODE_EXECUTION: :code_execution
|
55
|
+
BASH_CODE_EXECUTION: :bash_code_execution
|
56
|
+
TEXT_EDITOR_CODE_EXECUTION: :text_editor_code_execution
|
49
57
|
|
50
58
|
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaServerToolUseBlockParam::name_]
|
51
59
|
end
|
@@ -8,6 +8,7 @@ module Anthropic
|
|
8
8
|
| Anthropic::Beta::BetaCitationPageLocation
|
9
9
|
| Anthropic::Beta::BetaCitationContentBlockLocation
|
10
10
|
| Anthropic::Beta::BetaCitationsWebSearchResultLocation
|
11
|
+
| Anthropic::Beta::BetaCitationSearchResultLocation
|
11
12
|
|
12
13
|
module BetaTextCitation
|
13
14
|
extend Anthropic::Internal::Type::Union
|
@@ -8,6 +8,7 @@ module Anthropic
|
|
8
8
|
| Anthropic::Beta::BetaCitationPageLocationParam
|
9
9
|
| Anthropic::Beta::BetaCitationContentBlockLocationParam
|
10
10
|
| Anthropic::Beta::BetaCitationWebSearchResultLocationParam
|
11
|
+
| Anthropic::Beta::BetaCitationSearchResultLocationParam
|
11
12
|
|
12
13
|
module BetaTextCitationParam
|
13
14
|
extend Anthropic::Internal::Type::Union
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaTextEditorCodeExecutionCreateResultBlock = Beta::BetaTextEditorCodeExecutionCreateResultBlock
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_text_editor_code_execution_create_result_block =
|
7
|
+
{
|
8
|
+
is_file_update: bool,
|
9
|
+
type: :text_editor_code_execution_create_result
|
10
|
+
}
|
11
|
+
|
12
|
+
class BetaTextEditorCodeExecutionCreateResultBlock < Anthropic::Internal::Type::BaseModel
|
13
|
+
attr_accessor is_file_update: bool
|
14
|
+
|
15
|
+
attr_accessor type: :text_editor_code_execution_create_result
|
16
|
+
|
17
|
+
def initialize: (
|
18
|
+
is_file_update: bool,
|
19
|
+
?type: :text_editor_code_execution_create_result
|
20
|
+
) -> void
|
21
|
+
|
22
|
+
def to_hash: -> {
|
23
|
+
is_file_update: bool,
|
24
|
+
type: :text_editor_code_execution_create_result
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaTextEditorCodeExecutionCreateResultBlockParam = Beta::BetaTextEditorCodeExecutionCreateResultBlockParam
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_text_editor_code_execution_create_result_block_param =
|
7
|
+
{
|
8
|
+
is_file_update: bool,
|
9
|
+
type: :text_editor_code_execution_create_result
|
10
|
+
}
|
11
|
+
|
12
|
+
class BetaTextEditorCodeExecutionCreateResultBlockParam < Anthropic::Internal::Type::BaseModel
|
13
|
+
attr_accessor is_file_update: bool
|
14
|
+
|
15
|
+
attr_accessor type: :text_editor_code_execution_create_result
|
16
|
+
|
17
|
+
def initialize: (
|
18
|
+
is_file_update: bool,
|
19
|
+
?type: :text_editor_code_execution_create_result
|
20
|
+
) -> void
|
21
|
+
|
22
|
+
def to_hash: -> {
|
23
|
+
is_file_update: bool,
|
24
|
+
type: :text_editor_code_execution_create_result
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaTextEditorCodeExecutionStrReplaceResultBlock = Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_text_editor_code_execution_str_replace_result_block =
|
7
|
+
{
|
8
|
+
lines: ::Array[String]?,
|
9
|
+
new_lines: Integer?,
|
10
|
+
new_start: Integer?,
|
11
|
+
old_lines: Integer?,
|
12
|
+
old_start: Integer?,
|
13
|
+
type: :text_editor_code_execution_str_replace_result
|
14
|
+
}
|
15
|
+
|
16
|
+
class BetaTextEditorCodeExecutionStrReplaceResultBlock < Anthropic::Internal::Type::BaseModel
|
17
|
+
attr_accessor lines: ::Array[String]?
|
18
|
+
|
19
|
+
attr_accessor new_lines: Integer?
|
20
|
+
|
21
|
+
attr_accessor new_start: Integer?
|
22
|
+
|
23
|
+
attr_accessor old_lines: Integer?
|
24
|
+
|
25
|
+
attr_accessor old_start: Integer?
|
26
|
+
|
27
|
+
attr_accessor type: :text_editor_code_execution_str_replace_result
|
28
|
+
|
29
|
+
def initialize: (
|
30
|
+
lines: ::Array[String]?,
|
31
|
+
new_lines: Integer?,
|
32
|
+
new_start: Integer?,
|
33
|
+
old_lines: Integer?,
|
34
|
+
old_start: Integer?,
|
35
|
+
?type: :text_editor_code_execution_str_replace_result
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def to_hash: -> {
|
39
|
+
lines: ::Array[String]?,
|
40
|
+
new_lines: Integer?,
|
41
|
+
new_start: Integer?,
|
42
|
+
old_lines: Integer?,
|
43
|
+
old_start: Integer?,
|
44
|
+
type: :text_editor_code_execution_str_replace_result
|
45
|
+
}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbs
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaTextEditorCodeExecutionStrReplaceResultBlockParam = Beta::BetaTextEditorCodeExecutionStrReplaceResultBlockParam
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_text_editor_code_execution_str_replace_result_block_param =
|
7
|
+
{
|
8
|
+
type: :text_editor_code_execution_str_replace_result,
|
9
|
+
lines: ::Array[String]?,
|
10
|
+
new_lines: Integer?,
|
11
|
+
new_start: Integer?,
|
12
|
+
old_lines: Integer?,
|
13
|
+
old_start: Integer?
|
14
|
+
}
|
15
|
+
|
16
|
+
class BetaTextEditorCodeExecutionStrReplaceResultBlockParam < Anthropic::Internal::Type::BaseModel
|
17
|
+
attr_accessor type: :text_editor_code_execution_str_replace_result
|
18
|
+
|
19
|
+
attr_accessor lines: ::Array[String]?
|
20
|
+
|
21
|
+
attr_accessor new_lines: Integer?
|
22
|
+
|
23
|
+
attr_accessor new_start: Integer?
|
24
|
+
|
25
|
+
attr_accessor old_lines: Integer?
|
26
|
+
|
27
|
+
attr_accessor old_start: Integer?
|
28
|
+
|
29
|
+
def initialize: (
|
30
|
+
?lines: ::Array[String]?,
|
31
|
+
?new_lines: Integer?,
|
32
|
+
?new_start: Integer?,
|
33
|
+
?old_lines: Integer?,
|
34
|
+
?old_start: Integer?,
|
35
|
+
?type: :text_editor_code_execution_str_replace_result
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def to_hash: -> {
|
39
|
+
type: :text_editor_code_execution_str_replace_result,
|
40
|
+
lines: ::Array[String]?,
|
41
|
+
new_lines: Integer?,
|
42
|
+
new_start: Integer?,
|
43
|
+
old_lines: Integer?,
|
44
|
+
old_start: Integer?
|
45
|
+
}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Anthropic
|
2
|
+
module Models
|
3
|
+
class BetaTextEditorCodeExecutionToolResultBlock = Beta::BetaTextEditorCodeExecutionToolResultBlock
|
4
|
+
|
5
|
+
module Beta
|
6
|
+
type beta_text_editor_code_execution_tool_result_block =
|
7
|
+
{
|
8
|
+
content: Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock::content,
|
9
|
+
tool_use_id: String,
|
10
|
+
type: :text_editor_code_execution_tool_result
|
11
|
+
}
|
12
|
+
|
13
|
+
class BetaTextEditorCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
|
14
|
+
attr_accessor content: Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock::content
|
15
|
+
|
16
|
+
attr_accessor tool_use_id: String
|
17
|
+
|
18
|
+
attr_accessor type: :text_editor_code_execution_tool_result
|
19
|
+
|
20
|
+
def initialize: (
|
21
|
+
content: Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock::content,
|
22
|
+
tool_use_id: String,
|
23
|
+
?type: :text_editor_code_execution_tool_result
|
24
|
+
) -> void
|
25
|
+
|
26
|
+
def to_hash: -> {
|
27
|
+
content: Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock::content,
|
28
|
+
tool_use_id: String,
|
29
|
+
type: :text_editor_code_execution_tool_result
|
30
|
+
}
|
31
|
+
|
32
|
+
type content =
|
33
|
+
Anthropic::Beta::BetaTextEditorCodeExecutionToolResultError
|
34
|
+
| Anthropic::Beta::BetaTextEditorCodeExecutionViewResultBlock
|
35
|
+
| Anthropic::Beta::BetaTextEditorCodeExecutionCreateResultBlock
|
36
|
+
| Anthropic::Beta::BetaTextEditorCodeExecutionStrReplaceResultBlock
|
37
|
+
|
38
|
+
module Content
|
39
|
+
extend Anthropic::Internal::Type::Union
|
40
|
+
|
41
|
+
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock::content]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|