Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@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.
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.