Skip to content

Commit 05f865d

Browse files
Kristian NylundKristian Nylund
authored andcommitted
credential as param
1 parent d672294 commit 05f865d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

text_2_sql/autogen/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies = [
1919
"nltk>=3.8.1",
2020
"cachetools>=5.5.1",
2121
"azure-cosmos>=4.9.0",
22-
"azure-identity>=1.19.0",
2322
]
2423

2524
[dependency-groups]

text_2_sql/autogen/src/autogen_text_2_sql/state_store.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from abc import ABC, abstractmethod
22
from cachetools import TTLCache
33
from azure.cosmos import CosmosClient, exceptions
4-
from azure.identity import DefaultAzureCredential
4+
55

66
class StateStore(ABC):
77
@abstractmethod
@@ -25,10 +25,10 @@ def save_state(self, thread_id: str, state: dict) -> None:
2525

2626

2727
class CosmosStateStore(StateStore):
28-
def __init__(self, endpoint, database, container, partition_key = None):
28+
def __init__(self, endpoint, database, container, credential, partition_key = None):
2929
client = CosmosClient(
3030
url=endpoint,
31-
credential=DefaultAzureCredential(),
31+
credential=credential
3232
)
3333
database_client = client.get_database_client(database)
3434
self._db = database_client.get_container_client(container)

0 commit comments

Comments
 (0)