Skip to content

Commit

Permalink
Nick: extract prompt fixes and limit the number of urls
Browse files Browse the repository at this point in the history
  • Loading branch information
nickscamara committed Dec 1, 2024
1 parent 5ddb7eb commit 4bb46ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/controllers/v1/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export async function extractController(
logger.child({ method: "extractController/generateOpenAICompletions" }),
{
mode: "llm",
systemPrompt: "Always prioritize using the provided content to answer the question. Do not make up an answer. Be concise and follow the schema if provided.",
systemPrompt: "Always prioritize using the provided content to answer the question. Do not make up an answer. Be concise and follow the schema if provided. Here are the urls the user provided of which he wants to extract information from: " + links.join(", "),
prompt: req.body.prompt,
schema: req.body.schema,
},
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/controllers/v1/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const scrapeOptions = z.object({
export type ScrapeOptions = z.infer<typeof scrapeOptions>;

export const extractV1Options = z.object({
urls: url.array(),
urls: url.array().max(10, "Maximum of 10 URLs allowed per request while in beta."),
prompt: z.string().optional(),
schema: z.any().optional(),
limit: z.number().int().positive().finite().safe().optional(),
Expand Down

0 comments on commit 4bb46ed

Please sign in to comment.