FIX: forced tools wasn't set correctly when tool has no options. (#1231)
* wip: more dynamic availableForcedTools * FIX: forced tools wasn't set correctly when tool has no options. --------- Co-authored-by: Roman Rizzi <[email protected]>
This commit is contained in:
co-authored by
Roman Rizzi
parent
f43137e067
commit
28fa723472
@@ -77,7 +77,11 @@ export default class AiPersona extends RestModel {
|
||||
|
||||
flattenedToolStructure(data) {
|
||||
return (data.tools || []).map((tName) => {
|
||||
return [tName, data.toolOptions[tName], data.forcedTools.includes(tName)];
|
||||
return [
|
||||
tName,
|
||||
data.toolOptions[tName] || {},
|
||||
data.forcedTools.includes(tName),
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user