mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-11 22:09:44 +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 (
|
||||
<>
|
||||
<MuiLoading visible={loading} />
|
||||
{/* <Header
|
||||
<Header
|
||||
refreshHistory={getHistory}
|
||||
modelChange={(newModel: string) => {
|
||||
setModel(newModel);
|
||||
}}
|
||||
/> */}
|
||||
/>
|
||||
<div className="px-4 flex flex-1 flex-wrap overflow-hidden relative">
|
||||
{!!chartsData?.length && (
|
||||
<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;
|
||||
};
|
||||
|
||||
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 { scene } = useContext(ChatContext);
|
||||
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);
|
||||
}
|
||||
},
|
||||
[queryAgentURL],
|
||||
[queryAgentURL, app_code],
|
||||
);
|
||||
|
||||
return { chat, ctrl };
|
||||
|
Reference in New Issue
Block a user