Skip to content

A project to design, test, and optimize prompts for AI models to improve output quality and relevance.

Notifications You must be signed in to change notification settings

itsyunus/P1-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 PlayerOne

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.


πŸš€ Features

  • 🧱 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

πŸ“ Directory Structure

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

πŸ”§ Installation

  1. Clone the repo:
git clone https://github.com/itsyunus/P1-Prompt_Engg.git
cd P1-Prompt_Engg
  1. (Optional) Create a virtual environment:
python -m venv venv
venv\Scripts\activate  # On Windows
  1. Install dependencies:
pip install -r requirements.txt

⚑ Quick Start

1. Initialize a chatbot flow

python -m PlayerOne.main init my_chatbot

This creates a folder my_chatbot/flow.yaml based on the default template.

2. Run the chatbot interactively

python -m PlayerOne.main test my_chatbot

Type messages in the terminal. Type exit to quit.


🧠 Use a Better Model

To switch to a smarter open model like microsoft/phi-2, edit my_chatbot/flow.yaml:

flow:
  name: simple_chat
  model: microsoft/phi-2

πŸ›  Requirements

  • Python 3.9 to 3.11
  • transformers, torch, typer, PyYAML

Install via:

pip install -r requirements.txt

🀝 Contributing

Pull requests and suggestions are welcome! Make sure your code is clean and tested.


πŸ“„ License

MIT License Β© 2025 Shaik Mohammad Yunus

About

A project to design, test, and optimize prompts for AI models to improve output quality and relevance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages