MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / __init__

Method __init__

plain2code_console.py:22–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 DEBUG_STYLE = Style(color="purple")
21
22 def __init__(self):
23 super().__init__()
24 try:
25 import tiktoken
26
27 self.llm_encoding = tiktoken.get_encoding("cl100k_base")
28 except Exception as e:
29 logger.warning(
30 "Failed to import optional library tiktoken. Using approximate instead of exact token count."
31 )
32 logger.debug(f"Exception: {e}")
33 self.llm_encoding = None
34
35 def info(self, *args, **kwargs):
36 logger.info(" ".join(map(str, args)))

Callers

nothing calls this directly

Calls 2

warningMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected