Overview / AgentManager
AgentManager
Manager of Langchain Agent. This class manages the Agent that uses the LLM. It takes care of formatting the prompt and filtering the tools before feeding them to the Agent. It also instantiates the Langchain Agent.
Constructors
new AgentManager()
new AgentManager():
AgentManager
Returns
Methods
executeAgent()
executeAgent(
stray):Promise<AgentFastReply>
Parameters
| Parameter | Type |
|---|---|
stray | StrayCat |
Returns
Promise<AgentFastReply>
executeFormAgent()
executeFormAgent(
stray):Promise<undefined|AgentFastReply>
Parameters
| Parameter | Type |
|---|---|
stray | StrayCat |
Returns
Promise<undefined | AgentFastReply>
executeMemoryChain()
executeMemoryChain(
input,stray):Promise<string>
Parameters
| Parameter | Type |
|---|---|
input | ContextInput |
stray | StrayCat |
Returns
Promise<string>
executeProceduresChain()
executeProceduresChain(
agentInput,chatHistory,stray):Promise<AgentFastReply>
Parameters
| Parameter | Type |
|---|---|
agentInput | ContextInput |
chatHistory | string |
stray | StrayCat |
Returns
Promise<AgentFastReply>
executeTool()
executeTool(
input,stray):Promise<undefined|AgentFastReply>
Parameters
| Parameter | Type |
|---|---|
input | ContextInput |
stray | StrayCat |
Returns
Promise<undefined | AgentFastReply>
getDeclarativeMemoriesPrompt()
getDeclarativeMemoriesPrompt(
docs):string
Parameters
| Parameter | Type |
|---|---|
docs | MemoryDocument[] |
Returns
string
getEpisodicMemoriesPrompt()
getEpisodicMemoriesPrompt(
docs):string
Parameters
| Parameter | Type |
|---|---|
docs | MemoryDocument[] |
Returns
string
getLangchainChatHistory()
getLangchainChatHistory(
history):Promise<BaseMessage[]>
Parameters
| Parameter | Type |
|---|---|
history | MemoryMessage[] |
Returns
Promise<BaseMessage[]>
stringifyChatHistory()
stringifyChatHistory(
history):string
Parameters
| Parameter | Type |
|---|---|
history | MemoryMessage[] |
Returns
string