Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main branch version doesn't match released gem version for 0.1.3 #24

Open
mjfaga opened this issue Oct 14, 2024 · 0 comments
Open

main branch version doesn't match released gem version for 0.1.3 #24

mjfaga opened this issue Oct 14, 2024 · 0 comments

Comments

@mjfaga
Copy link

mjfaga commented Oct 14, 2024

I noticed that the deployed version of the gem doesn't match what is currently on the main branch as v0.1.3. Are there plans to push up a new version with the latest API?

[1] pry(main)> show-source Instructor

From: /Users/markfaga/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/instructor-rb-0.1.3/lib/instructor.rb:11
Module name: Instructor
Number of lines: 25

module Instructor
  @mode = nil

  class Error < ::StandardError; end

  # The ValidationError class represents an error that occurs during validation.
  class ValidationError < ::StandardError; end

  def self.mode
    @mode
  end

  # Patches the OpenAI client to add the following functionality:
  # - Retries on exceptions
  # - Accepts and validates a response model
  # - Accepts a validation_context argument
  #
  # @param openai_client [OpenAI::Client] The OpenAI client to be patched.
  # @param mode [Symbol] The mode to be used. Default is `Instructor::Mode::TOOLS.function`.
  # @return [OpenAI::Client] The patched OpenAI client.
  def self.patch(openai_client, mode: Instructor::Mode::TOOLS.function)
    @mode = mode
    openai_client.prepend(Instructor::OpenAI::Patch)
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant