Update version to 2.4.0 and enhance ExtractResponse model with additional fields for id, status, and expiresAt. (#1501)

This commit is contained in:
Rafael Miller 2025-04-25 20:19:08 -07:00 committed by GitHub
parent f7a9a14410
commit e3e730f2c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 9 deletions

View File

@ -13,7 +13,7 @@ import os
from .firecrawl import FirecrawlApp, JsonConfig, ScrapeOptions # noqa
__version__ = "2.3.0"
__version__ = "2.4.0"
# Define the logger for the Firecrawl project
logger: logging.Logger = logging.getLogger("firecrawl")

View File

@ -304,6 +304,9 @@ class ExtractParams(pydantic.BaseModel):
class ExtractResponse(pydantic.BaseModel, Generic[T]):
"""Response from extract operations."""
id: Optional[str] = None
status: Optional[Literal["processing", "completed", "failed"]] = None
expiresAt: Optional[datetime] = None
success: bool = True
data: Optional[T] = None
error: Optional[str] = None
@ -412,14 +415,6 @@ class ExtractParams(pydantic.BaseModel):
show_sources: Optional[bool] = False
agent: Optional[Dict[str, Any]] = None
class ExtractResponse(pydantic.BaseModel, Generic[T]):
"""
Response from the extract operation.
"""
success: bool
data: Optional[T] = None
error: Optional[str] = None
class FirecrawlApp:
def __init__(self, api_key: Optional[str] = None, api_url: Optional[str] = None) -> None:
"""