fastlane / routes /customer_support.py
hrguarinv's picture
Update routes/customer_support.py
9879f8c verified
raw
history blame contribute delete
No virus
782 Bytes
from fastapi import APIRouter
from models.input import Input
from services.nlp import generate_response
router = APIRouter()
@router.post("/get-help")
def handle_get_help(input: Input):
response_text = generate_response(
{"query": input.text, "intent": "Get help"})
return {"response": response_text[0]['generated_text']}
@router.get("/return-exchange-policy")
def handle_return_exchange_policy():
return {"policy": "Our return/exchange policy details go here"}
@router.get("/payment-options")
def handle_payment_options():
return {"payment_options": ["Credit Card", "PayPal", "Bank Transfer"]}
@router.get("/shipping-information")
def handle_shipping_information():
return {"shipping_info": "Shipping costs and delivery times details go here"}