Phase 1: v1 single-bot roleplay engine #1
@@ -26,7 +26,7 @@
|
||||
</section>
|
||||
|
||||
<form class="turn-input" method="post" action="/chats/{{ chat.id }}/turns">
|
||||
<textarea name="prose" rows="3" placeholder="What do you say or do?"></textarea>
|
||||
<textarea name="prose" rows="3" placeholder="What do you say or do?" required></textarea>
|
||||
<button type="submit">Send</button>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -122,6 +122,9 @@ async def post_turn(
|
||||
conn=Depends(get_conn),
|
||||
client=Depends(get_llm_client),
|
||||
):
|
||||
if not prose.strip():
|
||||
raise HTTPException(status_code=400, detail="prose cannot be empty")
|
||||
|
||||
chat = get_chat(conn, chat_id)
|
||||
if chat is None:
|
||||
raise HTTPException(status_code=404, detail=f"chat not found: {chat_id}")
|
||||
|
||||
Reference in New Issue
Block a user