mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50: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
|
|
@ -40,11 +40,11 @@
|
|||
"@keyv/mongo": "^2.1.8",
|
||||
"@keyv/redis": "^2.8.1",
|
||||
"@langchain/community": "^0.3.14",
|
||||
"@langchain/core": "^0.3.18",
|
||||
"@langchain/core": "^0.3.37",
|
||||
"@langchain/google-genai": "^0.1.7",
|
||||
"@langchain/google-vertexai": "^0.1.8",
|
||||
"@langchain/textsplitters": "^0.1.0",
|
||||
"@librechat/agents": "^1.9.98",
|
||||
"@librechat/agents": "^2.0.0",
|
||||
"@waylaidwanderer/fetch-event-source": "^3.0.1",
|
||||
"axios": "^1.7.7",
|
||||
"bcryptjs": "^2.4.3",
|
||||
|
|
|
|||
|
|
@ -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