mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Fix greptile review
This commit is contained in:
parent
46ba48e69a
commit
475220ecc6
1 changed files with 6 additions and 0 deletions
|
|
@ -228,6 +228,12 @@ async def _process_binary_request(
|
|||
elif ".pdf" in file_id_lower:
|
||||
content_type = "application/pdf"
|
||||
|
||||
if not isinstance(content, bytes):
|
||||
raise TypeError(
|
||||
"aretrieve_container_file_content expected bytes, got "
|
||||
f"{type(content).__name__}"
|
||||
)
|
||||
|
||||
return Response(
|
||||
content=content,
|
||||
headers=dict(fastapi_response.headers),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue