@xprompt.ai/react-gpt
v0.1.1
Published
Create a chat GPT like chat UX on top of any REST API
Downloads
4
Maintainers
Readme
🤖 React GPT
Create a chat GPT like chat UX on top of any REST API.
React GPT is a "batteries included" approach to quickly add a chat GPT like UX to your app. It uses xprompt LLM to automatically translate natual language queries into REST API calls and execute them.
Demo and Tutorial
Available at: https://xprompt.ai/
Installation
Using npm:
npm install @xprompt.ai/react-gptUsing yarn:
yarn add @xprompt.ai/react-gptUsing pnpm:
pnpm add @xprompt.ai/react-gptProps
Prop | Description | Default
---- | ----------- | -------
bgColor | Background color of the chat component | #e4e4e4
userColor | User chat message background color | #e4e4e4
userTextColor | User chat message text color | #000000
botColor | Bot chat message background color | #dbdbdb
botTextColor | Bot chat message text color | #000000
inputTextColor | New chat message input control's text color | #C9C9C9
inputBgColor | New chat message input control's background color | #222222
config* | See below for details |
config Prop
Identifies the target backend app and provides the authentication data for the backend app. Authentication data is used to execute the REST API calls against the target app. Please create an app specification on www.xprompt.ai and use the name provided in the app spec as the appName below.
{
"appId": "", <- this UUID identifies the backend app. Create an app spec on www.xprompt.ai
"authData": { <- authentication data for the backend app —- used for executing the translated REST API calls
"location": "query", <- where to include the auth. Options are query | header
"auth": { <- auth object
}
}
}