diff --git a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx index a3c8e7de..21d8c466 100644 --- a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx +++ b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx @@ -25,6 +25,7 @@ import { import { Switch } from "@/components/ui/switch"; import { toast } from "@/components/ui/use-toast"; import { useCredentialGetter } from "@/hooks/useCredentialGetter"; +import { CodeEditor } from "@/routes/workflows/components/CodeEditor"; import { FileTextIcon, GearIcon, @@ -153,6 +154,7 @@ function PromptBox() { const [totpIdentifier, setTotpIdentifier] = useState(""); const [maxStepsOverride, setMaxStepsOverride] = useState(null); const [showAdvancedSettings, setShowAdvancedSettings] = useState(false); + const [dataSchema, setDataSchema] = useState(null); const startObserverCruiseMutation = useMutation({ mutationFn: async (prompt: string) => { @@ -165,6 +167,15 @@ function PromptBox() { proxy_location: proxyLocation, totp_identifier: totpIdentifier, publish_workflow: publishWorkflow, + extracted_information_schema: dataSchema + ? (() => { + try { + return JSON.parse(dataSchema); + } catch (e) { + return dataSchema; + } + })() + : null, }, { headers: { @@ -409,6 +420,24 @@ function PromptBox() { }} /> +
+
+
Data Schema
+
+ Specify the output data schema in JSON format +
+
+
+ setDataSchema(value || null)} + language="json" + minHeight="100px" + maxHeight="500px" + fontSize={8} + /> +
+
) : null} diff --git a/skyvern/forge/sdk/routes/agent_protocol.py b/skyvern/forge/sdk/routes/agent_protocol.py index 38ade3a1..a053b926 100644 --- a/skyvern/forge/sdk/routes/agent_protocol.py +++ b/skyvern/forge/sdk/routes/agent_protocol.py @@ -839,7 +839,7 @@ async def delete_workflow( @base_router.get("/workflows", response_model=list[Workflow]) -@base_router.get("/workflows/", response_model=list[Workflow]) +@base_router.get("/workflows/", response_model=list[Workflow], include_in_schema=False) async def get_workflows( page: int = Query(1, ge=1), page_size: int = Query(10, ge=1),