Unity Scene Setup

This page provides an overview of the essential components involved in setting up a Unity scene

Brain

The Brain is a scriptable object equipped with a System Message, Message History, and Context. It leverages this context along with the subscribed tools' context to interact with the API. It subsequently interprets the responses and function decisions obtained from the API.

Body

The Body MonoBehaviour serves as the container for the brain. It incorporates Voice Input and Output modules, as well as Text Input and Output modules, enabling communication with players within the game.

Input

These input modules serve as the communication interface between the player and the AI.

  • Text Input

    • Takes the value of an input field.

  • Voice Input

    • Starts/Stops a recording from a mic, and performs Speech-To-Text

Output

These output modules serve as the communication interface between the AI and the player.

  • Text Output

    • Receives a response from the brain and prints it into a text component.

  • Voice Output

    • Receives a .wav file from the brain and plays the clip in an audio source component.

The AIBody Prefab

This package contains an AI Body Prefab that you can use to get started quickly. Find the prefab in the Function Calling -> Prefabs folder named AIBody. Drag and drop this in any scene.

Last updated