Hasty Briefsbeta

Bilingual

smartfunc: Turn Docstrings into LLM-Functions

a year ago
  • #LLM
  • #Python
  • #Automation
  • The `smartfunc` library converts docstrings into LLM-functions, using Jinja2 templates for prompts.
  • It wraps around the `llm` library by Simon Willison, providing syntactic sugar and leveraging its ecosystem.
  • Supports various backends, async operations, and Pydantic models for structured responses.
  • Example usage includes generating summaries or descriptions with customizable prompts.
  • Features include debug mode, async support, and simplicity for rapid prototyping.
  • Comparison with other libraries like `instructor`, `ell`, or `marvin` highlights `smartfunc`'s focus on simplicity and vendor freedom.