Connection
Base URL, credentials and a reachable server.
Preserve empty fields and reject unknown escapes or a trailing backslash before returning any result.
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 split_fields(text):
fields, escaped = [""], False
for char in text:
if escaped:
if char not in "|\\": raise ValueError("unknown escape")
fields[-1] += char
escaped = False
elif char == "\\": escaped = True
elif char == "|": fields.append("")
else: fields[-1] += char
if escaped: raise ValueError("trailing escape")
return fields