This commit is contained in:
Timothy Jaeryang Baek
2025-09-11 21:56:59 +04:00
parent edc056351d
commit 6c0a5fa91c
4 changed files with 20 additions and 24 deletions

View File

@@ -221,10 +221,11 @@ async def generate_function_chat_completion(
oauth_token = None
try:
oauth_token = request.app.state.oauth_manager.get_oauth_token(
user.id,
request.cookies.get("oauth_session_id", None),
)
if request.cookies.get("oauth_session_id", None):
oauth_token = request.app.state.oauth_manager.get_oauth_token(
user.id,
request.cookies.get("oauth_session_id", None),
)
except Exception as e:
log.error(f"Error getting OAuth token: {e}")