MCPcopy
hub / github.com/LAION-AI/Open-Assistant / put

Method put

inference/worker/hf_streamer.py:26–33  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

24 self.printer = printer
25
26 def put(self, value):
27 for token_id in _unpack(value):
28 if self.input_ids:
29 input_id = self.input_ids.pop()
30 if input_id != token_id:
31 logger.warning(f"Input id {input_id} does not match output id {token_id}")
32 else:
33 self.printer(token_id)
34
35 def end(self):
36 pass

Callers 1

commandHandlerFunction · 0.45

Calls 1

_unpackFunction · 0.85

Tested by

no test coverage detected