Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookbook#16 #76

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 24 additions & 25 deletions Solar-Fullstack-LLM-101/16_auto_filling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/UpstageAI/cookbook/blob/main/Solar-Fullstack-LLM-101/16_Reasoning.ipynb\">\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/UpstageAI/cookbook/blob/main/Solar-Fullstack-LLM-101/16_auto_filling.ipynb\">\n",
"<img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>"
]
Expand Down Expand Up @@ -49,30 +49,29 @@
"metadata": {},
"outputs": [],
"source": [
"# @title set API key\n",
"import os\n",
"import getpass\n",
"\n",
"from pprint import pprint\n",
"\n",
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"if \"google.colab\" in str(get_ipython()):\n",
" # Running in Google Colab. Please set the UPSTAGE_API_KEY in the Colab Secrets\n",
" from google.colab import userdata\n",
"\n",
" os.environ[\"UPSTAGE_API_KEY\"] = userdata.get(\"UPSTAGE_API_KEY\")\n",
"else:\n",
" # Running locally. Please set the UPSTAGE_API_KEY in the .env file\n",
" from dotenv import load_dotenv\n",
"\n",
" load_dotenv()\n",
"\n",
"if \"UPSTAGE_API_KEY\" not in os.environ:\n",
" os.environ[\"UPSTAGE_API_KEY\"] = getpass.getpass(\"Enter your Upstage API key: \")"
]
"# @title set API key\n",
"from pprint import pprint\n",
"import os\n",
"\n",
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"if \"google.colab\" in str(get_ipython()):\n",
" # Running in Google Colab. Please set the UPSTAGE_API_KEY in the Colab Secrets\n",
" from google.colab import userdata\n",
"\n",
" os.environ[\"UPSTAGE_API_KEY\"] = userdata.get(\"UPSTAGE_API_KEY\")\n",
"else:\n",
" # Running locally. Please set the UPSTAGE_API_KEY in the .env file\n",
" from dotenv import load_dotenv\n",
"\n",
" load_dotenv()\n",
"\n",
"assert (\n",
" \"UPSTAGE_API_KEY\" in os.environ\n",
"), \"Please set the UPSTAGE_API_KEY environment variable\""
]
},
{
"cell_type": "code",
Expand Down