MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / FakeTokenizer

Class FakeTokenizer

tests/test_llm_parser.py:665–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663 return self.values[item]
664
665 class FakeTokenizer:
666 pad_token_id = 0
667 eos_token_id = 1
668
669 def apply_chat_template(self, messages, tokenize=False, add_generation_prompt=True):
670 return "prompt"
671
672 def __call__(self, prompt_text, return_tensors="pt"):
673 return {"input_ids": FakeTensor([1, 2, 3])}
674
675 def decode(self, generated_ids, skip_special_tokens=True):
676 return '{"action":"adjust_interest","direction":"decrease","topics":["GUI Agent"],"confidence":0.9}'
677
678 class FakeOutputs:
679 def __getitem__(self, index):

Calls

no outgoing calls