# Azure OpenAI Service - Chat on private data using LangChain## Firstly, create a file called `.env` in this folder, and add the following content, obviously with your values:"""
OPENAI_API_KEY=xxxxxx
OPENAI_API_BASE=https://xxxxxxx.openai.azure.com/
"""import os
import openai
from dotenv import load_dotenv
from langchain_community.document_loaders.directory import DirectoryLoader
from langchain_openai import AzureChatOpenAI
from langchain_openai import AzureOpenAIEmbeddings
# Load environment variables (set OPENAI_API_KEY and OPENAI_API_BASE in .env)
load_dotenv()# Configure Azure OpenAI Service API
openai.api_type ="azure"
openai.api_version = os.getenv('AZURE_API_VERSION')
openai.azure_endpoint = os.getenv('AZURE_OPENAI_API_KEY')
openai.api_key = os.getenv("AZURE_OPENAI_KEY")# Init LLM and embeddings model
llm