Skip to content

add plugin GLPI AI #105

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

Merged
merged 5 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,56 @@ source_file = build/locale/oauthsso/source.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--index]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/index.po
source_file = build/locale/glpiai/index.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--requirements]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/requirements.po
source_file = build/locale/glpiai/requirements.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--installation]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/installation.po
source_file = build/locale/glpiai/installation.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--organization]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/organization.po
source_file = build/locale/glpiai/organization.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--secret]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/secret.po
source_file = build/locale/glpiai/secret.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--setup_glpi]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/setup_glpi.po
source_file = build/locale/glpiai/setup_glpi.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--consumtpion]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/consumtpion.po
source_file = build/locale/glpiai/consumtpion.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--preferences]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/preferences.po
source_file = build/locale/glpiai/preferences.pot
source_lang = en
type = PO

[o:teclib:p:glpi-plugins-documentation:r:glpiai--example]
file_filter = source/locale/<lang>/LC_MESSAGES/glpiai/example.po
source_file = build/locale/glpiai/example.pot
source_lang = en
type = PO
16 changes: 16 additions & 0 deletions source/glpiai/consumption.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Consumption
-----------

It is possible to limit the use of the API by specifying a limit that must not be exceeded.
This plugin tracks usage based on each response from OpenAI. Therefore, you may need to utilize the "Custom usage" field in the configuration to account for usage outside of the plugin if you want the plugin to account for that in its usage limitation.

.. figure:: images/glpiai-8.png
:alt: see the usage
:scale: 100 %

1. To limit usage and avoid overruns, specify a value that must not be exceeded. If this limit is exceeded, the plugin will no longer function until this value is increased.
2. Enter the custom usage if you want to account for previous usage outside of the plugin.

.. figure:: images/glpiai-9.png
:alt: real usage
:scale: 100 %
11 changes: 11 additions & 0 deletions source/glpiai/example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Example
-------

You can see an example of what can be achieved with an exchange that includes a lot of followups. The GLPI AI plugin summarizes all of the followups to highlight the main information.


.. figure:: images/glpiai-12.gif
:alt: glpiai in action
:scale: 40 %

If you want another result, you can click on **Refresh**.
Binary file added source/glpiai/images/glpiai-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-12.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/glpiai/images/glpiai-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions source/glpiai/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GLPI AI
========

.. toctree::
:maxdepth: 2

requirements
installation
organization
secret
setup_glpi
consumption
preferences
example
8 changes: 8 additions & 0 deletions source/glpiai/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Install the plugin
------------------

- Go to the marketplace. Download and install the **GLPI AI** plugin.

.. figure:: images/glpiai-1.png
:alt: Install the plugin
:scale: 100 %
11 changes: 11 additions & 0 deletions source/glpiai/organization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Create an organization
----------------------

After creating an OpenAI account, your can create an organization from your account settings under the **Organization** tab or by accessing the page directly at https://platform.openai.com/account/organization.

Keep the **Organization ID** value, as you will need to insert it in the GLPI AI plugin configuration.

.. figure:: images/glpiai-2.png
:alt: create organization
:scale: 78 %

19 changes: 19 additions & 0 deletions source/glpiai/preferences.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Preferences
-----------

In preferences, you can set up the response model. In Free mode, you can use the GPT-3.5 Turbo 16K model.

.. figure:: images/glpiai-10.png
:alt: field check
:scale: 100 %

You can find information regarding the other plans and plan limits `here <https://platform.openai.com/account/limits>`_

By clicking on **Configure preferences**, you can setup a context and a role.

- The **Context** can be a description of your company, your mission, your job in the company. AI needs to understand your context if it is to respond as pertinently as possible (there is a context by default that you can change).
- The **Role** is how the AI should respond. Does it have a teaching, advisory or expert role? The role can influence the tone and level of detail of the response (there is a role by default that you can change).

.. figure:: images/glpiai-11.png
:alt: field check
:scale: 71 %
14 changes: 14 additions & 0 deletions source/glpiai/requirements.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Requirements
------------

============ =========== ===========
GLPI Version Minimum PHP Recommended
============ =========== ===========
10.0.x 8.1 8.2
============ =========== ===========

- Open AI API key (free or paid plan) (https://platform.openai.com/api-keys)
- Open AI organization ID (https://platform.openai.com/account/organization)

.. Note:: A `basic license <https://services.glpi-network.com/#offers>`_ (or higher) is required. This plugin is not available from the `Cloud <https://glpi-network.cloud/fr/>`_.

22 changes: 22 additions & 0 deletions source/glpiai/secret.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Create a secret
----------------

- From this URL https://platform.openai.com/api-keys
- Click on **Create a new secret**

.. figure:: images/glpiai-3.png
:alt: create secret
:scale: 55 %

- Give a name to your secret
- Click on **Create secret key**

.. figure:: images/glpiai-4.png
:alt: create key
:scale: 100 %

Copy the secret value that is generated as you will need it later to configure the plugin.

.. figure:: images/glpiai-5.png
:alt: copy key
:scale: 100 %
15 changes: 15 additions & 0 deletions source/glpiai/setup_glpi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Set up GLPI
-----------

- In GLPI, go to **Setup > General > GLPI AI**
- Fill in the fields with the values copied previously

.. figure:: images/glpiai-6.png
:alt: fill fields
:scale: 67 %

- If your configuration is correct, you will be able to see your account entries, your consumption and your preferences.

.. figure:: images/glpiai-7.png
:alt: field check
:scale: 70 %
1 change: 1 addition & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ You'll find here user documentation for various `GLPI <http://glpi-project.org>`
branding/index
webhook/index
GDPR/index
glpiai/index
holidays/index
ldaptools/index
moresatisfaction/index
Expand Down