sdk allowexternallinks

This commit is contained in:
rafaelmmiller 2024-11-14 15:56:12 -03:00
parent 3d6d650f0b
commit 41b45a844b
2 changed files with 7 additions and 1 deletions

View File

@ -242,6 +242,7 @@ export interface ExtractParams {
prompt: string;
schema?: zt.ZodSchema;
systemPrompt?: string;
allowExternalLinks?: boolean;
}
/**

View File

@ -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: