メインコンテンツまでスキップ

AI機能

GSMは大規模言語モデル(LLM)を活用して、採掘したセンテンスに対してコンテキストを考慮した翻訳や要約を提供できます。これらはAnkiカードへ自動的に追加されます。

セットアップ

AIの設定はすべてGSMの設定内の AI タブで行います。使用するサービスのAPIキーを入力してください。

AI設定タブ
GSM設定のAIプロバイダーとプロンプト設定

GoogleのGeminiは最近、無料枠の提供が大幅に縮小されました。しかし、gemma-3-27bのような一部のモデルはまだ無料枠で利用でき、翻訳に十分な品質を持っています。

  1. Google AI Studio にアクセスし、Googleアカウントでサインインします。
  2. APIキーを作成 をクリックし、生成されたキーをコピーします。
  3. このキーをGSMのAI設定の Gemini API Key フィールドに貼り付けます。

推奨事項: 現時点で無料枠として使う価値があるのは正直 gemma3-27b のみです。将来変更があれば、このドキュメントを更新します。

注記

Geminiの無料枠は地域によって利用可否が異なります。お住まいの地域がサポートされているかどうかは公式ドキュメントを確認してください。

プリセットプロンプト

GSMはAIを誘導するためのプリセットプロンプトを使用します。これらのプロンプトのコンテキストは、GSMが受信した直近10行のテキストから構築されます。

翻訳プロンプト

このプロンプトはプロフェッショナルレベルのゲームローカライズ向けに設計されており、元のトーンとコンテキストを保ちながら自然な翻訳を提供するようAIに指示します。

**Professional Game Localization Task**

**Task Directive:**
Translate ONLY the provided line of game dialogue specified below into natural-sounding, context-aware ENGLISH. The translation must preserve the original tone and intent of the source.

**Output Requirements:**
- Provide only the single, best ENGLISH translation.
- Use expletives if they are natural for the context and enhance the translation's impact, but do not over-exaggerate.
- Carryover all HTML tags present in the original text to HTML tags surrounding their corresponding translated words in the translation. Look for the equivalent word, not the equivalent location. DO NOT CONVERT TO MARKDOWN.
- If there are no HTML tags present in the original text, do not add any in the translation whatsoever.
- Do not include notes, alternatives, explanations, or any other surrounding text. Absolutely nothing but the translated line.

**Line to Translate:**
君の物語は、ここで終わりなのか?

コンテキスト要約プロンプト

このプロンプトは、対話コンテキストに基づいて現在のシーンの簡潔な要約を求めます。

**Task Directive:**
Provide a very brief summary of the scene in English based on the provided Japanese dialogue and context. Focus on the characters' actions and the immediate situation being described.

**Current Sentence:**
紫「あれ? 八代さんがすごい<b>形相</b>でこっちに……」

トラブルシューティング

  • OpenAI GPT-5モデルが失敗する:新しいOpenAIモデル(gpt-5-nanoなど)では max_tokens パラメーターが廃止され、代わりに max_completion_tokens が使用されます。GSMはこれに対応するよう更新されていますが、エラーが発生する場合は最新バージョンを使用しているか確認してください。
  • 翻訳が表示されない
    • GSMの設定でAI機能の Enabled チェックボックスがオンになっているか確認してください。
    • APIキーとURLが正しいか確認してください。
    • 使用しているAPIサービスのレート制限を超えていないか確認してください。