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

Function _load_gcf

src/codegraphcontext/utils/gcf_encoder.py:28–39  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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

Callers 3

encode_responseFunction · 0.85

Calls

no outgoing calls