AIDevKit - AI Suite for Unity
API ReferencesDiscordGlitch9
  • Introduction
    • AI Dev Kit 3.7.0
    • Troubleshooting
    • FAQ
    • Update Logs
      • AI Dev Kit v2
      • AI Dev Kit v1
  • Quick Start
    • API Key Setup
      • OpenAI
      • Google Gemini
      • ElevenLabs
      • OpenRouter
    • Adding Models & Voices
      • Quick Add Guide
      • Creating Snippets
    • Self-Hosting with Ollama
  • Editor Tools
    • Editor Chat
    • Asset Generators
    • Asset Managers
      • Prompt History
      • File Manager
      • Chatbot Manager
      • Assistant Manager
  • GEN Tasks
    • Overview
      • Prefixes
      • Sequence
    • Response
    • Image
    • Video
    • SoundFX
    • Speech
    • Transcript
    • Voice Change
    • Audio Isolation
  • Components
    • Chatbot
    • Chatbot (Assistants API)
    • Realtime Assistant
    • Modules
    • Event Receivers
  • Platform API
    • OpenAI
      • 💬Chat completions
      • 🖼️Image operations
      • 🗣️Text to speech
      • 🎙️Speech to text
        • Recording real-time in Unity
      • 💾Files
      • 🔎Embeddings
      • 🛡️Moderations
      • ⚙️Fine-tuning
      • Assistants API
        • How it works
        • Creating custom functions
        • Creating assistants API
    • Google Gemini
      • 📝System instructions
      • 💬Text generation
      • ⚙️Fine-tuning
      • ▶️Fucntion calling
      • 🔎Embeddings
      • 🛡️Safety
      • 💻Code execution
  • Legacy Documents
    • AI Dev Kit 1.0
      • Preperation
      • Scriptable Toolkits
        • Chat Streamer
        • Image Generator
        • Voice Transcriber
        • Voice Generator
      • Editor Tools
      • Troubleshooting (Legacy)
        • ❗Build Error: The name 'UnityMenu' does not exist in the current context
        • ❗The type or namespace name 'AndroidJavaObject' could not be found
        • ❗The type or namaspace name 'Plastic' does not exist
        • ❗Build Error: The name 'Asset Database' does not exist in the current context
        • ❗'ModelData.Create(Provider, string, UnixTime?, string)': not all code paths return a value
      • Code Generators
        • C# Script Generator
        • Unity Component Generator
    • AI Dev Kit 2.0
      • Event Handlers
      • Editor Chat
      • Editor Vision (TTI, ITI)
      • Editor Speech (TTS)
      • Management Tools
        • Prompt History Viewer
        • AI Model Manager
        • TTS Voice Manager
        • OpenAI File Manager
        • OpenAI Assistant Manager
        • ElevenLabs Voice Library
Powered by GitBook
On this page
  • What it does
  • 1. Setting up the Chatbot
  • 2. Optional Features (Modules)
  • 3. Real-time options
  • 4. Event Hooks
  • 5. Advanced Options (Optional)
  1. Components

Chatbot

Use this component to integrate an AI-powered chatbot into your scene using the OpenAI Chat Completion API.

PreviousAudio IsolationNextChatbot (Assistants API)

Last updated 4 days ago

What it does

This component enables:

  • Text input & response using LLM

  • Voice input using Speech-to-Text

  • Voice output using Text-to-Speech

  • Image generation if the user requests it

  • Tool/function calling if AI requests an action


1. Setting up the Chatbot

Step 1: Add the Chatbot component to any GameObject.

Step 2: Choose or create a Chat Session:

  • Stores the message history and config

  • Set it using Selected Session

Step 3: Select a model:

  • OpenAI GPT-4o is default

  • Optional: choose a separate model for summarization


2. Optional Features (Modules)

You can plug in optional features to extend the chatbot:

Feature
Component
What it does

Voice input

SpeechToText

User can speak instead of typing

Voice output

TextToSpeech

AI responses are played as audio

Image responses

ImageGenerator

User prompts like “draw a cat” return images

Tool execution

FunctionManager

AI can trigger Unity methods

If you leave these blank, the chatbot still works with text input/output only.


3. Real-time options

Setting
Effect

Stream

Show streamed tokens while AI responds

Auto Save

Automatically updates chat session after each message


4. Event Hooks

You can connect UnityEvents to respond when:

  • A message is sent or received

  • AI requests a function call

  • A streamed token arrives

  • An error occurs


5. Advanced Options (Optional)

You can manually override things like temperature, max tokens, top-p, etc. These are useful if you want finer control over the LLM behavior.