Skip to content

feat(MLXPipeline): add bind_tools method to support tool calling #128

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Muwinuddin
Copy link

Summary

This PR adds a bind_tools method to the MLXPipeline class to enable compatibility with LangChain's tool-calling agents. This allows the MLXPipeline LLM wrapper to integrate seamlessly with agents that support OpenAI-style tool definitions.

Changes

  • Implements bind_tools using convert_to_openai_tool and super().bind(...)
  • Ensures compatibility with LangChain's Runnable interface

Motivation

Without this method, MLXPipeline is not usable with tool-calling agents. This change enables developers to use MLX-based models in more advanced LangChain agent workflows.

Checklist

  • Added bind_tools method
  • Verified tool calling compatibility with MLXPipeline

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