Nick: small improvements

This commit is contained in:
Nicolas 2024-12-18 21:45:06 -03:00
parent e899ecbe44
commit a759a7ab7a
2 changed files with 2 additions and 3 deletions

View File

@ -263,7 +263,7 @@ export async function extractController(
{
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. Here are the urls the user provided of which he wants to extract information from: " +
"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,
schema: req.body.schema,

View File

@ -67,12 +67,11 @@ export async function generateCompletions(
export async function generateBasicCompletion(prompt: string) {
const openai = new OpenAI();
const model = process.env.MODEL_NAME ?? "gpt-4o-mini";
const model = "gpt-4o";
const completion = await openai.chat.completions.create({
model,
messages: [{ role: "user", content: prompt }],
});
return completion.choices[0].message.content;
}