Skip to content

furoxr/nlcps

Repository files navigation

Natural Language Commanding via Program Synthesis

This repository contains a Python implementation of the framework described in the article "Natural Language Commanding via Program Synthesis". The package allows you to implement your own natural language commanding application leveraging LLM and DSL.

Usage

Docker Setup

To use this package, you can follow these steps to set up the required environment using Docker:

  1. Pull the qdrant/qdrant Docker image:

    docker pull qdrant/qdrant
    
  2. Run the Docker container with port mapping and volume mounting:

    docker run -p 6333:6333 \
        -v $(pwd)/qdrant_storage:/qdrant/storage \
        qdrant/qdrant

Python Setup

If you want to work with the Python package directly, follow these steps:

  1. Set up your Python environment to use version 3.10.2 using pyenv:

    pyenv local 3.10.2
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate
  3. Install the required packages from requirements.txt:

    pip install -r requirements.txt

Test and Usage

You can find usage examples and tests in the tests/test_nlcps.py file.

To run the tests, make sure you have the necessary environment variables set:

OPENAI_API_KEY='your-api-key' OPENAI_API_BASE='https://api.openai.com/v1' pytest -s tests/

Replace 'your-api-key' with your actual OpenAI API key.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages