zylon-ai/private-gpt · error · ValueError
Only one ingested context is supported.
Error message
Only one ingested context is supported.
What it means
Raised by the TabularDataProcessor when the tabular data analysis tool's context contains more than one IngestedArtifact. The builder accepts a single context_filter, so multiple ingested corpora on one tool are rejected.
Source
Thrown at private_gpt/components/tools/processors/tabular_data_processor.py:51
async def intercept(self, request: ResolvedChatRequest) -> bool:
for tool in request.tool_config.tools:
if not _tool_matches(
tool, TABULAR_DATA_ANALYSIS
) or not _is_unresolved_tool(tool):
continue
tool_context = _get_tool_context(request, tool)
ingested_artifacts = (
[a for a in tool_context if isinstance(a, IngestedArtifact)]
if tool_context
else None
)
if not ingested_artifacts:
raise ValueError(
"Tabular data analysis tool requires an ingested artifact context.",
)
if len(ingested_artifacts) > 1:
raise ValueError("Only one ingested context is supported.")
try:
resolved = await self._builder.build_tool(
model_id=request.system.model,
name=tool.name or TABULAR_DATA_ANALYSIS,
type=tool.type or TABULAR_DATA_ANALYSIS + "_v1",
context_filter=ingested_artifacts[0].context_filter,
validate=request.tool_config.validation_mode,
blob_visibility=request.system.blob_visibility,
)
except ImportError as e:
logger.warning("Tabular tool unavailable: %s", e)
raise RuntimeError(_PANDASAI_NOT_INSTALLED_MSG) from e
return _replace_tool(request, tool, [resolved])
return False
View on GitHub (pinned to 4a030776a3)
Solutions
- Limit the tool context to one IngestedArtifact
- Run one tabular tool per corpus (separate tool entries or requests)
- Ingest the datasets into a single collection and use that one context_filter
Example fix
# before context=[IngestedArtifact(cf_sales), IngestedArtifact(cf_hr)] # after context=[IngestedArtifact(cf_sales)] # second corpus via its own tool entry
Defensive patterns
Strategy: validation
Validate before calling
ingested = [a for a in (tool_context or []) if isinstance(a, IngestedArtifact)] assert len(ingested) <= 1, "tabular tool supports exactly one IngestedArtifact"
Try / catch
try:
resp = await client.chat(request)
except ValueError as e:
if "Only one ingested context" in str(e):
# one tool entry per dataset, then resend
raise Prevention
- Single-select datasets for the tabular tool in UIs
- Dedupe artifacts by context_filter before attaching
- Split multi-dataset analyses into parallel single-dataset requests
When it happens
Trigger: Attaching two or more IngestedArtifact entries to a single TABULAR_DATA_ANALYSIS tool entry.
Common situations: Multi-selecting datasets in a client UI; aggregating several ingested collections into one tool call; retry logic appending a duplicate artifact.
Related errors
- Tabular data analysis tool requires an ingested artifact con
- TOOL_NAME_CONFLICT
- mistral-common only supports function tools.
- Database query tool requires at least one SQL database artif
- Semantic search tool requires an ingested artifact context.
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/269df59b9dc312a7.
Report an issue: GitHub.