A collection of practical examples demonstrating how to build applications with Generative AI using Large Language Models (LLMs), prompt engineering, and AI APIs.
This repository contains hands-on examples for learning and experimenting with Generative AI technologies, including:
- Prompt Engineering
- Chat Completion APIs
- AI-powered Python applications
- LLM integrations
- API authentication
- Best practices for working with AI models
The project is intended for developers who want to understand how to build applications powered by modern Generative AI models.
Generative-IA/
│
├── examples/ # Example applications
├── prompts/ # Prompt templates
├── data/ # Sample datasets (if applicable)
├── requirements.txt
├── README.md
└── *.py # Python source files
The exact structure may vary depending on the project.
- Python 3.10+
- pip
- API key for the AI provider used in the examples
Clone the repository:
git clone https://github.com/rubencruz/Generative-IA.git
cd Generative-IACreate a virtual environment:
python -m venv .venvActivate it:
.venv\Scripts\activatesource .venv/bin/activateInstall dependencies:
pip install -r requirements.txtCreate a .env file and configure your API credentials:
API_KEY=your_api_key_hereDepending on the provider used, you may need variables such as:
OPENAI_API_KEY=
GEMINI_API_KEY=
IBM_API_KEY=Run a Python example:
python example.pyor
python app.pyReplace the filename with the example you want to execute.
- Generative AI fundamentals
- Prompt Engineering
- Chat models
- AI APIs
- Python integration
- Error handling
- Environment variables
- Best practices
- Python
- Generative AI APIs
- Large Language Models (LLMs)
- REST APIs
- dotenv
After completing these examples, you'll understand how to:
- Connect to AI APIs
- Send prompts to LLMs
- Process model responses
- Build conversational applications
- Manage API keys securely
- Structure AI-powered Python projects
Contributions are welcome!
Feel free to:
- Open an Issue
- Submit a Pull Request
- Improve documentation
- Add new AI examples
This project is licensed under the MIT License.
Ruben Cruz
GitHub: https://github.com/rubencruz
⭐ If you find this repository useful, consider giving it a star.