Get Context • AI Agent SDK
get_context: Build context from session memory and knowledge.
get_context
Method
</div>
This is a method of the Session class in the session module.
Build context from session memory and knowledge.
Signature
def get_context(query: str, max_items: int) -> strParameters
ParamField
strQuery to build context for
ParamField
intMaximum items per section
Returns
ResponseField
strFormatted context string
Uses
build_context_for_task
Used By
Source
View on GitHubpraisonaiagents/session.py at line 441