Skip to content

Commit a99e3a9

Browse files
committed
use langchain-azure-ai instead to cope with warning
1 parent f547642 commit a99e3a9

File tree

3 files changed

+151
-4
lines changed

3 files changed

+151
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies = [
88
"azure-cosmos>=4.9.0",
99
"elasticsearch>=9.1.0",
1010
"httpx>=0.28.1",
11+
"langchain-azure-ai>=0.1.4",
1112
"langchain-community>=0.3.27",
1213
"langchain-openai>=0.3.28",
1314
"langchain-text-splitters>=0.3.9",

template_langgraph/tools/cosmosdb_tool.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
from functools import lru_cache
22

33
from azure.cosmos import CosmosClient, PartitionKey
4-
from langchain_community.vectorstores.azure_cosmos_db_no_sql import (
5-
AzureCosmosDBNoSqlVectorSearch,
6-
)
4+
from langchain_azure_ai.vectorstores.azure_cosmos_db_no_sql import AzureCosmosDBNoSqlVectorSearch
75
from langchain_core.documents import Document
86
from langchain_core.tools import tool
97
from pydantic import BaseModel, Field
@@ -74,6 +72,10 @@ def __init__(
7472
"partition_key": PartitionKey(path=settings.cosmosdb_partition_key),
7573
},
7674
cosmos_database_properties={},
75+
vector_search_fields={
76+
"text_field": "text",
77+
"embedding_field": "embedding",
78+
},
7779
full_text_policy={
7880
"defaultLanguage": "en-US",
7981
"fullTextPaths": [

uv.lock

Lines changed: 145 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)