mattermost-plugin-ai
mattermost-plugin-ai copied to clipboard
Bug: Error when try to get most common alert from channel
Steps to reproduce the behavior
- Go to @ai direct messages
- Ask to
"in team <name> channel <alerting channel> what is the most common alert?"
- See error "Sorry! An error occoured while accessing the LLM. See server logs for details."
In log error: status code: 400, message: '<team>.LookupMattermostUser' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.2.name'"}
Expected behavior
Reply of what the most common alert is
Version and Platform
- Version: v0.3.2 Mattermost Version: 7.1.4 Database Schema Version: 89 Database: postgres
This is partially #44 since you can't do the channel lookup in DMs anyway. (see #44 for why) You did disambiguate but the prompting just isn't there to support that. You have to make that kind of query in the channel itself. But that shouldn't give you that error. It looks like the LLM came back with a bad function call. (it's hallucinating a function prefixed with a team name) We should handle this case better.