Files
siemens_ragas/apps/sample_python/adapter.py
2026-06-12 14:02:15 +08:00

15 lines
419 B
Python

from __future__ import annotations
def run(question: str, **kwargs) -> dict:
answer = f"Sample adapter answer for: {question}"
contexts = [
"This is a local Python adapter example.",
"Replace this with your real retrieval and generation logic.",
]
return {
"answer": answer,
"contexts": contexts,
"raw_response": {"question": question, "kwargs": kwargs},
}