Skip to content

Commit a3d84c0

Browse files
committed
Update code
1 parent aa0cdfd commit a3d84c0

File tree

12 files changed

+6
-43
lines changed

12 files changed

+6
-43
lines changed

image_processing/.env.example

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
FunctionApp__ClientId=<clientId of the function app if using user assigned managed identity>
2-
IdentityType=<identityType> # system_assigned or user_assigned or key
3-
OpenAI__ApiKey=<openAIKey if using non managed identity>
41
OpenAI__Endpoint=<openAIEndpoint>
5-
OpenAI__MultiModalDeployment=<openAIEmbeddingDeploymentId>
2+
OpenAI__CompletionDeployment=<openAIEmbeddingDeploymentId>
63
OpenAI__ApiVersion=<openAIApiVersion>
74
AIService__DocumentIntelligence__Endpoint=<documentIntelligenceEndpoint>
8-
AIService__DocumentIntelligence__Key=<documentIntelligenceKey if not using identity>
9-
AIService__Language__Endpoint=<languageEndpoint>
10-
AIService__Language__Key=<languageKey if not using identity>
11-
StorageAccount__Endpoint=<Endpoint if using identity based connections>
12-
StorageAccount__ConnectionString=<connectionString if using non managed identity>
5+
StorageAccount__Name=<Name of storage account if using identity based connections>

image_processing/environment.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

image_processing/.funcignore renamed to image_processing/src/image_processing/.funcignore

File renamed without changes.

image_processing/figure_analysis.py renamed to image_processing/src/image_processing/figure_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ async def understand_image_with_gptv(self, figure: FigureHolder) -> dict:
3535
"""
3636

3737
MAX_TOKENS = 2000
38-
api_version = os.environ["AZURE_OPENAI_API_VERSION"]
39-
model = os.environ["OPENAI_MAIN_DEPLOYMENT_NAME"]
38+
api_version = os.environ["OpenAI__ApiVersion"]
39+
model = os.environ["OpenAI__CompletionDeployment"]
4040

4141
token_provider = get_bearer_token_provider(
4242
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"

image_processing/function_app.py renamed to image_processing/src/image_processing/function_app.py

File renamed without changes.

image_processing/host.json renamed to image_processing/src/image_processing/host.json

File renamed without changes.

image_processing/layout_analysis.py renamed to image_processing/src/image_processing/layout_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class StorageAccountHelper:
3434
@property
3535
def account_url(self) -> str:
3636
"""Get the account URL of the Azure Blob Storage."""
37-
storage_account_name = os.environ.get("DATA_STORAGE_ACCOUNT_NAME")
37+
storage_account_name = os.environ.get("StorageAccount__Name")
3838
return f"https://{storage_account_name}.blob.core.windows.net"
3939

4040
async def get_client(self):
@@ -345,7 +345,7 @@ async def get_document_intelligence_client(self) -> DocumentIntelligenceClient:
345345
credential = DefaultAzureCredential()
346346

347347
return DocumentIntelligenceClient(
348-
endpoint=os.environ["COGNITIVE_SERVICES_ENDPOINT"],
348+
endpoint=os.environ["AIService__DocumentIntelligence__Endpoint"],
349349
credential=credential,
350350
)
351351

image_processing/layout_and_figure_merger.py renamed to image_processing/src/image_processing/layout_and_figure_merger.py

File renamed without changes.

image_processing/layout_holders.py renamed to image_processing/src/image_processing/layout_holders.py

File renamed without changes.

image_processing/local.settings.json renamed to image_processing/src/image_processing/local.settings.json

File renamed without changes.

0 commit comments

Comments
 (0)