Skip to main content
100%

Pagina con ChatGPT-4 e DALL-E API

✓ Published0🌍 Public
EErik L
Last edited Jul 27, 2023
Created on Apr 20, 2023
Forked from HTML Starter

This example demonstrates a web interface for generating both text and images using OpenAI’s APIs, with ChatGPT-4 handling prompt responses and DALL-E producing matching visuals. A user enters a prompt in an HTML input field, triggering a fetch request to the ChatGPT-4 completion endpoint, which stores the response text in an array and displays it as slides in a scrollable container. Simultaneously, a second fetch call to the DALL-E image API generates three images, rendered as 200x150 pixel thumbnails. The UI is styled with vanilla CSS, including a search bar, image container, and horizontal slide layout, with no external JavaScript libraries beyond the browser’s built-in fetch API.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes