mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Filter out non-image models with a callback
This commit is contained in:
4 files changed
+52
-15
No files matched your search
@@ -66,14 +66,15 @@ describe('ModelInput', () => {
|
||||
expect(screen.getByRole('combobox')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('accepts inputModalities and outputModalities props', () => {
|
||||
it('accepts modelFilter prop', () => {
|
||||
const onChange = vi.fn();
|
||||
const modelFilter = (model: { modalities?: string[] }) => model.modalities?.includes('image');
|
||||
render(
|
||||
<TestApp>
|
||||
<ModelInput
|
||||
value=""
|
||||
onChange={onChange}
|
||||
modalities={['image']}
|
||||
modelFilter={modelFilter}
|
||||
/>
|
||||
</TestApp>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user