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
|
return self.model_dump() # noqa
|
||||||
except:
|
except:
|
||||||
# if using pydantic v1
|
# if using pydantic v1
|
||||||
return json.dumps(self.dict(), **kwargs)
|
return self.dict()
|
||||||
|
|
||||||
class GenerateKeyResponse(BaseModel):
|
class GenerateKeyResponse(BaseModel):
|
||||||
key: str
|
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")
|
raise Exception(f"Token not allowed to access model")
|
||||||
api_key = valid_token.token
|
api_key = valid_token.token
|
||||||
valid_token_dict = _get_pydantic_json_dict(valid_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)
|
return UserAPIKeyAuth(api_key=api_key, **valid_token)
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Invalid token")
|
raise Exception(f"Invalid token")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "1.12.1"
|
version = "1.12.2"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
authors = ["BerriAI"]
|
authors = ["BerriAI"]
|
||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
@ -55,7 +55,7 @@ requires = ["poetry-core", "wheel"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.commitizen]
|
[tool.commitizen]
|
||||||
version = "1.12.1"
|
version = "1.12.2"
|
||||||
version_files = [
|
version_files = [
|
||||||
"pyproject.toml:^version"
|
"pyproject.toml:^version"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue