Skip to main content

chat_with_context

Method
This is a method of the Agent class in the agent module.
Chat with pre-retrieved context. This method allows AutoRagAgent or manual workflows to inject pre-retrieved context into the agent’s chat, enabling conditional retrieval without duplicating RAG logic.

Signature

Parameters

message
str
required
User message/question
context
ContextPack
required
ContextPack from RAG.retrieve()

Returns

Returns
str
Agent response with optional citations

Usage

Uses

  • chat

Used By

Source

View on GitHub

praisonaiagents/agent/agent.py at line 3167

Context Concept

Context Management

Context Strategies

Chat Feature

Conversation Stores