1
0
Fork 0

fix(gui): handle missing prompts when parsing tokens

This commit is contained in:
Sean Sube 2023-12-20 21:07:03 -06:00
parent a3fad5c541
commit 7132f10e9d
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 6 additions and 2 deletions

View File

@ -48,8 +48,12 @@ export function PromptTextBlock(props: PromptTextBlockProps) {
}
const tokens = useMemo(() => {
if (doesExist(prompt)) {
const networks = extractNetworks(prompt);
return getNetworkTokens(models, networks);
}
return [];
}, [models, prompt]);
return <Stack spacing={2}>