HKUDS/DeepTutor · error · ValueError
media_id is required.
Error message
media_id is required.
What it means
Error "media_id is required." thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/capabilities/ima/tools.py:211
"Use it when a retrieved snippet is too short to answer from."
),
parameters=[
ToolParameter(
name="media_id",
type="string",
description="Item id from ima_list or a retrieval result.",
),
_KB_NAME_PARAM,
],
)
async def _run(self, client, binding, kwargs):
from deeptutor.services.rag.pipelines.ima import media as media_ops
from deeptutor.services.rag.pipelines.ima import sources as source_policy
media_id = str(kwargs.get("media_id") or "").strip()
if not media_id:
raise ValueError("media_id is required.")
media = await client.get_media_content(media_id)
text = await media_ops.extract_text(
media,
max_chars=source_policy.MAX_FULLTEXT_CHARS,
)
if not text:
return _err(
"That item has no readable text — it may be an image, an audio file, "
"or a format Tencent IMA does not expose over the API."
)
return _ok(
{
"knowledge_base": binding.name,
"media_id": media_id,
"truncated": len(text) >= source_policy.MAX_FULLTEXT_CHARS,
"content": text,
}
)View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/capabilities/ima/tools.py:211 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/68fcaf05313f05df.
Report an issue: GitHub.