Skip to content

UnityPredict — Chatbot Interface

Embeddable Conversational UI for Any Compatible Model

Overview

The UnityPredict Chatbot Interface is an auto-generated conversational UI that can be attached to any model that exposes at least one string input and one string output.
It provides a simple, intuitive chat-style experience for testing models and interacting with LLM-like engines — without writing any UI code.

Just like UnityPredict’s auto-generated Form Interface, the Chatbot UI lets users quickly experiment with their models.
But what makes the Chatbot Interface unique is that it can be embedded directly into any external website via an <iframe>.

This enables you to:

  • Build your own AI chatbots, LLM wrappers, and custom engines on UnityPredict.
  • Deploy them instantly with a ready-made UI.
  • Embed the chatbot anywhere on the web with a single HTML snippet.

This eliminates the need for frontend development and dramatically reduces the time it takes to turn an AI model into an end-user–ready product.


Key Features

  • 💬 Conversational Interface
    Natural chat-style interactions for any model with string inputs/outputs.

  • 🧠 Optional Context Retention
    Session-aware conversations allow for multi-turn dialog.

  • 🌐 Embeddable Widget (iframe)
    Copy/paste a snippet to place your chatbot directly on your website, portal, or product page — no coding required.

  • ⚙️ Automatic UI Generation
    UnityPredict handles message rendering, input fields, file uploads, and dynamic forms.

  • 🔌 Works With Any Compatible Model
    As long as the model exposes:

    • one input: string
    • one output: string
      …it can be used with the Chatbot UI.
  • 🗂️ Hybrid Workflow Support
    Models can return not only text but also structured outputs (forms, option lists, files).

  • 🪄 Custom System Instructions
    Set behavior, tone, policy instructions, or conversation rules for your chatbot.


When to Use the Chatbot Interface

Use the Chatbot Interface when:

  • You want a full chat-like experience for interacting with your model.
  • You need a zero-code UI for demonstrations, prototyping, or user testing.
  • You want to publish a chatbot on your own website without building a frontend.
  • Your model behaves like a conversational agent or expects free-form text.

If your model has many structured parameters, the Form Interface may be a better fit — but both can be used depending on your workflow.


How to Create a Chatbot Model in UnityPredict

  1. Navigate to Models → Create Model
    Click “Create Model” in your UnityPredict dashboard.

  2. Select “Chatbot” as the Interface Type
    This tells UnityPredict to generate a chat-style UI for your model.

  3. Define Inputs and Outputs
    At minimum, ensure you have:

    • InputMessage (string)
    • OutputMessage (string)

    You may optionally add:

    • InputFile
    • DynamicFormResults
    • EmbedInputs
    • OutputFile
    • DynamicFormDefinitions
  4. Attach an Engine
    Choose an existing engine or create a new one for your model.

  5. Save & Deploy
    Once deployed, your chatbot becomes immediately usable through UnityPredict.

  6. Embed or Share
    Access it directly via the UnityPredict UI, or embed it into any website using an iframe.


How the Chatbot Interface Works

  1. The user sends a message (InputMessage) or uploads files.
  2. UnityPredict forwards the input and session context to your engine.
  3. The engine runs your model and returns:
    • OutputMessage (required)
    • Optional: dynamic form fields, options, files, or other structured outputs.
  4. The Chatbot UI renders the model’s response and updates session state.

This supports:

  • LLM-style conversation
  • Step-by-step workflows
  • Multi-turn data collection
  • File-based processing
  • Form-driven interactions

Input Specification

NameTypeDescription
InputMessageStringPrimary text input from the user.
InputFileFileOptional file upload for processing.
DynamicFormResultsDictionaryData returned from previously generated dynamic forms.
EmbedInputsDictionaryOptional metadata/context passed through each model call.

Output Specification

NameTypeDescription
OutputMessageStringThe model's main response (required).
DynamicFormDefinitionsDictionaryForm fields for collecting additional user input.
OptionsStringProvides selectable options for user actions.
AutoInvokeInIntegerDelay before auto-triggering another model call.
OutputFileFileFile generated by the model in the response.

Embedding the Chatbot (iframe)

Embedding takes only a few seconds:

html
<iframe
  src="https://your-unitypredict-url/chatbot/{modelId}?hostUrl={window.location.origin}&endChatCallback={true}&hideChatCallback={true}"
  width="100%"
  height="600"
  frameborder="0"
  allow="microphone"
></iframe>