MCPcopy Create free account
hub / github.com/IBM/AssetOpsBench / MockLLM

Class MockLLM

src/agent/tests/conftest.py:8–15  ·  view source on GitHub ↗

Deterministic LLM that returns a canned response — no network calls.

Source from the content-addressed store, hash-verified

6
7
8class 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
18class SequentialMockLLM(LLMBackend):

Callers 1

_factoryFunction · 0.85

Calls

no outgoing calls

Tested by 1

_factoryFunction · 0.68