v1.2.2 - Fix text extraction in search results
Bug Fix
BUGFIX: Fix text/highlights/summary/context extraction in search results.
The Exa API requires these options to be wrapped in a contents object. Previously, passing text: true or text: {max_characters: 1000} would silently return no text content.
What Changed
SearchRequest#to_payloadnow automatically wraps content options (text,highlights,summary,context) in the requiredcontentsstructure- Text extraction now works as documented
Example
# This now works correctly!
results = client.search.search(
query: "latest AI papers",
num_results: 5,
text: { max_characters: 1000 }
)
results.results.each do |r|
puts r.text # Now contains the actual text content
endUpgrade
gem update exa-ai-rubyOr update your Gemfile:
gem "exa-ai-ruby", "~> 1.2.2"