MonkeyPatch icon
MonkeyPatch icon

MonkeyPatch

MonkeyPatch is a way to easily call an LLM in place of the function body in Python, with the same parameters and output that you would expect from a function implemented by hand.

Cost / License

  • Free
  • Open Source

Platforms

  • Mac
  • Windows
  • Linux
  • BSD
  • Python
-
No reviews
0likes
0comments
0alternatives
0news articles

Features

Suggest and vote on features
  1.  AI-Powered

MonkeyPatch News & Activities

Highlights All activities

Recent activities

No activities found.

MonkeyPatch information

  • Licensing

    Open Source (MIT) and Free product.
  • Written in

  • Alternatives

    0 alternatives listed
  • Supported Languages

    • English

AlternativeTo Categories

AI Tools & ServicesDevelopment

GitHub repository

  •  694 Stars
  •  25 Forks
  •  38 Open Issues
  •   Updated  
View on GitHub
MonkeyPatch was added to AlternativeTo by Paul on and this page was last updated .
No comments or reviews, maybe you want to be first?
Post comment/review

What is MonkeyPatch?

MonkeyPatch is a way to easily call an LLM in place of the function body in Python, with the same parameters and output that you would expect from a function implemented by hand.

These LLM-powered functions are well-typed, reliable, stateless, and production-ready to be dropped into your app seamlessly. Rather than endless prompt-wrangling and nasty surprises, these LLM-powered functions and applications behave like traditional functions with proper error handling.

Lastly, the more you use MonkeyPatch functions, the cheaper and faster they gets (up to 9-10x!) through automatic model distillation.

Features

  • Easy and seamless integration - Add LLM augmented functions to any workflow within seconds. Decorate a function stub with @monkey.patch and optionally add type hints and docstrings to guide the execution. That’s it.
  • Type aware - Ensure that the outputs of the LLM adhere to the type constraints of the function (Python Base types, Pydantic classes, Literals, Generics etc) to guard against bugs or unexpected side-effects of using LLMs.
  • Aligned outputs - LLMs are unreliable, which makes them difficult to use in place of classically programmed functions. Using simple assert statements in a function decorated with @monkey.align, you can align the behaviour of your patched function to what you expect.
  • Lower cost and latency - Achieve up to 90% lower cost and 80% lower latency with increased usage. The package will take care of model training, MLOps and DataOps efforts to improve LLM capabilities through distillation.
  • Batteries included - No remote dependencies other than OpenAI.