- Created chatwoot-agent-bot/ with Node.js webhook server - Bot detects intent (greeting, billing, technical, features, account) - Auto-responds from FAQ knowledge base or escalates to human - FAQ-KB.md: Living knowledge base that grows with customer questions - CHATWOOT-SETUP.md: Complete deployment and configuration guide - Supports Telegram notifications on escalation - Bot runs on port 3001, ready for Chatwoot webhook integration
16 lines
323 B
JavaScript
16 lines
323 B
JavaScript
const { asyncIterator } = Symbol;
|
|
|
|
const readBlob = async function* (blob) {
|
|
if (blob.stream) {
|
|
yield* blob.stream();
|
|
} else if (blob.arrayBuffer) {
|
|
yield await blob.arrayBuffer();
|
|
} else if (blob[asyncIterator]) {
|
|
yield* blob[asyncIterator]();
|
|
} else {
|
|
yield blob;
|
|
}
|
|
};
|
|
|
|
export default readBlob;
|