mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-22 18:26:12 +01:00
* 🌊 feat: Add Disable Streaming Option in Configuration - Introduced a new setting to disable streaming responses in openAI, Azure, and custom endpoint parameter panels. - Updated translation files to include labels and descriptions for the disable streaming feature. - Modified relevant schemas and parameter settings to support the new disable streaming functionality. * 🔧 fix: disableStreaming state not persisting when returning to a conversation - Added disableStreaming field to the IPreset interface and conversationPreset. - Moved toggles and sliders around for nicer left-right UI split in parameters panel. - Removed old reference to 'grounding' ub conversationPreset (now web_search) and added web_search to IPreset.
151 lines
2.5 KiB
TypeScript
151 lines
2.5 KiB
TypeScript
import { Schema } from 'mongoose';
|
|
|
|
// @ts-ignore
|
|
export const conversationPreset = {
|
|
// endpoint: [azureOpenAI, openAI, anthropic, chatGPTBrowser]
|
|
endpoint: {
|
|
type: String,
|
|
default: null,
|
|
required: true,
|
|
},
|
|
endpointType: {
|
|
type: String,
|
|
},
|
|
// for azureOpenAI, openAI, chatGPTBrowser only
|
|
model: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
// for bedrock only
|
|
region: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
// for azureOpenAI, openAI only
|
|
chatGptLabel: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
// for google only
|
|
examples: { type: [{ type: Schema.Types.Mixed }], default: undefined },
|
|
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,
|
|
},
|
|
maxTokens: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
presence_penalty: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
frequency_penalty: {
|
|
type: Number,
|
|
required: false,
|
|
},
|
|
file_ids: { type: [{ type: String }], default: undefined },
|
|
// deprecated
|
|
resendImages: {
|
|
type: Boolean,
|
|
},
|
|
/* Anthropic only */
|
|
promptCache: {
|
|
type: Boolean,
|
|
},
|
|
thinking: {
|
|
type: Boolean,
|
|
},
|
|
thinkingBudget: {
|
|
type: Number,
|
|
},
|
|
system: {
|
|
type: String,
|
|
},
|
|
// files
|
|
resendFiles: {
|
|
type: Boolean,
|
|
},
|
|
imageDetail: {
|
|
type: String,
|
|
},
|
|
/* agents */
|
|
agent_id: {
|
|
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,
|
|
},
|
|
useResponsesApi: {
|
|
type: Boolean,
|
|
},
|
|
/** OpenAI Responses API / Anthropic API / Google API */
|
|
web_search: {
|
|
type: Boolean,
|
|
},
|
|
disableStreaming: {
|
|
type: Boolean,
|
|
},
|
|
/** Reasoning models only */
|
|
reasoning_effort: {
|
|
type: String,
|
|
},
|
|
reasoning_summary: {
|
|
type: String,
|
|
},
|
|
};
|