Spaces:
Build error
Build error
File size: 593 Bytes
d9494a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import { EXCLUDED_FIELD_NAMES_FROM_AGENT_TOOL_SCHEMA } from '@/constants';
export const shouldExcludeFieldFromAgentToolSchema = ({
fieldName,
isSystem,
excludeId = true,
additionalExcludedFieldNames = [],
}: {
fieldName: string;
isSystem: boolean;
excludeId?: boolean;
additionalExcludedFieldNames?: string[];
}): boolean => {
const excludedFieldNames = [
...EXCLUDED_FIELD_NAMES_FROM_AGENT_TOOL_SCHEMA,
...additionalExcludedFieldNames,
];
if (excludeId) {
excludedFieldNames.push('id');
}
return excludedFieldNames.includes(fieldName) || isSystem;
};
|