MCPcopy Create free account
hub / github.com/FreedomIntelligence/GrammarGPT / __init__

Method __init__

utils/callbacks.py:16–17  ·  view source on GitHub ↗
(self, callback_func=None)

Source from the content-addressed store, hash-verified

14
15class Stream(transformers.StoppingCriteria):
16 def __init__(self, callback_func=None):
17 self.callback_func = callback_func
18
19 def __call__(self, input_ids, scores) -> bool:
20 if self.callback_func is not None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected