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

Method find_first

llama_cpp/llama_chat_format.py:3162–3167  ·  view source on GitHub ↗
(s: str, substrs: List[str])

Source from the content-addressed store, hash-verified

3160 """This method is no longer used in the new implementation."""
3161
3162 def find_first(s: str, substrs: List[str]):
3163 for i, substr in enumerate(substrs):
3164 pos = s.find(substr)
3165 if pos != -1:
3166 return pos, i
3167 return None, None
3168
3169 split_text: List[Tuple[Literal["text", "image_url"], str]] = []
3170 remaining = text

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected