framework.data_management.DataSourceContext#
- class framework.data_management.DataSourceContext(source_name, context_type, data, metadata=<factory>, provider=None)[source]#
Bases:
object
Container for data source retrieval results.
This standardized format allows different data sources to return results in a consistent way while preserving source-specific metadata.
- source_name: str#
- context_type: str#
- data: Any#
- metadata: Dict[str, Any]#
- provider: DataSourceProvider | None = None#
- format_for_prompt()[source]#
Format this context for inclusion in LLM prompts.
Delegates to the provider’s format_for_prompt method if available, otherwise falls back to default formatting.
- Return type:
str
- get_summary()[source]#
Get a summary of this data source context for logging/debugging.
- Return type:
Dict[str, Any]
- __init__(source_name, context_type, data, metadata=<factory>, provider=None)#