Skip to content

Commit

Permalink
fix(GraphRunner): replace path param with config in fromWorkflow method
Browse files Browse the repository at this point in the history
A change has been made to the fromWorkflow method in the GraphRunner component. The path parameter has been deprecated in favor of using a 'config' parameter which is the yaml configuration of the workflow. This makes the process of configuring a workflow more streamlined.
  • Loading branch information
nyvyn committed Apr 18, 2024
1 parent ff667ca commit 981fcda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/agents/GraphRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ export class GraphRunner extends Runnable<GraphRunnerInput, GraphRunnerOutput> {
*
* @param {Object} params - The parameters object.
* @param {BaseCheckpointSaver} params.checkpoint - Optional checkpoint saver for the graph.
* @param {string} params.config - The yaml configuration of the workflow.
* @param {BaseLanguageModel} params.model - The base language model.
* @param {string} params.path - The path to the workflow.
* @param {StructuredTool[]} params.tools - An array of tools required by the workflow.
*
* @return {Promise<GraphRunner>} - A promise that resolves with a GraphRunner instance.
*/
public static async fromWorkflow({checkpoint, model, path, tools}: Readonly<{
public static async fromWorkflow({checkpoint, config, model, tools}: Readonly<{
checkpoint?: BaseCheckpointSaver,
config: string,
model: BaseLanguageModel,
path: string,
tools?: StructuredTool[],
}>): Promise<GraphRunner> {
const nodes = parseWorkflow(path, tools);
const nodes = parseWorkflow(config, tools);
return GraphRunner.make({
model,
nodes,
Expand Down

0 comments on commit 981fcda

Please sign in to comment.