Merge pull request #954 from mendableai/rafa/fix-schema-base-model-extract
Fixes schema base model extract
This commit is contained in:
@@ -59,7 +59,7 @@ class ArticleSchema(BaseModel):
|
|||||||
commentsURL: str
|
commentsURL: str
|
||||||
|
|
||||||
class TopArticlesSchema(BaseModel):
|
class TopArticlesSchema(BaseModel):
|
||||||
top: List[ArticleSchema] = Field(..., max_items=5, description="Top 5 stories")
|
top: List[ArticleSchema] = Field(..., description="Top 5 stories")
|
||||||
|
|
||||||
llm_extraction_result = app.scrape_url('https://news.ycombinator.com', {
|
llm_extraction_result = app.scrape_url('https://news.ycombinator.com', {
|
||||||
'formats': ['extract'],
|
'formats': ['extract'],
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import os
|
|||||||
|
|
||||||
from .firecrawl import FirecrawlApp # noqa
|
from .firecrawl import FirecrawlApp # noqa
|
||||||
|
|
||||||
__version__ = "1.6.3"
|
__version__ = "1.6.4"
|
||||||
|
|
||||||
# Define the logger for the Firecrawl project
|
# Define the logger for the Firecrawl project
|
||||||
logger: logging.Logger = logging.getLogger("firecrawl")
|
logger: logging.Logger = logging.getLogger("firecrawl")
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class FirecrawlApp:
|
|||||||
Parameters for the extract operation.
|
Parameters for the extract operation.
|
||||||
"""
|
"""
|
||||||
prompt: str
|
prompt: str
|
||||||
schema: Optional[Any] = None
|
schema_: Optional[Any] = pydantic.Field(None, alias='schema')
|
||||||
system_prompt: Optional[str] = None
|
system_prompt: Optional[str] = None
|
||||||
allow_external_links: Optional[bool] = False
|
allow_external_links: Optional[bool] = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user