fix: change benchmark model name query condition to input
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { modelCategoriesMap } from '@/pages/llmodels/config';
|
||||
import { SearchOutlined } from '@ant-design/icons';
|
||||
import { BaseSelect, FilterForm } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -23,17 +22,13 @@ interface FilterFormContentProps {
|
||||
initialValues?: any;
|
||||
open?: boolean;
|
||||
ref?: any;
|
||||
modelList?: Global.BaseOption<number, { categories: string[] }>[];
|
||||
onClose?: () => void;
|
||||
onClear?: () => void;
|
||||
onValuesChange: (values: any) => void;
|
||||
}
|
||||
|
||||
const FilterFormContent: React.FC<FilterFormContentProps> = forwardRef(
|
||||
(
|
||||
{ initialValues, onClose, onClear, onValuesChange, open, modelList },
|
||||
ref
|
||||
) => {
|
||||
({ initialValues, onClose, onClear, onValuesChange, open }, ref) => {
|
||||
const intl = useIntl();
|
||||
const filterRef = useRef<any>(null);
|
||||
|
||||
@@ -41,15 +36,6 @@ const FilterFormContent: React.FC<FilterFormContentProps> = forwardRef(
|
||||
onValuesChange?.(allValues);
|
||||
};
|
||||
|
||||
const modelOptions = modelList
|
||||
?.filter((item) => {
|
||||
return item.categories?.includes(modelCategoriesMap.llm);
|
||||
})
|
||||
.map((item) => ({
|
||||
label: item.label,
|
||||
value: item.label
|
||||
}));
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
reset: () => {
|
||||
filterRef.current?.reset();
|
||||
@@ -116,16 +102,17 @@ const FilterFormContent: React.FC<FilterFormContentProps> = forwardRef(
|
||||
</Form.Item>
|
||||
<Label>{intl.formatMessage({ id: 'benchmark.table.model' })}</Label>
|
||||
<Form.Item noStyle name="model_name">
|
||||
{/* <PillButtonGroup
|
||||
options={modelCategories.filter((item) => item.value)}
|
||||
></PillButtonGroup> */}
|
||||
<BaseSelect
|
||||
allowClear
|
||||
<Input
|
||||
prefix={
|
||||
<SearchOutlined
|
||||
style={{ color: 'var(--ant-color-text-placeholder)' }}
|
||||
></SearchOutlined>
|
||||
}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'benchmark.table.filter.bymodel'
|
||||
})}
|
||||
options={modelOptions}
|
||||
></BaseSelect>
|
||||
allowClear
|
||||
></Input>
|
||||
</Form.Item>
|
||||
</Content>
|
||||
</FilterForm>
|
||||
|
||||
Reference in New Issue
Block a user