AI Helper Setup - eisclimber/ExPresS-XR GitHub Wiki

AI Helper Setup

The AI Helper is designed to be easy and quick to implement into any project. It still needs some setup to work properly, most significantly an OpenAI account.

OpenAI

Currently, the AI that the helper uses is from OpenAI. This means you need to create an OpenAI account on its official website. This account then allows you to access the API page, which is located here: https://platform.openai.com/home

This page is your dashboard, which shows you everything related to the usage of the AI Helper. Every time it talks, it will use tokens, which also cost money, and you can see that here. To connect the AI Helper to the OpenAI API, you will need a secret key which you can generate on this page. Be careful! Anyone with this secret key can make requests to the API on your behalf.

  1. Click "Create API Key" on the top right of the homepage
  2. Give it a fitting name and click "Create Secret Key"
  3. Copy the key and save it in a safe location (You won't be able to view it again!)

We will need this key later when creating an AI Helper, so keep it at hand.

Creating an AI Helper in Unity

Now for the actual creation of an AI Helper in Unity. While in your Unity project, click ExpressXR -> Create AI Helper in the top menu. This will open a wizard which will guide you through the creation of the AI Helper. The first page will just give you further information about what the AI Helper is and how to use it. On the second page, you have the different settings, which we will go through now.

Model: Currently, you have the choice between 3 different OpenAI models. All function the same on the baseline, but they differ in their performance and cost. The more you pay per token, the better the AI answers will be.

Interaction Type: This will decide how the user will start a conversation with the helper. "Speak via Button" means there is a button which you can press to start and stop the conversation. "Speak via Proximity" means there is a visible field around the helper and entering it will start the conversation.

The upcoming 3 fields specify the behaviour of the Helper and will get sent to OpenAI. Do not enter personal information and describe what the task of the Helper is. Here, writing more is always better than keeping it short.

Topic: The topic of the museum.

How should the AI act?: Here you can specify the personality of the helper. So tell the AI, for example, in which speaking style it should talk and if it should keep it short.

Describe the museum: Here you need to give the AI all the facts about your museum. The AI only knows stuff about your museum that you tell it! As an example: if you place it in a room with a certain theme, tell it the theme, what is located in that room, etc. The AI Helper isn't allowed to speculate or deviate from the themes of the museum, so specifying what is part of the museum's themes is very important.

API Key: Here you have to enter the API key from OpenAI we created above. This will be used to establish a connection to OpenAI.

Afterwards, you can click "Create AI", which will bring you back to the scene, but now with the AI Helper in it. Now you just need to position the helper where you want it and it's done!

⚠️ **GitHub.com Fallback** ⚠️