From c9e65f4221e6c9fbc4b2d8ceba33b0db9124b3b3 Mon Sep 17 00:00:00 2001 From: Chenhe Gu Date: Fri, 26 Jan 2024 15:20:03 +0800 Subject: [PATCH] Fix/update broken doc links (#2187) Co-authored-by: StyleZhang Co-authored-by: crazywoola <427733928@qq.com> --- .../model_runtime/model_providers/ollama/ollama.yaml | 2 +- .../(datasetDetailLayout)/[datasetId]/layout.tsx | 8 +++++++- web/app/activate/activateForm.tsx | 2 +- .../conversation-histroy/history-panel.tsx | 11 ++++++++++- .../dataset-config/settings-modal/index.tsx | 4 ++-- .../prompt-mode/advanced-mode-waring.tsx | 5 +++-- web/app/components/app/overview/customize/index.tsx | 11 ++++++++++- web/app/components/datasets/create/step-two/index.tsx | 2 +- .../datasets/hit-testing/modify-retrieval-modal.tsx | 2 +- web/app/components/datasets/settings/form/index.tsx | 4 ++-- web/i18n/lang/common.en.ts | 2 +- web/i18n/lang/common.pt.ts | 2 +- 12 files changed, 40 insertions(+), 15 deletions(-) diff --git a/api/core/model_runtime/model_providers/ollama/ollama.yaml b/api/core/model_runtime/model_providers/ollama/ollama.yaml index d796831461..782667fdab 100644 --- a/api/core/model_runtime/model_providers/ollama/ollama.yaml +++ b/api/core/model_runtime/model_providers/ollama/ollama.yaml @@ -11,7 +11,7 @@ help: en_US: How to integrate with Ollama zh_Hans: 如何集成 Ollama url: - en_US: https://docs.dify.ai/advanced/model-configuration/ollama + en_US: https://docs.dify.ai/tutorials/model-configuration/ollama supported_model_types: - llm - text-embedding diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx index 86e3197d9e..89ff28e5ac 100644 --- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx +++ b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx @@ -35,6 +35,7 @@ import FloatPopoverContainer from '@/app/components/base/float-popover-container import DatasetDetailContext from '@/context/dataset-detail' import { DataSourceType } from '@/models/datasets' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' +import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language' export type IAppDetailLayoutProps = { children: React.ReactNode @@ -104,6 +105,7 @@ type IExtraInfoProps = { const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => { const locale = getLocaleOnClient() + const language = getModelRuntimeSupported(locale) const [isShowTips, { toggle: toggleTips, set: setShowTips }] = useBoolean(!isMobile) const { t } = useTranslation() @@ -147,7 +149,11 @@ const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
{t('common.datasetMenus.emptyTip')}
diff --git a/web/app/activate/activateForm.tsx b/web/app/activate/activateForm.tsx index 40595b71fd..5c79883d9e 100644 --- a/web/app/activate/activateForm.tsx +++ b/web/app/activate/activateForm.tsx @@ -207,7 +207,7 @@ const ActivateForm = () => { {t('login.license.link')} diff --git a/web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsx b/web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsx index ec6d20a590..40ed1e2324 100644 --- a/web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsx +++ b/web/app/components/app/configuration/config-prompt/conversation-histroy/history-panel.tsx @@ -7,6 +7,7 @@ import OperationBtn from '@/app/components/app/configuration/base/operation-btn' import Panel from '@/app/components/app/configuration/base/feature-panel' import { MessageClockCircle } from '@/app/components/base/icons/src/vender/solid/general' import I18n from '@/context/i18n' +import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language' type Props = { showWarning: boolean @@ -19,6 +20,7 @@ const HistoryPanel: FC = ({ }) => { const { t } = useTranslation() const { locale } = useContext(I18n) + const language = getModelRuntimeSupported(locale) return ( = ({ > {showWarning && (
-
{t('appDebug.feature.conversationHistory.tip')} {t('appDebug.feature.conversationHistory.learnMore')}
+
{t('appDebug.feature.conversationHistory.tip')} + {t('appDebug.feature.conversationHistory.learnMore')} + +
)} diff --git a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx index e87a69767e..c9336b2386 100644 --- a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx +++ b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx @@ -163,7 +163,7 @@ const SettingsModal: FC = ({ className='block px-3 py-2 w-full h-[88px] rounded-lg bg-gray-100 text-sm outline-none appearance-none resize-none' placeholder={t('datasetSettings.form.descPlaceholder') || ''} /> - + {t('datasetSettings.form.descWrite')} @@ -226,7 +226,7 @@ const SettingsModal: FC = ({
{t('datasetSettings.form.retrievalSetting.title')}
diff --git a/web/app/components/app/configuration/prompt-mode/advanced-mode-waring.tsx b/web/app/components/app/configuration/prompt-mode/advanced-mode-waring.tsx index 2eaa1f83f9..9f1a9eaabe 100644 --- a/web/app/components/app/configuration/prompt-mode/advanced-mode-waring.tsx +++ b/web/app/components/app/configuration/prompt-mode/advanced-mode-waring.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next' import { useContext } from 'use-context-selector' import I18n from '@/context/i18n' import { FlipBackward } from '@/app/components/base/icons/src/vender/line/arrows' - +import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language' type Props = { onReturnToSimpleMode: () => void } @@ -15,6 +15,7 @@ const AdvancedModeWarning: FC = ({ }) => { const { t } = useTranslation() const { locale } = useContext(I18n) + const language = getModelRuntimeSupported(locale) const [show, setShow] = React.useState(true) if (!show) return null @@ -26,7 +27,7 @@ const AdvancedModeWarning: FC = ({ {t('appDebug.promptMode.advancedWarning.description')} {t('appDebug.promptMode.advancedWarning.learnMore')} diff --git a/web/app/components/app/overview/customize/index.tsx b/web/app/components/app/overview/customize/index.tsx index 1f52561918..bc3ef3f2ce 100644 --- a/web/app/components/app/overview/customize/index.tsx +++ b/web/app/components/app/overview/customize/index.tsx @@ -100,7 +100,16 @@ const CustomizeModal: FC = ({

{t(`${prefixCustomize}.way2.name`)}