MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS / postprocess_remove_prefix

Method postprocess_remove_prefix

moss_inference.py:181–191  ·  view source on GitHub ↗

Removes the prefix from the generated text. Args: preds_i (str): The generated text containing the prefix. Returns: str: The generated text without the prefix.

(self, preds_i: str)

Source from the content-addressed store, hash-verified

179 return res
180
181 def postprocess_remove_prefix(self, preds_i: str) -> str:
182 """
183 Removes the prefix from the generated text.
184
185 Args:
186 preds_i (str): The generated text containing the prefix.
187
188 Returns:
189 str: The generated text without the prefix.
190 """
191 return preds_i[len(self.prefix):]
192
193 def streaming_topk_search(
194 self,

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected