mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-04 02:50:40 +08:00
Update version to 2.4.0 and enhance ExtractResponse model with additional fields for id, status, and expiresAt. (#1501)
This commit is contained in:
parent
f7a9a14410
commit
e3e730f2c1
@ -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")
|
||||
|
@ -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:
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user