promptsandbox.io is a node-based visual programming tool designed to help users create powerful workflows with OpenAI APIs. With an intuitive drag-and-drop interface, users can build dynamic chains of nodes, each performing a specific operation as part of the workflow. This project is built using React, focusing primarily on OpenAI APIs and providing a seamless experience for users working with these APIs.
- Check out the demo here: https://promptsandbox.io/
- Enter your OpenAI API key by clicking the button at the bottom left corner.
- Node-based visual programming interface for creating workflows.
- Integration with OpenAI APIs, including the Chat and Completion APIs.
- File upload and retrieval.
- Support for various node types, such as Text Input, Text Output, Chat Message, Chat API, and more.
- Debugging tools, such as breakpoints and running specific nodes, for inspecting the data passed between nodes.
- Example workflows for various use cases, with screenshots and links to actual workflows.
- Extensibility with additional node types for more complex workflows.
- Node.js
- NPM/Yarn
-
Clone the repository, change to the project directory, and install dependencies:
git clone https://github.com/your-username/promptsandbox.io.git cd promptsandbox.io yarn install
-
Add a .env file in /supabase/
PGSODIUM_SECRET_KEY=any-random-string
-
Set up Supabase Local instance. You can follow the guide here or follow the following steps: Install Supabase CLI
# MacOS brew install supabase/tap/supabase # Windows scoop bucket add supabase https://github.com/supabase/scoop-bucket.git scoop install supabase # Linux brew install supabase/tap/supabase
-
Make sure docker is running and start local supabase instance. You may need to create a Supabase account and run
supabase login
first.supabase start
-
Add another .env file in src/pages/ and include the environment variables. You can get these values by running
supabase status
or the first time you ran supabase start:VITE_SUPABASE_URL= #API URL value from supabase status VITE_SUPABASE_PUBLIC_API= # anon key value SUPABASE_SERVICE_ROLE= # service_rol key
-
Run
supabase functions serve
to run all the edge functions locally. Make sure supabase CLI is at leastv1.38.6
. -
Run the development server:
yarn dev
-
Finally, open your browser and navigate to
http://localhost:5173
to access promptsandbox.io 🎉.
- Select and drag nodes from the left panel onto the canvas to start building your workflow.
- Connect nodes by dragging a line from the output of one node to the input of another.
- Configure node settings and input values as needed.
- Provide an OpenAI API key by clicking the button at the bottom left corner and entering your key.
- Execute the workflow to see the results generated by interacting with the OpenAI APIs.
Future enhancements include:
- Integration with other AI models and APIs.
- Additional node types for more complex workflows.
- Improved UI and UX for managing and visualizing the conversation flow.
- Gallery of example workflows for various use cases.
We welcome contributions to promptsandbox.io! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch with a descriptive name for your feature or bugfix.
- Commit your changes to the new branch.
- Create a pull request and provide a clear description of your changes.