fix: handle empty chunks and retriever values in agent creation and update

This commit is contained in:
Siddhant Rai
2025-05-14 09:26:36 +05:30
parent a52a3e3158
commit d1d28df8a1
2 changed files with 32 additions and 6 deletions

View File

@@ -102,12 +102,7 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) {
const isPublishable = () => {
return (
agent.name &&
agent.description &&
(agent.source || agent.retriever) &&
agent.chunks &&
agent.prompt_id &&
agent.agent_type
agent.name && agent.description && agent.prompt_id && agent.agent_type
);
};