From 56fcfbf6946e5b1e4acb5fe29678b6ff98777c2c Mon Sep 17 00:00:00 2001 From: Dmitry Paramonov Date: Tue, 14 Jan 2025 15:52:43 +0300 Subject: [PATCH] fix: Patch instructions and canonical name --- agents-api/agents_api/queries/agents/patch_agent.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/agents-api/agents_api/queries/agents/patch_agent.py b/agents-api/agents_api/queries/agents/patch_agent.py index 324ee2eee..94cbb487b 100644 --- a/agents-api/agents_api/queries/agents/patch_agent.py +++ b/agents-api/agents_api/queries/agents/patch_agent.py @@ -35,6 +35,14 @@ default_settings = CASE WHEN $7::jsonb IS NOT NULL THEN $7 ELSE default_settings + END, + instructions = CASE + WHEN $8::text[] IS NOT NULL THEN $8 + ELSE instructions + END, + canonical_name = CASE + WHEN $9::citext IS NOT NULL THEN $9 + ELSE canonical_name END WHERE agent_id = $2 AND developer_id = $1 RETURNING *; @@ -72,6 +80,8 @@ async def patch_agent( data.metadata, data.model, data.default_settings.model_dump() if data.default_settings else None, + data.instructions, + data.canonical_name, ] return (