Search Results for

    Show / Hide Table of Contents

    Class MapReduceChain

    Inheritance
    object
    MapReduceChain
    Implements
    IChain
    IChain<ChainMessage, ChainMessage>
    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 Source

    MapReduceChain(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 Source

    DefaultOutputKey

    Output chain produces

    Declaration
    public string DefaultOutputKey { get; set; }
    Property Value
    Type Description
    string
    | Improve this Doc View Source

    InputBlock

    Declaration
    public ITargetBlock<ChainMessage> InputBlock { get; }
    Property Value
    Type Description
    ITargetBlock<ChainMessage>
    | Improve this Doc View Source

    InputVariables

    List of inputs chain require to run

    Declaration
    public IList<string> InputVariables { get; }
    Property Value
    Type Description
    IList<string>
    | Improve this Doc View Source

    MaxTokens

    Declaration
    public int MaxTokens { get; set; }
    Property Value
    Type Description
    int
    | Improve this Doc View Source

    OutputBlock

    Declaration
    public ISourceBlock<ChainMessage> OutputBlock { get; }
    Property Value
    Type Description
    ISourceBlock<ChainMessage>

    Methods

    | Improve this Doc View Source

    Cancel()

    Cancel Chain execution

    Declaration
    public void Cancel()

    Implements

    IChain
    IChain<TInput, TOutput>

    Extension Methods

    ChainExecutorExtensions.GetExecutor(IChain, bool)
    ChainExtensions.LinkTo(IChain, IChain)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright 2023 © Pavel «xakpc» Osadchuk for DotnetPrompt