diff --git a/src/backend/bisheng/api/services/assistant_agent.py b/src/backend/bisheng/api/services/assistant_agent.py index ab75dd0ee..5646d22ed 100644 --- a/src/backend/bisheng/api/services/assistant_agent.py +++ b/src/backend/bisheng/api/services/assistant_agent.py @@ -381,8 +381,8 @@ async def react_run(self, query: str, chat_history: List = None, callback: Callb 'input': query, 'chat_history': chat_history }, config=RunnableConfig(callbacks=callback)) - print(result) + logger.debug(f"react_run result: {result}") output = result['agent_outcome'].return_values['output'] if isinstance(output, dict): - output = output['text'] + output = list(output.values())[0] return [AIMessage(content=output)] diff --git a/src/backend/pyproject.toml b/src/backend/pyproject.toml index 41f0352b8..e3d851999 100644 --- a/src/backend/pyproject.toml +++ b/src/backend/pyproject.toml @@ -1,4 +1,3 @@ - [tool.poetry] name = "bisheng" version = "0.3.3" @@ -89,7 +88,7 @@ matplotlib = "3.8.4" cchardet = "^2.1.7" llama-index = "0.9.48" tenacity = "<8.4.0" -bisheng-ragas = {version = "^1.0.0", source = "dataelem-index"} +bisheng-ragas = { version = "^1.0.0", source = "dataelem-index" } [tool.poetry.dev-dependencies] black = "^23.1.0" diff --git a/src/bisheng-langchain/requirements.txt b/src/bisheng-langchain/requirements.txt index eb940fce9..2ed808c39 100644 --- a/src/bisheng-langchain/requirements.txt +++ b/src/bisheng-langchain/requirements.txt @@ -10,7 +10,7 @@ pydantic==1.10.13 pymupdf==1.23.8 shapely==2.0.2 filetype==1.2.0 -langgraph==0.1.5 +langgraph==0.0.50 openai==1.14.3 langchain-openai==0.1.0 llama-index==0.9.48 diff --git a/src/frontend/src/components/bs-comp/chatComponent/ChatInput.tsx b/src/frontend/src/components/bs-comp/chatComponent/ChatInput.tsx index 63ae0405c..6d52cfafb 100644 --- a/src/frontend/src/components/bs-comp/chatComponent/ChatInput.tsx +++ b/src/frontend/src/components/bs-comp/chatComponent/ChatInput.tsx @@ -200,6 +200,7 @@ export default function ChatInput({ clear, form, stop, questions, inputForm, wsU if (data.type === 'start') { createWsMsg(data) } else if (data.type === 'stream') { + //@ts-ignore updateCurrentMessage({ chat_id: data.chat_id, message: data.message, @@ -256,7 +257,7 @@ export default function ChatInput({ clear, form, stop, questions, inputForm, wsU {/* form */} { formShow &&
-
+
{inputForm}
diff --git a/src/frontend/src/components/bs-comp/sheets/SkillTempSheet.tsx b/src/frontend/src/components/bs-comp/sheets/SkillTempSheet.tsx index 518e70afb..52e567690 100644 --- a/src/frontend/src/components/bs-comp/sheets/SkillTempSheet.tsx +++ b/src/frontend/src/components/bs-comp/sheets/SkillTempSheet.tsx @@ -37,7 +37,7 @@ export default function SkillTempSheet({ children, onSelect }) { {t('skills.skillTemplateChoose')} setKeyword(e.target.value)} />
-
+
{ } @@ -36,6 +39,25 @@ const SearchInput = React.forwardRef( + ({ className, inputClassName, iconClassName, ...props }, ref) => { + const [type, setType] = useState('password') + const handleShowPwd = () => { + type === 'password' ? setType('text') : setType('password') + } + return
+ + { + type === 'password' + ? + : + } +
+ } +) + +PasswordInput.displayName = 'PasswordInput' + /** * 多行文本 @@ -144,4 +166,4 @@ const InputList = React.forwardRef((props, ref)
- passwordRef.current.value = e.target.value} diff --git a/src/frontend/src/pages/LoginPage/resetPwd.tsx b/src/frontend/src/pages/LoginPage/resetPwd.tsx index ce9c90f88..ed9bc08ad 100644 --- a/src/frontend/src/pages/LoginPage/resetPwd.tsx +++ b/src/frontend/src/pages/LoginPage/resetPwd.tsx @@ -4,7 +4,7 @@ import { useEffect, useRef } from "react"; import { useTranslation } from 'react-i18next'; import { useLocation, useNavigate } from 'react-router-dom'; import { Button } from "../../components/bs-ui/button"; -import { Input } from "../../components/bs-ui/input"; +import { PasswordInput } from "../../components/bs-ui/input"; import { loggedChangePasswordApi, changePasswordApi } from "../../controllers/API/user"; import { captureAndAlertRequestErrorHoc } from "../../controllers/request"; import { PWD_RULE, handleEncrypt } from './utils'; @@ -89,30 +89,27 @@ export const ResetPwdPage = () => {
-
-
-