#functional-programming #chatgpt #functional #programming

app lmgpt

Use LM programs to drive ChatGPT in a functional style

8 releases

0.1.5 Jul 18, 2023
0.1.4 Jul 18, 2023
0.0.2 Jul 16, 2023

#16 in #functional

34 downloads per month

MIT license

14KB
81 lines

lmgpt is an adapter to connect LM programs with the ChatGPT service.

LM Example

history := λyyyy mm dd. Tell me a historical event that happened on (month mm) dd yyyy

error (history 1932 09 17)

Running the Example

lmgpt example.lm

Example Output

On September 17, 1932, the military coup known as the "Revolution of 1932" took place in Brazil. This event marked a significant moment in Brazilian history and had lasting effects on the country's political landscape.

Installation

  1. Install Rust
  2. Install LMGPT
  3. Set your API key as an environment variable
cargo install lmgpt

export OPENAI_API_KEY=<your_api_key>

Documentation

Master List of LM ChatGPT Prompt Helper Functions.

Dependencies

~14MB
~385K SLoC