Skip to content

Commit

Permalink
📝 docs(mattermost-ai-copilot-guides): update and enhance admin and us…
Browse files Browse the repository at this point in the history
…er guides

The admin and user guides for the Mattermost AI Copilot plugin have been updated and enhanced for better clarity and understanding. The changes include a more structured layout, improved instructions for configuration and usage, and additional information about the plugin's features. The guides now provide a more comprehensive and user-friendly resource for administrators and users to effectively use the Mattermost AI Copilot plugin.
  • Loading branch information
azigler committed Mar 29, 2024
1 parent b75adc0 commit 8bf1b26
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 82 deletions.
105 changes: 52 additions & 53 deletions source/guides/mattermost-ai-copilot-admin-guide.rst
Original file line number Diff line number Diff line change
@@ -1,75 +1,74 @@
Configuration guide
===================
Mattermost AI Copilot Plugin: Admin Guide
=========================================

The Mattermost AI Copilot Plugin is configured via **System Console** ➡️ **Mattermost AI Copilot Plugin**.
This document provides instructions for administrators to configure the `Mattermost AI Copilot plugin <https://github.com/mattermost/mattermost-plugin-ai>`_.

- `OpenAI`_
- `Anthropic (Claude)`_
- `Azure OpenAI`_
- `Ask Sage`_
- `OpenAI Compatible`_
For the best experience with the Mattermost AI Copilot Plugin, we recommend using **Mattermost Server v9.6** or later. The plugin is compatible with the following `Mattermost server versions <https://docs.mattermost.com/deploy/mattermost-changelog.html>`_:

OpenAI
------
- **v9.6** or later
- **v9.5.2+** (Extended Support Release - ESR)
- **v9.4.4+**
- **v9.3.3+**
- **v8.1.11+** (Extended Support Release - ESR)

1. Obtain an `OpenAI API key`_
2. In the **AI Service** dropdown, select **OpenAI**
3. In the **API Key** field, enter your OpenAI API key
4. In the **Default Model** field, enter a model name that you can access with your API key (e.g. `gpt-4` or `gpt-3.5-turbo`)
5. **(Optional)** If you're part of multiple organizations on OpenAI and prefer not to use the default one, enter your specific **Organization ID**. This step ensures API usage and billing are attributed to your selected organization.
Configuration Steps
-------------------

Configure the plugin via **System Console ➡️ Mattermost AI Copilot Plugin**. The following AI services are supported:

- `OpenAI <https://platform.openai.com/account/api-keys>`_
- `Anthropic (Claude) <https://console.anthropic.com/account/keys>`_
- `Azure OpenAI <https://learn.microsoft.com/en-us/azure/ai-services/openai/overview>`_
- `Ask Sage <https://asksage.ai>`_
- `OpenAI Compatible <https://github.com/go-skynet/LocalAI>`_

OpenAI Configuration
--------------------

1. Obtain an `OpenAI API key <https://platform.openai.com/account/api-keys>`_.
2. Select **OpenAI** in the **AI Service** dropdown.
3. Enter your OpenAI API key in the **API Key** field.
4. Enter a model name in the **Default Model** field, such as `gpt-4` or `gpt-3.5-turbo`.
5. *(Optional)* If using multiple organizations on OpenAI, specify your **Organization ID** to direct API usage and billing accordingly.

Anthropic (Claude)
------------------

1. Obtain an `Anthropic API key`_
2. In the **AI Service** dropdown, select **Anthropic**
3. In the **API Key** field, enter your OpenAI API key
4. In the **Default Model** field, enter a model name that you can access with your API key (e.g., `claude-v1`)
1. Obtain an `Anthropic API key <https://console.anthropic.com/account/keys>`_.
2. Select **Anthropic** in the **AI Service** dropdown.
3. Enter your Anthropic API key in the **API Key** field.
4. Specify a model name in the **Default Model** field, like `claude-v1`.

Azure OpenAI
------------

To learn about accessing OpenAI LLMs via Microsoft Azure, `refer to official documentation`_.
For integrating with Microsoft Azure's OpenAI services, `refer to the official documentation <https://learn.microsoft.com/en-us/azure/ai-services/openai/overview>`_.

This requires functions to be supported, which has limited availability (e.g., model version `0613` with API `2023-07-01-preview`). Please refer to `official documentation`_ for the latest availability information.

1. Obtain `access to Azure OpenAI`_
2. In Azure, create a new OpenAI resource
3. Deploy the model resource on Azure (don't select auto-update on your deployed model as it will auto-downgrade it to `0301` within a few minutes)
4. On Mattermost, in the **AI Service** dropdown, select **OpenAI Compatible**
5. In the **API URL** field, enter the URL to your Azure resource
6. In the **API Key** field, enter your Azure resource API key
7. In the **Default Model** field, enter the model name (e.g., `gpt-35-turbo`)
1. Get `access to Azure OpenAI <https://learn.microsoft.com/en-us/azure/ai-services/openai/overview#how-do-i-get-access-to-azure-openai>`_.
2. Create a new OpenAI resource in Azure.
3. Ensure your model resource on Azure does not auto-update.
4. In Mattermost, choose **OpenAI Compatible** in the **AI Service** dropdown.
5. Enter your Azure resource's URL in the **API URL** field.
6. Input your Azure resource API key in the **API Key** field.
7. Specify your model name in the **Default Model** field, for example, `gpt-3.5-turbo`.

Ask Sage
--------

Ask Sage is currently supported as an experimental feature. Token-based security is not yet available via the Ask Sage API, and server configuration would require securing the Mattermost server configuration data store, which will contain username and password in plaintext.

The Ask Sage API does not yet support streaming, so there is less feedback to Mattermost users on intermediate information.
Ask Sage is an experimental feature with certain limitations:

1. Obtain `access to Ask Sage`_
2. In the **AI Service** dropdown, select **Ask Sage**
3. In the **Username** field, enter your Ask Sage username
4. In the **Password** field, enter your Ask Sage password
5. In the **Default Model** field, enter an OpenAI model name (e.g., `gpt-4` or `gpt-3.5-turbo`)
6. enter the account's `username` and `password` on the System Console page and set the default model such as `gpt-4` or `gpt-3.5-turbo`.
1. Obtain `access to Ask Sage <https://asksage.ai>`_.
2. Choose **Ask Sage** in the **AI Service** dropdown.
3. Enter your username and password for Ask Sage in the respective fields.
4. Specify a default model name, such as `gpt-4`.

OpenAI Compatible
-----------------

The Mattermost AI Copilot Plugin can support any LLM provider that is OpenAI-compatible such as `LocalAI`_.

1. Deploy your model on LocalAI or equivalent
2. In the **AI Service** dropdown, select **OpenAI Compatible**
3. In the **API URL** field, enter the URL to LocalAI
4. In the **API Key** field, enter your OpenAI API key
5. In the **Default Model** field, enter the model name

.. _OpenAI: https://platform.openai.com/account/api-keys
.. _Anthropic (Claude): https://console.anthropic.com/account/keys
.. _Azure OpenAI: https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
.. _Ask Sage: https://asksage.ai
.. _OpenAI Compatible: https://github.com/go-skynet/LocalAI
.. _refer to official documentation: https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
.. _access to Azure OpenAI: https://learn.microsoft.com/en-us/azure/ai-services/openai/overview#how-do-i-get-access-to-azure-openai
This option allows integration with any OpenAI-compatible LLM provider:

1. Deploy your model, for example, on LocalAI.
2. Select **OpenAI Compatible** in the **AI Service** dropdown.
3. Enter the URL to your AI service in the **API URL** field.
4. Enter your API key in the **API Key** field.
5. Specify your model name in the **Default Model** field.
Loading

0 comments on commit 8bf1b26

Please sign in to comment.