ChAbhishek28's picture
Upload api.py
dff22d6 verified
raw
history blame contribute delete
326 Bytes
from fastapi import FastAPI
from ai_module import get_ai_response
app = FastAPI()
@app.get("/")
def home():
return {"message": "Welcome to the Solar Industry AI Assistant API!"}
@app.get("/ask")
def ask_solar_assistant(query: str):
response = get_ai_response(query)
return {"response": response}