🐛 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:
Danny Avila 2025-01-08 21:57:00 -05:00 committed by GitHub
parent 916faf6447
commit 69a9b8b911
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 201 additions and 148 deletions

View file

@ -5,6 +5,7 @@ import type {
QueryObserverResult,
} from '@tanstack/react-query';
import { initialModelsConfig, LocalStorageKeys } from '../config';
import type { TStartupConfig } from '../config';
import { defaultOrderQuery } from '../types/assistants';
import * as dataService from '../data-service';
import * as m from '../types/mutations';
@ -423,18 +424,14 @@ export const useUpdateUserPluginsMutation = (
};
export const useGetStartupConfig = (
config?: UseQueryOptions<t.TStartupConfig>,
): QueryObserverResult<t.TStartupConfig> => {
return useQuery<t.TStartupConfig>(
[QueryKeys.startupConfig],
() => dataService.getStartupConfig(),
{
refetchOnWindowFocus: false,
refetchOnReconnect: false,
refetchOnMount: false,
...config,
},
);
config?: UseQueryOptions<TStartupConfig>,
): QueryObserverResult<TStartupConfig> => {
return useQuery<TStartupConfig>([QueryKeys.startupConfig], () => dataService.getStartupConfig(), {
refetchOnWindowFocus: false,
refetchOnReconnect: false,
refetchOnMount: false,
...config,
});
};
export const useGetCustomConfigSpeechQuery = (