Fix setup sections

pull/1077/head
Christian Muertz 2 years ago
parent 31d6aa61d4
commit 0fba046b9b

@ -24,7 +24,7 @@
"metadata": {},
"source": [
"## Setup\n",
"For the following sections to work properly we first have to setup some things. Let's start with the `api_type`, `api_base` and `api_version`. To find your `api_base` go to https://portal.azure.com, find your resource and then under \"Resource Management\" -> \"Keys and Endpoints\" look for the \"Endpoint\" value."
"For the following sections to work properly we first have to setup some things. Let's start with the `api_base` and `api_version`. To find your `api_base` go to https://portal.azure.com, find your resource and then under \"Resource Management\" -> \"Keys and Endpoints\" look for the \"Endpoint\" value."
]
},
{
@ -33,9 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
"openai.api_type = 'azure'\n",
"openai.api_version = '2022-12-01'\n",
"\n",
"openai.api_base = '' # Please add your endpoint here"
]
},
@ -43,7 +41,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We next have to setup the `api_key`. We can either get the key from the portal or we can get it through Microsoft Active Directory Authentication."
"We next have to setup the `api_type` and `api_key`. We can either get the key from the portal or we can get it through Microsoft Active Directory Authentication. Depending on this the `api_type` is either `azure` or `azure_ad`."
]
},
{
@ -60,6 +58,7 @@
"metadata": {},
"outputs": [],
"source": [
"openai.api_type = 'azure'\n",
"openai.api_key = '' # Please add your api key here"
]
},
@ -83,6 +82,7 @@
"default_credential = DefaultAzureCredential()\n",
"token = default_credential.get_token(\"https://cognitiveservices.azure.com/.default\")\n",
"\n",
"openai.api_type = 'azure_ad'\n",
"openai.api_key = token.token\n",
"\"\"\""
]

@ -21,11 +21,12 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Setup\n",
"For the following sections to work properly we first have to setup some things. Let's start with the `api_type`, `api_base` and `api_version`. To find your `api_base` go to https://portal.azure.com, find your resource and then under \"Resource Management\" -> \"Keys and Endpoints\" look for the \"Endpoint\" value."
"For the following sections to work properly we first have to setup some things. Let's start with the `api_base` and `api_version`. To find your `api_base` go to https://portal.azure.com, find your resource and then under \"Resource Management\" -> \"Keys and Endpoints\" look for the \"Endpoint\" value."
]
},
{
@ -34,9 +35,7 @@
"metadata": {},
"outputs": [],
"source": [
"openai.api_type = 'azure'\n",
"openai.api_version = '2022-12-01'\n",
"\n",
"openai.api_base = '' # Please add your endpoint here"
]
},
@ -45,7 +44,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We next have to setup the `api_key`. We can either get the key from the portal or we can get it through Microsoft Active Directory Authentication."
"We next have to setup the `api_type` and `api_key`. We can either get the key from the portal or we can get it through Microsoft Active Directory Authentication. Depending on this the `api_type` is either `azure` or `azure_ad`."
]
},
{
@ -63,6 +62,7 @@
"metadata": {},
"outputs": [],
"source": [
"openai.api_type = 'azure'\n",
"openai.api_key = '' # Please add your api key here"
]
},
@ -87,6 +87,7 @@
"default_credential = DefaultAzureCredential()\n",
"token = default_credential.get_token(\"https://cognitiveservices.azure.com/.default\")\n",
"\n",
"openai.api_type = 'azure_ad'\n",
"openai.api_key = token.token\n",
"\"\"\""
]

@ -6,7 +6,7 @@
"source": [
"# Azure Fine tuning example\n",
"In this example we'll try to go over all operations that can be done using the Azure endpoints and their differences with the openAi endpoints (if any).<br>\n",
"This example focuses on finetuning but touches on the majority of operations that are also available using the API. This example is meant to be a quick way of showing simple operations and is not meant as a finetune model adaptation tutorial.\n"
"This example focuses on finetuning but also touches on the majority of operations that are available using the API. This example is meant to be a quick way of showing simple operations and is not meant as a finetune model adaptation tutorial.\n"
]
},
{
@ -24,7 +24,7 @@
"metadata": {},
"source": [
"## Setup\n",
"For the following sections to work properly we first have to setup some things. Let's start with the `api_type`, `api_base` and `api_version`. To find your `api_base` go to https://portal.azure.com, find your resource and then under \"Resource Management\" -> \"Keys and Endpoints\" look for the \"Endpoint\" value."
"For the following sections to work properly we first have to setup some things. Let's start with the `api_base` and `api_version`. To find your `api_base` go to https://portal.azure.com, find your resource and then under \"Resource Management\" -> \"Keys and Endpoints\" look for the \"Endpoint\" value."
]
},
{
@ -33,9 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
"openai.api_type = 'azure'\n",
"openai.api_version = '2022-12-01'\n",
"\n",
"openai.api_base = '' # Please add your endpoint here"
]
},
@ -43,7 +41,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We next have to setup the `api_key`. We can either get the key from the portal or we can get it through Microsoft Active Directory Authentication."
"We next have to setup the `api_type` and `api_key`. We can either get the key from the portal or we can get it through Microsoft Active Directory Authentication. Depending on this the `api_type` is either `azure` or `azure_ad`."
]
},
{
@ -60,6 +58,7 @@
"metadata": {},
"outputs": [],
"source": [
"openai.api_type = 'azure'\n",
"openai.api_key = '' # Please add your api key here"
]
},
@ -84,6 +83,7 @@
"default_credential = DefaultAzureCredential()\n",
"token = default_credential.get_token(\"https://cognitiveservices.azure.com/.default\")\n",
"\n",
"openai.api_type = 'azure_ad'\n",
"openai.api_key = token.token\n",
"\"\"\""
]

Loading…
Cancel
Save