PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/OpenAI

Build a Streaming Chat Input

Last updated: May 22, 2026

Quick Overview

This question evaluates a front-end engineer's competency in building streaming user interfaces, covering component structure, state management, asynchronous stream handling, incremental rendering of text chunks, UI responsiveness, duplicate-submission control, and basic loading and error state management.

  • medium
  • OpenAI
  • Coding & Algorithms
  • Frontend Engineer

Build a Streaming Chat Input

Company: OpenAI

Role: Frontend Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Implement a simple front-end chat interface similar to a minimal AI assistant. Requirements: - Show a text input and a submit button. - When the user submits a prompt, call a provided API that returns the assistant response as a stream of text chunks. - Render the streamed response below the input as chunks arrive, rather than waiting for the full response. - Keep the UI responsive while the stream is in progress. - Prevent or handle duplicate submissions while a response is streaming. - Display basic loading and error states. You may assume the API endpoint and response-streaming format are provided by the interviewer. Focus on the component structure, state management, and streaming-render behavior.

Quick Answer: This question evaluates a front-end engineer's competency in building streaming user interfaces, covering component structure, state management, asynchronous stream handling, incremental rendering of text chunks, UI responsiveness, duplicate-submission control, and basic loading and error state management.

Related Interview Questions

  • Implement IP Address Arithmetic - OpenAI (hard)
  • Simulate Infection Spread on a Grid - OpenAI (hard)
  • Implement Social Follow Recommendations - OpenAI (medium)
  • Build a Compose Rating Card - OpenAI (medium)
  • Generate Data Labeling Schedules - OpenAI (medium)
OpenAI logo
OpenAI
Apr 25, 2026, 12:00 AM
Frontend Engineer
Technical Screen
Coding & Algorithms
2
0

Implement a simple front-end chat interface similar to a minimal AI assistant.

Requirements:

  • Show a text input and a submit button.
  • When the user submits a prompt, call a provided API that returns the assistant response as a stream of text chunks.
  • Render the streamed response below the input as chunks arrive, rather than waiting for the full response.
  • Keep the UI responsive while the stream is in progress.
  • Prevent or handle duplicate submissions while a response is streaming.
  • Display basic loading and error states.

You may assume the API endpoint and response-streaming format are provided by the interviewer. Focus on the component structure, state management, and streaming-render behavior.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More OpenAI•More Frontend Engineer•OpenAI Frontend Engineer•OpenAI Coding & Algorithms•Frontend Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.