Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit 937c2dd

Browse files
authored
Merge pull request #76 from Not-Diamond/fix-low-vulnerability-dependency
fix: update cryptography dependency
2 parents fe3ca7e + 6f1f9ff commit 937c2dd

295 files changed

Lines changed: 42083 additions & 47450 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ dist/
88
/dist
99
.vscode/
1010
venv/
11+
.venv/

poetry.lock

Lines changed: 2487 additions & 2765 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ repository = "https://github.com/Not-Diamond/notdiamond-python"
99
documentation = "https://notdiamond.readme.io/docs/"
1010

1111
[tool.poetry.dependencies]
12-
python = ">=3.9,<3.13"
12+
python = ">3.9.1,<3.13"
1313
litellm = "1.49.0"
1414
python-dotenv = "^1.0.1"
1515
aiohttp = "^3.9.3"
1616
pandas = "^2.2.2"
1717
pydantic-partial = "^0.5.5"
18+
cryptography = ">=44.0.1"
1819
langchain = { version = ">=0.2.7", optional = true }
1920
langchain-google-genai = { version = ">=1.0.7", optional = true }
2021
langchain-openai = { version = "^0.1.16", optional = true }
@@ -24,11 +25,14 @@ langchain-mistralai = { version = "^0.1.10", optional = true }
2425
langchain-together = { version = "^0.1.4", optional = true }
2526
langchain-cohere = { version = "^0.1.9", optional = true }
2627
requests = ">=2.31"
27-
optuna = { version = "^4.1.0", optional = true}
28-
ragas = {extras = ["all"], version = "^0.2.6", optional = true}
29-
unstructured = {extras = ["local-inference"], version = "^0.16.5", optional = true}
28+
optuna = { version = "^4.1.0", optional = true }
29+
ragas = { extras = ["all"], version = "^0.2.6", optional = true }
30+
unstructured = { extras = [
31+
"local-inference",
32+
], version = "^0.16.5", optional = true }
3033
onnxruntime = { version = "<1.20", optional = true }
31-
python-multipart = {version = "0.0.18", extras = ["rag"]}
34+
python-multipart = { version = "0.0.18", extras = ["rag"] }
35+
llama-index = { version = "^0.12.25", optional = true }
3236

3337
[tool.poetry.group.test.dependencies]
3438
pytest = "^8.0.0"
@@ -68,9 +72,7 @@ create = [
6872
"langchain-together",
6973
"langchain",
7074
]
71-
openai = [
72-
"openai",
73-
]
75+
openai = ["openai"]
7476
rag = [
7577
"ragas",
7678
"unstructured",
@@ -84,7 +86,7 @@ rag = [
8486
"langchain-openai",
8587
"langchain-together",
8688
"langchain",
87-
"llama-index"
89+
"llama-index",
8890
]
8991

9092
[build-system]
@@ -109,7 +111,20 @@ exclude = '''
109111

110112
[tool.flake8]
111113
max-line-length = 130
112-
extend-ignore = ["D203", "E203", "E251", "E266", "E302", "E305", "E401", "E402", "E501", "F401", "F403", "W503"]
114+
extend-ignore = [
115+
"D203",
116+
"E203",
117+
"E251",
118+
"E266",
119+
"E302",
120+
"E305",
121+
"E401",
122+
"E402",
123+
"E501",
124+
"F401",
125+
"F403",
126+
"W503",
127+
]
113128
exclude = [".git", "__pycache__", "dist", "cookbooks"]
114129
max-complexity = 10
115130

tests/cassettes/test_init/test_async_init_multi_provider_multi_model.yaml

Lines changed: 58 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ interactions:
66
accept:
77
- application/json
88
accept-encoding:
9-
- gzip, deflate
9+
- gzip, deflate, zstd
1010
api-key:
11-
- 768db448e03a4c31986961b5cfebb9c1
11+
- VkhQnoqnZjxaq2NSprIB6ElTip9DgcBAYYA9s8DieI0U2q8C61C0JQQJ99BBACYeBjFXJ3w3AAABACOGP4m6
1212
connection:
1313
- keep-alive
1414
content-length:
@@ -18,63 +18,75 @@ interactions:
1818
host:
1919
- notdiamond-azure-openai.openai.azure.com
2020
user-agent:
21-
- AsyncAzureOpenAI/Python 1.55.1
21+
- AsyncAzureOpenAI/Python 1.68.2
2222
x-stainless-arch:
23-
- arm64
23+
- x64
2424
x-stainless-async:
2525
- async:asyncio
2626
x-stainless-lang:
2727
- python
2828
x-stainless-os:
29-
- MacOS
29+
- Linux
3030
x-stainless-package-version:
31-
- 1.55.1
31+
- 1.68.2
32+
x-stainless-read-timeout:
33+
- '60.0'
3234
x-stainless-retry-count:
3335
- '0'
3436
x-stainless-runtime:
3537
- CPython
3638
x-stainless-runtime-version:
37-
- 3.11.10
39+
- 3.12.3
3840
method: POST
39-
uri: https://notdiamond-azure-openai.openai.azure.com//openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-07-01-preview
41+
uri: https://notdiamond-azure-openai.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-07-01-preview
4042
response:
4143
body:
4244
string: '{"choices":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"I''m
43-
just a program, so I don''t have feelings, but I''m here and ready to help
44-
you! How can I assist you today?","role":"assistant"}}],"created":1734109553,"id":"chatcmpl-Ae3Or90SYdUxSEYVsbLdaTWG07wnQ","model":"gpt-4o-mini","object":"chat.completion","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"system_fingerprint":"fp_04751d0b65","usage":{"completion_tokens":27,"prompt_tokens":23,"total_tokens":50}}
45+
just a computer program, so I don''t have feelings, but I''m here and ready
46+
to help you! How can I assist you today?","refusal":null,"role":"assistant"}}],"created":1742890893,"id":"chatcmpl-BEtpNXLDkbIrIv8oPMApr2H7ATbDE","model":"gpt-4o-mini-2024-07-18","object":"chat.completion","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"system_fingerprint":"fp_ded0d14823","usage":{"completion_tokens":29,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens":23,"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0},"total_tokens":52}}
4547
4648
'
4749
headers:
4850
Content-Length:
49-
- '914'
51+
- '1140'
5052
Content-Type:
5153
- application/json
5254
Date:
53-
- Fri, 13 Dec 2024 17:05:52 GMT
55+
- Tue, 25 Mar 2025 08:21:34 GMT
5456
Strict-Transport-Security:
5557
- max-age=31536000; includeSubDomains; preload
5658
apim-request-id:
57-
- b4f1b9f3-d140-4418-86a9-17b03fb2a244
59+
- 2fb71199-5f2f-4308-ad50-a05dfc9717e4
5860
azureml-model-session:
59-
- d008-20241115090539
61+
- v20250319-1-164616836
62+
cmp-upstream-response-duration:
63+
- '454'
64+
ms-azureml-model-time:
65+
- '497'
6066
x-accel-buffering:
6167
- 'no'
68+
x-aml-cluster:
69+
- hyena-westus3-01
6270
x-content-type-options:
6371
- nosniff
6472
x-envoy-upstream-service-time:
65-
- '476'
73+
- '503'
6674
x-ms-client-request-id:
67-
- b4f1b9f3-d140-4418-86a9-17b03fb2a244
75+
- 2fb71199-5f2f-4308-ad50-a05dfc9717e4
6876
x-ms-rai-invoked:
6977
- 'true'
7078
x-ms-region:
7179
- East US
80+
x-ratelimit-limit-requests:
81+
- '20000'
82+
x-ratelimit-limit-tokens:
83+
- '2000000'
7284
x-ratelimit-remaining-requests:
73-
- '19985'
85+
- '19995'
7486
x-ratelimit-remaining-tokens:
75-
- '1957903'
87+
- '1994987'
7688
x-request-id:
77-
- b5fba11b-2ade-4484-bbea-71cba5e310f0
89+
- a0979c7a-9e0c-4464-9cf8-c57704d3361e
7890
status:
7991
code: 200
8092
message: OK
@@ -85,7 +97,7 @@ interactions:
8597
accept:
8698
- application/json
8799
accept-encoding:
88-
- gzip, deflate
100+
- gzip, deflate, zstd
89101
connection:
90102
- keep-alive
91103
content-length:
@@ -95,57 +107,57 @@ interactions:
95107
host:
96108
- api.openai.com
97109
user-agent:
98-
- AsyncOpenAI/Python 1.55.1
110+
- AsyncOpenAI/Python 1.68.2
99111
x-stainless-arch:
100-
- arm64
112+
- x64
101113
x-stainless-async:
102114
- async:asyncio
103115
x-stainless-lang:
104116
- python
105117
x-stainless-os:
106-
- MacOS
118+
- Linux
107119
x-stainless-package-version:
108-
- 1.55.1
120+
- 1.68.2
121+
x-stainless-read-timeout:
122+
- '60.0'
109123
x-stainless-retry-count:
110124
- '0'
111125
x-stainless-runtime:
112126
- CPython
113127
x-stainless-runtime-version:
114-
- 3.11.10
128+
- 3.12.3
115129
method: POST
116130
uri: https://api.openai.com/v1/chat/completions
117131
response:
118132
body:
119-
string: "{\n \"id\": \"chatcmpl-Ae3OulpCZauOJfRIaNUleaCtyxRQ6\",\n \"object\":
120-
\"chat.completion\",\n \"created\": 1734109556,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n
133+
string: "{\n \"id\": \"chatcmpl-BEtpOBPMD7CXFU1MugazYsSlNt1Ie\",\n \"object\":
134+
\"chat.completion\",\n \"created\": 1742890894,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n
121135
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
122136
\"assistant\",\n \"content\": \"I'm just a computer program, but I'm
123137
here and ready to help you! How can I assist you today?\",\n \"refusal\":
124-
null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n
125-
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 23,\n \"completion_tokens\":
126-
22,\n \"total_tokens\": 45,\n \"prompt_tokens_details\": {\n \"cached_tokens\":
127-
0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
138+
null,\n \"annotations\": []\n },\n \"logprobs\": null,\n
139+
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
140+
23,\n \"completion_tokens\": 23,\n \"total_tokens\": 46,\n \"prompt_tokens_details\":
141+
{\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\":
128142
{\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\":
129-
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\":
130-
\"fp_6fc10e10eb\"\n}\n"
143+
0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\":
144+
\"default\",\n \"system_fingerprint\": \"fp_b8bc95a0ac\"\n}\n"
131145
headers:
132-
CF-Cache-Status:
133-
- DYNAMIC
134146
CF-RAY:
135-
- 8f178aa619d4db25-MIA
147+
- 925cfedb9a9ad0ef-SOF
136148
Connection:
137149
- keep-alive
138150
Content-Type:
139151
- application/json
140152
Date:
141-
- Fri, 13 Dec 2024 17:05:57 GMT
153+
- Tue, 25 Mar 2025 08:21:35 GMT
142154
Server:
143155
- cloudflare
144156
Set-Cookie:
145-
- __cf_bm=LuoLdhKSyuMgz6D0A0LOWiUwyoIVKE8JOHSSQ.BdOj4-1734109557-1.0.1.1-86ImlI5Fh1uZJBzchOE82RFyGKKT7e6REfUN3ygQvEt74G7cb60bpTL0JKVlPcDQjGB9hweiU30s1zCmDex6Eg;
146-
path=/; expires=Fri, 13-Dec-24 17:35:57 GMT; domain=.api.openai.com; HttpOnly;
157+
- __cf_bm=fNUSLZkjMPZGG_FnDcn_2sRdRgI3ZtNZml095SkSqss-1742890895-1.0.1.1-hRkyK0ogjYPgmtTrYG_Q0XSkDg51nljT4eQwB6LPchrTJ6ZNK6xm.o_ENUAFcGuIKkxXohw0xf.fNnXbxgbyaFrZ6QAJMqXA3cEos5kHHVg;
158+
path=/; expires=Tue, 25-Mar-25 08:51:35 GMT; domain=.api.openai.com; HttpOnly;
147159
Secure; SameSite=None
148-
- _cfuvid=pU7HAlneSNmC00Zs754t_zpGZQJoyTDat5C1lbaakkE-1734109557442-0.0.1.1-604800000;
160+
- _cfuvid=AMMIprInm5Zo0UwTC596yl.HztHBa2M5rPMNaaefxGA-1742890895486-0.0.1.1-604800000;
149161
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
150162
Transfer-Encoding:
151163
- chunked
@@ -155,12 +167,14 @@ interactions:
155167
- X-Request-ID
156168
alt-svc:
157169
- h3=":443"; ma=86400
170+
cf-cache-status:
171+
- DYNAMIC
158172
content-length:
159-
- '843'
173+
- '899'
160174
openai-organization:
161175
- not-diamond-bdz8cg
162176
openai-processing-ms:
163-
- '802'
177+
- '569'
164178
openai-version:
165179
- '2020-10-01'
166180
strict-transport-security:
@@ -172,13 +186,13 @@ interactions:
172186
x-ratelimit-remaining-requests:
173187
- '29999'
174188
x-ratelimit-remaining-tokens:
175-
- '149999971'
189+
- '149999987'
176190
x-ratelimit-reset-requests:
177191
- 2ms
178192
x-ratelimit-reset-tokens:
179193
- 0s
180194
x-request-id:
181-
- req_da9ad77d4b8a226492938302046fdf74
195+
- req_40723ccaf375eedf0790ea440f615ddf
182196
status:
183197
code: 200
184198
message: OK

0 commit comments

Comments
 (0)