MCPcopy
hub / github.com/PDFMathTranslate/PDFMathTranslate / __init__

Method __init__

pdf2zh/translator.py:46–61  ·  view source on GitHub ↗
(self, lang_in: str, lang_out: str, model: str, ignore_cache: bool)

Source from the content-addressed store, hash-verified

44 CustomPrompt = False
45
46 def __init__(self, lang_in: str, lang_out: str, model: str, ignore_cache: bool):
47 lang_in = self.lang_map.get(lang_in.lower(), lang_in)
48 lang_out = self.lang_map.get(lang_out.lower(), lang_out)
49 self.lang_in = lang_in
50 self.lang_out = lang_out
51 self.model = model
52 self.ignore_cache = ignore_cache
53
54 self.cache = TranslationCache(
55 self.name,
56 {
57 "lang_in": lang_in,
58 "lang_out": lang_out,
59 "model": model,
60 },
61 )
62
63 def set_envs(self, envs):
64 # Detach from self.__class__.envs

Callers 15

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

TranslationCacheClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected