agent-prompts
Documentation / agents/agent-prompts
Generate​
getAgentPrompts()​
function getAgentPrompts(agentName: any, options?: any):
| {
name: string;
prompt: string;
tools: any[];
}
| {
error: string;
};
Defined in: agents/agent-prompts.ts:40
Agent Prompts​
- summarize-bullets:
- article
- summarize:
- article
- suggest-followups:
- chat_history
- article
- answer:
- chat_history
- query
- query-resolution:
- chat_history
- query
- knowledge-graph-nodes:
- query
- article
- summary-longtext:
- article
- sections
Returns an object with agent prompts based on the provided agent name and options Uses regex to detect any variables in %7Bbrackets%7D in the prompts and replace them with values from the options object Values inside brackets must be the matching variable name
Parameters​
Parameter | Type | Description |
---|---|---|
|
| The name of the agent to generate prompts for. |
|
| An options object that can contain the following properties:
|
Returns​
| {
name
: string
;
prompt
: string
;
tools
: any
[];
}
| {
error
: string
;
}
An object with agent prompts.
Author​
Example​
var prompt = getAgentPrompts("summarize-bullets", {article})