mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🤖 fix: Azure Agents after Upstream Breaking Change (#5571)
* 🤖 fix: Azure Agents after Upstream Breaking Change
* chore: bump @langchain/core & @librechat/agents
* fix: correct formatting in assistant actions update logic and use correctly filtered actions variable
* fix: linting errors
This commit is contained in:
parent
e1a6268904
commit
6920e23fb2
7 changed files with 48 additions and 471 deletions
|
|
@ -105,12 +105,7 @@ router.post('/:assistant_id', async (req, res) => {
|
|||
if (!assistant_data) {
|
||||
assistantUpdateData.user = req.user.id;
|
||||
}
|
||||
promises.push(
|
||||
updateAssistantDoc(
|
||||
{ assistant_id },
|
||||
assistantUpdateData,
|
||||
)
|
||||
);
|
||||
promises.push(updateAssistantDoc({ assistant_id }, assistantUpdateData));
|
||||
|
||||
// Only update user field for new actions
|
||||
const actionUpdateData = { metadata, assistant_id };
|
||||
|
|
@ -191,16 +186,11 @@ router.delete('/:assistant_id/:action_id/:model', async (req, res) => {
|
|||
|
||||
const promises = [];
|
||||
// Only update user field if assistant document doesn't exist
|
||||
const assistantUpdateData = { actions };
|
||||
const assistantUpdateData = { actions: updatedActions };
|
||||
if (!assistant_data) {
|
||||
assistantUpdateData.user = req.user.id;
|
||||
}
|
||||
promises.push(
|
||||
updateAssistantDoc(
|
||||
{ assistant_id },
|
||||
assistantUpdateData,
|
||||
),
|
||||
);
|
||||
promises.push(updateAssistantDoc({ assistant_id }, assistantUpdateData));
|
||||
promises.push(deleteAction({ action_id }));
|
||||
|
||||
await Promise.all(promises);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue