|
1 | 1 | import copy |
2 | 2 | import json |
3 | | -import os |
4 | 3 | import logging |
| 4 | +import os |
5 | 5 | import uuid |
6 | | -import httpx |
7 | | -from quart import ( |
8 | | - Blueprint, |
9 | | - Quart, |
10 | | - jsonify, |
11 | | - make_response, |
12 | | - request, |
13 | | - send_from_directory, |
14 | | - render_template, |
15 | | -) |
16 | 6 |
|
17 | | -from openai import AsyncAzureOpenAI |
18 | | -from azure.search.documents import SearchClient |
| 7 | +import httpx |
19 | 8 | from azure.core.credentials import AzureKeyCredential |
20 | | -from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider |
| 9 | +from azure.identity.aio import (DefaultAzureCredential, |
| 10 | + get_bearer_token_provider) |
| 11 | +from azure.search.documents import SearchClient |
| 12 | +from openai import AsyncAzureOpenAI |
| 13 | +from quart import (Blueprint, Quart, jsonify, make_response, render_template, |
| 14 | + request, send_from_directory) |
| 15 | + |
21 | 16 | from backend.auth.auth_utils import get_authenticated_user_details |
22 | | -from backend.security.ms_defender_utils import get_msdefender_user_json |
23 | 17 | from backend.history.cosmosdbservice import CosmosConversationClient |
| 18 | +from backend.security.ms_defender_utils import get_msdefender_user_json |
24 | 19 | from backend.settings import ( |
25 | | - app_settings, |
26 | | - MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, |
27 | | -) |
28 | | -from backend.utils import ( |
29 | | - format_as_ndjson, |
30 | | - format_stream_response, |
31 | | - format_non_streaming_response, |
32 | | - ChatType, |
33 | | -) |
| 20 | + MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, app_settings) |
| 21 | +from backend.utils import (ChatType, format_as_ndjson, |
| 22 | + format_non_streaming_response, |
| 23 | + format_stream_response) |
34 | 24 |
|
35 | 25 | bp = Blueprint("routes", __name__, static_folder="static", template_folder="static") |
36 | 26 |
|
|
0 commit comments