-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter presets and processors based on backend version (#537)
Signed-off-by: Kama Huang <[email protected]> Co-authored-by: Kama Huang <[email protected]> (cherry picked from commit ea08b7d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d61a05a
commit 03c9d80
Showing
16 changed files
with
594 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
public/configs/ingest_processors/text_embedding_ingest_processor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { PROCESSOR_TYPE } from '../../../common'; | ||
import { generateId } from '../../utils'; | ||
import { Processor } from '../processor'; | ||
|
||
export class TextEmbeddingIngestProcessor extends Processor { | ||
constructor() { | ||
super(); | ||
this.name = 'Text Embedding Processor'; | ||
this.type = PROCESSOR_TYPE.TEXT_EMBEDDING; | ||
this.id = generateId('text_embedding_processor_ingest'); | ||
this.fields = [ | ||
{ | ||
id: 'model_id', | ||
type: 'string', | ||
}, | ||
{ | ||
id: 'field_map', | ||
type: 'map', | ||
}, | ||
]; | ||
this.optionalFields = [ | ||
{ | ||
id: 'description', | ||
type: 'string', | ||
}, | ||
{ | ||
id: 'tag', | ||
type: 'string', | ||
}, | ||
{ | ||
id: 'batch_size', | ||
type: 'number', | ||
value: 1, | ||
}, | ||
]; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
public/configs/ingest_processors/text_image_embedding_ingest_processor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { PROCESSOR_TYPE } from '../../../common'; | ||
import { generateId } from '../../utils'; | ||
import { Processor } from '../processor'; | ||
|
||
export class TextImageEmbeddingIngestProcessor extends Processor { | ||
constructor() { | ||
super(); | ||
this.name = 'Text Image Embedding Processor'; | ||
this.type = PROCESSOR_TYPE.TEXT_IMAGE_EMBEDDING; | ||
this.id = generateId('text_image_embedding_processor_ingest'); | ||
this.fields = [ | ||
{ | ||
id: 'model_id', | ||
type: 'string', | ||
}, | ||
{ | ||
id: 'embedding', | ||
type: 'string', | ||
}, | ||
{ | ||
id: 'field_map', | ||
type: 'map', | ||
}, | ||
]; | ||
this.optionalFields = [ | ||
{ | ||
id: 'description', | ||
type: 'string', | ||
}, | ||
{ | ||
id: 'tag', | ||
type: 'string', | ||
}, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.