Skip to content

Commit

Permalink
fix dedicated
Browse files Browse the repository at this point in the history
  • Loading branch information
clun committed Jul 10, 2024
1 parent 1387205 commit b0452d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-astra-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: AstraDEV
name: AstraDev

on:
#push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public String getRegion() {
@Test
public void testHuggingFaceDedicated() {
String providerName = System.getenv("EMBEDDING_PROVIDER");
String huggingFaceKey = System.getenv("EMBEDDING_API_KEY");
String collectionName = "collection_hf_dedicated";
FindEmbeddingProvidersResult result = getDatabaseAdmin().findEmbeddingProviders();
assertThat(result.getEmbeddingProviders().get(providerName)).isNotNull();
Expand All @@ -58,14 +57,14 @@ public void testHuggingFaceDedicated() {
params.put("endpointName", System.getenv("HUGGINGFACEDED_ENDPOINTNAME"));
params.put("regionName", System.getenv("HUGGINGFACEDED_REGIONNAME"));
params.put("cloudName", System.getenv("HUGGINGFACEDED_CLOUDNAME"));
builder.vectorize(providerName, null, huggingFaceKey, params);
builder.vectorize(providerName, null, null, params);
Collection<Document> collection = getDatabase()
.createCollection(collectionName, builder.build(), new CommandOptions<>());
assertThat(getDatabase()
.collectionExists(collectionName)).isTrue();

// Test Collection
testCollection(collection, new EmbeddingAPIKeyHeaderProvider(huggingFaceKey));
testCollection(collection, new EmbeddingAPIKeyHeaderProvider( System.getenv("EMBEDDING_API_KEY")));

// Drop Collection
getDatabase().dropCollection(collectionName);
Expand Down

0 comments on commit b0452d1

Please sign in to comment.