fix: chat error message

This commit is contained in:
jialin
2024-09-27 19:19:56 +08:00
parent e48d21c8cb
commit 197488bff6
11 changed files with 68 additions and 30 deletions
@@ -139,7 +139,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
});
const list = _.filter(fileList, (file: any) => {
return filterReg.test(file.path) || _.includes(includeReg, file.path);
return filterRegGGUF.test(file.path) || _.includes(file.path, '.gguf');
});
return list;
@@ -160,9 +160,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
}
);
const fileList = _.filter(_.get(data, ['Data', 'Files']), (file: any) => {
return (
filterRegGGUF.test(file.Path) || _.includes(filterRegGGUF, file.Path)
);
return filterRegGGUF.test(file.Path) || _.includes(file.Path, '.gguf');
});
const list = _.map(fileList, (item: any) => {
+5 -2
View File
@@ -1,3 +1,4 @@
import AutoTooltip from '@/components/auto-tooltip';
import DeleteModal from '@/components/delete-modal';
import DropdownButtons from '@/components/drop-down-buttons';
import IconFont from '@/components/icon-font';
@@ -518,8 +519,10 @@ const Models: React.FC<ModelsProps> = ({
span={5}
render={(text, record: ListItem) => {
return (
<span>
<span className="m-r-5">{text}</span>
<span className="flex" style={{ maxWidth: '100%' }}>
<AutoTooltip className="m-r-5" showTitle={true} ghost>
{text}
</AutoTooltip>
<span>
{record.embedding_only && (
<Tag style={{ marginTop: 6 }} color="geekblue">