Skip to main content

ephemeral

Method
This is a method of the Agent class in the agent module.
Context manager for ephemeral conversations. Messages within this block are NOT permanently stored in chat_history. History is restored to pre-block state after exiting.

Signature

def ephemeral() -> Any

Returns

Returns
Any
The result of the operation.

Usage

with agent.ephemeral():
        response = agent.chat("[IMAGE] Analyze this")
        # After block, history is restored - image NOT persisted