mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
* refactor: Update staticCache to use oneDayInSeconds for sMaxAge and maxAge * refactor: role updates * style: first pass cursor * style: Update nested list styles in style.css * feat: setIsSubmitting to true in message handler to prevent edge case where submitting turns false during message stream * feat: Add logic to redirect to conversation page after creating a new conversation * refactor: Trim code string before copying in CodeBlock component * feat: configSchema bookmarks and presets defaults * feat: Update loadDefaultInterface to handle undefined config * refactor: use for compression check * feat: first pass, query params * fix: styling issues for prompt cards * feat: anthropic prompt caching UI switch * chore: Update static file cache control defaults/comments in .env.example * ci: fix tests * ci: fix tests * chore: use "submitting" class server error connection suspense fallback
181 lines
2.8 KiB
JavaScript
181 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,
|
|
},
|
|
/* Anthropic only */
|
|
promptCache: {
|
|
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,
|
|
};
|