The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
parse_jsonl_with_embedded_newlines
Ishaan Jaffer21757af83d92
diff --git a/litellm/router_utils/batch_utils.py b/litellm/router_utils/batch_utils.pyindex 0baad322fa9..aef8f5cc012 100644--- a/litellm/router_utils/batch_utils.py+++ b/litellm/router_utils/batch_utils.py@@ -1,7 +1,7 @@import ioimport jsonfrom os import PathLike-from typing import Optional+from typing import List, Optionalfrom litellm._logging import verbose_loggerfrom litellm.types.llms.openai import FileTypes, OpenAIFilesPurpose@@ -16,7 +16,7 @@ class InMemoryFile(io.BytesIO):self.content_type = content_type-def parse_jsonl_with_embedded_newlines(content: str) -> list[dict]:+def parse_jsonl_with_embedded_newlines(content: str) -> List[dict]:"""Parse JSONL content that may contain JSON objects with embedded newlines in string values.