This Python script utilizes OpenAI's GPT models to generate content in various file formats based on user input. The script provides a simple GUI where users can input their request, select the desired output format, and generate content accordingly.
- Supports a wide range of file formats including Python, XML, HTML, JSON, Markdown, CSV, YAML, JavaScript, Java, C++, and more.
- Provides a user-friendly interface for inputting requests and selecting output formats.
- Generates content using OpenAI's powerful GPT models.
- Saves the generated content to a file with the appropriate extension.
-
Clone the repository.
-
Navigate to the cloned directory.
-
Install the required dependencies: pip install openai tkinter
-
Run the script.
-
Enter your request in the input text box.
-
Select the desired output format from the dropdown menu.
-
Click on the "Generate" button.
-
The generated content will be displayed in the output box and saved to a file.
- Input Request: Users input their request in the text box provided.
- Select Output Format: Users select the desired output format from the dropdown menu.
- Generate Content: Upon clicking the "Generate" button, the script constructs a prompt specific to the chosen format and calls OpenAI's API to generate content.
- Save Content: The generated content is then saved to a file with the corresponding extension.
- Python (.py)
- XML (.xml)
- HTML (.html)
- JSON (.json)
- Markdown (.md)
- CSV (.csv)
- YAML (.yaml)
- JavaScript (.js)
- Java (.java)
- C++ (.cpp)
- C# (.cs)
- LaTeX (.tex)
- SQL (.sql)
- PHP (.php)
- INI (.ini)
- R (.r)
- Plain Text (.txt)
- Rich Text Format (.rtf)
- Ensure you have a valid OpenAI API key for accessing the GPT models.
- Handle your API key securely to prevent unauthorized access.
- For extensive customization or integration, the script can be modified as needed.
- This project is licensed under the MIT License.