docs for azure (#4238)

parallel_dir_loader
Harrison Chase 1 year ago committed by GitHub
parent 747b5f87c2
commit 64940e9d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,21 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 3,
"id": "faacfa54",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"OPENAI_API_TYPE\"] = \"azure\"\n",
"os.environ[\"OPENAI_API_VERSION\"] = \"2022-12-01\"\n",
"os.environ[\"OPENAI_API_BASE\"] = \"...\"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"...\""
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "8fad2a6e", "id": "8fad2a6e",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -74,29 +88,32 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 5,
"id": "8c80213a", "id": "8c80213a",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"# Create an instance of Azure OpenAI\n", "# Create an instance of Azure OpenAI\n",
"# Replace the deployment name with your own\n", "# Replace the deployment name with your own\n",
"llm = AzureOpenAI(deployment_name=\"text-davinci-002-prod\", model_name=\"text-davinci-002\")" "llm = AzureOpenAI(\n",
" deployment_name=\"td2\",\n",
" model_name=\"text-davinci-002\", \n",
")"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 6,
"id": "592dc404", "id": "592dc404",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"'\\n\\nWhy did the chicken cross the road?\\n\\nTo get to the other side.'" "\"\\n\\nWhy couldn't the bicycle stand up by itself? Because it was...two tired!\""
] ]
}, },
"execution_count": 3, "execution_count": 6,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -158,7 +175,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.6" "version": "3.9.1"
}, },
"vscode": { "vscode": {
"interpreter": { "interpreter": {

Loading…
Cancel
Save