Merge branch 'BerriAI:main' into main

This commit is contained in:
Ishaan Jaff 2024-01-27 15:14:31 -08:00 committed by GitHub
commit a0fd0f03f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View file

@ -2858,8 +2858,11 @@ async def user_auth(request: Request):
@app.get("/google-login", tags=["experimental"])
async def google_login():
GOOGLE_REDIRECT_URI = "http://localhost:4000/google-callback"
async def google_login(request: Request):
scheme = request.url.scheme
host = request.url.hostname
port = request.url.port or 4000
GOOGLE_REDIRECT_URI = f"{scheme}://{host}:{port}/google-callback"
GOOGLE_CLIENT_ID = (
"246483686424-clje5sggkjma26ilktj6qssakqhoon0m.apps.googleusercontent.com"
)
@ -2868,10 +2871,14 @@ async def google_login():
@app.get("/google-callback", tags=["experimental"], response_model=GenerateKeyResponse)
async def google_callback(code: str):
async def google_callback(code: str, request: Request):
import httpx
GOOGLE_REDIRECT_URI = "http://localhost:4000/google-callback"
scheme = request.url.scheme
host = request.url.hostname
port = request.url.port or 4000
GOOGLE_REDIRECT_URI = f"{scheme}://{host}:{port}/google-callback"
GOOGLE_CLIENT_ID = (
"246483686424-clje5sggkjma26ilktj6qssakqhoon0m.apps.googleusercontent.com"
)

View file

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