Mattermost Agents plugin supporting multiple LLMs
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
The Mattermost Agents Plugin integrates AI capabilities directly into your Mattermost workspace. Run any local LLM on your infrastructure or connect to cloud providers - you control your data and deployment.檢視完整 README ↗The Mattermost Agents Plugin integrates AI capabilities directly into your Mattermost workspace. Run any local LLM on your infrastructure or connect to cloud providers - you control your data and deployment.
Comprehensive documentation is available in the /docs directory:
After installation, complete these steps to get started:
For detailed configuration instructions, see the Admin Guide.
The plugin provides a Go client library for other Mattermost plugins and the Mattermost server to interact with the AI plugin's LLM Bridge API. This allows you to easily add AI capabilities to your own plugins or server-side features.
See the Bridge Client README for installation and usage instructions.
Setup your Mattermost development environment by following the Mattermost developer setup guide. If you have a remote mattermost server you want to develop to you can skip this step.
Setup your Mattermost plugin development environment by following the Plugin Developer setup guide.
Clone the repository:
git clone https://github.com/mattermost/mattermost-plugin-agents.git
cd mattermost-plugin-agents
MM_SERVICESETTINGS_SITEURL=http://localhost:8065
MM_ADMIN_USERNAME=<YOUR_USERNAME>
MM_ADMIN_PASSWORD=<YOUR_PASSWORD>
make deploy
make help for a list of all make commandsmake check-style to verify code stylemake test to run the test suitemake e2e to run the e2e testsmake evals to run prompt evaluations interactively (with TUI)make evals-ci to run prompt evaluations in CI mode (non-interactive)The streaming code has benchmark tests to measure performance and detect regressions:
# Run all streaming benchmarks
go test -bench=. -benchmem ./llm/... ./streaming/...
# Run specific benchmark
go test -bench=BenchmarkStreamToPost -benchmem ./streaming/...
# Run with CPU profiling
go test -bench=BenchmarkReadAll -cpuprofile=cpu.prof ./llm/...
Benchmarks cover:
ReadAll() stream consumption with varying response sizesTokenUsageLoggingWrapper interception overheadStreamToPost() full processing pipeline with WebSocket eventsThe evaluation system supports testing with multiple LLM providers: OpenAI, Anthropic, and Azure OpenAI. By default, evaluations run against all providers, but you can target specific ones:
# Run with all providers (default)
make evals
# Run with only Anthropic
LLM_PROVIDER=anthropic make evals
# Run with OpenAI and Azure
LLM_PROVIDER=openai,azure make evals
# Use a specific model
ANTHROPIC_MODEL=claude-3-opus-20240229 make evals
See cmd/evalviewer/README.md for complete documentation on environment variables and configuration options.
This repository is licensed under Apache-2, except for the server/enterprise directory which is licensed under the Mattermost Source Available License. See Mattermost Source Available License to learn more.