diff options
| author | Adam Malczewski <[email protected]> | 2026-04-29 21:40:58 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-04-29 21:40:58 +0900 |
| commit | 27af03cb3540539f065334c199fdb42c48776fc5 (patch) | |
| tree | 9dcaecc59f4383d88933519b5b049793e772427b /lib/dispatch/adapter/interface/tool_definition.rb | |
| parent | 07277435c0688ad9f5fa682633b86b99ef5bb854 (diff) | |
| download | dispatch-adapter-interface-27af03cb3540539f065334c199fdb42c48776fc5.tar.gz dispatch-adapter-interface-27af03cb3540539f065334c199fdb42c48776fc5.zip | |
update to support claude
Diffstat (limited to 'lib/dispatch/adapter/interface/tool_definition.rb')
| -rw-r--r-- | lib/dispatch/adapter/interface/tool_definition.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/dispatch/adapter/interface/tool_definition.rb b/lib/dispatch/adapter/interface/tool_definition.rb index 7b435a3..4a8ca5a 100644 --- a/lib/dispatch/adapter/interface/tool_definition.rb +++ b/lib/dispatch/adapter/interface/tool_definition.rb @@ -2,6 +2,18 @@ module Dispatch module Adapter - ToolDefinition = Struct.new(:name, :description, :parameters, keyword_init: true) + # +cache_control+ values: + # nil — no cache breakpoint (default) + # { type: :ephemeral } — provider default TTL + # { type: :ephemeral, ttl: :"5m" } — short-lived cache + # { type: :ephemeral, ttl: :"1h" } — long-lived cache + ToolDefinition = Struct.new( + :name, :description, :parameters, :cache_control, + keyword_init: true + ) do + def initialize(name:, description:, parameters:, cache_control: nil) + super + end + end end end |
