Content
View differences
Updated by Parimal Satyal about 18 hours ago
**As** an OpenProject admin
**I want to** be able to connect OpenProject to a LLM
**so that** I can use the LLM for a multitude of new features
**Acceptance criteria**
* In the admin settings "Artificial Intelligence (AI)" a new menu entry called "LLM settings" is available.
* The "LLM settings" view contains
* Displayed information: "The LLM server needs to support OpenAI-API compatible endpoints."
* Boolean: "Enabled" (deactivates the LLM server settings and all LLM related AI features)
* URL Input: "Base URL" (placeholder: [`https://example.com/v1/`](https://example.com/v1/)
* Question: Host Url or host?
* Text Input: "API key"
* Only visible when setting the API key
* Later on edit the saved API key should be shown masked
* "Connect"-Button "Save"-Button
* When clicked a request to fetch the installed models of the LLM are set
* `GET` [`https://example.com/v1/models`](https://example.com/v1/models)
* On error, the settings are not saved and following possible errors are shown inline
* "SSL error": an inline error is shown underneath the "Base URL" input
* "Host could not be reached": an inline error is shown underneath the "Base URL" input
* "Invalid API key": an inline error is shown underneath the "API key" input
* Other (unexpected) errors are shown as toast message.
* Info: This list is not complete yet
* On success
* Settings are saved
<br>
* LLM Models panel Sidebar
* The panel sidebar is only shown when the LLM was successfully setup already
* Below the panel is The sidebar contains a "Test connection"-button
* When the user clicks the button, two request are made
* List models
* `GET` [`https://example.com/v1/models`](https://example.com/v1/models)
* A chat completion test
* `POST` [`https://example.com/v1/chat/completions`](https://example.com/v1/chat/completions)
* `{ "model": "FIRST_MODEL_IN_LIST", "messages": [ {"role": "system", "content": "You are a helpful assistant that answeres with one word."}, {"role": "user", "content": "Hi."} ] }`
* If the requests were successful, a success message is shown underneath the button
* "Connection to LLM was successful. Following models are available: "
* If an error occurred the error is shown underneath the button
<br>
<br>
* A "Disconnect" button
* Shows a danger dialog
* Removes the connection and initialises the form to a state where an LLM service is not enabled
* When LLM settings checkbox is disabled the form underneath and the LLM panel sidebar are hidden.
**Technical notes**
* <br>
**Permissions and visibility considerations**
* Only administrators should be able to see or edit the AI settings page
**Translation considerations**
* _Key terms and phrases in the key languages_
**Out of scope**
* Enable AI features per project
* Enable AI features for specific users
* Usage counter and budget limits
**I want to** be able to connect OpenProject to a LLM
**so that** I can use the LLM for a multitude of new features
**Acceptance criteria**
* In the admin settings "Artificial Intelligence (AI)" a new menu entry called "LLM settings" is available.
* The "LLM settings" view contains
* Displayed information: "The LLM server needs to support OpenAI-API compatible endpoints."
* Boolean: "Enabled" (deactivates the LLM server settings and all LLM related AI features)
* URL Input: "Base URL" (placeholder: [`https://example.com/v1/`](https://example.com/v1/)
* Question: Host Url or host?
* Text Input: "API key"
* Only visible when setting the API key
* Later on edit the saved API key should be shown masked
* "Connect"-Button
* When clicked a request to fetch the installed models of the LLM are set
* `GET` [`https://example.com/v1/models`](https://example.com/v1/models)
* On error, the settings are not saved and following possible errors are shown inline
* "SSL error": an inline error is shown underneath the "Base URL" input
* "Host could not be reached": an inline error is shown underneath the "Base URL" input
* "Invalid API key": an inline error is shown underneath the "API key" input
* Other (unexpected) errors are shown as toast message.
* Info: This list is not complete yet
* On success
* Settings are saved
<br>
* LLM Models panel
* The panel
* Below the panel is
* When the user clicks the button, two request are made
* List models
* `GET` [`https://example.com/v1/models`](https://example.com/v1/models)
* A chat completion test
* `POST` [`https://example.com/v1/chat/completions`](https://example.com/v1/chat/completions)
* `{ "model": "FIRST_MODEL_IN_LIST", "messages": [ {"role": "system", "content": "You are a helpful assistant that answeres with one word."}, {"role": "user", "content": "Hi."} ] }`
* If the requests were successful, a success message is shown underneath the button
* "Connection to LLM was successful. Following models are available: "
* If an error occurred the error is shown underneath the button
<br>
<br>
* Shows a danger dialog
* Removes the connection and initialises the form to a state where an LLM service is not enabled
* When LLM settings checkbox is disabled the form underneath and the LLM panel
**Technical notes**
* <br>
**Permissions and visibility considerations**
* Only administrators should be able to see or edit the AI settings page
**Translation considerations**
* _Key terms and phrases in the key languages_
**Out of scope**
* Enable AI features per project
* Enable AI features for specific users
* Usage counter and budget limits