From 77b983759956322fcd2259de4f1094217535dcdb Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期四, 13 二月 2025 17:59:08 +0800 Subject: [PATCH] 登录问题优化 --- app/service/ragflow.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/app/service/ragflow.py b/app/service/ragflow.py index 08cc26f..f0e6fd8 100644 --- a/app/service/ragflow.py +++ b/app/service/ragflow.py @@ -54,7 +54,7 @@ response = await client.post( f"{self.base_url}/v1/user/login", headers={'Content-Type': 'application/json'}, - json={"email": email if email else f"{username}@example.com", "password": password} + json={"email": username if "@" in username else f"{username}@example.com", "password": password} ) if response.status_code != 200: raise Exception(f"Ragflow login failed: {response.text}") -- Gitblit v1.8.0