mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix: convert datetime to ISO string format for PostgreSQL timestamp compatibility
Fixes timestamp type mismatch error in tool_registry_writer.py when inserting into LiteLLM_ToolTable. PostgreSQL expects timestamp format not timezone-aware datetime objects. Closes #23585
This commit is contained in:
parent
56557bfae1
commit
cac533c2a8
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ async def batch_upsert_tools(
|
|||
data = [item for item in items if item.get("tool_name")]
|
||||
if not data:
|
||||
return
|
||||
now = datetime.now(timezone.utc)
|
||||
now = datetime.now(timezone.utc).isoformat()
|
||||
table = prisma_client.db.litellm_tooltable
|
||||
for item in data:
|
||||
tool_name = item.get("tool_name", "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue