Componente de chat embebible para agentes de IA
npm install @operant-lab/agent-chat-widgetbash
npm install @n3eme/agent-chat
`
Uso
$3
`jsx
import { AgentChat } from '@n3eme/agent-chat';
function App() {
return (
agentId="tu-agent-id"
apiKey="tu-api-key"
conversationId="opcional-conversation-id"
windowTitle="Título del Chat"
initialMessage="Mensaje inicial"
brandColor="#007bff"
bubblePosition="right"
messageSuggestions={["Sugerencia 1", "Sugerencia 2"]}
/>
);
}
`
$3
1. Agrega el script a tu HTML:
`html
`
2. Inicializa el widget:
`javascript
new AgentChat({
agentId: "tu-agent-id", // Requerido
apiKey: "tu-api-key", // Requerido
conversationId: "opcional-conversation-id",
windowTitle: "Título del Chat",
initialMessage: "Mensaje inicial",
brandColor: "#007bff",
bubblePosition: "right",
messageSuggestions: ["Sugerencia 1", "Sugerencia 2"]
});
``