Skip to content

Conversation

matthewsinclair
Copy link

  • Add conditional check for tools parameter to prevent KeyError
  • Remove unsupported OpenAI parameters (response_format, stop)
  • Add response parsers for :json and :md_json modes
  • Add comprehensive tests for all modes
  • Fix formatter configuration

The adapter was failing with KeyError when accessing params.tools for non-tools modes. This fix ensures the adapter only processes tools when they exist and properly handles all Instructor modes.

Fixes the issue where :json and :md_json modes would crash with: ** (KeyError) key :tools not found in: %{...}

- Add conditional check for tools parameter to prevent KeyError
- Remove unsupported OpenAI parameters (response_format, stop)
- Add response parsers for :json and :md_json modes
- Add comprehensive tests for all modes
- Fix formatter configuration

The adapter was failing with KeyError when accessing params.tools
for non-tools modes. This fix ensures the adapter only processes
tools when they exist and properly handles all Instructor modes.

Fixes the issue where :json and :md_json modes would crash with:
** (KeyError) key :tools not found in: %{...}
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

Successfully merging this pull request may close these issues.

1 participant