lambdaprompt  by approximatelabs

Functional programming interface for building AI systems

Created 2 years ago
380 stars

Top 74.8% on SourcePulse

GitHubView on GitHub
Project Summary

λprompt provides a functional programming interface for building and composing AI systems, targeting developers who want to treat LLM prompts as code. It simplifies prompt creation, chaining, and deployment as web services, enabling the development of complex "prompt machines" with features like self-correction and code generation.

How It Works

The library leverages Jinja templating for dynamic prompt generation, allowing prompts to be defined as parameterized functions. It supports both synchronous and asynchronous operations, enabling seamless integration into existing Python workflows. Prompts can be composed, chained, and even turned into FastAPI-based web services for easy deployment and consumption.

Quick Start & Requirements

  • Install: pip install lambdaprompt or pip install lambdaprompt[server] for web service deployment.
  • Prerequisites: OpenAI API key (set as OPENAI_API_KEY environment variable or via .env file).
  • Documentation: https://github.com/approximatelabs/lambdaprompt

Highlighted Details

  • Functional interface for prompt composition and chaining.
  • Supports synchronous and asynchronous LLM interactions.
  • Built-in FastAPI server for deploying prompts as APIs.
  • Enables creation of self-editing and self-writing AI agents.

Maintenance & Community

The project is maintained by Approximate Labs. Community channels are not explicitly mentioned in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking is not detailed.

Limitations & Caveats

The project is under active development with a "TODO" section for design patterns, indicating potential for missing features or ongoing changes. The README does not detail support for LLM providers other than OpenAI.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.