Skip to content

Commit

Permalink
YML file updation
Browse files Browse the repository at this point in the history
  • Loading branch information
UtkarshMishra-Microsoft committed Dec 12, 2024
1 parent d74672a commit 465ffd5
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
echo "Fixing imports with Isort..."
python -m isort --check --verbose .
echo "Formatting code with Black..."
python -m black --check --verbose .
python -m black --check .
echo "Running Flake8..."
python -m flake8 --config=.flake8 --verbose .
echo "Running Pylint..."
Expand Down
27 changes: 19 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,32 @@

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 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.history.cosmosdbservice import CosmosConversationClient
from backend.security.ms_defender_utils import get_msdefender_user_json
from backend.settings import (
MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, app_settings)
from backend.utils import (ChatType, format_as_ndjson,
format_non_streaming_response,
format_stream_response)
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")

Expand Down
15 changes: 12 additions & 3 deletions backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
from abc import ABC, abstractmethod
from typing import List, Literal, Optional

from pydantic import (BaseModel, Field, PrivateAttr, ValidationError,
ValidationInfo, confloat, conint, conlist,
field_validator, model_validator)
from pydantic import (
BaseModel,
Field,
PrivateAttr,
ValidationError,
ValidationInfo,
confloat,
conint,
conlist,
field_validator,
model_validator,
)
from pydantic.alias_generators import to_snake
from pydantic_settings import BaseSettings, SettingsConfigDict
from quart import Request
Expand Down
10 changes: 6 additions & 4 deletions scripts/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
from azure.storage.blob import ContainerClient
from bs4 import BeautifulSoup
from dotenv import load_dotenv
from langchain.text_splitter import (MarkdownTextSplitter,
PythonCodeTextSplitter,
RecursiveCharacterTextSplitter,
TextSplitter)
from langchain.text_splitter import (
MarkdownTextSplitter,
PythonCodeTextSplitter,
RecursiveCharacterTextSplitter,
TextSplitter,
)
from openai import AzureOpenAI
from tqdm import tqdm

Expand Down
15 changes: 12 additions & 3 deletions scripts/prepdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
from azure.search.documents import SearchClient
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents.indexes.models import (
HnswParameters, PrioritizedFields, SearchableField, SearchField,
SearchFieldDataType, SearchIndex, SemanticConfiguration, SemanticField,
SemanticSettings, VectorSearch, VectorSearchAlgorithmConfiguration)
HnswParameters,
PrioritizedFields,
SearchableField,
SearchField,
SearchFieldDataType,
SearchIndex,
SemanticConfiguration,
SemanticField,
SemanticSettings,
VectorSearch,
VectorSearchAlgorithmConfiguration,
)
from data_utils import chunk_directory
from tqdm import tqdm

Expand Down

0 comments on commit 465ffd5

Please sign in to comment.