Skip to content

Commit

Permalink
all regions have openai vectorize
Browse files Browse the repository at this point in the history
  • Loading branch information
hemidactylus committed Jun 18, 2024
1 parent 076b0ab commit a8c5624
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions libs/astradb/tests/integration_tests/test_vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@

MATCH_EPSILON = 0.0001

# For the time being, prod-regions described only
OPENAI_VECTORIZE_REGIONS_MAP = {
"prod": {"us-east-2", "westus3", "us-east1"}, # resp. aws, azure, gcp
}

openai_vectorize_options = CollectionVectorServiceOptions(
provider="openai",
Expand Down Expand Up @@ -79,14 +75,9 @@ def is_openai_vector_service_available() -> bool:
env = "prod"
else:
env = "other"
openai_vectorize_regions = OPENAI_VECTORIZE_REGIONS_MAP.get(env, set())
return all(
[
any(
openai_region in os.environ.get("ASTRA_DB_API_ENDPOINT", "")
for openai_region in openai_vectorize_regions
),
"astra.datastax.com" in os.environ.get("ASTRA_DB_API_ENDPOINT", ""),
env == "prod",
os.environ.get("SHARED_SECRET_NAME_OPENAI"),
]
)
Expand Down

0 comments on commit a8c5624

Please sign in to comment.