Skip to content

Commit 1365990

Browse files
authored
🧩 fix: plugins build options, prevent undefined tools error (danny-avila#3876)
1 parent a0291ed commit 1365990

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/server/services/Endpoints/gptPlugins/buildOptions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const buildOptions = (endpoint, parsedBody) => {
66
chatGptLabel,
77
promptPrefix,
88
agentOptions,
9-
tools,
9+
tools = [],
1010
iconURL,
1111
greeting,
1212
spec,
@@ -19,7 +19,7 @@ const buildOptions = (endpoint, parsedBody) => {
1919
tools:
2020
tools
2121
.map((tool) => tool?.pluginKey ?? tool)
22-
.filter((toolName) => typeof toolName === 'string') ?? [],
22+
.filter((toolName) => typeof toolName === 'string'),
2323
chatGptLabel,
2424
promptPrefix,
2525
agentOptions,

0 commit comments

Comments
 (0)