mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-07 10:21:54 +00:00
(fix) proxy: use orjson.loads()
This commit is contained in:
@@ -785,8 +785,8 @@ async def embeddings(request: Request, user_api_key_dict: dict = Depends(user_ap
|
||||
try:
|
||||
|
||||
# Use orjson to parse JSON data, orjson speeds up requests significantly
|
||||
data_bytes = await request.body()
|
||||
data = orjson.loads(data_bytes.decode('utf-8'))
|
||||
body = await request.body()
|
||||
data = orjson.loads(body)
|
||||
|
||||
data["model"] = (
|
||||
general_settings.get("embedding_model", None) # server default
|
||||
|
||||
Reference in New Issue
Block a user