🧩 fix: plugins build options, prevent undefined tools error (#3876)

This commit is contained in:
Danny Avila 2024-09-01 08:35:05 -04:00 committed by GitHub
parent a0291ed155
commit 136599081c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@ const buildOptions = (endpoint, parsedBody) => {
chatGptLabel,
promptPrefix,
agentOptions,
tools,
tools = [],
iconURL,
greeting,
spec,
@ -19,7 +19,7 @@ const buildOptions = (endpoint, parsedBody) => {
tools:
tools
.map((tool) => tool?.pluginKey ?? tool)
.filter((toolName) => typeof toolName === 'string') ?? [],
.filter((toolName) => typeof toolName === 'string'),
chatGptLabel,
promptPrefix,
agentOptions,