Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion provider/upstage-documentparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _validate_credentials(self, credentials: dict[str, Any]) -> None:
api_key=api_key,
debug=True,
output_dir="test_output",
model="document-parse-250305",
model="document-parse-250618",
)
else:
raise ToolProviderCredentialValidationError(
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ pydantic-core==2.20.1
typing-extensions==4.12.2

# Plugin-specific
dify-plugin==0.0.1b73
dify-plugin==0.4.1

# Logging and formatting
pyyaml==6.0.2

# Optional utilities
httpx==0.27.2 # For async HTTP requests
httpx==0.28.1 # For async HTTP requests
anyio==4.8.0 # For async support
2 changes: 1 addition & 1 deletion tools/upstage-documentparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, *args, **kwargs):
self.output_dir = "temp_output"
# Upstage Document Parse Model
# https://console.upstage.ai/docs/capabilities/document-parse/asynchronous
self.model = "document-parse-250305"
self.model = "document-parse-250618"
# Debug mode
self.debug = False
# Set up cache directory
Expand Down
8 changes: 4 additions & 4 deletions tools/upstage_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class UpstageDocumentParseClient:
def __init__(
self,
api_key: Optional[str] = None,
base_url: str = "https://api.upstage.ai/v1/document-ai",
base_url: str = "https://api.upstage.ai/v1/document-digitization",
ocr: str = "auto",
coordinates: str = "false",
output_formats: Optional[List[str]] = None,
Expand All @@ -53,7 +53,7 @@ def __init__(

Args:
api_key (Optional[str]): API key for authentication. If not provided, will try to use UPSTAGE_API_KEY environment variable.
base_url (str): Base URL for the API. Defaults to "https://api.upstage.ai/v1/document-ai".
base_url (str): Base URL for the API. Defaults to "https://api.upstage.ai/v1/document-digitization".
ocr (str): OCR mode - "auto" or "force". In "auto" mode, OCR is applied only to image documents.
In "force" mode, all documents are converted to images before OCR. Defaults to "auto".
coordinates (str): Whether to return coordinates of bounding boxes. Defaults to "false".
Expand Down Expand Up @@ -216,7 +216,7 @@ def request(
)
return self.request_id

url = f"{self.base_url}/async/document-parse"
url = f"{self.base_url}/async"
self.logger.debug(f"API request URL: {url}")

with open(file_path, "rb") as f:
Expand Down Expand Up @@ -688,7 +688,7 @@ def process_document(
Returns:
Dict[str, str]: Dictionary mapping format names to exported file paths
"""
print(f"process_document: {file_path}")
self.logger.info(f"process_document: {file_path}")
cache_key = self._generate_cache_key(file_path, export_formats)
self.logger.info(f"cache_key: {cache_key}")
self.logger.info(f"self._cache: {self._cache}")
Expand Down