import React from 'react'; import { object, string } from 'zod'; import { Label } from '@librechat/client'; import { AuthKeys } from 'librechat-data-provider'; import type { TConfigProps } from '~/common'; import FileUpload from '~/components/Chat/Input/Files/FileUpload'; import { useLocalize, useMultipleKeys } from '~/hooks'; import InputWithLabel from './InputWithLabel'; const CredentialsSchema = object({ client_email: string().email().min(3), project_id: string().min(3), private_key: string().min(601), }); const validateCredentials = (credentials: Record) => { const result = CredentialsSchema.safeParse(credentials); return result.success; }; const GoogleConfig = ({ userKey, setUserKey }: Pick) => { const localize = useLocalize(); const { getMultiKey, setMultiKey } = useMultipleKeys(setUserKey); return ( <>

{ setMultiKey(AuthKeys.GOOGLE_SERVICE_KEY, JSON.stringify(data), userKey); }} /> setMultiKey(AuthKeys.GOOGLE_API_KEY, e.target.value ?? '', userKey) } label={localize('com_endpoint_config_google_api_key')} subLabel={localize('com_endpoint_config_google_gemini_api')} /> ); }; export default GoogleConfig;