mirror of
https://github.com/langgenius/dify.git
synced 2026-02-23 03:17:57 +08: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)
|
|
}
|