mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
🐛 fix: Ensure Default ModelSpecs Are Set Correctly (#5218)
* 🐛 fix: default modelSpecs not being set
* feat: Add imageDetail parameter for OpenAI endpoints in tQueryParamsSchema
* feat: Implement processModelSpecs function to enhance model specs processing from configuration
* feat: Refactor configuration schemas and types for improved structure and clarity
* feat: Add append_current_datetime parameter to tQueryParamsSchema for enhanced endpoint functionality
* fix: Add endpointType to getSaveOptions and enhance endpoint handling in Settings component
* fix: Change endpointType to be nullable and optional in tConversationSchema for improved flexibility
* fix: allow save & submit for google endpoint
This commit is contained in:
parent
916faf6447
commit
69a9b8b911
15 changed files with 201 additions and 148 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { EModelEndpoint } from 'librechat-data-provider';
|
||||
import { useRef, useEffect, useCallback } from 'react';
|
||||
import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { useUpdateMessageMutation } from 'librechat-data-provider/react-query';
|
||||
import type { TEditProps } from '~/common';
|
||||
|
|
@ -31,8 +30,6 @@ const EditMessage = ({
|
|||
const textAreaRef = useRef<HTMLTextAreaElement | null>(null);
|
||||
|
||||
const { conversationId, parentMessageId, messageId } = message;
|
||||
const { endpoint: _endpoint, endpointType } = conversation ?? { endpoint: null };
|
||||
const endpoint = endpointType ?? _endpoint;
|
||||
const updateMessageMutation = useUpdateMessageMutation(conversationId ?? '');
|
||||
const localize = useLocalize();
|
||||
|
||||
|
|
@ -181,9 +178,7 @@ const EditMessage = ({
|
|||
<button
|
||||
ref={submitButtonRef}
|
||||
className="btn btn-primary relative mr-2"
|
||||
disabled={
|
||||
isSubmitting || (endpoint === EModelEndpoint.google && !message.isCreatedByUser)
|
||||
}
|
||||
disabled={isSubmitting}
|
||||
onClick={handleSubmit(resubmitMessage)}
|
||||
>
|
||||
{localize('com_ui_save_submit')}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue