foobara-anthropic-api 1.0.6 → 1.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e1de39baf03e0b402cf920da0ad61f1d00072b3d732805526763d68557d4ed4
4
- data.tar.gz: 531499f4a14808a66d4faf6db42b6a6aff624ccab3904b455121525305c1806d
3
+ metadata.gz: eda96d5cdb535c70b4b794742575e31fbdb084f081480372b6212b94dc514053
4
+ data.tar.gz: d13ebe86723cb1685e47ffdbb65965fa28d8835189d374548c1f91d8bca35b69
5
5
  SHA512:
6
- metadata.gz: dd3d98e7a450ef8e34db7b9eac489038c3a7d5327719bb250bafc6c5d95d80de452e2cbd13846236dfd1ffab97ffbb99735a9ab9198a7abdd2959710f391e17b
7
- data.tar.gz: ec7e9c6f7491044c861eaf319a26a8053fd2dc4f4746259c6916cfff97beb9aeef6974fba21ef9a97275ca32e80a325f92d223adc59422b990ed0a474f601aa8
6
+ metadata.gz: 4a49028e521f5ee955f7636cca01b5be45036fb89faf7c6d1fcdde9ebd2629c183af4a9f9790a24c58a110e437dde7a71880fc49d23bc6379e6316389f410699
7
+ data.tar.gz: 6a80261967d7d9cc57e140b5b9c62e9c523d8fef3b5ebdcd9eca5f6966ea0542baad19069303d7b20ad1940c7a6a7974e1166094714d874b93c19657f0d2ae05
@@ -4,9 +4,18 @@ module Foobara
4
4
  module Types
5
5
  class MessageResult < Foobara::Model
6
6
  class Content < Foobara::Model
7
+ # TODO: we either need to support inheritance better (maybe it already works?) or better validations.
8
+ # The issue is that we will have "text" if it's actually text but could also be "thinking"
7
9
  attributes do
8
- text :string, :required
9
- type :string, :required, one_of: ["text"]
10
+ # TODO: scared to explicitly put one_of: because Anthropic might just drop in new values.
11
+ type :string, :required # , one_of: ["text", "thinking"]
12
+
13
+ # Only present when type is "text"
14
+ text :string
15
+
16
+ # Only present when type is "thinking"
17
+ thinking :string
18
+ signature :string
10
19
  end
11
20
  end
12
21
  end
@@ -21,6 +21,10 @@ module Foobara
21
21
  # TODO: type this, no clue what it is (but it can definitely be null)
22
22
  container :duck
23
23
  end
24
+
25
+ def text
26
+ content.find { it.type == "text" }.text
27
+ end
24
28
  end
25
29
  end
26
30
  end
@@ -17,9 +17,7 @@ module Foobara
17
17
  BaseCommand.api_token
18
18
  end
19
19
 
20
- def default_llm_model
21
- Types::ModelEnum::CLAUDE_SONNET_4_5_20250929
22
- end
20
+ def default_llm_model = Types::ModelEnum::CLAUDE_SONNET_5
23
21
  end
24
22
  end
25
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-anthropic-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi