Skip to content

Commit cca71b4

Browse files
committed
test_e2e_batches_files
1 parent 3d87bf9 commit cca71b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/openai_misc_endpoints_tests/test_openai_batches_endpoint.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def await_batch_completion(batch_id: str, custom_llm_provider: str):
101101
)
102102
if batch.status == "completed":
103103
print(f"Batch {batch_id} completed.")
104-
return
104+
return batch.id
105105

106106
tries += 1
107107
print(f"waiting for batch to complete... (attempt {tries}/{max_tries})")
@@ -173,9 +173,11 @@ def test_e2e_batches_files(custom_llm_provider):
173173
# azure takes very long to complete a batch
174174
return
175175
else:
176-
await_batch_completion(
176+
response_batch_id = await_batch_completion(
177177
batch_id=batch_id, custom_llm_provider=custom_llm_provider
178178
)
179+
if response_batch_id is None:
180+
return
179181

180182
write_content_to_file(
181183
batch_id=batch_id,

0 commit comments

Comments
 (0)