Skip to content
System One

kieranklaassen/ruby_llm-typesafe

TypeSafe structured-output provider for RubyLLM 2, wiring Jev into the RubyLLM provider interface.

kieranklaassen/ruby_llm-typesafe on GitHub

Stars
19
Forks
0
Language
Ruby
License
MIT
Last push
16 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

protocol :system_one, Protocols::SystemOne

def api_base
  @config.typesafe_api_base || 'https://api.typesafe.ai'
end

def headers
  { 'Authorization' => "Bearer #{@config.typesafe_api_key}" }
end

# TypeSafe reports failures under +detail+, either a Hash with a
# +message+ for API usage errors or a list of offending fields for 422
# validation failures. The generic parser reads neither shape.
def parse_error(response)
  body = parse_error_body(response)

View in lib/ruby_llm/providers/typesafe.rb

Open on GitHub

More like this

Use cases this is tagged with