mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
🤖 feat: Enhance Assistant Model Handling for Model Specs (#4390)
* chore: cleanup type issues in client/src/utils/endpoints * refactor: use Constant enum for 'new' conversationId * refactor: select assistant model if not provided for model spec
This commit is contained in:
parent
2846779603
commit
bab0152c58
4 changed files with 23 additions and 12 deletions
|
|
@ -64,6 +64,10 @@ export default function useSelectMention({
|
|||
preset.endpointType = newEndpointType;
|
||||
}
|
||||
|
||||
if (isAssistantsEndpoint(newEndpoint) && preset.assistant_id != null && !(preset.model ?? '')) {
|
||||
preset.model = assistantMap?.[newEndpoint]?.[preset.assistant_id]?.model;
|
||||
}
|
||||
|
||||
const isModular = isCurrentModular && isNewModular && shouldSwitch;
|
||||
if (isExistingConversation && isModular) {
|
||||
template.endpointType = newEndpointType as EModelEndpoint | undefined;
|
||||
|
|
@ -90,7 +94,7 @@ export default function useSelectMention({
|
|||
keepAddedConvos: isModular,
|
||||
});
|
||||
},
|
||||
[conversation, getDefaultConversation, modularChat, newConversation, endpointsConfig],
|
||||
[conversation, getDefaultConversation, modularChat, newConversation, endpointsConfig, assistantMap],
|
||||
);
|
||||
|
||||
type Kwargs = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue