agentlab.agents.generic_agent.generic_agent_prompt
Prompt builder for GenericAgent
It is based on the dynamic_prompting module from the agentlab package.
Classes
|
|
|
A class to represent various flags used to control features in an application. |
|
|
|
|
|
- class agentlab.agents.generic_agent.generic_agent_prompt.Criticise(visible: bool = True)
Bases:
PromptElement
- class agentlab.agents.generic_agent.generic_agent_prompt.GenericPromptFlags(obs: ObsFlags, action: ActionFlags, use_plan: bool = False, use_criticise: bool = False, use_thinking: bool = False, use_memory: bool = False, use_concrete_example: bool = True, use_abstract_example: bool = False, use_hints: bool = False, enable_chat: bool = False, max_prompt_tokens: int = None, be_cautious: bool = True, extra_instructions: str | None = None, add_missparsed_messages: bool = True, max_trunc_itr: int = 20, flag_group: str = None)
Bases:
FlagsA class to represent various flags used to control features in an application.
- use_concrete_example
Use a concrete example of the answer in the prompt for a generic task.
- Type:
- action: ActionFlags
- class agentlab.agents.generic_agent.generic_agent_prompt.MainPrompt(action_set: AbstractActionSet, obs_history: list[dict], actions: list[str], memories: list[str], thoughts: list[str], previous_plan: str, step: int, flags: GenericPromptFlags)
Bases:
Shrinkable- shrink()
Implement shrinking of this prompt element.
You need to recursively call all shrinkable elements that are part of this prompt. You can also implement a shriking startegy for this prompt. Shrinking is can be called multiple times to progressively shrink the prompt until it fits max_tokens. Default max shrink iterations is 20.
- class agentlab.agents.generic_agent.generic_agent_prompt.Memory(visible: bool = True)
Bases:
PromptElement
- class agentlab.agents.generic_agent.generic_agent_prompt.Plan(previous_plan, plan_step, visible: bool = True)
Bases:
PromptElement