- 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
382 B
JavaScript
16 lines
382 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Creates a new URL by combining the specified URLs
|
|
*
|
|
* @param {string} baseURL The base URL
|
|
* @param {string} relativeURL The relative URL
|
|
*
|
|
* @returns {string} The combined URL
|
|
*/
|
|
export default function combineURLs(baseURL, relativeURL) {
|
|
return relativeURL
|
|
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
: baseURL;
|
|
}
|