From 82c42b9ec5fdd78cf72c78f481d486d542964ff7 Mon Sep 17 00:00:00 2001 From: HowardChan Date: Wed, 11 Sep 2024 10:25:45 +0800 Subject: [PATCH 01/32] fix:error when adding the ollama embedding model (#8236) Co-authored-by: crazywoola <427733928@qq.com> --- .../ollama/text_embedding/text_embedding.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py b/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py index 60b85197be62d6..ffa9ea2f90791f 100644 --- a/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py +++ b/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py @@ -77,15 +77,10 @@ def _invoke( inputs.append(text) # Prepare the payload for the request - payload = { - "input": inputs, - "model": model, - } + payload = {"input": inputs, "model": model, "options": {"use_mmap": "true"}} - # Make the request to the OpenAI API - response = requests.post( - endpoint_url, headers=headers, data=json.dumps(payload), timeout=(10, 300), options={"use_mmap": "true"} - ) + # Make the request to the Ollama API + response = requests.post(endpoint_url, headers=headers, data=json.dumps(payload), timeout=(10, 300)) response.raise_for_status() # Raise an exception for HTTP errors response_data = response.json() From 60913970dc74cd5328bf16a53e434592959ee37d Mon Sep 17 00:00:00 2001 From: Nam Vu Date: Wed, 11 Sep 2024 09:58:35 +0700 Subject: [PATCH 02/32] fix: CHECK_UPDATE_URL comment (#8235) --- docker/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/.env.example b/docker/.env.example index ca24c667f6b119..7e4430a37da792 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -75,7 +75,7 @@ INIT_PASSWORD= DEPLOY_ENV=PRODUCTION # Whether to enable the version check policy. -# If set to empty, https://updates.dify.ai will not be called for version check. +# If set to empty, https://updates.dify.ai will be called for version check. CHECK_UPDATE_URL=https://updates.dify.ai # Used to change the OpenAI base address, default is https://api.openai.com/v1. From d964a4218fb93c01523567ca735dc54a250c88c0 Mon Sep 17 00:00:00 2001 From: douxc Date: Tue, 20 Aug 2024 15:22:19 +0800 Subject: [PATCH 03/32] rebase main --- web/app/signin/components/SSOAuthButton.tsx | 9 + web/app/signin/normalForm.tsx | 210 ++- web/i18n/en-US/login.ts | 4 +- web/i18n/zh-Hans/login.ts | 4 +- web/i18n/zh-Hant/login.ts | 4 +- web/yarn.lock | 1733 +++++++++++-------- 6 files changed, 1083 insertions(+), 881 deletions(-) create mode 100644 web/app/signin/components/SSOAuthButton.tsx diff --git a/web/app/signin/components/SSOAuthButton.tsx b/web/app/signin/components/SSOAuthButton.tsx new file mode 100644 index 00000000000000..ac8b30d3aff541 --- /dev/null +++ b/web/app/signin/components/SSOAuthButton.tsx @@ -0,0 +1,9 @@ +import Button from '@/app/components/base/button' + +export default function SSOAuthButton() { + return ( + + ) +} diff --git a/web/app/signin/normalForm.tsx b/web/app/signin/normalForm.tsx index 7f23c7d22e5fff..5619640e941d5b 100644 --- a/web/app/signin/normalForm.tsx +++ b/web/app/signin/normalForm.tsx @@ -145,127 +145,125 @@ const NormalForm = () => { return ( <>
-

{t('login.pageTitle')}

+

{t('login.pageTitle')}

{t('login.welcome')}

- {!useEmailLogin && ( -
-
- - - + + + + <> +
+