Skip to content
Snippets Groups Projects
Commit e27f4446 authored by James Briggs's avatar James Briggs
Browse files

fix: adjust for delete_index

parent 352f2c36
No related branches found
No related tags found
No related merge requests found
...@@ -237,12 +237,12 @@ class TestRouteLayer: ...@@ -237,12 +237,12 @@ class TestRouteLayer:
assert openai_encoder.score_threshold == 0.3 assert openai_encoder.score_threshold == 0.3
assert route_layer_openai.score_threshold == 0.3 assert route_layer_openai.score_threshold == 0.3
def test_delete_all(self, openai_encoder, routes, index_cls): def test_delete_index(self, openai_encoder, routes, index_cls):
index = init_index(index_cls) index = init_index(index_cls)
route_layer = RouteLayer(encoder=openai_encoder, routes=routes, index=index) route_layer = RouteLayer(encoder=openai_encoder, routes=routes, index=index)
if index_cls is PineconeIndex: if index_cls is PineconeIndex:
time.sleep(PINECONE_SLEEP) # allow for index to be populated time.sleep(PINECONE_SLEEP) # allow for index to be populated
route_layer.index.delete_all() route_layer.index.delete_index()
if index_cls is PineconeIndex: if index_cls is PineconeIndex:
time.sleep(PINECONE_SLEEP) # allow for index to be updated time.sleep(PINECONE_SLEEP) # allow for index to be updated
assert route_layer.index.get_utterances() == [] assert route_layer.index.get_utterances() == []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment