{"id":24308796,"url":"https://github.com/pacphi/mattermost-ai-service","last_synced_at":"2025-03-06T20:17:07.165Z","repository":{"id":271640093,"uuid":"913784432","full_name":"pacphi/mattermost-ai-service","owner":"pacphi","description":"Demonstrate two types of chat interactions with a Mattermost instance leveraging Mattermost OpenAPI v3 spec and Spring AI.","archived":false,"fork":false,"pushed_at":"2025-02-27T20:13:56.000Z","size":435,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T04:56:55.336Z","etag":null,"topics":["java","llms","mattermost","reactjs","spring-ai","spring-boot","vector-stores"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pacphi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T10:50:45.000Z","updated_at":"2025-02-27T20:13:58.000Z","dependencies_parsed_at":"2025-01-09T01:48:22.936Z","dependency_job_id":"d5fc087c-51ed-4c31-8973-e3f4df30b0ae","html_url":"https://github.com/pacphi/mattermost-ai-service","commit_stats":null,"previous_names":["pacphi/mattermost-ai-service"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fmattermost-ai-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fmattermost-ai-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fmattermost-ai-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pacphi%2Fmattermost-ai-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pacphi","download_url":"https://codeload.github.com/pacphi/mattermost-ai-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277702,"owners_count":20101545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","llms","mattermost","reactjs","spring-ai","spring-boot","vector-stores"],"created_at":"2025-01-17T05:11:35.979Z","updated_at":"2025-03-06T20:17:07.158Z","avatar_url":"https://github.com/pacphi.png","language":"Java","readme":"# Mattermost AI Service\n\n[![GA](https://img.shields.io/badge/Release-Alpha-darkred)](https://img.shields.io/badge/Release-Alpha-darkred) ![Github Action CI Workflow Status](https://github.com/pacphi/mattermost-ai-service/actions/workflows/ci.yml/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/pacphi/mattermost-ai-service/badge.svg?style=plastic)](https://snyk.io/test/github/pacphi/mattermost-ai-service)\n\n![Ingest](docs/ingest-ui.png)\n\n![Chat](docs/chat-ui.png)\n\n\n* [Background](#background)\n* [Getting started](#getting-started)\n* [Prerequisites](#prerequisites)\n* How to\n  * [Clone](#how-to-clone)\n  * [Build](#how-to-build)\n  * [Run](#how-to-run)\n  * [Deploy to Tanzu Platform for Cloud Foundry](#how-to-deploy-to-tanzu-platform-for-cloud-foundry)\n\n## Background\n\nDemonstrate two types of chat interactions with a Mattermost instance leveraging Mattermost OpenAPI v3 spec and Spring AI.\n\nUse-cases:\n\n* [x] Ingest a Mattermost channel into a VectorStore, then chat with that point-in-time corpus of knowledge\n* [x] ~~Chat by configuring tool-calling to ask for insights in real-time~~ Make use of this [Mattermost](https://mattermost.com/marketplace/mattermost-ai-copilot/) [plugin](https://github.com/mattermost/mattermost-plugin-ai) for real time insights.\n\n## Getting started\n\nI got started with:\n\n* A Github [account](https://github.com/signup)\n* A Stackhero [account](https://stackhero.io)\n* This Spring Initializr [configuration](https://start.spring.io/#!type=maven-project\u0026language=java\u0026platformVersion=3.4.2\u0026packaging=jar\u0026jvmVersion=21\u0026groupId=me.pacphi\u0026artifactId=mattermost-ai-service\u0026name=Mattermost%20AI%20Service\u0026description=Demonstrate%20two%20types%20of%20chat%20interactions%20with%20a%20Mattermost%20instance%20leveraging%20Mattermost%20OpenAPI%20v3%20spec%20and%20Spring%20AI\u0026packageName=me.pacphi.mattermost\u0026dependencies=spring-ai-openai,web,configuration-processor,devtools,docker-compose)\n* Mattermost \n  * credentials (i.g., username, password)\n* An LLM provider\n  * one of Groq Cloud, OpenAI, or Ollama\n\n## Prerequisites\n\n* Docker Compose\n* Git CLI\n* An Open AI or Groq Cloud account\n* Java SDK 21\n* Maven 3.9.9\n* Mattermost OpenAPI [spec](https://api.mattermost.com/)\n* yq CLI\n\n## How to clone\n\nwith Git CLI\n\n```bash\ngit clone https://github.com/pacphi/mattermost-ai-service\n```\n\nwith Github CLI\n\n```bash\ngh repo clone pacphi/mattermost-ai-service\n```\n\n## Keeping up-to-date with OpenAPI spec changes\n\nVisit https://api.mattermost.com/ in your favourite browser periodically to grab updates that may have been introduced to the Mattermost OpenAPI specification.\n\nClick on the `Download` button next to the `Download OpenAPI specification` label at the top of the page.\n\nCopy and overwrite the file named `openapi.json` into the resources directory [here](src/main/resrouces/openapi).\n\nExecute the following command in a terminal shell in that directory:\n\n```bash\ncat openapi.json | yq eval -P '.' \u003e mattermost-openapi-v3.yml\n```\n\n\u003e It's strongly encouraged that you compare the version in Git commit history with the version you just fetched.  There are likely to be breaking changes that result in compilation failures for generated source.\n\n## How to build\n\nOpen a terminal shell, then execute:\n\n```bash\ncd mattermost-ai-service\nmvn clean package\n```\n\nFor more exotic build and packaging alternatives, refer to the guide [here](docs/BUILD.md).\n\n## How to run\n\nSet these environment variables\n\n### with username and password\n\n```bash\nexport MATTERMOST_BASE_URL=\nexport MATTERMOST_USERNAME=\nexport MATTERMOST_PASSWORD=\n```\n\n\u003e Add appropriate values for each of the required `MATTERMOST_` prefixed environment variables above.\n\n### with a personal access token\n\n```bash\nexport MATTERMOST_BASE_URL=\nexport MATTERMOST_PERSONAL_ACCESS_TOKEN=\n```\n\n\u003e Likewise, add appropriate values for each of the required `MATTERMOST_` prefixed environment variables above.\n\nRefer to [this guide](docs/RUN.md) to understand the various run configuration alternatives available.\n\nIf you chose to launch containers with `docker compose` you will first need to create a Mattermost account.  Visit http://localhost:8065 to do that.\n\n\u003e Make sure to use the same credentials as you had exported above.  Or if you forgot to set the environment variables, just use the defaults as declared in [application.yml](src/main/resources/application.yml).\n\nOpen your favorite browser and visit `http://localhost:8080`.\n\n\u003e Back in the terminal shell, press Ctrl+C to shutdown.\n\nIn case you launched containers with `docker compose`, you can clean everything up by running:\n\n```bash\ndocker stop $(docker ps -a -q) \u0026\u0026 docker rm $(docker ps -a -q) \u0026\u0026 docker volume rm $(docker volume ls -q)\n```\n\n## How to deploy to Tanzu Platform for Cloud Foundry\n\nRefer to the instructions [here](docs/TP4CF.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacphi%2Fmattermost-ai-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacphi%2Fmattermost-ai-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacphi%2Fmattermost-ai-service/lists"}