-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
TypeError in function buildOptions(options: ChatGptOptions) of index.helper.ts if options isn't defined.
Can not establish a connection to ChatGpt with valid ChatGpt api key and valid modell selection in the global ChatGpt settings.
Expectation
buildOptions function should return valid options also if specific chatgpt options are null or undefined
Error Message
TypeError: Cannot read properties of undefined (reading 'seed')
at ChatGptLlmHelper.buildOptions (/app/src/.hexabot/contrib/extensions/helpers/hexabot-helper-chatgpt/index.helper.ts:87:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at ChatGptLlmHelper.generateStructuredResponse (/app/src/.hexabot/contrib/extensions/helpers/hexabot-helper-chatgpt/index.helper.ts:160:18)
at LlmNluHelper.predict (/app/src/extensions/helpers/llm-nlu/index.helper.ts:115:22)
Result
ChatGpt connection isn't working
Solution by @crux25
Check for existence of the options object. See commit 761f514