Automated end to end fine tuning of OpenAI models with Google Dr
1. How it Works This n8n workflow automates fine-tuning OpenAI models through these key steps: - Manual Trigger: - Starts with the "When clicking ‘Test workf...
🔌 Nodes & Integrations Used (6)
📖 Implementation & Setup Guide
**1. How it Works** This n8n workflow automates **fine-tuning OpenAI models** through these key steps: - **Manual Trigger**: - Starts with the *"When clicking ‘Test workflow’"* event to initiate the process. - Downloads a `.jsonl` file from Google Drive - **Upload to OpenAI**: - Uploads the `.jsonl` file to OpenAI via the *"Upload File"* node (with purpose `"fine-tune"`). - **Create Fine-tuning Job**: - Sends a **POST** request to the endpoint `https://api.openai.com/v1/fine_tuning/jobs` with: ```json { "training_file": "{{ $json.id }}", "model": "gpt-4o-mini-2024-07-18" } ``` - OpenAI automatically starts training the model based on the provided file. - **Interaction with the Trained Model**: - An *"AI Agent"* uses the custom model (e.g., `ft:gpt-4o-mini-2024-07-18:n3w-italia::XXXX7B`) to respond to chat messages.
---
**2. Set up Steps** **To configure the workflow:** 1. **Prepare the Training File**: - Create a `.jsonl` file following the specified syntax (e.g., travel assistant Q/A examples). - Upload it to Google Drive and update the ID in the *"Google Drive"* node.
2. **Configure Credentials**: - **Google Drive**: Connect an account via OAuth2 (`googleDriveOAuth2Api`). - **OpenAI**: Add your API key in the *"OpenAI Chat Model"* and *"Upload File"* nodes.
3. **Customize the Model**: - In the *"OpenAI Chat Model"* node, specify the name of your fine-tuned model (e.g., `ft:gpt-4o-mini-...`). - Update the HTTP request body (`Create Fine-tuning Job`) if needed (e.g., a different base model).
4. **Start the Workflow**: - Use the manual trigger (*"Test workflow"*) to begin the upload and training process. - Test the model via the *"Chat Trigger"* (chat messages).
5. **Integrated Documentation**: - Follow the instructions in the **Sticky Notes** to: - Properly format the `.jsonl` (Step 1). - Monitor progress on OpenAI (Step 2, link: `https://platform.openai.com/finetune/`).
---
**Note**: Ensure the `.jsonl` file adheres to OpenAI’s required structure and that credentials are valid.
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Automated_end_to_end_fine_tuning_of_OpenAI_models_with_Google_Dr.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related AI Agents Workflows
View All in AI Agents →5 ways to process images PDFs with Gemini AI in n8n
How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workfl...
7 AI Sales Assistant
Production-ready n8n automation template for 7 AI Sales Assistant built by AhiXLight. Seamlessly connects Airtop Tool, Slack, Airtop with 24 configured nodes.
AAVE portfolio professional AI agent Telegram Email GPT 4o
A next-generation AI-powered DeFi health monitor that tracks wallet positions across Aave V3 using GPT-4o and LangChain. It delivers human-readable reports v...
Access control for AI agents RBAC using Airtable and Telegram
Purpose This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control....