mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
🔧 feat(actions): Allow Multiple Actions from Same Domain per Assistant (#2120)
This commit is contained in:
parent
89f6b35e6c
commit
7cddd943d0
1 changed files with 1 additions and 8 deletions
|
|
@ -74,14 +74,7 @@ router.post('/:assistant_id', async (req, res) => {
|
||||||
const { actions: _actions = [] } = assistant_data ?? {};
|
const { actions: _actions = [] } = assistant_data ?? {};
|
||||||
const actions = [];
|
const actions = [];
|
||||||
for (const action of _actions) {
|
for (const action of _actions) {
|
||||||
const [action_domain, current_action_id] = action.split(actionDelimiter);
|
const [_action_domain, current_action_id] = action.split(actionDelimiter);
|
||||||
if (action_domain === domain && !_action_id) {
|
|
||||||
// TODO: dupe check on the frontend
|
|
||||||
return res.status(400).json({
|
|
||||||
message: `Action sets cannot have duplicate domains - ${domain} already exists on another action`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (current_action_id === action_id) {
|
if (current_action_id === action_id) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue