Spaces:
Runtime error
Runtime error
| """ | |
| FastAPI application for the customer support system. | |
| """ | |
| from fastapi import FastAPI, Request | |
| # Import the customer support workflow | |
| from Customer_Support.workflow import run_customer_support | |
| # Create FastAPI application | |
| app = FastAPI( | |
| title="Customer Support API", | |
| description="An API for processing customer support queries using LangGraph and Gemini AI", | |
| version="1.0.0" | |
| ) | |
| async def process_query(request: Request): | |
| """Process a customer support query""" | |
| data = await request.json() | |
| query = data.get("query") | |
| if not query: | |
| return {"error": "Query is required"} | |
| result = run_customer_support(query) | |
| return result | |