mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-13 05:01:25 +00:00
Merge branch 'feat/dev-0.6' of https://github.com/eosphoros-ai/DB-GPT into feat/dev-0.6
This commit is contained in:
@@ -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">
|
||||||
|
@@ -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 };
|
||||||
|
Reference in New Issue
Block a user