Skip to main content

Tool Ahead of Time (TAoT)

Project description

Tool-Ahead-of-Time (TAoT): Because Why Wait? 🕒

Ever found yourself staring at a shiny new LLM through LangChain's window, but can't use tool calling because it's "not supported yet"?

Sad agent noises 😢

Well, hold my JSON parser, because this repo says "NOT TODAY!" 🦾

What is this sorcery? 🧙‍♂️

This is a Python package that enables tool calling for any model available through Langchain's ChatOpenAI library (and by extension, any model available through OpenAI's library) and Langchain's AzureAIChatCompletionsModel library, even before LangChain and LangGraph officially supports it!

Yes, you read that right. We're living in the age of AI and things move fast 🏎️💨

It essentially works by reformatting the output response of the model into a JSON parser and passing this on to the relevant tools.

This repo showcases an example with DeepSeek-R1 671B, which isn't currently supported with tool calling by LangChain and LangGraph (as of 16th Feb 2025).

Features 🌟

  • Tool calling support for OpenAI and non-OpenAI models available on:
    • Langchain's ChatOpenAI library (and by extension, OpenAI and non-OpenAI models available on the base OpenAI's library).
    • Langchain's AzureAIChatCompletionsModel library.
  • This package follows a similar method to LangChain's and LangGraph's create_react_agent method for tool calling, so makes it easy for you to read the syntax. 😊
  • Zero waiting for official support required.
  • More robust than a caffeinated developer at 3 AM. ☕

Quick Start 🚀

Follow the notebook tutorials in the "tutorial" folder in this repo for a fast and practical guide:

  • "taot_tutorial_ChatOpenAI.ipynb" file for Langchain's ChatOpenAI library.
  • "taot_tutorial_AzureAIChatCompletionsModel.ipynb" file for Langchain's AzureAIChatCompletionsModel library.

Change Log 📖

20th Feb 2025:

  • Package now available on PyPI! Just "pip install taot" and you're ready to go.
  • Completely redesigned to follow LangChain's and LangGraph's intuitive create_react_agent tool calling methods.
  • Produces natural language responses when tool calling is performed.

1st Mar 2025:

8th Mar 2025:

  • Updated package to include implementation support for Microsoft Azure via Langchain's AzureAIChatCompletionsModel library.

Contributions 🤝

Feel free to contribute! Whether it's adding features, fixing bugs, adding comments in the code or any suggestions to improve this repo, all are welcomed 😄

Disclaimer ⚠️

This package is like that friend who shows up to the party early - technically not invited yet, but hopes to bring such good vibes that everyone's glad they came.

License 📜

MIT License - Because sharing is caring, and we care about you having tool calling RIGHT NOW.


Made with ❤️ and a healthy dose of impatience.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taot-0.1.7.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taot-0.1.7-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file taot-0.1.7.tar.gz.

File metadata

  • Download URL: taot-0.1.7.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for taot-0.1.7.tar.gz
Algorithm Hash digest
SHA256 3ce529d876d0f0de31ee9880eea798a1a2f3b0271b5e72411e1c6da00f1bd420
MD5 9d7569d47861ff45d238e6ac73e578d2
BLAKE2b-256 c56f9d1cb1071e3f576d1054844207ddadbade031c2967f277dda0cee3e8b639

See more details on using hashes here.

File details

Details for the file taot-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: taot-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for taot-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 39b87ecb2b491a6a02c7febd152bbba57b56dd867fb3f114cb5b10bc7255ccc3
MD5 3f81f5ee81b26e279dc368dc63acf0b0
BLAKE2b-256 f176c0c08d33a39996d283681744f33ed3edae4b0d37484f8e31246d3fd4fc97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page