Feat: Allow agent operators to select speech-to-text models #3221 (#9534)

### What problem does this PR solve?

Feat: Allow agent operators to select speech-to-text models #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-19 09:40:01 +08:00
committed by GitHub
parent 2b9ed935f3
commit 32349481ef
12 changed files with 57 additions and 35 deletions

View File

@ -13,18 +13,18 @@ export interface NextInnerLLMSelectProps {
onChange?: (value: string) => void;
disabled?: boolean;
filter?: string;
showTTSModel?: boolean;
showSpeech2TextModel?: boolean;
}
const NextInnerLLMSelect = forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,
NextInnerLLMSelectProps
>(({ value, disabled, filter, showTTSModel = false }, ref) => {
>(({ value, disabled, filter, showSpeech2TextModel = false }, ref) => {
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
const ttsModel = useMemo(() => {
return showTTSModel ? [LlmModelType.TTS] : [];
}, [showTTSModel]);
return showSpeech2TextModel ? [LlmModelType.Speech2text] : [];
}, [showSpeech2TextModel]);
const modelTypes = useMemo(() => {
if (filter === LlmModelType.Chat) {