mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 21:57:21 +08:00
Nick: fixes to extract rephrase prompt
This commit is contained in:
parent
a82160a630
commit
9a13c1dede
@ -70,6 +70,7 @@ export async function generateBasicCompletion(prompt: string) {
|
|||||||
const model = "gpt-4o";
|
const model = "gpt-4o";
|
||||||
|
|
||||||
const completion = await openai.chat.completions.create({
|
const completion = await openai.chat.completions.create({
|
||||||
|
temperature: 0,
|
||||||
model,
|
model,
|
||||||
messages: [{ role: "user", content: prompt }],
|
messages: [{ role: "user", content: prompt }],
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,7 @@ export async function processUrl(
|
|||||||
rephrasedPrompt =
|
rephrasedPrompt =
|
||||||
(await generateBasicCompletion(
|
(await generateBasicCompletion(
|
||||||
buildRefrasedPrompt(options.prompt, baseUrl),
|
buildRefrasedPrompt(options.prompt, baseUrl),
|
||||||
)) ?? options.prompt;
|
))?.replace('"', '').replace("/", "") ?? options.prompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user