Skip to content

Commit

Permalink
ups
Browse files Browse the repository at this point in the history
  • Loading branch information
TesAnti committed Jan 16, 2024
1 parent 6918268 commit c6fa507
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The input to this tool should be a pipe (|) separated text of length
For example, `coworker|question|context`.";
}

public override string ToolAction(string input)
public override Task<string> ToolTask(string input)
{
var split = input.Split('|');
var agent = split[0];
Expand All @@ -29,7 +29,7 @@ public override string ToolAction(string input)
| coworker;
var res = chain.Run("result").Result;

return res;
return Task.FromResult(res);

Check warning on line 32 in src/libs/LangChain.Core/Chains/StackableChains/Agents/Crew/Tools/AskQuestionTool.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

Nullability of reference types in value of type 'Task<string?>' doesn't match target type 'Task<string>'.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public CrewAgentToolLambda(string name, string description, Func<string, string>
_func = func;
}

public override string ToolAction(string input)
public override Task<string> ToolTask(string input)
{
return _func(input);
return Task.FromResult(_func(input));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The input to this tool should be a pipe (|) separated text of length
For example, `coworker|task|context`";
}

public override string ToolAction(string input)
public override Task<string> ToolTask(string input)
{
var split = input.Split('|');
var agent = split[0];
Expand All @@ -29,6 +29,6 @@ public override string ToolAction(string input)
| coworker;
var res = chain.Run("result").Result;

return res;
return Task.FromResult(res);

Check warning on line 32 in src/libs/LangChain.Core/Chains/StackableChains/Agents/Crew/Tools/DelegateWorkTool.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

Nullability of reference types in value of type 'Task<string?>' doesn't match target type 'Task<string>'.
}
}

0 comments on commit c6fa507

Please sign in to comment.