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