in chat_stream.py [0:0]
def get_rest_api_config():
"""
Load environment variables from a `.env` file.
Exits the program if required environment variables are missing.
Returns:
tuple: Contains uri (str), x_functions_key (str)
"""
load_dotenv()
uri = os.getenv("STREAMING_ENDPOINT", "http://localhost:7071/api/orcstream")
x_functions_key = os.getenv('FUNCTION_KEY')
if not x_functions_key:
print("FUNCTION_KEY not found in environment variables.")
sys.exit(1)
return uri, x_functions_key