dspy-gemini 1.0.2 → 1.0.3

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: ff1478829ce691613d35cf4f2f53d2bfd6e58ffcc1bff40f002af6154ad190ea
4
- data.tar.gz: c2288022addfd8ef3de4e0501dd3ad23f49e011fe43485000c55c7184a91c3db
3
+ metadata.gz: 0d8c3a914bf14371393cd8666e8fe6dde619beba003ad16513e3ecb077239b06
4
+ data.tar.gz: fdd2ee0fd8710a95653626ccf32a529fe491efefcb5bbe3f7c4422586a056733
5
5
  SHA512:
6
- metadata.gz: 9852c3c103fa471e93329c98602f25a5bbe4f7addde5bac4962bc0637472568883a04cdd2924dec989adb68e83fa3b02af1169391a33dcf535a7e73288b41e4f
7
- data.tar.gz: 95f86e4dd4a4e67042e6cc984739675fcf6e38ad715a40a90a0594be78d360d3323e535c116f2fbe56c9a43e6bdd4500a73d2185ec82576661aec8e57308f61b
6
+ metadata.gz: efedc61fd10498ee0efff8f03d1b55c8f9e2407fe7afaad7b99e2489fb184ebbec468a3ffc85054ece684bcaaa8cd8e112ce4a4a64a9ec32e39ad823d8d1256d
7
+ data.tar.gz: 05203eb5b8bc7b61ec438fb65d0c289c59a2cb7a97dc5e8bd64e195f64f183879392d701da50d94af66fc62b81383b8520125a7181850001e4c3cb19b3fed4c0
data/README.md CHANGED
@@ -137,26 +137,18 @@ result.answer # => "60 km/h"
137
137
  Build agents that use tools to accomplish tasks:
138
138
 
139
139
  ```ruby
140
- class SearchTool < DSPy::Tools::Tool
140
+ class SearchTool < DSPy::Tools::Base
141
141
  tool_name "search"
142
- description "Search for information"
143
-
144
- input do
145
- const :query, String
146
- end
147
-
148
- output do
149
- const :results, T::Array[String]
150
- end
142
+ tool_description "Search for information"
151
143
 
144
+ sig { params(query: String).returns(String) }
152
145
  def call(query:)
153
146
  # Your search implementation
154
- { results: ["Result 1", "Result 2"] }
147
+ "Result 1, Result 2"
155
148
  end
156
149
  end
157
150
 
158
- toolset = DSPy::Tools::Toolset.new(tools: [SearchTool.new])
159
- agent = DSPy::ReAct.new(signature: ResearchTask, tools: toolset, max_iterations: 5)
151
+ agent = DSPy::ReAct.new(ResearchTask, tools: [SearchTool.new], max_iterations: 5)
160
152
  result = agent.call(question: "What's the latest on Ruby 3.4?")
161
153
  ```
162
154
 
@@ -185,8 +177,8 @@ result = agent.call(question: "What's the latest on Ruby 3.4?")
185
177
  A [Claude Skill](https://github.com/vicentereig/dspy-rb-skill) is available to help you build DSPy.rb applications:
186
178
 
187
179
  ```bash
188
- # Claude Code
189
- git clone https://github.com/vicentereig/dspy-rb-skill ~/.claude/skills/dspy-rb
180
+ # Claude Code — install from the vicentereig/engineering marketplace
181
+ claude install-skill vicentereig/engineering --skill dspy-rb
190
182
  ```
191
183
 
192
184
  For Claude.ai Pro/Max, download the [skill ZIP](https://github.com/vicentereig/dspy-rb-skill/archive/refs/heads/main.zip) and upload via Settings > Skills.
@@ -201,7 +193,7 @@ The [examples/](examples/) directory has runnable code for common patterns:
201
193
  - Prompt optimization
202
194
 
203
195
  ```bash
204
- bundle exec ruby examples/first_predictor.rb
196
+ bundle exec ruby examples/basic_search_agent.rb
205
197
  ```
206
198
 
207
199
  ## Optional Gems
@@ -11,7 +11,7 @@ module DSPy
11
11
 
12
12
  # Models that support structured outputs (JSON + Schema)
13
13
  # Based on official Google documentation: https://ai.google.dev/gemini-api/docs/models/gemini
14
- # Last updated: Oct 2025
14
+ # Last updated: Feb 2026
15
15
  # Note: Gemini 1.5 series deprecated Oct 2025
16
16
  STRUCTURED_OUTPUT_MODELS = T.let([
17
17
  # Gemini 2.0 series
@@ -21,7 +21,9 @@ module DSPy
21
21
  "gemini-2.5-pro",
22
22
  "gemini-2.5-flash",
23
23
  "gemini-2.5-flash-lite",
24
- "gemini-2.5-flash-image"
24
+ "gemini-2.5-flash-image",
25
+ # Gemini 3.0 series
26
+ "gemini-3-flash-preview"
25
27
  ].freeze, T::Array[String])
26
28
 
27
29
  # Models that do not support structured outputs or are deprecated
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DSPy
4
4
  module Gemini
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dspy-gemini
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicente Reig Rincón de Arellano