anthropic 1.13.0 → 1.15.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 +27 -0
- data/README.md +31 -1
- data/lib/anthropic/helpers/input_schema/base_model.rb +6 -3
- data/lib/anthropic/helpers/input_schema/json_schema_converter.rb +9 -3
- data/lib/anthropic/helpers/input_schema/supported_schemas.rb +106 -0
- data/lib/anthropic/helpers/input_schema/union_of.rb +3 -1
- data/lib/anthropic/helpers/messages.rb +107 -0
- data/lib/anthropic/helpers/streaming/message_stream.rb +54 -43
- data/lib/anthropic/helpers/tools/base_tool.rb +82 -0
- data/lib/anthropic/helpers/tools/runner.rb +156 -0
- data/lib/anthropic/helpers/tools.rb +5 -0
- data/lib/anthropic/internal/transport/base_client.rb +7 -1
- data/lib/anthropic/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +8 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +8 -1
- data/lib/anthropic/models/beta/beta_json_output_format.rb +27 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +8 -1
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +14 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +8 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +8 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +9 -1
- data/lib/anthropic/models/beta/message_create_params.rb +9 -1
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +9 -1
- data/lib/anthropic/models/tool_use_block.rb +6 -6
- data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
- data/lib/anthropic/resources/beta/messages.rb +37 -11
- data/lib/anthropic/resources/messages/batches.rb +6 -6
- data/lib/anthropic/resources/messages.rb +12 -84
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +16 -10
- data/manifest.yaml +1 -0
- data/rbi/anthropic/helpers/input_schema/base_model.rbi +7 -2
- data/rbi/anthropic/helpers/tools/base_tool.rbi +51 -0
- data/rbi/anthropic/helpers/tools/runner.rbi +40 -0
- data/rbi/anthropic/helpers/tools.rbi +5 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +5 -0
- data/rbi/anthropic/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/anthropic/internal/type/base_model.rbi +8 -4
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_json_output_format.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool.rbi +9 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +9 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +17 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +17 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +18 -0
- data/rbi/anthropic/models/tool_use_block.rbi +3 -0
- data/rbi/anthropic/resources/beta/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/beta/messages.rbi +313 -3
- data/rbi/anthropic/resources/messages/batches.rbi +6 -6
- data/rbi/anthropic/resources/messages.rbi +5 -3
- data/sig/anthropic/internal/transport/base_client.rbs +2 -0
- data/sig/anthropic/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +9 -2
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +9 -2
- data/sig/anthropic/models/beta/beta_json_output_format.rbs +23 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool.rbs +7 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +9 -2
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +9 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +9 -2
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +7 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +5 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +5 -0
- data/sig/anthropic/resources/beta/messages.rbs +3 -0
- metadata +14 -4
- data/lib/anthropic/helpers/input_schema/property_mapping.rb +0 -47
- /data/rbi/anthropic/helpers/{structured_output.rbi → input_schema.rbi} +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Anthropic
|
|
4
|
-
module Helpers
|
|
5
|
-
module InputSchema
|
|
6
|
-
# rubocop:disable Style/MutableConstant
|
|
7
|
-
PROPERTY_MAPPING = {
|
|
8
|
-
# Numeric properties:
|
|
9
|
-
minimum: :minimum,
|
|
10
|
-
maximum: :maximum,
|
|
11
|
-
exclusive_minimum: :exclusiveMinimum,
|
|
12
|
-
exclusive_maximum: :exclusiveMaximum,
|
|
13
|
-
multiple_of: :multipleOf,
|
|
14
|
-
|
|
15
|
-
# String properties:
|
|
16
|
-
min_length: :minLength,
|
|
17
|
-
max_length: :maxLength,
|
|
18
|
-
pattern: :pattern,
|
|
19
|
-
format: :format,
|
|
20
|
-
content_media_type: :contentMediaType,
|
|
21
|
-
content_encoding: :contentEncoding,
|
|
22
|
-
|
|
23
|
-
# Array properties:
|
|
24
|
-
min_items: :minItems,
|
|
25
|
-
max_items: :maxItems,
|
|
26
|
-
unique_items: :uniqueItems,
|
|
27
|
-
prefix_items: :prefixItems,
|
|
28
|
-
contains: :contains,
|
|
29
|
-
min_contains: :minContains,
|
|
30
|
-
max_contains: :maxContains,
|
|
31
|
-
|
|
32
|
-
# Object properties:
|
|
33
|
-
pattern_properties: :patternProperties,
|
|
34
|
-
dependent_schemas: :dependentSchemas,
|
|
35
|
-
dependent_required: :dependentRequired,
|
|
36
|
-
property_names: :propertyNames,
|
|
37
|
-
|
|
38
|
-
# Metadata:
|
|
39
|
-
default: :default,
|
|
40
|
-
examples: :examples,
|
|
41
|
-
|
|
42
|
-
doc: :description
|
|
43
|
-
}
|
|
44
|
-
# rubocop:enable Style/MutableConstant
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
File without changes
|