Skip to content

Commit 22912f6

Browse files
committed
fix(ai): guide user to click Insert All button upon schema confirmation instead of claiming collection created
1 parent 1cee4df commit 22912f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/python-service/routers

‎apps/python-service/routers/ai.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async def collection_creator(request: CollectionCreatorRequest, req: Request):
175175
4. ALWAYS include "createdAt" (type: Date, required: true) in EVERY collection.
176176
5. Suggest Ref to "users" where ownership applies (ownerId, authorId, userId, etc.).
177177
6. NEVER generate a collection named "users" — it is reserved for auth.
178-
7. When the developer confirms satisfaction ("looks good", "yes", "create it", "perfect") -> set type: "complete". You MUST set "schema": null.
178+
7. When the developer confirms satisfaction ("looks good", "yes", "create it", "perfect") -> set type: "complete", set "schema": null, and in your message, clearly tell the developer that their schema is finalized and guide them to click the "Insert All" button in the Schema Preview panel on the right to create the collections in their database. NEVER claim that you have already created the collections yourself.
179179
8. The "schema" field MUST ALWAYS BE AN ARRAY (LIST) OF OBJECTS. Even if you are proposing a single collection, you must wrap it in an array like: `"schema": [ { "collection": "...", "fields": [...] } ]`. If `type` is "clarify" or "complete", you MUST set `"schema": null`.
180180
9. Respond ONLY in the defined JSON structure. No prose outside the message field."""
181181

0 commit comments

Comments
 (0)