mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 22:44:36 +00:00
community[patch]: Fixing some caching issues for AzureCosmosDBSemanticCache (#18884)
Fixing some issues for AzureCosmosDBSemanticCache - Added the entry for "AzureCosmosDBSemanticCache" which was missing in langchain/cache.py - Added application name when creating the MongoClient for the AzureCosmosDBVectorSearch, for tracking purposes. @baskaryan, can you please review this PR, we need this to go in asap. These are just small fixes which we found today in our testing.
This commit is contained in:
@@ -35,6 +35,7 @@ m = 16
|
||||
ef_construction = 64
|
||||
ef_search = 40
|
||||
score_threshold = 0.1
|
||||
application_name = "LANGCHAIN_PYTHON"
|
||||
|
||||
|
||||
def prepare_collection() -> Any:
|
||||
@@ -108,6 +109,7 @@ class TestAzureCosmosDBVectorSearch:
|
||||
azure_openai_embeddings,
|
||||
collection=collection,
|
||||
index_name=INDEX_NAME,
|
||||
application_name=application_name,
|
||||
)
|
||||
sleep(1) # waits for Cosmos DB to save contents to the collection
|
||||
|
||||
@@ -911,6 +913,7 @@ class TestAzureCosmosDBVectorSearch:
|
||||
NAMESPACE,
|
||||
azure_openai_embeddings,
|
||||
index_name=INDEX_NAME,
|
||||
application_name=application_name,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -926,6 +929,7 @@ class TestAzureCosmosDBVectorSearch:
|
||||
NAMESPACE,
|
||||
azure_openai_embeddings,
|
||||
index_name=INDEX_NAME,
|
||||
application_name=application_name,
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user