This project leverages the capabilities of OpenAI in conjunction with the Pathway framework to establish a secure, localized interface facilitating the execution of Linux commands through prompts in Simple English. The Pathway Framework constructs a dedicated dictionary containing command descriptions, ensuring data confidentiality by conducting searches locally without transmitting any information to OpenAI. This approach is particularly advantageous for developing a secure Command Line Interface (CLI) suitable for beginners and adept users, fostering efficient Linux system interaction.
- Development of an algorithm that systematically generates a comprehensive and organized dictionary from locally available commands residing in '/usr/bin' directories and abstracting the description using ‘man’.
- Implementation of a simplified algorithm utilizing Linux Cheat Sheets accessible on the internet, offering a less intricate alternative.
The choice of prioritizing the first method is driven by its inherent capability to yield more precise and reliable responses for users and developers. This meticulous approach ensures the creation of a robust and user-friendly CLI, catering to both novice and experienced Linux users.
Follow these steps to install and get started:
This is done with the git clone
command followed by the URL of the repository:
https://github.com/Arush-Pimpalkar/Transfinitte23_BX1
Next, navigate to the repository:
cd llm-app
Create an .env file in the root directory and add the OpenAI api key. It may look like this
APP_VARIANT=contextful
PATHWAY_REST_CONNECTOR_HOST=0.0.0.0
PATHWAY_REST_CONNECTOR_PORT=8080
OPENAI_API_TOKEN=<Your Token>
PATHWAY_CACHE_DIR=/tmp/cache
Follow the steps to start the app
-
Install poetry:
pip install poetry
-
Install llm_app and dependencies:
poetry install --with examples --extras local
-
**Start the ** You can start the example with the command:
poetry run ./run_examples.py contextful
Start using the app from a different terminal:
python3 pathway_client.py
Repository used : https://github.com/pathwaycom/llm-app/
Working Video: