Class SKAiAgent<T>
public abstract class SKAiAgent<T> : Agent, IHandle where T : class, new()
Type Parameters
T
- Inheritance
-
SKAiAgent<T>
- Implements
- Inherited Members
Constructors
SKAiAgent(IAgentWorker, ISemanticTextMemory, Kernel, EventTypes)
protected SKAiAgent(IAgentWorker worker, ISemanticTextMemory memory, Kernel kernel, EventTypes typeRegistry)
Parameters
worker
IAgentWorkermemory
ISemanticTextMemorykernel
KerneltypeRegistry
EventTypes
Fields
_kernel
protected Kernel _kernel
Field Value
- Kernel
_state
protected AgentState<T> _state
Field Value
- AgentState<T>
Methods
AddKnowledge(string, string, KernelArguments)
Adds knowledge to the
public Task<KernelArguments> AddKnowledge(string instruction, string index, KernelArguments arguments)
Parameters
instruction
stringThe instruction string that uses the value of !index! as a placeholder to inject the data. Example:"Consider the following architectural guidelines: {waf}"
index
stringKnowledge index
arguments
KernelArgumentsThe sk arguments, "input" is the argument
Returns
- Task<KernelArguments>
AddToHistory(string, ChatUserType)
public void AddToHistory(string message, ChatUserType userType)
Parameters
message
stringuserType
ChatUserType
AppendChatHistory(string)
public string AppendChatHistory(string ask)
Parameters
ask
string
Returns
CallFunction(string, KernelArguments, OpenAIPromptExecutionSettings?)
public virtual Task<string> CallFunction(string template, KernelArguments arguments, OpenAIPromptExecutionSettings? settings = null)
Parameters
template
stringarguments
KernelArgumentssettings
OpenAIPromptExecutionSettings