From 4d2259862056d3bd649f139f7e9ec7abd13b762f Mon Sep 17 00:00:00 2001 From: UtkarshMishra-Microsoft Date: Tue, 3 Dec 2024 21:11:25 +0530 Subject: [PATCH] fic formatting and import order for app.py --- app.py | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/app.py b/app.py index e8684079..a415b273 100644 --- a/app.py +++ b/app.py @@ -1,36 +1,26 @@ import copy import json -import os import logging +import os import uuid -import httpx -from quart import ( - Blueprint, - Quart, - jsonify, - make_response, - request, - send_from_directory, - render_template, -) -from openai import AsyncAzureOpenAI -from azure.search.documents import SearchClient +import httpx from azure.core.credentials import AzureKeyCredential -from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider +from azure.identity.aio import (DefaultAzureCredential, + get_bearer_token_provider) +from azure.search.documents import SearchClient +from openai import AsyncAzureOpenAI +from quart import (Blueprint, Quart, jsonify, make_response, render_template, + request, send_from_directory) + from backend.auth.auth_utils import get_authenticated_user_details -from backend.security.ms_defender_utils import get_msdefender_user_json from backend.history.cosmosdbservice import CosmosConversationClient +from backend.security.ms_defender_utils import get_msdefender_user_json from backend.settings import ( - app_settings, - MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, -) -from backend.utils import ( - format_as_ndjson, - format_stream_response, - format_non_streaming_response, - ChatType, -) + MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, app_settings) +from backend.utils import (ChatType, format_as_ndjson, + format_non_streaming_response, + format_stream_response) bp = Blueprint("routes", __name__, static_folder="static", template_folder="static")