MCPcopy Create free account
hub / github.com/Louisym/MiniCC / MockApi

Class MockApi

tutorials/18_design_patterns_for_agents.py:300–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298 # ---- 演示: 同一个 Runtime, 不同的 "插头" ----
299
300 class MockApi(ApiClient):
301 def __init__(self, responses):
302 self.responses = iter(responses)
303 def stream(self, messages):
304 return next(self.responses)
305
306 class PrintToolExecutor(ToolExecutor):
307 def execute(self, name, inp):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected