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
fix literal ai typing errors
Ishaan Jaffa0bebc34137b
diff --git a/litellm/integrations/literal_ai.py b/litellm/integrations/literal_ai.pyindex f83b714e5d5..5bf9afd7eb4 100644--- a/litellm/integrations/literal_ai.py+++ b/litellm/integrations/literal_ai.py@@ -3,7 +3,7 @@import asyncioimport osimport uuid-from typing import Optional+from typing import List, Optionalimport httpx@@ -192,9 +192,11 @@ class LiteralAILogger(CustomBatchLogger):metadata = kwargs.get("litellm_params", {}).get("metadata", {})settings = logging_payload["model_parameters"]-messages = logging_payload["messages"]- choices = logging_payload.get("response", {}).get("choices", [])+ response = logging_payload["response"]+ choices: List = []+ if isinstance(response, dict) and "choices" in response:+ choices = response["choices"]message_completion = choices[0]["message"] if choices else Noneprompt_id = Nonevariables = None