mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00

* 🚀 feat: Introduce data schemas and refactor models to use @librechat/data-schemas * 🚀 feat: Add installation step for Data Schemas Package in backend review workflow * chore: Add `data-schemas` package to update/rebuild packages scripts * chore: Update Dockerfile to include data-schemas package build process * fix: add missing @rollup/plugin-typescript package * chore: Add GitHub Actions workflow for publishing data-schemas package --------- Co-authored-by: Danny Avila <danny@librechat.ai>
57 lines
1 KiB
JavaScript
57 lines
1 KiB
JavaScript
const { logger } = require('~/config');
|
|
|
|
const options = [
|
|
{
|
|
label: 'com_ui_idea',
|
|
value: 'idea',
|
|
},
|
|
{
|
|
label: 'com_ui_travel',
|
|
value: 'travel',
|
|
},
|
|
{
|
|
label: 'com_ui_teach_or_explain',
|
|
value: 'teach_or_explain',
|
|
},
|
|
{
|
|
label: 'com_ui_write',
|
|
value: 'write',
|
|
},
|
|
{
|
|
label: 'com_ui_shop',
|
|
value: 'shop',
|
|
},
|
|
{
|
|
label: 'com_ui_code',
|
|
value: 'code',
|
|
},
|
|
{
|
|
label: 'com_ui_misc',
|
|
value: 'misc',
|
|
},
|
|
{
|
|
label: 'com_ui_roleplay',
|
|
value: 'roleplay',
|
|
},
|
|
{
|
|
label: 'com_ui_finance',
|
|
value: 'finance',
|
|
},
|
|
];
|
|
|
|
module.exports = {
|
|
/**
|
|
* Retrieves the categories asynchronously.
|
|
* @returns {Promise<TGetCategoriesResponse>} An array of category objects.
|
|
* @throws {Error} If there is an error retrieving the categories.
|
|
*/
|
|
getCategories: async () => {
|
|
try {
|
|
// const categories = await Categories.find();
|
|
return options;
|
|
} catch (error) {
|
|
logger.error('Error getting categories', error);
|
|
return [];
|
|
}
|
|
},
|
|
};
|