MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / _load_gcf

Function _load_gcf

src/codegraphcontext/utils/gcf_encoder.py:25–36  ·  view source on GitHub ↗

Lazily load GCF encoder. Check once, cache the result.

()

Source from the content-addressed store, hash-verified

23
24
25def _load_gcf():
26 """Lazily load GCF encoder. Check once, cache the result."""
27 global _gcf_encode, _gcf_checked
28 if _gcf_checked:
29 return _gcf_encode
30 _gcf_checked = True
31 try:
32 from gcf import encode_generic
33 _gcf_encode = encode_generic
34 except ImportError:
35 _gcf_encode = None
36 return _gcf_encode
37
38
39def is_gcf_enabled() -> bool:

Callers 3

encode_responseFunction · 0.85

Calls

no outgoing calls