Skip to content

Instantly share code, notes, and snippets.

View cirolini's full-sized avatar

Rafael Cirolini cirolini

View GitHub Profile
@cirolini
cirolini / openai-cooking-assistant-with-tools.py
Created April 16, 2025 14:28
A simple, interactive example demonstrating how to integrate OpenAI's GPT model with function calling to create a cooking assistant that suggests recipes based on ingredients provided by the user.
import os
import json
from openai import OpenAI
# -------------------------------
# Conversation history (memory)
# -------------------------------
conversation = []
# -------------------------------