Fix ReferenceError caused by undefined `isValidMessage` and `MESSAGE_ROLES` in the buildApiPayload function within api.js. Changes: - Add missing `isValidMessage` import from utils.js - Add missing `MESSAGE_ROLES` import from playground constants - Consolidate duplicate `formatMessageForAPI` import - Clean up import statements organization Resolves: ReferenceError: isValidMessage is not defined at buildApiPayload (api.js:39:13)
React Template
Basic Usages
# Runs the app in the development mode
npm start
# Builds the app for production to the `build` folder
npm run build
If you want to change the default server, please set REACT_APP_SERVER environment variables before build,
for example: REACT_APP_SERVER=http://your.domain.com.
Before you start editing, make sure your Actions on Save options have Optimize imports & Run Prettier enabled.