Nick: introduced system prompt to /extract

This commit is contained in:
Nicolas 2024-12-18 22:10:41 -03:00
parent 75984b4582
commit 2d37dca9dc
4 changed files with 4 additions and 1 deletions

View File

@ -263,6 +263,7 @@ export async function extractController(
{
mode: "llm",
systemPrompt:
(req.body.systemPrompt ? `${req.body.systemPrompt}\n` : "") +
"Always prioritize using the provided content to answer the question. Do not make up an answer. Be concise and follow the schema always if provided. Here are the urls the user provided of which he wants to extract information from: " +
links.join(", "),
prompt: req.body.prompt,

View File

@ -194,6 +194,7 @@ export const extractV1Options = z
.array()
.max(10, "Maximum of 10 URLs allowed per request while in beta."),
prompt: z.string().optional(),
systemPrompt: z.string().optional(),
schema: z.any().optional(),
limit: z.number().int().positive().finite().safe().optional(),
ignoreSitemap: z.boolean().default(false),

View File

@ -1,6 +1,6 @@
{
"name": "@mendable/firecrawl-js",
"version": "1.9.4",
"version": "1.9.5",
"description": "JavaScript SDK for Firecrawl API",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -247,6 +247,7 @@ export interface ExtractParams<LLMSchema extends zt.ZodSchema = any> {
schema?: LLMSchema;
systemPrompt?: string;
allowExternalLinks?: boolean;
includeSubdomains?: boolean;
}
/**