mirascope 2.0.0a4__py3-none-any.whl → 2.0.0a5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. mirascope/api/_generated/__init__.py +17 -1
  2. mirascope/api/_generated/api_keys/__init__.py +7 -0
  3. mirascope/api/_generated/api_keys/client.py +453 -0
  4. mirascope/api/_generated/api_keys/raw_client.py +853 -0
  5. mirascope/api/_generated/api_keys/types/__init__.py +9 -0
  6. mirascope/api/_generated/api_keys/types/api_keys_create_response.py +36 -0
  7. mirascope/api/_generated/api_keys/types/api_keys_get_response.py +35 -0
  8. mirascope/api/_generated/api_keys/types/api_keys_list_response_item.py +35 -0
  9. mirascope/api/_generated/client.py +6 -0
  10. mirascope/api/_generated/environments/__init__.py +17 -0
  11. mirascope/api/_generated/environments/client.py +532 -0
  12. mirascope/api/_generated/environments/raw_client.py +1088 -0
  13. mirascope/api/_generated/environments/types/__init__.py +15 -0
  14. mirascope/api/_generated/environments/types/environments_create_response.py +26 -0
  15. mirascope/api/_generated/environments/types/environments_get_response.py +26 -0
  16. mirascope/api/_generated/environments/types/environments_list_response_item.py +26 -0
  17. mirascope/api/_generated/environments/types/environments_update_response.py +26 -0
  18. mirascope/api/_generated/organizations/client.py +36 -12
  19. mirascope/api/_generated/organizations/raw_client.py +32 -6
  20. mirascope/api/_generated/organizations/types/organizations_create_response.py +1 -0
  21. mirascope/api/_generated/organizations/types/organizations_get_response.py +1 -0
  22. mirascope/api/_generated/organizations/types/organizations_list_response_item.py +1 -0
  23. mirascope/api/_generated/organizations/types/organizations_update_response.py +1 -0
  24. mirascope/api/_generated/projects/client.py +34 -10
  25. mirascope/api/_generated/projects/raw_client.py +46 -4
  26. mirascope/api/_generated/projects/types/projects_create_response.py +1 -0
  27. mirascope/api/_generated/projects/types/projects_get_response.py +1 -0
  28. mirascope/api/_generated/projects/types/projects_list_response_item.py +1 -0
  29. mirascope/api/_generated/projects/types/projects_update_response.py +1 -0
  30. mirascope/api/_generated/reference.md +729 -4
  31. mirascope/llm/__init__.py +2 -2
  32. mirascope/llm/exceptions.py +28 -0
  33. mirascope/llm/providers/__init__.py +6 -4
  34. mirascope/llm/providers/anthropic/_utils/__init__.py +2 -0
  35. mirascope/llm/providers/anthropic/_utils/errors.py +46 -0
  36. mirascope/llm/providers/anthropic/beta_provider.py +6 -0
  37. mirascope/llm/providers/anthropic/provider.py +5 -0
  38. mirascope/llm/providers/base/__init__.py +2 -1
  39. mirascope/llm/providers/base/base_provider.py +173 -58
  40. mirascope/llm/providers/google/_utils/__init__.py +2 -0
  41. mirascope/llm/providers/google/_utils/errors.py +49 -0
  42. mirascope/llm/providers/google/provider.py +5 -4
  43. mirascope/llm/providers/mlx/_utils.py +8 -1
  44. mirascope/llm/providers/mlx/provider.py +8 -0
  45. mirascope/llm/providers/openai/__init__.py +10 -1
  46. mirascope/llm/providers/openai/_utils/__init__.py +5 -0
  47. mirascope/llm/providers/openai/_utils/errors.py +46 -0
  48. mirascope/llm/providers/openai/completions/base_provider.py +6 -6
  49. mirascope/llm/providers/openai/provider.py +14 -1
  50. mirascope/llm/providers/openai/responses/provider.py +13 -7
  51. mirascope/llm/providers/provider_registry.py +56 -3
  52. mirascope/ops/_internal/closure.py +62 -11
  53. {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/METADATA +1 -1
  54. {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/RECORD +56 -38
  55. mirascope/llm/providers/load_provider.py +0 -54
  56. {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/WHEEL +0 -0
  57. {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/licenses/LICENSE +0 -0
@@ -228,6 +228,7 @@ from mirascope.api._generated import Mirascope
228
228
  client = Mirascope()
229
229
  client.organizations.create(
230
230
  name="name",
231
+ slug="slug",
231
232
  )
232
233
 
233
234
  ```
@@ -252,6 +253,14 @@ client.organizations.create(
252
253
  <dl>
253
254
  <dd>
254
255
 
256
+ **slug:** `str` — a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
257
+
258
+ </dd>
259
+ </dl>
260
+
261
+ <dl>
262
+ <dd>
263
+
255
264
  **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
256
265
 
257
266
  </dd>
@@ -336,7 +345,6 @@ from mirascope.api._generated import Mirascope
336
345
  client = Mirascope()
337
346
  client.organizations.update(
338
347
  id="id",
339
- name="name",
340
348
  )
341
349
 
342
350
  ```
@@ -361,7 +369,15 @@ client.organizations.update(
361
369
  <dl>
362
370
  <dd>
363
371
 
364
- **name:** `str` — a string at most 100 character(s) long
372
+ **name:** `typing.Optional[str]` — a string at most 100 character(s) long
373
+
374
+ </dd>
375
+ </dl>
376
+
377
+ <dl>
378
+ <dd>
379
+
380
+ **slug:** `typing.Optional[str]` — a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
365
381
 
366
382
  </dd>
367
383
  </dl>
@@ -509,6 +525,7 @@ client = Mirascope()
509
525
  client.projects.create(
510
526
  organization_id="organizationId",
511
527
  name="name",
528
+ slug="slug",
512
529
  )
513
530
 
514
531
  ```
@@ -541,6 +558,14 @@ client.projects.create(
541
558
  <dl>
542
559
  <dd>
543
560
 
561
+ **slug:** `str` — a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
562
+
563
+ </dd>
564
+ </dl>
565
+
566
+ <dl>
567
+ <dd>
568
+
544
569
  **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
545
570
 
546
571
  </dd>
@@ -635,7 +660,6 @@ client = Mirascope()
635
660
  client.projects.update(
636
661
  organization_id="organizationId",
637
662
  project_id="projectId",
638
- name="name",
639
663
  )
640
664
 
641
665
  ```
@@ -668,7 +692,15 @@ client.projects.update(
668
692
  <dl>
669
693
  <dd>
670
694
 
671
- **name:** `str` — a string at most 100 character(s) long
695
+ **name:** `typing.Optional[str]` — a string at most 100 character(s) long
696
+
697
+ </dd>
698
+ </dl>
699
+
700
+ <dl>
701
+ <dd>
702
+
703
+ **slug:** `typing.Optional[str]` — a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
672
704
 
673
705
  </dd>
674
706
  </dl>
@@ -751,3 +783,696 @@ client.projects.delete(
751
783
  </dl>
752
784
  </details>
753
785
 
786
+ ## environments
787
+ <details><summary><code>client.environments.<a href="src/mirascope/environments/client.py">list</a>(...)</code></summary>
788
+ <dl>
789
+ <dd>
790
+
791
+ #### 🔌 Usage
792
+
793
+ <dl>
794
+ <dd>
795
+
796
+ <dl>
797
+ <dd>
798
+
799
+ ```python
800
+ from mirascope.api._generated import Mirascope
801
+
802
+ client = Mirascope()
803
+ client.environments.list(
804
+ organization_id="organizationId",
805
+ project_id="projectId",
806
+ )
807
+
808
+ ```
809
+ </dd>
810
+ </dl>
811
+ </dd>
812
+ </dl>
813
+
814
+ #### ⚙️ Parameters
815
+
816
+ <dl>
817
+ <dd>
818
+
819
+ <dl>
820
+ <dd>
821
+
822
+ **organization_id:** `str`
823
+
824
+ </dd>
825
+ </dl>
826
+
827
+ <dl>
828
+ <dd>
829
+
830
+ **project_id:** `str`
831
+
832
+ </dd>
833
+ </dl>
834
+
835
+ <dl>
836
+ <dd>
837
+
838
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
839
+
840
+ </dd>
841
+ </dl>
842
+ </dd>
843
+ </dl>
844
+
845
+
846
+ </dd>
847
+ </dl>
848
+ </details>
849
+
850
+ <details><summary><code>client.environments.<a href="src/mirascope/environments/client.py">create</a>(...)</code></summary>
851
+ <dl>
852
+ <dd>
853
+
854
+ #### 🔌 Usage
855
+
856
+ <dl>
857
+ <dd>
858
+
859
+ <dl>
860
+ <dd>
861
+
862
+ ```python
863
+ from mirascope.api._generated import Mirascope
864
+
865
+ client = Mirascope()
866
+ client.environments.create(
867
+ organization_id="organizationId",
868
+ project_id="projectId",
869
+ name="name",
870
+ slug="slug",
871
+ )
872
+
873
+ ```
874
+ </dd>
875
+ </dl>
876
+ </dd>
877
+ </dl>
878
+
879
+ #### ⚙️ Parameters
880
+
881
+ <dl>
882
+ <dd>
883
+
884
+ <dl>
885
+ <dd>
886
+
887
+ **organization_id:** `str`
888
+
889
+ </dd>
890
+ </dl>
891
+
892
+ <dl>
893
+ <dd>
894
+
895
+ **project_id:** `str`
896
+
897
+ </dd>
898
+ </dl>
899
+
900
+ <dl>
901
+ <dd>
902
+
903
+ **name:** `str` — a string at most 100 character(s) long
904
+
905
+ </dd>
906
+ </dl>
907
+
908
+ <dl>
909
+ <dd>
910
+
911
+ **slug:** `str` — a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
912
+
913
+ </dd>
914
+ </dl>
915
+
916
+ <dl>
917
+ <dd>
918
+
919
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
920
+
921
+ </dd>
922
+ </dl>
923
+ </dd>
924
+ </dl>
925
+
926
+
927
+ </dd>
928
+ </dl>
929
+ </details>
930
+
931
+ <details><summary><code>client.environments.<a href="src/mirascope/environments/client.py">get</a>(...)</code></summary>
932
+ <dl>
933
+ <dd>
934
+
935
+ #### 🔌 Usage
936
+
937
+ <dl>
938
+ <dd>
939
+
940
+ <dl>
941
+ <dd>
942
+
943
+ ```python
944
+ from mirascope.api._generated import Mirascope
945
+
946
+ client = Mirascope()
947
+ client.environments.get(
948
+ organization_id="organizationId",
949
+ project_id="projectId",
950
+ environment_id="environmentId",
951
+ )
952
+
953
+ ```
954
+ </dd>
955
+ </dl>
956
+ </dd>
957
+ </dl>
958
+
959
+ #### ⚙️ Parameters
960
+
961
+ <dl>
962
+ <dd>
963
+
964
+ <dl>
965
+ <dd>
966
+
967
+ **organization_id:** `str`
968
+
969
+ </dd>
970
+ </dl>
971
+
972
+ <dl>
973
+ <dd>
974
+
975
+ **project_id:** `str`
976
+
977
+ </dd>
978
+ </dl>
979
+
980
+ <dl>
981
+ <dd>
982
+
983
+ **environment_id:** `str`
984
+
985
+ </dd>
986
+ </dl>
987
+
988
+ <dl>
989
+ <dd>
990
+
991
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
992
+
993
+ </dd>
994
+ </dl>
995
+ </dd>
996
+ </dl>
997
+
998
+
999
+ </dd>
1000
+ </dl>
1001
+ </details>
1002
+
1003
+ <details><summary><code>client.environments.<a href="src/mirascope/environments/client.py">update</a>(...)</code></summary>
1004
+ <dl>
1005
+ <dd>
1006
+
1007
+ #### 🔌 Usage
1008
+
1009
+ <dl>
1010
+ <dd>
1011
+
1012
+ <dl>
1013
+ <dd>
1014
+
1015
+ ```python
1016
+ from mirascope.api._generated import Mirascope
1017
+
1018
+ client = Mirascope()
1019
+ client.environments.update(
1020
+ organization_id="organizationId",
1021
+ project_id="projectId",
1022
+ environment_id="environmentId",
1023
+ )
1024
+
1025
+ ```
1026
+ </dd>
1027
+ </dl>
1028
+ </dd>
1029
+ </dl>
1030
+
1031
+ #### ⚙️ Parameters
1032
+
1033
+ <dl>
1034
+ <dd>
1035
+
1036
+ <dl>
1037
+ <dd>
1038
+
1039
+ **organization_id:** `str`
1040
+
1041
+ </dd>
1042
+ </dl>
1043
+
1044
+ <dl>
1045
+ <dd>
1046
+
1047
+ **project_id:** `str`
1048
+
1049
+ </dd>
1050
+ </dl>
1051
+
1052
+ <dl>
1053
+ <dd>
1054
+
1055
+ **environment_id:** `str`
1056
+
1057
+ </dd>
1058
+ </dl>
1059
+
1060
+ <dl>
1061
+ <dd>
1062
+
1063
+ **name:** `typing.Optional[str]` — a string at most 100 character(s) long
1064
+
1065
+ </dd>
1066
+ </dl>
1067
+
1068
+ <dl>
1069
+ <dd>
1070
+
1071
+ **slug:** `typing.Optional[str]` — a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
1072
+
1073
+ </dd>
1074
+ </dl>
1075
+
1076
+ <dl>
1077
+ <dd>
1078
+
1079
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1080
+
1081
+ </dd>
1082
+ </dl>
1083
+ </dd>
1084
+ </dl>
1085
+
1086
+
1087
+ </dd>
1088
+ </dl>
1089
+ </details>
1090
+
1091
+ <details><summary><code>client.environments.<a href="src/mirascope/environments/client.py">delete</a>(...)</code></summary>
1092
+ <dl>
1093
+ <dd>
1094
+
1095
+ #### 🔌 Usage
1096
+
1097
+ <dl>
1098
+ <dd>
1099
+
1100
+ <dl>
1101
+ <dd>
1102
+
1103
+ ```python
1104
+ from mirascope.api._generated import Mirascope
1105
+
1106
+ client = Mirascope()
1107
+ client.environments.delete(
1108
+ organization_id="organizationId",
1109
+ project_id="projectId",
1110
+ environment_id="environmentId",
1111
+ )
1112
+
1113
+ ```
1114
+ </dd>
1115
+ </dl>
1116
+ </dd>
1117
+ </dl>
1118
+
1119
+ #### ⚙️ Parameters
1120
+
1121
+ <dl>
1122
+ <dd>
1123
+
1124
+ <dl>
1125
+ <dd>
1126
+
1127
+ **organization_id:** `str`
1128
+
1129
+ </dd>
1130
+ </dl>
1131
+
1132
+ <dl>
1133
+ <dd>
1134
+
1135
+ **project_id:** `str`
1136
+
1137
+ </dd>
1138
+ </dl>
1139
+
1140
+ <dl>
1141
+ <dd>
1142
+
1143
+ **environment_id:** `str`
1144
+
1145
+ </dd>
1146
+ </dl>
1147
+
1148
+ <dl>
1149
+ <dd>
1150
+
1151
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1152
+
1153
+ </dd>
1154
+ </dl>
1155
+ </dd>
1156
+ </dl>
1157
+
1158
+
1159
+ </dd>
1160
+ </dl>
1161
+ </details>
1162
+
1163
+ ## apiKeys
1164
+ <details><summary><code>client.api_keys.<a href="src/mirascope/api_keys/client.py">api_keys_list</a>(...)</code></summary>
1165
+ <dl>
1166
+ <dd>
1167
+
1168
+ #### 🔌 Usage
1169
+
1170
+ <dl>
1171
+ <dd>
1172
+
1173
+ <dl>
1174
+ <dd>
1175
+
1176
+ ```python
1177
+ from mirascope.api._generated import Mirascope
1178
+
1179
+ client = Mirascope()
1180
+ client.api_keys.api_keys_list(
1181
+ organization_id="organizationId",
1182
+ project_id="projectId",
1183
+ environment_id="environmentId",
1184
+ )
1185
+
1186
+ ```
1187
+ </dd>
1188
+ </dl>
1189
+ </dd>
1190
+ </dl>
1191
+
1192
+ #### ⚙️ Parameters
1193
+
1194
+ <dl>
1195
+ <dd>
1196
+
1197
+ <dl>
1198
+ <dd>
1199
+
1200
+ **organization_id:** `str`
1201
+
1202
+ </dd>
1203
+ </dl>
1204
+
1205
+ <dl>
1206
+ <dd>
1207
+
1208
+ **project_id:** `str`
1209
+
1210
+ </dd>
1211
+ </dl>
1212
+
1213
+ <dl>
1214
+ <dd>
1215
+
1216
+ **environment_id:** `str`
1217
+
1218
+ </dd>
1219
+ </dl>
1220
+
1221
+ <dl>
1222
+ <dd>
1223
+
1224
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1225
+
1226
+ </dd>
1227
+ </dl>
1228
+ </dd>
1229
+ </dl>
1230
+
1231
+
1232
+ </dd>
1233
+ </dl>
1234
+ </details>
1235
+
1236
+ <details><summary><code>client.api_keys.<a href="src/mirascope/api_keys/client.py">api_keys_create</a>(...)</code></summary>
1237
+ <dl>
1238
+ <dd>
1239
+
1240
+ #### 🔌 Usage
1241
+
1242
+ <dl>
1243
+ <dd>
1244
+
1245
+ <dl>
1246
+ <dd>
1247
+
1248
+ ```python
1249
+ from mirascope.api._generated import Mirascope
1250
+
1251
+ client = Mirascope()
1252
+ client.api_keys.api_keys_create(
1253
+ organization_id="organizationId",
1254
+ project_id="projectId",
1255
+ environment_id="environmentId",
1256
+ name="name",
1257
+ )
1258
+
1259
+ ```
1260
+ </dd>
1261
+ </dl>
1262
+ </dd>
1263
+ </dl>
1264
+
1265
+ #### ⚙️ Parameters
1266
+
1267
+ <dl>
1268
+ <dd>
1269
+
1270
+ <dl>
1271
+ <dd>
1272
+
1273
+ **organization_id:** `str`
1274
+
1275
+ </dd>
1276
+ </dl>
1277
+
1278
+ <dl>
1279
+ <dd>
1280
+
1281
+ **project_id:** `str`
1282
+
1283
+ </dd>
1284
+ </dl>
1285
+
1286
+ <dl>
1287
+ <dd>
1288
+
1289
+ **environment_id:** `str`
1290
+
1291
+ </dd>
1292
+ </dl>
1293
+
1294
+ <dl>
1295
+ <dd>
1296
+
1297
+ **name:** `str` — a string at most 100 character(s) long
1298
+
1299
+ </dd>
1300
+ </dl>
1301
+
1302
+ <dl>
1303
+ <dd>
1304
+
1305
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1306
+
1307
+ </dd>
1308
+ </dl>
1309
+ </dd>
1310
+ </dl>
1311
+
1312
+
1313
+ </dd>
1314
+ </dl>
1315
+ </details>
1316
+
1317
+ <details><summary><code>client.api_keys.<a href="src/mirascope/api_keys/client.py">api_keys_get</a>(...)</code></summary>
1318
+ <dl>
1319
+ <dd>
1320
+
1321
+ #### 🔌 Usage
1322
+
1323
+ <dl>
1324
+ <dd>
1325
+
1326
+ <dl>
1327
+ <dd>
1328
+
1329
+ ```python
1330
+ from mirascope.api._generated import Mirascope
1331
+
1332
+ client = Mirascope()
1333
+ client.api_keys.api_keys_get(
1334
+ organization_id="organizationId",
1335
+ project_id="projectId",
1336
+ environment_id="environmentId",
1337
+ api_key_id="apiKeyId",
1338
+ )
1339
+
1340
+ ```
1341
+ </dd>
1342
+ </dl>
1343
+ </dd>
1344
+ </dl>
1345
+
1346
+ #### ⚙️ Parameters
1347
+
1348
+ <dl>
1349
+ <dd>
1350
+
1351
+ <dl>
1352
+ <dd>
1353
+
1354
+ **organization_id:** `str`
1355
+
1356
+ </dd>
1357
+ </dl>
1358
+
1359
+ <dl>
1360
+ <dd>
1361
+
1362
+ **project_id:** `str`
1363
+
1364
+ </dd>
1365
+ </dl>
1366
+
1367
+ <dl>
1368
+ <dd>
1369
+
1370
+ **environment_id:** `str`
1371
+
1372
+ </dd>
1373
+ </dl>
1374
+
1375
+ <dl>
1376
+ <dd>
1377
+
1378
+ **api_key_id:** `str`
1379
+
1380
+ </dd>
1381
+ </dl>
1382
+
1383
+ <dl>
1384
+ <dd>
1385
+
1386
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1387
+
1388
+ </dd>
1389
+ </dl>
1390
+ </dd>
1391
+ </dl>
1392
+
1393
+
1394
+ </dd>
1395
+ </dl>
1396
+ </details>
1397
+
1398
+ <details><summary><code>client.api_keys.<a href="src/mirascope/api_keys/client.py">api_keys_delete</a>(...)</code></summary>
1399
+ <dl>
1400
+ <dd>
1401
+
1402
+ #### 🔌 Usage
1403
+
1404
+ <dl>
1405
+ <dd>
1406
+
1407
+ <dl>
1408
+ <dd>
1409
+
1410
+ ```python
1411
+ from mirascope.api._generated import Mirascope
1412
+
1413
+ client = Mirascope()
1414
+ client.api_keys.api_keys_delete(
1415
+ organization_id="organizationId",
1416
+ project_id="projectId",
1417
+ environment_id="environmentId",
1418
+ api_key_id="apiKeyId",
1419
+ )
1420
+
1421
+ ```
1422
+ </dd>
1423
+ </dl>
1424
+ </dd>
1425
+ </dl>
1426
+
1427
+ #### ⚙️ Parameters
1428
+
1429
+ <dl>
1430
+ <dd>
1431
+
1432
+ <dl>
1433
+ <dd>
1434
+
1435
+ **organization_id:** `str`
1436
+
1437
+ </dd>
1438
+ </dl>
1439
+
1440
+ <dl>
1441
+ <dd>
1442
+
1443
+ **project_id:** `str`
1444
+
1445
+ </dd>
1446
+ </dl>
1447
+
1448
+ <dl>
1449
+ <dd>
1450
+
1451
+ **environment_id:** `str`
1452
+
1453
+ </dd>
1454
+ </dl>
1455
+
1456
+ <dl>
1457
+ <dd>
1458
+
1459
+ **api_key_id:** `str`
1460
+
1461
+ </dd>
1462
+ </dl>
1463
+
1464
+ <dl>
1465
+ <dd>
1466
+
1467
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1468
+
1469
+ </dd>
1470
+ </dl>
1471
+ </dd>
1472
+ </dl>
1473
+
1474
+
1475
+ </dd>
1476
+ </dl>
1477
+ </details>
1478
+