added priority flag to doc intel converter constructor

This commit is contained in:
Kenny Zhang 2025-02-11 16:50:36 -05:00
parent 3a5ca22a8d
commit 4ec5982223

View file

@ -1,4 +1,5 @@
from typing import Any, Union from typing import Any, Union
import re
# Azure imports # Azure imports
from azure.ai.documentintelligence import DocumentIntelligenceClient from azure.ai.documentintelligence import DocumentIntelligenceClient
@ -24,6 +25,7 @@ class DocumentIntelligenceConverter(DocumentConverter):
self, self,
endpoint: str, endpoint: str,
api_version: str = "2024-07-31-preview", api_version: str = "2024-07-31-preview",
priority: float = 0.0
): ):
self.endpoint = endpoint self.endpoint = endpoint
self.api_version = api_version self.api_version = api_version
@ -32,6 +34,7 @@ class DocumentIntelligenceConverter(DocumentConverter):
api_version=self.api_version, api_version=self.api_version,
credential=DefaultAzureCredential(), credential=DefaultAzureCredential(),
) )
self._priority = priority
def convert( def convert(
self, local_path: str, **kwargs: Any self, local_path: str, **kwargs: Any