Transform text prompts into captivating short stories using Anthropic's Claude API! Step-by-step, you'll build a short story generation service using Flask, configure API requests, and integrate it into a functional web application.
Overview
Syllabus
- Unit 1: Creating the Base Prompt for Story Generation
- Reading the Story Template File
- Formatting Prompts with User Input
- Testing Prompt Error Handling
- Comprehensive PromptManager Testing Suite
- Unit 2: Building the Story Manager
- Fixing the Story Retrieval Method
- Testing Multiple Stories in StoryManager
- Adding Error Handling to Story Retrieval
- Implementing Keyword Search for Stories
- Unit 3: Generating Short Stories with StoryGeneratorService
- Adding Input Validation to Story Generator
- Mocking API Calls for Testing
- Enhancing Error Logging for Better Debugging
- Retrieving Stories by Unique Identifiers
- Unit 4: Creating the Story Controller
- Validating User Input for Story Generation
- Handling Errors in the Story Controller
- Formatting JSON Responses in Flask Controllers
- Integrating Controller Operations for Complete Testing
- Unit 5: Building the Flask API for Story Generation
- Adding a Health Check Endpoint
- Adding Input Validation to API Endpoint
- Implementing Custom 404 Error Handler