Skip to content

Commit

Permalink
updating vector store tests to use Value
Browse files Browse the repository at this point in the history
  • Loading branch information
chschrae committed Sep 19, 2024
1 parent 4ed3408 commit 317601a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public async Task CanCreateGetAndDeleteVectorStores()
VectorStoreClient client = GetTestClient();

CreateVectorStoreOperation createVectorStoreOperation = await client.CreateVectorStoreAsync(waitUntilCompleted: false);
Validate(createVectorStoreOperation);
bool deleted = await client.DeleteVectorStoreAsync(createVectorStoreOperation.GetVectorStore());
Validate(createVectorStoreOperation.Value);
bool deleted = await client.DeleteVectorStoreAsync(createVectorStoreOperation.Value);
Assert.That(deleted, Is.True);

IReadOnlyList<OpenAIFileInfo> testFiles = await GetNewTestFilesAsync(client.GetConfigOrThrow(), 5);
Expand All @@ -58,8 +58,8 @@ public async Task CanCreateGetAndDeleteVectorStores()
["test-key"] = "test-value",
},
});
Validate(createVectorStoreOperation);
VectorStore vectorStore = createVectorStoreOperation.GetVectorStore();
Validate(createVectorStoreOperation.Value);
VectorStore vectorStore = createVectorStoreOperation.Value;
Assert.Multiple(() =>
{
Assert.That(vectorStore.Name, Is.EqualTo("test vector store"));
Expand Down Expand Up @@ -91,7 +91,7 @@ public async Task CanCreateGetAndDeleteVectorStores()
FileIds = testFiles.Select(file => file.Id).ToList()
});

vectorStore = createVectorStoreOperation.GetVectorStore();
vectorStore = createVectorStoreOperation.Value;
Validate(vectorStore);
Assert.Multiple(() =>
{
Expand Down

0 comments on commit 317601a

Please sign in to comment.