This commit is contained in:
2026-01-05 11:15:35 +08:00
parent f3b7f86413
commit 13e8789321
5 changed files with 627 additions and 338 deletions

View File

@@ -7,7 +7,15 @@ export const genIPA = async (text: string) => {
"[" +
(
await getLLMAnswer(
`${text}\n请生成以上文本的严式国际音标然后直接发给我不要附带任何说明不要擅自增减符号。`,
`
<text>${text}</text>
请生成以上文本的严式国际音标
然后直接发给我
不要附带任何说明
不要擅自增减符号
不许用"/"或者"[]"包裹
`.trim(),
)
)
.replaceAll("[", "")
@@ -18,12 +26,27 @@ export const genIPA = async (text: string) => {
export const genLocale = async (text: string) => {
return await getLLMAnswer(
`${text}\n推断以上文本的地区locale然后直接发给我形如如zh-CN不要附带任何说明不要擅自增减符号。`,
`
<text>${text}</text>
推断以上文本的地区locale
然后直接发给我
形如如zh-CN
不要附带任何说明
不要擅自增减符号
`.trim(),
);
};
export const genTranslation = async (text: string, targetLanguage: string) => {
return await getLLMAnswer(
`${text}\n请将以上文本翻译到${targetLanguage},然后直接发给我,不要附带任何说明,不要擅自增减符号。`,
`
<text>${text}</text>
请将以上文本翻译到 <target_language>${targetLanguage}</target_language>
然后直接发给我
不要附带任何说明
不要擅自增减符号
`.trim(),
);
};