import { logger } from "../../../logger/index.mjs";
import { generateText } from "ai";

//#region src/utils/AI/customQuery/index.ts
const aiDefaultOptions = { model: "gpt-4o-mini" };
/**
* CustomQuerys a content declaration file by constructing a prompt for AI models.
* The prompt includes details about the project's locales, file paths of content declarations,
* and requests for identifying issues or inconsistencies.
*/
const customQuery = async ({ messages, aiConfig }) => {
	const { text: newContent, usage } = await generateText({
		...aiConfig,
		messages
	});
	logger.info(`${usage?.totalTokens ?? 0} tokens used in the request`);
	return {
		fileContent: newContent,
		tokenUsed: usage?.totalTokens ?? 0
	};
};

//#endregion
export { aiDefaultOptions, customQuery };
//# sourceMappingURL=index.mjs.map