{ "cells": [ { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "#! pip install openai" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "from dotenv import load_dotenv\n", "from openai import OpenAI\n", "import os" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# PreparaciĆ³n para Fine-Tuning" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "load_dotenv()\n", "API_KEY = os.getenv('OPENAI_KEY')" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "client = OpenAI()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Subimos nuestro primer file de entrenamiento" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#upload_file_1 = client.files.create(\n", " file=open(\"Training_Data/Training_Prompts_1.jsonl\", \"rb\"),\n", " purpose=\"fine-tune\"\n", ")" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 2 }