intafaceai
v1.0.0
Published
Interface Agent Component Documentation
Downloads
9
Readme
Interface Agent Component Documentation
This Agent component provides a dynamic and interactive chat interface inspired by modern DeFi DApps. It supports user-to-assistant interactions, system error handling, and a sleek UI design.
A simple, customizable chat interface for React/Next.js applications. This component provides an easy way to integrate a chat interface into your project, designed to allow communication with a backend service using a projectId and apiKey.
Installation
To use the Interface Agent in your project, first install it via npm:
npm install [email protected]Usage in React or Next.js
After installing the package, import the Agent component into your React or Next.js project: Example in a React Project
import React from "react"; import { Agent } from "interface-agent";
function App() { const projectId = "your_project_id"; // Replace with your actual project ID const apiKey = "your_api_key"; // Replace with your actual API key
return ( ); }
export default App;
Props Required Props
Prop |Type |Description | ____|_|| projectId |String |Your unique project ID. Obtain it from Interface.com. | ___________||| apiKey |String |Your API key for authentication. Obtain it from Interface.com. | ___________|_|___________________________________________________________|
Obtaining projectId and apiKey
To use this library, you need to have a valid projectId and apiKey. Follow these steps:
- Visit Interface.com.
- Sign up or log in to your account.
- Navigate to your Developer Dashboard.
- Create a new project or use an existing one to generate your projectId and apiKey.
