更新至 v0.6.0_20251125 版本
This commit is contained in:
@@ -396,7 +396,7 @@ class GeminiService {
|
||||
const targetLangName = LANGUAGE_MAP[language];
|
||||
const prompt = `Create a complete Japanese reading lesson on "${topic}", level ${difficulty}.
|
||||
The 'japaneseContent' MUST be a complete article or story (at least 300 characters).
|
||||
Output JSON with title, japaneseContent, translation (${targetLangName}), vocabulary, and grammarPoints (list of key grammar used in the text with explanations).`;
|
||||
Output JSON with title, japaneseContent, translation (in ${targetLangName}), vocabulary (meanings in ${targetLangName}), and grammarPoints (explanations in ${targetLangName}).`;
|
||||
|
||||
return this.retryOperation(async () => {
|
||||
const response = await ai.models.generateContent({
|
||||
@@ -430,9 +430,9 @@ class GeminiService {
|
||||
- title
|
||||
- script (The full Japanese text of the conversation/monologue)
|
||||
- translation (The full text in ${targetLangName})
|
||||
- vocabulary (Key words)
|
||||
- vocabulary (Key words with meanings in ${targetLangName})
|
||||
- questions (3 multiple choice comprehension questions in ${targetLangName})
|
||||
- Each question needs: question, options (array of 3 strings), correctIndex (0-2), explanation.
|
||||
- Each question needs: question, options (array of 3 strings), correctIndex (0-2), explanation (in ${targetLangName}).
|
||||
`;
|
||||
|
||||
return this.retryOperation(async () => {
|
||||
@@ -530,7 +530,7 @@ class GeminiService {
|
||||
const ai = this.getAi();
|
||||
const cleanBase64 = base64.replace(/^data:image\/(png|jpeg|jpg|webp|heic|heif);base64,/i, "");
|
||||
const targetLang = LANGUAGE_MAP[language];
|
||||
const prompt = `OCR and analyze text. Explain in ${targetLang}. JSON: extractedText, detectedLanguage, summary, vocabulary, grammarPoints.`;
|
||||
const prompt = `OCR and analyze text. Explain in ${targetLang}. JSON: extractedText, detectedLanguage, summary (in ${targetLang}), vocabulary (meanings in ${targetLang}), grammarPoints (explanations in ${targetLang}).`;
|
||||
|
||||
return this.retryOperation(async () => {
|
||||
const res = await ai.models.generateContent({
|
||||
|
||||
Reference in New Issue
Block a user