Skip to content

Commit a4dac55

Browse files
eyurtsevccurme
andauthored
community[patch]: ssl verification should be enabled by default everywhere (#75)
Co-authored-by: Chester Curme <[email protected]>
1 parent 1f8f7d8 commit a4dac55

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

libs/community/langchain_community/chat_models/gigachat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class GigaChat(_BaseGigaChat, BaseChatModel):
128128
.. code-block:: python
129129
130130
from langchain_community.chat_models import GigaChat
131-
giga = GigaChat(credentials=..., scope=..., verify_ssl_certs=False)
131+
giga = GigaChat(credentials=..., scope=..., verify_ssl_certs=...)
132132
"""
133133

134134
def _build_payload(self, messages: List[BaseMessage], **kwargs: Any) -> gm.Chat:

libs/community/langchain_community/embeddings/gigachat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class GigaChatEmbeddings(BaseModel, Embeddings):
2929
from langchain_community.embeddings.gigachat import GigaChatEmbeddings
3030
3131
embeddings = GigaChatEmbeddings(
32-
credentials=..., scope=..., verify_ssl_certs=False
32+
credentials=..., scope=..., verify_ssl_certs=...
3333
)
3434
"""
3535

libs/community/langchain_community/tools/cogniswitch/tool.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def answer_cs(self, cs_token: str, OAI_token: str, query: str, apiKey: str) -> d
7676
}
7777

7878
data = {"query": query}
79-
response = requests.post(self.api_url, headers=headers, verify=False, data=data)
79+
response = requests.post(self.api_url, headers=headers, data=data)
8080
return response.json()
8181

8282

@@ -143,7 +143,6 @@ def knowledge_status(self, document_name: str) -> dict:
143143
self.knowledge_status_url,
144144
headers=headers,
145145
params=params,
146-
verify=False,
147146
)
148147
if response.status_code == 200:
149148
source_info = response.json()
@@ -174,7 +173,6 @@ def knowledge_status(self, document_name: str) -> dict:
174173
source_data.pop("docEntryId")
175174
return source_data
176175
else:
177-
# error_message = response.json()["message"]
178176
return {
179177
"message": response.status_code,
180178
}
@@ -283,7 +281,6 @@ def store_data(
283281
response = requests.post(
284282
self.knowledgesource_file,
285283
headers=headers,
286-
verify=False,
287284
data=data,
288285
files=files,
289286
)
@@ -390,7 +387,6 @@ def store_data(
390387
response = requests.post(
391388
self.knowledgesource_url,
392389
headers=headers,
393-
verify=False,
394390
data=data,
395391
)
396392
if response.status_code == 200:

libs/community/tests/unit_tests/document_loaders/blob_loaders/test_cloud_blob_loader.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ def toy_dir() -> Generator[str, None, None]:
4343
yield f"file://{temp_dir}"
4444

4545

46-
# @pytest.fixture
47-
# @pytest.mark.requires("boto3")
48-
# def toy_dir() -> str:
49-
# return "s3://ppr-langchain-test"
50-
51-
5246
_TEST_CASES = [
5347
{
5448
"glob": "**/[!.]*",

0 commit comments

Comments
 (0)