feat(core): Support max output tokens parameter (#2218)

This commit is contained in:
Fangyin Cheng
2024-12-18 17:19:18 +08:00
committed by GitHub
parent b05febbf77
commit 7f4b5e79cf
121 changed files with 333 additions and 219 deletions

View File

@@ -17,6 +17,7 @@ const ChatInputPanel: React.FC<{ ctrl: AbortController }> = ({ ctrl }) => {
appInfo,
currentDialogue,
temperatureValue,
maxNewTokensValue,
resourceValue,
refreshDialogList,
} = useContext(ChatContentContext);
@@ -47,6 +48,7 @@ const ChatInputPanel: React.FC<{ ctrl: AbortController }> = ({ ctrl }) => {
await handleChat(userInput, {
app_code: appInfo.app_code || '',
...(paramKey.includes('temperature') && { temperature: temperatureValue }),
...(paramKey.includes('max_new_tokens') && { max_new_tokens: maxNewTokensValue }),
select_param,
...(paramKey.includes('resource') && {
select_param: