fugthchat commited on
Commit
ca5acb9
·
verified ·
1 Parent(s): 012c41f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -105,8 +105,8 @@ class StoryPrompt(BaseModel):
105
 
106
  # These are no longer used by the backend, but we include them
107
  # so the frontend's request doesn't fail
108
- feedback: str
109
- story_memory: str
110
 
111
 
112
  # --- API Endpoints ---
@@ -135,7 +135,7 @@ async def generate_story(prompt: StoryPrompt):
135
  logging.error(f"Failed to get model for choice: {prompt.model_choice}")
136
  return JSONResponse(status_code=503, content={"error": "The AI model is not available or failed to load."})
137
 
138
- # --- THIS IS THE FIX ---
139
  # We trust the frontend and use the prompt exactly as it was sent.
140
  # We no longer re-format it.
141
  final_prompt = prompt.prompt
 
105
 
106
  # These are no longer used by the backend, but we include them
107
  # so the frontend's request doesn't fail
108
+ feedback: str = ""
109
+ story_memory: str = ""
110
 
111
 
112
  # --- API Endpoints ---
 
135
  logging.error(f"Failed to get model for choice: {prompt.model_choice}")
136
  return JSONResponse(status_code=503, content={"error": "The AI model is not available or failed to load."})
137
 
138
+ # --- THIS IS THE BUG FIX ---
139
  # We trust the frontend and use the prompt exactly as it was sent.
140
  # We no longer re-format it.
141
  final_prompt = prompt.prompt