|
| 1 | +--- |
| 2 | +title: InstructLab UI Overview |
| 3 | +description: The overview of 🐶 InstructLab UI. |
| 4 | +logo: images/ilab_dog.png |
| 5 | +--- |
| 6 | + |
| 7 | +The InstructLab User Interface (UI) is an additional component in the InstructLab project to make Knowledge/Skills |
| 8 | +contributions more accessible to the general user. Instead of having to edit a `qna.yaml` file, |
| 9 | +users can fill out the contribution forms on the web. The user can also view all of their contributions in a |
| 10 | +centralised list. You can also chat with the models directly on the playground. |
| 11 | + |
| 12 | +There are 2 ways to access the UI: |
| 13 | + |
| 14 | +1. Visit the website at [ui.instructlab.ai](https://ui.instructlab.ai/). |
| 15 | + |
| 16 | +2. Install and run the UI locally. |
| 17 | + |
| 18 | + |
| 19 | +!!! note |
| 20 | + To log into the UI and submit Knowledge and Skills contributions, you must be a member of the [instructlab-public](https://github.com/instructlab-public) github repository. |
| 21 | + |
| 22 | +!!! note |
| 23 | + If you aren't a member of the repository, but still wish to experiment with the UI, we recommend you to reach out to the UI Maintainers in our `#ui` [slack channel](https://join.slack.com/t/instruct-lab/shared_invite/zt-2kieyqiz9-zhXSxGnXk6uL_f3hVbD53g) for an invitation. |
| 24 | + |
| 25 | + If you wish to not join but still wish to experiment, download it locally. |
| 26 | + |
| 27 | +## Prerequisites |
| 28 | + |
| 29 | +Before you can run the User Interface locally, you first must: |
| 30 | + |
| 31 | +* Have a [github](https://github.com/) account |
| 32 | + |
| 33 | +* Have Node.js installed |
| 34 | + |
| 35 | +!!! warning |
| 36 | + This guide was written with `Node.js v20.17.0`. If you are using an older version of Node.js, please be aware that the application |
| 37 | + may not work as intended. |
| 38 | + |
| 39 | +## Installation Guide |
| 40 | + |
| 41 | +1) Download the InstructLab UI by running the following command in your desired directory: |
| 42 | + |
| 43 | +`git clone https://github.com/instructlab/ui` |
| 44 | + |
| 45 | +You can also download by visting the [InstructLab UI github page](https://github.com/instructlab/ui) and clicking the code, and then the download button. |
| 46 | + |
| 47 | +2) Set up the .env file. Go into the UI folder by running |
| 48 | + |
| 49 | +`cd ui` |
| 50 | + |
| 51 | +Inside the UI folder, create a new file called `.env` and paste the following content inside: |
| 52 | + |
| 53 | +```bash |
| 54 | +IL_UI_ADMIN_USERNAME=admin |
| 55 | +IL_UI_ADMIN_PASSWORD=password |
| 56 | +IL_UI_DEPLOYMENT=dev |
| 57 | + |
| 58 | +OAUTH_GITHUB_ID=<OAUTH_APP_ID> |
| 59 | +OAUTH_GITHUB_SECRET=<OAUTH_APP_SECRET> |
| 60 | + |
| 61 | +NEXTAUTH_SECRET=your_super_secret_random_string |
| 62 | +NEXTAUTH_URL=http://localhost:3000 |
| 63 | + |
| 64 | +IL_GRANITE_API=<GRANITE_HOST> |
| 65 | +IL_GRANITE_MODEL_NAME=<GRANITE_MODEL_NAME> |
| 66 | +IL_MERLINITE_API=<MERLINITE_HOST> |
| 67 | +IL_MERLINITE_MODEL_NAME=<MERLINITE_MODEL_NAME> |
| 68 | + |
| 69 | +GITHUB_TOKEN=<TOKEN FOR OAUTH INSTRUCTLAB MEMBER LOOKUP> |
| 70 | +TAXONOMY_DOCUMENTS_REPO=github.com/instructlab-public/taxonomy-knowledge-docs |
| 71 | +NEXT_PUBLIC_AUTHENTICATION_ORG=<AUTHENTICATION_ORG> |
| 72 | +NEXT_PUBLIC_TAXONOMY_REPO_OWNER=<GITHUB_ACCOUNT> |
| 73 | +NEXT_PUBLIC_TAXONOMY_REPO=<REPO_NAME> |
| 74 | +``` |
| 75 | + |
| 76 | +As of now, we are only concerned with `IL_UI_ADMIN_USERNAME`, `IL_UI_ADMIN_PASSWORD` and `IL_UI_DEPLOYMENT`. But throughout this UI guide we will be visiting the .env frequently. |
| 77 | + |
| 78 | +__Save and close the .env file.__ |
| 79 | + |
| 80 | +3) Running Node commands to install and run. |
| 81 | + |
| 82 | +Back inside the UI folder, run this command to install needed files for the UI to run: |
| 83 | + |
| 84 | +`npm install` |
| 85 | + |
| 86 | +!!! note |
| 87 | + Depending on your internet speed and connectivity, this process may take a few minutes. |
| 88 | + |
| 89 | +When the install is finished, start the UI by running: |
| 90 | + |
| 91 | +`make start-dev-local` |
| 92 | + |
| 93 | +The UI should now be up and running, you can visit it by entering `localhost:3000` in your browser, where it should bring you to the login screen. |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +You may stop the UI at any time by running: |
| 98 | + |
| 99 | +`make stop-dev-local` |
| 100 | + |
| 101 | +4) Logging in |
| 102 | + |
| 103 | +For now, we will log in by entering `admin` and `password` in the username and password fields respectively. You can change the username and password by editing the `IL_UI_ADMIN_USERNAME` and `IL_UI_ADMIN_PASSWORD` values in the .env file. |
| 104 | + |
| 105 | +We are not able to log in with github right now since we haven't set up the github token in the .env file. When logged in, you may see a popup saying that the UI is fetching your submissions, exit out of this notification. If you wish to set up the OAuth, visit the [.env and OAuth config page](/user-interface/env_oauth_config/). |
| 106 | + |
| 107 | +[Next Steps](/user-interface/playground_chat/){: .md-button .md-button--primary } |
0 commit comments