MVP 0.9
This commit is contained in:
1 parent
a8caeb0dd4
commit
fd7102e3b3
95 files changed
+16520
-193
No files matched your search
@@ -117,6 +117,19 @@ def update_prompt(prompt_id: str, req: PromptWrite, session: dict = Depends(requ
|
||||
current = row_to_dict(conn.execute("SELECT id FROM ai_prompts WHERE id = ?", (prompt_id,)).fetchone())
|
||||
if not current:
|
||||
raise HTTPException(404, "Prompt nicht gefunden")
|
||||
if req.prompt_type == "base" and req.template:
|
||||
try:
|
||||
preview_prompt(
|
||||
{
|
||||
"id": prompt_id,
|
||||
"slug": req.slug.strip(),
|
||||
"prompt_type": req.prompt_type,
|
||||
"template": req.template,
|
||||
},
|
||||
{},
|
||||
)
|
||||
except EngineError as exc:
|
||||
_http(exc)
|
||||
conn.execute(
|
||||
"""
|
||||
UPDATE ai_prompts
|
||||
|
||||
Reference in new issue
Block a user