PromptBuilder
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PromptBuilder(config?): PromptBuilder;Accepts either:
- PromptBuilderConfig (new fluent API)
- PromptTemplate (backward compatible - treated as user template sections)
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
| |
Returns
Section titled “Returns”PromptBuilder
Methods
Section titled “Methods”addPersona()
Section titled “addPersona()”addPersona(persona): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”this
build()
Section titled “build()”build(): string;Returns
Section titled “Returns”string
withAgentDefinition()
Section titled “withAgentDefinition()”withAgentDefinition(definition): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”this
withBrandVoice()
Section titled “withBrandVoice()”withBrandVoice(brandVoice): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”this
withKnowledgeContext()
Section titled “withKnowledgeContext()”withKnowledgeContext(context): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”this
withPersona()
Section titled “withPersona()”withPersona(persona): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”this
withPolicyProfile()
Section titled “withPolicyProfile()”withPolicyProfile(profile): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”this
withSessionMemory()
Section titled “withSessionMemory()”withSessionMemory(memory): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”this
withTemplate()
Section titled “withTemplate()”withTemplate(template): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”this
withTools()
Section titled “withTools()”withTools(tools): this;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”this