Markprompt React
A headless React component for building a prompt interface, based on the Markprompt API.
Installation
Check out the starter template for a fully working example: Markprompt starter template.
Install the @markprompt/react
package via npm or yarn:
npm install @markprompt/react
yarn add @markprompt/react
Usage
Example:
import { Markprompt } from '@markprompt/react';
function MyPrompt() {
return <Markprompt projectKey="<project-key>" model="gpt-4" />;
}
where <project-key>
can be obtained in your project settings
Documentation
The full documentation for the component can be found on the Markprompt docs.
Starter Template
For a working setup based on Next.js + Tailwind, check out the Markprompt starter template.
Authors
This library is created by the team behind Motif
(@motifland).