Skip to content

v1.2.2 - Fix text extraction in search results

Choose a tag to compare

@vicentereig vicentereig released this 22 Dec 15:20
· 1 commit to main since this release

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_payload now automatically wraps content options (text, highlights, summary, context) in the required contents structure
  • 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
end

Upgrade

gem update exa-ai-ruby

Or update your Gemfile:

gem "exa-ai-ruby", "~> 1.2.2"