mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-08 08:08:37 +00:00
Response transformation crashed with TypeError when counting tokens for multimodal (dict-shaped) embedding inputs, since encoding.encode() was called directly on the dict instead of its text parts. Also removed a dead, equally-buggy duplicate of the same loop in _transform_response. Separately, the embeddings guardrail handler silently skipped multimodal dict inputs instead of scanning them, letting prohibited text/image content bypass the configured guardrail. It now extracts and scans the text parts while leaving image parts untouched.
16 lines
468 B
Bash
Executable file
16 lines
468 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
VENV_PYTHON="$REPO_ROOT/.venv/bin/python"
|
|
MIGRATION_SCRIPT="$REPO_ROOT/litellm/proxy/prisma_migration.py"
|
|
|
|
if [ -x "$VENV_PYTHON" ]; then
|
|
"$VENV_PYTHON" "$MIGRATION_SCRIPT"
|
|
elif command -v uv >/dev/null 2>&1; then
|
|
(cd "$REPO_ROOT" && uv run --no-sync python "$MIGRATION_SCRIPT")
|
|
else
|
|
python3 "$MIGRATION_SCRIPT"
|
|
fi
|
|
|
|
echo "Migration script ran successfully!"
|