mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🌊 feat: Add Disable Streaming Toggle (#8177)
* 🌊 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.
This commit is contained in:
parent
52bbac3a37
commit
7f8c327509
6 changed files with 27 additions and 3 deletions
|
@ -284,6 +284,19 @@ const openAIParams: Record<string, SettingDefinition> = {
|
|||
optionType: 'model',
|
||||
columnSpan: 4,
|
||||
},
|
||||
disableStreaming: {
|
||||
key: 'disableStreaming',
|
||||
label: 'com_endpoint_disable_streaming_label',
|
||||
labelCode: true,
|
||||
description: 'com_endpoint_disable_streaming',
|
||||
descriptionCode: true,
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
component: 'switch',
|
||||
optionType: 'model',
|
||||
showDefault: false,
|
||||
columnSpan: 2,
|
||||
} as const,
|
||||
};
|
||||
|
||||
const anthropic: Record<string, SettingDefinition> = {
|
||||
|
@ -626,6 +639,7 @@ const openAI: SettingsConfiguration = [
|
|||
openAIParams.reasoning_effort,
|
||||
openAIParams.useResponsesApi,
|
||||
openAIParams.reasoning_summary,
|
||||
openAIParams.disableStreaming,
|
||||
];
|
||||
|
||||
const openAICol1: SettingsConfiguration = [
|
||||
|
@ -648,6 +662,7 @@ const openAICol2: SettingsConfiguration = [
|
|||
openAIParams.reasoning_summary,
|
||||
openAIParams.useResponsesApi,
|
||||
openAIParams.web_search,
|
||||
openAIParams.disableStreaming,
|
||||
];
|
||||
|
||||
const anthropicConfig: SettingsConfiguration = [
|
||||
|
|
|
@ -639,6 +639,8 @@ export const tConversationSchema = z.object({
|
|||
useResponsesApi: z.boolean().optional(),
|
||||
/* OpenAI Responses API / Anthropic API / Google API */
|
||||
web_search: z.boolean().optional(),
|
||||
/* disable streaming */
|
||||
disableStreaming: z.boolean().optional(),
|
||||
/* assistant */
|
||||
assistant_id: z.string().optional(),
|
||||
/* agents */
|
||||
|
@ -743,6 +745,8 @@ export const tQueryParamsSchema = tConversationSchema
|
|||
useResponsesApi: true,
|
||||
/** @endpoints openAI, anthropic, google */
|
||||
web_search: true,
|
||||
/** @endpoints openAI, custom, azureOpenAI */
|
||||
disableStreaming: true,
|
||||
/** @endpoints google, anthropic, bedrock */
|
||||
topP: true,
|
||||
/** @endpoints google, anthropic */
|
||||
|
@ -1075,6 +1079,7 @@ export const openAIBaseSchema = tConversationSchema.pick({
|
|||
reasoning_summary: true,
|
||||
useResponsesApi: true,
|
||||
web_search: true,
|
||||
disableStreaming: true,
|
||||
});
|
||||
|
||||
export const openAISchema = openAIBaseSchema
|
||||
|
|
|
@ -134,12 +134,11 @@ export const conversationPreset = {
|
|||
useResponsesApi: {
|
||||
type: Boolean,
|
||||
},
|
||||
/** OpenAI Responses API / Anthropic API */
|
||||
/** OpenAI Responses API / Anthropic API / Google API */
|
||||
web_search: {
|
||||
type: Boolean,
|
||||
},
|
||||
/** Google */
|
||||
grounding: {
|
||||
disableStreaming: {
|
||||
type: Boolean,
|
||||
},
|
||||
/** Reasoning models only */
|
||||
|
|
|
@ -48,6 +48,8 @@ export interface IPreset extends Document {
|
|||
reasoning_effort?: string;
|
||||
reasoning_summary?: string;
|
||||
useResponsesApi?: boolean;
|
||||
web_search?: boolean;
|
||||
disableStreaming?: boolean;
|
||||
// end of additional fields
|
||||
agentOptions?: unknown;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ export interface IConversation extends Document {
|
|||
reasoning_summary?: string;
|
||||
useResponsesApi?: boolean;
|
||||
web_search?: boolean;
|
||||
disableStreaming?: boolean;
|
||||
// Additional fields
|
||||
files?: string[];
|
||||
expiredAt?: Date;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue