auto_dict.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {
  2. "console.log('Final LLM model used (default):', llmModel ? llmModel.name : '无');": "console.log('Final LLM model used (default):', llmModel ? llmModel.name : '无');",
  3. "`data: ${JSON.stringify({ type: 'error', data: '请在模型管理中添加LLM模型并配置API密钥' })}\\n\\n`,": "`data: ${JSON.stringify({ type: 'error', data: 'Please add LLM model and configure API key in model management' })}\\n\\n`,",
  4. "`data: ${JSON.stringify({ type: 'error', data: error.message || '服务器错误' })}\\n\\n`,": "`data: ${JSON.stringify({ type: 'error', data: error.message || 'Server Error' })}\\n\\n`,",
  5. "`data: ${JSON.stringify({ type: 'error', data: '未找到LLM模型配置' })}\\n\\n`,": "`data: ${JSON.stringify({ type: 'error', data: 'LLM model configuration not found' })}\\n\\n`,",
  6. "console.log('ユーザーID:', userId);": "console.log('User ID:', userId);",
  7. "console.log('API Key プレフィックス:', modelConfig.apiKey?.substring(0, 10) + '...');": "console.log('API Key prefix:', modelConfig.apiKey?.substring(0, 10) + '...');",
  8. "提供されたテキスト内容を、ユーザーの指示に基づいて修正または改善してください。": "Correct or improve the provided text content based on your instructions.",
  9. "挨拶や結びの言葉(「わかりました、こちらが...」など)は含めず、修正後の内容のみを直接出力してください。": "Please do not include any greetings or closing words (such as \"Okay, this is...\") and directly output only the revised content.",
  10. "コンテキスト(現在の内容):": "Context (current contents):",
  11. "ユーザーの指示:": "User instructions:",
  12. "1. **段落与结构**:": "1. **Paragraph and Structure**:",
  13. "- 使用清晰的段落分隔,每个要点之间空一行": "- Use clear paragraph separation with a blank line between each bullet point",
  14. "- 使用标题(## 或 ###)组织长回答": "- Use headings (## or ###) to organize long answers",
  15. "2. **文本格式**:": "2. **Text Format**:",
  16. "- 使用 **粗体** 强调重要概念和关键词": "- Use **bold** to emphasize important concepts and keywords",
  17. "- 使用列表(- 或 1.)组织多个要点": "- Use lists (- or 1.) to organize multiple points",
  18. "- 使用 \\`代码\\` 标记技术术语、命令、文件名": "- Use \\`code\\` to mark technical terms, commands, file names",
  19. "3. **代码展示**:": "3. **Code display**:",
  20. "- 使用代码块展示代码,并指定语言:": "- Use code blocks to display code and specify the language:",
  21. "return \"示例\"": "return \"example\"",
  22. "- 支持语言:python, javascript, typescript, java, bash, sql 等": "- Supported languages: python, javascript, typescript, java, bash, sql, etc.",
  23. "4. **图表与可视化**:": "4. **Charts and Visualization**:",
  24. "- 使用 Mermaid 语法绘制流程图、序列图等:": "- Use Mermaid syntax to draw flowcharts, sequence diagrams, etc.:",
  25. "A[开始] --> B[处理]": "A[Start] --> B[Process]",
  26. "B --> C[结束]": "B --> C[end]",
  27. "- 适用场景:流程、架构、状态机、时序图": "- Applicable scenarios: process, architecture, state machine, sequence diagram",
  28. "5. **其他要求**:": "5. **Other requirements**:",
  29. "- 回答精炼准确": "- Answer concisely and accurately",
  30. "- 多步骤操作使用有序列表": "- Use ordered lists for multi-step operations",
  31. "- 对比类信息建议用表格展示(如果适用)": "- It is recommended to display comparative information in tables (if applicable)",
  32. "ナレッジベースの内容:": "Knowledge base contents:",
  33. "会話履歴:": "Conversation history:",
  34. "ユーザーの質問:{question}": "User question: {question}",
  35. "1. **段落と構造**:": "1. **Paragraphs and Structure**:",
  36. "- 明確な段落分けを使用し、要点間に空行を入れる": "- Use clear paragraphing and leave blank lines between main points",
  37. "- 長い回答には見出し(## または ###)を使用": "- Use headings (## or ###) for long answers",
  38. "2. **テキスト書式**:": "2. **Text Format**:",
  39. "- 重要な概念やキーワードを強調するために **太字** を使用": "- Use **bold** to highlight important concepts and keywords",
  40. "- 複数のポイントを整理するためにリスト(- または 1.)を使用": "- Use lists (- or 1.) to organize multiple points",
  41. "- 技術用語、コマンド、ファイル名をマークするために \\`コード\\` を使用": "- Use \\`code\\` to mark technical terms, commands, and file names",
  42. "3. **コード表示**:": "3. **Code display**:",
  43. "- 言語を指定してコードブロックを使用:": "- Use code blocks by specifying language:",
  44. "return \"例\"": "return \"Example\"",
  45. "- 対応言語:python, javascript, typescript, java, bash, sql など": "- Supported languages: python, javascript, typescript, java, bash, sql, etc.",
  46. "4. **図表とチャート**:": "4. **Diagrams and Charts**:",
  47. "- フローチャート、シーケンス図などに Mermaid 構文を使用:": "- Use Mermaid syntax for flowcharts, sequence diagrams, etc:",
  48. "A[開始] --> B[処理]": "A[Start] --> B[Process]",
  49. "B --> C[終了]": "B --> C[End]",
  50. "- 使用例:プロセスフロー、アーキテクチャ図、状態図、シーケンス図": "- Usage examples: process flow, architecture diagram, state diagram, sequence diagram",
  51. "5. **その他の要件**:": "5. **Other Requirements**:",
  52. "- 簡潔で明確な回答を心がける": "- Keep your answers concise and clear",
  53. "- 複数のステップがある場合は番号付きリストを使用": "- Use numbered lists when there are multiple steps",
  54. "- 比較情報には表を使用(該当する場合)": "- Use tables for comparative information (if applicable)",
  55. "インテリジェントアシスタントとして、ユーザーの質問に答えてください。": "Become an intelligent assistant and answer users' questions.",
  56. "只返回标题文本。不要包含任何解释性文字或前导词(如“标题是:”)。": "Only the title text is returned. Do not include any explanatory text or leading words (such as \"The title is:\").",
  57. "语言:Chinese": "Language: Chinese",
  58. "文本内容:": "Text content:",
  59. "タイトルテキストのみを返してください。説明文や前置き(例:「タイトルは:」)は含めないでください。": "Please return only the title text. Do not include descriptive text or prefaces (e.g. \"The title is:\").",
  60. "言語:Japanese": "Language: Japanese",
  61. "テキスト:": "text:",
  62. "return `根据以下对话片段,生成一个简短、描述性的标题(不超过50个字符),总结讨论的主题。": "return `Based on the following conversation snippet, generate a short, descriptive title (no more than 50 characters) summarizing the topic of the discussion.",
  63. "只返回标题文本。不要包含任何前导词。": "Only the title text is returned. Do not include any leading words.",
  64. "用户: ${userMessage}": "User: ${userMessage}",
  65. "助手: ${aiResponse}`;": "Helper: ${aiResponse}`;",
  66. "return `以下の会話スニペットに基づいて、トピックを要約する短く説明的なタイトル(最大50文字)を生成してください。": "return `Generate a short, descriptive title (up to 50 characters) that summarizes the topic based on the conversation snippet below.",
  67. "タイトルのみを返してください。前置きは不要です。": "Please return only the title. No preface necessary.",
  68. "ユーザー: ${userMessage}": "User: ${userMessage}",
  69. "アシスタント: ${aiResponse}`;": "Assistant: ${aiResponse}`;",
  70. "const providerName = modelConfig.providerName || '不明';": "const providerName = modelConfig.providerName || '不明';",
  71. "` - プロバイダー: ${providerName}\\n` +": "` - Provider: ${providerName}\\n` +",
  72. "` - Token制限: ${maxInputTokens}\\n` +": "` - Token limit: ${maxInputTokens}\\n` +",
  73. "` - ベクトルモデルか: ${isVectorModel}`,": "` - Vector model: ${isVectorModel}`,",
  74. "`Chunk size: ${chunkSize} tokens (制限: ${limits.maxInputTokens})`,": "`Chunk size: ${chunkSize} tokens (制限: ${limits.maxInputTokens})`,",
  75. "`重なりサイズ: ${chunkOverlap} tokens`,": "`Overlap size: ${chunkOverlap} tokens`,",
  76. "`バッチサイズ: ${limits.maxBatchSize}`,": "`Batch size: ${limits.maxBatchSize}`,",
  77. "throw new Error(`埋め込みモデル設定 ${embeddingModelConfigId} が見つかりません`);": "throw new Error(`Embedded model configuration ${embeddingModelConfigId} not found`);",
  78. "throw new Error(`モデル ${modelConfig.name} は無効化されているため、埋め込みベクトルを生成できません`);": "throw new Error(`Unable to generate embedding vector because model ${modelConfig.name} is disabled`);",
  79. "throw new Error(`モデル ${modelConfig.name} に baseUrl が設定されていません`);": "throw new Error(`baseUrl not set for model ${modelConfig.name}`);",
  80. "`総計 ${totalLength} 文字、平均 ${Math.round(avgLength)} 文字、` +": "`Total ${totalLength} characters, average ${Math.round(avgLength)} characters, ` +",
  81. "`モデル制限: ${modelConfig.maxInputTokens || 8192} tokens`": "`Model limit: ${modelConfig.maxInputTokens || 8192} tokens`",
  82. "`テキスト長がモデルの制限。` +": "`Text length is a limitation of the model. ` +",
  83. "`現在: ${texts.length} 個のテキストで計 ${totalLength} 文字、` +": "`Currently: ${texts.length} texts totaling ${totalLength} characters, ` +",
  84. "`モデル制限: ${modelConfig.maxInputTokens || 8192} tokens。` +": "`Model limit: ${modelConfig.maxInputTokens || 8192} tokens. ` +",
  85. "`アドバイス: Chunk sizeまたはバッチサイズを小さくしてください`": "`Advice: Reduce chunk size or batch size`",
  86. "this.logger.error(`リクエストパラメータ: model=${modelConfig.modelId}, inputLength=${texts[0]?.length}`);": "this.logger.error(`Request parameters: model=${modelConfig.modelId}, inputLength=${texts[0]?.length}`);",
  87. "throw new Error(`埋め込み API の呼び出しに失敗しました: ${response.statusText} - ${errorText}`);": "throw new Error(`Embedded API call failed: ${response.statusText} - ${errorText}`);",
  88. "if (error.message && (error.message.includes('context length') || error.message.includes('コンテキスト長 exceeds limit ') || error.message.includes('コンテキスト長 exceeds limit '))) {": "if (error.message && (error.message.includes('context length') || error.message.includes('context length exceeds limit ') || error.message.includes('context length exceeds limit '))) {",
  89. "throw new NotFoundException('ファイルが存在しません');": "throw new NotFoundException('File does not exist');",
  90. "throw new Error(`メモリ待機がタイムアウトしました: 現在 ${this.getMemoryUsage().heapUsed}MB > ${this.MAX_MEMORY_MB * 0.85}MB`);": "throw new Error(`Memory wait timed out: Currently ${this.getMemoryUsage().heapUsed}MB > ${this.MAX_MEMORY_MB * 0.85}MB`);",
  91. "throw new Error(`ファイルが存在しません: ${filePath}`);": "throw new Error(`File does not exist: ${filePath}`);",
  92. "throw new Error('変換がタイムアウトしました。ファイルが大きすぎる可能性があります');": "throw new Error('Conversion timed out. File may be too large');",
  93. "throw new Error(`変換に失敗しました: ${detail}`);": "throw new Error(`Conversion failed: ${detail}`);",
  94. "throw new Error(`変換に失敗しました: ${lastError.message}`);": "throw new Error(`Conversion failed: ${lastError.message}`);",
  95. "throw new Error('LibreOffice サービスが実行されていません。サービスの状態を確認してください');": "throw new Error('LibreOffice service is not running. Please check the status of the service');",
  96. "throw new Error('LibreOffice サービスとの接続が切断されました。サービスが不安定である可能性があります');": "throw new Error('The connection to the LibreOffice service has been lost. The service may be unstable');",
  97. "@Min(1, { message: 'ベクトル次元の最小値は 1 です' })": "@Min(1, { message: 'The minimum value of the vector dimension is 1' })",
  98. "@Max(4096, { message: 'ベクトル次元の最大値は 4096 です(Elasticsearch の制限)' })": "@Max(4096, { message: 'The maximum vector dimension is 4096 (Elasticsearch limit)' })",
  99. "throw new Error(`PDF ファイルが存在しません: ${pdfPath}`);": "throw new Error(`PDF file does not exist: ${pdfPath}`);",
  100. "throw new Error('PDF のページ数を取得できません');": "throw new Error('Unable to get page number of PDF');",
  101. "throw new Error(`Python での変換に失敗しました: ${result.error}`);": "throw new Error(`Python conversion failed: ${result.error}`);",
  102. "throw new Error(`PDF から画像への変換に失敗しました: ${error.message}`);": "throw new Error(`PDF to image conversion failed: ${error.message}`);",
  103. "throw new Error('Embedding model IDが提供されていません');": "throw new Error('Embedding model ID not provided');",
  104. "return { message: '对话历史删除成功' };": "return { message: 'Conversation history deleted successfully' };",
  105. "`ユーザー ${req.user.id} がファイルをアップロードしました: ${file.originalname} (${this.formatBytes(file.size)})`,": "`User ${req.user.id} uploaded file: ${file.originalname} (${this.formatBytes(file.size)})`,",
  106. "console.log('パスワード:', randomPassword);": "console.log('Password:', randomPassword);",
  107. "console.log('=== updateLanguage デバッグ ===');": "console.log('=== updateLanguage Debug ===');",
  108. "console.log('=== getLanguage デバッグ ===');": "console.log('=== getLanguage Debug ===');",
  109. "page: pageIndex ? ` (第 ${pageIndex} ページ)` : '',": "page: pageIndex ? ` (th page ${pageIndex})` : '',",
  110. "if (errorCode === 429 || errorMessage.includes('rate limit') || errorMessage.includes('リクエストが多すぎます')) {": "if (errorCode === 429 || errorMessage.includes('rate limit') || errorMessage.includes('Too many requests')) {",
  111. "return { isGood: false, reason: `ファイルが小さすぎます (${sizeKB.toFixed(2)}KB)`, score: 0 };": "return { isGood: false, reason: `File is too small (${sizeKB.toFixed(2)}KB)`, score: 0 };",
  112. "return { isGood: false, reason: `ファイルが大きすぎます (${sizeKB.toFixed(2)}KB)`, score: 0 };": "return { isGood: false, reason: `File is too large (${sizeKB.toFixed(2)}KB)`, score: 0 };",
  113. "reason: `クォータ不足: 残り $${quota.remaining.toFixed(2)}, 必要 $${estimatedCost.toFixed(2)}`,": "reason: `Insufficient quota: remaining $${quota.remaining.toFixed(2)}, required $${estimatedCost.toFixed(2)}`,",
  114. "throw new Error(`ユーザー ${userId} は存在しません`);": "throw new Error(`User ${userId} does not exist`);",
  115. "message: `⚠️ クォータ使用率が ${usagePercent.toFixed(1)}% に達しました。残り $${quota.remaining.toFixed(2)}`,": "message: `⚠️ Quota usage has reached ${usagePercent.toFixed(1)}%. Remaining $${quota.remaining.toFixed(2)}`,",
  116. "message: `💡 クォータ使用率 ${usagePercent.toFixed(1)}%。コストの管理に注意してください`,": "message: `💡 Quota usage ${usagePercent.toFixed(1)}%. Be careful with controlling costs`,",
  117. "return `${seconds.toFixed(0)}秒`;": "return `${seconds.toFixed(0)}秒`;",
  118. "return `${minutes}分${remainingSeconds.toFixed(0)}秒`;": "return `${minutes}分${remainingSeconds.toFixed(0)}秒`;",
  119. "this.updateStatus('converting', 10, 'ドキュメント形式を変換中...');": "this.updateStatus('converting', 10, 'Converting document format...');",
  120. "this.updateStatus('splitting', 30, 'PDF を画像に変換中...');": "this.updateStatus('splitting', 30, 'Converting PDF to image...');",
  121. "throw new Error('PDF から画像への変換に失敗しました。画像が生成されませんでした');": "throw new Error('PDF to image conversion failed. No image was generated');",
  122. "this.updateStatus('checking', 40, 'クォータを確認し、コストを見積もり中...');": "this.updateStatus('checking', 40, 'Checking quotas and estimating costs...');",
  123. "this.updateStatus('analyzing', 50, 'ビジョンモデルを使用してページをAnalyzing...');": "this.updateStatus('analyzing', 50, 'Analyzing the page using the vision model...');",
  124. "this.updateStatus('completed', 100, '処理が完了しました。一時ファイルをクリーンアップ中...');": "this.updateStatus('completed', 100, 'Processing completed. Cleaning up temporary files...');",
  125. "throw new Error(`モデル設定が見つかりません: ${modelId}`);": "throw new Error(`Model configuration not found: ${modelId}`);",
  126. "reason: `サポートされていないファイル形式です: ${ext}`,": "reason: `Unsupported file format: ${ext}`,",
  127. "warnings: ['Fast Mode(テキスト抽出のみ)を使用します'],": "warnings: ['Using Fast Mode (text extraction only)'],",
  128. "reason: `形式 ${ext} はPrecise Modeをサポートしていません`,": "reason: `Format ${ext} does not support Precise Mode`,",
  129. "reason: 'ファイルが大きいため、完全な情報を保持するためにPrecise Modeを推奨します',": "reason: 'Due to large files, Precise Mode is recommended to retain complete information',",
  130. "warnings: ['処理時間が長くなる可能性があります', 'API 費用が発生します'],": "warnings: ['Processing time may be longer', 'API charges may apply'],",
  131. "reason: 'Precise Modeが利用可能です。テキストと画像の混合コンテンツを保持できます',": "reason: 'Precise Mode is available. Can hold mixed content of text and images',",
  132. "warnings: ['API 費用が発生します'],": "warnings: ['API charges will apply'],"
  133. }