Working example using Ruby to extract unstructured data from a prompt then correctly parsing and loading the response values into a Ruby object.
:rocket: This PR description was created by Ellipsis for commit 6471e729d16041eb444297ce055daee8cb5ba5a5.
Summary:
This PR introduces a Ruby implementation for extracting structured data from unstructured text using OpenAI's API, along with usage instructions and basic tests.
Key points:
Added a new Instructor module in /lib/instructor.rb.
Introduced Instructor::Model class in /lib/instructor/model.rb for schema validation.
Added Instructor::OpenAI::Client class in /lib/instructor/openai/client.rb for interacting with OpenAI's API.
Updated /README.md with instructions on how to use the new Ruby implementation.
Included a basic spec in /spec/basic_spec.rb for testing the functionality.
Working example using Ruby to extract unstructured data from a prompt then correctly parsing and loading the response values into a Ruby object.
Summary:
This PR introduces a Ruby implementation for extracting structured data from unstructured text using OpenAI's API, along with usage instructions and basic tests.
Key points:
Instructor
module in/lib/instructor.rb
.Instructor::Model
class in/lib/instructor/model.rb
for schema validation.Instructor::OpenAI::Client
class in/lib/instructor/openai/client.rb
for interacting with OpenAI's API./README.md
with instructions on how to use the new Ruby implementation.Included a basic spec in
/spec/basic_spec.rb
for testing the functionality.Generated with :heart: by ellipsis.dev