mattermost-plugin-ai icon indicating copy to clipboard operation
mattermost-plugin-ai copied to clipboard

Make `StreamingTimeoutSecond` configurable

Open kaakaa opened this issue 1 year ago • 1 comments

Refs #176

Description

Make StreamingTimeoutSecond configurable for OpenAI and OpenAI Compatible. With setting it to 60, I could fix the timeout issue with ollama refered in #176.

Screenshot from 2024-05-11 22-54-00

kaakaa avatar May 11 '24 13:05 kaakaa

Thank you for this PR @kaakaa! Pinging @crspeller for review.

azigler avatar May 13 '24 19:05 azigler

@kaakaa Hey! Thanks for the contribution. Couple of changes to the system console went though. Do you mind fixing the conflicts? Let me know if you need any help.

crspeller avatar May 21 '24 19:05 crspeller

@crspeller Thanks for letting me know it. I've updated the code with the new system console.

NOTE: When deploying master branch to test my changes, the AI chat was not working due to the following error.

{"timestamp":"2024-05-25 04:48:14.655 Z","level":"error","msg":"failed to get bot: ","caller":"app/plugin_api.go:1003","plugin_id":"mattermost-ai"}

The cause would be that Config.DefaultBotName is empty. Switching Default bot in sytem console would update Config.DefaultBotName, but I can't do it because I don't have Enterprise plan and can create only one bot. Updating and deleting existing bot didn't resolve this error. It seems that users who are not on the Enterprise Plan may encounter this issue.

By adding code before the following location to assign the default name ('ai') when defaultBotName is empty, I was able to temporarily work around the issue. However, this method requires changing the settings once, so it does not seem to be the best solution. https://github.com/mattermost/mattermost-plugin-ai/blob/39e09762b8788622783b22efabb3e48e81cde05b/webapp/src/components/system_console/config.tsx#L156-L160

kaakaa avatar May 25 '24 13:05 kaakaa

@kaakaa Thanks! I did noticed that issue while working on another pr and have a partial fix here: https://github.com/mattermost/mattermost-plugin-ai/pull/187/files#diff-efcd221be1d5948ef999c98624dc2d4a15dedc19b0945ca1b819a3d51480c607R142 But yes I need to fix the migration there.

crspeller avatar May 27 '24 22:05 crspeller

When will this issue be patched?

tjdalsry avatar Jun 08 '24 03:06 tjdalsry