import { json, type RequestHandler } from "@sveltejs/kit"; import { chat } from "$lib/helpers/openai"; export const GET: RequestHandler = async function ({ params }) { const inputName = params.name const prompt = `Generate 10 variants of the name ${inputName}. The names should sound very much like the original but also like noble names from the 1900 century. Examples could be "lady rosalind of whitmore" "lord byron of castlemore" "Lord Max Richter". Choose english, german, french and italian sounding names. Only respond with 10 names seperated be newlines`; const res = await chat(prompt, { isList: true, temperature: 1 }); return json(res); }