Get the latest tech news

Smartfunc: Turn Docstrings into LLM-Functions


Turn docstrings into LLM-functions. Contribute to koaning/smartfunc development by creating an account on GitHub.

The docstring is parsed and turned into a Jinja2 template which we inject with variables to generate a prompt at runtime. The llm library is well maintained and has a large community An ecosystem of backends for different LLM providers Many of the vendors have async support, which allows us to do microbatching Many of the vendors have schema support, which allows us to use Pydantic models to define the response You can use.env files to store your API keys Similarily I felt that all the other platforms that similar things missing: async support or freedom for vendors.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of LLM-Functions

LLM-Functions

Photo of Docstrings

Docstrings