Skip to content

Commit

Permalink
Separate namespace of config for each agent
Browse files Browse the repository at this point in the history
  • Loading branch information
isamu committed Dec 29, 2024
1 parent 86951e6 commit 4702dc6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/graphai/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class ComputedNode extends Node {
public readonly params: NodeDataParams; // Agent-specific parameters
private readonly filterParams: AgentFilterParams;
public readonly nestedGraph?: GraphData | DataSource;
private readonly config?: any;
public readonly retryLimit: number;
public retryCount: number = 0;
private readonly agentId?: string;
Expand Down Expand Up @@ -120,6 +121,7 @@ export class ComputedNode extends Node {
const agent = data.agent;
this.agentFunction = async ({ namedInputs, params }) => agent(namedInputs, params);
}
this.config = this.agentId ? (this.graph.config ?? {})[this.agentId] ?? {} : {},

this.anyInput = data.anyInput ?? false;
this.inputs = data.inputs;
Expand Down

0 comments on commit 4702dc6

Please sign in to comment.