MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / __init__

Method __init__

test/general/lm_eval/models/textsynth.py:42–55  ·  view source on GitHub ↗

:param engine: str TextSynth API engine (e.g. `gptj_6B`) :param truncate: bool Truncate input if too long (if False and input is too long, throw error)

(self, engine, truncate=False)

Source from the content-addressed store, hash-verified

40
41class TextSynthLM(BaseLM):
42 def __init__(self, engine, truncate=False):
43 """
44 :param engine: str
45 TextSynth API engine (e.g. `gptj_6B`)
46 :param truncate: bool
47 Truncate input if too long (if False and input is too long, throw error)
48 """
49 super().__init__()
50
51 self.engine = engine
52 self.truncate = truncate
53 self.api_url = "https://api.textsynth.com"
54 # Read from environment variable TEXTSYNTH_API_SECRET_KEY
55 self.api_key = os.environ["TEXTSYNTH_API_SECRET_KEY"]
56
57 @property
58 def eot_token_id(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected