A web application that uses DSPy and OpenAI to modify code based on natural language instructions.
- Web interface for code modification
- Powered by DSPy and OpenAI's GPT-3.5
- Real-time code modifications
- Error handling for API limits
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/dspy-code-modifier.git
cd dspy-code-modifier
- Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
- Install dependencies:
poetry install
- Create a
.env
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your-api-key-here
- Run the application:
poetry run python app.py
- Open your browser and navigate to
http://localhost:8080
- Enter your modification instructions in the top text area
- Paste your code in the middle text area
- Click "Modify Code" to get the modified version
- The modified code will appear in the bottom text area
- Python 3.12+
- Poetry for dependency management
- OpenAI API key
MIT License