import { type RequestHandler } from "@sveltejs/kit";
import { chat } from "$lib/helpers/chatgpt";


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". Only respond with 10 names seperated be newlines`;

  const res = await chat(prompt);

  return new Response(res);
}
