fix: minor bug fixes

This commit is contained in:
Krrish Dholakia 2023-12-09 21:24:52 -08:00
parent 8ad84517d0
commit 01394a7bbd
3 changed files with 4 additions and 4 deletions

View file

@ -89,7 +89,7 @@ class GenerateKeyRequest(BaseModel):
return self.model_dump() # noqa
except:
# if using pydantic v1
return json.dumps(self.dict(), **kwargs)
return self.dict()
class GenerateKeyResponse(BaseModel):
key: str

View file

@ -293,7 +293,7 @@ async def user_api_key_auth(request: Request, api_key: str = fastapi.Security(ap
raise Exception(f"Token not allowed to access model")
api_key = valid_token.token
valid_token_dict = _get_pydantic_json_dict(valid_token)
valid_token.pop("token", None)
valid_token_dict.pop("token", None)
return UserAPIKeyAuth(api_key=api_key, **valid_token)
else:
raise Exception(f"Invalid token")

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "litellm"
version = "1.12.1"
version = "1.12.2"
description = "Library to easily interface with LLM API providers"
authors = ["BerriAI"]
license = "MIT License"
@ -55,7 +55,7 @@ requires = ["poetry-core", "wheel"]
build-backend = "poetry.core.masonry.api"
[tool.commitizen]
version = "1.12.1"
version = "1.12.2"
version_files = [
"pyproject.toml:^version"
]