Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Patch instructions and canonical name #1056

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions agents-api/agents_api/queries/agents/patch_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *;
Expand Down Expand Up @@ -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 (
Expand Down
Loading