mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
sdk allowexternallinks
This commit is contained in:
parent
3d6d650f0b
commit
41b45a844b
|
@ -242,6 +242,7 @@ export interface ExtractParams {
|
|||
prompt: string;
|
||||
schema?: zt.ZodSchema;
|
||||
systemPrompt?: string;
|
||||
allowExternalLinks?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,6 +29,7 @@ class FirecrawlApp:
|
|||
prompt: str
|
||||
schema: Optional[Any] = None
|
||||
system_prompt: Optional[str] = None
|
||||
allow_external_links: Optional[bool] = False
|
||||
|
||||
class ExtractResponse(pydantic.BaseModel):
|
||||
"""
|
||||
|
@ -484,7 +485,11 @@ class FirecrawlApp:
|
|||
try:
|
||||
response = self._post_request(
|
||||
f'{self.api_url}/v1/extract',
|
||||
{**jsonData, 'schema': jsonSchema},
|
||||
{
|
||||
**jsonData,
|
||||
'allowExternalLinks': params.get('allow_external_links', False),
|
||||
'schema': jsonSchema
|
||||
},
|
||||
headers
|
||||
)
|
||||
if response.status_code == 200:
|
||||
|
|
Loading…
Reference in New Issue
Block a user