Nick: fixes to extract rephrase prompt

This commit is contained in:
Nicolas 2025-01-11 20:22:36 -03:00
parent a82160a630
commit 9a13c1dede
2 changed files with 2 additions and 1 deletions

View File

@ -70,6 +70,7 @@ export async function generateBasicCompletion(prompt: string) {
const model = "gpt-4o";
const completion = await openai.chat.completions.create({
temperature: 0,
model,
messages: [{ role: "user", content: prompt }],
});

View File

@ -52,7 +52,7 @@ export async function processUrl(
rephrasedPrompt =
(await generateBasicCompletion(
buildRefrasedPrompt(options.prompt, baseUrl),
)) ?? options.prompt;
))?.replace('"', '').replace("/", "") ?? options.prompt;
}
try {