Amna2024's picture
Update app.py
4f78a88 verified
raw
history blame contribute delete
691 Bytes
"""
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"
)
@app.post("/process")
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