Connection
Base URL, credentials and a reachable server.
Count CRLF, lone LF and lone CR endings in a text buffer without modifying it.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
def newline_counts(text):
if not isinstance(text, str):
raise ValueError("text.required")
pairs = text.count("\r\n")
remaining = text.replace("\r\n", "")
return {"crlf": pairs, "lf": remaining.count("\n"),
"cr": remaining.count("\r")}