Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make StreamingTimeoutSecond configurable #179

Merged
merged 4 commits into from
May 27, 2024

Conversation

kaakaa
Copy link
Contributor

@kaakaa kaakaa commented May 11, 2024

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

@azigler
Copy link
Contributor

azigler commented May 13, 2024

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

@crspeller
Copy link
Member

@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.

@kaakaa
Copy link
Contributor Author

kaakaa commented May 25, 2024

@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.

value={value.defaultBotName}
onChange={(e) => {
props.onChange(props.id, {...value, defaultBotName: e.target.value});
props.setSaveNeeded();
}}

@crspeller crspeller merged commit 36f079a into mattermost:master May 27, 2024
5 checks passed
@crspeller
Copy link
Member

@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.

@tjdalsry
Copy link

tjdalsry commented Jun 8, 2024

When will this issue be patched?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants