Skip to content

Commit

Permalink
fix no response for streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya52 committed Dec 21, 2023
1 parent 23ec046 commit e08cffd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion refact_scratchpads_no_gpu/stream_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ def validate_description_dict(


def completions_wait_batch(req_session: requests.Session, my_desc, verbose=False):
resp = None
txt = ""
json_resp = None
for attempt in range(5):
t0 = time.time()
url = url_get_the_best() + "completions-wait-batch"
status: Optional[int] = None
try:
resp = req_session.post(url, json=my_desc, timeout=15, proxies={"http": "", "https": ""})
txt = resp.text
status = resp.status_code
json_resp = resp.json()
status = resp.status_code
Expand Down

0 comments on commit e08cffd

Please sign in to comment.