ProgrammableAgentRequirement
- LAST_MESSAGE_NOT_USER (str): Requires that the last message in the conversation was not from the user.
ProgrammedAgentInstructionResult
- user_message (BaseMessage): The message sent by the user.
- agent_message (BaseMessage): The message sent by the agent.
- value (T): The computed result value of type T.
AbstractProgrammableAgent
run_atomic
- callback (Callable[[], ProgrammedAgentInstructionResult[T]]): The operation to execute atomically.
repair_state
- requirement (ProgrammableAgentRequirement): The requirement to repair the state for.
programmable_capability
- func (Callable[…, ProgrammedAgentInstructionResult[T]]): The method to decorate.
ProgrammableChatAgent
- _operation_lock (threading.Lock): Lock for ensuring atomic operations.
- _last_message_role (Optional[str]): Role of the last message in the conversation.
init
run_atomic
- callback (Callable[[], ProgrammedAgentInstructionResult[T]]): The operation to execute atomically.
repair_state
- requirement (ProgrammableAgentRequirement): The requirement to repair the state for.