feat: new dbgpts modules (#1910)

Co-authored-by: 途杨 <tuyang.yhj@antgroup.com>
Co-authored-by: lhwan <1017484907@qq.com>
This commit is contained in:
明天
2024-08-28 21:31:42 +08:00
committed by GitHub
parent bb5d2d1f3d
commit d7a893e1a7
289 changed files with 3533 additions and 901 deletions

View File

@@ -15,6 +15,7 @@ const ChatInputPanel: React.FC<{ ctrl: AbortController }> = ({ ctrl }) => {
const searchParams = useSearchParams();
const scene = searchParams?.get('scene') ?? '';
const select_param = searchParams?.get('select_param') ?? '';
const [userInput, setUserInput] = useState<string>('');
const [isFocus, setIsFocus] = useState<boolean>(false);
@@ -36,8 +37,9 @@ const ChatInputPanel: React.FC<{ ctrl: AbortController }> = ({ ctrl }) => {
setUserInput('');
}, 0);
await handleChat(userInput, {
app_code: appInfo.app_code,
app_code: appInfo.app_code || '',
...(paramKey.includes('temperature') && { temperature: temperatureValue }),
select_param,
...(paramKey.includes('resource') && {
select_param: typeof resourceValue === 'string' ? resourceValue : JSON.stringify(resourceValue) || currentDialogue.select_param,
}),