MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / hashNode

Function hashNode

app/src/server/utils/nodes/hashNode.ts:11–26  ·  view source on GitHub ↗
(node: {
  id: string;
  projectId: string;
  type: T;
  config: InferNodeConfig<T>;
})

Source from the content-addressed store, hash-verified

9import type { ChatCompletionCreateParams, ChatCompletionMessage } from "openai/resources";
10
11export const hashNode = <T extends NodeType>(node: {
12 id: string;
13 projectId: string;
14 type: T;
15 config: InferNodeConfig<T>;
16}) => {
17 let hashableFields = {};
18
19 const nodeProperties = nodePropertiesByType[node.type] as NodeProperties<T>;
20
21 if (nodeProperties.hashableFields) {
22 hashableFields = nodeProperties.hashableFields(node);
23 }
24
25 return hashObject({ projectId: node.projectId, type: node.type, hashableFields });
26};
27
28export const hashDatasetEntryInput = ({
29 projectId,

Callers 2

checkNodeInputFunction · 0.90
monitors.router.tsFile · 0.90

Calls 1

hashObjectFunction · 0.85

Tested by

no test coverage detected