RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Feat: Structured data will still be stored in outputs for compatibility with older versions. #10427 (#11368)
balibabuba78d0f0c273
diff --git a/web/src/pages/agent/constant/index.tsx b/web/src/pages/agent/constant/index.tsxindex 16ef78c99b..d10026887d 100644--- a/web/src/pages/agent/constant/index.tsx+++ b/web/src/pages/agent/constant/index.tsx@@ -5,7 +5,6 @@ import {import {AgentGlobals,AgentGlobalsSysQueryWithBrace,- AgentStructuredOutputField,CodeTemplateStrMap,ComparisonOperator,JsonSchemaDataType,@@ -465,7 +464,6 @@ export const initialAgentValues = {mcp: [],cite: true,showStructuredOutput: false,- [AgentStructuredOutputField]: {},outputs: {content: {type: 'string',diff --git a/web/src/pages/agent/form/agent-form/index.tsx b/web/src/pages/agent/form/agent-form/index.tsxindex b683a281f7..83e68e23bc 100644--- a/web/src/pages/agent/form/agent-form/index.tsx+++ b/web/src/pages/agent/form/agent-form/index.tsx@@ -28,7 +28,6 @@ import { useTranslation } from 'react-i18next';import { z } from 'zod';import {AgentExceptionMethod,- AgentStructuredOutputField,NodeHandleId,VariableType,} from '../../constant';@@ -74,7 +73,6 @@ const FormSchema = z.object({...LargeModelFilterFormSchema,cite: z.boolean().optional(),showStructuredOutput: z.boolean().optional(),- [AgentStructuredOutputField]: z.record(z.any()),});export type AgentFormSchemaType = z.infer<typeof FormSchema>;@@ -127,7 +125,7 @@ function AgentForm({ node }: INextOperatorForm) {structuredOutputDialogVisible,hideStructuredOutputDialog,handleStructuredOutputDialogOk,- } = useShowStructuredOutputDialog(form);+ } = useShowStructuredOutputDialog(node?.id);useEffect(() => {if (exceptionMethod !== AgentExceptionMethod.Goto) {@@ -284,9 +282,7 @@ function AgentForm({ node }: INextOperatorForm) {)}</section></Collapse>- <RAGFlowFormItem name={AgentStructuredOutputField} className="hidden">- <Input></Input>- </RAGFlowFormItem>+<Output list={outputList}><RAGFlowFormItem name="showStructuredOutput">{(field) => (diff --git a/web/src/pages/agent/form/agent-form/use-show-structured-output-dialog.ts b/web/src/pages/agent/form/agent-form/use-show-structured-output-dialog.tsindex 3d492f7241..19e38cefef 100644--- a/web/src/pages/agent/form/agent-form/use-show-structured-output-dialog.ts+++ b/web/src/pages/agent/form/agent-form/use-show-structured-output-dialog.ts@@ -1,25 +1,27 @@import { JSONSchema } from '@/components/jsonjoy-builder';-import { AgentStructuredOutputField } from '@/constants/agent';import { useSetModalState } from '@/hooks/common-hooks';import { useCallback } from 'react';-import { UseFormReturn } from 'react-hook-form';+import useGraphStore from '../../store';-export function useShowStructuredOutputDialog(form: UseFormReturn<any>) {+export function useShowStructuredOutputDialog(nodeId?: string) {const {visible: structuredOutputDialogVisible,showModal: showStructuredOutputDialog,hideModal: hideStructuredOutputDialog,} = useSetModalState();+ const { updateNodeForm, getNode } = useGraphStore((state) => state);- const initialStructuredOutput = form.getValues(AgentStructuredOutputField);+ const initialStructuredOutput = getNode(nodeId)?.data.form.outputs.structured;const handleStructuredOutputDialogOk = useCallback((values: JSONSchema) => {// Sync data to canvas- form.setValue(AgentStructuredOutputField, values);+ if (nodeId) {+ updateNodeForm(nodeId, values, ['outputs', 'structured']);+ }hideStructuredOutputDialog();},- [form, hideStructuredOutputDialog],+ [hideStructuredOutputDialog, nodeId, updateNodeForm],);return {diff --git a/web/src/pages/agent/form/agent-form/use-watch-change.ts b/web/src/pages/agent/form/agent-form/use-watch-change.tsindex 08011cc6d1..9cd7932891 100644--- a/web/src/pages/agent/form/agent-form/use-watch-change.ts+++ b/web/src/pages/agent/form/agent-form/use-watch-change.ts@@ -22,7 +22,8 @@ export function useWatchFormChange(id?: string, form?: UseFormReturn<any>) {...nextValues,outputs: {...values.outputs,- [AgentStructuredOutputField]: values[AgentStructuredOutputField],+ [AgentStructuredOutputField]:+ values[AgentStructuredOutputField] ?? {},},};} else {