instructor-rb icon indicating copy to clipboard operation
instructor-rb copied to clipboard

Fixes

Open sergiobayona opened this issue 3 months ago • 0 comments

[!IMPORTANT] Enhance Instructor library with updated dependencies, new modes for API interactions, and improved response handling, along with comprehensive test coverage.

  • Dependencies:
    • Update activesupport to >= 6.0.
    • Update easy_talk to ~> 2.
    • Update ruby-anthropic to ~> 0.4.
    • Update ruby-openai to ~> 8.
  • Modes:
    • Add ANTHROPIC_TOOLS, ANTHROPIC_JSON, ANTHROPIC_PARALLEL_TOOLS, and ANTHROPIC_REASONING_TOOLS modes in mode.rb.
    • Add TOOLS_STRICT, JSON_SCHEMA, and MD_JSON modes for OpenAI in mode.rb.
  • Functionality:
    • Implement from_openai and from_anthropic methods in instructor.rb to support new modes.
    • Enhance Anthropic::Patch and OpenAI::Patch to handle new modes and response formats.
    • Add ToolResponse and JsonResponse classes in anthropic/response.rb and openai/response.rb for mode-specific response handling.
  • Testing:
    • Add tests for new modes and response handling in spec/anthropic and spec/openai directories.
    • Update VCR cassettes to reflect changes in API interactions.

This description was created by Ellipsis for 6c09306f2c9816d1408753501db3b5ea6c23abce. You can customize this summary. It will automatically update as commits are pushed.

sergiobayona avatar Oct 04 '25 01:10 sergiobayona