llm_condition
autogen.agentchat.group.llm_condition.ContextStrLLMCondition
ContextStrLLMCondition
Context variable-based LLM condition.
This condition uses a ContextStr object with context variable placeholders that
will be substituted before being evaluated by an LLM.
Initialize with a context string as a positional parameter.
Name | Description |
---|---|
context_str | Type: ContextStr |
**data | Type: Any |
Class Attributes
context_str
model_config
Instance Methods
get_prompt
Return the prompt with context variables substituted.
Name | Description |
---|---|
agent | The agent evaluating the condition (provides context variables) Type: ConversableAgent |
messages | The conversation history (not used) Type: list[dict[str, typing.Any]] |
Type | Description |
---|---|
str | The prompt with context variables substituted |