mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
📊 refactor: use Parameters from Side Panel for OpenAI, Anthropic, and Custom endpoints (#4092)
* feat: openai parameters * refactor: anthropic/bedrock params, add preset params for openai, and add azure params * refactor: use 'compact' schemas for anthropic/openai * refactor: ensure custom endpoints are properly recognized as valid param endpoints * refactor: update paramEndpoints check in BaseClient.js * chore: optimize logging by omitting modelsConfig * refactor: update label casing in baseDefinitions combobox items * fix: remove 'stop' model options when using o1 series models * refactor(AnthropicClient): remove default `stop` value * refactor: reset params on parameters change * refactor: remove unused default parameter value map introduced in prior commit * fix: 'min' typo for 'max' value * refactor: preset settings * refactor: replace dropdown for image detail with slider; remove `preventDelayedUpdate` condition from DynamicSlider * fix: localizations for freq./pres. penalty * Refactor maxOutputTokens to use coerceNumber in tConversationSchema * refactor(AnthropicClient): use `getModelMaxOutputTokens`
This commit is contained in:
parent
ebdbfe8427
commit
8dc5b320bc
20 changed files with 575 additions and 1103 deletions
|
|
@ -4,7 +4,7 @@ import {
|
|||
isAssistantsEndpoint,
|
||||
isAgentsEndpoint,
|
||||
PermissionTypes,
|
||||
paramEndpoints,
|
||||
isParamEndpoint,
|
||||
EModelEndpoint,
|
||||
Permissions,
|
||||
} from 'librechat-data-provider';
|
||||
|
|
@ -25,6 +25,7 @@ export default function useSideNavLinks({
|
|||
agents,
|
||||
keyProvided,
|
||||
endpoint,
|
||||
endpointType,
|
||||
interfaceConfig,
|
||||
}: {
|
||||
hidePanel: () => void;
|
||||
|
|
@ -32,6 +33,7 @@ export default function useSideNavLinks({
|
|||
agents?: TConfig | null;
|
||||
keyProvided: boolean;
|
||||
endpoint?: EModelEndpoint | null;
|
||||
endpointType?: EModelEndpoint | null;
|
||||
interfaceConfig: Partial<TInterfaceConfig>;
|
||||
}) {
|
||||
const hasAccessToPrompts = useHasAccess({
|
||||
|
|
@ -87,7 +89,11 @@ export default function useSideNavLinks({
|
|||
});
|
||||
}
|
||||
|
||||
if (interfaceConfig.parameters === true && paramEndpoints.has(endpoint ?? '') && keyProvided) {
|
||||
if (
|
||||
interfaceConfig.parameters === true &&
|
||||
isParamEndpoint(endpoint ?? '', endpointType ?? '') === true &&
|
||||
keyProvided
|
||||
) {
|
||||
links.push({
|
||||
title: 'com_sidepanel_parameters',
|
||||
label: '',
|
||||
|
|
@ -128,6 +134,7 @@ export default function useSideNavLinks({
|
|||
interfaceConfig.parameters,
|
||||
keyProvided,
|
||||
assistants,
|
||||
endpointType,
|
||||
endpoint,
|
||||
agents,
|
||||
hasAccessToPrompts,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue