You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
out of range eror when calling intrinsics on empty contexts #937
importmelleafrommellea.stdlib.components.intrinsic.ragimportcheck_answerabilitym=mellea.start_session(backend_name="hf", model_id="ibm-granite/granite-4.0-micro")
check_answerability(
question="Does our firm have any current investments in the foo industry?",
documents=["The user works for blah capital", "blah capital leads investment round in acme corp", "acme corp is disrupting the foo industry"],
context=m.ctx,
backend=m.backend
)
Expected: answerability intrinsic provides a result.
Actual: out of index error when running isinstance(conversation[0], (list, tuple)) or hasattr(conversation[0], "messages") in transformers.tokenization_utils_base
The context argument of check_answerability method is expecting ChatContext instead of SimpleContext
mypy result:
Argument "context" to "check_answerability" has incompatible type "Context"; expected "ChatContext" [arg-type]
Argument "backend" to "check_answerability" has incompatible type "Backend"; expected "AdapterMixin" [arg-type]
Found 2 errors in 1 file (checked 1 source file)
Adding 'context_type="chat"' in the start_session method argument seems fixing this issue.
Activity
akihikokuroda commentedon May 4, 2026
The context argument of check_answerability method is expecting ChatContext instead of SimpleContext
mypy result:
Adding 'context_type="chat"' in the start_session method argument seems fixing this issue.