mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix: minor bug fixes
This commit is contained in:
parent
8ad84517d0
commit
01394a7bbd
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue