MCPcopy Create free account
hub / github.com/CodeGoat24/UniGenBench / _get_cached_base64

Method _get_cached_base64

eval/src/vllm_request.py:60–70  ·  view source on GitHub ↗
(self, image_path)

Source from the content-addressed store, hash-verified

58 return base64.b64encode(buffered.getvalue()).decode("utf-8")
59
60 def _get_cached_base64(self, image_path):
61 with self._cache_lock:
62 cached = self._encode_cache.get(image_path)
63 if cached is not None:
64 return cached
65 encoded = self._encode_image(image_path)
66 with self._cache_lock:
67 if len(self._encode_cache) >= self.max_cache_items:
68 self._encode_cache.clear()
69 self._encode_cache[image_path] = encoded
70 return encoded
71
72 def build_messages(self, item, image_root=None):
73 content = []

Callers 1

build_messagesMethod · 0.95

Calls 1

_encode_imageMethod · 0.95

Tested by

no test coverage detected