mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: add preset in server
This commit is contained in:
parent
d76efa7874
commit
80ef5008dd
8 changed files with 224 additions and 72 deletions
27
api/models/schema/presetSchema.js
Normal file
27
api/models/schema/presetSchema.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
const mongoose = require('mongoose');
|
||||
const conversationPreset = require('./conversationPreset');
|
||||
const presetSchema = mongoose.Schema(
|
||||
{
|
||||
presetId: {
|
||||
type: String,
|
||||
unique: true,
|
||||
required: true,
|
||||
index: true
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: 'New Chat',
|
||||
meiliIndex: true
|
||||
},
|
||||
user: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
...conversationPreset
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
const Preset = mongoose.models.Preset || mongoose.model('Preset', presetSchema);
|
||||
|
||||
module.exports = Preset;
|
||||
Loading…
Add table
Add a link
Reference in a new issue