mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00

* feat: add tags property in Conversation model * feat: add ConversationTag model * feat: add the tags parameter to getConvosByPage * feat: add API route to ConversationTag * feat: add types of ConversationTag * feat: add data access functions for conversation tags * feat: add Bookmark table component * feat: Add an action to bookmark * feat: add Bookmark nav component * fix: failed test * refactor: made 'Saved' tag a constant * feat: add new bookmark to current conversation * chore: Add comment * fix: delete tag from conversations when it's deleted * fix: Update the query cache when the tag title is changed. * chore: fix typo * refactor: add description of rebuilding bookmarks * chore: remove unused variables * fix: position when adding a new bookmark * refactor: add comment, rename a function * refactor: add a unique constraint in ConversationTag * chore: add localizations
177 lines
2.8 KiB
JavaScript
177 lines
2.8 KiB
JavaScript
const conversationPreset = {
|
|
// endpoint: [azureOpenAI, openAI, bingAI, anthropic, chatGPTBrowser]
|
|
endpoint: {
|
|
type: String,
|
|
default: null,
|
|
required: true,
|
|
},
|
|
endpointType: {
|
|
type: String,
|
|
},
|
|
// for azureOpenAI, openAI, chatGPTBrowser only
|
|
model: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
// for azureOpenAI, openAI only
|
|
chatGptLabel: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
// for google only
|
|
modelLabel: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
promptPrefix: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
temperature: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
top_p: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
// for google only
|
|
topP: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
topK: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
maxOutputTokens: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
presence_penalty: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
frequency_penalty: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
// for bingai only
|
|
jailbreak: {
|
|
type: Boolean,
|
|
},
|
|
context: {
|
|
type: String,
|
|
},
|
|
systemMessage: {
|
|
type: String,
|
|
},
|
|
toneStyle: {
|
|
type: String,
|
|
},
|
|
file_ids: { type: [{ type: String }], default: undefined },
|
|
// deprecated
|
|
resendImages: {
|
|
type: Boolean,
|
|
},
|
|
// files
|
|
resendFiles: {
|
|
type: Boolean,
|
|
},
|
|
imageDetail: {
|
|
type: String,
|
|
},
|
|
/* assistants */
|
|
assistant_id: {
|
|
type: String,
|
|
},
|
|
instructions: {
|
|
type: String,
|
|
},
|
|
stop: { type: [{ type: String }], default: undefined },
|
|
isArchived: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
/* UI Components */
|
|
iconURL: {
|
|
type: String,
|
|
},
|
|
greeting: {
|
|
type: String,
|
|
},
|
|
spec: {
|
|
type: String,
|
|
},
|
|
tags: {
|
|
type: [String],
|
|
default: [],
|
|
},
|
|
tools: { type: [{ type: String }], default: undefined },
|
|
maxContextTokens: {
|
|
type: Number,
|
|
},
|
|
max_tokens: {
|
|
type: Number,
|
|
},
|
|
};
|
|
|
|
const agentOptions = {
|
|
model: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
// for azureOpenAI, openAI only
|
|
chatGptLabel: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
modelLabel: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
promptPrefix: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
temperature: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
top_p: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
// for google only
|
|
topP: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
topK: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
maxOutputTokens: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
presence_penalty: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
frequency_penalty: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
context: {
|
|
type: String,
|
|
},
|
|
systemMessage: {
|
|
type: String,
|
|
},
|
|
};
|
|
|
|
module.exports = {
|
|
conversationPreset,
|
|
agentOptions,
|
|
};
|