fix(proxy_server.py): fix /key/update endpoint to update key duration

also adds a test for this to our ci/cd
This commit is contained in:
Krrish Dholakia 2024-03-29 21:47:10 -07:00
parent 68a1fa36cf
commit af2eabba91
2 changed files with 8 additions and 1 deletions

View file

@ -65,7 +65,7 @@ async def update_key(session, get_key):
"Authorization": f"Bearer sk-1234",
"Content-Type": "application/json",
}
data = {"key": get_key, "models": ["gpt-4"]}
data = {"key": get_key, "models": ["gpt-4"], "duration": "120s"}
async with session.post(url, headers=headers, json=data) as response:
status = response.status