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

🔧 fix: Make assistant tool filtering compatible with plugin filtering #3325

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

bnord01
Copy link
Contributor

@bnord01 bnord01 commented Jul 11, 2024

Fixes #3324

Summary

The includedTools config option expects the pluginKey/tool.name for filtering included tools, which is incompatible with the implementation in loadAndFormatTools used for loading assistant tools.

This change uses both filename and tool.name for filtering tools in ToolService.loadAndFormatTools in order to make it compatible with the old implementation as well as the behaviour of plugin filtering.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

  1. Use a configuration with assistants + plugins enabled.
  2. Set includedTools to ['calculator', 'azure-ai-search'] in librechat.yaml
  3. Verify plugins are properly filtered in plugins.
  4. Create/Update assistant try to add tool.
  5. Observe the Calculator and Azure AI Search tool being available.

Test Configuration:

  1. Use a configuration with assistants + plugins enabled.
  2. Set includedTools to ['calculator', 'azure-ai-search'] in librechat.yaml

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

…sing includedTools

includedTools expects the pluginKey/tool.name for filtering included tools, which is incompatible with the previous implementation in loadAndFormatTools used for loading assistant tools.

This change uses both filename and tool.name for filtering tools in ToolService.loadAndFormatTools in order to make it compatible with the old implementation and the behaviour of plugin filtering.
@danny-avila danny-avila changed the title fix: Make assistant tool filtering compatible with plugin filtering 🔧 fix: Make assistant tool filtering compatible with plugin filtering Jul 12, 2024
@danny-avila danny-avila merged commit 0a1d38e into danny-avila:main Jul 12, 2024
@bnord01 bnord01 deleted the fix-assistant-tool-filter branch July 14, 2024 11:56
danny-avila pushed a commit that referenced this pull request Aug 5, 2024
…#3325)

includedTools expects the pluginKey/tool.name for filtering included tools, which is incompatible with the previous implementation in loadAndFormatTools used for loading assistant tools.

This change uses both filename and tool.name for filtering tools in ToolService.loadAndFormatTools in order to make it compatible with the old implementation and the behaviour of plugin filtering.

Co-authored-by: Benedikt Nordhoff <benedikt.nordhoff@codecentric.de>
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
…danny-avila#3325)

includedTools expects the pluginKey/tool.name for filtering included tools, which is incompatible with the previous implementation in loadAndFormatTools used for loading assistant tools.

This change uses both filename and tool.name for filtering tools in ToolService.loadAndFormatTools in order to make it compatible with the old implementation and the behaviour of plugin filtering.

Co-authored-by: Benedikt Nordhoff <benedikt.nordhoff@codecentric.de>
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.

[Bug]: Filtering plugins using includedTools breaks assistant tools.
2 participants