Skip to main content

agentchat.contrib.text_analyzer_agent

TextAnalyzerAgent

class TextAnalyzerAgent(ConversableAgent)

(Experimental) Text Analysis agent, a subclass of ConversableAgent designed to analyze text as instructed.

__init__

def __init__(name="analyzer",
system_message: Optional[str] = system_message,
human_input_mode: Optional[str] = "NEVER",
llm_config: Optional[Union[Dict, bool]] = None,
**kwargs)

Arguments:

  • name str - name of the agent.
  • system_message str - system message for the ChatCompletion inference.
  • human_input_mode str - This agent should NEVER prompt the human for input.
  • llm_config dict or False - llm inference configuration. Please refer to OpenAIWrapper.create for available options. To disable llm-based auto reply, set to False.
  • **kwargs dict - other kwargs in ConversableAgent.

analyze_text

def analyze_text(text_to_analyze, analysis_instructions)

Analyzes the given text as instructed, and returns the analysis.