Class OneShotChainExecutor
Chain executor for a single run
Inheritance
object
OneShotChainExecutor
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotnetPrompt.Chains
Assembly: DotnetPrompt.dll
Syntax
public class OneShotChainExecutor : IChainExecutor
Constructors
| Improve this Doc View SourceOneShotChainExecutor(IChain)
ctor
Declaration
public OneShotChainExecutor(IChain chainToExecute)
Parameters
Type | Name | Description |
---|---|---|
IChain | chainToExecute |
Methods
| Improve this Doc View SourcePromptAsync(IDictionary<string, string>, List<string>?)
Execute chain with default inputs and outputs
Declaration
public Task<IDictionary<string, string>> PromptAsync(IDictionary<string, string> input, List<string>? stops = null)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, string> | input | |
List<string> | stops |
Returns
Type | Description |
---|---|
Task<IDictionary<string, string>> |
PromptAsync(string)
Execute chain with single string input and single string output
Declaration
public Task<string> PromptAsync(string input)
Parameters
Type | Name | Description |
---|---|---|
string | input |
Returns
Type | Description |
---|---|
Task<string> |