forked from phoenix/litellm-mirror
build(config.yml): add more logging for docker build and test
This commit is contained in:
parent
eea4325e60
commit
ecc6855e49
2 changed files with 15 additions and 11 deletions
|
@ -156,7 +156,7 @@ jobs:
|
||||||
--config /app/config.yaml \
|
--config /app/config.yaml \
|
||||||
--port 4000 \
|
--port 4000 \
|
||||||
--num_workers 8 \
|
--num_workers 8 \
|
||||||
--debug \
|
--detailed_debug \
|
||||||
--run_gunicorn \
|
--run_gunicorn \
|
||||||
- run:
|
- run:
|
||||||
name: Install curl and dockerize
|
name: Install curl and dockerize
|
||||||
|
|
|
@ -107,19 +107,23 @@ async def chat_completion(session, key, model="gpt-4"):
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
async with session.post(url, headers=headers, json=data) as response:
|
for i in range(3):
|
||||||
status = response.status
|
try:
|
||||||
response_text = await response.text()
|
async with session.post(url, headers=headers, json=data) as response:
|
||||||
|
status = response.status
|
||||||
|
response_text = await response.text()
|
||||||
|
|
||||||
print(response_text)
|
print(response_text)
|
||||||
print()
|
print()
|
||||||
|
|
||||||
if status != 200:
|
if status != 200:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f"Request did not return a 200 status code: {status}. Response: {response_text}"
|
f"Request did not return a 200 status code: {status}. Response: {response_text}"
|
||||||
)
|
)
|
||||||
|
|
||||||
return await response.json()
|
return await response.json()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
async def chat_completion_streaming(session, key, model="gpt-4"):
|
async def chat_completion_streaming(session, key, model="gpt-4"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue