mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🔄 refactor: Google grounding field to web_search for Consistency (#8285)
- Updated the Google configuration and related schemas to replace 'grounding' with 'web_search' for consistency. - Adjusted the logic in the getGoogleConfig function to reflect the new naming convention. - Ensured all references in parameter settings and conversation schemas are updated accordingly.
This commit is contained in:
parent
e60c0cf201
commit
35f548a94d
4 changed files with 10 additions and 15 deletions
|
|
@ -106,7 +106,7 @@ export function getGoogleConfig(
|
||||||
const authHeader = options.authHeader;
|
const authHeader = options.authHeader;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
grounding,
|
web_search,
|
||||||
thinking = googleSettings.thinking.default,
|
thinking = googleSettings.thinking.default,
|
||||||
thinkingBudget = googleSettings.thinkingBudget.default,
|
thinkingBudget = googleSettings.thinkingBudget.default,
|
||||||
...modelOptions
|
...modelOptions
|
||||||
|
|
@ -191,7 +191,7 @@ export function getGoogleConfig(
|
||||||
|
|
||||||
const tools: GoogleAIToolType[] = [];
|
const tools: GoogleAIToolType[] = [];
|
||||||
|
|
||||||
if (grounding) {
|
if (web_search) {
|
||||||
tools.push({ googleSearch: {} });
|
tools.push({ googleSearch: {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -563,8 +563,8 @@ const google: Record<string, SettingDefinition> = {
|
||||||
optionType: 'conversation',
|
optionType: 'conversation',
|
||||||
columnSpan: 2,
|
columnSpan: 2,
|
||||||
},
|
},
|
||||||
grounding: {
|
web_search: {
|
||||||
key: 'grounding',
|
key: 'web_search',
|
||||||
label: 'com_endpoint_use_search_grounding',
|
label: 'com_endpoint_use_search_grounding',
|
||||||
labelCode: true,
|
labelCode: true,
|
||||||
description: 'com_endpoint_google_use_search_grounding',
|
description: 'com_endpoint_google_use_search_grounding',
|
||||||
|
|
@ -589,7 +589,7 @@ const googleConfig: SettingsConfiguration = [
|
||||||
librechat.resendFiles,
|
librechat.resendFiles,
|
||||||
google.thinking,
|
google.thinking,
|
||||||
google.thinkingBudget,
|
google.thinkingBudget,
|
||||||
google.grounding,
|
google.web_search,
|
||||||
];
|
];
|
||||||
|
|
||||||
const googleCol1: SettingsConfiguration = [
|
const googleCol1: SettingsConfiguration = [
|
||||||
|
|
@ -607,7 +607,7 @@ const googleCol2: SettingsConfiguration = [
|
||||||
librechat.resendFiles,
|
librechat.resendFiles,
|
||||||
google.thinking,
|
google.thinking,
|
||||||
google.thinkingBudget,
|
google.thinkingBudget,
|
||||||
google.grounding,
|
google.web_search,
|
||||||
];
|
];
|
||||||
|
|
||||||
const openAI: SettingsConfiguration = [
|
const openAI: SettingsConfiguration = [
|
||||||
|
|
|
||||||
|
|
@ -637,10 +637,8 @@ export const tConversationSchema = z.object({
|
||||||
reasoning_summary: eReasoningSummarySchema.optional().nullable(),
|
reasoning_summary: eReasoningSummarySchema.optional().nullable(),
|
||||||
/* OpenAI: use Responses API */
|
/* OpenAI: use Responses API */
|
||||||
useResponsesApi: z.boolean().optional(),
|
useResponsesApi: z.boolean().optional(),
|
||||||
/* OpenAI Responses API / Anthropic API */
|
/* OpenAI Responses API / Anthropic API / Google API */
|
||||||
web_search: z.boolean().optional(),
|
web_search: z.boolean().optional(),
|
||||||
/* Google: use Search Grounding */
|
|
||||||
grounding: z.boolean().optional(),
|
|
||||||
/* assistant */
|
/* assistant */
|
||||||
assistant_id: z.string().optional(),
|
assistant_id: z.string().optional(),
|
||||||
/* agents */
|
/* agents */
|
||||||
|
|
@ -743,9 +741,7 @@ export const tQueryParamsSchema = tConversationSchema
|
||||||
reasoning_summary: true,
|
reasoning_summary: true,
|
||||||
/** @endpoints openAI, custom, azureOpenAI */
|
/** @endpoints openAI, custom, azureOpenAI */
|
||||||
useResponsesApi: true,
|
useResponsesApi: true,
|
||||||
/** @endpoints google */
|
/** @endpoints openAI, anthropic, google */
|
||||||
grounding: true,
|
|
||||||
/** @endpoints openAI, anthropic */
|
|
||||||
web_search: true,
|
web_search: true,
|
||||||
/** @endpoints google, anthropic, bedrock */
|
/** @endpoints google, anthropic, bedrock */
|
||||||
topP: true,
|
topP: true,
|
||||||
|
|
@ -829,7 +825,7 @@ export const googleBaseSchema = tConversationSchema.pick({
|
||||||
topK: true,
|
topK: true,
|
||||||
thinking: true,
|
thinking: true,
|
||||||
thinkingBudget: true,
|
thinkingBudget: true,
|
||||||
grounding: true,
|
web_search: true,
|
||||||
iconURL: true,
|
iconURL: true,
|
||||||
greeting: true,
|
greeting: true,
|
||||||
spec: true,
|
spec: true,
|
||||||
|
|
@ -861,7 +857,7 @@ export const googleGenConfigSchema = z
|
||||||
thinkingBudget: coerceNumber.optional(),
|
thinkingBudget: coerceNumber.optional(),
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
grounding: z.boolean().optional(),
|
web_search: z.boolean().optional(),
|
||||||
})
|
})
|
||||||
.strip()
|
.strip()
|
||||||
.optional();
|
.optional();
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ export interface IConversation extends Document {
|
||||||
reasoning_summary?: string;
|
reasoning_summary?: string;
|
||||||
useResponsesApi?: boolean;
|
useResponsesApi?: boolean;
|
||||||
web_search?: boolean;
|
web_search?: boolean;
|
||||||
grounding?: boolean;
|
|
||||||
// Additional fields
|
// Additional fields
|
||||||
files?: string[];
|
files?: string[];
|
||||||
expiredAt?: Date;
|
expiredAt?: Date;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue