new settings for rag
This commit is contained in:
parent
ca30198d35
commit
692c0887cc
@ -217,6 +217,39 @@
|
||||
"label": "Ollama URL",
|
||||
"placeholder": "Enter Ollama URL"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Advance Ollama URL Configuration",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Enable or Disable Custom Origin URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "Custom Origin URL",
|
||||
"placeholder": "Enter Custom Origin URL"
|
||||
},
|
||||
"help": "If you have connection issues with Ollama on Page Assist, you can configure a custom origin URL. To learn more about the configuration, <anchor>click here</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Manage Web Search",
|
||||
"heading": "Configure Web Search"
|
||||
},
|
||||
"about": {
|
||||
"title": "About",
|
||||
"heading": "About",
|
||||
"chromeVersion": "Page Assist Version",
|
||||
"ollamaVersion": "Ollama Version",
|
||||
"support": "You can support the Page Assist project by donating or sponsoring through the following platforms:",
|
||||
"koFi": "Support on Ko-fi",
|
||||
"githubSponsor": "Sponsor on GitHub",
|
||||
"githubRepo": "GitHub Repository"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Manage Knowledge",
|
||||
"heading": "Configure Knowledge Base"
|
||||
},
|
||||
"rag": {
|
||||
"title": "RAG Settings",
|
||||
"ragSettings": {
|
||||
"label": "RAG Settings",
|
||||
"model": {
|
||||
@ -251,36 +284,6 @@
|
||||
"webSearchFollowUpPromptHelp": "Do not remove `{chat_history}` and `{question}` from the prompt.",
|
||||
"webSearchFollowUpPromptError": "Please input your Web Search Follow Up Prompt!",
|
||||
"webSearchFollowUpPromptPlaceholder": "Your Web Search Follow Up Prompt"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Advance Ollama URL Configuration",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Enable or Disable Custom Origin URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "Custom Origin URL",
|
||||
"placeholder": "Enter Custom Origin URL"
|
||||
},
|
||||
"help": "If you have connection issues with Ollama on Page Assist, you can configure a custom origin URL. To learn more about the configuration, <anchor>click here</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Manage Web Search",
|
||||
"heading": "Configure Web Search"
|
||||
},
|
||||
"about": {
|
||||
"title": "About",
|
||||
"heading": "About",
|
||||
"chromeVersion": "Page Assist Version",
|
||||
"ollamaVersion": "Ollama Version",
|
||||
"support": "You can support the Page Assist project by donating or sponsoring through the following platforms:",
|
||||
"koFi": "Support on Ko-fi",
|
||||
"githubSponsor": "Sponsor on GitHub",
|
||||
"githubRepo": "GitHub Repository"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Manage Knowledge",
|
||||
"heading": "Configure Knowledge Base"
|
||||
}
|
||||
}
|
@ -217,6 +217,39 @@
|
||||
"label": "Url de Ollama",
|
||||
"placeholder": "Entrer l'url de Ollama"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Configuration avancée de l'URL de Ollama",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Activer ou désactiver l'URL d'origine personnalisée"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "URL d'origine personnalisée",
|
||||
"placeholder": "Entrez l'URL d'origine personnalisée"
|
||||
},
|
||||
"help": "Si vous avez des problèmes de connexion avec OLLAMA sur Page Assist, vous pouvez configurer une URL d'origine personnalisée. Pour en savoir plus sur la configuration, <anchor>cliquez ici</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Gérer la recherche Web",
|
||||
"heading": "Configurer la recherche Web"
|
||||
},
|
||||
"about": {
|
||||
"title": "À propos",
|
||||
"heading": "À propos",
|
||||
"chromeVersion": "Version de Page Assist",
|
||||
"ollamaVersion": "Version de Ollama",
|
||||
"support": "Vous pouvez supporter le projet Page Assist en donnant ou parrainant via les plateformes suivantes:",
|
||||
"koFi": "Supporter sur ko-fi",
|
||||
"githubSponsor": "Sponsoriser sur github",
|
||||
"githubRepo": "Référentiel GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Gérer les connaissances",
|
||||
"heading": "Configurer la base de connaissances"
|
||||
},
|
||||
"rag": {
|
||||
"title": "Paramètres de RAG",
|
||||
"ragSettings": {
|
||||
"label": "Paramètres de RAG",
|
||||
"model": {
|
||||
@ -251,36 +284,6 @@
|
||||
"webSearchFollowUpPromptHelp": "Ne supprimez pas `{chat_history}` et `{question}` du prompt.",
|
||||
"webSearchFollowUpPromptError": "Veuillez saisir votre prompt de suivi de recherche Web!",
|
||||
"webSearchFollowUpPromptPlaceholder": "Votre prompt de suivi de recherche Web"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Configuration avancée de l'URL de Ollama",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Activer ou désactiver l'URL d'origine personnalisée"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "URL d'origine personnalisée",
|
||||
"placeholder": "Entrez l'URL d'origine personnalisée"
|
||||
},
|
||||
"help": "Si vous avez des problèmes de connexion avec OLLAMA sur Page Assist, vous pouvez configurer une URL d'origine personnalisée. Pour en savoir plus sur la configuration, <anchor>cliquez ici</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Gérer la recherche Web",
|
||||
"heading": "Configurer la recherche Web"
|
||||
},
|
||||
"about": {
|
||||
"title": "À propos",
|
||||
"heading": "À propos",
|
||||
"chromeVersion": "Version de Page Assist",
|
||||
"ollamaVersion": "Version de Ollama",
|
||||
"support": "Vous pouvez supporter le projet Page Assist en donnant ou parrainant via les plateformes suivantes:",
|
||||
"koFi": "Supporter sur ko-fi",
|
||||
"githubSponsor": "Sponsoriser sur github",
|
||||
"githubRepo": "Référentiel GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Gérer les connaissances",
|
||||
"heading": "Configurer la base de connaissances"
|
||||
}
|
||||
}
|
@ -217,6 +217,39 @@
|
||||
"label": "Ollama URL",
|
||||
"placeholder": "Inserici l'URL di Ollama"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Configurazione Avanzata Ollama URL",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Abilita o Disabilita l'URL di Origine Personalizzato"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "URL di Origine Personalizzato",
|
||||
"placeholder": "Inserisci URL di Origine Personalizzato"
|
||||
},
|
||||
"help": "Se hai problemi di connessione con Ollama su Page Assist, puoi configurare un URL di origine personalizzato. Per saperne di più sulla configurazione, <anchor>clicca qui</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Gestisci Ricerca Web",
|
||||
"heading": "Configura Ricerca Web"
|
||||
},
|
||||
"about": {
|
||||
"title": "Informazioni",
|
||||
"heading": "Informazioni",
|
||||
"chromeVersion": "Versione di Page Assist",
|
||||
"ollamaVersion": "Versione di Ollama",
|
||||
"support": "Puoi supportare il progetto Page Assist donando o sponsorizzando attraverso le seguenti piattaforme:",
|
||||
"koFi": "Supporta su Ko-fi",
|
||||
"githubSponsor": "Sponsorizza su GitHub",
|
||||
"githubRepo": "Repository GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Gestisci Conoscenza",
|
||||
"heading": "Configura Base di Conoscenza"
|
||||
},
|
||||
"rag": {
|
||||
"title": "Impostazioni RAG",
|
||||
"ragSettings": {
|
||||
"label": "Impostazioni RAG",
|
||||
"model": {
|
||||
@ -251,36 +284,6 @@
|
||||
"webSearchFollowUpPromptHelp": "Non rimuovere `{chat_history}` e `{question}` dal prompt.",
|
||||
"webSearchFollowUpPromptError": "Inserisci il Prompt di Follow Up della Ricerca Web!",
|
||||
"webSearchFollowUpPromptPlaceholder": "I tuoi Prompt di Follow Up delle Ricerche Web"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Configurazione Avanzata Ollama URL",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Abilita o Disabilita l'URL di Origine Personalizzato"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "URL di Origine Personalizzato",
|
||||
"placeholder": "Inserisci URL di Origine Personalizzato"
|
||||
},
|
||||
"help": "Se hai problemi di connessione con Ollama su Page Assist, puoi configurare un URL di origine personalizzato. Per saperne di più sulla configurazione, <anchor>clicca qui</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Gestisci Ricerca Web",
|
||||
"heading": "Configura Ricerca Web"
|
||||
},
|
||||
"about": {
|
||||
"title": "Informazioni",
|
||||
"heading": "Informazioni",
|
||||
"chromeVersion": "Versione di Page Assist",
|
||||
"ollamaVersion": "Versione di Ollama",
|
||||
"support": "Puoi supportare il progetto Page Assist donando o sponsorizzando attraverso le seguenti piattaforme:",
|
||||
"koFi": "Supporta su Ko-fi",
|
||||
"githubSponsor": "Sponsorizza su GitHub",
|
||||
"githubRepo": "Repository GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Gestisci Conoscenza",
|
||||
"heading": "Configura Base di Conoscenza"
|
||||
}
|
||||
}
|
@ -220,6 +220,39 @@
|
||||
"label": "OllamaのURL",
|
||||
"placeholder": "OllamaのURLを入力"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Ollama URL の高度な設定",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "カスタムOriginのURLを有効化または無効化する"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "カスタムOriginのURL",
|
||||
"placeholder": "カスタムOriginのURLを入力"
|
||||
},
|
||||
"help": "PageAssistでOllamaに接続の問題がある場合は、カスタムOriginのURLを設定できます。設定の詳細については、<anchor>ここをクリック</anchor>してください。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Web検索の管理",
|
||||
"heading": "Web検索を設定する"
|
||||
},
|
||||
"about": {
|
||||
"title": "About",
|
||||
"heading": "About",
|
||||
"chromeVersion": "Page Assistのバージョン",
|
||||
"ollamaVersion": "Ollamaのバージョン",
|
||||
"support": "Page Assistプロジェクトは、以下のプラットフォームで寄付やスポンサーシップをすることで支援できます:",
|
||||
"koFi": "Ko-fiで支援する",
|
||||
"githubSponsor": "GitHubでスポンサーする",
|
||||
"githubRepo": "GitHubリポジトリ"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "知識を管理する",
|
||||
"heading": "知識ベースを構成する"
|
||||
},
|
||||
"rag": {
|
||||
"title": "RAGの設定",
|
||||
"ragSettings": {
|
||||
"label": "RAGの設定",
|
||||
"model": {
|
||||
@ -254,36 +287,6 @@
|
||||
"webSearchFollowUpPromptHelp": "プロンプトから`{chat_history}`と`{question}`を削除しないでください。",
|
||||
"webSearchFollowUpPromptError": "Web検索フォローアッププロンプトを入力してください!",
|
||||
"webSearchFollowUpPromptPlaceholder": "Web検索フォローアッププロンプト"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Ollama URL の高度な設定",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "カスタムOriginのURLを有効化または無効化する"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "カスタムOriginのURL",
|
||||
"placeholder": "カスタムOriginのURLを入力"
|
||||
},
|
||||
"help": "PageAssistでOllamaに接続の問題がある場合は、カスタムOriginのURLを設定できます。設定の詳細については、<anchor>ここをクリック</anchor>してください。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Web検索の管理",
|
||||
"heading": "Web検索を設定する"
|
||||
},
|
||||
"about": {
|
||||
"title": "About",
|
||||
"heading": "About",
|
||||
"chromeVersion": "Page Assistのバージョン",
|
||||
"ollamaVersion": "Ollamaのバージョン",
|
||||
"support": "Page Assistプロジェクトは、以下のプラットフォームで寄付やスポンサーシップをすることで支援できます:",
|
||||
"koFi": "Ko-fiで支援する",
|
||||
"githubSponsor": "GitHubでスポンサーする",
|
||||
"githubRepo": "GitHubリポジトリ"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "知識を管理する",
|
||||
"heading": "知識ベースを構成する"
|
||||
}
|
||||
}
|
@ -220,6 +220,39 @@
|
||||
"label": "Ollama URL",
|
||||
"placeholder": "Ollama URL നല്കുക"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Advance Ollama URL Configuration",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Enable or Disable Custom Origin URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "Custom Origin URL",
|
||||
"placeholder": "Enter Custom Origin URL"
|
||||
},
|
||||
"help": "ഏജ് അസിസ്റ്റന്റിൽ Ollama-യുമായി ബന്ധപ്പെടുമ്പോൾ ബന്ധതടസ്സം ഉണ്ടെങ്കിൽ, നിങ്ങൾക്ക് ഒരു വ്യക്തിഗത അസ്ഥിരത്വം URL കോൺഫിഗർ ചെയ്യാം. കോൺഫിഗറേഷനെക്കുറിച്ച് കൂടുതലറിയാൻ, <anchor>ഇവിടെ ക്ലിക്കുചെയ്യുക</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"heading": "Web തിരയൽ സജ്ജമാക്കുക",
|
||||
"title": "Web തിരയൽ നിയന്ത്രിക്കുക"
|
||||
},
|
||||
"about": {
|
||||
"title": "വിവരങ്ങൾ",
|
||||
"heading": "വിവരങ്ങൾ",
|
||||
"chromeVersion": "പേജ് അസിസ്റ്റ് വേർഷൻ",
|
||||
"ollamaVersion": "ഓളാമ വേർഷൻ",
|
||||
"support": "താഴെ പറയുന്ന പ്ലാറ്റ്ഫോമുകളിലൂടെ ദാനം ചെയ്യുകയോ സ്പോൺസർ ചെയ്യുകയോ ചെയ്ത് പേജ് അസിസ്റ്റ് പ്രോജക്റ്റിനെ പിന്തുണയ്ക്കാവുന്നതാണ്:",
|
||||
"koFi": "കോഫിയിൽ പിന്തുണയ്ക്കുക",
|
||||
"githubSponsor": "ഗിറ്റ്ഹബ്ബിൽ സ്പോൺസർ ചെയ്യുക",
|
||||
"githubRepo": "ഗിറ്റ്ഹബ്ബ് റെപ്പോസിറ്ററി"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "വിജ്ഞാനം നിര്വ്വഹിക്കുക",
|
||||
"heading": "വിജ്ഞാനാധാരം കോണ്ഫിഗര് ചെയ്യുക"
|
||||
},
|
||||
"rag": {
|
||||
"title": "RAG സെറ്റിംഗുകൾ",
|
||||
"ragSettings": {
|
||||
"label": "RAG സെറ്റിംഗുകൾ",
|
||||
"model": {
|
||||
@ -254,36 +287,6 @@
|
||||
"webSearchFollowUpPromptHelp": "പ്രോംപ്റ്റില് നിന്ന് `{chat_history}` യും `{question}` യും നീക്കം ചെയ്യരുത്.",
|
||||
"webSearchFollowUpPromptError": "ദയവായി നിങ്ങളുടെ വെബ് തിരയല് തുടര്പ്രോംപ്റ്റ് നല്കുക!",
|
||||
"webSearchFollowUpPromptPlaceholder": "നിങ്ങളുടെ വെബ് തിരയല് തുടര്പ്രോംപ്റ്റ്"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Advance Ollama URL Configuration",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Enable or Disable Custom Origin URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "Custom Origin URL",
|
||||
"placeholder": "Enter Custom Origin URL"
|
||||
},
|
||||
"help": "ഏജ് അസിസ്റ്റന്റിൽ Ollama-യുമായി ബന്ധപ്പെടുമ്പോൾ ബന്ധതടസ്സം ഉണ്ടെങ്കിൽ, നിങ്ങൾക്ക് ഒരു വ്യക്തിഗത അസ്ഥിരത്വം URL കോൺഫിഗർ ചെയ്യാം. കോൺഫിഗറേഷനെക്കുറിച്ച് കൂടുതലറിയാൻ, <anchor>ഇവിടെ ക്ലിക്കുചെയ്യുക</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"heading": "Web തിരയൽ സജ്ജമാക്കുക",
|
||||
"title": "Web തിരയൽ നിയന്ത്രിക്കുക"
|
||||
},
|
||||
"about": {
|
||||
"title": "വിവരങ്ങൾ",
|
||||
"heading": "വിവരങ്ങൾ",
|
||||
"chromeVersion": "പേജ് അസിസ്റ്റ് വേർഷൻ",
|
||||
"ollamaVersion": "ഓളാമ വേർഷൻ",
|
||||
"support": "താഴെ പറയുന്ന പ്ലാറ്റ്ഫോമുകളിലൂടെ ദാനം ചെയ്യുകയോ സ്പോൺസർ ചെയ്യുകയോ ചെയ്ത് പേജ് അസിസ്റ്റ് പ്രോജക്റ്റിനെ പിന്തുണയ്ക്കാവുന്നതാണ്:",
|
||||
"koFi": "കോഫിയിൽ പിന്തുണയ്ക്കുക",
|
||||
"githubSponsor": "ഗിറ്റ്ഹബ്ബിൽ സ്പോൺസർ ചെയ്യുക",
|
||||
"githubRepo": "ഗിറ്റ്ഹബ്ബ് റെപ്പോസിറ്ററി"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "വിജ്ഞാനം നിര്വ്വഹിക്കുക",
|
||||
"heading": "വിജ്ഞാനാധാരം കോണ്ഫിഗര് ചെയ്യുക"
|
||||
}
|
||||
}
|
@ -217,6 +217,39 @@
|
||||
"label": "URL do Ollama",
|
||||
"placeholder": "Insira a URL do Ollama"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Configuração Avançada da URL do Ollama",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Habilitar ou Desabilitar URL de Origem Personalizada"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "URL de Origem Personalizada",
|
||||
"placeholder": "Insira a URL de Origem Personalizada"
|
||||
},
|
||||
"help": "Se você tiver problemas de conexão com o Ollama no Page Assist, você pode configurar uma URL de origem personalizada. Para saber mais sobre a configuração, <anchor>clique aqui</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Gerenciar Pesquisa na Web",
|
||||
"heading": "Configurar Pesquisa na Web"
|
||||
},
|
||||
"about": {
|
||||
"title": "Sobre",
|
||||
"heading": "Sobre",
|
||||
"chromeVersion": "Versão do Page Assist",
|
||||
"ollamaVersion": "Versão do Ollama",
|
||||
"support": "Você pode apoiar o projeto Page Assist fazendo doações ou patrocínios através das seguintes plataformas:",
|
||||
"koFi": "Apoiador no Ko-fi",
|
||||
"githubSponsor": "Patrocinador no GitHub",
|
||||
"githubRepo": "Repositório do GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Gerenciar Conhecimento",
|
||||
"heading": "Configurar Base de Conhecimento"
|
||||
},
|
||||
"rag": {
|
||||
"title": "Configurações do RAG",
|
||||
"ragSettings": {
|
||||
"label": "Configurações do RAG",
|
||||
"model": {
|
||||
@ -251,36 +284,6 @@
|
||||
"webSearchFollowUpPromptHelp": "Não remova `{chat_history}` e `{question}` do prompt.",
|
||||
"webSearchFollowUpPromptError": "Por favor, insira o prompt de seguimento de pesquisa na web",
|
||||
"webSearchFollowUpPromptPlaceholder": "Seu prompt de seguimento de pesquisa na web"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Configuração Avançada da URL do Ollama",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Habilitar ou Desabilitar URL de Origem Personalizada"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "URL de Origem Personalizada",
|
||||
"placeholder": "Insira a URL de Origem Personalizada"
|
||||
},
|
||||
"help": "Se você tiver problemas de conexão com o Ollama no Page Assist, você pode configurar uma URL de origem personalizada. Para saber mais sobre a configuração, <anchor>clique aqui</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Gerenciar Pesquisa na Web",
|
||||
"heading": "Configurar Pesquisa na Web"
|
||||
},
|
||||
"about": {
|
||||
"title": "Sobre",
|
||||
"heading": "Sobre",
|
||||
"chromeVersion": "Versão do Page Assist",
|
||||
"ollamaVersion": "Versão do Ollama",
|
||||
"support": "Você pode apoiar o projeto Page Assist fazendo doações ou patrocínios através das seguintes plataformas:",
|
||||
"koFi": "Apoiador no Ko-fi",
|
||||
"githubSponsor": "Patrocinador no GitHub",
|
||||
"githubRepo": "Repositório do GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Gerenciar Conhecimento",
|
||||
"heading": "Configurar Base de Conhecimento"
|
||||
}
|
||||
}
|
@ -217,6 +217,40 @@
|
||||
"label": "URL Ollama",
|
||||
"placeholder": "Введите URL Ollama"
|
||||
},
|
||||
|
||||
"advanced": {
|
||||
"label": "Расширенная конфигурация URL Ollama",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Включить или отключить пользовательский исходный URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "Пользовательский исходный URL",
|
||||
"placeholder": "Введите пользовательский исходный URL"
|
||||
},
|
||||
"help": "Если у вас возникают проблемы с подключением к Ollama на странице помощника, вы можете настроить пользовательский исходный URL. Чтобы узнать больше о конфигурации, <anchor>нажмите здесь</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Управление веб-поиском",
|
||||
"heading": "Настройка веб-поиска"
|
||||
},
|
||||
"about": {
|
||||
"title": "О программе",
|
||||
"heading": "О программе",
|
||||
"chromeVersion": "Версия Page Assist",
|
||||
"ollamaVersion": "Версия Ollama",
|
||||
"support": "Вы можете поддержать проект Page Assist, сделав пожертвование или спонсорирование через следующие платформы:",
|
||||
"koFi": "Поддержать на Ko-fi",
|
||||
"githubSponsor": "Стать спонсором на GitHub",
|
||||
"githubRepo": "Репозиторий GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Управление знаниями",
|
||||
"heading": "Настройка базы знаний"
|
||||
},
|
||||
"rag": {
|
||||
"title": "Настройки RAG",
|
||||
"ragSettings": {
|
||||
"label": "Настройки RAG",
|
||||
"model": {
|
||||
@ -251,36 +285,6 @@
|
||||
"webSearchFollowUpPromptHelp": "Не удаляйте `{chat_history}` и `{question}` из подсказки.",
|
||||
"webSearchFollowUpPromptError": "Введите подсказку для последующего веб-поиска!",
|
||||
"webSearchFollowUpPromptPlaceholder": "Ваша подсказка для последующего веб-поиска"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Расширенная конфигурация URL Ollama",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "Включить или отключить пользовательский исходный URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "Пользовательский исходный URL",
|
||||
"placeholder": "Введите пользовательский исходный URL"
|
||||
},
|
||||
"help": "Если у вас возникают проблемы с подключением к Ollama на странице помощника, вы можете настроить пользовательский исходный URL. Чтобы узнать больше о конфигурации, <anchor>нажмите здесь</anchor>."
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"title": "Управление веб-поиском",
|
||||
"heading": "Настройка веб-поиска"
|
||||
},
|
||||
"about": {
|
||||
"title": "О программе",
|
||||
"heading": "О программе",
|
||||
"chromeVersion": "Версия Page Assist",
|
||||
"ollamaVersion": "Версия Ollama",
|
||||
"support": "Вы можете поддержать проект Page Assist, сделав пожертвование или спонсорирование через следующие платформы:",
|
||||
"koFi": "Поддержать на Ko-fi",
|
||||
"githubSponsor": "Стать спонсором на GitHub",
|
||||
"githubRepo": "Репозиторий GitHub"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "Управление знаниями",
|
||||
"heading": "Настройка базы знаний"
|
||||
}
|
||||
}
|
@ -221,6 +221,40 @@
|
||||
"label": "Ollama URL",
|
||||
"placeholder": "输入 Ollama URL"
|
||||
},
|
||||
|
||||
"advanced": {
|
||||
"label": "Ollama URL 高级配置",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "启用或禁用自定义来源 URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "自定义来源 URL",
|
||||
"placeholder": "输入自定义来源 URL"
|
||||
},
|
||||
"help": "如果您在 Page Assist 上与 Ollama 有连接问题,您可以配置自定义来源 URL。要了解更多关于配置的信息,<anchor>点击此处</anchor>。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"heading": "配置网络搜索",
|
||||
"title": "管理网络搜索"
|
||||
},
|
||||
"about": {
|
||||
"title": "关于",
|
||||
"heading": "关于",
|
||||
"chromeVersion": "Page Assist版本",
|
||||
"ollamaVersion": "Ollama版本",
|
||||
"support": "您可以通过以下平台捐赠或赞助Page Assist项目:",
|
||||
"koFi": "在Ko-fi上支持",
|
||||
"githubSponsor": "在GitHub上赞助",
|
||||
"githubRepo": "GitHub仓库"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "管理知识",
|
||||
"heading": "配置知识库"
|
||||
},
|
||||
"rag": {
|
||||
"title": "RAG 设置",
|
||||
"ragSettings": {
|
||||
"label": "RAG 设置",
|
||||
"model": {
|
||||
@ -255,36 +289,6 @@
|
||||
"webSearchFollowUpPromptHelp": "请勿从提示词中删除 `{chat_history}` 和 `{question}`。",
|
||||
"webSearchFollowUpPromptError": "请输入您的网页搜索追问提示词!",
|
||||
"webSearchFollowUpPromptPlaceholder": "您的网页搜索追问提示词"
|
||||
},
|
||||
"advanced": {
|
||||
"label": "Ollama URL 高级配置",
|
||||
"urlRewriteEnabled": {
|
||||
"label": "启用或禁用自定义来源 URL"
|
||||
},
|
||||
"rewriteUrl": {
|
||||
"label": "自定义来源 URL",
|
||||
"placeholder": "输入自定义来源 URL"
|
||||
},
|
||||
"help": "如果您在 Page Assist 上与 Ollama 有连接问题,您可以配置自定义来源 URL。要了解更多关于配置的信息,<anchor>点击此处</anchor>。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"manageSearch": {
|
||||
"heading": "配置网络搜索",
|
||||
"title": "管理网络搜索"
|
||||
},
|
||||
"about": {
|
||||
"title": "关于",
|
||||
"heading": "关于",
|
||||
"chromeVersion": "Page Assist版本",
|
||||
"ollamaVersion": "Ollama版本",
|
||||
"support": "您可以通过以下平台捐赠或赞助Page Assist项目:",
|
||||
"koFi": "在Ko-fi上支持",
|
||||
"githubSponsor": "在GitHub上赞助",
|
||||
"githubRepo": "GitHub仓库"
|
||||
},
|
||||
"manageKnowledge": {
|
||||
"title": "管理知识",
|
||||
"heading": "配置知识库"
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ export const AdvanceOllamaSettings = () => {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("ollamaSettings.settings.advanced.urlRewriteEnabled.label")}
|
||||
</span>
|
||||
<div>
|
||||
@ -29,7 +29,7 @@ export const AdvanceOllamaSettings = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 mb-3">
|
||||
<span className="text-gray-700 dark:text-neutral-50 mb-3">
|
||||
{t("ollamaSettings.settings.advanced.rewriteUrl.label")}
|
||||
</span>
|
||||
<div>
|
||||
|
@ -90,7 +90,7 @@ export const Header: React.FC<Props> = ({
|
||||
<NavLink
|
||||
to="/"
|
||||
className="text-gray-500 items-center dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
|
||||
<ChevronLeft className="w-4 h-4" />
|
||||
<ChevronLeft className="w-8 h-8" />
|
||||
</NavLink>
|
||||
</div>
|
||||
)}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import {
|
||||
Book,
|
||||
BrainCircuit,
|
||||
Orbit,
|
||||
Share,
|
||||
BookIcon,
|
||||
BrainCircuitIcon,
|
||||
OrbitIcon,
|
||||
ShareIcon,
|
||||
BlocksIcon,
|
||||
InfoIcon
|
||||
InfoIcon,
|
||||
CombineIcon,
|
||||
} from "lucide-react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { Link, useLocation } from "react-router-dom"
|
||||
@ -35,7 +36,7 @@ const LinkComponent = (item: {
|
||||
className={classNames(
|
||||
item.current === item.href
|
||||
? "text-gray-600 dark:text-white"
|
||||
: "text-gray-400 group-hover:text-gray-600 dark:text-gray-200 dark:group-hover:text-white",
|
||||
: "text-gray-500 group-hover:text-gray-600 dark:text-gray-200 dark:group-hover:text-white",
|
||||
"h-6 w-6 shrink-0"
|
||||
)}
|
||||
aria-hidden="true"
|
||||
@ -61,7 +62,13 @@ export const SettingsLayout = ({ children }: { children: React.ReactNode }) => {
|
||||
<LinkComponent
|
||||
href="/settings"
|
||||
name={t("generalSettings.title")}
|
||||
icon={Orbit}
|
||||
icon={OrbitIcon}
|
||||
current={location.pathname}
|
||||
/>
|
||||
<LinkComponent
|
||||
href="/settings/rag"
|
||||
name={t("rag.title")}
|
||||
icon={CombineIcon}
|
||||
current={location.pathname}
|
||||
/>
|
||||
<LinkComponent
|
||||
@ -74,7 +81,7 @@ export const SettingsLayout = ({ children }: { children: React.ReactNode }) => {
|
||||
href="/settings/model"
|
||||
name={t("manageModels.title")}
|
||||
current={location.pathname}
|
||||
icon={BrainCircuit}
|
||||
icon={BrainCircuitIcon}
|
||||
/>
|
||||
<LinkComponent
|
||||
href="/settings/knowledge"
|
||||
@ -89,13 +96,13 @@ export const SettingsLayout = ({ children }: { children: React.ReactNode }) => {
|
||||
<LinkComponent
|
||||
href="/settings/prompt"
|
||||
name={t("managePrompts.title")}
|
||||
icon={Book}
|
||||
icon={BookIcon}
|
||||
current={location.pathname}
|
||||
/>
|
||||
<LinkComponent
|
||||
href="/settings/share"
|
||||
name={t("manageShare.title")}
|
||||
icon={Share}
|
||||
icon={ShareIcon}
|
||||
current={location.pathname}
|
||||
/>
|
||||
<LinkComponent
|
||||
|
@ -155,7 +155,7 @@ export const ModelsBody = () => {
|
||||
pullOllamaModel(record.model)
|
||||
}
|
||||
}}
|
||||
className="text-gray-500 dark:text-gray-400">
|
||||
className="text-gray-700 dark:text-gray-400">
|
||||
<RotateCcw className="w-5 h-5" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Tabs } from "antd"
|
||||
import { SettingsOllama } from "./Settings/ollama"
|
||||
import { SettingPrompt } from "./Settings/prompt"
|
||||
import { SettingOther } from "./Settings/other"
|
||||
import { SettingOther } from "./Settings/general-settings"
|
||||
|
||||
type Props = {
|
||||
setClose: (close: boolean) => void
|
||||
|
@ -60,7 +60,7 @@ export const AboutApp = () => {
|
||||
]}
|
||||
/>
|
||||
<div>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mb-4">
|
||||
<p className="text-sm text-gray-700 dark:text-gray-400 mb-4">
|
||||
{t("about.support")}
|
||||
</p>
|
||||
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
import { BetaTag } from "@/components/Common/Beta"
|
||||
import { useStorage } from "@plasmohq/storage/hook"
|
||||
|
||||
export const SettingOther = () => {
|
||||
export const GeneralSettings = () => {
|
||||
const { clearChat, speechToTextLanguage, setSpeechToTextLanguage } =
|
||||
useMessageOption()
|
||||
|
||||
@ -43,7 +43,7 @@ export const SettingOther = () => {
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3"></div>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
<span className="text-gray-700 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.speechRecognitionLang.label")}
|
||||
</span>
|
||||
|
||||
@ -65,7 +65,7 @@ export const SettingOther = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
<span className="text-gray-700 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.language.label")}
|
||||
</span>
|
||||
|
||||
@ -88,7 +88,7 @@ export const SettingOther = () => {
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="inline-flex items-center gap-2">
|
||||
<BetaTag />
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
<span className="text-gray-700 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.copilotResumeLastChat.label")}
|
||||
</span>
|
||||
</div>
|
||||
@ -100,7 +100,7 @@ export const SettingOther = () => {
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="inline-flex items-center gap-2">
|
||||
<BetaTag />
|
||||
<span className="text-gray-500 dark:text-neutral-50">
|
||||
<span className="text-gray-700 dark:text-neutral-50">
|
||||
{t("generalSettings.settings.hideCurrentChatModelSettings.label")}
|
||||
</span>
|
||||
</div>
|
||||
@ -111,7 +111,7 @@ export const SettingOther = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.settings.darkMode.label")}
|
||||
</span>
|
||||
|
||||
@ -138,7 +138,7 @@ export const SettingOther = () => {
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3"></div>
|
||||
</div>
|
||||
<div className="flex flex-row mb-3 justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.system.deleteChatHistory.label")}
|
||||
</span>
|
||||
|
||||
@ -162,7 +162,7 @@ export const SettingOther = () => {
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex flex-row mb-3 justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.system.export.label")}
|
||||
</span>
|
||||
<button
|
||||
@ -172,7 +172,7 @@ export const SettingOther = () => {
|
||||
</button>
|
||||
</div>
|
||||
<div className="flex flex-row mb-3 justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.system.import.label")}
|
||||
</span>
|
||||
<label
|
@ -29,7 +29,7 @@ export const ModelSettings = () => {
|
||||
{t("modelSettings.label")}
|
||||
</h2>
|
||||
</div>
|
||||
<p className="text-sm text-gray-500 dark:text-neutral-400 mt-1">
|
||||
<p className="text-sm text-gray-700 dark:text-neutral-400 mt-1">
|
||||
{t("modelSettings.description")}
|
||||
</p>
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3 mb-6"></div>
|
||||
|
@ -1,19 +1,9 @@
|
||||
import { useMutation, useQuery } from "@tanstack/react-query"
|
||||
import { Collapse, Form, InputNumber, Select, Skeleton } from "antd"
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { Collapse, Skeleton } from "antd"
|
||||
import { useState } from "react"
|
||||
import { SaveButton } from "~/components/Common/SaveButton"
|
||||
import {
|
||||
defaultEmbeddingChunkOverlap,
|
||||
defaultEmbeddingChunkSize,
|
||||
defaultEmbeddingModelForRag,
|
||||
getAllModels,
|
||||
getOllamaURL,
|
||||
saveForRag,
|
||||
setOllamaURL as saveOllamaURL
|
||||
} from "~/services/ollama"
|
||||
import { SettingPrompt } from "./prompt"
|
||||
import { getOllamaURL, setOllamaURL as saveOllamaURL } from "~/services/ollama"
|
||||
import { Trans, useTranslation } from "react-i18next"
|
||||
import { useStorage } from "@plasmohq/storage/hook"
|
||||
import { AdvanceOllamaSettings } from "@/components/Common/Settings/AdvanceOllamaSettings"
|
||||
import { ModelSettings } from "./model-settings"
|
||||
|
||||
@ -22,34 +12,12 @@ export const SettingsOllama = () => {
|
||||
|
||||
const { t } = useTranslation("settings")
|
||||
|
||||
const { data: ollamaInfo, status } = useQuery({
|
||||
const { status } = useQuery({
|
||||
queryKey: ["fetchOllamURL"],
|
||||
queryFn: async () => {
|
||||
const [ollamaURL, allModels, chunkOverlap, chunkSize, defaultEM] =
|
||||
await Promise.all([
|
||||
getOllamaURL(),
|
||||
getAllModels({ returnEmpty: true }),
|
||||
defaultEmbeddingChunkOverlap(),
|
||||
defaultEmbeddingChunkSize(),
|
||||
defaultEmbeddingModelForRag()
|
||||
])
|
||||
const [ollamaURL] = await Promise.all([getOllamaURL()])
|
||||
setOllamaURL(ollamaURL)
|
||||
return {
|
||||
models: allModels,
|
||||
chunkOverlap,
|
||||
chunkSize,
|
||||
defaultEM
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const { mutate: saveRAG, isPending: isSaveRAGPending } = useMutation({
|
||||
mutationFn: async (data: {
|
||||
model: string
|
||||
chunkSize: number
|
||||
overlap: number
|
||||
}) => {
|
||||
await saveForRag(data.model, data.chunkSize, data.overlap)
|
||||
return {}
|
||||
}
|
||||
})
|
||||
|
||||
@ -92,7 +60,7 @@ export const SettingsOllama = () => {
|
||||
<h2 className="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
||||
{t("ollamaSettings.settings.advanced.label")}
|
||||
</h2>
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400 mb-4">
|
||||
<p className="text-xs text-gray-700 dark:text-gray-400 mb-4">
|
||||
<Trans
|
||||
i18nKey="settings:ollamaSettings.settings.advanced.help"
|
||||
components={{
|
||||
@ -122,117 +90,7 @@ export const SettingsOllama = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<h2 className="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
||||
{t("ollamaSettings.settings.ragSettings.label")}
|
||||
</h2>
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3 mb-6"></div>
|
||||
</div>
|
||||
<Form
|
||||
layout="vertical"
|
||||
onFinish={(data) => {
|
||||
saveRAG({
|
||||
model: data.defaultEM,
|
||||
chunkSize: data.chunkSize,
|
||||
overlap: data.chunkOverlap
|
||||
})
|
||||
}}
|
||||
initialValues={{
|
||||
chunkSize: ollamaInfo?.chunkSize,
|
||||
chunkOverlap: ollamaInfo?.chunkOverlap,
|
||||
defaultEM: ollamaInfo?.defaultEM
|
||||
}}>
|
||||
<Form.Item
|
||||
name="defaultEM"
|
||||
label={t("ollamaSettings.settings.ragSettings.model.label")}
|
||||
help={t("ollamaSettings.settings.ragSettings.model.help")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"ollamaSettings.settings.ragSettings.model.required"
|
||||
)
|
||||
}
|
||||
]}>
|
||||
<Select
|
||||
size="large"
|
||||
filterOption={(input, option) =>
|
||||
option!.label.toLowerCase().indexOf(input.toLowerCase()) >=
|
||||
0 ||
|
||||
option!.value.toLowerCase().indexOf(input.toLowerCase()) >=
|
||||
0
|
||||
}
|
||||
showSearch
|
||||
placeholder={t(
|
||||
"ollamaSettings.settings.ragSettings.model.placeholder"
|
||||
)}
|
||||
style={{ width: "100%" }}
|
||||
className="mt-4"
|
||||
options={ollamaInfo.models?.map((model) => ({
|
||||
label: model.name,
|
||||
value: model.model
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="chunkSize"
|
||||
label={t("ollamaSettings.settings.ragSettings.chunkSize.label")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"ollamaSettings.settings.ragSettings.chunkSize.required"
|
||||
)
|
||||
}
|
||||
]}>
|
||||
<InputNumber
|
||||
style={{ width: "100%" }}
|
||||
placeholder={t(
|
||||
"ollamaSettings.settings.ragSettings.chunkSize.placeholder"
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="chunkOverlap"
|
||||
label={t(
|
||||
"ollamaSettings.settings.ragSettings.chunkOverlap.label"
|
||||
)}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"ollamaSettings.settings.ragSettings.chunkOverlap.required"
|
||||
)
|
||||
}
|
||||
]}>
|
||||
<InputNumber
|
||||
style={{ width: "100%" }}
|
||||
placeholder={t(
|
||||
"ollamaSettings.settings.ragSettings.chunkOverlap.placeholder"
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<div className="flex justify-end">
|
||||
<SaveButton disabled={isSaveRAGPending} btnType="submit" />
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
<ModelSettings />
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<h2 className="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
||||
{t("ollamaSettings.settings.prompt.label")}
|
||||
</h2>
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3 mb-6"></div>
|
||||
</div>
|
||||
<SettingPrompt />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@ export const SettingPrompt = () => {
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const { status, data } = useQuery({
|
||||
queryKey: ["fetchOllaPrompt"],
|
||||
queryKey: ["fetchRagPrompt"],
|
||||
queryFn: async () => {
|
||||
const [prompt, webSearchPrompt, webSearchFollowUpPrompt] =
|
||||
await Promise.all([
|
||||
@ -47,9 +47,7 @@ export const SettingPrompt = () => {
|
||||
defaultValue={selectedValue}
|
||||
onChange={(e) => setSelectedValue(e.target.value)}>
|
||||
<Radio.Button value="rag">RAG</Radio.Button>
|
||||
<Radio.Button value="web">
|
||||
{t("ollamaSettings.settings.prompt.option2")}
|
||||
</Radio.Button>
|
||||
<Radio.Button value="web">{t("rag.prompt.option2")}</Radio.Button>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
|
||||
@ -63,7 +61,7 @@ export const SettingPrompt = () => {
|
||||
values?.questionPrompt || ""
|
||||
)
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["fetchOllaPrompt"]
|
||||
queryKey: ["fetchRagPrompt"]
|
||||
})
|
||||
}}
|
||||
initialValues={{
|
||||
@ -98,7 +96,7 @@ export const SettingPrompt = () => {
|
||||
value={data.webSearchFollowUpPrompt}
|
||||
rows={5}
|
||||
placeholder={t(
|
||||
"ollamaSettings.settings.prompt.webSearchFollowUpPromptPlaceholder"
|
||||
"rag.prompt.webSearchFollowUpPromptPlaceholder"
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
@ -119,7 +117,7 @@ export const SettingPrompt = () => {
|
||||
values?.webSearchFollowUpPrompt || ""
|
||||
)
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["fetchOllaPrompt"]
|
||||
queryKey: ["fetchRagPrompt"]
|
||||
})
|
||||
}}
|
||||
initialValues={{
|
||||
@ -127,46 +125,36 @@ export const SettingPrompt = () => {
|
||||
webSearchFollowUpPrompt: data.webSearchFollowUpPrompt
|
||||
}}>
|
||||
<Form.Item
|
||||
label={t("ollamaSettings.settings.prompt.webSearchPrompt")}
|
||||
label={t("rag.prompt.webSearchPrompt")}
|
||||
name="webSearchPrompt"
|
||||
help={t("ollamaSettings.settings.prompt.webSearchPromptHelp")}
|
||||
help={t("rag.prompt.webSearchPromptHelp")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"ollamaSettings.settings.prompt.webSearchPromptError"
|
||||
)
|
||||
message: t("rag.prompt.webSearchPromptError")
|
||||
}
|
||||
]}>
|
||||
<Input.TextArea
|
||||
value={data.webSearchPrompt}
|
||||
rows={5}
|
||||
placeholder={t(
|
||||
"ollamaSettings.settings.prompt.webSearchPromptPlaceholder"
|
||||
)}
|
||||
placeholder={t("rag.prompt.webSearchPromptPlaceholder")}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t(
|
||||
"ollamaSettings.settings.prompt.webSearchFollowUpPrompt"
|
||||
)}
|
||||
label={t("rag.prompt.webSearchFollowUpPrompt")}
|
||||
name="webSearchFollowUpPrompt"
|
||||
help={t(
|
||||
"ollamaSettings.settings.prompt.webSearchFollowUpPromptHelp"
|
||||
)}
|
||||
help={t("rag.prompt.webSearchFollowUpPromptHelp")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"ollamaSettings.settings.prompt.webSearchFollowUpPromptError"
|
||||
)
|
||||
message: t("rag.prompt.webSearchFollowUpPromptError")
|
||||
}
|
||||
]}>
|
||||
<Input.TextArea
|
||||
value={data.webSearchFollowUpPrompt}
|
||||
rows={5}
|
||||
placeholder={t(
|
||||
"ollamaSettings.settings.prompt.webSearchFollowUpPromptPlaceholder"
|
||||
"rag.prompt.webSearchFollowUpPromptPlaceholder"
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
172
src/components/Option/Settings/rag.tsx
Normal file
172
src/components/Option/Settings/rag.tsx
Normal file
@ -0,0 +1,172 @@
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
|
||||
import { Form, InputNumber, Select, Skeleton } from "antd"
|
||||
import { SaveButton } from "~/components/Common/SaveButton"
|
||||
import {
|
||||
defaultEmbeddingChunkOverlap,
|
||||
defaultEmbeddingChunkSize,
|
||||
defaultEmbeddingModelForRag,
|
||||
getAllModels,
|
||||
saveForRag
|
||||
} from "~/services/ollama"
|
||||
import { SettingPrompt } from "./prompt"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
export const RagSettings = () => {
|
||||
const { t } = useTranslation("settings")
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const { data: ollamaInfo, status } = useQuery({
|
||||
queryKey: ["fetchRAGSettings"],
|
||||
queryFn: async () => {
|
||||
const [allModels, chunkOverlap, chunkSize, defaultEM] = await Promise.all(
|
||||
[
|
||||
getAllModels({ returnEmpty: true }),
|
||||
defaultEmbeddingChunkOverlap(),
|
||||
defaultEmbeddingChunkSize(),
|
||||
defaultEmbeddingModelForRag()
|
||||
]
|
||||
)
|
||||
return {
|
||||
models: allModels,
|
||||
chunkOverlap,
|
||||
chunkSize,
|
||||
defaultEM
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const { mutate: saveRAG, isPending: isSaveRAGPending } = useMutation({
|
||||
mutationFn: async (data: {
|
||||
model: string
|
||||
chunkSize: number
|
||||
overlap: number
|
||||
}) => {
|
||||
await saveForRag(data.model, data.chunkSize, data.overlap)
|
||||
return true
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["fetchRAGSettings"]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-3">
|
||||
{status === "pending" && <Skeleton paragraph={{ rows: 4 }} active />}
|
||||
{status === "success" && (
|
||||
<div className="flex flex-col space-y-6">
|
||||
<div>
|
||||
<div>
|
||||
<h2 className="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
||||
{t("rag.ragSettings.label")}
|
||||
</h2>
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3 mb-6"></div>
|
||||
</div>
|
||||
<Form
|
||||
layout="vertical"
|
||||
onFinish={(data) => {
|
||||
saveRAG({
|
||||
model: data.defaultEM,
|
||||
chunkSize: data.chunkSize,
|
||||
overlap: data.chunkOverlap
|
||||
})
|
||||
}}
|
||||
initialValues={{
|
||||
chunkSize: ollamaInfo?.chunkSize,
|
||||
chunkOverlap: ollamaInfo?.chunkOverlap,
|
||||
defaultEM: ollamaInfo?.defaultEM
|
||||
}}>
|
||||
<Form.Item
|
||||
name="defaultEM"
|
||||
label={t("rag.ragSettings.model.label")}
|
||||
help={t("rag.ragSettings.model.help")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"rag.ragSettings.model.required"
|
||||
)
|
||||
}
|
||||
]}>
|
||||
<Select
|
||||
size="large"
|
||||
filterOption={(input, option) =>
|
||||
option!.label.toLowerCase().indexOf(input.toLowerCase()) >=
|
||||
0 ||
|
||||
option!.value.toLowerCase().indexOf(input.toLowerCase()) >=
|
||||
0
|
||||
}
|
||||
showSearch
|
||||
placeholder={t(
|
||||
"rag.ragSettings.model.placeholder"
|
||||
)}
|
||||
style={{ width: "100%" }}
|
||||
className="mt-4"
|
||||
options={ollamaInfo.models?.map((model) => ({
|
||||
label: model.name,
|
||||
value: model.model
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="chunkSize"
|
||||
label={t("rag.ragSettings.chunkSize.label")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"rag.ragSettings.chunkSize.required"
|
||||
)
|
||||
}
|
||||
]}>
|
||||
<InputNumber
|
||||
style={{ width: "100%" }}
|
||||
placeholder={t(
|
||||
"rag.ragSettings.chunkSize.placeholder"
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="chunkOverlap"
|
||||
label={t(
|
||||
"rag.ragSettings.chunkOverlap.label"
|
||||
)}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t(
|
||||
"rag.ragSettings.chunkOverlap.required"
|
||||
)
|
||||
}
|
||||
]}>
|
||||
<InputNumber
|
||||
style={{ width: "100%" }}
|
||||
placeholder={t(
|
||||
"rag.ragSettings.chunkOverlap.placeholder"
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<div className="flex justify-end">
|
||||
<SaveButton disabled={isSaveRAGPending} btnType="submit" />
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<h2 className="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
||||
{t("rag.prompt.label")}
|
||||
</h2>
|
||||
<div className="border border-b border-gray-200 dark:border-gray-600 mt-3 mb-6"></div>
|
||||
</div>
|
||||
<SettingPrompt />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
@ -44,7 +44,7 @@ export const SearchModeSettings = () => {
|
||||
})}
|
||||
className="space-y-4">
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.webSearch.provider.label")}
|
||||
</span>
|
||||
<div>
|
||||
@ -62,7 +62,7 @@ export const SearchModeSettings = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.webSearch.searchMode.label")}
|
||||
</span>
|
||||
<div>
|
||||
@ -75,7 +75,7 @@ export const SearchModeSettings = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.webSearch.totalSearchResults.label")}
|
||||
</span>
|
||||
<div>
|
||||
|
@ -49,7 +49,7 @@ export const TTSModeSettings = ({ hideBorder }: { hideBorder?: boolean }) => {
|
||||
})}
|
||||
className="space-y-4">
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.tts.ttsEnabled.label")}
|
||||
</span>
|
||||
<div>
|
||||
@ -62,7 +62,7 @@ export const TTSModeSettings = ({ hideBorder }: { hideBorder?: boolean }) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.tts.ttsProvider.label")}
|
||||
</span>
|
||||
<div>
|
||||
@ -75,7 +75,7 @@ export const TTSModeSettings = ({ hideBorder }: { hideBorder?: boolean }) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.tts.ttsVoice.label")}
|
||||
</span>
|
||||
<div>
|
||||
@ -94,7 +94,7 @@ export const TTSModeSettings = ({ hideBorder }: { hideBorder?: boolean }) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between">
|
||||
<span className="text-gray-500 dark:text-neutral-50 ">
|
||||
<span className="text-gray-700 dark:text-neutral-50 ">
|
||||
{t("generalSettings.tts.ssmlEnabled.label")}
|
||||
</span>
|
||||
<div>
|
||||
|
@ -146,7 +146,7 @@ export const OptionShareBody = () => {
|
||||
<label className="text-sm font-semibold leading-5 text-gray-900 dark:text-white">
|
||||
{t("manageShare.webshare.label")}
|
||||
</label>
|
||||
<p className="text-sm font-normal leading-5 text-gray-500 dark:text-gray-400">
|
||||
<p className="text-sm font-normal leading-5 text-gray-700 dark:text-gray-400">
|
||||
{t("manageShare.webshare.description")}
|
||||
</p>
|
||||
</div>
|
||||
|
@ -94,7 +94,7 @@ export const EmptySidePanel = () => {
|
||||
</button>
|
||||
{ollamaURL &&
|
||||
cleanUrl(ollamaURL) !== "http://127.0.0.1:11434" && (
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400 mb-4 text-center">
|
||||
<p className="text-xs text-gray-700 dark:text-gray-400 mb-4 text-center">
|
||||
<Trans
|
||||
i18nKey="playground:ollamaState.connectionError"
|
||||
components={{
|
||||
|
@ -17,7 +17,7 @@ export const supportLanguage = [
|
||||
value: "ru"
|
||||
},
|
||||
{
|
||||
label: "Português",
|
||||
label: "Português (Brasil)",
|
||||
value: "pt-BR"
|
||||
},
|
||||
{
|
||||
|
@ -9,6 +9,7 @@ import OptionKnowledgeBase from "./option-settings-knowledge"
|
||||
import OptionAbout from "./option-settings-about"
|
||||
import SidepanelChat from "./sidepanel-chat"
|
||||
import SidepanelSettings from "./sidepanel-settings"
|
||||
import OptionRagSettings from "./option-rag"
|
||||
|
||||
export const OptionRoutingChrome = () => {
|
||||
return (
|
||||
@ -20,6 +21,7 @@ export const OptionRoutingChrome = () => {
|
||||
<Route path="/settings/ollama" element={<OptionOllamaSettings />} />
|
||||
<Route path="/settings/share" element={<OptionShare />} />
|
||||
<Route path="/settings/knowledge" element={<OptionKnowledgeBase />} />
|
||||
<Route path="/settings/rag" element={<OptionRagSettings />} />
|
||||
<Route path="/settings/about" element={<OptionAbout />} />
|
||||
</Routes>
|
||||
)
|
||||
|
@ -13,6 +13,7 @@ const OptionSettings = lazy(() => import("./option-settings"))
|
||||
const OptionShare = lazy(() => import("./option-settings-share"))
|
||||
const OptionKnowledgeBase = lazy(() => import("./option-settings-knowledge"))
|
||||
const OptionAbout = lazy(() => import("./option-settings-about"))
|
||||
const OptionRagSettings = lazy(() => import("./option-rag"))
|
||||
|
||||
export const OptionRoutingFirefox = () => {
|
||||
return (
|
||||
@ -25,6 +26,7 @@ export const OptionRoutingFirefox = () => {
|
||||
<Route path="/settings/share" element={<OptionShare />} />
|
||||
<Route path="/settings/knowledge" element={<OptionKnowledgeBase />} />
|
||||
<Route path="/settings/about" element={<OptionAbout />} />
|
||||
<Route path="/settings/rag" element={<OptionRagSettings />} />
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
|
15
src/routes/option-rag.tsx
Normal file
15
src/routes/option-rag.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import { SettingsLayout } from "~/components/Layouts/SettingsOptionLayout"
|
||||
import OptionLayout from "~/components/Layouts/Layout"
|
||||
import { RagSettings } from "@/components/Option/Settings/rag"
|
||||
|
||||
const OptionRagSettings = () => {
|
||||
return (
|
||||
<OptionLayout>
|
||||
<SettingsLayout>
|
||||
<RagSettings />
|
||||
</SettingsLayout>
|
||||
</OptionLayout>
|
||||
)
|
||||
}
|
||||
|
||||
export default OptionRagSettings
|
@ -1,12 +1,12 @@
|
||||
import { SettingsLayout } from "~/components/Layouts/SettingsOptionLayout"
|
||||
import OptionLayout from "~/components/Layouts/Layout"
|
||||
import { SettingOther } from "~/components/Option/Settings/other"
|
||||
import { GeneralSettings } from "~/components/Option/Settings/general-settings"
|
||||
|
||||
const OptionSettings = () => {
|
||||
return (
|
||||
<OptionLayout>
|
||||
<SettingsLayout>
|
||||
<SettingOther />
|
||||
<GeneralSettings />
|
||||
</SettingsLayout>
|
||||
</OptionLayout>
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user