Initialization

Parameters

The TextPromptAgent is initialized with two arguments:

TextPromptAgent(query, model(Optional))
query
String
required

A string that represents the prompt used to guide the model’s analysis of the text.

model
Optional[LLM]

The selected model. All supported LLM models can be found below:

Example

This simple example demonstrates how the TextPromptAgent can be used in customer support to enhance interactions by prompting for additional information.

example.py
TextPromptAgent(query="Make the description more concise.", model=GPT())