diff --git a/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js b/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js index fea6eced..a1e456f0 100644 --- a/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js +++ b/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js @@ -54,6 +54,7 @@ export function GenericExampleCard({ providerId, kind }) { const supportsMask = !!selectedModelObj?.capabilities?.includes("mask"); const [input, setInput] = useState(safeExConfig.defaultInput || ""); + const [question, setQuestion] = useState("Does this request require urgent attention?"); const [refImage, setRefImage] = useState(""); const [maskImage, setMaskImage] = useState(""); const [extraValues, setExtraValues] = useState(() => @@ -117,11 +118,20 @@ export function GenericExampleCard({ providerId, kind }) { acc[k] = v; return acc; }, {}); + const systemoneQuestions = kind === "systemone" ? { + questions: { + is_urgent: { + type: "noul", + instructions: question.trim() || "Does this request require urgent attention?", + }, + }, + } : {}; const requestBody = { model: modelFull, [exConfig.bodyKey]: input, ...exConfig.extraBody, ...extraBodyFromFields, + ...systemoneQuestions, ...(supportsEdit && effectiveRefImage ? { image: effectiveRefImage } : {}), ...(supportsMask && effectiveMaskImage ? { mask_image: effectiveMaskImage } : {}), }; @@ -328,6 +338,29 @@ export function GenericExampleCard({ providerId, kind }) { + {/* Question for System One */} + {kind === "systemone" && ( + +
+ setQuestion(e.target.value)} + placeholder="Enter evaluation question or criteria" + className="w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary" + /> + {question && ( + + )} +
+
+ )} + {/* Reference image (only for edit-capable image models) */} {supportsEdit && ( diff --git a/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js b/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js index 9bdf4b41..78bb5df8 100644 --- a/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js +++ b/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js @@ -119,6 +119,7 @@ export default function ModelsCard({ providerId, kindFilter, providerAliasOverri const providerAlias = providerAliasOverride || getProviderAlias(providerId); const effectiveType = kindFilter || "llm"; + const supportsTest = kindFilter !== "systemone"; const fetchData = useCallback(async () => { try { @@ -238,7 +239,7 @@ export default function ModelsCard({ providerId, kindFilter, providerAliasOverri onSetAlias={(alias) => handleSetAlias(model.id, alias)} onDeleteAlias={() => handleDeleteAlias(existingAlias)} testStatus={modelTestResults[model.id]} - onTest={() => handleTestModel(model.id)} + onTest={supportsTest ? () => handleTestModel(model.id) : undefined} isTesting={testingModelId === model.id} isFree={model.isFree} /> @@ -255,7 +256,7 @@ export default function ModelsCard({ providerId, kindFilter, providerAliasOverri onSetAlias={() => {}} onDeleteAlias={() => handleDeleteCustomModel(model.id)} testStatus={modelTestResults[model.id]} - onTest={() => handleTestModel(model.id)} + onTest={supportsTest ? () => handleTestModel(model.id) : undefined} isTesting={testingModelId === model.id} isCustom />