mirror of
https://github.com/langgenius/dify.git
synced 2025-07-04 15:50:19 +00:00
13 lines
280 B
TypeScript
13 lines
280 B
TypeScript
![]() |
import {
|
||
|
categoryKeys,
|
||
|
tagKeys,
|
||
|
} from './constants'
|
||
|
|
||
|
export const getValidTagKeys = (tags: string[]) => {
|
||
|
return tags.filter(tag => tagKeys.includes(tag))
|
||
|
}
|
||
|
|
||
|
export const getValidCategoryKeys = (category?: string) => {
|
||
|
return categoryKeys.find(key => key === category)
|
||
|
}
|