mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
Update types.ts
This commit is contained in:
parent
f4a49bc1d1
commit
7c8ca0c889
|
@ -89,7 +89,12 @@ export const scrapeRequestSchema = scrapeOptions.extend({
|
|||
{
|
||||
message: "When 'extract' format is specified, 'extract' options must be provided, and vice versa",
|
||||
}
|
||||
);
|
||||
).transform((obj) => {
|
||||
if ((obj.formats?.includes("extract") || obj.extract) && !obj.timeout) {
|
||||
return { ...obj, timeout: 60000 };
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
|
||||
// export type ScrapeRequest = {
|
||||
// url: string;
|
||||
|
|
Loading…
Reference in New Issue
Block a user