Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@waii-ai/widgets
Advanced tools
A collection of React UI components featuring the WaiiChat widget, which provides embedded chat functionality powered by Waii's text-to-SQL API.
# Using npm
npm install @waii-ai/widgets
# Using yarn
yarn add @waii-ai/widgets
# Using pnpm
pnpm add @waii-ai/widgets
import { WaiiChat } from '@waii-ai/widgets';
function App() {
return (
<WaiiChat
apiKey="your-api-key"
databaseKey="your-database-key"
theme="light"
handleChatResponse={(response) => {
console.log('Chat response:', response);
}}
/>
);
}
<script src="https://unpkg.com/@waii-ai/widgets/dist/waii-widgets.js"></script>
<div id="waii-chat"></div>
<script>
WaiiWidgets.WaiiChatLoader.init({
containerId: 'waii-chat',
apiKey: 'your-api-key',
databaseKey: 'your-database-key',
theme: 'light',
onMessage: (message) => console.log('New message:', message)
});
</script>
<script src="https://unpkg.com/@waii-ai/widgets/dist/embed.js"></script>
<div id="chat-container"></div>
<script>
const chatWidget = new WaiiWidgets.WaiiChatEmbed('#chat-container', {
apiKey: 'your-api-key',
databaseKey: 'your-database-key',
theme: 'light',
onChatResponse: (response) => {
console.log('Chat response:', response);
}
});
</script>
Property | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | Your Waii API key |
databaseKey | string | Yes | Your database connection string |
apiUrl | string | No | Custom API endpoint (if different from default) |
theme | 'light' | 'dark' | No | Widget theme (default: 'light') |
Property | Type | Description |
---|---|---|
className | string | CSS class for the container |
style | React.CSSProperties | Inline styles for the container |
contentStyle | React.CSSProperties | Styles for the content area |
messageListStyle | React.CSSProperties | Styles for the message list |
inputStyle | React.CSSProperties | Styles for the input area |
Property | Type | Description |
---|---|---|
botName | string | Custom name for the chat bot |
botAvatarUrl | string | Custom avatar URL for the bot |
Property | Type | Description |
---|---|---|
useFewShotLearning | boolean | Enable few-shot learning |
useReflection | boolean | Enable reflection capabilities |
useStrictHallucinationCheck | boolean | Enable strict hallucination checking |
model | string | Specify the AI model to use |
Property | Type | Description |
---|---|---|
handleChatResponse | (response: any) => void | Called when a chat response is received |
handleReset | () => void | Called when the chat is reset |
handleEditChat | Function | Called when a chat message is edited |
onQueryProcessed | () => void | Called when a query is processed |
Property | Type | Description |
---|---|---|
chatHistoryList | any[] | Pre-populate chat with history |
selectedDBConnector | any | Set the selected database connector |
chatQueryEdited | string | null | Pre-set edited query |
chatAskEdited | string | null | Pre-set edited question |
# Install dependencies
npm install
# Build for production
npm run build
# Run tests
npm run test
For issues and feature requests, please contact Waii support.
FAQs
Widgets for Waii, the worlds most powerful text-to-sql API.
The npm package @waii-ai/widgets receives a total of 8 weekly downloads. As such, @waii-ai/widgets popularity was classified as not popular.
We found that @waii-ai/widgets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.