Skip to content

Commit

Permalink
Use Azure OpenAI in LLM RAG eval notebook (#10527)
Browse files Browse the repository at this point in the history
Signed-off-by: Prithvi Kannan <prithvi.kannan@databricks.com>
  • Loading branch information
prithvikannan committed Nov 28, 2023
1 parent f34364a commit ecbe0a2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/source/llms/llm-evaluate/notebooks/rag-evaluation.ipynb
Expand Up @@ -38,7 +38,7 @@
}
},
"source": [
"Set OpenAI Key"
"Set OpenAI (or Azure OpenAI) environment variables"
]
},
{
Expand All @@ -58,7 +58,13 @@
},
"outputs": [],
"source": [
"os.environ[\"OPENAI_API_KEY\"] = \"REDACTED\""
"os.environ[\"OPENAI_API_KEY\"] = \"REDACTED\"\n",
"\n",
"# If using Azure OpenAI\n",
"# os.environ[\"OPENAI_API_TYPE\"] = \"azure\"\n",
"# os.environ[\"OPENAI_API_VERSION\"] = \"2023-05-15\"\n",
"# os.environ[\"OPENAI_API_KEY\"] = \"https://<>.<>.<>.com\"\n",
"# os.environ[\"OPENAI_DEPLOYMENT_NAME\"] = \"deployment-name\""
]
},
{
Expand Down Expand Up @@ -214,6 +220,13 @@
" return answer"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {
Expand Down

0 comments on commit ecbe0a2

Please sign in to comment.