Responses starter app
This repository contains a NextJS starter app built on top of the Responses API. It leverages built-in tools (web search and file search) and implements a chat interface with multi-turn conversation handling.
Features:
- Multi-turn conversation handling
- Web search tool configuration
- Vector store creation & file upload for use with the file search tool
- Function calling
- Streaming responses & tool calls
- Display annotations
This app is meant to be used as a starting point to build a conversational assistant that you can customize to your needs.
How to use
-
Set up the OpenAI API:
- If you're new to the OpenAI API, sign up for an account.
- Follow the Quickstart to retrieve your API key.
-
Set the OpenAI API key:
2 options:
- Set the
OPENAI_API_KEYenvironment variable globally in your system - Set the
OPENAI_API_KEYenvironment variable in the project: Create a.envfile at the root of the project and add the following line (see for reference):
- Set the