Components
- OpenAI hook — manages the OpenAI client and streams responses.
- TokenPopup — modal for entering the OpenAI API token.
- SettingsForm — switches between Echo and OpenAI mode and captures API keys.
- Home — mounts the avatar video and the input form.
Flow
- The user picks a mode (Echo or OpenAI) and provides API keys via
SettingsForm. - The avatar is initialized with the Avaturn.Live SDK.
- On submit, text is either passed straight to
avatar.task(text)(echo) or streamed through OpenAI; each sentence chunk is pushed toavatar.task()as it arrives (see Streaming LLM output).