To get started, users need to clone the repository, install dependencies, and start the development server. The widget consists of three main components: a server for communication between the widget and the OpenAI API, an app which is the main React application, and a widget which is a JavaScript snippet that creates an iframe to inject into your website. The server, app, and widget files need to be hosted on your website. If not using widgetplatform.com, users need to provide their own API endpoint.
Key takeaways:
- The OpenAI Assistants Chat Widget is a simple chat widget built with React, Vite, and Tailwind CSS. It can be used as a starting point to build your own chat widget.
- The widget is easy to integrate, supports single instance across page navigation, has a responsive design, customizable appearance, and supports TypeScript.
- To get started, you need to clone the repository, install the dependencies, and start the development server. You also need to add your OpenAI API key and Assistant ID to the `.env` file.
- The widget consists of three main components: the server for communication between the widget and the OpenAI API, the main React application, and the JavaScript snippet which creates an iframe to inject into your website.