0.1.3 • Published 5 months ago
@kapaai/react-sdk v0.1.3
Kapa React SDK
Build AI-powered chat interfaces that answer questions from your knowledge base.
What is Kapa.ai?
kapa.ai is a platform that turns your documentation, knowledge base, and support content into an AI assistant. It enables your users to get instant, accurate answers drawn directly from your own content.
SDK Overview
This React SDK allows you to easily integrate Kapa-powered chat functionality into your React applications. Add a few components to your app and give your users the ability to chat with an AI that knows your product.
Quick Links
Installation
npm install @kapaai/react-sdk
Basic Usage
import { KapaProvider, useChat } from "@kapaai/react-sdk";
// Wrap your app with the provider
function App() {
return (
<KapaProvider integrationId="your-integration-id">
<YourChatInterface />
</KapaProvider>
);
}
// Use the hook in your components
function YourChatInterface() {
const { conversation, submitQuery, isGeneratingAnswer } = useChat();
// Build your chat UI...
}
For detailed usage instructions and API reference, see the official documentation.