nextcloud / assistant

✨ Nextcloud Assistant
GNU Affero General Public License v3.0
23 stars 4 forks source link

Task**Listener throws Undefined variable $notificationActionLabel #7

Closed jgielstra closed 11 months ago

jgielstra commented 11 months ago

Which version of assistant are you using?

1.0.1

Which version of Nextcloud are you using?

v27.1.1

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Chrome

Describe the Bug

Both Success and Failed notification throw "Undefined variable $notificationActionLabel". on line #46

Looks like there is an issue with $notificationActionLabel defined within the if statement #36-44

Here are the error logs.. {"reqId":"n7u1G6yVacYM3g5SiFHu","level":3,"time":"2023-09-22T20:05:13+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined variable $notificationActionLabel at /var/www/html/custom_apps/assistant/lib/Listener/TaskSuccessfulListener.php#46","userAgent":"--","version":"27.1.1.0","data":{"app":"PHP"},"id":"650df4e001264"}

{"reqId":"uOd7JX12v0R3AJPKHlmv","level":3,"time":"2023-09-22T18:16:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined variable $notificationActionLabel at /var/www/html/custom_apps/assistant/lib/Listener/TaskFailedListener.php#46","userAgent":"--","version":"27.1.1.0","data":{"app":"PHP"},"id":"650df4e001270"}

Expected Behavior

The assistant sends a notification instead of throwing an undefined variable ERROR.

To Reproduce

Click on the Nextcloud assistant icon on the top navigation bar.

Select "Free prompt" and enter a prompt and submit.

I am running integration_openai: 1.0.13 using localAI with llama-2-13b-chat.ggmlv3.q4_0.bin deployed as gpt-3.5-turbo

FYI a couple of gotchas using localai

julien-nc commented 11 months ago

Hey, thank you for this issue. This has been fixed already. It will be included in the next release.