Deterministic LLM that returns a canned response — no network calls.
| 6 | |
| 7 | |
| 8 | class MockLLM(LLMBackend): |
| 9 | """Deterministic LLM that returns a canned response — no network calls.""" |
| 10 | |
| 11 | def __init__(self, response: str = "") -> None: |
| 12 | self._response = response |
| 13 | |
| 14 | def generate(self, prompt: str, temperature: float = 0.0) -> str: |
| 15 | return self._response |
| 16 | |
| 17 | |
| 18 | class SequentialMockLLM(LLMBackend): |