Class MapReduceChain
Inheritance
object
MapReduceChain
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotnetPrompt.Chains.Specialized
Assembly: DotnetPrompt.dll
Syntax
public class MapReduceChain : IChain, IChain<ChainMessage, ChainMessage>
Constructors
| Improve this Doc View SourceMapReduceChain(IChain, IChain, Func<string, IEnumerable<string>>?, Func<IEnumerable<string>, string>?, Func<IEnumerable<string>, IEnumerable<string>>?, Func<string, bool>?)
Declaration
public MapReduceChain(IChain mapChain, IChain reduceChain, Func<string, IEnumerable<string>>? chunkFunc = null, Func<IEnumerable<string>, string>? mergeFunc = null, Func<IEnumerable<string>, IEnumerable<string>>? sortFunc = null, Func<string, bool>? fitReduceChain = null)
Parameters
Type | Name | Description |
---|---|---|
IChain | mapChain | |
IChain | reduceChain | |
Func<string, IEnumerable<string>> | chunkFunc | |
Func<IEnumerable<string>, string> | mergeFunc | |
Func<IEnumerable<string>, IEnumerable<string>> | sortFunc | |
Func<string, bool> | fitReduceChain |
Properties
| Improve this Doc View SourceDefaultOutputKey
Output chain produces
Declaration
public string DefaultOutputKey { get; set; }
Property Value
Type | Description |
---|---|
string |
InputBlock
Declaration
public ITargetBlock<ChainMessage> InputBlock { get; }
Property Value
Type | Description |
---|---|
ITargetBlock<ChainMessage> |
InputVariables
List of inputs chain require to run
Declaration
public IList<string> InputVariables { get; }
Property Value
Type | Description |
---|---|
IList<string> |
MaxTokens
Declaration
public int MaxTokens { get; set; }
Property Value
Type | Description |
---|---|
int |
OutputBlock
Declaration
public ISourceBlock<ChainMessage> OutputBlock { get; }
Property Value
Type | Description |
---|---|
ISourceBlock<ChainMessage> |
Methods
| Improve this Doc View SourceCancel()
Cancel Chain execution
Declaration
public void Cancel()