mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30: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 {
|
||||
grounding,
|
||||
web_search,
|
||||
thinking = googleSettings.thinking.default,
|
||||
thinkingBudget = googleSettings.thinkingBudget.default,
|
||||
...modelOptions
|
||||
|
|
@ -191,7 +191,7 @@ export function getGoogleConfig(
|
|||
|
||||
const tools: GoogleAIToolType[] = [];
|
||||
|
||||
if (grounding) {
|
||||
if (web_search) {
|
||||
tools.push({ googleSearch: {} });
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -563,8 +563,8 @@ const google: Record<string, SettingDefinition> = {
|
|||
optionType: 'conversation',
|
||||
columnSpan: 2,
|
||||
},
|
||||
grounding: {
|
||||
key: 'grounding',
|
||||
web_search: {
|
||||
key: 'web_search',
|
||||
label: 'com_endpoint_use_search_grounding',
|
||||
labelCode: true,
|
||||
description: 'com_endpoint_google_use_search_grounding',
|
||||
|
|
@ -589,7 +589,7 @@ const googleConfig: SettingsConfiguration = [
|
|||
librechat.resendFiles,
|
||||
google.thinking,
|
||||
google.thinkingBudget,
|
||||
google.grounding,
|
||||
google.web_search,
|
||||
];
|
||||
|
||||
const googleCol1: SettingsConfiguration = [
|
||||
|
|
@ -607,7 +607,7 @@ const googleCol2: SettingsConfiguration = [
|
|||
librechat.resendFiles,
|
||||
google.thinking,
|
||||
google.thinkingBudget,
|
||||
google.grounding,
|
||||
google.web_search,
|
||||
];
|
||||
|
||||
const openAI: SettingsConfiguration = [
|
||||
|
|
|
|||
|
|
@ -637,10 +637,8 @@ export const tConversationSchema = z.object({
|
|||
reasoning_summary: eReasoningSummarySchema.optional().nullable(),
|
||||
/* OpenAI: use Responses API */
|
||||
useResponsesApi: z.boolean().optional(),
|
||||
/* OpenAI Responses API / Anthropic API */
|
||||
/* OpenAI Responses API / Anthropic API / Google API */
|
||||
web_search: z.boolean().optional(),
|
||||
/* Google: use Search Grounding */
|
||||
grounding: z.boolean().optional(),
|
||||
/* assistant */
|
||||
assistant_id: z.string().optional(),
|
||||
/* agents */
|
||||
|
|
@ -743,9 +741,7 @@ export const tQueryParamsSchema = tConversationSchema
|
|||
reasoning_summary: true,
|
||||
/** @endpoints openAI, custom, azureOpenAI */
|
||||
useResponsesApi: true,
|
||||
/** @endpoints google */
|
||||
grounding: true,
|
||||
/** @endpoints openAI, anthropic */
|
||||
/** @endpoints openAI, anthropic, google */
|
||||
web_search: true,
|
||||
/** @endpoints google, anthropic, bedrock */
|
||||
topP: true,
|
||||
|
|
@ -829,7 +825,7 @@ export const googleBaseSchema = tConversationSchema.pick({
|
|||
topK: true,
|
||||
thinking: true,
|
||||
thinkingBudget: true,
|
||||
grounding: true,
|
||||
web_search: true,
|
||||
iconURL: true,
|
||||
greeting: true,
|
||||
spec: true,
|
||||
|
|
@ -861,7 +857,7 @@ export const googleGenConfigSchema = z
|
|||
thinkingBudget: coerceNumber.optional(),
|
||||
})
|
||||
.optional(),
|
||||
grounding: z.boolean().optional(),
|
||||
web_search: z.boolean().optional(),
|
||||
})
|
||||
.strip()
|
||||
.optional();
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ export interface IConversation extends Document {
|
|||
reasoning_summary?: string;
|
||||
useResponsesApi?: boolean;
|
||||
web_search?: boolean;
|
||||
grounding?: boolean;
|
||||
// Additional fields
|
||||
files?: string[];
|
||||
expiredAt?: Date;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue