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.
- mirascope/api/_generated/__init__.py +17 -1
- mirascope/api/_generated/api_keys/__init__.py +7 -0
- mirascope/api/_generated/api_keys/client.py +453 -0
- mirascope/api/_generated/api_keys/raw_client.py +853 -0
- mirascope/api/_generated/api_keys/types/__init__.py +9 -0
- mirascope/api/_generated/api_keys/types/api_keys_create_response.py +36 -0
- mirascope/api/_generated/api_keys/types/api_keys_get_response.py +35 -0
- mirascope/api/_generated/api_keys/types/api_keys_list_response_item.py +35 -0
- mirascope/api/_generated/client.py +6 -0
- mirascope/api/_generated/environments/__init__.py +17 -0
- mirascope/api/_generated/environments/client.py +532 -0
- mirascope/api/_generated/environments/raw_client.py +1088 -0
- mirascope/api/_generated/environments/types/__init__.py +15 -0
- mirascope/api/_generated/environments/types/environments_create_response.py +26 -0
- mirascope/api/_generated/environments/types/environments_get_response.py +26 -0
- mirascope/api/_generated/environments/types/environments_list_response_item.py +26 -0
- mirascope/api/_generated/environments/types/environments_update_response.py +26 -0
- mirascope/api/_generated/organizations/client.py +36 -12
- mirascope/api/_generated/organizations/raw_client.py +32 -6
- mirascope/api/_generated/organizations/types/organizations_create_response.py +1 -0
- mirascope/api/_generated/organizations/types/organizations_get_response.py +1 -0
- mirascope/api/_generated/organizations/types/organizations_list_response_item.py +1 -0
- mirascope/api/_generated/organizations/types/organizations_update_response.py +1 -0
- mirascope/api/_generated/projects/client.py +34 -10
- mirascope/api/_generated/projects/raw_client.py +46 -4
- mirascope/api/_generated/projects/types/projects_create_response.py +1 -0
- mirascope/api/_generated/projects/types/projects_get_response.py +1 -0
- mirascope/api/_generated/projects/types/projects_list_response_item.py +1 -0
- mirascope/api/_generated/projects/types/projects_update_response.py +1 -0
- mirascope/api/_generated/reference.md +729 -4
- mirascope/llm/__init__.py +2 -2
- mirascope/llm/exceptions.py +28 -0
- mirascope/llm/providers/__init__.py +6 -4
- mirascope/llm/providers/anthropic/_utils/__init__.py +2 -0
- mirascope/llm/providers/anthropic/_utils/errors.py +46 -0
- mirascope/llm/providers/anthropic/beta_provider.py +6 -0
- mirascope/llm/providers/anthropic/provider.py +5 -0
- mirascope/llm/providers/base/__init__.py +2 -1
- mirascope/llm/providers/base/base_provider.py +173 -58
- mirascope/llm/providers/google/_utils/__init__.py +2 -0
- mirascope/llm/providers/google/_utils/errors.py +49 -0
- mirascope/llm/providers/google/provider.py +5 -4
- mirascope/llm/providers/mlx/_utils.py +8 -1
- mirascope/llm/providers/mlx/provider.py +8 -0
- mirascope/llm/providers/openai/__init__.py +10 -1
- mirascope/llm/providers/openai/_utils/__init__.py +5 -0
- mirascope/llm/providers/openai/_utils/errors.py +46 -0
- mirascope/llm/providers/openai/completions/base_provider.py +6 -6
- mirascope/llm/providers/openai/provider.py +14 -1
- mirascope/llm/providers/openai/responses/provider.py +13 -7
- mirascope/llm/providers/provider_registry.py +56 -3
- mirascope/ops/_internal/closure.py +62 -11
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/METADATA +1 -1
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/RECORD +56 -38
- mirascope/llm/providers/load_provider.py +0 -54
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/WHEEL +0 -0
- {mirascope-2.0.0a4.dist-info → mirascope-2.0.0a5.dist-info}/licenses/LICENSE +0 -0
|
@@ -128,6 +128,7 @@ class RawProjectsClient:
|
|
|
128
128
|
organization_id: str,
|
|
129
129
|
*,
|
|
130
130
|
name: str,
|
|
131
|
+
slug: str,
|
|
131
132
|
request_options: typing.Optional[RequestOptions] = None,
|
|
132
133
|
) -> HttpResponse[ProjectsCreateResponse]:
|
|
133
134
|
"""
|
|
@@ -138,6 +139,9 @@ class RawProjectsClient:
|
|
|
138
139
|
name : str
|
|
139
140
|
a string at most 100 character(s) long
|
|
140
141
|
|
|
142
|
+
slug : str
|
|
143
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
144
|
+
|
|
141
145
|
request_options : typing.Optional[RequestOptions]
|
|
142
146
|
Request-specific configuration.
|
|
143
147
|
|
|
@@ -151,6 +155,7 @@ class RawProjectsClient:
|
|
|
151
155
|
method="POST",
|
|
152
156
|
json={
|
|
153
157
|
"name": name,
|
|
158
|
+
"slug": slug,
|
|
154
159
|
},
|
|
155
160
|
headers={
|
|
156
161
|
"content-type": "application/json",
|
|
@@ -335,7 +340,8 @@ class RawProjectsClient:
|
|
|
335
340
|
organization_id: str,
|
|
336
341
|
project_id: str,
|
|
337
342
|
*,
|
|
338
|
-
name: str,
|
|
343
|
+
name: typing.Optional[str] = OMIT,
|
|
344
|
+
slug: typing.Optional[str] = OMIT,
|
|
339
345
|
request_options: typing.Optional[RequestOptions] = None,
|
|
340
346
|
) -> HttpResponse[ProjectsUpdateResponse]:
|
|
341
347
|
"""
|
|
@@ -345,9 +351,12 @@ class RawProjectsClient:
|
|
|
345
351
|
|
|
346
352
|
project_id : str
|
|
347
353
|
|
|
348
|
-
name : str
|
|
354
|
+
name : typing.Optional[str]
|
|
349
355
|
a string at most 100 character(s) long
|
|
350
356
|
|
|
357
|
+
slug : typing.Optional[str]
|
|
358
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
359
|
+
|
|
351
360
|
request_options : typing.Optional[RequestOptions]
|
|
352
361
|
Request-specific configuration.
|
|
353
362
|
|
|
@@ -361,6 +370,7 @@ class RawProjectsClient:
|
|
|
361
370
|
method="PUT",
|
|
362
371
|
json={
|
|
363
372
|
"name": name,
|
|
373
|
+
"slug": slug,
|
|
364
374
|
},
|
|
365
375
|
headers={
|
|
366
376
|
"content-type": "application/json",
|
|
@@ -411,6 +421,17 @@ class RawProjectsClient:
|
|
|
411
421
|
),
|
|
412
422
|
),
|
|
413
423
|
)
|
|
424
|
+
if _response.status_code == 409:
|
|
425
|
+
raise ConflictError(
|
|
426
|
+
headers=dict(_response.headers),
|
|
427
|
+
body=typing.cast(
|
|
428
|
+
AlreadyExistsError,
|
|
429
|
+
parse_obj_as(
|
|
430
|
+
type_=AlreadyExistsError, # type: ignore
|
|
431
|
+
object_=_response.json(),
|
|
432
|
+
),
|
|
433
|
+
),
|
|
434
|
+
)
|
|
414
435
|
if _response.status_code == 500:
|
|
415
436
|
raise InternalServerError(
|
|
416
437
|
headers=dict(_response.headers),
|
|
@@ -622,6 +643,7 @@ class AsyncRawProjectsClient:
|
|
|
622
643
|
organization_id: str,
|
|
623
644
|
*,
|
|
624
645
|
name: str,
|
|
646
|
+
slug: str,
|
|
625
647
|
request_options: typing.Optional[RequestOptions] = None,
|
|
626
648
|
) -> AsyncHttpResponse[ProjectsCreateResponse]:
|
|
627
649
|
"""
|
|
@@ -632,6 +654,9 @@ class AsyncRawProjectsClient:
|
|
|
632
654
|
name : str
|
|
633
655
|
a string at most 100 character(s) long
|
|
634
656
|
|
|
657
|
+
slug : str
|
|
658
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
659
|
+
|
|
635
660
|
request_options : typing.Optional[RequestOptions]
|
|
636
661
|
Request-specific configuration.
|
|
637
662
|
|
|
@@ -645,6 +670,7 @@ class AsyncRawProjectsClient:
|
|
|
645
670
|
method="POST",
|
|
646
671
|
json={
|
|
647
672
|
"name": name,
|
|
673
|
+
"slug": slug,
|
|
648
674
|
},
|
|
649
675
|
headers={
|
|
650
676
|
"content-type": "application/json",
|
|
@@ -829,7 +855,8 @@ class AsyncRawProjectsClient:
|
|
|
829
855
|
organization_id: str,
|
|
830
856
|
project_id: str,
|
|
831
857
|
*,
|
|
832
|
-
name: str,
|
|
858
|
+
name: typing.Optional[str] = OMIT,
|
|
859
|
+
slug: typing.Optional[str] = OMIT,
|
|
833
860
|
request_options: typing.Optional[RequestOptions] = None,
|
|
834
861
|
) -> AsyncHttpResponse[ProjectsUpdateResponse]:
|
|
835
862
|
"""
|
|
@@ -839,9 +866,12 @@ class AsyncRawProjectsClient:
|
|
|
839
866
|
|
|
840
867
|
project_id : str
|
|
841
868
|
|
|
842
|
-
name : str
|
|
869
|
+
name : typing.Optional[str]
|
|
843
870
|
a string at most 100 character(s) long
|
|
844
871
|
|
|
872
|
+
slug : typing.Optional[str]
|
|
873
|
+
a string matching the pattern ^[a-z0-9][a-z0-9_-]*[a-z0-9]$
|
|
874
|
+
|
|
845
875
|
request_options : typing.Optional[RequestOptions]
|
|
846
876
|
Request-specific configuration.
|
|
847
877
|
|
|
@@ -855,6 +885,7 @@ class AsyncRawProjectsClient:
|
|
|
855
885
|
method="PUT",
|
|
856
886
|
json={
|
|
857
887
|
"name": name,
|
|
888
|
+
"slug": slug,
|
|
858
889
|
},
|
|
859
890
|
headers={
|
|
860
891
|
"content-type": "application/json",
|
|
@@ -905,6 +936,17 @@ class AsyncRawProjectsClient:
|
|
|
905
936
|
),
|
|
906
937
|
),
|
|
907
938
|
)
|
|
939
|
+
if _response.status_code == 409:
|
|
940
|
+
raise ConflictError(
|
|
941
|
+
headers=dict(_response.headers),
|
|
942
|
+
body=typing.cast(
|
|
943
|
+
AlreadyExistsError,
|
|
944
|
+
parse_obj_as(
|
|
945
|
+
type_=AlreadyExistsError, # type: ignore
|
|
946
|
+
object_=_response.json(),
|
|
947
|
+
),
|
|
948
|
+
),
|
|
949
|
+
)
|
|
908
950
|
if _response.status_code == 500:
|
|
909
951
|
raise InternalServerError(
|
|
910
952
|
headers=dict(_response.headers),
|