Update api_usage.py
Browse files- api_usage.py +3 -3
api_usage.py
CHANGED
|
@@ -493,15 +493,15 @@ def check_bedrock_invoke(session):
|
|
| 493 |
with concurrent.futures.ThreadPoolExecutor() as executer:
|
| 494 |
futures = [executer.submit(invoke_claude, session, region, "anthropic.claude-v2") for region in regions]
|
| 495 |
for future in concurrent.futures.as_completed(futures):
|
| 496 |
-
if future.result():
|
| 497 |
enable_region.append(future.result())
|
| 498 |
futures = [executer.submit(invoke_claude, session, region, "anthropic.claude-v2:1") for region in regions]
|
| 499 |
for future in concurrent.futures.as_completed(futures):
|
| 500 |
-
if future.result():
|
| 501 |
enable_region.append(future.result())
|
| 502 |
futures = [executer.submit(invoke_claude, session, region, "anthropic.claude-3-sonnet-20240229-v1:0") for region in regions]
|
| 503 |
for future in concurrent.futures.as_completed(futures):
|
| 504 |
-
if future.result():
|
| 505 |
enable_region_sonnet.append(future.result())
|
| 506 |
return enable_region, enable_region_sonnet
|
| 507 |
|
|
|
|
| 493 |
with concurrent.futures.ThreadPoolExecutor() as executer:
|
| 494 |
futures = [executer.submit(invoke_claude, session, region, "anthropic.claude-v2") for region in regions]
|
| 495 |
for future in concurrent.futures.as_completed(futures):
|
| 496 |
+
if future.result() and (future.result() not in enable_region):
|
| 497 |
enable_region.append(future.result())
|
| 498 |
futures = [executer.submit(invoke_claude, session, region, "anthropic.claude-v2:1") for region in regions]
|
| 499 |
for future in concurrent.futures.as_completed(futures):
|
| 500 |
+
if future.result() and (future.result() not in enable_region):
|
| 501 |
enable_region.append(future.result())
|
| 502 |
futures = [executer.submit(invoke_claude, session, region, "anthropic.claude-3-sonnet-20240229-v1:0") for region in regions]
|
| 503 |
for future in concurrent.futures.as_completed(futures):
|
| 504 |
+
if future.result() and (future.result() not in enable_region_sonnet):
|
| 505 |
enable_region_sonnet.append(future.result())
|
| 506 |
return enable_region, enable_region_sonnet
|
| 507 |
|