appl  by appl-team

A prompt programming language for Python

Created 1 year ago
261 stars

Top 97.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

APPL is a Python-based prompt programming language designed to seamlessly integrate Large Language Models (LLMs) into software development. It offers a natural, intuitive, and efficient way for developers to leverage LLMs like GPT, enhancing program readability and maintainability by embedding natural language prompts directly within Python code.

How It Works

APPL extends Python by allowing natural language prompts to be embedded as string literals within functions marked with the @ppl decorator. These prompts are dynamically constructed and can incorporate Python control flow and variables. The gen() function is used to invoke an LLM with the current prompt, and APPL handles asynchronous execution for parallel LLM calls, simplifying synchronization. It also provides mechanisms for transforming Python functions into LLM-callable tools and includes tracing and failure recovery capabilities.

Quick Start & Requirements

  • Installation: pip install -U applang
  • Prerequisites: LLM API keys (e.g., OpenAI API key set via .env or environment variable).
  • Setup: Requires LLM backend configuration.
  • Documentation: Tutorial and Cookbook.

Highlighted Details

  • Seamless integration of natural language prompts into Python code.
  • Automatic parallelization of LLM calls via asynchronous computation.
  • Intuitive tool calling for LLMs by transforming Python functions.
  • Tracing and failure recovery for LLM execution.

Maintenance & Community

  • Recent release: 0.2.0 (December 16, 2024).
  • Tutorials have been improved (July 12, 2024).
  • Integrations include LiteLLM for backend unification and Langfuse/Lunary for observability.
  • Roadmap includes support for direct prompt interaction without the @ppl decorator.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive license suitable for commercial and closed-source use.

Limitations & Caveats

The "Working with Cursor" feature is experimental. The roadmap indicates planned features like direct prompt interaction without the @ppl decorator, suggesting current usage is tied to this decorator.

Health Check
Last Commit

7 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.