Turn a trained scikit-learn or XGBoost model into an OpenAI function-calling tool.
Export a model as a LangChain tool with one line of code.
Set confidence thresholds so uncertain predictions get flagged or rejected.
Combine several models into an ensemble that votes or averages predictions.
| tejas-ta/predikit | chandar-lab/semantic-wm | djlougen/hive | |
|---|---|---|---|
| Stars | 30 | 30 | 30 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | easy |
| Complexity | 2/5 | 5/5 | 3/5 |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Field names in your Pydantic schema must exactly match the model's trained column names.
predikit is a Python library that wraps a trained machine learning model so that an AI agent or language model can call it as a tool. The problem it solves is that ML models (built with libraries like scikit-learn or XGBoost) and AI agents (built with tools like OpenAI's API or LangChain) use different conventions for defining inputs and outputs. predikit bridges that gap by automatically generating the schema description an AI agent needs to know what to send, then routing the agent's input to the model and returning the prediction. The core object is called ModelTool. You give it a fitted model, a name, a description, and a Pydantic schema describing the input fields. From there you can export it as an OpenAI function-calling schema, a LangChain tool, or a plain Python callable, with one line each. When invoked, it validates the input, calls the model's predict method, and returns the result as a dictionary. If you have multiple models, a ToolRegistry lets you group them and export all at once. The library includes a few practical extras. A confidence threshold feature lets classifiers flag or reject predictions when the model is uncertain, with options to log a warning, raise an error, or hand off to a fallback tool. An ensemble wrapper lets you run several models and combine their predictions by averaging, majority vote, or merging outputs. Loaders for MLflow and Snowflake model registries let you pull a registered model directly without writing loading code yourself. The library also handles a common quirk where language models return strings like "yes" or "true" for boolean fields, coercing those to proper Python booleans before validation. Field names in the Pydantic schema must exactly match the column names the model was trained on, predikit maps inputs by name, not position, and reports clearly which names are mismatched if there is a conflict. The package is MIT licensed and available on PyPI.
A Python library that wraps a trained machine learning model so AI agents like ChatGPT or LangChain can call it as a tool.
Mainly Python. The stack also includes Python, Pydantic, scikit-learn.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.