mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-03 00:55:10 +08:00
### What problem does this PR solve? Feat: Add a switch to control the display of structured output to the agent form. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { getStructuredDatatype } from '@/utils/canvas-util';
|
||||
import { get, isPlainObject } from 'lodash';
|
||||
import { ReactNode, useCallback } from 'react';
|
||||
import {
|
||||
@ -106,10 +107,10 @@ export function useFindAgentStructuredOutputTypeByValue() {
|
||||
if (isPlainObject(values) && properties) {
|
||||
for (const [key, value] of Object.entries(properties)) {
|
||||
const nextPath = path ? `${path}.${key}` : key;
|
||||
const dataType = get(value, 'type');
|
||||
const { dataType, compositeDataType } = getStructuredDatatype(value);
|
||||
|
||||
if (nextPath === target) {
|
||||
return dataType;
|
||||
return compositeDataType;
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user