trygithubactions / api /routers /generate_final_story.py
subashpoudel's picture
Included CI CD
583f6dd
raw
history blame
466 Bytes
from fastapi import APIRouter
from api.stored_data import stored_data
from src.genai.brainstroming_agent.utils.utils import generate_final_story
router= APIRouter()
@router.post("/generate-final-story")
def generate_final_story_endpoint():
final_story = generate_final_story(
stored_data.get("brainstroming_response") or stored_data.get("business_details")
)
stored_data['final_story']=final_story
return {
'response': final_story
}