Merge branch 'feat/dev-0.6' of https://github.com/eosphoros-ai/DB-GPT into feat/dev-0.6

This commit is contained in:
yhjun1026
2024-08-13 17:32:59 +08:00
2 changed files with 4 additions and 4 deletions

View File

@@ -107,12 +107,12 @@ const ChatContainer = () => {
return ( return (
<> <>
<MuiLoading visible={loading} /> <MuiLoading visible={loading} />
{/* <Header <Header
refreshHistory={getHistory} refreshHistory={getHistory}
modelChange={(newModel: string) => { modelChange={(newModel: string) => {
setModel(newModel); setModel(newModel);
}} }}
/> */} />
<div className="px-4 flex flex-1 flex-wrap overflow-hidden relative"> <div className="px-4 flex flex-1 flex-wrap overflow-hidden relative">
{!!chartsData?.length && ( {!!chartsData?.length && (
<div className="w-full pb-4 xl:w-3/4 h-1/2 xl:pr-4 xl:h-full overflow-y-auto"> <div className="w-full pb-4 xl:w-3/4 h-1/2 xl:pr-4 xl:h-full overflow-y-auto">

View File

@@ -22,7 +22,7 @@ type ChatParams = {
onError?: (content: string, error?: Error) => void; onError?: (content: string, error?: Error) => void;
}; };
const useChat = ({ queryAgentURL = '/api/v1/chat/completions', app_code = '' }: Props) => { const useChat = ({ queryAgentURL = '/api/v1/chat/completions', app_code }: Props) => {
const [ctrl, setCtrl] = useState<AbortController>({} as AbortController); const [ctrl, setCtrl] = useState<AbortController>({} as AbortController);
const { scene } = useContext(ChatContext); const { scene } = useContext(ChatContext);
const chat = useCallback( const chat = useCallback(
@@ -103,7 +103,7 @@ const useChat = ({ queryAgentURL = '/api/v1/chat/completions', app_code = '' }:
onError?.('Sorry, We meet some error, please try agin later.', err as Error); onError?.('Sorry, We meet some error, please try agin later.', err as Error);
} }
}, },
[queryAgentURL], [queryAgentURL, app_code],
); );
return { chat, ctrl }; return { chat, ctrl };