MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / _max_bytes_for_media

Method _max_bytes_for_media

examples/server/server.py:10627–10632  ·  view source on GitHub ↗
(self, kind: Literal["image", "audio", "video"])

Source from the content-addressed store, hash-verified

10625 self.ctx = None
10626
10627 def _max_bytes_for_media(self, kind: Literal["image", "audio", "video"]) -> int:
10628 if kind == "image":
10629 return self.image_max_bytes
10630 if kind == "audio":
10631 return self.audio_max_bytes
10632 return self.video_max_bytes
10633
10634 def _load_media_file(self, kind: Literal["image", "audio", "video"], media_url: str) -> bytes:
10635 if self.allowed_local_media_path is None:

Callers 3

_load_media_fileMethod · 0.95
_load_media_urlMethod · 0.95
load_mediaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected