forked from phoenix/litellm-mirror
fix for GET /v1/batches{batch_id:path}
This commit is contained in:
parent
12729ceece
commit
f627fa9b40
1 changed files with 2 additions and 24 deletions
|
@ -4891,12 +4891,12 @@ async def create_batch(
|
|||
|
||||
|
||||
@router.get(
|
||||
"/v1/batches{batch_id}",
|
||||
"/v1/batches{batch_id:path}",
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
tags=["batch"],
|
||||
)
|
||||
@router.get(
|
||||
"/batches{batch_id}",
|
||||
"/batches{batch_id:path}",
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
tags=["batch"],
|
||||
)
|
||||
|
@ -4923,29 +4923,7 @@ async def retrieve_batch(
|
|||
"""
|
||||
global proxy_logging_obj
|
||||
data: Dict = {}
|
||||
data = {}
|
||||
try:
|
||||
body = await request.body()
|
||||
body_str = body.decode()
|
||||
try:
|
||||
data = ast.literal_eval(body_str)
|
||||
except:
|
||||
data = json.loads(body_str)
|
||||
|
||||
verbose_proxy_logger.debug(
|
||||
"Request received by LiteLLM:\n{}".format(json.dumps(data, indent=4)),
|
||||
)
|
||||
|
||||
# Include original request and headers in the data
|
||||
data = await add_litellm_data_to_request(
|
||||
data=data,
|
||||
request=request,
|
||||
general_settings=general_settings,
|
||||
user_api_key_dict=user_api_key_dict,
|
||||
version=version,
|
||||
proxy_config=proxy_config,
|
||||
)
|
||||
|
||||
_retrieve_batch_request = RetrieveBatchRequest(
|
||||
batch_id=batch_id,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue