Skip to content

excelsier/customer-support-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customer Support API with Cloudflare AutoRAG Integration

A Node.js-based customer support API that leverages Cloudflare's AutoRAG service to provide intelligent, context-aware responses to customer inquiries.

Features

  • Cloudflare AutoRAG Integration: Connect to Cloudflare's AutoRAG service for AI-powered responses
  • Conversation History: Track conversation context for more relevant answers
  • In-Memory Caching: Optimize performance in serverless environments
  • Cloudflare Worker Proxy: Solve cross-origin and authentication challenges
  • Robust Error Handling: Fallback responses when services are unavailable

Architecture

This solution uses a three-tier architecture:

  1. Frontend: Simple HTML/JS client interface
  2. Serverless API: Node.js Express app deployed as Netlify function
  3. Cloudflare Worker: Proxy service that connects securely to AutoRAG

Deployment

The system is deployed at:

Environment Variables

The following environment variables should be configured:

  • CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
  • CLOUDFLARE_AUTORAG_NAME: Name of your AutoRAG instance
  • CLOUDFLARE_API_TOKEN: API token with access to AutoRAG

Local Development

# Install dependencies
npm install

# Run locally
npm start

Testing

# Test the AutoRAG connection
node verify-autorag.js

# Run a simple query test
node simple-test.js

License

MIT

About

A Node.js-based Customer Support API with Cloudflare AutoRAG Integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published