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,72 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaBashCodeExecutionResultBlock = Beta::BetaBashCodeExecutionResultBlock
|
6
|
+
|
7
|
+
module Beta
|
8
|
+
class BetaBashCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlock,
|
13
|
+
Anthropic::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
sig do
|
18
|
+
returns(T::Array[Anthropic::Beta::BetaBashCodeExecutionOutputBlock])
|
19
|
+
end
|
20
|
+
attr_accessor :content
|
21
|
+
|
22
|
+
sig { returns(Integer) }
|
23
|
+
attr_accessor :return_code
|
24
|
+
|
25
|
+
sig { returns(String) }
|
26
|
+
attr_accessor :stderr
|
27
|
+
|
28
|
+
sig { returns(String) }
|
29
|
+
attr_accessor :stdout
|
30
|
+
|
31
|
+
sig { returns(Symbol) }
|
32
|
+
attr_accessor :type
|
33
|
+
|
34
|
+
sig do
|
35
|
+
params(
|
36
|
+
content:
|
37
|
+
T::Array[
|
38
|
+
Anthropic::Beta::BetaBashCodeExecutionOutputBlock::OrHash
|
39
|
+
],
|
40
|
+
return_code: Integer,
|
41
|
+
stderr: String,
|
42
|
+
stdout: String,
|
43
|
+
type: Symbol
|
44
|
+
).returns(T.attached_class)
|
45
|
+
end
|
46
|
+
def self.new(
|
47
|
+
content:,
|
48
|
+
return_code:,
|
49
|
+
stderr:,
|
50
|
+
stdout:,
|
51
|
+
type: :bash_code_execution_result
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
sig do
|
56
|
+
override.returns(
|
57
|
+
{
|
58
|
+
content:
|
59
|
+
T::Array[Anthropic::Beta::BetaBashCodeExecutionOutputBlock],
|
60
|
+
return_code: Integer,
|
61
|
+
stderr: String,
|
62
|
+
stdout: String,
|
63
|
+
type: Symbol
|
64
|
+
}
|
65
|
+
)
|
66
|
+
end
|
67
|
+
def to_hash
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaBashCodeExecutionResultBlockParam =
|
6
|
+
Beta::BetaBashCodeExecutionResultBlockParam
|
7
|
+
|
8
|
+
module Beta
|
9
|
+
class BetaBashCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlockParam,
|
14
|
+
Anthropic::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
returns(
|
20
|
+
T::Array[Anthropic::Beta::BetaBashCodeExecutionOutputBlockParam]
|
21
|
+
)
|
22
|
+
end
|
23
|
+
attr_accessor :content
|
24
|
+
|
25
|
+
sig { returns(Integer) }
|
26
|
+
attr_accessor :return_code
|
27
|
+
|
28
|
+
sig { returns(String) }
|
29
|
+
attr_accessor :stderr
|
30
|
+
|
31
|
+
sig { returns(String) }
|
32
|
+
attr_accessor :stdout
|
33
|
+
|
34
|
+
sig { returns(Symbol) }
|
35
|
+
attr_accessor :type
|
36
|
+
|
37
|
+
sig do
|
38
|
+
params(
|
39
|
+
content:
|
40
|
+
T::Array[
|
41
|
+
Anthropic::Beta::BetaBashCodeExecutionOutputBlockParam::OrHash
|
42
|
+
],
|
43
|
+
return_code: Integer,
|
44
|
+
stderr: String,
|
45
|
+
stdout: String,
|
46
|
+
type: Symbol
|
47
|
+
).returns(T.attached_class)
|
48
|
+
end
|
49
|
+
def self.new(
|
50
|
+
content:,
|
51
|
+
return_code:,
|
52
|
+
stderr:,
|
53
|
+
stdout:,
|
54
|
+
type: :bash_code_execution_result
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
sig do
|
59
|
+
override.returns(
|
60
|
+
{
|
61
|
+
content:
|
62
|
+
T::Array[
|
63
|
+
Anthropic::Beta::BetaBashCodeExecutionOutputBlockParam
|
64
|
+
],
|
65
|
+
return_code: Integer,
|
66
|
+
stderr: String,
|
67
|
+
stdout: String,
|
68
|
+
type: Symbol
|
69
|
+
}
|
70
|
+
)
|
71
|
+
end
|
72
|
+
def to_hash
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaBashCodeExecutionToolResultBlock =
|
6
|
+
Beta::BetaBashCodeExecutionToolResultBlock
|
7
|
+
|
8
|
+
module Beta
|
9
|
+
class BetaBashCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultBlock,
|
14
|
+
Anthropic::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
returns(
|
20
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultBlock::Content::Variants
|
21
|
+
)
|
22
|
+
end
|
23
|
+
attr_accessor :content
|
24
|
+
|
25
|
+
sig { returns(String) }
|
26
|
+
attr_accessor :tool_use_id
|
27
|
+
|
28
|
+
sig { returns(Symbol) }
|
29
|
+
attr_accessor :type
|
30
|
+
|
31
|
+
sig do
|
32
|
+
params(
|
33
|
+
content:
|
34
|
+
T.any(
|
35
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::OrHash,
|
36
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlock::OrHash
|
37
|
+
),
|
38
|
+
tool_use_id: String,
|
39
|
+
type: Symbol
|
40
|
+
).returns(T.attached_class)
|
41
|
+
end
|
42
|
+
def self.new(
|
43
|
+
content:,
|
44
|
+
tool_use_id:,
|
45
|
+
type: :bash_code_execution_tool_result
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
sig do
|
50
|
+
override.returns(
|
51
|
+
{
|
52
|
+
content:
|
53
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultBlock::Content::Variants,
|
54
|
+
tool_use_id: String,
|
55
|
+
type: Symbol
|
56
|
+
}
|
57
|
+
)
|
58
|
+
end
|
59
|
+
def to_hash
|
60
|
+
end
|
61
|
+
|
62
|
+
module Content
|
63
|
+
extend Anthropic::Internal::Type::Union
|
64
|
+
|
65
|
+
Variants =
|
66
|
+
T.type_alias do
|
67
|
+
T.any(
|
68
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError,
|
69
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlock
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
sig do
|
74
|
+
override.returns(
|
75
|
+
T::Array[
|
76
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultBlock::Content::Variants
|
77
|
+
]
|
78
|
+
)
|
79
|
+
end
|
80
|
+
def self.variants
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaBashCodeExecutionToolResultBlockParam =
|
6
|
+
Beta::BetaBashCodeExecutionToolResultBlockParam
|
7
|
+
|
8
|
+
module Beta
|
9
|
+
class BetaBashCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultBlockParam,
|
14
|
+
Anthropic::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
returns(
|
20
|
+
T.any(
|
21
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam,
|
22
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlockParam
|
23
|
+
)
|
24
|
+
)
|
25
|
+
end
|
26
|
+
attr_accessor :content
|
27
|
+
|
28
|
+
sig { returns(String) }
|
29
|
+
attr_accessor :tool_use_id
|
30
|
+
|
31
|
+
sig { returns(Symbol) }
|
32
|
+
attr_accessor :type
|
33
|
+
|
34
|
+
# Create a cache control breakpoint at this content block.
|
35
|
+
sig { returns(T.nilable(Anthropic::Beta::BetaCacheControlEphemeral)) }
|
36
|
+
attr_reader :cache_control
|
37
|
+
|
38
|
+
sig do
|
39
|
+
params(
|
40
|
+
cache_control:
|
41
|
+
T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash)
|
42
|
+
).void
|
43
|
+
end
|
44
|
+
attr_writer :cache_control
|
45
|
+
|
46
|
+
sig do
|
47
|
+
params(
|
48
|
+
content:
|
49
|
+
T.any(
|
50
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::OrHash,
|
51
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlockParam::OrHash
|
52
|
+
),
|
53
|
+
tool_use_id: String,
|
54
|
+
cache_control:
|
55
|
+
T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash),
|
56
|
+
type: Symbol
|
57
|
+
).returns(T.attached_class)
|
58
|
+
end
|
59
|
+
def self.new(
|
60
|
+
content:,
|
61
|
+
tool_use_id:,
|
62
|
+
# Create a cache control breakpoint at this content block.
|
63
|
+
cache_control: nil,
|
64
|
+
type: :bash_code_execution_tool_result
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
sig do
|
69
|
+
override.returns(
|
70
|
+
{
|
71
|
+
content:
|
72
|
+
T.any(
|
73
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam,
|
74
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlockParam
|
75
|
+
),
|
76
|
+
tool_use_id: String,
|
77
|
+
type: Symbol,
|
78
|
+
cache_control:
|
79
|
+
T.nilable(Anthropic::Beta::BetaCacheControlEphemeral)
|
80
|
+
}
|
81
|
+
)
|
82
|
+
end
|
83
|
+
def to_hash
|
84
|
+
end
|
85
|
+
|
86
|
+
module Content
|
87
|
+
extend Anthropic::Internal::Type::Union
|
88
|
+
|
89
|
+
Variants =
|
90
|
+
T.type_alias do
|
91
|
+
T.any(
|
92
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam,
|
93
|
+
Anthropic::Beta::BetaBashCodeExecutionResultBlockParam
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
97
|
+
sig do
|
98
|
+
override.returns(
|
99
|
+
T::Array[
|
100
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultBlockParam::Content::Variants
|
101
|
+
]
|
102
|
+
)
|
103
|
+
end
|
104
|
+
def self.variants
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaBashCodeExecutionToolResultError =
|
6
|
+
Beta::BetaBashCodeExecutionToolResultError
|
7
|
+
|
8
|
+
module Beta
|
9
|
+
class BetaBashCodeExecutionToolResultError < Anthropic::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError,
|
14
|
+
Anthropic::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
returns(
|
20
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
21
|
+
)
|
22
|
+
end
|
23
|
+
attr_accessor :error_code
|
24
|
+
|
25
|
+
sig { returns(Symbol) }
|
26
|
+
attr_accessor :type
|
27
|
+
|
28
|
+
sig do
|
29
|
+
params(
|
30
|
+
error_code:
|
31
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::OrSymbol,
|
32
|
+
type: Symbol
|
33
|
+
).returns(T.attached_class)
|
34
|
+
end
|
35
|
+
def self.new(error_code:, type: :bash_code_execution_tool_result_error)
|
36
|
+
end
|
37
|
+
|
38
|
+
sig do
|
39
|
+
override.returns(
|
40
|
+
{
|
41
|
+
error_code:
|
42
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol,
|
43
|
+
type: Symbol
|
44
|
+
}
|
45
|
+
)
|
46
|
+
end
|
47
|
+
def to_hash
|
48
|
+
end
|
49
|
+
|
50
|
+
module ErrorCode
|
51
|
+
extend Anthropic::Internal::Type::Enum
|
52
|
+
|
53
|
+
TaggedSymbol =
|
54
|
+
T.type_alias do
|
55
|
+
T.all(
|
56
|
+
Symbol,
|
57
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode
|
58
|
+
)
|
59
|
+
end
|
60
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
61
|
+
|
62
|
+
INVALID_TOOL_INPUT =
|
63
|
+
T.let(
|
64
|
+
:invalid_tool_input,
|
65
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
66
|
+
)
|
67
|
+
UNAVAILABLE =
|
68
|
+
T.let(
|
69
|
+
:unavailable,
|
70
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
71
|
+
)
|
72
|
+
TOO_MANY_REQUESTS =
|
73
|
+
T.let(
|
74
|
+
:too_many_requests,
|
75
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
76
|
+
)
|
77
|
+
EXECUTION_TIME_EXCEEDED =
|
78
|
+
T.let(
|
79
|
+
:execution_time_exceeded,
|
80
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
81
|
+
)
|
82
|
+
OUTPUT_FILE_TOO_LARGE =
|
83
|
+
T.let(
|
84
|
+
:output_file_too_large,
|
85
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
86
|
+
)
|
87
|
+
|
88
|
+
sig do
|
89
|
+
override.returns(
|
90
|
+
T::Array[
|
91
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode::TaggedSymbol
|
92
|
+
]
|
93
|
+
)
|
94
|
+
end
|
95
|
+
def self.values
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaBashCodeExecutionToolResultErrorParam =
|
6
|
+
Beta::BetaBashCodeExecutionToolResultErrorParam
|
7
|
+
|
8
|
+
module Beta
|
9
|
+
class BetaBashCodeExecutionToolResultErrorParam < Anthropic::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam,
|
14
|
+
Anthropic::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
returns(
|
20
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::OrSymbol
|
21
|
+
)
|
22
|
+
end
|
23
|
+
attr_accessor :error_code
|
24
|
+
|
25
|
+
sig { returns(Symbol) }
|
26
|
+
attr_accessor :type
|
27
|
+
|
28
|
+
sig do
|
29
|
+
params(
|
30
|
+
error_code:
|
31
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::OrSymbol,
|
32
|
+
type: Symbol
|
33
|
+
).returns(T.attached_class)
|
34
|
+
end
|
35
|
+
def self.new(error_code:, type: :bash_code_execution_tool_result_error)
|
36
|
+
end
|
37
|
+
|
38
|
+
sig do
|
39
|
+
override.returns(
|
40
|
+
{
|
41
|
+
error_code:
|
42
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::OrSymbol,
|
43
|
+
type: Symbol
|
44
|
+
}
|
45
|
+
)
|
46
|
+
end
|
47
|
+
def to_hash
|
48
|
+
end
|
49
|
+
|
50
|
+
module ErrorCode
|
51
|
+
extend Anthropic::Internal::Type::Enum
|
52
|
+
|
53
|
+
TaggedSymbol =
|
54
|
+
T.type_alias do
|
55
|
+
T.all(
|
56
|
+
Symbol,
|
57
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode
|
58
|
+
)
|
59
|
+
end
|
60
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
61
|
+
|
62
|
+
INVALID_TOOL_INPUT =
|
63
|
+
T.let(
|
64
|
+
:invalid_tool_input,
|
65
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::TaggedSymbol
|
66
|
+
)
|
67
|
+
UNAVAILABLE =
|
68
|
+
T.let(
|
69
|
+
:unavailable,
|
70
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::TaggedSymbol
|
71
|
+
)
|
72
|
+
TOO_MANY_REQUESTS =
|
73
|
+
T.let(
|
74
|
+
:too_many_requests,
|
75
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::TaggedSymbol
|
76
|
+
)
|
77
|
+
EXECUTION_TIME_EXCEEDED =
|
78
|
+
T.let(
|
79
|
+
:execution_time_exceeded,
|
80
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::TaggedSymbol
|
81
|
+
)
|
82
|
+
OUTPUT_FILE_TOO_LARGE =
|
83
|
+
T.let(
|
84
|
+
:output_file_too_large,
|
85
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::TaggedSymbol
|
86
|
+
)
|
87
|
+
|
88
|
+
sig do
|
89
|
+
override.returns(
|
90
|
+
T::Array[
|
91
|
+
Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode::TaggedSymbol
|
92
|
+
]
|
93
|
+
)
|
94
|
+
end
|
95
|
+
def self.values
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -26,6 +26,9 @@ module Anthropic
|
|
26
26
|
sig { returns(Integer) }
|
27
27
|
attr_accessor :end_char_index
|
28
28
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
30
|
+
attr_accessor :file_id
|
31
|
+
|
29
32
|
sig { returns(Integer) }
|
30
33
|
attr_accessor :start_char_index
|
31
34
|
|
@@ -38,6 +41,7 @@ module Anthropic
|
|
38
41
|
document_index: Integer,
|
39
42
|
document_title: T.nilable(String),
|
40
43
|
end_char_index: Integer,
|
44
|
+
file_id: T.nilable(String),
|
41
45
|
start_char_index: Integer,
|
42
46
|
type: Symbol
|
43
47
|
).returns(T.attached_class)
|
@@ -47,6 +51,7 @@ module Anthropic
|
|
47
51
|
document_index:,
|
48
52
|
document_title:,
|
49
53
|
end_char_index:,
|
54
|
+
file_id:,
|
50
55
|
start_char_index:,
|
51
56
|
type: :char_location
|
52
57
|
)
|
@@ -59,6 +64,7 @@ module Anthropic
|
|
59
64
|
document_index: Integer,
|
60
65
|
document_title: T.nilable(String),
|
61
66
|
end_char_index: Integer,
|
67
|
+
file_id: T.nilable(String),
|
62
68
|
start_char_index: Integer,
|
63
69
|
type: Symbol
|
64
70
|
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Anthropic
|
4
|
+
module Models
|
5
|
+
BetaCitationConfig = Beta::BetaCitationConfig
|
6
|
+
|
7
|
+
module Beta
|
8
|
+
class BetaCitationConfig < Anthropic::Internal::Type::BaseModel
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
Anthropic::Beta::BetaCitationConfig,
|
13
|
+
Anthropic::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
sig { returns(T::Boolean) }
|
18
|
+
attr_accessor :enabled
|
19
|
+
|
20
|
+
sig { params(enabled: T::Boolean).returns(T.attached_class) }
|
21
|
+
def self.new(enabled:)
|
22
|
+
end
|
23
|
+
|
24
|
+
sig { override.returns({ enabled: T::Boolean }) }
|
25
|
+
def to_hash
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -26,6 +26,9 @@ module Anthropic
|
|
26
26
|
sig { returns(Integer) }
|
27
27
|
attr_accessor :end_block_index
|
28
28
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
30
|
+
attr_accessor :file_id
|
31
|
+
|
29
32
|
sig { returns(Integer) }
|
30
33
|
attr_accessor :start_block_index
|
31
34
|
|
@@ -38,6 +41,7 @@ module Anthropic
|
|
38
41
|
document_index: Integer,
|
39
42
|
document_title: T.nilable(String),
|
40
43
|
end_block_index: Integer,
|
44
|
+
file_id: T.nilable(String),
|
41
45
|
start_block_index: Integer,
|
42
46
|
type: Symbol
|
43
47
|
).returns(T.attached_class)
|
@@ -47,6 +51,7 @@ module Anthropic
|
|
47
51
|
document_index:,
|
48
52
|
document_title:,
|
49
53
|
end_block_index:,
|
54
|
+
file_id:,
|
50
55
|
start_block_index:,
|
51
56
|
type: :content_block_location
|
52
57
|
)
|
@@ -59,6 +64,7 @@ module Anthropic
|
|
59
64
|
document_index: Integer,
|
60
65
|
document_title: T.nilable(String),
|
61
66
|
end_block_index: Integer,
|
67
|
+
file_id: T.nilable(String),
|
62
68
|
start_block_index: Integer,
|
63
69
|
type: Symbol
|
64
70
|
}
|
@@ -26,6 +26,9 @@ module Anthropic
|
|
26
26
|
sig { returns(Integer) }
|
27
27
|
attr_accessor :end_page_number
|
28
28
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
30
|
+
attr_accessor :file_id
|
31
|
+
|
29
32
|
sig { returns(Integer) }
|
30
33
|
attr_accessor :start_page_number
|
31
34
|
|
@@ -38,6 +41,7 @@ module Anthropic
|
|
38
41
|
document_index: Integer,
|
39
42
|
document_title: T.nilable(String),
|
40
43
|
end_page_number: Integer,
|
44
|
+
file_id: T.nilable(String),
|
41
45
|
start_page_number: Integer,
|
42
46
|
type: Symbol
|
43
47
|
).returns(T.attached_class)
|
@@ -47,6 +51,7 @@ module Anthropic
|
|
47
51
|
document_index:,
|
48
52
|
document_title:,
|
49
53
|
end_page_number:,
|
54
|
+
file_id:,
|
50
55
|
start_page_number:,
|
51
56
|
type: :page_location
|
52
57
|
)
|
@@ -59,6 +64,7 @@ module Anthropic
|
|
59
64
|
document_index: Integer,
|
60
65
|
document_title: T.nilable(String),
|
61
66
|
end_page_number: Integer,
|
67
|
+
file_id: T.nilable(String),
|
62
68
|
start_page_number: Integer,
|
63
69
|
type: Symbol
|
64
70
|
}
|