A minimal, OpenAI-free LLM flow engine to create and test chatbots using open-source models like gpt2 or phi-2. Inspired by Azure's Prompt Flow but works fully offline and locally.
- π§± Flow-based design using simple YAML
- π€ Local LLMs with
transformers(e.g., GPT2, Phi-2) - π¬ Interactive CLI-based chatbot
- π No API keys or cloud access needed
- πͺΆ Lightweight and beginner-friendly
PlayerOne/
βββ cli.py # CLI commands (init, test)
βββ engine.py # Flow loader + chatbot runner
βββ flow_templates/
β βββ chatbot.yaml # Default flow template
βββ main.py # Entry point
βββ requirements.txt
- Clone the repo:
git clone https://github.com/itsyunus/P1-Prompt_Engg.git
cd P1-Prompt_Engg- (Optional) Create a virtual environment:
python -m venv venv
venv\Scripts\activate # On Windows- Install dependencies:
pip install -r requirements.txtpython -m PlayerOne.main init my_chatbotThis creates a folder my_chatbot/flow.yaml based on the default template.
python -m PlayerOne.main test my_chatbotType messages in the terminal. Type exit to quit.
To switch to a smarter open model like microsoft/phi-2, edit my_chatbot/flow.yaml:
flow:
name: simple_chat
model: microsoft/phi-2- Python 3.9 to 3.11
transformers,torch,typer,PyYAML
Install via:
pip install -r requirements.txtPull requests and suggestions are welcome! Make sure your code is clean and tested.
MIT License Β© 2025 Shaik Mohammad Yunus