mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(n8n Evaluation Node): Add pre-defined metrics to the "Set Metrics" operation (#17127)
This commit is contained in:
@@ -8,7 +8,6 @@ import type { BaseChatMemory } from 'langchain/memory';
|
||||
import { NodeConnectionTypes, NodeOperationError, jsonStringify } from 'n8n-workflow';
|
||||
import type {
|
||||
AiEvent,
|
||||
INode,
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
ISupplyDataFunctions,
|
||||
@@ -251,14 +250,6 @@ export function unwrapNestedOutput(output: Record<string, unknown>): Record<stri
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a node name to a valid tool name by replacing special characters with underscores
|
||||
* and collapsing consecutive underscores into a single one.
|
||||
*/
|
||||
export function nodeNameToToolName(node: INode): string {
|
||||
return node.name.replace(/[\s.?!=+#@&*()[\]{}:;,<>\/\\'"^%$]/g, '_').replace(/_+/g, '_');
|
||||
}
|
||||
|
||||
/**
|
||||
* Detects if a text contains a character that repeats sequentially for a specified threshold.
|
||||
* This is used to prevent performance issues with tiktoken on highly repetitive content.
|
||||
|
||||
Reference in New Issue
Block a user