@deepmodel/dm-agent-embed-pkg
Easily integrate Deepmodel AI agents into your website with a floating chat button and dialog. This package allows seamless interaction with AI agents.
Features
- Simple integration with minimal setup
- Floating chat button for easy access
- Customizable colors to match your brand
Installation
npm install @deepmodel/dm-agent-embed-pkg
or
yarn add @deepmodel/dm-agent-embed-pkg
Usage
Using ES Module Import
Import and initialize the floating chat button in your project:
import DmAgentEmbed from "@deepmodel/dm-agent-embed-pkg";
const chat = new DmAgentEmbed({
apiKey: "your-api-key",
agentId: "your-agent-id",
threadId: "optional-thread-id",
primaryColor: "oklch(38.3% 0.2 285)",
secondaryColor: "oklch(90% 0.06 298)",
chatContainerColor: "oklch(.967 .003 264.542)",
});
chat.init();
Using CDN
Include the following script in your HTML file:
<script src="https://unpkg.com/@deepmodel/dm-agent-embed-pkg@latest/dist/index.umd.js"></script>
<script>
window.addEventListener("load", function () {
DmAgentEmbed.init({
apiKey: "your-api-key",
agentId: "your-agent-id",
primaryColor: "#d90429",
secondaryColor: "#F8C9CD",
chatContainerColor: "#edf2f4",
});
});
</script>
Configuration Options
apiKey | string | '' | API key for authentication |
agentId | string | '' | Identifier for the chat agent |
threadId | string | undefined | (Optional) Thread ID for conversation tracking |
primaryColor | string | undefined | (Optional) Primary theme color |
secondaryColor | string | undefined | (Optional) Secondary theme color |
chatContainerColor | string | undefined | (Optional) Background color for the chat container |
Support
For any questions or issues, please open a GitHub issue.