
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
nymia-ai-assistant
Advanced tools
Package for integrating an AI assistant chat into any web application easily and customizable.
Library to easily integrate an IA assistant chat into any web application in an easy and customizable way.
npm install nymia-ai-assistant
or
yarn add nymia-ai-assistant
import { createAssistant } from "nymia-ai-assistant";
// Create an assistant with minimal configuration
const assistant = createAssistant({
onSend: async (message) => {
// Here you can integrate your own logic to respond
// Connect with your backend, IA API, etc.
return `Received: ${message}`;
},
});
// The assistant is ready to use
// The floating button will appear in the bottom right corner
// Assistant with full configuration
const assistant = createAssistant({
// API Key for the assistant (required)
apiKey: "your-api-key",
// API URL for the assistant server (required)
apiBaseUrl: "http://localhost:8000",
// General options
title: "My Assistant",
placeholder: "How can I help you?",
position: "bottom-right", // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
initialMessage: "Hello! I am your virtual assistant. How can I help you?",
autoOpen: false, // If true, the chat will open automatically
// Experimental: Enable image search in responses (may slow down replies)
searchImages: false, // If true, the assistant will try to include images in the response. This is experimental and may make responses slower,
// Enable audio responses (replaces text with audio player)
audioAnswers: false, // If true, assistant responses will be played as audio with a WhatsApp-style play button
// Specific button options
buttonOptions: {
backgroundColor: "#4a90e2",
color: "#ffffff",
icon: "💬", // Emoticon or HTML for the button
size: "medium", // 'small' | 'medium' | 'large'
container: "#my-container", // Selector or element where to mount the button
},
// Chat theme options
theme: {
primaryColor: "#4a90e2", // Primary color (header and send button)
textColor: "#333333", // General text color
backgroundColor: "#ffffff", // Chat background color
userMessageBgColor: "#4a90e2", // User message background color
userMessageTextColor: "#ffffff", // User message text color
assistantMessageBgColor: "#f1f1f1", // Assistant message background color
assistantMessageTextColor: "#333333", // Assistant message text color
inputBorderColor: "#e0e0e0", // Input border color
inputBgColor: "#ffffff", // Input background color
inputTextColor: "#333333", // Input text color
},
});
If you want the assistant to be able to show images in the responses, you can enable the searchImages
option. This feature is experimental and, when enabled, may cause responses to take longer, as the assistant will try to find and process relevant images for the conversation.
const assistant = createAssistant({
// ...other options...
searchImages: true, // Experimental: enables image search in responses
});
When disabled (false
, the default value), the option to show images will not appear in the chat interface.
The library now supports audio responses from the assistant. When enabled, instead of showing text responses, the assistant will display an audio player with a WhatsApp-style play button.
const assistant = createAssistant({
// ...other options...
audioAnswers: true, // Enable audio responses
});
How it works:
audioAnswers
is set to true
, the library automatically adds has_text_to_voice=activate
to the API query parametersaudio_url
field with the audio file URLExpected API Response Format:
{
"response": "Your text response here",
"audio_url": "https://example.com/path/to/audio.wav"
}
Features:
You can control the assistant with the following methods:
// Open the chat
assistant.open();
// Close the chat
assistant.close();
// Toggle between open/closed
assistant.toggle();
// Check if it's open
const isOpen = assistant.isOpen();
// Hide the floating button (for example, when using your own button)
assistant.hideButton();
// Show the floating button
assistant.showButton();
// Unmount the assistant (remove from the DOM)
assistant.unmount();
This project is licensed under the ISC License.
FAQs
Package for integrating an AI assistant chat into any web application easily and customizable.
The npm package nymia-ai-assistant receives a total of 9 weekly downloads. As such, nymia-ai-assistant popularity was classified as not popular.
We found that nymia-ai-assistant demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.