mirascope 2.0.0a6__py3-none-any.whl → 2.0.2__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/_utils.py +34 -0
- mirascope/api/_generated/__init__.py +186 -5
- mirascope/api/_generated/annotations/client.py +38 -6
- mirascope/api/_generated/annotations/raw_client.py +366 -47
- mirascope/api/_generated/annotations/types/annotations_create_response.py +19 -6
- mirascope/api/_generated/annotations/types/annotations_get_response.py +19 -6
- mirascope/api/_generated/annotations/types/annotations_list_response_annotations_item.py +22 -7
- mirascope/api/_generated/annotations/types/annotations_update_response.py +19 -6
- mirascope/api/_generated/api_keys/__init__.py +12 -2
- mirascope/api/_generated/api_keys/client.py +107 -6
- mirascope/api/_generated/api_keys/raw_client.py +486 -38
- mirascope/api/_generated/api_keys/types/__init__.py +7 -1
- mirascope/api/_generated/api_keys/types/api_keys_list_all_for_org_response_item.py +40 -0
- mirascope/api/_generated/client.py +36 -0
- mirascope/api/_generated/docs/raw_client.py +71 -9
- mirascope/api/_generated/environment.py +3 -3
- mirascope/api/_generated/environments/__init__.py +6 -0
- mirascope/api/_generated/environments/client.py +158 -9
- mirascope/api/_generated/environments/raw_client.py +620 -52
- mirascope/api/_generated/environments/types/__init__.py +10 -0
- mirascope/api/_generated/environments/types/environments_get_analytics_response.py +60 -0
- mirascope/api/_generated/environments/types/environments_get_analytics_response_top_functions_item.py +24 -0
- mirascope/api/_generated/{organizations/types/organizations_credits_response.py → environments/types/environments_get_analytics_response_top_models_item.py} +6 -3
- mirascope/api/_generated/errors/__init__.py +6 -0
- mirascope/api/_generated/errors/bad_request_error.py +5 -2
- mirascope/api/_generated/errors/conflict_error.py +5 -2
- mirascope/api/_generated/errors/payment_required_error.py +15 -0
- mirascope/api/_generated/errors/service_unavailable_error.py +14 -0
- mirascope/api/_generated/errors/too_many_requests_error.py +15 -0
- mirascope/api/_generated/functions/__init__.py +10 -0
- mirascope/api/_generated/functions/client.py +222 -8
- mirascope/api/_generated/functions/raw_client.py +975 -134
- mirascope/api/_generated/functions/types/__init__.py +28 -4
- mirascope/api/_generated/functions/types/functions_get_by_env_response.py +53 -0
- mirascope/api/_generated/functions/types/functions_get_by_env_response_dependencies_value.py +22 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response.py +25 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response_functions_item.py +56 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response_functions_item_dependencies_value.py +22 -0
- mirascope/api/_generated/health/raw_client.py +74 -10
- mirascope/api/_generated/organization_invitations/__init__.py +33 -0
- mirascope/api/_generated/organization_invitations/client.py +546 -0
- mirascope/api/_generated/organization_invitations/raw_client.py +1519 -0
- mirascope/api/_generated/organization_invitations/types/__init__.py +53 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_accept_response.py +34 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_accept_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_request_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response_status.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response_status.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item_status.py +7 -0
- mirascope/api/_generated/organization_memberships/__init__.py +19 -0
- mirascope/api/_generated/organization_memberships/client.py +302 -0
- mirascope/api/_generated/organization_memberships/raw_client.py +736 -0
- mirascope/api/_generated/organization_memberships/types/__init__.py +27 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_list_response_item.py +33 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_list_response_item_role.py +7 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_request_role.py +7 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_response.py +31 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_response_role.py +7 -0
- mirascope/api/_generated/organizations/__init__.py +26 -2
- mirascope/api/_generated/organizations/client.py +442 -20
- mirascope/api/_generated/organizations/raw_client.py +1763 -164
- mirascope/api/_generated/organizations/types/__init__.py +48 -2
- mirascope/api/_generated/organizations/types/organizations_create_payment_intent_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_request_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response.py +47 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response_validation_errors_item.py +33 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response_validation_errors_item_resource.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_router_balance_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response.py +53 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_current_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_payment_method.py +26 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_scheduled_change.py +34 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_scheduled_change_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_subscription_request_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_subscription_response.py +35 -0
- mirascope/api/_generated/project_memberships/__init__.py +25 -0
- mirascope/api/_generated/project_memberships/client.py +437 -0
- mirascope/api/_generated/project_memberships/raw_client.py +1039 -0
- mirascope/api/_generated/project_memberships/types/__init__.py +29 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_request_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_response.py +35 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_response_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_list_response_item.py +33 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_list_response_item_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_request_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_response.py +35 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_response_role.py +7 -0
- mirascope/api/_generated/projects/raw_client.py +415 -58
- mirascope/api/_generated/reference.md +2767 -397
- mirascope/api/_generated/tags/__init__.py +19 -0
- mirascope/api/_generated/tags/client.py +504 -0
- mirascope/api/_generated/tags/raw_client.py +1288 -0
- mirascope/api/_generated/tags/types/__init__.py +17 -0
- mirascope/api/_generated/tags/types/tags_create_response.py +41 -0
- mirascope/api/_generated/tags/types/tags_get_response.py +41 -0
- mirascope/api/_generated/tags/types/tags_list_response.py +23 -0
- mirascope/api/_generated/tags/types/tags_list_response_tags_item.py +41 -0
- mirascope/api/_generated/tags/types/tags_update_response.py +41 -0
- mirascope/api/_generated/token_cost/__init__.py +7 -0
- mirascope/api/_generated/token_cost/client.py +160 -0
- mirascope/api/_generated/token_cost/raw_client.py +264 -0
- mirascope/api/_generated/token_cost/types/__init__.py +8 -0
- mirascope/api/_generated/token_cost/types/token_cost_calculate_request_usage.py +54 -0
- mirascope/api/_generated/token_cost/types/token_cost_calculate_response.py +52 -0
- mirascope/api/_generated/traces/__init__.py +20 -0
- mirascope/api/_generated/traces/client.py +543 -0
- mirascope/api/_generated/traces/raw_client.py +1366 -96
- mirascope/api/_generated/traces/types/__init__.py +28 -0
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response.py +6 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_by_env_response.py +33 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_by_env_response_spans_item.py +88 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_response_spans_item.py +0 -2
- mirascope/api/_generated/traces/types/traces_list_by_function_hash_response.py +25 -0
- mirascope/api/_generated/traces/types/traces_list_by_function_hash_response_traces_item.py +44 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_attribute_filters_item.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_attribute_filters_item_operator.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_sort_by.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_sort_order.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_response.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_response_spans_item.py +50 -0
- mirascope/api/_generated/traces/types/traces_search_response_spans_item.py +10 -1
- mirascope/api/_generated/types/__init__.py +32 -2
- mirascope/api/_generated/types/bad_request_error_body.py +50 -0
- mirascope/api/_generated/types/date.py +3 -0
- mirascope/api/_generated/types/immutable_resource_error.py +22 -0
- mirascope/api/_generated/types/internal_server_error_body.py +3 -3
- mirascope/api/_generated/types/plan_limit_exceeded_error.py +32 -0
- mirascope/api/_generated/types/plan_limit_exceeded_error_tag.py +7 -0
- mirascope/api/_generated/types/pricing_unavailable_error.py +23 -0
- mirascope/api/_generated/types/rate_limit_error.py +31 -0
- mirascope/api/_generated/types/rate_limit_error_tag.py +5 -0
- mirascope/api/_generated/types/service_unavailable_error_body.py +24 -0
- mirascope/api/_generated/types/service_unavailable_error_tag.py +7 -0
- mirascope/api/_generated/types/subscription_past_due_error.py +31 -0
- mirascope/api/_generated/types/subscription_past_due_error_tag.py +7 -0
- mirascope/api/settings.py +19 -1
- mirascope/llm/__init__.py +53 -10
- mirascope/llm/calls/__init__.py +2 -1
- mirascope/llm/calls/calls.py +29 -20
- mirascope/llm/calls/decorator.py +21 -7
- mirascope/llm/content/tool_output.py +22 -5
- mirascope/llm/exceptions.py +284 -71
- mirascope/llm/formatting/__init__.py +17 -0
- mirascope/llm/formatting/format.py +112 -35
- mirascope/llm/formatting/output_parser.py +178 -0
- mirascope/llm/formatting/partial.py +80 -7
- mirascope/llm/formatting/primitives.py +192 -0
- mirascope/llm/formatting/types.py +20 -8
- mirascope/llm/messages/__init__.py +3 -0
- mirascope/llm/messages/_utils.py +34 -0
- mirascope/llm/models/__init__.py +5 -0
- mirascope/llm/models/models.py +137 -69
- mirascope/llm/{providers/base → models}/params.py +7 -57
- mirascope/llm/models/thinking_config.py +61 -0
- mirascope/llm/prompts/_utils.py +0 -32
- mirascope/llm/prompts/decorator.py +16 -5
- mirascope/llm/prompts/prompts.py +160 -92
- mirascope/llm/providers/__init__.py +1 -4
- mirascope/llm/providers/anthropic/_utils/__init__.py +2 -0
- mirascope/llm/providers/anthropic/_utils/beta_decode.py +18 -9
- mirascope/llm/providers/anthropic/_utils/beta_encode.py +62 -13
- mirascope/llm/providers/anthropic/_utils/decode.py +18 -9
- mirascope/llm/providers/anthropic/_utils/encode.py +26 -7
- mirascope/llm/providers/anthropic/_utils/errors.py +2 -2
- mirascope/llm/providers/anthropic/beta_provider.py +64 -18
- mirascope/llm/providers/anthropic/provider.py +91 -33
- mirascope/llm/providers/base/__init__.py +0 -4
- mirascope/llm/providers/base/_utils.py +55 -6
- mirascope/llm/providers/base/base_provider.py +116 -37
- mirascope/llm/providers/google/_utils/__init__.py +2 -0
- mirascope/llm/providers/google/_utils/decode.py +20 -7
- mirascope/llm/providers/google/_utils/encode.py +26 -7
- mirascope/llm/providers/google/_utils/errors.py +3 -2
- mirascope/llm/providers/google/provider.py +64 -18
- mirascope/llm/providers/mirascope/_utils.py +13 -17
- mirascope/llm/providers/mirascope/provider.py +49 -18
- mirascope/llm/providers/mlx/_utils.py +7 -2
- mirascope/llm/providers/mlx/encoding/base.py +5 -2
- mirascope/llm/providers/mlx/encoding/transformers.py +5 -2
- mirascope/llm/providers/mlx/mlx.py +23 -6
- mirascope/llm/providers/mlx/provider.py +42 -13
- mirascope/llm/providers/openai/_utils/errors.py +2 -2
- mirascope/llm/providers/openai/completions/_utils/encode.py +20 -16
- mirascope/llm/providers/openai/completions/base_provider.py +40 -11
- mirascope/llm/providers/openai/provider.py +40 -10
- mirascope/llm/providers/openai/responses/_utils/__init__.py +2 -0
- mirascope/llm/providers/openai/responses/_utils/decode.py +19 -6
- mirascope/llm/providers/openai/responses/_utils/encode.py +22 -10
- mirascope/llm/providers/openai/responses/provider.py +56 -18
- mirascope/llm/providers/provider_registry.py +93 -19
- mirascope/llm/responses/__init__.py +6 -1
- mirascope/llm/responses/_utils.py +102 -12
- mirascope/llm/responses/base_response.py +5 -2
- mirascope/llm/responses/base_stream_response.py +115 -25
- mirascope/llm/responses/response.py +2 -1
- mirascope/llm/responses/root_response.py +89 -17
- mirascope/llm/responses/stream_response.py +6 -9
- mirascope/llm/tools/decorator.py +9 -4
- mirascope/llm/tools/tool_schema.py +17 -6
- mirascope/llm/tools/toolkit.py +35 -27
- mirascope/llm/tools/tools.py +45 -20
- mirascope/ops/__init__.py +4 -0
- mirascope/ops/_internal/closure.py +4 -1
- mirascope/ops/_internal/configuration.py +82 -31
- mirascope/ops/_internal/exporters/exporters.py +55 -35
- mirascope/ops/_internal/exporters/utils.py +37 -0
- mirascope/ops/_internal/instrumentation/llm/common.py +530 -0
- mirascope/ops/_internal/instrumentation/llm/cost.py +190 -0
- mirascope/ops/_internal/instrumentation/llm/encode.py +1 -1
- mirascope/ops/_internal/instrumentation/llm/llm.py +116 -1242
- mirascope/ops/_internal/instrumentation/llm/model.py +1798 -0
- mirascope/ops/_internal/instrumentation/llm/response.py +521 -0
- mirascope/ops/_internal/instrumentation/llm/serialize.py +300 -0
- mirascope/ops/_internal/protocols.py +83 -1
- mirascope/ops/_internal/traced_calls.py +18 -0
- mirascope/ops/_internal/traced_functions.py +125 -10
- mirascope/ops/_internal/tracing.py +78 -1
- mirascope/ops/_internal/utils.py +60 -4
- mirascope/ops/_internal/versioned_functions.py +1 -1
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.2.dist-info}/METADATA +12 -11
- mirascope-2.0.2.dist-info/RECORD +424 -0
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.2.dist-info}/licenses/LICENSE +1 -1
- mirascope-2.0.0a6.dist-info/RECORD +0 -316
- {mirascope-2.0.0a6.dist-info → mirascope-2.0.2.dist-info}/WHEEL +0 -0
|
@@ -4,6 +4,7 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.number_from_string import NumberFromString
|
|
7
8
|
from .raw_client import AsyncRawTracesClient, RawTracesClient
|
|
8
9
|
from .types.traces_create_request_resource_spans_item import (
|
|
9
10
|
TracesCreateRequestResourceSpansItem,
|
|
@@ -12,7 +13,21 @@ from .types.traces_create_response import TracesCreateResponse
|
|
|
12
13
|
from .types.traces_get_analytics_summary_response import (
|
|
13
14
|
TracesGetAnalyticsSummaryResponse,
|
|
14
15
|
)
|
|
16
|
+
from .types.traces_get_trace_detail_by_env_response import (
|
|
17
|
+
TracesGetTraceDetailByEnvResponse,
|
|
18
|
+
)
|
|
15
19
|
from .types.traces_get_trace_detail_response import TracesGetTraceDetailResponse
|
|
20
|
+
from .types.traces_list_by_function_hash_response import (
|
|
21
|
+
TracesListByFunctionHashResponse,
|
|
22
|
+
)
|
|
23
|
+
from .types.traces_search_by_env_request_attribute_filters_item import (
|
|
24
|
+
TracesSearchByEnvRequestAttributeFiltersItem,
|
|
25
|
+
)
|
|
26
|
+
from .types.traces_search_by_env_request_sort_by import TracesSearchByEnvRequestSortBy
|
|
27
|
+
from .types.traces_search_by_env_request_sort_order import (
|
|
28
|
+
TracesSearchByEnvRequestSortOrder,
|
|
29
|
+
)
|
|
30
|
+
from .types.traces_search_by_env_response import TracesSearchByEnvResponse
|
|
16
31
|
from .types.traces_search_request_attribute_filters_item import (
|
|
17
32
|
TracesSearchRequestAttributeFiltersItem,
|
|
18
33
|
)
|
|
@@ -99,12 +114,16 @@ class TracesClient:
|
|
|
99
114
|
start_time: str,
|
|
100
115
|
end_time: str,
|
|
101
116
|
query: typing.Optional[str] = OMIT,
|
|
117
|
+
input_messages_query: typing.Optional[str] = OMIT,
|
|
118
|
+
output_messages_query: typing.Optional[str] = OMIT,
|
|
119
|
+
fuzzy_search: typing.Optional[bool] = OMIT,
|
|
102
120
|
trace_id: typing.Optional[str] = OMIT,
|
|
103
121
|
span_id: typing.Optional[str] = OMIT,
|
|
104
122
|
model: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
105
123
|
provider: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
106
124
|
function_id: typing.Optional[str] = OMIT,
|
|
107
125
|
function_name: typing.Optional[str] = OMIT,
|
|
126
|
+
span_name_prefix: typing.Optional[str] = OMIT,
|
|
108
127
|
has_error: typing.Optional[bool] = OMIT,
|
|
109
128
|
min_tokens: typing.Optional[float] = OMIT,
|
|
110
129
|
max_tokens: typing.Optional[float] = OMIT,
|
|
@@ -117,6 +136,7 @@ class TracesClient:
|
|
|
117
136
|
offset: typing.Optional[float] = OMIT,
|
|
118
137
|
sort_by: typing.Optional[TracesSearchRequestSortBy] = OMIT,
|
|
119
138
|
sort_order: typing.Optional[TracesSearchRequestSortOrder] = OMIT,
|
|
139
|
+
root_spans_only: typing.Optional[bool] = OMIT,
|
|
120
140
|
request_options: typing.Optional[RequestOptions] = None,
|
|
121
141
|
) -> TracesSearchResponse:
|
|
122
142
|
"""
|
|
@@ -128,6 +148,12 @@ class TracesClient:
|
|
|
128
148
|
|
|
129
149
|
query : typing.Optional[str]
|
|
130
150
|
|
|
151
|
+
input_messages_query : typing.Optional[str]
|
|
152
|
+
|
|
153
|
+
output_messages_query : typing.Optional[str]
|
|
154
|
+
|
|
155
|
+
fuzzy_search : typing.Optional[bool]
|
|
156
|
+
|
|
131
157
|
trace_id : typing.Optional[str]
|
|
132
158
|
|
|
133
159
|
span_id : typing.Optional[str]
|
|
@@ -140,6 +166,8 @@ class TracesClient:
|
|
|
140
166
|
|
|
141
167
|
function_name : typing.Optional[str]
|
|
142
168
|
|
|
169
|
+
span_name_prefix : typing.Optional[str]
|
|
170
|
+
|
|
143
171
|
has_error : typing.Optional[bool]
|
|
144
172
|
|
|
145
173
|
min_tokens : typing.Optional[float]
|
|
@@ -160,6 +188,8 @@ class TracesClient:
|
|
|
160
188
|
|
|
161
189
|
sort_order : typing.Optional[TracesSearchRequestSortOrder]
|
|
162
190
|
|
|
191
|
+
root_spans_only : typing.Optional[bool]
|
|
192
|
+
|
|
163
193
|
request_options : typing.Optional[RequestOptions]
|
|
164
194
|
Request-specific configuration.
|
|
165
195
|
|
|
@@ -182,12 +212,16 @@ class TracesClient:
|
|
|
182
212
|
start_time=start_time,
|
|
183
213
|
end_time=end_time,
|
|
184
214
|
query=query,
|
|
215
|
+
input_messages_query=input_messages_query,
|
|
216
|
+
output_messages_query=output_messages_query,
|
|
217
|
+
fuzzy_search=fuzzy_search,
|
|
185
218
|
trace_id=trace_id,
|
|
186
219
|
span_id=span_id,
|
|
187
220
|
model=model,
|
|
188
221
|
provider=provider,
|
|
189
222
|
function_id=function_id,
|
|
190
223
|
function_name=function_name,
|
|
224
|
+
span_name_prefix=span_name_prefix,
|
|
191
225
|
has_error=has_error,
|
|
192
226
|
min_tokens=min_tokens,
|
|
193
227
|
max_tokens=max_tokens,
|
|
@@ -198,6 +232,7 @@ class TracesClient:
|
|
|
198
232
|
offset=offset,
|
|
199
233
|
sort_by=sort_by,
|
|
200
234
|
sort_order=sort_order,
|
|
235
|
+
root_spans_only=root_spans_only,
|
|
201
236
|
request_options=request_options,
|
|
202
237
|
)
|
|
203
238
|
return _response.data
|
|
@@ -275,6 +310,238 @@ class TracesClient:
|
|
|
275
310
|
)
|
|
276
311
|
return _response.data
|
|
277
312
|
|
|
313
|
+
def listbyfunctionhash(
|
|
314
|
+
self,
|
|
315
|
+
hash: str,
|
|
316
|
+
*,
|
|
317
|
+
limit: typing.Optional[NumberFromString] = None,
|
|
318
|
+
offset: typing.Optional[NumberFromString] = None,
|
|
319
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
320
|
+
) -> TracesListByFunctionHashResponse:
|
|
321
|
+
"""
|
|
322
|
+
Parameters
|
|
323
|
+
----------
|
|
324
|
+
hash : str
|
|
325
|
+
|
|
326
|
+
limit : typing.Optional[NumberFromString]
|
|
327
|
+
|
|
328
|
+
offset : typing.Optional[NumberFromString]
|
|
329
|
+
|
|
330
|
+
request_options : typing.Optional[RequestOptions]
|
|
331
|
+
Request-specific configuration.
|
|
332
|
+
|
|
333
|
+
Returns
|
|
334
|
+
-------
|
|
335
|
+
TracesListByFunctionHashResponse
|
|
336
|
+
Success
|
|
337
|
+
|
|
338
|
+
Examples
|
|
339
|
+
--------
|
|
340
|
+
from mirascope.api._generated import Mirascope
|
|
341
|
+
|
|
342
|
+
client = Mirascope()
|
|
343
|
+
client.traces.listbyfunctionhash(
|
|
344
|
+
hash="hash",
|
|
345
|
+
)
|
|
346
|
+
"""
|
|
347
|
+
_response = self._raw_client.listbyfunctionhash(
|
|
348
|
+
hash, limit=limit, offset=offset, request_options=request_options
|
|
349
|
+
)
|
|
350
|
+
return _response.data
|
|
351
|
+
|
|
352
|
+
def searchbyenv(
|
|
353
|
+
self,
|
|
354
|
+
organization_id: str,
|
|
355
|
+
project_id: str,
|
|
356
|
+
environment_id: str,
|
|
357
|
+
*,
|
|
358
|
+
start_time: str,
|
|
359
|
+
end_time: str,
|
|
360
|
+
query: typing.Optional[str] = OMIT,
|
|
361
|
+
input_messages_query: typing.Optional[str] = OMIT,
|
|
362
|
+
output_messages_query: typing.Optional[str] = OMIT,
|
|
363
|
+
fuzzy_search: typing.Optional[bool] = OMIT,
|
|
364
|
+
trace_id: typing.Optional[str] = OMIT,
|
|
365
|
+
span_id: typing.Optional[str] = OMIT,
|
|
366
|
+
model: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
367
|
+
provider: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
368
|
+
function_id: typing.Optional[str] = OMIT,
|
|
369
|
+
function_name: typing.Optional[str] = OMIT,
|
|
370
|
+
span_name_prefix: typing.Optional[str] = OMIT,
|
|
371
|
+
has_error: typing.Optional[bool] = OMIT,
|
|
372
|
+
min_tokens: typing.Optional[float] = OMIT,
|
|
373
|
+
max_tokens: typing.Optional[float] = OMIT,
|
|
374
|
+
min_duration: typing.Optional[float] = OMIT,
|
|
375
|
+
max_duration: typing.Optional[float] = OMIT,
|
|
376
|
+
attribute_filters: typing.Optional[
|
|
377
|
+
typing.Sequence[TracesSearchByEnvRequestAttributeFiltersItem]
|
|
378
|
+
] = OMIT,
|
|
379
|
+
limit: typing.Optional[float] = OMIT,
|
|
380
|
+
offset: typing.Optional[float] = OMIT,
|
|
381
|
+
sort_by: typing.Optional[TracesSearchByEnvRequestSortBy] = OMIT,
|
|
382
|
+
sort_order: typing.Optional[TracesSearchByEnvRequestSortOrder] = OMIT,
|
|
383
|
+
root_spans_only: typing.Optional[bool] = OMIT,
|
|
384
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
385
|
+
) -> TracesSearchByEnvResponse:
|
|
386
|
+
"""
|
|
387
|
+
Parameters
|
|
388
|
+
----------
|
|
389
|
+
organization_id : str
|
|
390
|
+
|
|
391
|
+
project_id : str
|
|
392
|
+
|
|
393
|
+
environment_id : str
|
|
394
|
+
|
|
395
|
+
start_time : str
|
|
396
|
+
|
|
397
|
+
end_time : str
|
|
398
|
+
|
|
399
|
+
query : typing.Optional[str]
|
|
400
|
+
|
|
401
|
+
input_messages_query : typing.Optional[str]
|
|
402
|
+
|
|
403
|
+
output_messages_query : typing.Optional[str]
|
|
404
|
+
|
|
405
|
+
fuzzy_search : typing.Optional[bool]
|
|
406
|
+
|
|
407
|
+
trace_id : typing.Optional[str]
|
|
408
|
+
|
|
409
|
+
span_id : typing.Optional[str]
|
|
410
|
+
|
|
411
|
+
model : typing.Optional[typing.Sequence[str]]
|
|
412
|
+
|
|
413
|
+
provider : typing.Optional[typing.Sequence[str]]
|
|
414
|
+
|
|
415
|
+
function_id : typing.Optional[str]
|
|
416
|
+
|
|
417
|
+
function_name : typing.Optional[str]
|
|
418
|
+
|
|
419
|
+
span_name_prefix : typing.Optional[str]
|
|
420
|
+
|
|
421
|
+
has_error : typing.Optional[bool]
|
|
422
|
+
|
|
423
|
+
min_tokens : typing.Optional[float]
|
|
424
|
+
|
|
425
|
+
max_tokens : typing.Optional[float]
|
|
426
|
+
|
|
427
|
+
min_duration : typing.Optional[float]
|
|
428
|
+
|
|
429
|
+
max_duration : typing.Optional[float]
|
|
430
|
+
|
|
431
|
+
attribute_filters : typing.Optional[typing.Sequence[TracesSearchByEnvRequestAttributeFiltersItem]]
|
|
432
|
+
|
|
433
|
+
limit : typing.Optional[float]
|
|
434
|
+
|
|
435
|
+
offset : typing.Optional[float]
|
|
436
|
+
|
|
437
|
+
sort_by : typing.Optional[TracesSearchByEnvRequestSortBy]
|
|
438
|
+
|
|
439
|
+
sort_order : typing.Optional[TracesSearchByEnvRequestSortOrder]
|
|
440
|
+
|
|
441
|
+
root_spans_only : typing.Optional[bool]
|
|
442
|
+
|
|
443
|
+
request_options : typing.Optional[RequestOptions]
|
|
444
|
+
Request-specific configuration.
|
|
445
|
+
|
|
446
|
+
Returns
|
|
447
|
+
-------
|
|
448
|
+
TracesSearchByEnvResponse
|
|
449
|
+
Success
|
|
450
|
+
|
|
451
|
+
Examples
|
|
452
|
+
--------
|
|
453
|
+
from mirascope.api._generated import Mirascope
|
|
454
|
+
|
|
455
|
+
client = Mirascope()
|
|
456
|
+
client.traces.searchbyenv(
|
|
457
|
+
organization_id="organizationId",
|
|
458
|
+
project_id="projectId",
|
|
459
|
+
environment_id="environmentId",
|
|
460
|
+
start_time="startTime",
|
|
461
|
+
end_time="endTime",
|
|
462
|
+
)
|
|
463
|
+
"""
|
|
464
|
+
_response = self._raw_client.searchbyenv(
|
|
465
|
+
organization_id,
|
|
466
|
+
project_id,
|
|
467
|
+
environment_id,
|
|
468
|
+
start_time=start_time,
|
|
469
|
+
end_time=end_time,
|
|
470
|
+
query=query,
|
|
471
|
+
input_messages_query=input_messages_query,
|
|
472
|
+
output_messages_query=output_messages_query,
|
|
473
|
+
fuzzy_search=fuzzy_search,
|
|
474
|
+
trace_id=trace_id,
|
|
475
|
+
span_id=span_id,
|
|
476
|
+
model=model,
|
|
477
|
+
provider=provider,
|
|
478
|
+
function_id=function_id,
|
|
479
|
+
function_name=function_name,
|
|
480
|
+
span_name_prefix=span_name_prefix,
|
|
481
|
+
has_error=has_error,
|
|
482
|
+
min_tokens=min_tokens,
|
|
483
|
+
max_tokens=max_tokens,
|
|
484
|
+
min_duration=min_duration,
|
|
485
|
+
max_duration=max_duration,
|
|
486
|
+
attribute_filters=attribute_filters,
|
|
487
|
+
limit=limit,
|
|
488
|
+
offset=offset,
|
|
489
|
+
sort_by=sort_by,
|
|
490
|
+
sort_order=sort_order,
|
|
491
|
+
root_spans_only=root_spans_only,
|
|
492
|
+
request_options=request_options,
|
|
493
|
+
)
|
|
494
|
+
return _response.data
|
|
495
|
+
|
|
496
|
+
def gettracedetailbyenv(
|
|
497
|
+
self,
|
|
498
|
+
organization_id: str,
|
|
499
|
+
project_id: str,
|
|
500
|
+
environment_id: str,
|
|
501
|
+
trace_id: str,
|
|
502
|
+
*,
|
|
503
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
504
|
+
) -> TracesGetTraceDetailByEnvResponse:
|
|
505
|
+
"""
|
|
506
|
+
Parameters
|
|
507
|
+
----------
|
|
508
|
+
organization_id : str
|
|
509
|
+
|
|
510
|
+
project_id : str
|
|
511
|
+
|
|
512
|
+
environment_id : str
|
|
513
|
+
|
|
514
|
+
trace_id : str
|
|
515
|
+
|
|
516
|
+
request_options : typing.Optional[RequestOptions]
|
|
517
|
+
Request-specific configuration.
|
|
518
|
+
|
|
519
|
+
Returns
|
|
520
|
+
-------
|
|
521
|
+
TracesGetTraceDetailByEnvResponse
|
|
522
|
+
Success
|
|
523
|
+
|
|
524
|
+
Examples
|
|
525
|
+
--------
|
|
526
|
+
from mirascope.api._generated import Mirascope
|
|
527
|
+
|
|
528
|
+
client = Mirascope()
|
|
529
|
+
client.traces.gettracedetailbyenv(
|
|
530
|
+
organization_id="organizationId",
|
|
531
|
+
project_id="projectId",
|
|
532
|
+
environment_id="environmentId",
|
|
533
|
+
trace_id="traceId",
|
|
534
|
+
)
|
|
535
|
+
"""
|
|
536
|
+
_response = self._raw_client.gettracedetailbyenv(
|
|
537
|
+
organization_id,
|
|
538
|
+
project_id,
|
|
539
|
+
environment_id,
|
|
540
|
+
trace_id,
|
|
541
|
+
request_options=request_options,
|
|
542
|
+
)
|
|
543
|
+
return _response.data
|
|
544
|
+
|
|
278
545
|
|
|
279
546
|
class AsyncTracesClient:
|
|
280
547
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -359,12 +626,16 @@ class AsyncTracesClient:
|
|
|
359
626
|
start_time: str,
|
|
360
627
|
end_time: str,
|
|
361
628
|
query: typing.Optional[str] = OMIT,
|
|
629
|
+
input_messages_query: typing.Optional[str] = OMIT,
|
|
630
|
+
output_messages_query: typing.Optional[str] = OMIT,
|
|
631
|
+
fuzzy_search: typing.Optional[bool] = OMIT,
|
|
362
632
|
trace_id: typing.Optional[str] = OMIT,
|
|
363
633
|
span_id: typing.Optional[str] = OMIT,
|
|
364
634
|
model: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
365
635
|
provider: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
366
636
|
function_id: typing.Optional[str] = OMIT,
|
|
367
637
|
function_name: typing.Optional[str] = OMIT,
|
|
638
|
+
span_name_prefix: typing.Optional[str] = OMIT,
|
|
368
639
|
has_error: typing.Optional[bool] = OMIT,
|
|
369
640
|
min_tokens: typing.Optional[float] = OMIT,
|
|
370
641
|
max_tokens: typing.Optional[float] = OMIT,
|
|
@@ -377,6 +648,7 @@ class AsyncTracesClient:
|
|
|
377
648
|
offset: typing.Optional[float] = OMIT,
|
|
378
649
|
sort_by: typing.Optional[TracesSearchRequestSortBy] = OMIT,
|
|
379
650
|
sort_order: typing.Optional[TracesSearchRequestSortOrder] = OMIT,
|
|
651
|
+
root_spans_only: typing.Optional[bool] = OMIT,
|
|
380
652
|
request_options: typing.Optional[RequestOptions] = None,
|
|
381
653
|
) -> TracesSearchResponse:
|
|
382
654
|
"""
|
|
@@ -388,6 +660,12 @@ class AsyncTracesClient:
|
|
|
388
660
|
|
|
389
661
|
query : typing.Optional[str]
|
|
390
662
|
|
|
663
|
+
input_messages_query : typing.Optional[str]
|
|
664
|
+
|
|
665
|
+
output_messages_query : typing.Optional[str]
|
|
666
|
+
|
|
667
|
+
fuzzy_search : typing.Optional[bool]
|
|
668
|
+
|
|
391
669
|
trace_id : typing.Optional[str]
|
|
392
670
|
|
|
393
671
|
span_id : typing.Optional[str]
|
|
@@ -400,6 +678,8 @@ class AsyncTracesClient:
|
|
|
400
678
|
|
|
401
679
|
function_name : typing.Optional[str]
|
|
402
680
|
|
|
681
|
+
span_name_prefix : typing.Optional[str]
|
|
682
|
+
|
|
403
683
|
has_error : typing.Optional[bool]
|
|
404
684
|
|
|
405
685
|
min_tokens : typing.Optional[float]
|
|
@@ -420,6 +700,8 @@ class AsyncTracesClient:
|
|
|
420
700
|
|
|
421
701
|
sort_order : typing.Optional[TracesSearchRequestSortOrder]
|
|
422
702
|
|
|
703
|
+
root_spans_only : typing.Optional[bool]
|
|
704
|
+
|
|
423
705
|
request_options : typing.Optional[RequestOptions]
|
|
424
706
|
Request-specific configuration.
|
|
425
707
|
|
|
@@ -450,12 +732,16 @@ class AsyncTracesClient:
|
|
|
450
732
|
start_time=start_time,
|
|
451
733
|
end_time=end_time,
|
|
452
734
|
query=query,
|
|
735
|
+
input_messages_query=input_messages_query,
|
|
736
|
+
output_messages_query=output_messages_query,
|
|
737
|
+
fuzzy_search=fuzzy_search,
|
|
453
738
|
trace_id=trace_id,
|
|
454
739
|
span_id=span_id,
|
|
455
740
|
model=model,
|
|
456
741
|
provider=provider,
|
|
457
742
|
function_id=function_id,
|
|
458
743
|
function_name=function_name,
|
|
744
|
+
span_name_prefix=span_name_prefix,
|
|
459
745
|
has_error=has_error,
|
|
460
746
|
min_tokens=min_tokens,
|
|
461
747
|
max_tokens=max_tokens,
|
|
@@ -466,6 +752,7 @@ class AsyncTracesClient:
|
|
|
466
752
|
offset=offset,
|
|
467
753
|
sort_by=sort_by,
|
|
468
754
|
sort_order=sort_order,
|
|
755
|
+
root_spans_only=root_spans_only,
|
|
469
756
|
request_options=request_options,
|
|
470
757
|
)
|
|
471
758
|
return _response.data
|
|
@@ -558,3 +845,259 @@ class AsyncTracesClient:
|
|
|
558
845
|
request_options=request_options,
|
|
559
846
|
)
|
|
560
847
|
return _response.data
|
|
848
|
+
|
|
849
|
+
async def listbyfunctionhash(
|
|
850
|
+
self,
|
|
851
|
+
hash: str,
|
|
852
|
+
*,
|
|
853
|
+
limit: typing.Optional[NumberFromString] = None,
|
|
854
|
+
offset: typing.Optional[NumberFromString] = None,
|
|
855
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
856
|
+
) -> TracesListByFunctionHashResponse:
|
|
857
|
+
"""
|
|
858
|
+
Parameters
|
|
859
|
+
----------
|
|
860
|
+
hash : str
|
|
861
|
+
|
|
862
|
+
limit : typing.Optional[NumberFromString]
|
|
863
|
+
|
|
864
|
+
offset : typing.Optional[NumberFromString]
|
|
865
|
+
|
|
866
|
+
request_options : typing.Optional[RequestOptions]
|
|
867
|
+
Request-specific configuration.
|
|
868
|
+
|
|
869
|
+
Returns
|
|
870
|
+
-------
|
|
871
|
+
TracesListByFunctionHashResponse
|
|
872
|
+
Success
|
|
873
|
+
|
|
874
|
+
Examples
|
|
875
|
+
--------
|
|
876
|
+
import asyncio
|
|
877
|
+
|
|
878
|
+
from mirascope.api._generated import AsyncMirascope
|
|
879
|
+
|
|
880
|
+
client = AsyncMirascope()
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
async def main() -> None:
|
|
884
|
+
await client.traces.listbyfunctionhash(
|
|
885
|
+
hash="hash",
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
asyncio.run(main())
|
|
890
|
+
"""
|
|
891
|
+
_response = await self._raw_client.listbyfunctionhash(
|
|
892
|
+
hash, limit=limit, offset=offset, request_options=request_options
|
|
893
|
+
)
|
|
894
|
+
return _response.data
|
|
895
|
+
|
|
896
|
+
async def searchbyenv(
|
|
897
|
+
self,
|
|
898
|
+
organization_id: str,
|
|
899
|
+
project_id: str,
|
|
900
|
+
environment_id: str,
|
|
901
|
+
*,
|
|
902
|
+
start_time: str,
|
|
903
|
+
end_time: str,
|
|
904
|
+
query: typing.Optional[str] = OMIT,
|
|
905
|
+
input_messages_query: typing.Optional[str] = OMIT,
|
|
906
|
+
output_messages_query: typing.Optional[str] = OMIT,
|
|
907
|
+
fuzzy_search: typing.Optional[bool] = OMIT,
|
|
908
|
+
trace_id: typing.Optional[str] = OMIT,
|
|
909
|
+
span_id: typing.Optional[str] = OMIT,
|
|
910
|
+
model: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
911
|
+
provider: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
912
|
+
function_id: typing.Optional[str] = OMIT,
|
|
913
|
+
function_name: typing.Optional[str] = OMIT,
|
|
914
|
+
span_name_prefix: typing.Optional[str] = OMIT,
|
|
915
|
+
has_error: typing.Optional[bool] = OMIT,
|
|
916
|
+
min_tokens: typing.Optional[float] = OMIT,
|
|
917
|
+
max_tokens: typing.Optional[float] = OMIT,
|
|
918
|
+
min_duration: typing.Optional[float] = OMIT,
|
|
919
|
+
max_duration: typing.Optional[float] = OMIT,
|
|
920
|
+
attribute_filters: typing.Optional[
|
|
921
|
+
typing.Sequence[TracesSearchByEnvRequestAttributeFiltersItem]
|
|
922
|
+
] = OMIT,
|
|
923
|
+
limit: typing.Optional[float] = OMIT,
|
|
924
|
+
offset: typing.Optional[float] = OMIT,
|
|
925
|
+
sort_by: typing.Optional[TracesSearchByEnvRequestSortBy] = OMIT,
|
|
926
|
+
sort_order: typing.Optional[TracesSearchByEnvRequestSortOrder] = OMIT,
|
|
927
|
+
root_spans_only: typing.Optional[bool] = OMIT,
|
|
928
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
929
|
+
) -> TracesSearchByEnvResponse:
|
|
930
|
+
"""
|
|
931
|
+
Parameters
|
|
932
|
+
----------
|
|
933
|
+
organization_id : str
|
|
934
|
+
|
|
935
|
+
project_id : str
|
|
936
|
+
|
|
937
|
+
environment_id : str
|
|
938
|
+
|
|
939
|
+
start_time : str
|
|
940
|
+
|
|
941
|
+
end_time : str
|
|
942
|
+
|
|
943
|
+
query : typing.Optional[str]
|
|
944
|
+
|
|
945
|
+
input_messages_query : typing.Optional[str]
|
|
946
|
+
|
|
947
|
+
output_messages_query : typing.Optional[str]
|
|
948
|
+
|
|
949
|
+
fuzzy_search : typing.Optional[bool]
|
|
950
|
+
|
|
951
|
+
trace_id : typing.Optional[str]
|
|
952
|
+
|
|
953
|
+
span_id : typing.Optional[str]
|
|
954
|
+
|
|
955
|
+
model : typing.Optional[typing.Sequence[str]]
|
|
956
|
+
|
|
957
|
+
provider : typing.Optional[typing.Sequence[str]]
|
|
958
|
+
|
|
959
|
+
function_id : typing.Optional[str]
|
|
960
|
+
|
|
961
|
+
function_name : typing.Optional[str]
|
|
962
|
+
|
|
963
|
+
span_name_prefix : typing.Optional[str]
|
|
964
|
+
|
|
965
|
+
has_error : typing.Optional[bool]
|
|
966
|
+
|
|
967
|
+
min_tokens : typing.Optional[float]
|
|
968
|
+
|
|
969
|
+
max_tokens : typing.Optional[float]
|
|
970
|
+
|
|
971
|
+
min_duration : typing.Optional[float]
|
|
972
|
+
|
|
973
|
+
max_duration : typing.Optional[float]
|
|
974
|
+
|
|
975
|
+
attribute_filters : typing.Optional[typing.Sequence[TracesSearchByEnvRequestAttributeFiltersItem]]
|
|
976
|
+
|
|
977
|
+
limit : typing.Optional[float]
|
|
978
|
+
|
|
979
|
+
offset : typing.Optional[float]
|
|
980
|
+
|
|
981
|
+
sort_by : typing.Optional[TracesSearchByEnvRequestSortBy]
|
|
982
|
+
|
|
983
|
+
sort_order : typing.Optional[TracesSearchByEnvRequestSortOrder]
|
|
984
|
+
|
|
985
|
+
root_spans_only : typing.Optional[bool]
|
|
986
|
+
|
|
987
|
+
request_options : typing.Optional[RequestOptions]
|
|
988
|
+
Request-specific configuration.
|
|
989
|
+
|
|
990
|
+
Returns
|
|
991
|
+
-------
|
|
992
|
+
TracesSearchByEnvResponse
|
|
993
|
+
Success
|
|
994
|
+
|
|
995
|
+
Examples
|
|
996
|
+
--------
|
|
997
|
+
import asyncio
|
|
998
|
+
|
|
999
|
+
from mirascope.api._generated import AsyncMirascope
|
|
1000
|
+
|
|
1001
|
+
client = AsyncMirascope()
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
async def main() -> None:
|
|
1005
|
+
await client.traces.searchbyenv(
|
|
1006
|
+
organization_id="organizationId",
|
|
1007
|
+
project_id="projectId",
|
|
1008
|
+
environment_id="environmentId",
|
|
1009
|
+
start_time="startTime",
|
|
1010
|
+
end_time="endTime",
|
|
1011
|
+
)
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
asyncio.run(main())
|
|
1015
|
+
"""
|
|
1016
|
+
_response = await self._raw_client.searchbyenv(
|
|
1017
|
+
organization_id,
|
|
1018
|
+
project_id,
|
|
1019
|
+
environment_id,
|
|
1020
|
+
start_time=start_time,
|
|
1021
|
+
end_time=end_time,
|
|
1022
|
+
query=query,
|
|
1023
|
+
input_messages_query=input_messages_query,
|
|
1024
|
+
output_messages_query=output_messages_query,
|
|
1025
|
+
fuzzy_search=fuzzy_search,
|
|
1026
|
+
trace_id=trace_id,
|
|
1027
|
+
span_id=span_id,
|
|
1028
|
+
model=model,
|
|
1029
|
+
provider=provider,
|
|
1030
|
+
function_id=function_id,
|
|
1031
|
+
function_name=function_name,
|
|
1032
|
+
span_name_prefix=span_name_prefix,
|
|
1033
|
+
has_error=has_error,
|
|
1034
|
+
min_tokens=min_tokens,
|
|
1035
|
+
max_tokens=max_tokens,
|
|
1036
|
+
min_duration=min_duration,
|
|
1037
|
+
max_duration=max_duration,
|
|
1038
|
+
attribute_filters=attribute_filters,
|
|
1039
|
+
limit=limit,
|
|
1040
|
+
offset=offset,
|
|
1041
|
+
sort_by=sort_by,
|
|
1042
|
+
sort_order=sort_order,
|
|
1043
|
+
root_spans_only=root_spans_only,
|
|
1044
|
+
request_options=request_options,
|
|
1045
|
+
)
|
|
1046
|
+
return _response.data
|
|
1047
|
+
|
|
1048
|
+
async def gettracedetailbyenv(
|
|
1049
|
+
self,
|
|
1050
|
+
organization_id: str,
|
|
1051
|
+
project_id: str,
|
|
1052
|
+
environment_id: str,
|
|
1053
|
+
trace_id: str,
|
|
1054
|
+
*,
|
|
1055
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1056
|
+
) -> TracesGetTraceDetailByEnvResponse:
|
|
1057
|
+
"""
|
|
1058
|
+
Parameters
|
|
1059
|
+
----------
|
|
1060
|
+
organization_id : str
|
|
1061
|
+
|
|
1062
|
+
project_id : str
|
|
1063
|
+
|
|
1064
|
+
environment_id : str
|
|
1065
|
+
|
|
1066
|
+
trace_id : str
|
|
1067
|
+
|
|
1068
|
+
request_options : typing.Optional[RequestOptions]
|
|
1069
|
+
Request-specific configuration.
|
|
1070
|
+
|
|
1071
|
+
Returns
|
|
1072
|
+
-------
|
|
1073
|
+
TracesGetTraceDetailByEnvResponse
|
|
1074
|
+
Success
|
|
1075
|
+
|
|
1076
|
+
Examples
|
|
1077
|
+
--------
|
|
1078
|
+
import asyncio
|
|
1079
|
+
|
|
1080
|
+
from mirascope.api._generated import AsyncMirascope
|
|
1081
|
+
|
|
1082
|
+
client = AsyncMirascope()
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
async def main() -> None:
|
|
1086
|
+
await client.traces.gettracedetailbyenv(
|
|
1087
|
+
organization_id="organizationId",
|
|
1088
|
+
project_id="projectId",
|
|
1089
|
+
environment_id="environmentId",
|
|
1090
|
+
trace_id="traceId",
|
|
1091
|
+
)
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
asyncio.run(main())
|
|
1095
|
+
"""
|
|
1096
|
+
_response = await self._raw_client.gettracedetailbyenv(
|
|
1097
|
+
organization_id,
|
|
1098
|
+
project_id,
|
|
1099
|
+
environment_id,
|
|
1100
|
+
trace_id,
|
|
1101
|
+
request_options=request_options,
|
|
1102
|
+
)
|
|
1103
|
+
return _response.data
|