From 10a67bff9930936b0609040b9f42a302d37cba21 Mon Sep 17 00:00:00 2001 From: Julien Surloppe Date: Fri, 12 Jun 2026 06:42:19 +0200 Subject: [PATCH 1/3] observability: handle multiple chunk in content response (#565) --- .../extra/observability/streaming.py | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/mistralai/extra/observability/streaming.py b/src/mistralai/extra/observability/streaming.py index 3eb9423a..9d4f393b 100644 --- a/src/mistralai/extra/observability/streaming.py +++ b/src/mistralai/extra/observability/streaming.py @@ -15,7 +15,7 @@ from typing import Any -from mistralai.client.models import CompletionChunk, UsageInfo +from mistralai.client.models import CompletionChunk, TextChunk, UsageInfo def parse_sse_chunks(raw_sse_bytes: bytes) -> list[CompletionChunk]: @@ -66,8 +66,7 @@ def accumulate_chunks_to_response_dict( delta = choice.delta if isinstance(delta.role, str): msg["role"] = delta.role - if isinstance(delta.content, str) and delta.content: - msg["content"] += delta.content + msg["content"] += _extract_output_text(delta.content) if isinstance(choice.finish_reason, str): accumulated["finish_reason"] = choice.finish_reason if isinstance(delta.tool_calls, list): @@ -96,3 +95,18 @@ def accumulate_chunks_to_response_dict( if usage is not None: result["usage"] = usage.model_dump(mode="json", by_alias=True) return result + + +def _extract_output_text(content: Any) -> str: + if isinstance(content, str): + return content + + if not isinstance(content, list): + return "" + + text_parts: list[str] = [] + for block in content: + if isinstance(block, TextChunk): + text_parts.append(block.text) + + return "".join(text_parts) From 5efa8ce8e34c9a221839e57a3156fb56b68a6e31 Mon Sep 17 00:00:00 2001 From: Raquel Barbadillo Date: Tue, 16 Jun 2026 09:48:33 +0200 Subject: [PATCH 2/3] Fix SDK OpenTelemetry opt-in behavior (#567) --- src/mistralai/client/_hooks/tracing.py | 36 +++--- .../extra/observability/telemetry.py | 9 +- .../extra/tests/test_otel_tracing.py | 105 ++++++++++++++++-- 3 files changed, 127 insertions(+), 23 deletions(-) diff --git a/src/mistralai/client/_hooks/tracing.py b/src/mistralai/client/_hooks/tracing.py index 7e2bb17d..54b04c77 100644 --- a/src/mistralai/client/_hooks/tracing.py +++ b/src/mistralai/client/_hooks/tracing.py @@ -44,29 +44,30 @@ def __init__(self) -> None: self._auto_telemetry_provider: Optional[Any] = None self._telemetry_finalizer: Optional[weakref.finalize] = None self._telemetry_auto_disabled: bool = False + self._telemetry_use_global_provider: bool = False self.tracing_enabled, self.tracer = get_or_create_otel_tracer() def before_request( self, hook_ctx: BeforeRequestContext, request: httpx.Request ) -> Union[httpx.Request, Exception]: - # The GenAI span is created in this hook, but HTTPX creates its own - # auto-instrumented span later inside send(). Wrap the configured - # clients so each request's stored GenAI span is current only while - # that request is being sent. - self._ensure_client_send_wrapped(getattr(hook_ctx.config, "client", None)) - self._ensure_async_client_send_wrapped( - getattr(hook_ctx.config, "async_client", None) - ) - configure_telemetry_for_hook( + telemetry_configured = configure_telemetry_for_hook( self, hook_ctx.config, respect_global_provider=True, ) - # Refresh tracer/provider per request so tracing can be enabled if the - # application configures OpenTelemetry after the client is instantiated. - self.tracing_enabled, self.tracer = get_or_create_otel_tracer( - provider=self.tracer_provider, + should_trace = ( + telemetry_configured + or self.tracer_provider is not None + or self._telemetry_use_global_provider ) + if should_trace: + # Refresh tracer/provider per request so tracing can be enabled if the + # application configures OpenTelemetry after the client is instantiated. + self.tracing_enabled, self.tracer = get_or_create_otel_tracer( + provider=self.tracer_provider, + ) + else: + self.tracing_enabled = False request, span = get_traced_request_and_span( tracing_enabled=self.tracing_enabled, tracer=self.tracer, @@ -75,6 +76,15 @@ def before_request( request=request, ) self._store_span_on_request(request, span) + # The GenAI span is created in this hook, but HTTPX creates its own + # auto-instrumented span later inside send(). Wrap the configured + # clients so each request's stored GenAI span is current only while + # that request is being sent. + if span is not None: + self._ensure_client_send_wrapped(getattr(hook_ctx.config, "client", None)) + self._ensure_async_client_send_wrapped( + getattr(hook_ctx.config, "async_client", None) + ) return request @staticmethod diff --git a/src/mistralai/extra/observability/telemetry.py b/src/mistralai/extra/observability/telemetry.py index 822b62b9..22f2922d 100644 --- a/src/mistralai/extra/observability/telemetry.py +++ b/src/mistralai/extra/observability/telemetry.py @@ -135,7 +135,9 @@ def configure_telemetry_for_hook( ) -> bool: """Configure telemetry for a tracing hook when the user has opted in.""" # Fast path: already resolved and no explicit override requested. - if hook._auto_telemetry_provider is not None and telemetry is None: + if telemetry is None and ( + hook._auto_telemetry_provider is not None or hook._telemetry_use_global_provider + ): return True if telemetry is None and hook._telemetry_auto_disabled: return False @@ -155,6 +157,7 @@ def configure_telemetry_for_hook( ) if provider_mode is None: _shutdown_telemetry_provider(hook) + hook._telemetry_use_global_provider = False hook._telemetry_auto_disabled = True return False @@ -176,6 +179,7 @@ def configure_telemetry_for_hook( "configure_telemetry(client, provider='dedicated') to attach an " "SDK-owned provider for this client." ) + hook._telemetry_use_global_provider = False hook._telemetry_auto_disabled = True return False @@ -294,6 +298,7 @@ def _attach_telemetry_provider( _shutdown_telemetry_provider(hook) hook.tracer_provider = provider hook._auto_telemetry_provider = provider + hook._telemetry_use_global_provider = False hook._telemetry_auto_disabled = False hook._telemetry_finalizer = weakref.finalize( finalizer_owner, provider.shutdown @@ -306,6 +311,7 @@ def _attach_custom_tracer_provider( ) -> None: _shutdown_telemetry_provider(hook) hook.tracer_provider = provider + hook._telemetry_use_global_provider = False hook._telemetry_auto_disabled = False @@ -323,6 +329,7 @@ def _use_global_tracer_provider( _shutdown_telemetry_provider(hook) hook.tracer_provider = None + hook._telemetry_use_global_provider = True hook._telemetry_auto_disabled = True return True diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py index b60b05cd..b1543ae7 100644 --- a/src/mistralai/extra/tests/test_otel_tracing.py +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -15,11 +15,12 @@ from collections import Counter from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer import json +import os import threading import unittest from datetime import datetime, timezone from typing import cast -from unittest.mock import MagicMock +from unittest.mock import MagicMock, patch import httpx from opentelemetry import context as context_api @@ -118,9 +119,16 @@ def _make_httpx_response(body: dict, status_code: int = 200) -> httpx.Response: return resp -def _make_hook_context(operation_id: str) -> HookContext: +def _make_hook_context( + operation_id: str, + telemetry: bool | str | None = "global", +) -> HookContext: + config = MagicMock() + config.telemetry = telemetry + config.client = None + config.async_client = None return HookContext( - config=MagicMock(), + config=config, base_url="https://api.mistral.ai", operation_id=operation_id, oauth2_scopes=None, @@ -254,6 +262,7 @@ def _run_hook_lifecycle( request_body, response_body, streaming: bool = False, + telemetry: bool | str | None = "global", ): """Drive the real TracingHook: before_request → after_success. @@ -266,7 +275,7 @@ def _run_hook_lifecycle( so the span is finalised before returning. """ hook = TracingHook() - hook_ctx = _make_hook_context(operation_id) + hook_ctx = _make_hook_context(operation_id, telemetry=telemetry) req_dict = ( _dump(request_body) if hasattr(request_body, "model_dump") else request_body @@ -309,10 +318,11 @@ def _run_hook_error_lifecycle( response_body: dict, status_code: int = 400, error: Exception | None = None, + telemetry: bool | str | None = "global", ): """Drive the real TracingHook: before_request → after_error.""" hook = TracingHook() - hook_ctx = _make_hook_context(operation_id) + hook_ctx = _make_hook_context(operation_id, telemetry=telemetry) req_dict = ( _dump(request_body) if hasattr(request_body, "model_dump") else request_body @@ -343,6 +353,36 @@ def assertSpanAttributes(self, span, expected: dict): actual = {k: span.attributes[k] for k in expected} self.assertEqual(expected, actual) + def test_global_provider_alone_does_not_enable_sdk_span(self): + request = ChatCompletionRequest( + model="mistral-small-latest", + messages=[UserMessage(content="Hello")], + ) + response = ChatCompletionResponse( + id="cmpl-no-telemetry-env", + object="chat.completion", + model="mistral-small-latest", + created=1700000015, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage(content="Hi!", tool_calls=None), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=5, completion_tokens=2, total_tokens=7), + ) + + with patch.dict(os.environ, {}, clear=True): + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + telemetry=None, + ) + + self.assertEqual(len(self._get_finished_spans()), 0) + # -- Simple chat completion ------------------------------------------------ def test_simple_chat_completion(self): @@ -1754,6 +1794,7 @@ async def _mock_handler(request: httpx.Request) -> httpx.Response: api_key="test-key", async_client=async_client, ) + client.sdk_configuration.__dict__["telemetry"] = "global" async def _run(): return await asyncio.gather( @@ -1804,6 +1845,48 @@ async def _run(): # -- HTTPX auto-instrumentation parenting --------------------------------- + def test_app_otel_does_not_enable_mistral_span_without_mistral_telemetry(self): + instrumentor = HTTPXClientInstrumentor() + instrumentor.instrument() + tracer = trace.get_tracer("test-workflow-parenting") + + try: + with patch.dict(os.environ, {}, clear=True): + with ( + _ChatCompletionTestServer() as server, + httpx.Client() as http_client, + ): + client = Mistral( + api_key="test-key", + client=http_client, + server_url=server.url, + ) + with tracer.start_as_current_span( + "ExecuteActivity:generate_site_diagnostic" + ) as activity_span: + client.chat.complete( + model="mistral-small-latest", + messages=_make_user_messages("hello"), + ) + + self.assertEqual( + trace.get_current_span().get_span_context().span_id, + activity_span.get_span_context().span_id, + ) + finally: + instrumentor.uninstrument() + + spans = self._get_finished_spans() + activity = next( + s for s in spans if s.name == "ExecuteActivity:generate_site_diagnostic" + ) + genai_spans = [s for s in spans if s.name == "chat mistral-small-latest"] + post_spans = [s for s in spans if s.name == "POST"] + + self.assertEqual(genai_spans, []) + self.assertEqual(len(post_spans), 1) + self.assertEqual(post_spans[0].parent.span_id, activity.context.span_id) + def test_httpx_auto_instrumented_span_is_child_of_genai_span(self): instrumentor = HTTPXClientInstrumentor() instrumentor.instrument() @@ -1816,6 +1899,7 @@ def test_httpx_auto_instrumented_span_is_child_of_genai_span(self): client=http_client, server_url=server.url, ) + client.sdk_configuration.__dict__["telemetry"] = "global" with tracer.start_as_current_span( "ExecuteActivity:generate_site_diagnostic" ) as activity_span: @@ -1858,6 +1942,7 @@ def raise_connect_error(request: httpx.Request) -> httpx.Response: client=http_client, server_url="https://api.mistral.ai", ) + client.sdk_configuration.__dict__["telemetry"] = "global" with tracer.start_as_current_span( "ExecuteActivity:generate_site_diagnostic" ) as activity_span: @@ -1901,6 +1986,7 @@ async def _run(server_url: str): async_client=async_client, server_url=server_url, ) + client.sdk_configuration.__dict__["telemetry"] = "global" with tracer.start_as_current_span( "ExecuteActivity:generate_site_diagnostic" @@ -1957,7 +2043,7 @@ def test_custom_provider_captures_spans(self): hook = TracingHook() hook.tracer_provider = custom_provider - hook_ctx = _make_hook_context("chat_completion") + hook_ctx = _make_hook_context("chat_completion", telemetry=None) request_body = _dump( ChatCompletionRequest( @@ -2002,12 +2088,13 @@ def test_custom_provider_captures_spans(self): ] self.assertEqual(len(global_spans), 0) - def test_fallback_to_global_provider(self): - """When tracer_provider is None (default), spans go to the global provider.""" + def test_global_telemetry_uses_global_provider(self): + """When telemetry is set to global, spans go to the global provider.""" _EXPORTER.clear() hook = TracingHook() - # tracer_provider defaults to None — should use global provider + # tracer_provider defaults to None; telemetry="global" opts into the + # configured global provider. self.assertIsNone(hook.tracer_provider) hook_ctx = _make_hook_context("chat_completion") From e2270d5c9b4041a5f0abdfa7299697b00a33446f Mon Sep 17 00:00:00 2001 From: maiengineering Date: Tue, 16 Jun 2026 10:46:13 +0200 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-=20?= =?UTF-8?q?Generate=20MISTRALAI=20MISTRALAI-SDK=20[speakeasy/mistralai-sdk?= =?UTF-8?q?-27547248271-1]=202.4.10=20(#566)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.763.6 * chore: align pyproject.toml and uv.lock to version 2.4.10 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action Co-authored-by: th-ch --- .speakeasy/gen.lock | 800 +++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 34 +- RELEASES.md | 12 +- docs/models/basefielddefinition.md | 14 +- ...> basefielddefinitionsupportedoperator.md} | 6 +- docs/models/bindconnectionto.md | 14 - docs/models/connectorgetauthurlv1request.md | 14 +- docs/models/deploymentstatus.md | 16 + docs/models/executionlogrecord.md | 13 + docs/models/executionlogsearchresponse.md | 9 + docs/models/extendedoauthservermetadata.md | 51 +- docs/models/feedresultgetlog.md | 10 + docs/models/feedresultgetspan.md | 10 + docs/models/feedresultgetspanevaluation.md | 10 + docs/models/feedresultgettrace.md | 10 + docs/models/getlog.md | 27 + docs/models/getlogfieldoptions.md | 8 + ...itylogsfieldsfieldnameoptionsgetrequest.md | 10 + docs/models/getlogfields.md | 8 + docs/models/getlogs.md | 8 + docs/models/getspan.md | 66 + ...ilitytracestraceidspansspanidgetrequest.md | 11 + docs/models/getspanevaluation.md | 21 + docs/models/getspanevaluationfieldoptions.md | 8 + ...uationsfieldsfieldnameoptionsgetrequest.md | 10 + docs/models/getspanevaluationfields.md | 8 + docs/models/getspanevaluations.md | 8 + docs/models/getspanfieldoptions.md | 8 + ...tyspansfieldsfieldnameoptionsgetrequest.md | 10 + docs/models/getspanfields.md | 8 + docs/models/getspans.md | 8 + docs/models/getspanstatuscode.md | 19 + docs/models/gettrace.md | 41 + ...dv1observabilitytracestraceidgetrequest.md | 8 + docs/models/gettracefieldoptions.md | 8 + ...ytracesfieldsfieldnameoptionsgetrequest.md | 10 + docs/models/gettracefields.md | 8 + docs/models/gettraces.md | 8 + ...servabilitytracestraceidspansgetrequest.md | 12 + docs/models/gettracestatuscode.md | 18 + docs/models/getworkflowexecutionlogsorder.md | 16 + .../models/getworkflowexecutionlogsrequest.md | 15 + .../models/getworkflowsv1workflowsgetorder.md | 16 + .../getworkflowsv1workflowsgetrequest.md | 23 +- .../getworkflowsv1workflowsgetstatus.md | 19 + .../models/listrunsv1workflowsrunsgetorder.md | 16 + .../listrunsv1workflowsrunsgetrequest.md | 23 +- docs/models/logsrequest.md | 9 + docs/models/oauthmetadata.md | 32 - docs/models/observabilityerrorcode.md | 1 - docs/models/order.md | 14 + docs/models/otelfielddefinition.md | 12 + .../otelfielddefinitionsupportedoperator.md | 40 + docs/models/otelfielddefinitiontype.md | 24 + ...spansevaluationssearchlatestpostrequest.md | 12 + ...ogsv1observabilitylogssearchpostrequest.md | 12 + ...bilityspansevaluationssearchpostrequest.md | 12 + ...nsv1observabilityspanssearchpostrequest.md | 12 + ...sv1observabilitytracessearchpostrequest.md | 12 + docs/models/sortby.md | 16 + docs/models/spanevaluationsrequest.md | 8 + docs/models/spansrequest.md | 8 + docs/models/streamerror.md | 8 + .../models/streamworkflowexecutionlogsdata.md | 17 + .../streamworkflowexecutionlogsevent.md | 18 + .../streamworkflowexecutionlogsrequest.md | 12 + ...streamworkflowexecutionlogsresponsebody.md | 12 + docs/models/tracesrequest.md | 8 + ...wsschedulesscheduleidtriggerpostrequest.md | 9 + docs/models/workflow.md | 1 - docs/models/workflowcodedefinition.md | 1 + docs/models/workflowscheduletriggerrequest.md | 8 + docs/models/workflowwithworkerstatus.md | 1 - docs/sdks/connectors/README.md | 18 +- docs/sdks/executions/README.md | 105 ++ docs/sdks/logs/README.md | 138 ++ docs/sdks/runs/README.md | 27 +- docs/sdks/schedules/README.md | 38 + docs/sdks/spans/README.md | 314 ++++ docs/sdks/traces/README.md | 270 ++++ docs/sdks/workflows/README.md | 26 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/connectors.py | 12 +- src/mistralai/client/executions.py | 477 ++++++ src/mistralai/client/logs.py | 609 +++++++ src/mistralai/client/models/__init__.py | 351 +++- .../client/models/basefielddefinition.py | 6 +- .../models/connector_get_auth_url_v1op.py | 25 +- .../client/models/executionlogrecord.py | 31 + .../models/executionlogsearchresponse.py | 51 + .../models/extendedoauthservermetadata.py | 6 - .../client/models/feedresultgetlog.py | 54 + .../client/models/feedresultgetspan.py | 54 + .../models/feedresultgetspanevaluation.py | 54 + .../client/models/feedresultgettrace.py | 54 + ...ty_logs_fields_field_name_options_getop.py | 66 + ...ity_traces_trace_id_spans_span_id_getop.py | 69 + ...uations_fields_field_name_options_getop.py | 68 + ...y_spans_fields_field_name_options_getop.py | 68 + ..._v1_observability_traces_trace_id_getop.py | 17 + ..._traces_fields_field_name_options_getop.py | 68 + ...servability_traces_trace_id_spans_getop.py | 77 + .../models/get_workflow_execution_logsop.py | 116 ++ .../get_workflows_v1_workflows_getop.py | 120 +- src/mistralai/client/models/getlog.py | 73 + .../client/models/getlogfieldoptions.py | 30 + src/mistralai/client/models/getlogfields.py | 16 + src/mistralai/client/models/getlogs.py | 15 + src/mistralai/client/models/getspan.py | 215 +++ .../client/models/getspanevaluation.py | 55 + .../models/getspanevaluationfieldoptions.py | 30 + .../client/models/getspanevaluationfields.py | 16 + .../client/models/getspanevaluations.py | 18 + .../client/models/getspanfieldoptions.py | 30 + src/mistralai/client/models/getspanfields.py | 16 + src/mistralai/client/models/getspans.py | 15 + src/mistralai/client/models/gettrace.py | 124 ++ .../client/models/gettracefieldoptions.py | 30 + src/mistralai/client/models/gettracefields.py | 16 + src/mistralai/client/models/gettraces.py | 15 + .../list_runs_v1_workflows_runs_getop.py | 98 +- src/mistralai/client/models/logsrequest.py | 56 + src/mistralai/client/models/oauthmetadata.py | 171 -- .../client/models/observabilityerrorcode.py | 1 - .../client/models/otelfielddefinition.py | 106 ++ ..._spans_evaluations_search_latest_postop.py | 86 + ...ogs_v1_observability_logs_search_postop.py | 79 + ...ability_spans_evaluations_search_postop.py | 84 + ...ns_v1_observability_spans_search_postop.py | 79 + ...s_v1_observability_traces_search_postop.py | 79 + .../client/models/spanevaluationsrequest.py | 46 + src/mistralai/client/models/spansrequest.py | 46 + .../stream_workflow_execution_logsop.py | 140 ++ src/mistralai/client/models/streamerror.py | 14 + src/mistralai/client/models/tracesrequest.py | 46 + ...ws_schedules_schedule_id_trigger_postop.py | 63 + src/mistralai/client/models/workflow.py | 6 - .../client/models/workflowcodedefinition.py | 6 + .../models/workflowscheduletriggerrequest.py | 49 + .../client/models/workflowwithworkerstatus.py | 6 - src/mistralai/client/observability.py | 9 + src/mistralai/client/runs.py | 61 +- src/mistralai/client/schedules.py | 214 +++ src/mistralai/client/spans.py | 1433 +++++++++++++++++ src/mistralai/client/traces.py | 1203 ++++++++++++++ src/mistralai/client/workflows.py | 58 +- uv.lock | 2 +- 150 files changed, 9699 insertions(+), 494 deletions(-) rename docs/models/{supportedoperator.md => basefielddefinitionsupportedoperator.md} (73%) delete mode 100644 docs/models/bindconnectionto.md create mode 100644 docs/models/deploymentstatus.md create mode 100644 docs/models/executionlogrecord.md create mode 100644 docs/models/executionlogsearchresponse.md create mode 100644 docs/models/feedresultgetlog.md create mode 100644 docs/models/feedresultgetspan.md create mode 100644 docs/models/feedresultgetspanevaluation.md create mode 100644 docs/models/feedresultgettrace.md create mode 100644 docs/models/getlog.md create mode 100644 docs/models/getlogfieldoptions.md create mode 100644 docs/models/getlogfieldoptionsv1observabilitylogsfieldsfieldnameoptionsgetrequest.md create mode 100644 docs/models/getlogfields.md create mode 100644 docs/models/getlogs.md create mode 100644 docs/models/getspan.md create mode 100644 docs/models/getspanbyidv1observabilitytracestraceidspansspanidgetrequest.md create mode 100644 docs/models/getspanevaluation.md create mode 100644 docs/models/getspanevaluationfieldoptions.md create mode 100644 docs/models/getspanevaluationfieldoptionsv1observabilityspansevaluationsfieldsfieldnameoptionsgetrequest.md create mode 100644 docs/models/getspanevaluationfields.md create mode 100644 docs/models/getspanevaluations.md create mode 100644 docs/models/getspanfieldoptions.md create mode 100644 docs/models/getspanfieldoptionsv1observabilityspansfieldsfieldnameoptionsgetrequest.md create mode 100644 docs/models/getspanfields.md create mode 100644 docs/models/getspans.md create mode 100644 docs/models/getspanstatuscode.md create mode 100644 docs/models/gettrace.md create mode 100644 docs/models/gettracebyidv1observabilitytracestraceidgetrequest.md create mode 100644 docs/models/gettracefieldoptions.md create mode 100644 docs/models/gettracefieldoptionsv1observabilitytracesfieldsfieldnameoptionsgetrequest.md create mode 100644 docs/models/gettracefields.md create mode 100644 docs/models/gettraces.md create mode 100644 docs/models/gettracespansv1observabilitytracestraceidspansgetrequest.md create mode 100644 docs/models/gettracestatuscode.md create mode 100644 docs/models/getworkflowexecutionlogsorder.md create mode 100644 docs/models/getworkflowexecutionlogsrequest.md create mode 100644 docs/models/getworkflowsv1workflowsgetorder.md create mode 100644 docs/models/getworkflowsv1workflowsgetstatus.md create mode 100644 docs/models/listrunsv1workflowsrunsgetorder.md create mode 100644 docs/models/logsrequest.md delete mode 100644 docs/models/oauthmetadata.md create mode 100644 docs/models/order.md create mode 100644 docs/models/otelfielddefinition.md create mode 100644 docs/models/otelfielddefinitionsupportedoperator.md create mode 100644 docs/models/otelfielddefinitiontype.md create mode 100644 docs/models/searchlatestspanevaluationsv1observabilityspansevaluationssearchlatestpostrequest.md create mode 100644 docs/models/searchlogsv1observabilitylogssearchpostrequest.md create mode 100644 docs/models/searchspanevaluationsv1observabilityspansevaluationssearchpostrequest.md create mode 100644 docs/models/searchspansv1observabilityspanssearchpostrequest.md create mode 100644 docs/models/searchtracesv1observabilitytracessearchpostrequest.md create mode 100644 docs/models/sortby.md create mode 100644 docs/models/spanevaluationsrequest.md create mode 100644 docs/models/spansrequest.md create mode 100644 docs/models/streamerror.md create mode 100644 docs/models/streamworkflowexecutionlogsdata.md create mode 100644 docs/models/streamworkflowexecutionlogsevent.md create mode 100644 docs/models/streamworkflowexecutionlogsrequest.md create mode 100644 docs/models/streamworkflowexecutionlogsresponsebody.md create mode 100644 docs/models/tracesrequest.md create mode 100644 docs/models/triggerschedulev1workflowsschedulesscheduleidtriggerpostrequest.md create mode 100644 docs/models/workflowscheduletriggerrequest.md create mode 100644 docs/sdks/logs/README.md create mode 100644 docs/sdks/spans/README.md create mode 100644 docs/sdks/traces/README.md create mode 100644 src/mistralai/client/logs.py create mode 100644 src/mistralai/client/models/executionlogrecord.py create mode 100644 src/mistralai/client/models/executionlogsearchresponse.py create mode 100644 src/mistralai/client/models/feedresultgetlog.py create mode 100644 src/mistralai/client/models/feedresultgetspan.py create mode 100644 src/mistralai/client/models/feedresultgetspanevaluation.py create mode 100644 src/mistralai/client/models/feedresultgettrace.py create mode 100644 src/mistralai/client/models/get_log_field_options_v1_observability_logs_fields_field_name_options_getop.py create mode 100644 src/mistralai/client/models/get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop.py create mode 100644 src/mistralai/client/models/get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop.py create mode 100644 src/mistralai/client/models/get_span_field_options_v1_observability_spans_fields_field_name_options_getop.py create mode 100644 src/mistralai/client/models/get_trace_by_id_v1_observability_traces_trace_id_getop.py create mode 100644 src/mistralai/client/models/get_trace_field_options_v1_observability_traces_fields_field_name_options_getop.py create mode 100644 src/mistralai/client/models/get_trace_spans_v1_observability_traces_trace_id_spans_getop.py create mode 100644 src/mistralai/client/models/get_workflow_execution_logsop.py create mode 100644 src/mistralai/client/models/getlog.py create mode 100644 src/mistralai/client/models/getlogfieldoptions.py create mode 100644 src/mistralai/client/models/getlogfields.py create mode 100644 src/mistralai/client/models/getlogs.py create mode 100644 src/mistralai/client/models/getspan.py create mode 100644 src/mistralai/client/models/getspanevaluation.py create mode 100644 src/mistralai/client/models/getspanevaluationfieldoptions.py create mode 100644 src/mistralai/client/models/getspanevaluationfields.py create mode 100644 src/mistralai/client/models/getspanevaluations.py create mode 100644 src/mistralai/client/models/getspanfieldoptions.py create mode 100644 src/mistralai/client/models/getspanfields.py create mode 100644 src/mistralai/client/models/getspans.py create mode 100644 src/mistralai/client/models/gettrace.py create mode 100644 src/mistralai/client/models/gettracefieldoptions.py create mode 100644 src/mistralai/client/models/gettracefields.py create mode 100644 src/mistralai/client/models/gettraces.py create mode 100644 src/mistralai/client/models/logsrequest.py delete mode 100644 src/mistralai/client/models/oauthmetadata.py create mode 100644 src/mistralai/client/models/otelfielddefinition.py create mode 100644 src/mistralai/client/models/search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop.py create mode 100644 src/mistralai/client/models/search_logs_v1_observability_logs_search_postop.py create mode 100644 src/mistralai/client/models/search_span_evaluations_v1_observability_spans_evaluations_search_postop.py create mode 100644 src/mistralai/client/models/search_spans_v1_observability_spans_search_postop.py create mode 100644 src/mistralai/client/models/search_traces_v1_observability_traces_search_postop.py create mode 100644 src/mistralai/client/models/spanevaluationsrequest.py create mode 100644 src/mistralai/client/models/spansrequest.py create mode 100644 src/mistralai/client/models/stream_workflow_execution_logsop.py create mode 100644 src/mistralai/client/models/streamerror.py create mode 100644 src/mistralai/client/models/tracesrequest.py create mode 100644 src/mistralai/client/models/trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop.py create mode 100644 src/mistralai/client/models/workflowscheduletriggerrequest.py create mode 100644 src/mistralai/client/spans.py create mode 100644 src/mistralai/client/traces.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 22c05d82..b5e069fc 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: ce2e8d816f0883bb7c5eec95648ad426 + docChecksum: 924c53244ab975e7e500ecc5a690385d docVersion: 1.0.0 speakeasyVersion: 1.763.6 generationVersion: 2.884.13 - releaseVersion: 2.4.9 - configChecksum: ae49df6c78572c36979a2f9fd77d0127 + releaseVersion: 2.4.10 + configChecksum: 7921564eb02117510ac5e394d71c5c78 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: ee2c6a51-e666-45f1-9eb1-8febdefbba74 - pristine_commit_hash: 6f3b192eb7e282ccdd22a71ebc6d0ed3ae4123aa - pristine_tree_hash: f9239d86e7261a15cffc93ffc7ac48ad524fe13c + generation_id: 5f68fd6b-61dd-4145-93b9-50b118b27633 + pristine_commit_hash: 939183a6b468fa4150892e7658a66e59f72f3527 + pristine_tree_hash: c634f3f60925561119a6396250265d39d12e8e16 features: python: acceptHeaders: 3.0.0 @@ -356,8 +356,12 @@ trackedFiles: pristine_git_object: f8401a8e26c3d54aa47a1a6cc265050f0a4afc80 docs/models/basefielddefinition.md: id: f9e0bbae859b - last_write_checksum: sha1:fea96b146e5696ff3b93e6b6529fe4ace90616aa - pristine_git_object: 3d721d91572e4cdb8d5de5a2cdd294693f552d73 + last_write_checksum: sha1:59768cd05b3e8cf937cf9d8f8042509ad736dba6 + pristine_git_object: 15b4fc4739198d726b5988a195ae60ebb22be1f7 + docs/models/basefielddefinitionsupportedoperator.md: + id: 62f5dd6e12ff + last_write_checksum: sha1:99bcc83629ce0c4e87ec6a7e9aa900d6da258d6c + pristine_git_object: ccd2125bf0e56242129b0f9321749f3e085dbdf3 docs/models/basefielddefinitiontype.md: id: e0678603f859 last_write_checksum: sha1:057a88127fff9b9cbee409cf28c865bc22c46d69 @@ -398,10 +402,6 @@ trackedFiles: id: b113ca846594 last_write_checksum: sha1:f9dc702c27b8257e008390519df744290e09c4b4 pristine_git_object: 6ee3b394a8b1125769a355359b5a44bc7c3224ea - docs/models/bindconnectionto.md: - id: a1d46dc4c69e - last_write_checksum: sha1:5a9529e9f51c5ce32cc826bf7f162f40c72502b4 - pristine_git_object: 64ba5bc96d5b966fcaca3792dfe70330a6e63da8 docs/models/blobresourcecontents.md: id: 19b9f897373e last_write_checksum: sha1:0a40334024da0f41ccab87e10add590ea87a8b01 @@ -748,8 +748,8 @@ trackedFiles: pristine_git_object: 3a62c0106481edc9d8137689c4d7d7649f812397 docs/models/connectorgetauthurlv1request.md: id: 8a02a6af19ab - last_write_checksum: sha1:1ff61b2c910d6f4a5a52a1ae598f229d089a811b - pristine_git_object: a40bd6ca22e1c2126b76e0e66ab4a9b9b636c0c1 + last_write_checksum: sha1:8d687ee505901a06c651655a14f3948838aa1b48 + pristine_git_object: b91296e5324382552d1b61df880ce3534757bf0d docs/models/connectorgetv1request.md: id: 844c1f489684 last_write_checksum: sha1:446e9132766caec5d1ab49c2654696c571deef53 @@ -1170,6 +1170,10 @@ trackedFiles: id: a9da842850c4 last_write_checksum: sha1:5e69d2c0b987eca0ac211148f9abd2ddfadfb4bc pristine_git_object: 54486bacf3af34734b433e1e5aad1d02e3e7db13 + docs/models/deploymentstatus.md: + id: b039895c72a9 + last_write_checksum: sha1:fe2f0489b2fea1fa58454ea8abe7426d01b17794 + pristine_git_object: 3d1ba1c336f9b30153dee42f35fca10d4986f023 docs/models/deploymentworkerresponse.md: id: 07cd9c89237a last_write_checksum: sha1:1f8b60ad6e17714100626106c2de16f6aca273e4 @@ -1229,7 +1233,7 @@ trackedFiles: docs/models/encodedpayloadoptions.md: id: 033bd880796d last_write_checksum: sha1:caed4f9eb843dca6d06370334cfd0c4142050215 - pristine_git_object: 51fcfdc497db0f7cf17e413c4b5c04bf7d15bc7b + pristine_git_object: 39051266c947e442df6e22c62930f8593c8ce57b docs/models/encodingformat.md: id: 066e154e4d43 last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 @@ -1274,6 +1278,14 @@ trackedFiles: id: c96b31c33dcd last_write_checksum: sha1:971187596dde6a53f9e7f4c26cb0f37d5cbafb40 pristine_git_object: 1033b7ea323917f0ffadb8cb3854426a1956f904 + docs/models/executionlogrecord.md: + id: 88895a1359f4 + last_write_checksum: sha1:01a63e32ce18cb999c5c5e6014b1d697df8915c2 + pristine_git_object: 55630e3a219ac3de9c02c7e11f4dc629a97fa8f5 + docs/models/executionlogsearchresponse.md: + id: afbc2f9d2896 + last_write_checksum: sha1:e2b91fdca15edd495d9616eaa00dca08205e16c9 + pristine_git_object: 69fb7f2583a2b11fea45a94e0774981fa2abe0e7 docs/models/exportdatasetresponse.md: id: f4594898de85 last_write_checksum: sha1:2e68bd840ee44b5b61aac0945d608060bd6506f4 @@ -1288,8 +1300,8 @@ trackedFiles: pristine_git_object: d7de83a9d4fad318d2e30f7718bf9b529a367158 docs/models/extendedoauthservermetadata.md: id: f204f1d46efe - last_write_checksum: sha1:8f6359087bdd51f214bb8a61d842ada53e8427d1 - pristine_git_object: e5a6a443adce12dd681b443317e925bf77f12176 + last_write_checksum: sha1:637d6587a1804503cb01654bb2ebf635700a2f38 + pristine_git_object: 17a430ea8c00bc7b817781aca4bd8b10a43140ce docs/models/failure.md: id: 3f79c7d64eac last_write_checksum: sha1:344f1cea9b786a399a0dd974d4df010714031b2a @@ -1298,6 +1310,22 @@ trackedFiles: id: 5ed9f0e8db01 last_write_checksum: sha1:c5950602d174d49f293cb85047d871d360e6af16 pristine_git_object: 08a6e2f837872ee058b2c73089cf151fa944ff90 + docs/models/feedresultgetlog.md: + id: 4648efb5b17f + last_write_checksum: sha1:ed8488b9d874115b6f2ec65b186dd637abfd4171 + pristine_git_object: cf8b8153ba89128af22d6a37d42da7d84b402ef0 + docs/models/feedresultgetspan.md: + id: 6d10018d5e0f + last_write_checksum: sha1:378b76143ad894eb50292898727fe9375b2f6ec5 + pristine_git_object: 8b6b572b8d21e328b91e3ee283cbace0021e6a29 + docs/models/feedresultgetspanevaluation.md: + id: 0b76a66f048e + last_write_checksum: sha1:12d7d2a408b001d20293373e9172482358720aae + pristine_git_object: 044c42e32d48fd358406a62c3a90de32508c2a16 + docs/models/feedresultgettrace.md: + id: 011ece329c81 + last_write_checksum: sha1:2b0883b13911855411422eef24ef2f4ea477d55c + pristine_git_object: 328d7230c8b24254c76bf3e7c48b49d859e83b88 docs/models/fetchcampaignstatusresponse.md: id: 175907eb768d last_write_checksum: sha1:537f33701542d6cbab3d9bb9fc661339a9e9c748 @@ -1534,6 +1562,26 @@ trackedFiles: id: 5a7a03200f1f last_write_checksum: sha1:f9bbebd7b36957b6d9807063f2926b4a37c73a7e pristine_git_object: 154ece82c1932053d4764d7d8fb2ab0f394027b2 + docs/models/getlog.md: + id: 1302e80d8cee + last_write_checksum: sha1:124888d01c22fca2b7a2567711258648c1d1b454 + pristine_git_object: 7a1ab4b9a682bc5943b8f29a6f416d1c657d2939 + docs/models/getlogfieldoptions.md: + id: d0cb1bd3a1ac + last_write_checksum: sha1:aaccad0bc2f03efea4fe2ba4dfe152f4445e4568 + pristine_git_object: 39576c2f3fa759999894f33259de845c309b4ad2 + docs/models/getlogfieldoptionsv1observabilitylogsfieldsfieldnameoptionsgetrequest.md: + id: af25d76d16e3 + last_write_checksum: sha1:2cdd38463314cf00e082fc0ce81c4a4329e90d9d + pristine_git_object: b86bbcbc065823d297a87607fa7507ea102a83c5 + docs/models/getlogfields.md: + id: f08f13a8aefc + last_write_checksum: sha1:b4caa5c8befdf21a376f1edc1516dae0f70ef60e + pristine_git_object: d2b8230d0cb1fd64ea39f8963491aa0cd9ba7aa8 + docs/models/getlogs.md: + id: b52f3d66820d + last_write_checksum: sha1:0beedf5d8e93a1df9961fdf35b1762d147ac81ae + pristine_git_object: 13fa6b7315600d74aec259bc5512ad347063c12c docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md: id: d0010e389ace last_write_checksum: sha1:9083de20179b09071ac9f5ded13a15b70d4fea87 @@ -1566,6 +1614,54 @@ trackedFiles: id: 38d58bb7d102 last_write_checksum: sha1:63b80dff98aa4fc959f71d1e41faa0eeec4801aa pristine_git_object: cf276b5e4297eec4d5d4c6996fde7144d54dd8c0 + docs/models/getspan.md: + id: c94b8e82cc0c + last_write_checksum: sha1:fb098efab596b43e8fcc5ba4e5af2f298b243779 + pristine_git_object: eeb9a38b82b149685e8a22ca8776419c76553a5b + docs/models/getspanbyidv1observabilitytracestraceidspansspanidgetrequest.md: + id: 00787737ae5d + last_write_checksum: sha1:d8b3eeb8719a1434a588398c6696efce10f8bee5 + pristine_git_object: 700096880328bbbd651dd4eb6c8c0a48c19ac1d8 + docs/models/getspanevaluation.md: + id: cfdab85f925f + last_write_checksum: sha1:d7ff5a5af2134c79bd4d3c3a985ffc8585538da7 + pristine_git_object: d1365ad3a2a34a715e5a558c769a5f8bffdc079e + docs/models/getspanevaluationfieldoptions.md: + id: 122f17a4cbab + last_write_checksum: sha1:31c11d4d3a2e0e2bc8ce26d8caad48de1bbecb7d + pristine_git_object: 42bd4fb35d98a0e4fc5c3413e288ef09523e2dc5 + docs/models/getspanevaluationfieldoptionsv1observabilityspansevaluationsfieldsfieldnameoptionsgetrequest.md: + id: 3f286e7a127b + last_write_checksum: sha1:b65b8b76ba4ef02c7fa629e7ae103139c347ea15 + pristine_git_object: b5f9bbb5b6f19501bfefcac4c07271620a6a3389 + docs/models/getspanevaluationfields.md: + id: 1804dfca7873 + last_write_checksum: sha1:0f714096b31a70973e37689350e11d263499bd87 + pristine_git_object: d190c4d3fa71d6a74b6211107754a02d0326dd2e + docs/models/getspanevaluations.md: + id: 8089b7a325c2 + last_write_checksum: sha1:d32bdfc94f27225ace7bdb96f38620388cbab10e + pristine_git_object: 1e20598daf162f77b943d74ddcac011decaa0430 + docs/models/getspanfieldoptions.md: + id: a8bafa2786a8 + last_write_checksum: sha1:7f75c975da7d2744f36a7de8fcb76ebc1ee8123d + pristine_git_object: 37eb632ca476a8d986972587f91004d64ec3c385 + docs/models/getspanfieldoptionsv1observabilityspansfieldsfieldnameoptionsgetrequest.md: + id: 21697ef02aa0 + last_write_checksum: sha1:e7a32281a243b9815782a558ed1e696e0f68fc87 + pristine_git_object: 5a34f370f3524f2ed704b126388fc0a3f545379c + docs/models/getspanfields.md: + id: 7f59b31ecde9 + last_write_checksum: sha1:5a8dabfdba186eec05ded5036a4a29967f948721 + pristine_git_object: ea77c03eef57dc0d7ad300ce421723d7bdd093d5 + docs/models/getspans.md: + id: 4f97cbe9e5f2 + last_write_checksum: sha1:1717db2dd95b88c32f759ebe78c3e11269a25ce4 + pristine_git_object: 1a12c420501e992e0fbbe9619f980f664d6a1f04 + docs/models/getspanstatuscode.md: + id: db47581349ed + last_write_checksum: sha1:85537139256fd92fdbaa18cd90a39c659deef230 + pristine_git_object: 635720afa9836f4f83d6fd5e8b56a62fa0e742b2 docs/models/getstreameventsv1workflowseventsstreamgetrequest.md: id: c4f4986768d9 last_write_checksum: sha1:e3c15d6f54d2d24040eb0d7cf76e435b50d04965 @@ -1574,6 +1670,38 @@ trackedFiles: id: 5d958d2ebde1 last_write_checksum: sha1:58ffec3d780d35a688634d273588e0209afd4f72 pristine_git_object: 18f9b63939e1110145d3201d45b584a0c155a964 + docs/models/gettrace.md: + id: e6e0f02a25b6 + last_write_checksum: sha1:a9c760d6f33d97e5a3d657646cbfc53dbdd4a4ac + pristine_git_object: 245bd8eb25e5304a05053136dcf01cc360ea1da8 + docs/models/gettracebyidv1observabilitytracestraceidgetrequest.md: + id: 6aa95bf83ddb + last_write_checksum: sha1:e53c356c3d2e65934c90b832ac76b0fe0ce0c858 + pristine_git_object: b8379bf79bc29d33baf7148d4c35ff15e7cd106b + docs/models/gettracefieldoptions.md: + id: 545f21b0c585 + last_write_checksum: sha1:13e577a8c668d8925fc2d7777eb6a81d09820f15 + pristine_git_object: 9fe910b4668a8c9df1269943988c6e93e128b6c1 + docs/models/gettracefieldoptionsv1observabilitytracesfieldsfieldnameoptionsgetrequest.md: + id: 1af28de9e2d5 + last_write_checksum: sha1:6ed444b07351e072dd2eee936fb49f0ce20bc0e7 + pristine_git_object: 25d31e5b5b60c5646a06c85a54c3ce68eed96965 + docs/models/gettracefields.md: + id: 5a7a9f23c3f6 + last_write_checksum: sha1:8b8b8662e178669ad1aa5ad2ca1097ee523ad80e + pristine_git_object: 9114d2eec8e68f4c35d105f9b81421e230922ea1 + docs/models/gettraces.md: + id: 7853ec055f5a + last_write_checksum: sha1:985e011b074b7cdc235060cda612a8b6ab57a922 + pristine_git_object: 6163311d306da9ac7e97e77965b66ea5f758ea3e + docs/models/gettracespansv1observabilitytracestraceidspansgetrequest.md: + id: 6c9d12d88cce + last_write_checksum: sha1:2ead2c5b96c33905fc592c5d2b58188bd34ef2ab + pristine_git_object: b89e5b8073462d67cedd6bce38b09e413c087ca2 + docs/models/gettracestatuscode.md: + id: 78072bc7d38b + last_write_checksum: sha1:e2b20fb98e67ed327a6ae2c48dd3ba6afa68ae06 + pristine_git_object: 9c8d0c57b4fdebc8eb7901f5c619f699340c268e docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md: id: fa1b72f3aa6b last_write_checksum: sha1:10b8897bf884ac876559ef574a76bee6df3b7afb @@ -1590,6 +1718,14 @@ trackedFiles: id: 7524ddab7997 last_write_checksum: sha1:39f74888b1cc5ff5257f890f2d17725ec313d57f pristine_git_object: 1934b7f961625c636fa020a655b61b0302e2b725 + docs/models/getworkflowexecutionlogsorder.md: + id: be0a065bb3f6 + last_write_checksum: sha1:84152de75b0eaae00350631c7f82c661d0575fae + pristine_git_object: 5d265a09f27825b7e3639dbc48ae9ef652b244ff + docs/models/getworkflowexecutionlogsrequest.md: + id: 070189a5f186 + last_write_checksum: sha1:a5f53cfa2642155febc10fa29942f08a8b5e9ace + pristine_git_object: b7198bee954dd5ba4ca7a845472bd5d5ef48c047 docs/models/getworkflowexecutiontraceeventsrequest.md: id: 6722ae5f7115 last_write_checksum: sha1:2764ba45e55fe648e50f8d397826cebbf3a3dced @@ -1618,14 +1754,22 @@ trackedFiles: id: 597766b7d51b last_write_checksum: sha1:5c58fbed3af8d08dd94eaba0ae8ed41d61fb6c52 pristine_git_object: ec43ad56a6698eaec7a89e015f42154a7a97dea8 + docs/models/getworkflowsv1workflowsgetorder.md: + id: b554d5366c05 + last_write_checksum: sha1:3932963791cc353450220505e7e41c20dd3e434f + pristine_git_object: ed2d5dd49dc83421d8a81066d52fa82a6c0cefb3 docs/models/getworkflowsv1workflowsgetrequest.md: id: e61c93d9ecc7 - last_write_checksum: sha1:c6e80c2fc2963d42aa66044bcc9988977b333325 - pristine_git_object: 79fe4c0d16d2b7cea2db80c9369d1df687c58065 + last_write_checksum: sha1:fcb5d2103d292ea7161ebb38e66caf3036aaefae + pristine_git_object: d365ebfd0d588cd602ec40e38fe5c7fb3bce102c docs/models/getworkflowsv1workflowsgetresponse.md: id: a6375877d4dd last_write_checksum: sha1:26401f0edf76e787a8ca780eb97724a4c6ca37a7 pristine_git_object: 6ec4f4e79cbc377f6b1eb4fff720425cda6b731e + docs/models/getworkflowsv1workflowsgetstatus.md: + id: c299d16cb979 + last_write_checksum: sha1:6608fe69f00b19f1ed1a959edd757fd61235bfc9 + pristine_git_object: 5e85e7e5dccf57960abb9968aae12ce99072ac0a docs/models/getworkflowv1workflowsworkflowidentifiergetrequest.md: id: ddc86b6b1bf9 last_write_checksum: sha1:63f5d6e78e90572125d1b366ccc0c75a897210e7 @@ -2018,10 +2162,14 @@ trackedFiles: id: ade37f6d014a last_write_checksum: sha1:10d4e1242cdac6cdc7597881e0d25ce06760971f pristine_git_object: 537269f7e774b31c45ac75c82c096530c0bd2b4e + docs/models/listrunsv1workflowsrunsgetorder.md: + id: 29a021962b4e + last_write_checksum: sha1:93c3e23f9ddac556a6e873ce44e00b6b9c384eb5 + pristine_git_object: 645719816f34b6ce88aaada4f4a7dc546ff096b2 docs/models/listrunsv1workflowsrunsgetrequest.md: id: 132927390b33 - last_write_checksum: sha1:ac1d4705c77aaf9f96cb97305a3c45da43b7bbdc - pristine_git_object: 319d9ed5923c9e84221f31fb74d82f557b902c9c + last_write_checksum: sha1:7cafc4a8a5b848451e075d1f344e1cdc531df1eb + pristine_git_object: e183ebada31ec04a9e3605bf6cdb65b6eb453e9f docs/models/listrunsv1workflowsrunsgetresponse.md: id: da55980ef20d last_write_checksum: sha1:e176049e48a9f78b47be166b6dc8f47bca3e7da7 @@ -2066,6 +2214,10 @@ trackedFiles: id: 61eee1af8d4c last_write_checksum: sha1:7e78778f1a304d226f752ebb6d023654ced7866b pristine_git_object: 0d3c1f78c1c8cc90a466d876b2d54f156d8ba7d9 + docs/models/logsrequest.md: + id: 12b7ec599fbd + last_write_checksum: sha1:e5d0cb420a7f3091bd616818dd0b40d90d994e95 + pristine_git_object: 6b871cfa5d0db476df312ad0a412d666f41c33c2 docs/models/mcpprompt.md: id: c6eeb6a6a719 last_write_checksum: sha1:321ce6a140536a8582632d937f498b2fd8006a7b @@ -2238,14 +2390,10 @@ trackedFiles: id: f23959dcc4b0 last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 - docs/models/oauthmetadata.md: - id: 4e135ab0da15 - last_write_checksum: sha1:20bebaae260d830c93f944bb2db521f53e20ad42 - pristine_git_object: 666b39446d8d998dcf4be79e6085303a9814e8b8 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:db506572c8c6e989127c270dd65d4ea98e281c58 - pristine_git_object: d8532e86b041e814f56b11ebae900dcdc88efc60 + last_write_checksum: sha1:85c6434d77e360db5cee547725b62a81fe794422 + pristine_git_object: ba9749c60deff54d56c8c2d05cbd1735a7bb290b docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -2302,10 +2450,26 @@ trackedFiles: id: 4062b9894f72 last_write_checksum: sha1:cbf92175e3a4f829d7ad84da51301a42bbfa80cd pristine_git_object: 2a2172695146be50782a3ef32815950d4829cf64 + docs/models/order.md: + id: 5d2682daf79b + last_write_checksum: sha1:eb8abef7e4c2e2e5691823f89b59f5789a58eac4 + pristine_git_object: 3c78f582244a5174c2d922abe8e8f6e3c158e6d6 docs/models/orderby.md: id: 9e749ed80f72 last_write_checksum: sha1:4f6dd8e684dd11e4856d3d6cf2c0f2e2d1a01640 pristine_git_object: d778621f6b1e6788aecbe25bd741d27a0d863990 + docs/models/otelfielddefinition.md: + id: a631910a6c2c + last_write_checksum: sha1:9554a3efc5abf7b8a4ee5618fde6c8679a7b91d7 + pristine_git_object: 366c9bc4cb79cb68d549acfdde5d5750df7459b8 + docs/models/otelfielddefinitionsupportedoperator.md: + id: afeaa2445347 + last_write_checksum: sha1:a88cd75f094b57638c06ab385071b7d2c0d5b151 + pristine_git_object: 1db0d6df651b50a57510e3cbddb0ac82eb9ca238 + docs/models/otelfielddefinitiontype.md: + id: 894f9ac0eb7f + last_write_checksum: sha1:64bad53995233259436e7d14f75d75ed085f1cbb + pristine_git_object: 11db56141bc290e1d4e2d2f35f1406320bad2f7a docs/models/outboundauthenticationtype.md: id: a62ff6260857 last_write_checksum: sha1:d0347c0ec6f11af08e2abca8331d3d44e17bad8b @@ -2690,6 +2854,26 @@ trackedFiles: id: 78dbf9d2a629 last_write_checksum: sha1:794e6f89be8778c11490fa69bdca3925819e4862 pristine_git_object: c2200101050e96907f3b4b0d4ea8128ba36328d1 + docs/models/searchlatestspanevaluationsv1observabilityspansevaluationssearchlatestpostrequest.md: + id: bbfacfac87f9 + last_write_checksum: sha1:4edd780638d7e8857781d1ba29bd959d0fe80d8a + pristine_git_object: aa21d24650e563047dde73531d1c1c9cd0b1c1ec + docs/models/searchlogsv1observabilitylogssearchpostrequest.md: + id: 13375dff718e + last_write_checksum: sha1:37eadf03289a7835ca948956233b4c2e05b1f3d9 + pristine_git_object: c0bd16222c225c2eea2fd8402d01f7ee8084b27b + docs/models/searchspanevaluationsv1observabilityspansevaluationssearchpostrequest.md: + id: 42cd191c5996 + last_write_checksum: sha1:1e71607a998fdacaf184ee111ea4309d4d7c9665 + pristine_git_object: 5f1148e38c63242600947436f11ddd990414a520 + docs/models/searchspansv1observabilityspanssearchpostrequest.md: + id: a583814bd9b1 + last_write_checksum: sha1:d69bd490f6d7ba9aa24967e1ce83624c68c74794 + pristine_git_object: f66e2d703ddf2b3d3752a25f365a6e1f0e1aeac6 + docs/models/searchtracesv1observabilitytracessearchpostrequest.md: + id: cc4f64333ceb + last_write_checksum: sha1:58e835f091e872664fc4809a1fa36e69b8c52cdf + pristine_git_object: 9540653807b45bf585e09eeec620ebb7ebb70e6a docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf @@ -2754,10 +2938,22 @@ trackedFiles: id: 1bf623cd7bb3 last_write_checksum: sha1:e514f325543c209b0d86b9a445f2c8696f171cfd pristine_git_object: 48eade7acba08e0189f7405636d67dd0284b8ab6 + docs/models/sortby.md: + id: ba9d0fca86fe + last_write_checksum: sha1:d85f5663c0b7e704c8662f4257a3574cbc3117f5 + pristine_git_object: ef56a615c87d604f7b245cc1657794b1a8f97ff5 docs/models/source.md: id: 6541ef7b41e7 last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 pristine_git_object: 37ca338b6f2ba9d10209cbcd3c680b7589589767 + docs/models/spanevaluationsrequest.md: + id: 062bf0aa28e4 + last_write_checksum: sha1:c156070c505b1b57a9b6d0cc1838e615c1b1922b + pristine_git_object: bcad094111304ae9c37d20770b9162c8391bdc3c + docs/models/spansrequest.md: + id: 7fc4cbd58228 + last_write_checksum: sha1:538330efad3b776e71aaded9c7d0717ab77e30eb + pristine_git_object: a1ae049d947dfb4968b8b965e90e973fec741f18 docs/models/speechoutputformat.md: id: cd623f390460 last_write_checksum: sha1:1f237bad21e275b29ff8fa4c25397497adb5db92 @@ -2798,6 +2994,10 @@ trackedFiles: id: 6a902241137c last_write_checksum: sha1:6291d6bc7cbcd7640b83b03ac8ce353b95c1f913 pristine_git_object: 372eafee6f22105d6f5fd31f2e04ea04f5abe641 + docs/models/streamerror.md: + id: 3d1ca0debd43 + last_write_checksum: sha1:e291bdbef69d0a82445c08cbd78efc703570e7b0 + pristine_git_object: 6397310efda9d1c0ee123868b133fd1686ad56c4 docs/models/streameventssepayload.md: id: c3cdfddd480b last_write_checksum: sha1:6251dc54c4becf826ac475ffd8cc48d18a509aad @@ -2818,10 +3018,22 @@ trackedFiles: id: 09d5a590ebf1 last_write_checksum: sha1:1f22c1e502478d9532b6729bcde30aa8bb5528c4 pristine_git_object: e12bb93835a164b665e4cdf4b9862f350d91c850 - docs/models/supportedoperator.md: - id: 000f0770e0f9 - last_write_checksum: sha1:ea71b0062712f8750234d8bd5313063589de1155 - pristine_git_object: 97dbd4b14b71389273583d142009548abca92e1f + docs/models/streamworkflowexecutionlogsdata.md: + id: 2d8ba6b01f35 + last_write_checksum: sha1:8d27e5bb5c219386aaf1e1c84c6b93f5b02dad0a + pristine_git_object: 3ebc718db3942e99fd4f98708591edec78a83845 + docs/models/streamworkflowexecutionlogsevent.md: + id: 75a69a53506d + last_write_checksum: sha1:2a866ebbc88f2115fef62e9215d565e71e290a6a + pristine_git_object: 20533c6ac7ac494899fcce13b4c21b2c390b8bad + docs/models/streamworkflowexecutionlogsrequest.md: + id: 9f05db84fa04 + last_write_checksum: sha1:063fc8013ac22009dbecb68b3efdbe7da99cf3cb + pristine_git_object: f1313cce8ffe597006e73cab6cbaf0b4314d66e9 + docs/models/streamworkflowexecutionlogsresponsebody.md: + id: 5d8ed5fe8479 + last_write_checksum: sha1:27c4bce66bdb6bfd651c5b38196d0dfb18fe74a9 + pristine_git_object: 529000ed47267662ba7f2bfa125e2d0cd92ee654 docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:c7603c5ce77ba2bcbda9eff65eeafdb1e9ecbec7 @@ -3066,6 +3278,10 @@ trackedFiles: id: 5e2ddf7b3863 last_write_checksum: sha1:3aa9c92e9872fe75032e53e311bf050dbab51e98 pristine_git_object: 2a64e130e526f8d99e623e7cbc0c7add82d8fab0 + docs/models/tracesrequest.md: + id: 3adc703b2d5d + last_write_checksum: sha1:6bbeaac0bf661c426a8d442f70e53d76b45c2a44 + pristine_git_object: 3a0bf8d04378be10fb6c5f60ced132a616ccfae0 docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -3106,6 +3322,10 @@ trackedFiles: id: 69a13554b554 last_write_checksum: sha1:d969f462034ed356f2c8713b601ee7d873d4ce07 pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d + docs/models/triggerschedulev1workflowsschedulesscheduleidtriggerpostrequest.md: + id: 6398ea20f152 + last_write_checksum: sha1:3ccfe5613e51fb139cb37a31f03cb3d64a8439db + pristine_git_object: 5ddbf9a7ca7502b8d58df20eb28f5d8a4cc5962c docs/models/turbinemeta.md: id: 1f7f944fef63 last_write_checksum: sha1:38dd2a9a68f8b938dbf6c3c43470e5986204bf08 @@ -3300,8 +3520,8 @@ trackedFiles: pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 docs/models/workflow.md: id: a782201b7327 - last_write_checksum: sha1:60acfee56f8837e604034ad9b122a31aef4e43f5 - pristine_git_object: 9bc99a7983d80fcd7f60c99c6aa32d10033d8d23 + last_write_checksum: sha1:b43e95096bbe2a693f601444695f26c995444fc5 + pristine_git_object: a8d7ee7478792a61a250e680834fa1e13573e532 docs/models/workflowarchiveresponse.md: id: e952228d4f02 last_write_checksum: sha1:49dbb8dd7c8b3a2442de072bd45244540c79954f @@ -3332,8 +3552,8 @@ trackedFiles: pristine_git_object: 8b139b752d94dc52594e12465e15797244cbb4df docs/models/workflowcodedefinition.md: id: 16ce7d540f36 - last_write_checksum: sha1:96703471ed4249c118cd0d2563182f9300e3bfc9 - pristine_git_object: f8cf3bbd5a9d0aad13daf38d140ffbe9c3df825f + last_write_checksum: sha1:7f35ed243b00bce2e6225b09ec8fc318dcda5f5b + pristine_git_object: 912c3f4813b135a312632a3a52e619ba26eacef9 docs/models/workfloweventtype.md: id: 0ea616e53d9b last_write_checksum: sha1:97e9654b44b627a610b3a30f14b3dc56dab1d725 @@ -3482,6 +3702,10 @@ trackedFiles: id: ef0b813976ad last_write_checksum: sha1:2da7d2a8519fe915554fdcebc25915ad11fbb203 pristine_git_object: 96d7ced717099cc1bbff4ac38d60e7552e9c6204 + docs/models/workflowscheduletriggerrequest.md: + id: f7069053465a + last_write_checksum: sha1:30247bfc780c10ddcf05ef8ce0ee4f6e6fea123e + pristine_git_object: a1fab5f3fc4a9fd75187f3f72448b10051792af8 docs/models/workflowscheduleupdaterequest.md: id: 0eed547c9a4b last_write_checksum: sha1:d71e300642a6ef23687318f53c8fe32b38320a0f @@ -3520,8 +3744,8 @@ trackedFiles: pristine_git_object: 68faf7c0932990ae52eb0ff627544bd76bcb1545 docs/models/workflowwithworkerstatus.md: id: 81265aadaf0d - last_write_checksum: sha1:6a657fed4dea1a8217a335b68a5bbce222ba21fa - pristine_git_object: 033766b2a6a08f6cc001a44cc300e14550a3052f + last_write_checksum: sha1:6f03207d368d1103525be36cdfc8e37a3905ce00 + pristine_git_object: a067eef43bb4ddf7674b17017a84de4f1d1572de docs/sdks/accesses/README.md: id: 2ea167c2eff2 last_write_checksum: sha1:c9daf160ffc706a9be9e2e86855d97227fc25373 @@ -3556,8 +3780,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:ed89b1376ba4315b7a1850fe823b2aa64ff947f9 - pristine_git_object: 3509e068d9e0724cc21b6da189aa52a921a7f4fc + last_write_checksum: sha1:ef659e944e77292678368c58fcd56815c05bc22d + pristine_git_object: 707b5ef424e86d79fdcd899e82fcac3d811f6e26 docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:68ede193fd35a89ab226aa92a92edaecf1eebb1a @@ -3584,8 +3808,8 @@ trackedFiles: pristine_git_object: de6b43fcbbcbadef17a4e35978815289146925ec docs/sdks/executions/README.md: id: 401745b17323 - last_write_checksum: sha1:deb3ec67034ab14cf9b4dc56abe7cafadb84b6d1 - pristine_git_object: 1bf4ed25ebc0b9f0c93b50da16119f4371219346 + last_write_checksum: sha1:9dacf3cc8a13934050dc5b3aa62b62f9918c58e0 + pristine_git_object: 1be1a3e36dfd33332a1dc0935372d17368012811 docs/sdks/fields/README.md: id: fdb6c4f3bd69 last_write_checksum: sha1:ea6dea75f85d25fd0ccdd2c659ecec43d0e5242d @@ -3614,6 +3838,10 @@ trackedFiles: id: df9a982905a3 last_write_checksum: sha1:99d5c4e9c4c2689385bedf9da1930df89649c995 pristine_git_object: 863cb9f410ff082cd09bb04bc52b0e2628804289 + docs/sdks/logs/README.md: + id: 5adacd63da21 + last_write_checksum: sha1:6f230ad86d99a2a916ffd42437edb02f7f71a514 + pristine_git_object: da7cb5a91dd8982dea2b38e1fbc000ec233396c9 docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b @@ -3632,20 +3860,28 @@ trackedFiles: pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 docs/sdks/runs/README.md: id: 4598fd39b715 - last_write_checksum: sha1:20e849d15916f477bfc94f62d69c50385c0370b1 - pristine_git_object: 7ed914205115222f7ade5a656541af0dba64ff28 + last_write_checksum: sha1:dec60a30959ca0965b65b4ff02b0b7f844d81030 + pristine_git_object: 60110bf6b1cf01be41ae98cc5466941abb1fcf31 docs/sdks/schedules/README.md: id: 2f28c809a225 - last_write_checksum: sha1:310601597370d883f38db8901ffbf99fd0875caa - pristine_git_object: 6b0e5f0e31f7de2eb5ac105c6406abb5d59e1cb6 + last_write_checksum: sha1:3f644b41a399bc10b5bb9b667f4ee2b36d3d0651 + pristine_git_object: c13527752b33297648f99515c5e5fb7d706b0aed docs/sdks/searchindexes/README.md: id: b58e7a6ab4f1 last_write_checksum: sha1:129ef4c1ef14a615ee58a2d8c313b02cc0f0993e pristine_git_object: 471bba59a2e12f24b8bad96850b25b566cba29da + docs/sdks/spans/README.md: + id: 594028be109d + last_write_checksum: sha1:6e403efcb00f0ca699242f30d8e19b11b571098f + pristine_git_object: f833e02fba4d9de4f101783f70457a03d2f66422 docs/sdks/speech/README.md: id: d5924688d48c last_write_checksum: sha1:7128863f5b445f343d4fde121c78de3a8ee4cc11 pristine_git_object: 7cd76ff4dc2354a55ae8b7bf08fbe46cf20ab081 + docs/sdks/traces/README.md: + id: f3d9b8dc85fd + last_write_checksum: sha1:a2c55e22aba98e6c66f50e14a946f72c1311df6f + pristine_git_object: 727fc32a49ca08dacbe05786fa47c467a9e119e9 docs/sdks/transcriptions/README.md: id: 089cf94ecf47 last_write_checksum: sha1:548786cb29e8500574afaaa771a5184c81fe2ebc @@ -3656,8 +3892,8 @@ trackedFiles: pristine_git_object: 4460111c987bcf347732eb103b09841c2a71bae7 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:996573211965d32524d59a59b6a28b17dfa5657c - pristine_git_object: ed0a0a74a0bce122fa88a56b3c6f811d8d3c9dea + last_write_checksum: sha1:8f921a6fcab7b4bd0bcb706ee05c45306e77974f + pristine_git_object: 9c344c22c234478584a41f314f308a192c9c677c docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3688,8 +3924,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:8d3394fa92f1d021e90545d287ebcc1f320a210a - pristine_git_object: ed6f853133371201aaee4f66f431704cfd36dfdb + last_write_checksum: sha1:206fd4f4ef202e7c99ab2a316809a5814ec7d968 + pristine_git_object: 9e09a5875fb696517ddc7e71ff99197c3fd6bee7 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:5f1fbb7eb973dd8bcbe33bf0b303d4df3bf2ad36 @@ -3740,8 +3976,8 @@ trackedFiles: pristine_git_object: 36329ea6180905b8ea4607d5a5aa83e297a7bdee src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:07b075d16e7838ed283f04775871d77d32758950 - pristine_git_object: f6ce70a8b48c758448f3191b1b3763ab4bcc5bf6 + last_write_checksum: sha1:a97df2f087578417a3308e72b1b3dc3c7d8a6f06 + pristine_git_object: 6f7c2e87b29e8a91f831531352234ae69da7b3a0 src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:c6f4ab6903aa74f88d267552c01d79b4ca08534d @@ -3796,8 +4032,8 @@ trackedFiles: pristine_git_object: 4ebb6505f0c8aa342f6daad6eaf73c92cff300fe src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:b9558bb68c97db073706f9a2c53afbbc8049990c - pristine_git_object: aa22f09ebdc95526314bf5ba0c86cb9e48ed9f42 + last_write_checksum: sha1:967e3ba9573627471c9f54d38e30648c40fc3c52 + pristine_git_object: 2956c851d3029dcf43f48ebb2b81f9dfd12918c5 src/mistralai/client/fields.py: id: 862335210b20 last_write_checksum: sha1:1af13d8200df61b54b0e1f0a679feb76484c6bd0 @@ -3834,14 +4070,18 @@ trackedFiles: id: d43a5f78045f last_write_checksum: sha1:555755528cb5283aa561c7eee818102b4ef75dbe pristine_git_object: 3076d09c7582f18d197208178a88520e4bc9220e + src/mistralai/client/logs.py: + id: 8cf582f9ca81 + last_write_checksum: sha1:4c9665d21e2277d67a6cb4c0a56b963dab68bb44 + pristine_git_object: e101dd4d0e0ac7c5d3f95a4fbdf21590b8532dda src/mistralai/client/metrics.py: id: 937cb03f8130 last_write_checksum: sha1:0a529a333e416df4907837b24006bca6f462de9c pristine_git_object: d3814d6b3d2fd548b9ae7f97a1f4d27592ca97bf src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:ae857a4221c6567e9741b1c681f54ff9605a0bac - pristine_git_object: 2ef48e53d50e4049d2578d38231157a966eb3867 + last_write_checksum: sha1:4a0f126afbf6fc10080662b63085c31cd91266c6 + pristine_git_object: e12b9677cfe6b0b641ad79e3f0dd45063b552279 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:b5246e203765ba0532a6a65d391bdd237ab2c891 @@ -4048,8 +4288,8 @@ trackedFiles: pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:daf1a595cf333e7ee53378849430e79aba1d253a - pristine_git_object: 2b45183d4d4727551377e12615d216dc8a64f62d + last_write_checksum: sha1:a2c9684fc156083788586d031fabb3f389f021e8 + pristine_git_object: 88470163b1a599e2b11acac21ae4121aabd7b92b src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e @@ -4308,8 +4548,8 @@ trackedFiles: pristine_git_object: a746ff5e09af76bf2aa4135b5fc675c816a8941f src/mistralai/client/models/connector_get_auth_url_v1op.py: id: 2e6b9ab43d1d - last_write_checksum: sha1:2664256790f9aa838e601a0049b0af50158dca0a - pristine_git_object: c9b5833365aa395e6d669c2bca9ff429e917334a + last_write_checksum: sha1:9c98e68496578681fca2466ed5ee45d5a85d9332 + pristine_git_object: 854fbcd3240d09b3e07e2e9fe032f9a19d27f2e9 src/mistralai/client/models/connector_get_authentication_methods_v1op.py: id: 6861e4d57959 last_write_checksum: sha1:8114ef46326cfcdadbbcc73fdcdc9ab52f3d8e0d @@ -4697,7 +4937,7 @@ trackedFiles: src/mistralai/client/models/encodedpayloadoptions.py: id: 97955ebc2eb9 last_write_checksum: sha1:e2563e89bb821157b091f8723e0d65f24b43831d - pristine_git_object: cc19b54359640f2af7a058f179a459cc2d70c539 + pristine_git_object: 54bcaf13d10d711ec133c64bc3dac6d5e235d9ea src/mistralai/client/models/encodingformat.py: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 @@ -4738,6 +4978,14 @@ trackedFiles: id: 14518c40a13b last_write_checksum: sha1:351fb4a74622cb70969b728ac65b62ca670fc7e5 pristine_git_object: 56b58ae369ffb75c9556ef20af79b985fe3db710 + src/mistralai/client/models/executionlogrecord.py: + id: 59aa2dd2c4a1 + last_write_checksum: sha1:16fbfe0ec4c088e43b018dd3eb79ee0c3c8769ab + pristine_git_object: 3e889cc4657f09c21824b43233a5a2d038e4074c + src/mistralai/client/models/executionlogsearchresponse.py: + id: 967bf5f43b22 + last_write_checksum: sha1:0c4798d0793091f48d614f73208fa5bb62b5b18d + pristine_git_object: 8095c3149fbca09c6b089e4e5638d54a39a66277 src/mistralai/client/models/export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop.py: id: 74f5f3183b64 last_write_checksum: sha1:8d7dde90d9c55b520aa9300a25c843a0b866638b @@ -4748,8 +4996,8 @@ trackedFiles: pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec src/mistralai/client/models/extendedoauthservermetadata.py: id: 967e2e08f18c - last_write_checksum: sha1:4e45471402c02931d691e642da399f4ad723cef2 - pristine_git_object: a3ec07d341ea54ab6b6a2f22d14f2a2ae8fa25b9 + last_write_checksum: sha1:f0e07e94a601d564cf981c8ab6e947f6a7cc0e99 + pristine_git_object: e45827d5693e352a5a46c5c831ecbcb197e30992 src/mistralai/client/models/failure.py: id: 596e38493eaa last_write_checksum: sha1:5077e5660c7192e2123fc26059f1786f9d75e273 @@ -4758,6 +5006,22 @@ trackedFiles: id: 19109368b436 last_write_checksum: sha1:2dfbc8aa7110a57f892ad80002cc01bc4c94589d pristine_git_object: bf248758026549d8e2395895dfb18eccf96cc31c + src/mistralai/client/models/feedresultgetlog.py: + id: 35106cf21e36 + last_write_checksum: sha1:44a5beb07e0cf6febaabc2fdf47580f602ddbb12 + pristine_git_object: f3395a68c676fecb020d16bb5b6a045bce7daef8 + src/mistralai/client/models/feedresultgetspan.py: + id: 39914702ec21 + last_write_checksum: sha1:22ce31f58317b89d21cb8c5c555d33eaf725bb5f + pristine_git_object: 20663e3ffa59f33c08484dcb7add7a6f90210288 + src/mistralai/client/models/feedresultgetspanevaluation.py: + id: 75d380a8e7fb + last_write_checksum: sha1:d7d0757b78365abc106c6f7ebc3b686d90b5eb94 + pristine_git_object: 757fba768cde5aecae01eb6f164aae4cbbd2398b + src/mistralai/client/models/feedresultgettrace.py: + id: 8216f7641078 + last_write_checksum: sha1:15cc0530202ce3bfb58de7f4bb2c880924d1187f + pristine_git_object: 142a9cebb99986cc5b54aaed666bf8945403852b src/mistralai/client/models/fetchcampaignstatusresponse.py: id: b74b57603a4c last_write_checksum: sha1:62b1fd7d42f79518e15abdb07b11cac817837e1e @@ -4966,6 +5230,10 @@ trackedFiles: id: fa04e3db7781 last_write_checksum: sha1:d59740c9021cd891db4b81a7f4c6aeeecb9d6958 pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e + src/mistralai/client/models/get_log_field_options_v1_observability_logs_fields_field_name_options_getop.py: + id: 5cb47b819527 + last_write_checksum: sha1:ea64702c4c1739338f05b2d5cd7fa7acdc5b8662 + pristine_git_object: 0bf3b7fb14005c0260f13aeee408fd48a93fb935 src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py: id: 9d566ab77998 last_write_checksum: sha1:d75b0ea41941a0d1a0b748cf5181a976ecba068f @@ -4986,10 +5254,34 @@ trackedFiles: : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf + src/mistralai/client/models/get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop.py: + id: 5827757f5577 + last_write_checksum: sha1:ac120196f4ea7caf6446f878c017e0fc4b182f56 + pristine_git_object: 64fc2d8043e55edca55e80cb205b4c3eba98f461 + ? src/mistralai/client/models/get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop.py + : id: 366d52a81fad + last_write_checksum: sha1:9a5bc27ff1e24fc0faf49aba3c94497997a929a4 + pristine_git_object: 54b337976356fb67b2740d8d592ca47526ccbc12 + src/mistralai/client/models/get_span_field_options_v1_observability_spans_fields_field_name_options_getop.py: + id: 5a4fca728b6e + last_write_checksum: sha1:84168c2c05cf3382c418dfd5b4eb144c4fb69930 + pristine_git_object: 40aead4d66763f732bc2c885ad7da56dbb1fe44d src/mistralai/client/models/get_stream_events_v1_workflows_events_stream_getop.py: id: 8dd6ce0e8d66 last_write_checksum: sha1:021765a807c5b127c3bfabbf227e952e10f5be88 pristine_git_object: 442a7a940b03c27b173281626d612b650a1ade2d + src/mistralai/client/models/get_trace_by_id_v1_observability_traces_trace_id_getop.py: + id: a7ad88602f1b + last_write_checksum: sha1:7a1d9296c7e556daf5e9c50be963272705f3c932 + pristine_git_object: fb84444bb2a26e30a7592073febd72ec69fe7377 + src/mistralai/client/models/get_trace_field_options_v1_observability_traces_fields_field_name_options_getop.py: + id: 56e51fef9440 + last_write_checksum: sha1:169aafabc91b71e7f33fbb882b95ad5f62f6ebef + pristine_git_object: 0d8fc763acc4ddc3bcd8bd37ce121c59b93dd135 + src/mistralai/client/models/get_trace_spans_v1_observability_traces_trace_id_spans_getop.py: + id: e0cacaec1f92 + last_write_checksum: sha1:d0c31c482ab3552cfb869567a038b589c3efe72a + pristine_git_object: c7f0e39c9b28a6c1c766ac958fe21674e031f819 src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py: id: a5838063aee4 last_write_checksum: sha1:457e62a76bd229aecf1725c5f813de63e35d8b7e @@ -5006,6 +5298,10 @@ trackedFiles: id: 8d636c8cad1e last_write_checksum: sha1:783549db97e2001b739d807715242c8428c4d922 pristine_git_object: c71a23052cd42092941951cf0157734253535e0a + src/mistralai/client/models/get_workflow_execution_logsop.py: + id: 53708093eaee + last_write_checksum: sha1:816539cc9ad4b9f2edd8197a6703e3529e98d31f + pristine_git_object: 1bfe5f52104a14535b5751d9ebfb6d24bca525a0 src/mistralai/client/models/get_workflow_execution_trace_eventsop.py: id: 75438195bf19 last_write_checksum: sha1:3fc47c8b7c301c1029f6a10e30298d8bc776d140 @@ -5040,16 +5336,80 @@ trackedFiles: pristine_git_object: 20d0b6dd4e74c9c39a8b95cb9f9ec590d146574f src/mistralai/client/models/get_workflows_v1_workflows_getop.py: id: a128585aee76 - last_write_checksum: sha1:50bf8e528718773445fcd3b9ae467973e9fd9cf2 - pristine_git_object: 74ee649ed31ca0500345bd15a7dd37ddede1d190 + last_write_checksum: sha1:97ec61edfc3926632b23314f7f170b04480d8ebc + pristine_git_object: 8c40d4275ed2c4ae37b4a7b33245abd9db8078e3 src/mistralai/client/models/getfileresponse.py: id: 81919086e371 last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 pristine_git_object: 37c29bbb41ab44aa6d42ea7e7f094d52a210a5a8 + src/mistralai/client/models/getlog.py: + id: c9beb29863bc + last_write_checksum: sha1:9aa935de8e9b915abe58ef4df7b91e4795ab1f05 + pristine_git_object: 3c889062440e8f02ce46ff09917c11c712e19a50 + src/mistralai/client/models/getlogfieldoptions.py: + id: cdb24e2ec44c + last_write_checksum: sha1:c74ff129fddf24b79169fea945de409dff2cf641 + pristine_git_object: 4f5bacd66a3a1ba2861b5aabc98e3387c3bca774 + src/mistralai/client/models/getlogfields.py: + id: e9f0f8c894f0 + last_write_checksum: sha1:4433885270d7f25dca166e587470de347e59504f + pristine_git_object: e82e2cbcaf6b2abf3babc44128b385911cf94702 + src/mistralai/client/models/getlogs.py: + id: e93e67a4d749 + last_write_checksum: sha1:1a7bbdfbfe84ec6fa74dc30385d05249483e68a3 + pristine_git_object: a6f91a87a723c9b738f3778b4e1a7a557ca2bfe3 src/mistralai/client/models/getsignedurlresponse.py: id: cee4e4197372 last_write_checksum: sha1:ab9adbc06e7f02e791dc549ad1850ce1b1a250a7 pristine_git_object: 4ba95894f2b89719fa58e7e397c28014dbd00316 + src/mistralai/client/models/getspan.py: + id: eebc129308d2 + last_write_checksum: sha1:36d1cbc51453f08b025656ae88656189798e96a7 + pristine_git_object: d8bd907633a3b9b4502276d67f26c81a58d78012 + src/mistralai/client/models/getspanevaluation.py: + id: 274e902cefd1 + last_write_checksum: sha1:e1832838ca7c9b5c3d948548e46f90b9a9e32387 + pristine_git_object: 44e63d6f07498ef12abe68151ba20b77ba893108 + src/mistralai/client/models/getspanevaluationfieldoptions.py: + id: 345fd459adff + last_write_checksum: sha1:136b066b65168fabb82177851fc299d7fdf23fb0 + pristine_git_object: 5e91348fdad25fbd715a87d336409cd60f20cba7 + src/mistralai/client/models/getspanevaluationfields.py: + id: a35c5328a90e + last_write_checksum: sha1:7c48cb1d45c92c2464ed95caf2ba133bd1a4aa05 + pristine_git_object: 06a117790d058f5be3649795e2c346370f0a6e88 + src/mistralai/client/models/getspanevaluations.py: + id: 91934f70cd68 + last_write_checksum: sha1:6031b6f39af715eac3a19c688ec13dd29df3492d + pristine_git_object: 742fdc0a08c93e858f767fa1f391fc218d533bb5 + src/mistralai/client/models/getspanfieldoptions.py: + id: 44b61b93e49c + last_write_checksum: sha1:7a37ba2709f4e5a2e25c663fbea4b6971d7d9a38 + pristine_git_object: ac7b91a611961a579810031fd385240d5e593adb + src/mistralai/client/models/getspanfields.py: + id: 81804f477af7 + last_write_checksum: sha1:8b131af3aa2e47c9dd2e5fd1e67a74d69f0973dc + pristine_git_object: 09bd8171649b23331161b525eb787bea5a5d0b37 + src/mistralai/client/models/getspans.py: + id: c95cbe1b0843 + last_write_checksum: sha1:9b8d86a2bf87a3bdba93bdb65bed0820c9027369 + pristine_git_object: 5878cb5c3adfc719ef2d89b743f3068c932c363e + src/mistralai/client/models/gettrace.py: + id: 3c7e1abbc64a + last_write_checksum: sha1:8076022da53ee339572c6676db06efef09a02a48 + pristine_git_object: 572d74406b3510dd0be4ba93922abcab85805d4e + src/mistralai/client/models/gettracefieldoptions.py: + id: 9b0f5432d5ef + last_write_checksum: sha1:862ff4404eac75000714fffc7fada2474b6b89de + pristine_git_object: 1dd9e51c47b72bd8b5e1142c405a8f833a0b2798 + src/mistralai/client/models/gettracefields.py: + id: 528937f57e92 + last_write_checksum: sha1:91bcfbc0a5873005b1f331431642abfe646e74f6 + pristine_git_object: 085641a06bd2aa47a13a939b8a6b3a02013688b7 + src/mistralai/client/models/gettraces.py: + id: d94016253ab3 + last_write_checksum: sha1:bd40e57299f57d33cc8c0dbf566e3ec631ebbe9d + pristine_git_object: 86d87ddd14d38aa488ae205fa3f8224a064b9ced src/mistralai/client/models/githubrepository.py: id: 4bc83ce18378 last_write_checksum: sha1:4c1358be59e667394757b01a5eeebb4b5ce134f4 @@ -5348,8 +5708,8 @@ trackedFiles: pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py: id: 2f1b225158c3 - last_write_checksum: sha1:2c2e900a0aa6336031ac08a73ae2dc6fa335e644 - pristine_git_object: 3237a29abcce0972fdc4613ffcfa38eea5e2a0e9 + last_write_checksum: sha1:5289a8b428d52192c8a71d5ee5870bc4b4397d3c + pristine_git_object: aad96c2d45122698739ebd4d6470e7955a7f122c src/mistralai/client/models/list_voices_v1_audio_voices_getop.py: id: 6b3ce5be1294 last_write_checksum: sha1:f11a5135ce79d1913db87f9db7d05b4266630b20 @@ -5418,6 +5778,10 @@ trackedFiles: id: 48d46c10b453 last_write_checksum: sha1:4be5e5411b84d61ed53b72140e2914b94902995f pristine_git_object: 1b87693c0db77be8767af91cc72e80d58a342dab + src/mistralai/client/models/logsrequest.py: + id: 2972072d4ad2 + last_write_checksum: sha1:5aca3a318b1fddc96802455c3c0b53d2207b2539 + pristine_git_object: e52d471295e16a81ffcfb96c6758a315f22670b9 src/mistralai/client/models/mcpprompt.py: id: eac4133413b2 last_write_checksum: sha1:003b0a3bf0f7af4db962697e1604510710709983 @@ -5562,14 +5926,10 @@ trackedFiles: id: 167c3b8a104e last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd - src/mistralai/client/models/oauthmetadata.py: - id: eba3c5e15b74 - last_write_checksum: sha1:16e6807e061958cf349e1f4c1ed198d9d5e3551b - pristine_git_object: 6b7c67113871f7313b3931f974c5770d20780b11 src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 - last_write_checksum: sha1:48e211ca35c9df84914a119d118e2645862dc557 - pristine_git_object: 6c1826ed797ecb1a4b1e1e8abd2477bae3cdce60 + last_write_checksum: sha1:39091cd31cbf769fb401de3d67ac2f13994f3d0c + pristine_git_object: f2a63b130dd93f1fd067ac7b42f3601c696ef1d5 src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 @@ -5610,6 +5970,10 @@ trackedFiles: id: 272b7e1785d5 last_write_checksum: sha1:eb223a88b7e5175056197f64bb4bce2c88ccea19 pristine_git_object: bfd748e0010e6acc404fdadfff40ee54ac52b9be + src/mistralai/client/models/otelfielddefinition.py: + id: 4bf75d7f4f70 + last_write_checksum: sha1:58c77cd17c2a2378fe2f94f8f1a517efc460dd5a + pristine_git_object: 2bd04c1ff32488a766d5eed2ed3e282bc61001cf src/mistralai/client/models/outboundauthenticationtype.py: id: 705e7172ba40 last_write_checksum: sha1:d6adf36591b12a6ae41962bf985a74fa54574410 @@ -5890,6 +6254,26 @@ trackedFiles: id: 745d146d9413 last_write_checksum: sha1:ffa517cc252189aab02c3dd0b342475e2aa2e5a5 pristine_git_object: ad46a70d3b507aac0811d7250e5a11fb26d5b32b + src/mistralai/client/models/search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop.py: + id: 26821a9e16a7 + last_write_checksum: sha1:670cb56fbed3d0ab3cf90f091643657a80e2db2b + pristine_git_object: d88c434c92a59eb426eec1d9a3ad5d441306a9eb + src/mistralai/client/models/search_logs_v1_observability_logs_search_postop.py: + id: 601f46c3df14 + last_write_checksum: sha1:729f635f534eeab3c2731797554b4c11854c982a + pristine_git_object: fb63879dbc0f9cb61013c1003a858f01aae85f0c + src/mistralai/client/models/search_span_evaluations_v1_observability_spans_evaluations_search_postop.py: + id: 13b5c72c2e76 + last_write_checksum: sha1:25d021e05a11e8ad71ceb17943cd3d43cd8e3342 + pristine_git_object: 8647b6302572a9bec14140ea0975b3913f37aa6c + src/mistralai/client/models/search_spans_v1_observability_spans_search_postop.py: + id: 0d9b8600ae11 + last_write_checksum: sha1:db334dd101a3b501c29dde190d4a364c83b97a3c + pristine_git_object: 158475f17a3cfd65f48184e522242ca60d73bf63 + src/mistralai/client/models/search_traces_v1_observability_traces_search_postop.py: + id: b7758d63781e + last_write_checksum: sha1:f2a58f137a55c9bbc6ea3f1d7f5d790ab9022b2b + pristine_git_object: ad4d368fd60fbce97e4ba4ca5c9be4c317e4e5a9 src/mistralai/client/models/searchchatcompletioneventidsrequest.py: id: cabc8ef82d67 last_write_checksum: sha1:3290793dcf229bffc16b16d32d2c599c9a54bf4a @@ -5966,6 +6350,14 @@ trackedFiles: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 pristine_git_object: fcea403cdbad44299fb2178f07a63bb7e83dc033 + src/mistralai/client/models/spanevaluationsrequest.py: + id: 89836411323a + last_write_checksum: sha1:e4d1c575877f3070fdf6967b1faed1f96890340a + pristine_git_object: 08f020c5ca5e1dc542e0bfa886f96315faf1a0f0 + src/mistralai/client/models/spansrequest.py: + id: aca856aff5b4 + last_write_checksum: sha1:a08874681f1afeb1f3db1df01903d1e4a4555aec + pristine_git_object: 5f34709ba05304c005b081b8293426198706d3bd src/mistralai/client/models/speech_v1_audio_speech_postop.py: id: 7ab5c1250642 last_write_checksum: sha1:df0d69df993dc2615822996db86ab643d5d745d4 @@ -5998,6 +6390,14 @@ trackedFiles: id: 793a9301522f last_write_checksum: sha1:c05e4bedbc131352b0b275e2bef7eb2f541433b0 pristine_git_object: 5282e52aeb9c3dc5729b5cd54502802bc9c514e1 + src/mistralai/client/models/stream_workflow_execution_logsop.py: + id: 33528845f8f2 + last_write_checksum: sha1:6338be8a5d5d4b87c3bb948f0441e29f66f2f4da + pristine_git_object: 653d2a5bdc55737d113ef4384bcb73af087605dc + src/mistralai/client/models/streamerror.py: + id: 2632e221b587 + last_write_checksum: sha1:53167bbef17d9b0055db8b8492854e06cd69f478 + pristine_git_object: ddc939b2cdbc2acf45596e707b964bf20d0d8720 src/mistralai/client/models/streameventssepayload.py: id: c6becbbd80bc last_write_checksum: sha1:c54a8dc9c54e62937b61b52e2b5ce3ff3c422ce7 @@ -6190,6 +6590,10 @@ trackedFiles: id: cbe8c44aee50 last_write_checksum: sha1:53949106f192944a13a8fcbeb37b3d08478b7bbc pristine_git_object: 1a7781fc2c1001002785d512ed7909ce91a9129f + src/mistralai/client/models/tracesrequest.py: + id: df80914625df + last_write_checksum: sha1:26f12ccd773c5ce0776fa6787ade821b6f70910a + pristine_git_object: ac646efbbae15a75879507eb12a720b2a3c263ea src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 @@ -6226,6 +6630,10 @@ trackedFiles: id: 6086dc081147 last_write_checksum: sha1:968b4bc32731be6c63be3fd90eb26f4357f891a3 pristine_git_object: 42f0ffb7f16bee4f68f9db9807aa4ec3d9ae5176 + src/mistralai/client/models/trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop.py: + id: 99d0d53968f6 + last_write_checksum: sha1:be4d3deab761e55d4bca88c631a1a02b3c2e7d60 + pristine_git_object: 46a68a00836dce74cc8555b9986ad9822b180b3b src/mistralai/client/models/turbinemeta.py: id: 084d588caa1e last_write_checksum: sha1:4a0ffc6cecc9ad674ab4eab0b3bb017682beddc2 @@ -6396,8 +6804,8 @@ trackedFiles: pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae src/mistralai/client/models/workflow.py: id: 1548cd73984e - last_write_checksum: sha1:b2160bed9b6a20189497e8e341801f3a1ad74279 - pristine_git_object: 646ad0b9285ec9be8be8e5b11d190f919d205092 + last_write_checksum: sha1:72486159cb2975256d76a89ee614eec0f792d12e + pristine_git_object: 4c614b2f6da7cad37bfa202e2509855c47c16890 src/mistralai/client/models/workflowarchiveresponse.py: id: 64c479b7f9da last_write_checksum: sha1:7e14d02314fcc8dab22a6a908f89122491449151 @@ -6428,8 +6836,8 @@ trackedFiles: pristine_git_object: f2ab37272302e036bfdc4e11bd4d76096b4f2c90 src/mistralai/client/models/workflowcodedefinition.py: id: 36fd5b898ddd - last_write_checksum: sha1:bd77f4a5e5b32892f806278bcd6dc2d951f10629 - pristine_git_object: 84444ce61006301fb145cc2fefcc577d7a2dc1fe + last_write_checksum: sha1:1277353a1e3816228a9cc9491b3c1bb53533aabc + pristine_git_object: 1f3009bf8305bc05c579c0d5582dfe1bcbe48762 src/mistralai/client/models/workfloweventtype.py: id: b4aeeb03b57a last_write_checksum: sha1:451a78dadc17941f397d73ff83c14d552f7150d7 @@ -6574,6 +6982,10 @@ trackedFiles: id: c77172c4a9f6 last_write_checksum: sha1:dd347319557279367f8ccde9158dec6c4586f528 pristine_git_object: d74ba1dae81bccffa812df2a64babad0a61af787 + src/mistralai/client/models/workflowscheduletriggerrequest.py: + id: 794505d95b73 + last_write_checksum: sha1:65ab9e154d0ad3dda0dfcc00a3d2a4d8e87f5649 + pristine_git_object: 38e3cc67c325ce70f8f8cc38fe16fa7d10bf09e3 src/mistralai/client/models/workflowscheduleupdaterequest.py: id: 72ca0f5e6c08 last_write_checksum: sha1:ad25f903339edb6d9d018ba280a39789b81ffb28 @@ -6612,16 +7024,16 @@ trackedFiles: pristine_git_object: 3336e448baf9f21cf5bfd1369e6268ea3a7d5e24 src/mistralai/client/models/workflowwithworkerstatus.py: id: e1055203af7d - last_write_checksum: sha1:d7fbcf294d061a98093bb8216febe25f48045d8c - pristine_git_object: 5411d961c1beae04097dd788fe2ae882c04160de + last_write_checksum: sha1:8eb55733f39dd7ae9652964ec8e3130654336617 + pristine_git_object: cb8f97ef33643200070a256e2aed4f38eec91ebd src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:13c8bd4907bf201957c2a9da00616618ca13e0db pristine_git_object: 6263ead9a2934b431111fe1a80d1ba2eccc48f42 src/mistralai/client/observability.py: id: 453a1d06d130 - last_write_checksum: sha1:62d4d03a08807271b404a8684b1153a739d70b05 - pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 + last_write_checksum: sha1:354c8d41bac3b533359b9b1a5ca02a6aa869080c + pristine_git_object: 4d07debc5757055464dd0fb3cd1b5b0aebd3cfe8 src/mistralai/client/ocr.py: id: 2f804a12fc62 last_write_checksum: sha1:8d503853c2571bde3cc8bc205b86fe519788a331 @@ -6640,12 +7052,12 @@ trackedFiles: pristine_git_object: 5a4c3c8463a8245dc5de73c2cf93ba85f870ff5e src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:70aa67885af67c0a01c91028dad0a7beb4151f44 - pristine_git_object: 01507e33e8b1fb37fbd778fcad8abf3a5f1e8d7e + last_write_checksum: sha1:1cd69ac7c3dada96d9855bf43acb09475e802c8f + pristine_git_object: 13a72034f1a9a4fd3b89267c8edcf2b7f0180f9b src/mistralai/client/schedules.py: id: d3b4fe452390 - last_write_checksum: sha1:573ca09239d46817b60637a6348e02bebb5ca617 - pristine_git_object: c56e497365a765be6d3bc794aab67d63fa9f7cd2 + last_write_checksum: sha1:66ec0494d13047bcade8e24216ff9f5c185523b5 + pristine_git_object: bed0ee4ecd43eb1bb20b02110b2ca300747b6a15 src/mistralai/client/sdk.py: id: 48edbcb38d7e last_write_checksum: sha1:6194b5d4e8259276a5a4a581ef478e35948a59df @@ -6658,10 +7070,18 @@ trackedFiles: id: c5a0a7df993a last_write_checksum: sha1:6e0fcf67162312f3ccba44d1e1f2983bd5635ae8 pristine_git_object: 522ae338029948d81686f2481287d4745f9737ce + src/mistralai/client/spans.py: + id: 408477ccb9d4 + last_write_checksum: sha1:db53bafe7fbc5f9900a4e4fd30816ae566ee1936 + pristine_git_object: ced45177aa40ed25adfaef6d2f3659ad145a51e3 src/mistralai/client/speech.py: id: 5c1f1109aa5e last_write_checksum: sha1:22ce4e2c43162a21f01dd43e66c3d92945560e72 pristine_git_object: 42cb1bbb47ac7daf68103b9934d8067f1fda6292 + src/mistralai/client/traces.py: + id: 8af61cbcf718 + last_write_checksum: sha1:c64e19867b0a5376ab9e3f7e37396290bde7ede3 + pristine_git_object: ea8ad33200f0488c518bfe4ba9b49c6d93358c09 src/mistralai/client/transcriptions.py: id: 75b45780c978 last_write_checksum: sha1:897eee298c4d342650ef73a7c7bcfd640752bba6 @@ -6756,8 +7176,8 @@ trackedFiles: pristine_git_object: 58b24beceeebe317088b3c1e4948332fb1936095 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:c83e6bfecd346baa3a351c4c2daf47d0b27db470 - pristine_git_object: af4c82f2aa0d34c869356ab521b855053f1d7eb5 + last_write_checksum: sha1:36e71409a9553adc48476cbaa3b1a3f6c59fb0fa + pristine_git_object: 066614325d9497a5b81e28502e8173f01b3ebf31 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:7ea1bf2efb7a2113a672a4655c97210d29b6ed29 @@ -8697,6 +9117,7 @@ examples: connector_id_or_name: "" query: bind_connection_to: "user" + github_installation_link: false responses: "200": application/json: {"auth_url": "https://unlined-suv.com", "ttl": 786815} @@ -8805,6 +9226,8 @@ examples: active_only: false include_shared: true limit: 50 + sort_by: "display_name" + order: "asc" responses: "200": application/json: {"workflows": [], "next_cursor": "d354b4ce-6ab4-45a8-93bc-a2df586c46d4"} @@ -8820,7 +9243,7 @@ examples: limit: 50 responses: "200": - application/json: {"workflow_registrations": [], "next_cursor": "6b512fbb-9584-4ea5-bfdb-e90316f436fd", "workflow_versions": [{"id": "e6e0d049-e303-4710-bda9-61cd5196b1ec", "task_queue": "", "definition": {"input_schema": {"key": "", "key1": ""}, "enforce_determinism": false}, "workflow_id": "96d7cee5-611b-4a26-82d8-3e6c84cc894d", "compatible_with_chat_assistant": false}]} + application/json: {"workflow_registrations": [], "next_cursor": "6b512fbb-9584-4ea5-bfdb-e90316f436fd", "workflow_versions": [{"id": "e6e0d049-e303-4710-bda9-61cd5196b1ec", "task_queue": "", "definition": {"input_schema": {"key": "", "key1": ""}, "enforce_determinism": false, "on_behalf_of": false}, "workflow_id": "96d7cee5-611b-4a26-82d8-3e6c84cc894d", "compatible_with_chat_assistant": false}]} "422": application/json: {} execute_workflow_v1_workflows__workflow_identifier__execute_post: @@ -8854,7 +9277,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false, "active": true}} + application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "archived": false, "active": true}} "422": application/json: {} update_workflow_v1_workflows__workflow_identifier__put: @@ -8866,7 +9289,7 @@ examples: application/json: {} responses: "200": - application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} + application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} "422": application/json: {} get_workflow_registration_v1_workflows_registrations__workflow_registration_id__get: @@ -8879,7 +9302,7 @@ examples: include_shared: true responses: "200": - application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} + application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false, "on_behalf_of": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false, "on_behalf_of": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} "422": application/json: {} archive_workflow_v1_workflows__workflow_identifier__archive_put: @@ -8889,7 +9312,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} + application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} "422": application/json: {} unarchive_workflow_v1_workflows__workflow_identifier__unarchive_put: @@ -8899,7 +9322,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} + application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} "422": application/json: {} get_workflow_execution_v1_workflows_executions__execution_id__get: @@ -9060,6 +9483,7 @@ examples: parameters: query: page_size: 50 + order: "desc" responses: "200": application/json: {"executions": [{"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "CONTINUED_AS_NEW", "start_time": "2025-04-05T20:23:16.180Z", "end_time": "2025-07-01T00:28:44.234Z"}]} @@ -9440,7 +9864,7 @@ examples: application/json: {"workflow_ids": []} responses: "200": - application/json: {"archived": [{"id": "7d8a39b0-ac85-4a75-bc3c-a21d9d086958", "name": "", "display_name": "Dominic_Wisozk95", "type": "code", "customer_id": "85b3fb51-c815-4b9e-b51b-8d81a405b5e3", "workspace_id": "7dd61975-6390-409d-b7f3-839b110cbb97", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}]} + application/json: {"archived": [{"id": "7d8a39b0-ac85-4a75-bc3c-a21d9d086958", "name": "", "display_name": "Dominic_Wisozk95", "type": "code", "customer_id": "85b3fb51-c815-4b9e-b51b-8d81a405b5e3", "workspace_id": "7dd61975-6390-409d-b7f3-839b110cbb97", "available_in_chat_assistant": false, "is_technical": false, "archived": false}]} "422": application/json: {} bulk_unarchive_workflows_v1_workflows_unarchive_put: @@ -9474,6 +9898,196 @@ examples: application/json: {"schedule_id": ""} "422": application/json: {} + search_logs_v1_observability_logs_search_post: + speakeasy-default-search-logs-v1-observability-logs-search-post: + parameters: + query: + page_size: 50 + requestBody: + application/json: {"order": "desc"} + responses: + "200": + application/json: {"logs": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"}} + get_log_fields_v1_observability_logs_fields_get: + speakeasy-default-get-log-fields-v1-observability-logs-fields-get: + responses: + "200": + application/json: {"field_definitions": []} + "400": + application/json: {"detail": {"message": "", "error_code": "CAMPAIGN_NO_MATCHING_EVENTS"}} + get_log_field_options_v1_observability_logs_fields__field_name__options_get: + speakeasy-default-get-log-field-options-v1-observability-logs-fields-field-name-options-get: + parameters: + path: + field_name: "" + responses: + "200": + application/json: {"options": ["", ""]} + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_DID_NOT_CHANGE"}} + search_traces_v1_observability_traces_search_post: + speakeasy-default-search-traces-v1-observability-traces-search-post: + parameters: + query: + page_size: 50 + requestBody: + application/json: {} + responses: + "200": + application/json: {"traces": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_CURRENTLY_RUNNING"}} + get_trace_fields_v1_observability_traces_fields_get: + speakeasy-default-get-trace-fields-v1-observability-traces-fields-get: + responses: + "200": + application/json: {"field_definitions": []} + "400": + application/json: {"detail": {"message": "", "error_code": "AUTH_UNAUTHORIZED"}} + get_trace_by_id_v1_observability_traces__trace_id__get: + speakeasy-default-get-trace-by-id-v1-observability-traces-trace-id-get: + parameters: + path: + trace_id: "" + responses: + "200": + application/json: {"customer_id": "", "organization_id": "", "workspace_id": "", "user_id": "", "trace_id": "", "root_span_id": "", "root_span_name": "", "start_time": "2025-10-05T23:00:19.469Z", "end_time": "2026-03-27T13:19:54.471Z", "duration_ns": 845999, "service_name": "", "environment": "", "conversation_id": "", "workflow_name": "", "agent_id": "", "agent_name": "", "status_code": "Error", "error_count": 752897, "span_count": 844729, "gen_ai_span_count": 268823, "llm_call_count": 716513, "tool_call_count": 899647, "retrieval_count": 51874, "evaluation_count": 454413, "input_tokens": 162737, "output_tokens": 349146, "cache_read_input_tokens": 964559, "cache_creation_input_tokens": 10396, "models_used": [""], "tools_used": [""], "first_turn_last_input_message": "", "first_turn_last_output_message": "", "last_turn_last_input_message": "", "last_turn_last_output_message": ""} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_NAME_ALREADY_EXISTS"}} + get_trace_spans_v1_observability_traces__trace_id__spans_get: + speakeasy-default-get-trace-spans-v1-observability-traces-trace-id-spans-get: + parameters: + path: + trace_id: "" + query: + page_size: 50 + responses: + "200": + application/json: {"spans": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_UNAVAILABLE"}} + get_trace_field_options_v1_observability_traces_fields__field_name__options_get: + speakeasy-default-get-trace-field-options-v1-observability-traces-fields-field-name-options-get: + parameters: + path: + field_name: "" + responses: + "200": + application/json: {"options": ["", "", ""]} + "400": + application/json: {"detail": {"message": "", "error_code": "CAMPAIGN_NO_MATCHING_EVENTS"}} + get_span_by_id_v1_observability_traces__trace_id__spans__span_id__get: + speakeasy-default-get-span-by-id-v1-observability-traces-trace-id-spans-span-id-get: + parameters: + path: + trace_id: "" + span_id: "" + responses: + "200": + application/json: {"customer_id": "", "organization_id": "", "workspace_id": "", "user_id": "", "trace_id": "", "span_id": "", "parent_span_id": "", "trace_state": "", "start_time": "2026-01-20T21:14:26.260Z", "end_time": "2024-01-20T15:01:29.829Z", "duration_ns": 49973, "span_name": "", "span_kind": "", "service_name": "", "status_code": "Ok", "status_message": "", "error_type": "", "operation_name": "", "provider_name": "", "request_model": "", "response_model": "", "response_id": "", "output_type": "", "conversation_id": "", "data_source_id": "", "agent_id": "", "agent_name": "", "agent_version": "", "agent_description": "", "workflow_name": "", "prompt_name": "", "tool_name": "", "tool_type": "", "tool_call_id": "", "input_messages": "", "output_messages": "", "system_instructions": "", "tool_definitions": "", "tool_call_arguments": "", "tool_call_result": "", "request_choice_count": 769978, "request_max_tokens": 607415, "request_temperature": 135.82, "request_top_p": 4327.29, "request_top_k": 4877.05, "request_presence_penalty": 2549.88, "request_frequency_penalty": 3080.95, "request_seed": 20619, "request_stop_sequences": ["", "", ""], "request_encoding_formats": ["", ""], "response_finish_reasons": ["", ""], "usage_input_tokens": 866445, "usage_output_tokens": 944843, "usage_cache_read_input_tokens": 767817, "usage_cache_creation_input_tokens": 86146, "resource_attributes": {"key": "", "key1": "", "key2": ""}, "span_attributes": {"key": "", "key1": "", "key2": ""}, "scope_name": "", "scope_version": ""} + "400": + application/json: {"detail": {"message": "", "error_code": "PROJECT_NAME_ALREADY_EXISTS"}} + search_spans_v1_observability_spans_search_post: + speakeasy-default-search-spans-v1-observability-spans-search-post: + parameters: + query: + page_size: 50 + requestBody: + application/json: {} + responses: + "200": + application/json: {"spans": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "TRACES_FILTER_QUERY_PARSE_ERROR"}} + search_span_evaluations_v1_observability_spans_evaluations_search_post: + speakeasy-default-search-span-evaluations-v1-observability-spans-evaluations-search-post: + parameters: + query: + page_size: 50 + requestBody: + application/json: {} + responses: + "200": + application/json: {"span_evaluations": {}} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_post: + speakeasy-default-search-latest-span-evaluations-v1-observability-spans-evaluations-search-latest-post: + parameters: + query: + page_size: 50 + requestBody: + application/json: {} + responses: + "200": + application/json: {"span_evaluations": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN"}} + get_span_fields_v1_observability_spans_fields_get: + speakeasy-default-get-span-fields-v1-observability-spans-fields-get: + responses: + "200": + application/json: {"field_definitions": []} + "400": + application/json: {"detail": {"message": "", "error_code": "FIELDS_BAD_REQUEST"}} + get_span_evaluation_fields_v1_observability_spans_evaluations_fields_get: + speakeasy-default-get-span-evaluation-fields-v1-observability-spans-evaluations-fields-get: + responses: + "200": + application/json: {"field_definitions": []} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_TIMEOUT"}} + get_span_field_options_v1_observability_spans_fields__field_name__options_get: + speakeasy-default-get-span-field-options-v1-observability-spans-fields-field-name-options-get: + parameters: + path: + field_name: "" + responses: + "200": + application/json: {"options": []} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_NAME_ALREADY_EXISTS"}} + get_span_evaluation_field_options_v1_observability_spans_evaluations_fields__field_name__options_get: + speakeasy-default-get-span-evaluation-field-options-v1-observability-spans-evaluations-fields-field-name-options-get: + parameters: + path: + field_name: "" + responses: + "200": + application/json: {"options": null} + "400": + application/json: {"detail": {"message": "", "error_code": "CAMPAIGN_NOT_FOUND"}} + get_workflow_execution_logs: + speakeasy-default-get-workflow-execution-logs: + parameters: + path: + execution_id: "" + query: + order: "asc" + limit: 50 + responses: + "200": + application/json: {"results": [{"timestamp": "2026-12-04T20:59:28.596Z", "trace_id": "", "span_id": "", "severity_text": "", "body": "", "log_attributes": {}}]} + "422": + application/json: {} + stream_workflow_execution_logs: + speakeasy-default-stream-workflow-execution-logs: + parameters: + path: + execution_id: "" + responses: + "422": + application/json: {} + trigger_schedule_v1_workflows_schedules__schedule_id__trigger_post: + speakeasy-default-trigger-schedule-v1-workflows-schedules-schedule-id-trigger-post: + parameters: + path: + schedule_id: "" + responses: + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} generatedFiles: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 90362e96..c6adfc8d 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.9 + version: 2.4.10 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ae32b050..095de62d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-mistralai-gcp-sdk-26292830187-1 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:32d84f9a04e15de1ea636cbcb7ab708d3fce017619ccdf6432ddf7fe13753779 - sourceBlobDigest: sha256:4a0b48533d11828ac3a8d906105390f01ebf4d597e1f3aef782b1a117c55e9b9 + sourceRevisionDigest: sha256:ce470abcf776ad46a6b38f4d8db1c804ed66c174cdc8eff683016b78811f8c57 + sourceBlobDigest: sha256:090d576bca32e6dbfb72ed88eac454874c50072e7c30f6d912485f89f10c079a tags: - latest - - speakeasy-mistralai-sdk-26880816484-1 + - speakeasy-mistralai-sdk-27547248271-1 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:32d84f9a04e15de1ea636cbcb7ab708d3fce017619ccdf6432ddf7fe13753779 - sourceBlobDigest: sha256:4a0b48533d11828ac3a8d906105390f01ebf4d597e1f3aef782b1a117c55e9b9 + sourceRevisionDigest: sha256:ce470abcf776ad46a6b38f4d8db1c804ed66c174cdc8eff683016b78811f8c57 + sourceBlobDigest: sha256:090d576bca32e6dbfb72ed88eac454874c50072e7c30f6d912485f89f10c079a codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:f74856338c9b13d9b047a71287f920229724ccb50d68eb2cea05ffefb43c3fea + codeSamplesRevisionDigest: sha256:fa3a52bb3efaed7f68498ad9c9fb4a431df285f923c9cc4082280d780bf16776 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.763.6 diff --git a/README.md b/README.md index 31e0eeb0..69ed43ae 100644 --- a/README.md +++ b/README.md @@ -637,6 +637,31 @@ print(res.choices[0].message.content) * [update](docs/sdks/judges/README.md#update) - Update a judge * [judge_conversation](docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation +### [Beta.Observability.Logs](docs/sdks/logs/README.md) + +* [search](docs/sdks/logs/README.md#search) - Search logs +* [list](docs/sdks/logs/README.md#list) - Get log field definitions +* [fetch_options](docs/sdks/logs/README.md#fetch_options) - Get options for a log field + +### [Beta.Observability.Spans](docs/sdks/spans/README.md) + +* [search_spans](docs/sdks/spans/README.md#search_spans) - Search spans +* [search_span_evaluations](docs/sdks/spans/README.md#search_span_evaluations) - Search span evaluations +* [search_latest_span_evaluations](docs/sdks/spans/README.md#search_latest_span_evaluations) - Search latest span evaluations +* [list_span_fields](docs/sdks/spans/README.md#list_span_fields) - Get span field definitions +* [list_span_eval_fields](docs/sdks/spans/README.md#list_span_eval_fields) - Get span evaluation field definitions +* [fetch_span_field_options](docs/sdks/spans/README.md#fetch_span_field_options) - Get options for a span field +* [fetch_span_eval_field_options](docs/sdks/spans/README.md#fetch_span_eval_field_options) - Get options for a span evaluation field + +### [Beta.Observability.Traces](docs/sdks/traces/README.md) + +* [search](docs/sdks/traces/README.md#search) - Search traces +* [get_trace_fields](docs/sdks/traces/README.md#get_trace_fields) - Get trace field definitions +* [get_trace_by_id](docs/sdks/traces/README.md#get_trace_by_id) - Get trace by id +* [get_trace_spans](docs/sdks/traces/README.md#get_trace_spans) - Get trace spans +* [fetch_options](docs/sdks/traces/README.md#fetch_options) - Get options for a trace field +* [get_span_by_id](docs/sdks/traces/README.md#get_span_by_id) - Get span by id + ### [Beta.Rag.IngestionPipelineConfigurations](docs/sdks/ingestionpipelineconfigurations/README.md) * [list](docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations @@ -744,6 +769,8 @@ print(res.choices[0].message.content) * [get_workflow_execution_trace_summary](docs/sdks/executions/README.md#get_workflow_execution_trace_summary) - Get Workflow Execution Trace Summary * [get_workflow_execution_trace_events](docs/sdks/executions/README.md#get_workflow_execution_trace_events) - Get Workflow Execution Trace Events * [stream](docs/sdks/executions/README.md#stream) - Stream +* [get_workflow_execution_logs](docs/sdks/executions/README.md#get_workflow_execution_logs) - Get Workflow Execution Logs +* [stream_workflow_execution_logs](docs/sdks/executions/README.md#stream_workflow_execution_logs) - Stream Workflow Execution Logs #### [Workflows.Metrics](docs/sdks/metrics/README.md) @@ -764,6 +791,7 @@ print(res.choices[0].message.content) * [update_schedule](docs/sdks/schedules/README.md#update_schedule) - Update Schedule * [pause_schedule](docs/sdks/schedules/README.md#pause_schedule) - Pause Schedule * [resume_schedule](docs/sdks/schedules/README.md#resume_schedule) - Resume Schedule +* [trigger_schedule](docs/sdks/schedules/README.md#trigger_schedule) - Trigger Schedule @@ -822,7 +850,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50) + res = mistral.workflows.get_workflows(include_shared=True, order="asc", limit=50, active_only=False) while res is not None: # Handle items @@ -975,8 +1003,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 130 of 197 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 197 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 133 of 216 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 57 of 216 methods.* * [`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index 8f5c8626..8e0f6661 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -668,4 +668,14 @@ Based on: ### Generated - [python v2.4.9] . ### Releases -- [PyPI v2.4.9] https://pypi.org/project/mistralai/2.4.9 - . \ No newline at end of file +- [PyPI v2.4.9] https://pypi.org/project/mistralai/2.4.9 - . + +## 2026-06-15 12:49:25 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.10] . +### Releases +- [PyPI v2.4.10] https://pypi.org/project/mistralai/2.4.10 - . \ No newline at end of file diff --git a/docs/models/basefielddefinition.md b/docs/models/basefielddefinition.md index 3d721d91..15b4fc47 100644 --- a/docs/models/basefielddefinition.md +++ b/docs/models/basefielddefinition.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `label` | *str* | :heavy_check_mark: | N/A | -| `type` | [models.BaseFieldDefinitionType](../models/basefielddefinitiontype.md) | :heavy_check_mark: | N/A | -| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.BaseFieldDefinitionType](../models/basefielddefinitiontype.md) | :heavy_check_mark: | N/A | +| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_operators` | List[[models.BaseFieldDefinitionSupportedOperator](../models/basefielddefinitionsupportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/supportedoperator.md b/docs/models/basefielddefinitionsupportedoperator.md similarity index 73% rename from docs/models/supportedoperator.md rename to docs/models/basefielddefinitionsupportedoperator.md index 97dbd4b1..ccd2125b 100644 --- a/docs/models/supportedoperator.md +++ b/docs/models/basefielddefinitionsupportedoperator.md @@ -1,12 +1,12 @@ -# SupportedOperator +# BaseFieldDefinitionSupportedOperator ## Example Usage ```python -from mistralai.client.models import SupportedOperator +from mistralai.client.models import BaseFieldDefinitionSupportedOperator # Open enum: unrecognized values are captured as UnrecognizedStr -value: SupportedOperator = "lt" +value: BaseFieldDefinitionSupportedOperator = "lt" ``` diff --git a/docs/models/bindconnectionto.md b/docs/models/bindconnectionto.md deleted file mode 100644 index 64ba5bc9..00000000 --- a/docs/models/bindconnectionto.md +++ /dev/null @@ -1,14 +0,0 @@ -# BindConnectionTo - -## Example Usage - -```python -from mistralai.client.models import BindConnectionTo -value: BindConnectionTo = "user" -``` - - -## Values - -- `"user"` -- `"org"` diff --git a/docs/models/connectorgetauthurlv1request.md b/docs/models/connectorgetauthurlv1request.md index a40bd6ca..b91296e5 100644 --- a/docs/models/connectorgetauthurlv1request.md +++ b/docs/models/connectorgetauthurlv1request.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `method_type` | [Optional[models.OutboundAuthenticationType]](../models/outboundauthenticationtype.md) | :heavy_minus_sign: | Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app'). | -| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `bind_connection_to` | [Optional[models.BindConnectionTo]](../models/bindconnectionto.md) | :heavy_minus_sign: | N/A | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `method_type` | [Optional[models.OutboundAuthenticationType]](../models/outboundauthenticationtype.md) | :heavy_minus_sign: | Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app'). | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `github_installation_link` | *Optional[bool]* | :heavy_minus_sign: | Only valid with method_type=oauth2. When true, returns a GitHub App installation URL (https://github.com/apps//installations/new) if the connector has the proper configuration The Github application needs to have 'Request user authorization (OAuth) during installation' enabled to perform the proper auth loop. | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentstatus.md b/docs/models/deploymentstatus.md new file mode 100644 index 00000000..3d1ba1c3 --- /dev/null +++ b/docs/models/deploymentstatus.md @@ -0,0 +1,16 @@ +# DeploymentStatus + +Filter by deployment activity. active=only active, inactive=only inactive, None=no filter + +## Example Usage + +```python +from mistralai.client.models import DeploymentStatus +value: DeploymentStatus = "active" +``` + + +## Values + +- `"active"` +- `"inactive"` diff --git a/docs/models/executionlogrecord.md b/docs/models/executionlogrecord.md new file mode 100644 index 00000000..55630e3a --- /dev/null +++ b/docs/models/executionlogrecord.md @@ -0,0 +1,13 @@ +# ExecutionLogRecord + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `span_id` | *str* | :heavy_check_mark: | N/A | +| `severity_text` | *str* | :heavy_check_mark: | N/A | +| `body` | *str* | :heavy_check_mark: | N/A | +| `log_attributes` | Dict[str, *str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/executionlogsearchresponse.md b/docs/models/executionlogsearchresponse.md new file mode 100644 index 00000000..69fb7f25 --- /dev/null +++ b/docs/models/executionlogsearchresponse.md @@ -0,0 +1,9 @@ +# ExecutionLogSearchResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `results` | List[[models.ExecutionLogRecord](../models/executionlogrecord.md)] | :heavy_check_mark: | N/A | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/extendedoauthservermetadata.md b/docs/models/extendedoauthservermetadata.md index e5a6a443..17a430ea 100644 --- a/docs/models/extendedoauthservermetadata.md +++ b/docs/models/extendedoauthservermetadata.md @@ -8,29 +8,28 @@ Mirrors the shape of .well-known/oauth-authorization-server responses. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `issuer` | *str* | :heavy_check_mark: | N/A | -| `authorization_endpoint` | *str* | :heavy_check_mark: | N/A | -| `token_endpoint` | *str* | :heavy_check_mark: | N/A | -| `registration_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `scopes_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `response_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `response_modes_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `grant_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `token_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `token_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `service_documentation` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `ui_locales_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `op_policy_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `op_tos_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revocation_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revocation_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `revocation_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `introspection_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `introspection_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `introspection_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `code_challenge_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `client_id_metadata_document_supported` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `x_org_server_metadata` | [OptionalNullable[models.OAuthMetadata]](../models/oauthmetadata.md) | :heavy_minus_sign: | N/A | -| `x_resource_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `issuer` | *str* | :heavy_check_mark: | N/A | +| `authorization_endpoint` | *str* | :heavy_check_mark: | N/A | +| `token_endpoint` | *str* | :heavy_check_mark: | N/A | +| `registration_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `scopes_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `response_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `response_modes_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `grant_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `token_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `token_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `service_documentation` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `ui_locales_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `op_policy_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `op_tos_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `revocation_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `revocation_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `revocation_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `introspection_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `introspection_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `introspection_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `code_challenge_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | +| `client_id_metadata_document_supported` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `x_resource_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/feedresultgetlog.md b/docs/models/feedresultgetlog.md new file mode 100644 index 00000000..cf8b8153 --- /dev/null +++ b/docs/models/feedresultgetlog.md @@ -0,0 +1,10 @@ +# FeedResultGetLog + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `results` | List[[models.GetLog](../models/getlog.md)] | :heavy_minus_sign: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/feedresultgetspan.md b/docs/models/feedresultgetspan.md new file mode 100644 index 00000000..8b6b572b --- /dev/null +++ b/docs/models/feedresultgetspan.md @@ -0,0 +1,10 @@ +# FeedResultGetSpan + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `results` | List[[models.GetSpan](../models/getspan.md)] | :heavy_minus_sign: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/feedresultgetspanevaluation.md b/docs/models/feedresultgetspanevaluation.md new file mode 100644 index 00000000..044c42e3 --- /dev/null +++ b/docs/models/feedresultgetspanevaluation.md @@ -0,0 +1,10 @@ +# FeedResultGetSpanEvaluation + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `results` | List[[models.GetSpanEvaluation](../models/getspanevaluation.md)] | :heavy_minus_sign: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/feedresultgettrace.md b/docs/models/feedresultgettrace.md new file mode 100644 index 00000000..328d7230 --- /dev/null +++ b/docs/models/feedresultgettrace.md @@ -0,0 +1,10 @@ +# FeedResultGetTrace + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `results` | List[[models.GetTrace](../models/gettrace.md)] | :heavy_minus_sign: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getlog.md b/docs/models/getlog.md new file mode 100644 index 00000000..7a1ab4b9 --- /dev/null +++ b/docs/models/getlog.md @@ -0,0 +1,27 @@ +# GetLog + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `customer_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `user_id` | *str* | :heavy_check_mark: | N/A | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `span_id` | *str* | :heavy_check_mark: | N/A | +| `trace_flags` | *int* | :heavy_check_mark: | N/A | +| `severity_text` | *str* | :heavy_check_mark: | N/A | +| `severity_number` | *int* | :heavy_check_mark: | N/A | +| `service_name` | *str* | :heavy_check_mark: | N/A | +| `body` | *str* | :heavy_check_mark: | N/A | +| `event_name` | *str* | :heavy_check_mark: | N/A | +| `resource_schema_url` | *str* | :heavy_check_mark: | N/A | +| `resource_attributes` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `scope_schema_url` | *str* | :heavy_check_mark: | N/A | +| `scope_name` | *str* | :heavy_check_mark: | N/A | +| `scope_version` | *str* | :heavy_check_mark: | N/A | +| `scope_attributes` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `log_attributes` | Dict[str, *str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getlogfieldoptions.md b/docs/models/getlogfieldoptions.md new file mode 100644 index 00000000..39576c2f --- /dev/null +++ b/docs/models/getlogfieldoptions.md @@ -0,0 +1,8 @@ +# GetLogFieldOptions + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `options` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getlogfieldoptionsv1observabilitylogsfieldsfieldnameoptionsgetrequest.md b/docs/models/getlogfieldoptionsv1observabilitylogsfieldsfieldnameoptionsgetrequest.md new file mode 100644 index 00000000..b86bbcbc --- /dev/null +++ b/docs/models/getlogfieldoptionsv1observabilitylogsfieldsfieldnameoptionsgetrequest.md @@ -0,0 +1,10 @@ +# GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getlogfields.md b/docs/models/getlogfields.md new file mode 100644 index 00000000..d2b8230d --- /dev/null +++ b/docs/models/getlogfields.md @@ -0,0 +1,8 @@ +# GetLogFields + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_definitions` | List[[models.OtelFieldDefinition](../models/otelfielddefinition.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getlogs.md b/docs/models/getlogs.md new file mode 100644 index 00000000..13fa6b73 --- /dev/null +++ b/docs/models/getlogs.md @@ -0,0 +1,8 @@ +# GetLogs + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `logs` | [models.FeedResultGetLog](../models/feedresultgetlog.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspan.md b/docs/models/getspan.md new file mode 100644 index 00000000..eeb9a38b --- /dev/null +++ b/docs/models/getspan.md @@ -0,0 +1,66 @@ +# GetSpan + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `customer_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `user_id` | *str* | :heavy_check_mark: | N/A | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `span_id` | *str* | :heavy_check_mark: | N/A | +| `parent_span_id` | *str* | :heavy_check_mark: | N/A | +| `trace_state` | *str* | :heavy_check_mark: | N/A | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `duration_ns` | *int* | :heavy_check_mark: | N/A | +| `span_name` | *str* | :heavy_check_mark: | N/A | +| `span_kind` | *str* | :heavy_check_mark: | N/A | +| `service_name` | *str* | :heavy_check_mark: | N/A | +| `status_code` | [models.GetSpanStatusCode](../models/getspanstatuscode.md) | :heavy_check_mark: | N/A | +| `status_message` | *str* | :heavy_check_mark: | N/A | +| `error_type` | *str* | :heavy_check_mark: | N/A | +| `operation_name` | *str* | :heavy_check_mark: | N/A | +| `provider_name` | *str* | :heavy_check_mark: | N/A | +| `request_model` | *str* | :heavy_check_mark: | N/A | +| `response_model` | *str* | :heavy_check_mark: | N/A | +| `response_id` | *str* | :heavy_check_mark: | N/A | +| `output_type` | *str* | :heavy_check_mark: | N/A | +| `conversation_id` | *str* | :heavy_check_mark: | N/A | +| `data_source_id` | *str* | :heavy_check_mark: | N/A | +| `agent_id` | *str* | :heavy_check_mark: | N/A | +| `agent_name` | *str* | :heavy_check_mark: | N/A | +| `agent_version` | *str* | :heavy_check_mark: | N/A | +| `agent_description` | *str* | :heavy_check_mark: | N/A | +| `workflow_name` | *str* | :heavy_check_mark: | N/A | +| `prompt_name` | *str* | :heavy_check_mark: | N/A | +| `tool_name` | *str* | :heavy_check_mark: | N/A | +| `tool_type` | *str* | :heavy_check_mark: | N/A | +| `tool_call_id` | *str* | :heavy_check_mark: | N/A | +| `input_messages` | *str* | :heavy_check_mark: | N/A | +| `output_messages` | *str* | :heavy_check_mark: | N/A | +| `system_instructions` | *str* | :heavy_check_mark: | N/A | +| `tool_definitions` | *str* | :heavy_check_mark: | N/A | +| `tool_call_arguments` | *str* | :heavy_check_mark: | N/A | +| `tool_call_result` | *str* | :heavy_check_mark: | N/A | +| `request_choice_count` | *int* | :heavy_check_mark: | N/A | +| `request_max_tokens` | *int* | :heavy_check_mark: | N/A | +| `request_temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `request_top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `request_top_k` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `request_presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `request_frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | +| `request_seed` | *int* | :heavy_check_mark: | N/A | +| `request_stop_sequences` | List[*str*] | :heavy_check_mark: | N/A | +| `request_encoding_formats` | List[*str*] | :heavy_check_mark: | N/A | +| `response_finish_reasons` | List[*str*] | :heavy_check_mark: | N/A | +| `usage_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `usage_output_tokens` | *int* | :heavy_check_mark: | N/A | +| `usage_cache_read_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `usage_cache_creation_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `resource_attributes` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `span_attributes` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `scope_name` | *str* | :heavy_check_mark: | N/A | +| `scope_version` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanbyidv1observabilitytracestraceidspansspanidgetrequest.md b/docs/models/getspanbyidv1observabilitytracestraceidspansspanidgetrequest.md new file mode 100644 index 00000000..70009688 --- /dev/null +++ b/docs/models/getspanbyidv1observabilitytracestraceidspansspanidgetrequest.md @@ -0,0 +1,11 @@ +# GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `span_id` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getspanevaluation.md b/docs/models/getspanevaluation.md new file mode 100644 index 00000000..d1365ad3 --- /dev/null +++ b/docs/models/getspanevaluation.md @@ -0,0 +1,21 @@ +# GetSpanEvaluation + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `customer_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `user_id` | *str* | :heavy_check_mark: | N/A | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `span_id` | *str* | :heavy_check_mark: | N/A | +| `response_id` | *str* | :heavy_check_mark: | N/A | +| `conversation_id` | *str* | :heavy_check_mark: | N/A | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `evaluation_name` | *str* | :heavy_check_mark: | N/A | +| `score_value` | *float* | :heavy_check_mark: | N/A | +| `score_label` | *str* | :heavy_check_mark: | N/A | +| `explanation` | *str* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanevaluationfieldoptions.md b/docs/models/getspanevaluationfieldoptions.md new file mode 100644 index 00000000..42bd4fb3 --- /dev/null +++ b/docs/models/getspanevaluationfieldoptions.md @@ -0,0 +1,8 @@ +# GetSpanEvaluationFieldOptions + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `options` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanevaluationfieldoptionsv1observabilityspansevaluationsfieldsfieldnameoptionsgetrequest.md b/docs/models/getspanevaluationfieldoptionsv1observabilityspansevaluationsfieldsfieldnameoptionsgetrequest.md new file mode 100644 index 00000000..b5f9bbb5 --- /dev/null +++ b/docs/models/getspanevaluationfieldoptionsv1observabilityspansevaluationsfieldsfieldnameoptionsgetrequest.md @@ -0,0 +1,10 @@ +# GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getspanevaluationfields.md b/docs/models/getspanevaluationfields.md new file mode 100644 index 00000000..d190c4d3 --- /dev/null +++ b/docs/models/getspanevaluationfields.md @@ -0,0 +1,8 @@ +# GetSpanEvaluationFields + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_definitions` | List[[models.OtelFieldDefinition](../models/otelfielddefinition.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanevaluations.md b/docs/models/getspanevaluations.md new file mode 100644 index 00000000..1e20598d --- /dev/null +++ b/docs/models/getspanevaluations.md @@ -0,0 +1,8 @@ +# GetSpanEvaluations + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `span_evaluations` | [models.FeedResultGetSpanEvaluation](../models/feedresultgetspanevaluation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanfieldoptions.md b/docs/models/getspanfieldoptions.md new file mode 100644 index 00000000..37eb632c --- /dev/null +++ b/docs/models/getspanfieldoptions.md @@ -0,0 +1,8 @@ +# GetSpanFieldOptions + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `options` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanfieldoptionsv1observabilityspansfieldsfieldnameoptionsgetrequest.md b/docs/models/getspanfieldoptionsv1observabilityspansfieldsfieldnameoptionsgetrequest.md new file mode 100644 index 00000000..5a34f370 --- /dev/null +++ b/docs/models/getspanfieldoptionsv1observabilityspansfieldsfieldnameoptionsgetrequest.md @@ -0,0 +1,10 @@ +# GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getspanfields.md b/docs/models/getspanfields.md new file mode 100644 index 00000000..ea77c03e --- /dev/null +++ b/docs/models/getspanfields.md @@ -0,0 +1,8 @@ +# GetSpanFields + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_definitions` | List[[models.OtelFieldDefinition](../models/otelfielddefinition.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspans.md b/docs/models/getspans.md new file mode 100644 index 00000000..1a12c420 --- /dev/null +++ b/docs/models/getspans.md @@ -0,0 +1,8 @@ +# GetSpans + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `spans` | [models.FeedResultGetSpan](../models/feedresultgetspan.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getspanstatuscode.md b/docs/models/getspanstatuscode.md new file mode 100644 index 00000000..635720af --- /dev/null +++ b/docs/models/getspanstatuscode.md @@ -0,0 +1,19 @@ +# GetSpanStatusCode + +## Example Usage + +```python +from mistralai.client.models import GetSpanStatusCode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: GetSpanStatusCode = "Error" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"Error"` +- `"Ok"` +- `"Unset"` diff --git a/docs/models/gettrace.md b/docs/models/gettrace.md new file mode 100644 index 00000000..245bd8eb --- /dev/null +++ b/docs/models/gettrace.md @@ -0,0 +1,41 @@ +# GetTrace + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `customer_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `user_id` | *str* | :heavy_check_mark: | N/A | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `root_span_id` | *str* | :heavy_check_mark: | N/A | +| `root_span_name` | *str* | :heavy_check_mark: | N/A | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `duration_ns` | *int* | :heavy_check_mark: | N/A | +| `service_name` | *str* | :heavy_check_mark: | N/A | +| `environment` | *str* | :heavy_check_mark: | N/A | +| `conversation_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_name` | *str* | :heavy_check_mark: | N/A | +| `agent_id` | *str* | :heavy_check_mark: | N/A | +| `agent_name` | *str* | :heavy_check_mark: | N/A | +| `status_code` | [models.GetTraceStatusCode](../models/gettracestatuscode.md) | :heavy_check_mark: | N/A | +| `error_count` | *int* | :heavy_check_mark: | N/A | +| `span_count` | *int* | :heavy_check_mark: | N/A | +| `gen_ai_span_count` | *int* | :heavy_check_mark: | N/A | +| `llm_call_count` | *int* | :heavy_check_mark: | N/A | +| `tool_call_count` | *int* | :heavy_check_mark: | N/A | +| `retrieval_count` | *int* | :heavy_check_mark: | N/A | +| `evaluation_count` | *int* | :heavy_check_mark: | N/A | +| `input_tokens` | *int* | :heavy_check_mark: | N/A | +| `output_tokens` | *int* | :heavy_check_mark: | N/A | +| `cache_read_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `cache_creation_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `models_used` | List[*str*] | :heavy_check_mark: | N/A | +| `tools_used` | List[*str*] | :heavy_check_mark: | N/A | +| `first_turn_last_input_message` | *str* | :heavy_check_mark: | N/A | +| `first_turn_last_output_message` | *str* | :heavy_check_mark: | N/A | +| `last_turn_last_input_message` | *str* | :heavy_check_mark: | N/A | +| `last_turn_last_output_message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/gettracebyidv1observabilitytracestraceidgetrequest.md b/docs/models/gettracebyidv1observabilitytracestraceidgetrequest.md new file mode 100644 index 00000000..b8379bf7 --- /dev/null +++ b/docs/models/gettracebyidv1observabilitytracestraceidgetrequest.md @@ -0,0 +1,8 @@ +# GetTraceByIDV1ObservabilityTracesTraceIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `trace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/gettracefieldoptions.md b/docs/models/gettracefieldoptions.md new file mode 100644 index 00000000..9fe910b4 --- /dev/null +++ b/docs/models/gettracefieldoptions.md @@ -0,0 +1,8 @@ +# GetTraceFieldOptions + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `options` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/gettracefieldoptionsv1observabilitytracesfieldsfieldnameoptionsgetrequest.md b/docs/models/gettracefieldoptionsv1observabilitytracesfieldsfieldnameoptionsgetrequest.md new file mode 100644 index 00000000..25d31e5b --- /dev/null +++ b/docs/models/gettracefieldoptionsv1observabilitytracesfieldsfieldnameoptionsgetrequest.md @@ -0,0 +1,10 @@ +# GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/gettracefields.md b/docs/models/gettracefields.md new file mode 100644 index 00000000..9114d2ee --- /dev/null +++ b/docs/models/gettracefields.md @@ -0,0 +1,8 @@ +# GetTraceFields + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_definitions` | List[[models.OtelFieldDefinition](../models/otelfielddefinition.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/gettraces.md b/docs/models/gettraces.md new file mode 100644 index 00000000..6163311d --- /dev/null +++ b/docs/models/gettraces.md @@ -0,0 +1,8 @@ +# GetTraces + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `traces` | [models.FeedResultGetTrace](../models/feedresultgettrace.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/gettracespansv1observabilitytracestraceidspansgetrequest.md b/docs/models/gettracespansv1observabilitytracestraceidspansgetrequest.md new file mode 100644 index 00000000..b89e5b80 --- /dev/null +++ b/docs/models/gettracespansv1observabilitytracestraceidspansgetrequest.md @@ -0,0 +1,12 @@ +# GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/gettracestatuscode.md b/docs/models/gettracestatuscode.md new file mode 100644 index 00000000..9c8d0c57 --- /dev/null +++ b/docs/models/gettracestatuscode.md @@ -0,0 +1,18 @@ +# GetTraceStatusCode + +## Example Usage + +```python +from mistralai.client.models import GetTraceStatusCode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: GetTraceStatusCode = "Error" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"Error"` +- `"Unset"` diff --git a/docs/models/getworkflowexecutionlogsorder.md b/docs/models/getworkflowexecutionlogsorder.md new file mode 100644 index 00000000..5d265a09 --- /dev/null +++ b/docs/models/getworkflowexecutionlogsorder.md @@ -0,0 +1,16 @@ +# GetWorkflowExecutionLogsOrder + +First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set. + +## Example Usage + +```python +from mistralai.client.models import GetWorkflowExecutionLogsOrder +value: GetWorkflowExecutionLogsOrder = "asc" +``` + + +## Values + +- `"asc"` +- `"desc"` diff --git a/docs/models/getworkflowexecutionlogsrequest.md b/docs/models/getworkflowexecutionlogsrequest.md new file mode 100644 index 00000000..b7198bee --- /dev/null +++ b/docs/models/getworkflowexecutionlogsrequest.md @@ -0,0 +1,15 @@ +# GetWorkflowExecutionLogsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by workflow run ID | +| `activity_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by activity ID | +| `after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Only return logs at or after this timestamp | +| `before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Only return logs before this timestamp | +| `order` | [Optional[models.GetWorkflowExecutionLogsOrder]](../models/getworkflowexecutionlogsorder.md) | :heavy_minus_sign: | First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Pagination cursor from a previous response's `next_cursor`; carries the window and order | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of logs to return | \ No newline at end of file diff --git a/docs/models/getworkflowsv1workflowsgetorder.md b/docs/models/getworkflowsv1workflowsgetorder.md new file mode 100644 index 00000000..ed2d5dd4 --- /dev/null +++ b/docs/models/getworkflowsv1workflowsgetorder.md @@ -0,0 +1,16 @@ +# GetWorkflowsV1WorkflowsGetOrder + +Sort direction + +## Example Usage + +```python +from mistralai.client.models import GetWorkflowsV1WorkflowsGetOrder +value: GetWorkflowsV1WorkflowsGetOrder = "asc" +``` + + +## Values + +- `"asc"` +- `"desc"` diff --git a/docs/models/getworkflowsv1workflowsgetrequest.md b/docs/models/getworkflowsv1workflowsgetrequest.md index 79fe4c0d..d365ebfd 100644 --- a/docs/models/getworkflowsv1workflowsgetrequest.md +++ b/docs/models/getworkflowsv1workflowsgetrequest.md @@ -3,12 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows | -| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | -| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | -| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | -| `tags` | List[*str*] | :heavy_minus_sign: | Filter to workflows tagged with all listed tags (AND). | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | -| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `status` | [OptionalNullable[models.GetWorkflowsV1WorkflowsGetStatus]](../models/getworkflowsv1workflowsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | +| `deployment_name` | List[*str*] | :heavy_minus_sign: | Filter by deployment name(s) | +| `deployment_status` | [OptionalNullable[models.DeploymentStatus]](../models/deploymentstatus.md) | :heavy_minus_sign: | Filter by deployment activity. active=only active, inactive=only inactive, None=no filter | +| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | +| `tags` | List[*str*] | :heavy_minus_sign: | Filter to workflows tagged with all listed tags (AND). | +| `sort_by` | *OptionalNullable[Literal["display_name"]]* | :heavy_minus_sign: | Field to sort by | +| `order` | [Optional[models.GetWorkflowsV1WorkflowsGetOrder]](../models/getworkflowsv1workflowsgetorder.md) | :heavy_minus_sign: | Sort direction | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | +| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | +| ~~`active_only`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: use deployment_status instead | \ No newline at end of file diff --git a/docs/models/getworkflowsv1workflowsgetstatus.md b/docs/models/getworkflowsv1workflowsgetstatus.md new file mode 100644 index 00000000..5e85e7e5 --- /dev/null +++ b/docs/models/getworkflowsv1workflowsgetstatus.md @@ -0,0 +1,19 @@ +# GetWorkflowsV1WorkflowsGetStatus + +Filter by workflow status + + +## Supported Types + +### `models.WorkflowExecutionStatus` + +```python +value: models.WorkflowExecutionStatus = /* values here */ +``` + +### `List[models.WorkflowExecutionStatus]` + +```python +value: List[models.WorkflowExecutionStatus] = /* values here */ +``` + diff --git a/docs/models/listrunsv1workflowsrunsgetorder.md b/docs/models/listrunsv1workflowsrunsgetorder.md new file mode 100644 index 00000000..64571981 --- /dev/null +++ b/docs/models/listrunsv1workflowsrunsgetorder.md @@ -0,0 +1,16 @@ +# ListRunsV1WorkflowsRunsGetOrder + +Sort direction + +## Example Usage + +```python +from mistralai.client.models import ListRunsV1WorkflowsRunsGetOrder +value: ListRunsV1WorkflowsRunsGetOrder = "asc" +``` + + +## Values + +- `"asc"` +- `"desc"` diff --git a/docs/models/listrunsv1workflowsrunsgetrequest.md b/docs/models/listrunsv1workflowsrunsgetrequest.md index 319d9ed5..e183ebad 100644 --- a/docs/models/listrunsv1workflowsrunsgetrequest.md +++ b/docs/models/listrunsv1workflowsrunsgetrequest.md @@ -3,11 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | -| `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | -| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | -| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name, or ID | +| `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by deployment name | +| `sort_by` | [OptionalNullable[models.SortBy]](../models/sortby.md) | :heavy_minus_sign: | Field to sort by | +| `order` | [Optional[models.ListRunsV1WorkflowsRunsGetOrder]](../models/listrunsv1workflowsrunsgetorder.md) | :heavy_minus_sign: | Sort direction | +| `start_time_after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with start_time >= value | +| `start_time_before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with start_time <= value | +| `end_time_after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with end_time >= value. Running executions (no end_time) are excluded; use the status filter to include them. | +| `end_time_before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with end_time <= value. Running executions (no end_time) are excluded; use the status filter to include them. | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file diff --git a/docs/models/logsrequest.md b/docs/models/logsrequest.md new file mode 100644 index 00000000..6b871cfa --- /dev/null +++ b/docs/models/logsrequest.md @@ -0,0 +1,9 @@ +# LogsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `order` | [Optional[models.Order]](../models/order.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/oauthmetadata.md b/docs/models/oauthmetadata.md deleted file mode 100644 index 666b3944..00000000 --- a/docs/models/oauthmetadata.md +++ /dev/null @@ -1,32 +0,0 @@ -# OAuthMetadata - -RFC 8414 OAuth 2.0 Authorization Server Metadata. -See https://datatracker.ietf.org/doc/html/rfc8414#section-2 - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `issuer` | *str* | :heavy_check_mark: | N/A | -| `authorization_endpoint` | *str* | :heavy_check_mark: | N/A | -| `token_endpoint` | *str* | :heavy_check_mark: | N/A | -| `registration_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `scopes_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `response_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `response_modes_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `grant_types_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `token_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `token_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `service_documentation` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `ui_locales_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `op_policy_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `op_tos_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revocation_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `revocation_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `revocation_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `introspection_endpoint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `introspection_endpoint_auth_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `introspection_endpoint_auth_signing_alg_values_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `code_challenge_methods_supported` | List[*str*] | :heavy_minus_sign: | N/A | -| `client_id_metadata_document_supported` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index d8532e86..ba9749c6 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -20,7 +20,6 @@ This is an open enum. Unrecognized values will not fail type checks. - `"AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN"` - `"AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"` - `"AUTH_FORBIDDEN_ROLE_NOT_FOUND"` -- `"AUTH_FORBIDDEN_ORG_NOT_WHITELISTED"` - `"AUTH_UNAUTHORIZED"` - `"FEATURE_NOT_SUPPORTED"` - `"FIELDS_BAD_REQUEST"` diff --git a/docs/models/order.md b/docs/models/order.md new file mode 100644 index 00000000..3c78f582 --- /dev/null +++ b/docs/models/order.md @@ -0,0 +1,14 @@ +# Order + +## Example Usage + +```python +from mistralai.client.models import Order +value: Order = "asc" +``` + + +## Values + +- `"asc"` +- `"desc"` diff --git a/docs/models/otelfielddefinition.md b/docs/models/otelfielddefinition.md new file mode 100644 index 00000000..366c9bc4 --- /dev/null +++ b/docs/models/otelfielddefinition.md @@ -0,0 +1,12 @@ +# OtelFieldDefinition + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.OtelFieldDefinitionType](../models/otelfielddefinitiontype.md) | :heavy_check_mark: | N/A | +| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_operators` | List[[models.OtelFieldDefinitionSupportedOperator](../models/otelfielddefinitionsupportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/otelfielddefinitionsupportedoperator.md b/docs/models/otelfielddefinitionsupportedoperator.md new file mode 100644 index 00000000..1db0d6df --- /dev/null +++ b/docs/models/otelfielddefinitionsupportedoperator.md @@ -0,0 +1,40 @@ +# OtelFieldDefinitionSupportedOperator + +## Example Usage + +```python +from mistralai.client.models import OtelFieldDefinitionSupportedOperator + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: OtelFieldDefinitionSupportedOperator = "eq" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"eq"` +- `"neq"` +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"like"` +- `"ilike"` +- `"not_like"` +- `"not_ilike"` +- `"between"` +- `"not_between"` +- `"in"` +- `"not_in"` +- `"exists"` +- `"not_exists"` +- `"regexp"` +- `"not_regexp"` +- `"contains"` +- `"not_contains"` +- `"has"` +- `"hasAny"` +- `"hasAll"` +- `"hasToken"` diff --git a/docs/models/otelfielddefinitiontype.md b/docs/models/otelfielddefinitiontype.md new file mode 100644 index 00000000..11db5614 --- /dev/null +++ b/docs/models/otelfielddefinitiontype.md @@ -0,0 +1,24 @@ +# OtelFieldDefinitionType + +## Example Usage + +```python +from mistralai.client.models import OtelFieldDefinitionType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: OtelFieldDefinitionType = "ENUM" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"ENUM"` +- `"TEXT"` +- `"INT"` +- `"FLOAT"` +- `"BOOL"` +- `"TIMESTAMP"` +- `"ARRAY"` +- `"MAP"` diff --git a/docs/models/searchlatestspanevaluationsv1observabilityspansevaluationssearchlatestpostrequest.md b/docs/models/searchlatestspanevaluationsv1observabilityspansevaluationssearchlatestpostrequest.md new file mode 100644 index 00000000..aa21d246 --- /dev/null +++ b/docs/models/searchlatestspanevaluationsv1observabilityspansevaluationssearchlatestpostrequest.md @@ -0,0 +1,12 @@ +# SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `span_evaluations_request` | [models.SpanEvaluationsRequest](../models/spanevaluationsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchlogsv1observabilitylogssearchpostrequest.md b/docs/models/searchlogsv1observabilitylogssearchpostrequest.md new file mode 100644 index 00000000..c0bd1622 --- /dev/null +++ b/docs/models/searchlogsv1observabilitylogssearchpostrequest.md @@ -0,0 +1,12 @@ +# SearchLogsV1ObservabilityLogsSearchPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `logs_request` | [models.LogsRequest](../models/logsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchspanevaluationsv1observabilityspansevaluationssearchpostrequest.md b/docs/models/searchspanevaluationsv1observabilityspansevaluationssearchpostrequest.md new file mode 100644 index 00000000..5f1148e3 --- /dev/null +++ b/docs/models/searchspanevaluationsv1observabilityspansevaluationssearchpostrequest.md @@ -0,0 +1,12 @@ +# SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `span_evaluations_request` | [models.SpanEvaluationsRequest](../models/spanevaluationsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchspansv1observabilityspanssearchpostrequest.md b/docs/models/searchspansv1observabilityspanssearchpostrequest.md new file mode 100644 index 00000000..f66e2d70 --- /dev/null +++ b/docs/models/searchspansv1observabilityspanssearchpostrequest.md @@ -0,0 +1,12 @@ +# SearchSpansV1ObservabilitySpansSearchPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `spans_request` | [models.SpansRequest](../models/spansrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchtracesv1observabilitytracessearchpostrequest.md b/docs/models/searchtracesv1observabilitytracessearchpostrequest.md new file mode 100644 index 00000000..95406538 --- /dev/null +++ b/docs/models/searchtracesv1observabilitytracessearchpostrequest.md @@ -0,0 +1,12 @@ +# SearchTracesV1ObservabilityTracesSearchPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `traces_request` | [models.TracesRequest](../models/tracesrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/sortby.md b/docs/models/sortby.md new file mode 100644 index 00000000..ef56a615 --- /dev/null +++ b/docs/models/sortby.md @@ -0,0 +1,16 @@ +# SortBy + +Field to sort by + +## Example Usage + +```python +from mistralai.client.models import SortBy +value: SortBy = "start_time" +``` + + +## Values + +- `"start_time"` +- `"end_time"` diff --git a/docs/models/spanevaluationsrequest.md b/docs/models/spanevaluationsrequest.md new file mode 100644 index 00000000..bcad0941 --- /dev/null +++ b/docs/models/spanevaluationsrequest.md @@ -0,0 +1,8 @@ +# SpanEvaluationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/spansrequest.md b/docs/models/spansrequest.md new file mode 100644 index 00000000..a1ae049d --- /dev/null +++ b/docs/models/spansrequest.md @@ -0,0 +1,8 @@ +# SpansRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/streamerror.md b/docs/models/streamerror.md new file mode 100644 index 00000000..6397310e --- /dev/null +++ b/docs/models/streamerror.md @@ -0,0 +1,8 @@ +# StreamError + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `error` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/streamworkflowexecutionlogsdata.md b/docs/models/streamworkflowexecutionlogsdata.md new file mode 100644 index 00000000..3ebc718d --- /dev/null +++ b/docs/models/streamworkflowexecutionlogsdata.md @@ -0,0 +1,17 @@ +# StreamWorkflowExecutionLogsData + + +## Supported Types + +### `models.ExecutionLogRecord` + +```python +value: models.ExecutionLogRecord = /* values here */ +``` + +### `models.StreamError` + +```python +value: models.StreamError = /* values here */ +``` + diff --git a/docs/models/streamworkflowexecutionlogsevent.md b/docs/models/streamworkflowexecutionlogsevent.md new file mode 100644 index 00000000..20533c6a --- /dev/null +++ b/docs/models/streamworkflowexecutionlogsevent.md @@ -0,0 +1,18 @@ +# StreamWorkflowExecutionLogsEvent + +## Example Usage + +```python +from mistralai.client.models import StreamWorkflowExecutionLogsEvent + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: StreamWorkflowExecutionLogsEvent = "log" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"log"` +- `"error"` diff --git a/docs/models/streamworkflowexecutionlogsrequest.md b/docs/models/streamworkflowexecutionlogsrequest.md new file mode 100644 index 00000000..f1313cce --- /dev/null +++ b/docs/models/streamworkflowexecutionlogsrequest.md @@ -0,0 +1,12 @@ +# StreamWorkflowExecutionLogsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by workflow run ID | +| `activity_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by activity ID | +| `after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start a fresh stream at this timestamp (ignored when resuming via last_event_id) | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Resume from this cursor (a prior response's SSE id) | \ No newline at end of file diff --git a/docs/models/streamworkflowexecutionlogsresponsebody.md b/docs/models/streamworkflowexecutionlogsresponsebody.md new file mode 100644 index 00000000..529000ed --- /dev/null +++ b/docs/models/streamworkflowexecutionlogsresponsebody.md @@ -0,0 +1,12 @@ +# StreamWorkflowExecutionLogsResponseBody + +Stream of Server-Sent Events (SSE): `log` events carry an ExecutionLogRecord; `error` events carry a StreamError payload. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `event` | [Optional[models.StreamWorkflowExecutionLogsEvent]](../models/streamworkflowexecutionlogsevent.md) | :heavy_minus_sign: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `data` | [Optional[models.StreamWorkflowExecutionLogsData]](../models/streamworkflowexecutionlogsdata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tracesrequest.md b/docs/models/tracesrequest.md new file mode 100644 index 00000000..3a0bf8d0 --- /dev/null +++ b/docs/models/tracesrequest.md @@ -0,0 +1,8 @@ +# TracesRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/triggerschedulev1workflowsschedulesscheduleidtriggerpostrequest.md b/docs/models/triggerschedulev1workflowsschedulesscheduleidtriggerpostrequest.md new file mode 100644 index 00000000..5ddbf9a7 --- /dev/null +++ b/docs/models/triggerschedulev1workflowsschedulesscheduleidtriggerpostrequest.md @@ -0,0 +1,9 @@ +# TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_schedule_trigger_request` | [OptionalNullable[models.WorkflowScheduleTriggerRequest]](../models/workflowscheduletriggerrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workflow.md b/docs/models/workflow.md index 9bc99a79..a8d7ee74 100644 --- a/docs/models/workflow.md +++ b/docs/models/workflow.md @@ -15,6 +15,5 @@ | `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | | `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | | `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | -| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | | `tags` | List[*str*] | :heavy_minus_sign: | Tags for filtering and discovery | \ No newline at end of file diff --git a/docs/models/workflowcodedefinition.md b/docs/models/workflowcodedefinition.md index f8cf3bbd..912c3f48 100644 --- a/docs/models/workflowcodedefinition.md +++ b/docs/models/workflowcodedefinition.md @@ -11,5 +11,6 @@ | `queries` | List[[models.QueryDefinition](../models/querydefinition.md)] | :heavy_minus_sign: | Query handlers defined by the workflow | | `updates` | List[[models.UpdateDefinition](../models/updatedefinition.md)] | :heavy_minus_sign: | Update handlers defined by the workflow | | `enforce_determinism` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow enforces deterministic execution | +| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `execution_timeout` | *Optional[float]* | :heavy_minus_sign: | Maximum total execution time including retries and continue-as-new | | `plugin_metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific metadata (e.g. connector declarations) | \ No newline at end of file diff --git a/docs/models/workflowscheduletriggerrequest.md b/docs/models/workflowscheduletriggerrequest.md new file mode 100644 index 00000000..a1fab5f3 --- /dev/null +++ b/docs/models/workflowscheduletriggerrequest.md @@ -0,0 +1,8 @@ +# WorkflowScheduleTriggerRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `overlap` | [OptionalNullable[models.ScheduleOverlapPolicy]](../models/scheduleoverlappolicy.md) | :heavy_minus_sign: | Optional overlap policy override to use for the immediate trigger. | \ No newline at end of file diff --git a/docs/models/workflowwithworkerstatus.md b/docs/models/workflowwithworkerstatus.md index 033766b2..a067eef4 100644 --- a/docs/models/workflowwithworkerstatus.md +++ b/docs/models/workflowwithworkerstatus.md @@ -15,7 +15,6 @@ | `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | | `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | | `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | -| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | | `tags` | List[*str*] | :heavy_minus_sign: | Tags for filtering and discovery | | `active` | *bool* | :heavy_check_mark: | Whether the workflow is active | \ No newline at end of file diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index 3509e068..707b5ef4 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -141,7 +141,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.connectors.get_auth_url(connector_id_or_name="", bind_connection_to="user") + res = mistral.beta.connectors.get_auth_url(connector_id_or_name="", github_installation_link=False) # Handle response print(res) @@ -150,14 +150,14 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | -| `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `method_type` | [Optional[models.OutboundAuthenticationType]](../../models/outboundauthenticationtype.md) | :heavy_minus_sign: | Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app'). | -| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `bind_connection_to` | [Optional[models.BindConnectionTo]](../../models/bindconnectionto.md) | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `method_type` | [Optional[models.OutboundAuthenticationType]](../../models/outboundauthenticationtype.md) | :heavy_minus_sign: | Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app'). | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `github_installation_link` | *Optional[bool]* | :heavy_minus_sign: | Only valid with method_type=oauth2. When true, returns a GitHub App installation URL (https://github.com/apps//installations/new) if the connector has the proper configuration The Github application needs to have 'Request user authorization (OAuth) during installation' enabled to perform the proper auth loop. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md index 1bf4ed25..1be1a3e3 100644 --- a/docs/sdks/executions/README.md +++ b/docs/sdks/executions/README.md @@ -18,6 +18,8 @@ * [get_workflow_execution_trace_summary](#get_workflow_execution_trace_summary) - Get Workflow Execution Trace Summary * [get_workflow_execution_trace_events](#get_workflow_execution_trace_events) - Get Workflow Execution Trace Events * [stream](#stream) - Stream +* [get_workflow_execution_logs](#get_workflow_execution_logs) - Get Workflow Execution Logs +* [stream_workflow_execution_logs](#stream_workflow_execution_logs) - Stream Workflow Execution Logs ## get_workflow_execution @@ -593,6 +595,109 @@ with Mistral( ### Errors +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_execution_logs + +Retrieve logs for a workflow execution from Dora. + +First page sets the window via `after`/`before` (default: execution start through now, both +widened by a margin so the bounds still prune partitions); later pages pass `cursor`, which +carries both the window and the sort order (so `after`/`before`/`order` are then ignored — +the order is fixed at the first page so a client can't flip direction mid-pagination). + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.get_workflow_execution_logs(execution_id="", order="asc", limit=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by workflow run ID | +| `activity_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by activity ID | +| `after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Only return logs at or after this timestamp | +| `before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Only return logs before this timestamp | +| `order` | [Optional[models.GetWorkflowExecutionLogsOrder]](../../models/getworkflowexecutionlogsorder.md) | :heavy_minus_sign: | First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Pagination cursor from a previous response's `next_cursor`; carries the window and order | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of logs to return | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ExecutionLogSearchResponse](../../models/executionlogsearchresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## stream_workflow_execution_logs + +Stream logs for a workflow execution via SSE. + +If `last_event_id` is set it resumes from that cursor and takes precedence over `after`; +otherwise `after` sets a fresh stream's start point (omit both to tail from the execution start). + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.stream_workflow_execution_logs(execution_id="") + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by workflow run ID | +| `activity_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter logs by activity ID | +| `after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start a fresh stream at this timestamp (ignored when resuming via last_event_id) | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Resume from this cursor (a prior response's SSE id) | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Union[eventstreaming.EventStream[models.StreamWorkflowExecutionLogsResponseBody], eventstreaming.EventStreamAsync[models.StreamWorkflowExecutionLogsResponseBody]]](../../models/.md)** + +### Errors + | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | diff --git a/docs/sdks/logs/README.md b/docs/sdks/logs/README.md new file mode 100644 index 00000000..da7cb5a9 --- /dev/null +++ b/docs/sdks/logs/README.md @@ -0,0 +1,138 @@ +# Beta.Observability.Logs + +## Overview + +### Available Operations + +* [search](#search) - Search logs +* [list](#list) - Get log field definitions +* [fetch_options](#fetch_options) - Get options for a log field + +## search + +Search logs + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.logs.search(page_size=50, order="desc") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `order` | [Optional[models.Order]](../../models/order.md) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetLogs](../../models/getlogs.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +Get log field definitions + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.logs.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetLogFields](../../models/getlogfields.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_options + +Get options for a log field + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.logs.fetch_options(field_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetLogFieldOptions](../../models/getlogfieldoptions.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/runs/README.md b/docs/sdks/runs/README.md index 7ed91420..60110bf6 100644 --- a/docs/sdks/runs/README.md +++ b/docs/sdks/runs/README.md @@ -24,7 +24,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.runs.list_runs(page_size=50) + res = mistral.workflows.runs.list_runs(order="desc", page_size=50) while res is not None: # Handle items @@ -35,15 +35,22 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | -| `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | -| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | -| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name, or ID | +| `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by deployment name | +| `sort_by` | [OptionalNullable[models.SortBy]](../../models/sortby.md) | :heavy_minus_sign: | Field to sort by | +| `order` | [Optional[models.ListRunsV1WorkflowsRunsGetOrder]](../../models/listrunsv1workflowsrunsgetorder.md) | :heavy_minus_sign: | Sort direction | +| `start_time_after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with start_time >= value | +| `start_time_before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with start_time <= value | +| `end_time_after` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with end_time >= value. Running executions (no end_time) are excluded; use the status filter to include them. | +| `end_time_before` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Include runs with end_time <= value. Running executions (no end_time) are excluded; use the status filter to include them. | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/schedules/README.md b/docs/sdks/schedules/README.md index 6b0e5f0e..c1352775 100644 --- a/docs/sdks/schedules/README.md +++ b/docs/sdks/schedules/README.md @@ -11,6 +11,7 @@ * [update_schedule](#update_schedule) - Update Schedule * [pause_schedule](#pause_schedule) - Pause Schedule * [resume_schedule](#resume_schedule) - Resume Schedule +* [trigger_schedule](#trigger_schedule) - Trigger Schedule ## get_schedules @@ -296,6 +297,43 @@ with Mistral( ### Errors +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## trigger_schedule + +Trigger Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.schedules.trigger_schedule(schedule_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `overlap` | [OptionalNullable[models.ScheduleOverlapPolicy]](../../models/scheduleoverlappolicy.md) | :heavy_minus_sign: | Optional overlap policy override to use for the immediate trigger. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | diff --git a/docs/sdks/spans/README.md b/docs/sdks/spans/README.md new file mode 100644 index 00000000..f833e02f --- /dev/null +++ b/docs/sdks/spans/README.md @@ -0,0 +1,314 @@ +# Beta.Observability.Spans + +## Overview + +### Available Operations + +* [search_spans](#search_spans) - Search spans +* [search_span_evaluations](#search_span_evaluations) - Search span evaluations +* [search_latest_span_evaluations](#search_latest_span_evaluations) - Search latest span evaluations +* [list_span_fields](#list_span_fields) - Get span field definitions +* [list_span_eval_fields](#list_span_eval_fields) - Get span evaluation field definitions +* [fetch_span_field_options](#fetch_span_field_options) - Get options for a span field +* [fetch_span_eval_field_options](#fetch_span_eval_field_options) - Get options for a span evaluation field + +## search_spans + +Search spans + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.search_spans(page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpans](../../models/getspans.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## search_span_evaluations + +Search span evaluations + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.search_span_evaluations(page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpanEvaluations](../../models/getspanevaluations.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## search_latest_span_evaluations + +Search latest span evaluations + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.search_latest_span_evaluations(page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpanEvaluations](../../models/getspanevaluations.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_span_fields + +Get span field definitions + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.list_span_fields() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpanFields](../../models/getspanfields.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_span_eval_fields + +Get span evaluation field definitions + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.list_span_eval_fields() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpanEvaluationFields](../../models/getspanevaluationfields.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_span_field_options + +Get options for a span field + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.fetch_span_field_options(field_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpanFieldOptions](../../models/getspanfieldoptions.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_span_eval_field_options + +Get options for a span evaluation field + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.spans.fetch_span_eval_field_options(field_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpanEvaluationFieldOptions](../../models/getspanevaluationfieldoptions.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/traces/README.md b/docs/sdks/traces/README.md new file mode 100644 index 00000000..727fc32a --- /dev/null +++ b/docs/sdks/traces/README.md @@ -0,0 +1,270 @@ +# Beta.Observability.Traces + +## Overview + +### Available Operations + +* [search](#search) - Search traces +* [get_trace_fields](#get_trace_fields) - Get trace field definitions +* [get_trace_by_id](#get_trace_by_id) - Get trace by id +* [get_trace_spans](#get_trace_spans) - Get trace spans +* [fetch_options](#fetch_options) - Get options for a trace field +* [get_span_by_id](#get_span_by_id) - Get span by id + +## search + +Search traces + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.traces.search(page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `search_expression` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetTraces](../../models/gettraces.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_trace_fields + +Get trace field definitions + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.traces.get_trace_fields() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetTraceFields](../../models/gettracefields.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_trace_by_id + +Get trace by id + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.traces.get_trace_by_id(trace_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetTrace](../../models/gettrace.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_trace_spans + +Get trace spans + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.traces.get_trace_spans(trace_id="", page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpans](../../models/getspans.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_options + +Get options for a trace field + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.traces.fetch_options(field_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetTraceFieldOptions](../../models/gettracefieldoptions.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_span_by_id + +Get span by id + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.traces.get_span_by_id(trace_id="", span_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `trace_id` | *str* | :heavy_check_mark: | N/A | +| `span_id` | *str* | :heavy_check_mark: | N/A | +| `from_` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetSpan](../../models/getspan.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index ed0a0a74..9c344c22 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -32,7 +32,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50) + res = mistral.workflows.get_workflows(include_shared=True, order="asc", limit=50, active_only=False) while res is not None: # Handle items @@ -43,16 +43,20 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows | -| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | -| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | -| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | -| `tags` | List[*str*] | :heavy_minus_sign: | Filter to workflows tagged with all listed tags (AND). | -| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | -| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `status` | [OptionalNullable[models.GetWorkflowsV1WorkflowsGetStatus]](../../models/getworkflowsv1workflowsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | +| `deployment_name` | List[*str*] | :heavy_minus_sign: | Filter by deployment name(s) | +| `deployment_status` | [OptionalNullable[models.DeploymentStatus]](../../models/deploymentstatus.md) | :heavy_minus_sign: | Filter by deployment activity. active=only active, inactive=only inactive, None=no filter | +| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | +| `tags` | List[*str*] | :heavy_minus_sign: | Filter to workflows tagged with all listed tags (AND). | +| `order` | [Optional[models.GetWorkflowsV1WorkflowsGetOrder]](../../models/getworkflowsv1workflowsgetorder.md) | :heavy_minus_sign: | Sort direction | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | +| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: use deployment_status instead | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/pyproject.toml b/pyproject.toml index cc8ea4c7..fbfafea2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.9" +version = "2.4.10" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index ed6f8531..9e09a587 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.9" +__version__: str = "2.4.10" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.884.13" -__user_agent__: str = "speakeasy-sdk/python 2.4.9 2.884.13 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.10 2.884.13 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index f6ce70a8..6f7c2e87 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -502,7 +502,7 @@ def get_auth_url( app_return_url: OptionalNullable[str] = UNSET, method_type: Optional[models.OutboundAuthenticationType] = None, credentials_name: OptionalNullable[str] = UNSET, - bind_connection_to: Optional[models.BindConnectionTo] = "user", + github_installation_link: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -516,7 +516,7 @@ def get_auth_url( :param app_return_url: :param method_type: Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app'). :param credentials_name: - :param bind_connection_to: + :param github_installation_link: Only valid with method_type=oauth2. When true, returns a GitHub App installation URL (https://github.com/apps//installations/new) if the connector has the proper configuration The Github application needs to have 'Request user authorization (OAuth) during installation' enabled to perform the proper auth loop. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -539,7 +539,7 @@ def get_auth_url( app_return_url=app_return_url, method_type=method_type, credentials_name=credentials_name, - bind_connection_to=bind_connection_to, + github_installation_link=github_installation_link, connector_id_or_name=connector_id_or_name, ) @@ -607,7 +607,7 @@ async def get_auth_url_async( app_return_url: OptionalNullable[str] = UNSET, method_type: Optional[models.OutboundAuthenticationType] = None, credentials_name: OptionalNullable[str] = UNSET, - bind_connection_to: Optional[models.BindConnectionTo] = "user", + github_installation_link: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -621,7 +621,7 @@ async def get_auth_url_async( :param app_return_url: :param method_type: Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app'). :param credentials_name: - :param bind_connection_to: + :param github_installation_link: Only valid with method_type=oauth2. When true, returns a GitHub App installation URL (https://github.com/apps//installations/new) if the connector has the proper configuration The Github application needs to have 'Request user authorization (OAuth) during installation' enabled to perform the proper auth loop. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -644,7 +644,7 @@ async def get_auth_url_async( app_return_url=app_return_url, method_type=method_type, credentials_name=credentials_name, - bind_connection_to=bind_connection_to, + github_installation_link=github_installation_link, connector_id_or_name=connector_id_or_name, ) diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index aa22f09e..2956c851 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -2,6 +2,7 @@ # @generated-id: 974004d347a2 from .basesdk import BaseSDK +from datetime import datetime from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET @@ -2812,3 +2813,479 @@ async def stream_async( http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + def get_workflow_execution_logs( + self, + *, + execution_id: str, + run_id: OptionalNullable[str] = UNSET, + activity_id: OptionalNullable[str] = UNSET, + after: OptionalNullable[datetime] = UNSET, + before: OptionalNullable[datetime] = UNSET, + order: Optional[models.GetWorkflowExecutionLogsOrder] = "asc", + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 50, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ExecutionLogSearchResponse: + r"""Get Workflow Execution Logs + + Retrieve logs for a workflow execution from Dora. + + First page sets the window via `after`/`before` (default: execution start through now, both + widened by a margin so the bounds still prune partitions); later pages pass `cursor`, which + carries both the window and the sort order (so `after`/`before`/`order` are then ignored — + the order is fixed at the first page so a client can't flip direction mid-pagination). + + :param execution_id: + :param run_id: Filter logs by workflow run ID + :param activity_id: Filter logs by activity ID + :param after: Only return logs at or after this timestamp + :param before: Only return logs before this timestamp + :param order: First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set. + :param cursor: Pagination cursor from a previous response's `next_cursor`; carries the window and order + :param limit: Maximum number of logs to return + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionLogsRequest( + execution_id=execution_id, + run_id=run_id, + activity_id=activity_id, + after=after, + before=before, + order=order, + cursor=cursor, + limit=limit, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/logs", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_logs", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ExecutionLogSearchResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_execution_logs_async( + self, + *, + execution_id: str, + run_id: OptionalNullable[str] = UNSET, + activity_id: OptionalNullable[str] = UNSET, + after: OptionalNullable[datetime] = UNSET, + before: OptionalNullable[datetime] = UNSET, + order: Optional[models.GetWorkflowExecutionLogsOrder] = "asc", + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 50, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ExecutionLogSearchResponse: + r"""Get Workflow Execution Logs + + Retrieve logs for a workflow execution from Dora. + + First page sets the window via `after`/`before` (default: execution start through now, both + widened by a margin so the bounds still prune partitions); later pages pass `cursor`, which + carries both the window and the sort order (so `after`/`before`/`order` are then ignored — + the order is fixed at the first page so a client can't flip direction mid-pagination). + + :param execution_id: + :param run_id: Filter logs by workflow run ID + :param activity_id: Filter logs by activity ID + :param after: Only return logs at or after this timestamp + :param before: Only return logs before this timestamp + :param order: First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set. + :param cursor: Pagination cursor from a previous response's `next_cursor`; carries the window and order + :param limit: Maximum number of logs to return + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionLogsRequest( + execution_id=execution_id, + run_id=run_id, + activity_id=activity_id, + after=after, + before=before, + order=order, + cursor=cursor, + limit=limit, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/logs", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_logs", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ExecutionLogSearchResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def stream_workflow_execution_logs( + self, + *, + execution_id: str, + run_id: OptionalNullable[str] = UNSET, + activity_id: OptionalNullable[str] = UNSET, + after: OptionalNullable[datetime] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStream[models.StreamWorkflowExecutionLogsResponseBody]: + r"""Stream Workflow Execution Logs + + Stream logs for a workflow execution via SSE. + + If `last_event_id` is set it resumes from that cursor and takes precedence over `after`; + otherwise `after` sets a fresh stream's start point (omit both to tail from the execution start). + + :param execution_id: + :param run_id: Filter logs by workflow run ID + :param activity_id: Filter logs by activity ID + :param after: Start a fresh stream at this timestamp (ignored when resuming via last_event_id) + :param last_event_id: Resume from this cursor (a prior response's SSE id) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.StreamWorkflowExecutionLogsRequest( + execution_id=execution_id, + run_id=run_id, + activity_id=activity_id, + after=after, + last_event_id=last_event_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/logs/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="stream_workflow_execution_logs", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStream( + http_res, + lambda raw: utils.unmarshal_json( + raw, models.StreamWorkflowExecutionLogsResponseBody + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["503", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + async def stream_workflow_execution_logs_async( + self, + *, + execution_id: str, + run_id: OptionalNullable[str] = UNSET, + activity_id: OptionalNullable[str] = UNSET, + after: OptionalNullable[datetime] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStreamAsync[ + models.StreamWorkflowExecutionLogsResponseBody + ]: + r"""Stream Workflow Execution Logs + + Stream logs for a workflow execution via SSE. + + If `last_event_id` is set it resumes from that cursor and takes precedence over `after`; + otherwise `after` sets a fresh stream's start point (omit both to tail from the execution start). + + :param execution_id: + :param run_id: Filter logs by workflow run ID + :param activity_id: Filter logs by activity ID + :param after: Start a fresh stream at this timestamp (ignored when resuming via last_event_id) + :param last_event_id: Resume from this cursor (a prior response's SSE id) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.StreamWorkflowExecutionLogsRequest( + execution_id=execution_id, + run_id=run_id, + activity_id=activity_id, + after=after, + last_event_id=last_event_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/logs/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="stream_workflow_execution_logs", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStreamAsync( + http_res, + lambda raw: utils.unmarshal_json( + raw, models.StreamWorkflowExecutionLogsResponseBody + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, ["503", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) diff --git a/src/mistralai/client/logs.py b/src/mistralai/client/logs.py new file mode 100644 index 00000000..e101dd4d --- /dev/null +++ b/src/mistralai/client/logs.py @@ -0,0 +1,609 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8cf582f9ca81 + +from .basesdk import BaseSDK +from datetime import datetime +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Logs(BaseSDK): + def search( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + order: Optional[models.Order] = "desc", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetLogs: + r"""Search logs + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param order: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchLogsV1ObservabilityLogsSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + logs_request=models.LogsRequest( + search_expression=search_expression, + order=order, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/logs/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.logs_request, False, False, "json", models.LogsRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_logs_v1_observability_logs_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetLogs, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_async( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + order: Optional[models.Order] = "desc", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetLogs: + r"""Search logs + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param order: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchLogsV1ObservabilityLogsSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + logs_request=models.LogsRequest( + search_expression=search_expression, + order=order, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/logs/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.logs_request, False, False, "json", models.LogsRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_logs_v1_observability_logs_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetLogs, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetLogFields: + r"""Get log field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/observability/logs/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_log_fields_v1_observability_logs_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetLogFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetLogFields: + r"""Get log field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/observability/logs/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_log_fields_v1_observability_logs_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetLogFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_options( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetLogFieldOptions: + r"""Get options for a log field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/logs/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_log_field_options_v1_observability_logs_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetLogFieldOptions, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_options_async( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetLogFieldOptions: + r"""Get options for a log field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/logs/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_log_field_options_v1_observability_logs_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetLogFieldOptions, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 2ef48e53..e12b9677 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -220,9 +220,9 @@ from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, + BaseFieldDefinitionSupportedOperator, BaseFieldDefinitionType, BaseFieldDefinitionTypedDict, - SupportedOperator, ) from .basemodelcard import BaseModelCard, BaseModelCardTypedDict from .basetaskstatus import BaseTaskStatus @@ -476,7 +476,6 @@ ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict, ) from .connector_get_auth_url_v1op import ( - BindConnectionTo, ConnectorGetAuthURLV1Request, ConnectorGetAuthURLV1RequestTypedDict, ) @@ -863,6 +862,11 @@ ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict, ) from .executionconfig import ExecutionConfig, ExecutionConfigTypedDict + from .executionlogrecord import ExecutionLogRecord, ExecutionLogRecordTypedDict + from .executionlogsearchresponse import ( + ExecutionLogSearchResponse, + ExecutionLogSearchResponseTypedDict, + ) from .export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop import ( ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest, ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict, @@ -880,6 +884,13 @@ FeedResultChatCompletionEventPreview, FeedResultChatCompletionEventPreviewTypedDict, ) + from .feedresultgetlog import FeedResultGetLog, FeedResultGetLogTypedDict + from .feedresultgetspan import FeedResultGetSpan, FeedResultGetSpanTypedDict + from .feedresultgetspanevaluation import ( + FeedResultGetSpanEvaluation, + FeedResultGetSpanEvaluationTypedDict, + ) + from .feedresultgettrace import FeedResultGetTrace, FeedResultGetTraceTypedDict from .fetchcampaignstatusresponse import ( FetchCampaignStatusResponse, FetchCampaignStatusResponseTypedDict, @@ -1056,6 +1067,10 @@ GetJudgesV1ObservabilityJudgesGetRequest, GetJudgesV1ObservabilityJudgesGetRequestTypedDict, ) + from .get_log_field_options_v1_observability_logs_fields_field_name_options_getop import ( + GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest, + GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequestTypedDict, + ) from .get_run_history_v1_workflows_runs_run_id_history_getop import ( GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest, GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict, @@ -1079,6 +1094,18 @@ GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest, GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict, ) + from .get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop import ( + GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest, + GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequestTypedDict, + ) + from .get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop import ( + GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest, + GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequestTypedDict, + ) + from .get_span_field_options_v1_observability_spans_fields_field_name_options_getop import ( + GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest, + GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequestTypedDict, + ) from .get_stream_events_v1_workflows_events_stream_getop import ( GetStreamEventsV1WorkflowsEventsStreamGetRequest, GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict, @@ -1086,6 +1113,18 @@ GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict, Scope, ) + from .get_trace_by_id_v1_observability_traces_trace_id_getop import ( + GetTraceByIDV1ObservabilityTracesTraceIDGetRequest, + GetTraceByIDV1ObservabilityTracesTraceIDGetRequestTypedDict, + ) + from .get_trace_field_options_v1_observability_traces_fields_field_name_options_getop import ( + GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest, + GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequestTypedDict, + ) + from .get_trace_spans_v1_observability_traces_trace_id_spans_getop import ( + GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest, + GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequestTypedDict, + ) from .get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop import ( GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest, GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict, @@ -1102,6 +1141,11 @@ GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest, GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict, ) + from .get_workflow_execution_logsop import ( + GetWorkflowExecutionLogsOrder, + GetWorkflowExecutionLogsRequest, + GetWorkflowExecutionLogsRequestTypedDict, + ) from .get_workflow_execution_trace_eventsop import ( GetWorkflowExecutionTraceEventsRequest, GetWorkflowExecutionTraceEventsRequestTypedDict, @@ -1135,16 +1179,45 @@ GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict, ) from .get_workflows_v1_workflows_getop import ( + DeploymentStatus, + GetWorkflowsV1WorkflowsGetOrder, GetWorkflowsV1WorkflowsGetRequest, GetWorkflowsV1WorkflowsGetRequestTypedDict, GetWorkflowsV1WorkflowsGetResponse, GetWorkflowsV1WorkflowsGetResponseTypedDict, + GetWorkflowsV1WorkflowsGetStatus, + GetWorkflowsV1WorkflowsGetStatusTypedDict, ) from .getfileresponse import GetFileResponse, GetFileResponseTypedDict + from .getlog import GetLog, GetLogTypedDict + from .getlogfieldoptions import GetLogFieldOptions, GetLogFieldOptionsTypedDict + from .getlogfields import GetLogFields, GetLogFieldsTypedDict + from .getlogs import GetLogs, GetLogsTypedDict from .getsignedurlresponse import ( GetSignedURLResponse, GetSignedURLResponseTypedDict, ) + from .getspan import GetSpan, GetSpanStatusCode, GetSpanTypedDict + from .getspanevaluation import GetSpanEvaluation, GetSpanEvaluationTypedDict + from .getspanevaluationfieldoptions import ( + GetSpanEvaluationFieldOptions, + GetSpanEvaluationFieldOptionsTypedDict, + ) + from .getspanevaluationfields import ( + GetSpanEvaluationFields, + GetSpanEvaluationFieldsTypedDict, + ) + from .getspanevaluations import GetSpanEvaluations, GetSpanEvaluationsTypedDict + from .getspanfieldoptions import GetSpanFieldOptions, GetSpanFieldOptionsTypedDict + from .getspanfields import GetSpanFields, GetSpanFieldsTypedDict + from .getspans import GetSpans, GetSpansTypedDict + from .gettrace import GetTrace, GetTraceStatusCode, GetTraceTypedDict + from .gettracefieldoptions import ( + GetTraceFieldOptions, + GetTraceFieldOptionsTypedDict, + ) + from .gettracefields import GetTraceFields, GetTraceFieldsTypedDict + from .gettraces import GetTraces, GetTracesTypedDict from .githubrepository import GithubRepository, GithubRepositoryTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .httpstatus import HTTPStatus @@ -1410,12 +1483,14 @@ ListModelsV1ModelsGetRequestTypedDict, ) from .list_runs_v1_workflows_runs_getop import ( + ListRunsV1WorkflowsRunsGetOrder, ListRunsV1WorkflowsRunsGetRequest, ListRunsV1WorkflowsRunsGetRequestTypedDict, ListRunsV1WorkflowsRunsGetResponse, ListRunsV1WorkflowsRunsGetResponseTypedDict, ListRunsV1WorkflowsRunsGetStatus, ListRunsV1WorkflowsRunsGetStatusTypedDict, + SortBy, ) from .list_voices_v1_audio_voices_getop import ( ListVoicesV1AudioVoicesGetRequest, @@ -1475,6 +1550,7 @@ ListWorkflowEventResponseTypedDict, ) from .locationtype import LocationType + from .logsrequest import LogsRequest, LogsRequestTypedDict, Order from .mcpprompt import MCPPrompt, MCPPromptTypedDict from .mcpresource import MCPResource, MCPResourceTypedDict from .mcpserverauthenticationrequirement import ( @@ -1576,7 +1652,6 @@ from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict from .oauth2token import OAuth2Token, OAuth2TokenTypedDict from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict - from .oauthmetadata import OAuthMetadata, OAuthMetadataTypedDict from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( ObservabilityErrorDetail, @@ -1603,6 +1678,12 @@ from .ocrresponse import OCRResponse, OCRResponseTypedDict from .ocrtableobject import Format, OCRTableObject, OCRTableObjectTypedDict from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict + from .otelfielddefinition import ( + OtelFieldDefinition, + OtelFieldDefinitionSupportedOperator, + OtelFieldDefinitionType, + OtelFieldDefinitionTypedDict, + ) from .outboundauthenticationtype import OutboundAuthenticationType from .outputcontentchunks import OutputContentChunks, OutputContentChunksTypedDict from .paginatedconnectors import PaginatedConnectors, PaginatedConnectorsTypedDict @@ -1795,6 +1876,26 @@ ScheduleRecentExecution, ScheduleRecentExecutionTypedDict, ) + from .search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop import ( + SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest, + SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict, + ) + from .search_logs_v1_observability_logs_search_postop import ( + SearchLogsV1ObservabilityLogsSearchPostRequest, + SearchLogsV1ObservabilityLogsSearchPostRequestTypedDict, + ) + from .search_span_evaluations_v1_observability_spans_evaluations_search_postop import ( + SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest, + SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequestTypedDict, + ) + from .search_spans_v1_observability_spans_search_postop import ( + SearchSpansV1ObservabilitySpansSearchPostRequest, + SearchSpansV1ObservabilitySpansSearchPostRequestTypedDict, + ) + from .search_traces_v1_observability_traces_search_postop import ( + SearchTracesV1ObservabilityTracesSearchPostRequest, + SearchTracesV1ObservabilityTracesSearchPostRequestTypedDict, + ) from .searchchatcompletioneventidsrequest import ( SearchChatCompletionEventIdsRequest, SearchChatCompletionEventIdsRequestTypedDict, @@ -1852,6 +1953,11 @@ SignalWorkflowResponseTypedDict, ) from .source import Source + from .spanevaluationsrequest import ( + SpanEvaluationsRequest, + SpanEvaluationsRequestTypedDict, + ) + from .spansrequest import SpansRequest, SpansRequestTypedDict from .speech_v1_audio_speech_postop import ( SpeechResponse, SpeechResponseTypedDict, @@ -1878,6 +1984,16 @@ StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody, StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict, ) + from .stream_workflow_execution_logsop import ( + StreamWorkflowExecutionLogsData, + StreamWorkflowExecutionLogsDataTypedDict, + StreamWorkflowExecutionLogsEvent, + StreamWorkflowExecutionLogsRequest, + StreamWorkflowExecutionLogsRequestTypedDict, + StreamWorkflowExecutionLogsResponseBody, + StreamWorkflowExecutionLogsResponseBodyTypedDict, + ) + from .streamerror import StreamError, StreamErrorTypedDict from .streameventssepayload import ( StreamEventSsePayload, StreamEventSsePayloadData, @@ -2036,6 +2152,7 @@ ) from .toolscapability import ToolsCapability, ToolsCapabilityTypedDict from .tooltype import ToolType + from .tracesrequest import TracesRequest, TracesRequestTypedDict from .trainingfile import TrainingFile, TrainingFileTypedDict from .transcriptionresponse import ( TranscriptionResponse, @@ -2069,6 +2186,10 @@ TranscriptionStreamTextDelta, TranscriptionStreamTextDeltaTypedDict, ) + from .trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop import ( + TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest, + TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict, + ) from .turbinemeta import TurbineMeta, TurbineMetaTypedDict from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict @@ -2367,6 +2488,10 @@ WorkflowScheduleResponse, WorkflowScheduleResponseTypedDict, ) + from .workflowscheduletriggerrequest import ( + WorkflowScheduleTriggerRequest, + WorkflowScheduleTriggerRequestTypedDict, + ) from .workflowscheduleupdaterequest import ( WorkflowScheduleUpdateRequest, WorkflowScheduleUpdateRequestTypedDict, @@ -2546,6 +2671,7 @@ "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", + "BaseFieldDefinitionSupportedOperator", "BaseFieldDefinitionType", "BaseFieldDefinitionTypedDict", "BaseModelCard", @@ -2564,7 +2690,6 @@ "BatchJobTypedDict", "BatchRequest", "BatchRequestTypedDict", - "BindConnectionTo", "BlobResourceContents", "BlobResourceContentsTypedDict", "BuiltInConnectors", @@ -2929,6 +3054,7 @@ "DeploymentLocationTypedDict", "DeploymentResponse", "DeploymentResponseTypedDict", + "DeploymentStatus", "DeploymentWorkerResponse", "DeploymentWorkerResponseTypedDict", "Document", @@ -2974,6 +3100,10 @@ "ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequestTypedDict", "ExecutionConfig", "ExecutionConfigTypedDict", + "ExecutionLogRecord", + "ExecutionLogRecordTypedDict", + "ExecutionLogSearchResponse", + "ExecutionLogSearchResponseTypedDict", "ExportDatasetResponse", "ExportDatasetResponseTypedDict", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest", @@ -2999,6 +3129,14 @@ "FailureTypedDict", "FeedResultChatCompletionEventPreview", "FeedResultChatCompletionEventPreviewTypedDict", + "FeedResultGetLog", + "FeedResultGetLogTypedDict", + "FeedResultGetSpan", + "FeedResultGetSpanEvaluation", + "FeedResultGetSpanEvaluationTypedDict", + "FeedResultGetSpanTypedDict", + "FeedResultGetTrace", + "FeedResultGetTraceTypedDict", "FetchCampaignStatusResponse", "FetchCampaignStatusResponseTypedDict", "FetchChatCompletionFieldOptionsResponse", @@ -3096,6 +3234,16 @@ "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict", "GetJudgesV1ObservabilityJudgesGetRequest", "GetJudgesV1ObservabilityJudgesGetRequestTypedDict", + "GetLog", + "GetLogFieldOptions", + "GetLogFieldOptionsTypedDict", + "GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest", + "GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequestTypedDict", + "GetLogFields", + "GetLogFieldsTypedDict", + "GetLogTypedDict", + "GetLogs", + "GetLogsTypedDict", "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest", "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict", "GetRunV1WorkflowsRunsRunIDGetRequest", @@ -3111,10 +3259,48 @@ "GetSignedURLResponseTypedDict", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict", + "GetSpan", + "GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest", + "GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequestTypedDict", + "GetSpanEvaluation", + "GetSpanEvaluationFieldOptions", + "GetSpanEvaluationFieldOptionsTypedDict", + "GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest", + "GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequestTypedDict", + "GetSpanEvaluationFields", + "GetSpanEvaluationFieldsTypedDict", + "GetSpanEvaluationTypedDict", + "GetSpanEvaluations", + "GetSpanEvaluationsTypedDict", + "GetSpanFieldOptions", + "GetSpanFieldOptionsTypedDict", + "GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest", + "GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequestTypedDict", + "GetSpanFields", + "GetSpanFieldsTypedDict", + "GetSpanStatusCode", + "GetSpanTypedDict", + "GetSpans", + "GetSpansTypedDict", "GetStreamEventsV1WorkflowsEventsStreamGetRequest", "GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict", "GetStreamEventsV1WorkflowsEventsStreamGetResponseBody", "GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict", + "GetTrace", + "GetTraceByIDV1ObservabilityTracesTraceIDGetRequest", + "GetTraceByIDV1ObservabilityTracesTraceIDGetRequestTypedDict", + "GetTraceFieldOptions", + "GetTraceFieldOptionsTypedDict", + "GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest", + "GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequestTypedDict", + "GetTraceFields", + "GetTraceFieldsTypedDict", + "GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest", + "GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequestTypedDict", + "GetTraceStatusCode", + "GetTraceTypedDict", + "GetTraces", + "GetTracesTypedDict", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict", "GetVoiceV1AudioVoicesVoiceIDGetRequest", @@ -3123,6 +3309,9 @@ "GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict", "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest", "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict", + "GetWorkflowExecutionLogsOrder", + "GetWorkflowExecutionLogsRequest", + "GetWorkflowExecutionLogsRequestTypedDict", "GetWorkflowExecutionTraceEventsRequest", "GetWorkflowExecutionTraceEventsRequestTypedDict", "GetWorkflowExecutionTraceOtelRequest", @@ -3139,10 +3328,13 @@ "GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict", "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest", "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict", + "GetWorkflowsV1WorkflowsGetOrder", "GetWorkflowsV1WorkflowsGetRequest", "GetWorkflowsV1WorkflowsGetRequestTypedDict", "GetWorkflowsV1WorkflowsGetResponse", "GetWorkflowsV1WorkflowsGetResponseTypedDict", + "GetWorkflowsV1WorkflowsGetStatus", + "GetWorkflowsV1WorkflowsGetStatusTypedDict", "GithubRepository", "GithubRepositoryTypedDict", "GuardrailConfig", @@ -3333,6 +3525,7 @@ "ListLibrariesResponseTypedDict", "ListModelsV1ModelsGetRequest", "ListModelsV1ModelsGetRequestTypedDict", + "ListRunsV1WorkflowsRunsGetOrder", "ListRunsV1WorkflowsRunsGetRequest", "ListRunsV1WorkflowsRunsGetRequestTypedDict", "ListRunsV1WorkflowsRunsGetResponse", @@ -3354,6 +3547,8 @@ "LogicalExpression", "LogicalExpressionType", "LogicalExpressionTypedDict", + "LogsRequest", + "LogsRequestTypedDict", "MCPPrompt", "MCPPromptTypedDict", "MCPResource", @@ -3437,8 +3632,6 @@ "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", "OAuth2TokenTypedDict", - "OAuthMetadata", - "OAuthMetadataTypedDict", "OCRConfidenceScore", "OCRConfidenceScoreTypedDict", "OCRImageObject", @@ -3466,7 +3659,12 @@ "OptionTypedDict", "Or", "OrTypedDict", + "Order", "OrderBy", + "OtelFieldDefinition", + "OtelFieldDefinitionSupportedOperator", + "OtelFieldDefinitionType", + "OtelFieldDefinitionTypedDict", "OutboundAuthenticationType", "OutputContentChunks", "OutputContentChunksTypedDict", @@ -3646,6 +3844,16 @@ "SearchIndexResponseIndexTypedDict", "SearchIndexResponseStatus", "SearchIndexResponseTypedDict", + "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest", + "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict", + "SearchLogsV1ObservabilityLogsSearchPostRequest", + "SearchLogsV1ObservabilityLogsSearchPostRequestTypedDict", + "SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest", + "SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequestTypedDict", + "SearchSpansV1ObservabilitySpansSearchPostRequest", + "SearchSpansV1ObservabilitySpansSearchPostRequestTypedDict", + "SearchTracesV1ObservabilityTracesSearchPostRequest", + "SearchTracesV1ObservabilityTracesSearchPostRequestTypedDict", "Security", "SecurityTypedDict", "ServerCapabilities", @@ -3677,7 +3885,12 @@ "SignalWorkflowResponseTypedDict", "SkipConfirmation", "SkipConfirmationTypedDict", + "SortBy", "Source", + "SpanEvaluationsRequest", + "SpanEvaluationsRequestTypedDict", + "SpansRequest", + "SpansRequestTypedDict", "SpeechOutputFormat", "SpeechRequest", "SpeechRequestTypedDict", @@ -3694,6 +3907,8 @@ "SpeechV1AudioSpeechPostDataTypedDict", "SpeechV1AudioSpeechPostResponse", "SpeechV1AudioSpeechPostResponseTypedDict", + "StreamError", + "StreamErrorTypedDict", "StreamEventSsePayload", "StreamEventSsePayloadData", "StreamEventSsePayloadDataTypedDict", @@ -3704,7 +3919,13 @@ "StreamV1WorkflowsExecutionsExecutionIDStreamGetRequestTypedDict", "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody", "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict", - "SupportedOperator", + "StreamWorkflowExecutionLogsData", + "StreamWorkflowExecutionLogsDataTypedDict", + "StreamWorkflowExecutionLogsEvent", + "StreamWorkflowExecutionLogsRequest", + "StreamWorkflowExecutionLogsRequestTypedDict", + "StreamWorkflowExecutionLogsResponseBody", + "StreamWorkflowExecutionLogsResponseBodyTypedDict", "SystemMessage", "SystemMessageContent", "SystemMessageContentChunks", @@ -3821,6 +4042,8 @@ "ToolsCapability", "ToolsCapabilityTypedDict", "ToolsTypedDict", + "TracesRequest", + "TracesRequestTypedDict", "TrainingFile", "TrainingFileTypedDict", "TranscriptionResponse", @@ -3840,6 +4063,8 @@ "TranscriptionStreamSegmentDeltaTypedDict", "TranscriptionStreamTextDelta", "TranscriptionStreamTextDeltaTypedDict", + "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest", + "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict", "TurbineMeta", "TurbineMetaTypedDict", "TurbineToolLocale", @@ -4048,6 +4273,8 @@ "WorkflowScheduleRequestTypedDict", "WorkflowScheduleResponse", "WorkflowScheduleResponseTypedDict", + "WorkflowScheduleTriggerRequest", + "WorkflowScheduleTriggerRequestTypedDict", "WorkflowScheduleUpdateRequest", "WorkflowScheduleUpdateRequestTypedDict", "WorkflowTaskFailedAttributes", @@ -4201,9 +4428,9 @@ "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", + "BaseFieldDefinitionSupportedOperator": ".basefielddefinition", "BaseFieldDefinitionType": ".basefielddefinition", "BaseFieldDefinitionTypedDict": ".basefielddefinition", - "SupportedOperator": ".basefielddefinition", "BaseModelCard": ".basemodelcard", "BaseModelCardTypedDict": ".basemodelcard", "BaseTaskStatus": ".basetaskstatus", @@ -4380,7 +4607,6 @@ "ConnectorDeleteV1RequestTypedDict": ".connector_delete_v1op", "ConnectorDeleteWorkspaceCredentialsV1Request": ".connector_delete_workspace_credentials_v1op", "ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict": ".connector_delete_workspace_credentials_v1op", - "BindConnectionTo": ".connector_get_auth_url_v1op", "ConnectorGetAuthURLV1Request": ".connector_get_auth_url_v1op", "ConnectorGetAuthURLV1RequestTypedDict": ".connector_get_auth_url_v1op", "ConnectorGetAuthenticationMethodsV1Request": ".connector_get_authentication_methods_v1op", @@ -4648,6 +4874,10 @@ "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict": ".execute_workflow_v1_workflows_workflow_identifier_execute_postop", "ExecutionConfig": ".executionconfig", "ExecutionConfigTypedDict": ".executionconfig", + "ExecutionLogRecord": ".executionlogrecord", + "ExecutionLogRecordTypedDict": ".executionlogrecord", + "ExecutionLogSearchResponse": ".executionlogsearchresponse", + "ExecutionLogSearchResponseTypedDict": ".executionlogsearchresponse", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest": ".export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict": ".export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop", "ExportDatasetResponse": ".exportdatasetresponse", @@ -4658,6 +4888,14 @@ "FailureTypedDict": ".failure", "FeedResultChatCompletionEventPreview": ".feedresultchatcompletioneventpreview", "FeedResultChatCompletionEventPreviewTypedDict": ".feedresultchatcompletioneventpreview", + "FeedResultGetLog": ".feedresultgetlog", + "FeedResultGetLogTypedDict": ".feedresultgetlog", + "FeedResultGetSpan": ".feedresultgetspan", + "FeedResultGetSpanTypedDict": ".feedresultgetspan", + "FeedResultGetSpanEvaluation": ".feedresultgetspanevaluation", + "FeedResultGetSpanEvaluationTypedDict": ".feedresultgetspanevaluation", + "FeedResultGetTrace": ".feedresultgettrace", + "FeedResultGetTraceTypedDict": ".feedresultgettrace", "FetchCampaignStatusResponse": ".fetchcampaignstatusresponse", "FetchCampaignStatusResponseTypedDict": ".fetchcampaignstatusresponse", "FetchChatCompletionFieldOptionsResponse": ".fetchchatcompletionfieldoptionsresponse", @@ -4771,6 +5009,8 @@ "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict": ".get_judge_by_id_v1_observability_judges_judge_id_getop", "GetJudgesV1ObservabilityJudgesGetRequest": ".get_judges_v1_observability_judges_getop", "GetJudgesV1ObservabilityJudgesGetRequestTypedDict": ".get_judges_v1_observability_judges_getop", + "GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest": ".get_log_field_options_v1_observability_logs_fields_field_name_options_getop", + "GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequestTypedDict": ".get_log_field_options_v1_observability_logs_fields_field_name_options_getop", "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest": ".get_run_history_v1_workflows_runs_run_id_history_getop", "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict": ".get_run_history_v1_workflows_runs_run_id_history_getop", "GetRunV1WorkflowsRunsRunIDGetRequest": ".get_run_v1_workflows_runs_run_id_getop", @@ -4784,11 +5024,23 @@ "GetSchedulesV1WorkflowsSchedulesGetStatus": ".get_schedules_v1_workflows_schedules_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", + "GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest": ".get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop", + "GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequestTypedDict": ".get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop", + "GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest": ".get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop", + "GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequestTypedDict": ".get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop", + "GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest": ".get_span_field_options_v1_observability_spans_fields_field_name_options_getop", + "GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequestTypedDict": ".get_span_field_options_v1_observability_spans_fields_field_name_options_getop", "GetStreamEventsV1WorkflowsEventsStreamGetRequest": ".get_stream_events_v1_workflows_events_stream_getop", "GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict": ".get_stream_events_v1_workflows_events_stream_getop", "GetStreamEventsV1WorkflowsEventsStreamGetResponseBody": ".get_stream_events_v1_workflows_events_stream_getop", "GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict": ".get_stream_events_v1_workflows_events_stream_getop", "Scope": ".get_stream_events_v1_workflows_events_stream_getop", + "GetTraceByIDV1ObservabilityTracesTraceIDGetRequest": ".get_trace_by_id_v1_observability_traces_trace_id_getop", + "GetTraceByIDV1ObservabilityTracesTraceIDGetRequestTypedDict": ".get_trace_by_id_v1_observability_traces_trace_id_getop", + "GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest": ".get_trace_field_options_v1_observability_traces_fields_field_name_options_getop", + "GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequestTypedDict": ".get_trace_field_options_v1_observability_traces_fields_field_name_options_getop", + "GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest": ".get_trace_spans_v1_observability_traces_trace_id_spans_getop", + "GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequestTypedDict": ".get_trace_spans_v1_observability_traces_trace_id_spans_getop", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", "GetVoiceV1AudioVoicesVoiceIDGetRequest": ".get_voice_v1_audio_voices_voice_id_getop", @@ -4797,6 +5049,9 @@ "GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict": ".get_workflow_events_v1_workflows_events_list_getop", "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest": ".get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop", "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict": ".get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop", + "GetWorkflowExecutionLogsOrder": ".get_workflow_execution_logsop", + "GetWorkflowExecutionLogsRequest": ".get_workflow_execution_logsop", + "GetWorkflowExecutionLogsRequestTypedDict": ".get_workflow_execution_logsop", "GetWorkflowExecutionTraceEventsRequest": ".get_workflow_execution_trace_eventsop", "GetWorkflowExecutionTraceEventsRequestTypedDict": ".get_workflow_execution_trace_eventsop", "GetWorkflowExecutionTraceOtelRequest": ".get_workflow_execution_trace_otelop", @@ -4813,14 +5068,52 @@ "GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict": ".get_workflow_registrations_v1_workflows_registrations_getop", "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest": ".get_workflow_v1_workflows_workflow_identifier_getop", "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict": ".get_workflow_v1_workflows_workflow_identifier_getop", + "DeploymentStatus": ".get_workflows_v1_workflows_getop", + "GetWorkflowsV1WorkflowsGetOrder": ".get_workflows_v1_workflows_getop", "GetWorkflowsV1WorkflowsGetRequest": ".get_workflows_v1_workflows_getop", "GetWorkflowsV1WorkflowsGetRequestTypedDict": ".get_workflows_v1_workflows_getop", "GetWorkflowsV1WorkflowsGetResponse": ".get_workflows_v1_workflows_getop", "GetWorkflowsV1WorkflowsGetResponseTypedDict": ".get_workflows_v1_workflows_getop", + "GetWorkflowsV1WorkflowsGetStatus": ".get_workflows_v1_workflows_getop", + "GetWorkflowsV1WorkflowsGetStatusTypedDict": ".get_workflows_v1_workflows_getop", "GetFileResponse": ".getfileresponse", "GetFileResponseTypedDict": ".getfileresponse", + "GetLog": ".getlog", + "GetLogTypedDict": ".getlog", + "GetLogFieldOptions": ".getlogfieldoptions", + "GetLogFieldOptionsTypedDict": ".getlogfieldoptions", + "GetLogFields": ".getlogfields", + "GetLogFieldsTypedDict": ".getlogfields", + "GetLogs": ".getlogs", + "GetLogsTypedDict": ".getlogs", "GetSignedURLResponse": ".getsignedurlresponse", "GetSignedURLResponseTypedDict": ".getsignedurlresponse", + "GetSpan": ".getspan", + "GetSpanStatusCode": ".getspan", + "GetSpanTypedDict": ".getspan", + "GetSpanEvaluation": ".getspanevaluation", + "GetSpanEvaluationTypedDict": ".getspanevaluation", + "GetSpanEvaluationFieldOptions": ".getspanevaluationfieldoptions", + "GetSpanEvaluationFieldOptionsTypedDict": ".getspanevaluationfieldoptions", + "GetSpanEvaluationFields": ".getspanevaluationfields", + "GetSpanEvaluationFieldsTypedDict": ".getspanevaluationfields", + "GetSpanEvaluations": ".getspanevaluations", + "GetSpanEvaluationsTypedDict": ".getspanevaluations", + "GetSpanFieldOptions": ".getspanfieldoptions", + "GetSpanFieldOptionsTypedDict": ".getspanfieldoptions", + "GetSpanFields": ".getspanfields", + "GetSpanFieldsTypedDict": ".getspanfields", + "GetSpans": ".getspans", + "GetSpansTypedDict": ".getspans", + "GetTrace": ".gettrace", + "GetTraceStatusCode": ".gettrace", + "GetTraceTypedDict": ".gettrace", + "GetTraceFieldOptions": ".gettracefieldoptions", + "GetTraceFieldOptionsTypedDict": ".gettracefieldoptions", + "GetTraceFields": ".gettracefields", + "GetTraceFieldsTypedDict": ".gettracefields", + "GetTraces": ".gettraces", + "GetTracesTypedDict": ".gettraces", "GithubRepository": ".githubrepository", "GithubRepositoryTypedDict": ".githubrepository", "GuardrailConfig": ".guardrailconfig", @@ -4997,12 +5290,14 @@ "ListDeploymentsV1WorkflowsDeploymentsGetRequestTypedDict": ".list_deployments_v1_workflows_deployments_getop", "ListModelsV1ModelsGetRequest": ".list_models_v1_models_getop", "ListModelsV1ModelsGetRequestTypedDict": ".list_models_v1_models_getop", + "ListRunsV1WorkflowsRunsGetOrder": ".list_runs_v1_workflows_runs_getop", "ListRunsV1WorkflowsRunsGetRequest": ".list_runs_v1_workflows_runs_getop", "ListRunsV1WorkflowsRunsGetRequestTypedDict": ".list_runs_v1_workflows_runs_getop", "ListRunsV1WorkflowsRunsGetResponse": ".list_runs_v1_workflows_runs_getop", "ListRunsV1WorkflowsRunsGetResponseTypedDict": ".list_runs_v1_workflows_runs_getop", "ListRunsV1WorkflowsRunsGetStatus": ".list_runs_v1_workflows_runs_getop", "ListRunsV1WorkflowsRunsGetStatusTypedDict": ".list_runs_v1_workflows_runs_getop", + "SortBy": ".list_runs_v1_workflows_runs_getop", "ListVoicesV1AudioVoicesGetRequest": ".list_voices_v1_audio_voices_getop", "ListVoicesV1AudioVoicesGetRequestTypedDict": ".list_voices_v1_audio_voices_getop", "ListVoicesV1AudioVoicesGetType": ".list_voices_v1_audio_voices_getop", @@ -5040,6 +5335,9 @@ "ListWorkflowEventResponseEventTypedDict": ".listworkfloweventresponse", "ListWorkflowEventResponseTypedDict": ".listworkfloweventresponse", "LocationType": ".locationtype", + "LogsRequest": ".logsrequest", + "LogsRequestTypedDict": ".logsrequest", + "Order": ".logsrequest", "MCPPrompt": ".mcpprompt", "MCPPromptTypedDict": ".mcpprompt", "MCPResource": ".mcpresource", @@ -5131,8 +5429,6 @@ "OAuth2TokenTypedDict": ".oauth2token", "OAuth2TokenAuth": ".oauth2tokenauth", "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", - "OAuthMetadata": ".oauthmetadata", - "OAuthMetadataTypedDict": ".oauthmetadata", "ObservabilityErrorCode": ".observabilityerrorcode", "ObservabilityErrorDetail": ".observabilityerrordetail", "ObservabilityErrorDetailTypedDict": ".observabilityerrordetail", @@ -5161,6 +5457,10 @@ "OCRTableObjectTypedDict": ".ocrtableobject", "OCRUsageInfo": ".ocrusageinfo", "OCRUsageInfoTypedDict": ".ocrusageinfo", + "OtelFieldDefinition": ".otelfielddefinition", + "OtelFieldDefinitionSupportedOperator": ".otelfielddefinition", + "OtelFieldDefinitionType": ".otelfielddefinition", + "OtelFieldDefinitionTypedDict": ".otelfielddefinition", "OutboundAuthenticationType": ".outboundauthenticationtype", "OutputContentChunks": ".outputcontentchunks", "OutputContentChunksTypedDict": ".outputcontentchunks", @@ -5302,6 +5602,16 @@ "ScheduleRangeTypedDict": ".schedulerange", "ScheduleRecentExecution": ".schedulerecentexecution", "ScheduleRecentExecutionTypedDict": ".schedulerecentexecution", + "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest": ".search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop", + "SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict": ".search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop", + "SearchLogsV1ObservabilityLogsSearchPostRequest": ".search_logs_v1_observability_logs_search_postop", + "SearchLogsV1ObservabilityLogsSearchPostRequestTypedDict": ".search_logs_v1_observability_logs_search_postop", + "SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest": ".search_span_evaluations_v1_observability_spans_evaluations_search_postop", + "SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequestTypedDict": ".search_span_evaluations_v1_observability_spans_evaluations_search_postop", + "SearchSpansV1ObservabilitySpansSearchPostRequest": ".search_spans_v1_observability_spans_search_postop", + "SearchSpansV1ObservabilitySpansSearchPostRequestTypedDict": ".search_spans_v1_observability_spans_search_postop", + "SearchTracesV1ObservabilityTracesSearchPostRequest": ".search_traces_v1_observability_traces_search_postop", + "SearchTracesV1ObservabilityTracesSearchPostRequestTypedDict": ".search_traces_v1_observability_traces_search_postop", "SearchChatCompletionEventIdsRequest": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsRequestTypedDict": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsResponse": ".searchchatcompletioneventidsresponse", @@ -5346,6 +5656,10 @@ "SignalWorkflowResponse": ".signalworkflowresponse", "SignalWorkflowResponseTypedDict": ".signalworkflowresponse", "Source": ".source", + "SpanEvaluationsRequest": ".spanevaluationsrequest", + "SpanEvaluationsRequestTypedDict": ".spanevaluationsrequest", + "SpansRequest": ".spansrequest", + "SpansRequestTypedDict": ".spansrequest", "SpeechResponse": ".speech_v1_audio_speech_postop", "SpeechResponseTypedDict": ".speech_v1_audio_speech_postop", "SpeechStreamEvents": ".speech_v1_audio_speech_postop", @@ -5368,6 +5682,15 @@ "StreamV1WorkflowsExecutionsExecutionIDStreamGetRequestTypedDict": ".stream_v1_workflows_executions_execution_id_stream_getop", "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody": ".stream_v1_workflows_executions_execution_id_stream_getop", "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict": ".stream_v1_workflows_executions_execution_id_stream_getop", + "StreamWorkflowExecutionLogsData": ".stream_workflow_execution_logsop", + "StreamWorkflowExecutionLogsDataTypedDict": ".stream_workflow_execution_logsop", + "StreamWorkflowExecutionLogsEvent": ".stream_workflow_execution_logsop", + "StreamWorkflowExecutionLogsRequest": ".stream_workflow_execution_logsop", + "StreamWorkflowExecutionLogsRequestTypedDict": ".stream_workflow_execution_logsop", + "StreamWorkflowExecutionLogsResponseBody": ".stream_workflow_execution_logsop", + "StreamWorkflowExecutionLogsResponseBodyTypedDict": ".stream_workflow_execution_logsop", + "StreamError": ".streamerror", + "StreamErrorTypedDict": ".streamerror", "StreamEventSsePayload": ".streameventssepayload", "StreamEventSsePayloadData": ".streameventssepayload", "StreamEventSsePayloadDataTypedDict": ".streameventssepayload", @@ -5492,6 +5815,8 @@ "ToolsCapability": ".toolscapability", "ToolsCapabilityTypedDict": ".toolscapability", "ToolType": ".tooltype", + "TracesRequest": ".tracesrequest", + "TracesRequestTypedDict": ".tracesrequest", "TrainingFile": ".trainingfile", "TrainingFileTypedDict": ".trainingfile", "TranscriptionResponse": ".transcriptionresponse", @@ -5512,6 +5837,8 @@ "TranscriptionStreamSegmentDeltaTypedDict": ".transcriptionstreamsegmentdelta", "TranscriptionStreamTextDelta": ".transcriptionstreamtextdelta", "TranscriptionStreamTextDeltaTypedDict": ".transcriptionstreamtextdelta", + "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest": ".trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop", + "TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict": ".trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop", "TurbineMeta": ".turbinemeta", "TurbineMetaTypedDict": ".turbinemeta", "TurbineToolLocale": ".turbinetoollocale", @@ -5700,6 +6027,8 @@ "WorkflowScheduleRequestTypedDict": ".workflowschedulerequest", "WorkflowScheduleResponse": ".workflowscheduleresponse", "WorkflowScheduleResponseTypedDict": ".workflowscheduleresponse", + "WorkflowScheduleTriggerRequest": ".workflowscheduletriggerrequest", + "WorkflowScheduleTriggerRequestTypedDict": ".workflowscheduletriggerrequest", "WorkflowScheduleUpdateRequest": ".workflowscheduleupdaterequest", "WorkflowScheduleUpdateRequestTypedDict": ".workflowscheduleupdaterequest", "WorkflowTaskFailedAttributes": ".workflowtaskfailedattributes", diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index 2b45183d..88470163 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -30,7 +30,7 @@ ] -SupportedOperator = Union[ +BaseFieldDefinitionSupportedOperator = Union[ Literal[ "lt", "lte", @@ -60,7 +60,7 @@ class BaseFieldDefinitionTypedDict(TypedDict): name: str label: str type: BaseFieldDefinitionType - supported_operators: List[SupportedOperator] + supported_operators: List[BaseFieldDefinitionSupportedOperator] group: NotRequired[Nullable[str]] @@ -71,7 +71,7 @@ class BaseFieldDefinition(BaseModel): type: BaseFieldDefinitionType - supported_operators: List[SupportedOperator] + supported_operators: List[BaseFieldDefinitionSupportedOperator] group: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/connector_get_auth_url_v1op.py b/src/mistralai/client/models/connector_get_auth_url_v1op.py index c9b58333..854fbcd3 100644 --- a/src/mistralai/client/models/connector_get_auth_url_v1op.py +++ b/src/mistralai/client/models/connector_get_auth_url_v1op.py @@ -12,23 +12,18 @@ ) from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata from pydantic import model_serializer -from typing import Literal, Optional +from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -BindConnectionTo = Literal[ - "user", - "org", -] - - class ConnectorGetAuthURLV1RequestTypedDict(TypedDict): connector_id_or_name: str app_return_url: NotRequired[Nullable[str]] method_type: NotRequired[OutboundAuthenticationType] r"""Auth method type to use for the authorization URL. Required when the connector supports multiple interactive auth methods; otherwise the sole method is selected automatically. Use this to pick a specific method (e.g. 'oauth2' vs 'github_app').""" credentials_name: NotRequired[Nullable[str]] - bind_connection_to: NotRequired[BindConnectionTo] + github_installation_link: NotRequired[bool] + r"""Only valid with method_type=oauth2. When true, returns a GitHub App installation URL (https://github.com/apps//installations/new) if the connector has the proper configuration The Github application needs to have 'Request user authorization (OAuth) during installation' enabled to perform the proper auth loop.""" class ConnectorGetAuthURLV1Request(BaseModel): @@ -52,15 +47,21 @@ class ConnectorGetAuthURLV1Request(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - bind_connection_to: Annotated[ - Optional[BindConnectionTo], + github_installation_link: Annotated[ + Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = "user" + ] = False + r"""Only valid with method_type=oauth2. When true, returns a GitHub App installation URL (https://github.com/apps//installations/new) if the connector has the proper configuration The Github application needs to have 'Request user authorization (OAuth) during installation' enabled to perform the proper auth loop.""" @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["app_return_url", "method_type", "credentials_name", "bind_connection_to"] + [ + "app_return_url", + "method_type", + "credentials_name", + "github_installation_link", + ] ) nullable_fields = set(["app_return_url", "credentials_name"]) serialized = handler(self) diff --git a/src/mistralai/client/models/executionlogrecord.py b/src/mistralai/client/models/executionlogrecord.py new file mode 100644 index 00000000..3e889cc4 --- /dev/null +++ b/src/mistralai/client/models/executionlogrecord.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 59aa2dd2c4a1 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class ExecutionLogRecordTypedDict(TypedDict): + timestamp: datetime + trace_id: str + span_id: str + severity_text: str + body: str + log_attributes: Dict[str, str] + + +class ExecutionLogRecord(BaseModel): + timestamp: datetime + + trace_id: str + + span_id: str + + severity_text: str + + body: str + + log_attributes: Dict[str, str] diff --git a/src/mistralai/client/models/executionlogsearchresponse.py b/src/mistralai/client/models/executionlogsearchresponse.py new file mode 100644 index 00000000..8095c314 --- /dev/null +++ b/src/mistralai/client/models/executionlogsearchresponse.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 967bf5f43b22 + +from __future__ import annotations +from .executionlogrecord import ExecutionLogRecord, ExecutionLogRecordTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ExecutionLogSearchResponseTypedDict(TypedDict): + results: List[ExecutionLogRecordTypedDict] + next_cursor: NotRequired[Nullable[str]] + + +class ExecutionLogSearchResponse(BaseModel): + results: List[ExecutionLogRecord] + + next_cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next_cursor"]) + nullable_fields = set(["next_cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/extendedoauthservermetadata.py b/src/mistralai/client/models/extendedoauthservermetadata.py index a3ec07d3..e45827d5 100644 --- a/src/mistralai/client/models/extendedoauthservermetadata.py +++ b/src/mistralai/client/models/extendedoauthservermetadata.py @@ -2,7 +2,6 @@ # @generated-id: 967e2e08f18c from __future__ import annotations -from .oauthmetadata import OAuthMetadata, OAuthMetadataTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -48,7 +47,6 @@ class ExtendedOAuthServerMetadataTypedDict(TypedDict): ] code_challenge_methods_supported: NotRequired[Nullable[List[str]]] client_id_metadata_document_supported: NotRequired[Nullable[bool]] - x_org_server_metadata: NotRequired[Nullable[OAuthMetadataTypedDict]] x_resource_url: NotRequired[Nullable[str]] @@ -109,8 +107,6 @@ class ExtendedOAuthServerMetadata(BaseModel): client_id_metadata_document_supported: OptionalNullable[bool] = UNSET - x_org_server_metadata: OptionalNullable[OAuthMetadata] = UNSET - x_resource_url: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") @@ -136,7 +132,6 @@ def serialize_model(self, handler): "introspection_endpoint_auth_signing_alg_values_supported", "code_challenge_methods_supported", "client_id_metadata_document_supported", - "x_org_server_metadata", "x_resource_url", ] ) @@ -160,7 +155,6 @@ def serialize_model(self, handler): "introspection_endpoint_auth_signing_alg_values_supported", "code_challenge_methods_supported", "client_id_metadata_document_supported", - "x_org_server_metadata", "x_resource_url", ] ) diff --git a/src/mistralai/client/models/feedresultgetlog.py b/src/mistralai/client/models/feedresultgetlog.py new file mode 100644 index 00000000..f3395a68 --- /dev/null +++ b/src/mistralai/client/models/feedresultgetlog.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 35106cf21e36 + +from __future__ import annotations +from .getlog import GetLog, GetLogTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class FeedResultGetLogTypedDict(TypedDict): + results: NotRequired[List[GetLogTypedDict]] + next: NotRequired[Nullable[str]] + cursor: NotRequired[Nullable[str]] + + +class FeedResultGetLog(BaseModel): + results: Optional[List[GetLog]] = None + + next: OptionalNullable[str] = UNSET + + cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "cursor"]) + nullable_fields = set(["next", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/feedresultgetspan.py b/src/mistralai/client/models/feedresultgetspan.py new file mode 100644 index 00000000..20663e3f --- /dev/null +++ b/src/mistralai/client/models/feedresultgetspan.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 39914702ec21 + +from __future__ import annotations +from .getspan import GetSpan, GetSpanTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class FeedResultGetSpanTypedDict(TypedDict): + results: NotRequired[List[GetSpanTypedDict]] + next: NotRequired[Nullable[str]] + cursor: NotRequired[Nullable[str]] + + +class FeedResultGetSpan(BaseModel): + results: Optional[List[GetSpan]] = None + + next: OptionalNullable[str] = UNSET + + cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "cursor"]) + nullable_fields = set(["next", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/feedresultgetspanevaluation.py b/src/mistralai/client/models/feedresultgetspanevaluation.py new file mode 100644 index 00000000..757fba76 --- /dev/null +++ b/src/mistralai/client/models/feedresultgetspanevaluation.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 75d380a8e7fb + +from __future__ import annotations +from .getspanevaluation import GetSpanEvaluation, GetSpanEvaluationTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class FeedResultGetSpanEvaluationTypedDict(TypedDict): + results: NotRequired[List[GetSpanEvaluationTypedDict]] + next: NotRequired[Nullable[str]] + cursor: NotRequired[Nullable[str]] + + +class FeedResultGetSpanEvaluation(BaseModel): + results: Optional[List[GetSpanEvaluation]] = None + + next: OptionalNullable[str] = UNSET + + cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "cursor"]) + nullable_fields = set(["next", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/feedresultgettrace.py b/src/mistralai/client/models/feedresultgettrace.py new file mode 100644 index 00000000..142a9ceb --- /dev/null +++ b/src/mistralai/client/models/feedresultgettrace.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8216f7641078 + +from __future__ import annotations +from .gettrace import GetTrace, GetTraceTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class FeedResultGetTraceTypedDict(TypedDict): + results: NotRequired[List[GetTraceTypedDict]] + next: NotRequired[Nullable[str]] + cursor: NotRequired[Nullable[str]] + + +class FeedResultGetTrace(BaseModel): + results: Optional[List[GetTrace]] = None + + next: OptionalNullable[str] = UNSET + + cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "cursor"]) + nullable_fields = set(["next", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_log_field_options_v1_observability_logs_fields_field_name_options_getop.py b/src/mistralai/client/models/get_log_field_options_v1_observability_logs_fields_field_name_options_getop.py new file mode 100644 index 00000000..0bf3b7fb --- /dev/null +++ b/src/mistralai/client/models/get_log_field_options_v1_observability_logs_fields_field_name_options_getop.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5cb47b819527 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequestTypedDict( + TypedDict +): + field_name: str + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + + +class GetLogFieldOptionsV1ObservabilityLogsFieldsFieldNameOptionsGetRequest(BaseModel): + field_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to"]) + nullable_fields = set(["from", "to"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop.py b/src/mistralai/client/models/get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop.py new file mode 100644 index 00000000..64fc2d80 --- /dev/null +++ b/src/mistralai/client/models/get_span_by_id_v1_observability_traces_trace_id_spans_span_id_getop.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5827757f5577 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequestTypedDict(TypedDict): + trace_id: str + span_id: str + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + + +class GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest(BaseModel): + trace_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + span_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to"]) + nullable_fields = set(["from", "to"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop.py b/src/mistralai/client/models/get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop.py new file mode 100644 index 00000000..54b33797 --- /dev/null +++ b/src/mistralai/client/models/get_span_evaluation_field_options_v1_observability_spans_evaluations_fields_field_name_options_getop.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 366d52a81fad + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequestTypedDict( + TypedDict +): + field_name: str + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + + +class GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest( + BaseModel +): + field_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to"]) + nullable_fields = set(["from", "to"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_span_field_options_v1_observability_spans_fields_field_name_options_getop.py b/src/mistralai/client/models/get_span_field_options_v1_observability_spans_fields_field_name_options_getop.py new file mode 100644 index 00000000..40aead4d --- /dev/null +++ b/src/mistralai/client/models/get_span_field_options_v1_observability_spans_fields_field_name_options_getop.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5a4fca728b6e + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequestTypedDict( + TypedDict +): + field_name: str + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + + +class GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest( + BaseModel +): + field_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to"]) + nullable_fields = set(["from", "to"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_trace_by_id_v1_observability_traces_trace_id_getop.py b/src/mistralai/client/models/get_trace_by_id_v1_observability_traces_trace_id_getop.py new file mode 100644 index 00000000..fb84444b --- /dev/null +++ b/src/mistralai/client/models/get_trace_by_id_v1_observability_traces_trace_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a7ad88602f1b + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetTraceByIDV1ObservabilityTracesTraceIDGetRequestTypedDict(TypedDict): + trace_id: str + + +class GetTraceByIDV1ObservabilityTracesTraceIDGetRequest(BaseModel): + trace_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_trace_field_options_v1_observability_traces_fields_field_name_options_getop.py b/src/mistralai/client/models/get_trace_field_options_v1_observability_traces_fields_field_name_options_getop.py new file mode 100644 index 00000000..0d8fc763 --- /dev/null +++ b/src/mistralai/client/models/get_trace_field_options_v1_observability_traces_fields_field_name_options_getop.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 56e51fef9440 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequestTypedDict( + TypedDict +): + field_name: str + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + + +class GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest( + BaseModel +): + field_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to"]) + nullable_fields = set(["from", "to"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_trace_spans_v1_observability_traces_trace_id_spans_getop.py b/src/mistralai/client/models/get_trace_spans_v1_observability_traces_trace_id_spans_getop.py new file mode 100644 index 00000000..c7f0e39c --- /dev/null +++ b/src/mistralai/client/models/get_trace_spans_v1_observability_traces_trace_id_spans_getop.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e0cacaec1f92 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequestTypedDict(TypedDict): + trace_id: str + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest(BaseModel): + trace_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to", "page_size", "cursor"]) + nullable_fields = set(["from", "to", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_execution_logsop.py b/src/mistralai/client/models/get_workflow_execution_logsop.py new file mode 100644 index 00000000..1bfe5f52 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_execution_logsop.py @@ -0,0 +1,116 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 53708093eaee + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +GetWorkflowExecutionLogsOrder = Literal[ + "asc", + "desc", +] +r"""First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set.""" + + +class GetWorkflowExecutionLogsRequestTypedDict(TypedDict): + execution_id: str + run_id: NotRequired[Nullable[str]] + r"""Filter logs by workflow run ID""" + activity_id: NotRequired[Nullable[str]] + r"""Filter logs by activity ID""" + after: NotRequired[Nullable[datetime]] + r"""Only return logs at or after this timestamp""" + before: NotRequired[Nullable[datetime]] + r"""Only return logs before this timestamp""" + order: NotRequired[GetWorkflowExecutionLogsOrder] + r"""First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set.""" + cursor: NotRequired[Nullable[str]] + r"""Pagination cursor from a previous response's `next_cursor`; carries the window and order""" + limit: NotRequired[int] + r"""Maximum number of logs to return""" + + +class GetWorkflowExecutionLogsRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + run_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter logs by workflow run ID""" + + activity_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter logs by activity ID""" + + after: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Only return logs at or after this timestamp""" + + before: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Only return logs before this timestamp""" + + order: Annotated[ + Optional[GetWorkflowExecutionLogsOrder], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "asc" + r"""First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when `cursor` is set.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Pagination cursor from a previous response's `next_cursor`; carries the window and order""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""Maximum number of logs to return""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["run_id", "activity_id", "after", "before", "order", "cursor", "limit"] + ) + nullable_fields = set(["run_id", "activity_id", "after", "before", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflows_v1_workflows_getop.py b/src/mistralai/client/models/get_workflows_v1_workflows_getop.py index 74ee649e..8c40d427 100644 --- a/src/mistralai/client/models/get_workflows_v1_workflows_getop.py +++ b/src/mistralai/client/models/get_workflows_v1_workflows_getop.py @@ -2,6 +2,7 @@ # @generated-id: a128585aee76 from __future__ import annotations +from .workflowexecutionstatus import WorkflowExecutionStatus from .workflowlistresponse import WorkflowListResponse, WorkflowListResponseTypedDict from mistralai.client.types import ( BaseModel, @@ -10,35 +11,75 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, validate_const +import pydantic from pydantic import model_serializer -from typing import Awaitable, Callable, List, Optional, Union -from typing_extensions import Annotated, NotRequired, TypedDict +from pydantic.functional_validators import AfterValidator +from typing import Awaitable, Callable, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +GetWorkflowsV1WorkflowsGetStatusTypedDict = TypeAliasType( + "GetWorkflowsV1WorkflowsGetStatusTypedDict", + Union[WorkflowExecutionStatus, List[WorkflowExecutionStatus]], +) +r"""Filter by workflow status""" + + +GetWorkflowsV1WorkflowsGetStatus = TypeAliasType( + "GetWorkflowsV1WorkflowsGetStatus", + Union[WorkflowExecutionStatus, List[WorkflowExecutionStatus]], +) +r"""Filter by workflow status""" + + +DeploymentStatus = Literal[ + "active", + "inactive", +] +r"""Filter by deployment activity. active=only active, inactive=only inactive, None=no filter""" + + +GetWorkflowsV1WorkflowsGetOrder = Literal[ + "asc", + "desc", +] +r"""Sort direction""" class GetWorkflowsV1WorkflowsGetRequestTypedDict(TypedDict): - active_only: NotRequired[bool] - r"""Whether to only return active workflows""" + status: NotRequired[Nullable[GetWorkflowsV1WorkflowsGetStatusTypedDict]] + r"""Filter by workflow status""" include_shared: NotRequired[bool] r"""Whether to include shared workflows""" available_in_chat_assistant: NotRequired[Nullable[bool]] r"""Whether to only return workflows available in chat assistant""" + deployment_name: NotRequired[Nullable[List[str]]] + r"""Filter by deployment name(s)""" + deployment_status: NotRequired[Nullable[DeploymentStatus]] + r"""Filter by deployment activity. active=only active, inactive=only inactive, None=no filter""" archived: NotRequired[Nullable[bool]] r"""Filter by archived state. False=exclude archived, True=only archived, None=include all""" tags: NotRequired[Nullable[List[str]]] r"""Filter to workflows tagged with all listed tags (AND).""" + sort_by: Nullable[Literal["display_name"]] + r"""Field to sort by""" + order: NotRequired[GetWorkflowsV1WorkflowsGetOrder] + r"""Sort direction""" cursor: NotRequired[Nullable[str]] r"""The cursor for pagination""" limit: NotRequired[int] r"""The maximum number of workflows to return""" + active_only: NotRequired[bool] + r"""Deprecated: use deployment_status instead""" class GetWorkflowsV1WorkflowsGetRequest(BaseModel): - active_only: Annotated[ - Optional[bool], + status: Annotated[ + OptionalNullable[GetWorkflowsV1WorkflowsGetStatus], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False - r"""Whether to only return active workflows""" + ] = UNSET + r"""Filter by workflow status""" include_shared: Annotated[ Optional[bool], @@ -52,6 +93,18 @@ class GetWorkflowsV1WorkflowsGetRequest(BaseModel): ] = UNSET r"""Whether to only return workflows available in chat assistant""" + deployment_name: Annotated[ + OptionalNullable[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by deployment name(s)""" + + deployment_status: Annotated[ + OptionalNullable[DeploymentStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by deployment activity. active=only active, inactive=only inactive, None=no filter""" + archived: Annotated[ OptionalNullable[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -64,6 +117,22 @@ class GetWorkflowsV1WorkflowsGetRequest(BaseModel): ] = UNSET r"""Filter to workflows tagged with all listed tags (AND).""" + sort_by: Annotated[ + Annotated[ + OptionalNullable[Literal["display_name"]], + AfterValidator(validate_const("display_name")), + ], + pydantic.Field(alias="sort_by"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "display_name" + r"""Field to sort by""" + + order: Annotated[ + Optional[GetWorkflowsV1WorkflowsGetOrder], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "asc" + r"""Sort direction""" + cursor: Annotated[ OptionalNullable[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -76,21 +145,44 @@ class GetWorkflowsV1WorkflowsGetRequest(BaseModel): ] = 50 r"""The maximum number of workflows to return""" + active_only: Annotated[ + Optional[bool], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Deprecated: use deployment_status instead""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( [ - "active_only", + "status", "include_shared", "available_in_chat_assistant", + "deployment_name", + "deployment_status", "archived", "tags", + "sort_by", + "order", "cursor", "limit", + "active_only", ] ) nullable_fields = set( - ["available_in_chat_assistant", "archived", "tags", "cursor"] + [ + "status", + "available_in_chat_assistant", + "deployment_name", + "deployment_status", + "archived", + "tags", + "sort_by", + "cursor", + ] ) serialized = handler(self) m = {} @@ -125,3 +217,9 @@ class GetWorkflowsV1WorkflowsGetResponse(BaseModel): ] result: WorkflowListResponse + + +try: + GetWorkflowsV1WorkflowsGetRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/getlog.py b/src/mistralai/client/models/getlog.py new file mode 100644 index 00000000..3c889062 --- /dev/null +++ b/src/mistralai/client/models/getlog.py @@ -0,0 +1,73 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c9beb29863bc + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class GetLogTypedDict(TypedDict): + customer_id: str + organization_id: str + workspace_id: str + user_id: str + timestamp: datetime + trace_id: str + span_id: str + trace_flags: int + severity_text: str + severity_number: int + service_name: str + body: str + event_name: str + resource_schema_url: str + resource_attributes: Dict[str, str] + scope_schema_url: str + scope_name: str + scope_version: str + scope_attributes: Dict[str, str] + log_attributes: Dict[str, str] + + +class GetLog(BaseModel): + customer_id: str + + organization_id: str + + workspace_id: str + + user_id: str + + timestamp: datetime + + trace_id: str + + span_id: str + + trace_flags: int + + severity_text: str + + severity_number: int + + service_name: str + + body: str + + event_name: str + + resource_schema_url: str + + resource_attributes: Dict[str, str] + + scope_schema_url: str + + scope_name: str + + scope_version: str + + scope_attributes: Dict[str, str] + + log_attributes: Dict[str, str] diff --git a/src/mistralai/client/models/getlogfieldoptions.py b/src/mistralai/client/models/getlogfieldoptions.py new file mode 100644 index 00000000..4f5bacd6 --- /dev/null +++ b/src/mistralai/client/models/getlogfieldoptions.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cdb24e2ec44c + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class GetLogFieldOptionsTypedDict(TypedDict): + options: Nullable[List[str]] + + +class GetLogFieldOptions(BaseModel): + options: Nullable[List[str]] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/getlogfields.py b/src/mistralai/client/models/getlogfields.py new file mode 100644 index 00000000..e82e2cbc --- /dev/null +++ b/src/mistralai/client/models/getlogfields.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e9f0f8c894f0 + +from __future__ import annotations +from .otelfielddefinition import OtelFieldDefinition, OtelFieldDefinitionTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class GetLogFieldsTypedDict(TypedDict): + field_definitions: List[OtelFieldDefinitionTypedDict] + + +class GetLogFields(BaseModel): + field_definitions: List[OtelFieldDefinition] diff --git a/src/mistralai/client/models/getlogs.py b/src/mistralai/client/models/getlogs.py new file mode 100644 index 00000000..a6f91a87 --- /dev/null +++ b/src/mistralai/client/models/getlogs.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e93e67a4d749 + +from __future__ import annotations +from .feedresultgetlog import FeedResultGetLog, FeedResultGetLogTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class GetLogsTypedDict(TypedDict): + logs: FeedResultGetLogTypedDict + + +class GetLogs(BaseModel): + logs: FeedResultGetLog diff --git a/src/mistralai/client/models/getspan.py b/src/mistralai/client/models/getspan.py new file mode 100644 index 00000000..d8bd9076 --- /dev/null +++ b/src/mistralai/client/models/getspan.py @@ -0,0 +1,215 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: eebc129308d2 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr +from pydantic import model_serializer +from typing import Dict, List, Literal, Union +from typing_extensions import TypedDict + + +GetSpanStatusCode = Union[ + Literal[ + "Error", + "Ok", + "Unset", + ], + UnrecognizedStr, +] + + +class GetSpanTypedDict(TypedDict): + customer_id: str + organization_id: str + workspace_id: str + user_id: str + trace_id: str + span_id: str + parent_span_id: str + trace_state: str + start_time: datetime + end_time: datetime + duration_ns: int + span_name: str + span_kind: str + service_name: str + status_code: GetSpanStatusCode + status_message: str + error_type: str + operation_name: str + provider_name: str + request_model: str + response_model: str + response_id: str + output_type: str + conversation_id: str + data_source_id: str + agent_id: str + agent_name: str + agent_version: str + agent_description: str + workflow_name: str + prompt_name: str + tool_name: str + tool_type: str + tool_call_id: str + input_messages: str + output_messages: str + system_instructions: str + tool_definitions: str + tool_call_arguments: str + tool_call_result: str + request_choice_count: int + request_max_tokens: int + request_temperature: Nullable[float] + request_top_p: Nullable[float] + request_top_k: Nullable[float] + request_presence_penalty: Nullable[float] + request_frequency_penalty: Nullable[float] + request_seed: int + request_stop_sequences: List[str] + request_encoding_formats: List[str] + response_finish_reasons: List[str] + usage_input_tokens: int + usage_output_tokens: int + usage_cache_read_input_tokens: int + usage_cache_creation_input_tokens: int + resource_attributes: Dict[str, str] + span_attributes: Dict[str, str] + scope_name: str + scope_version: str + + +class GetSpan(BaseModel): + customer_id: str + + organization_id: str + + workspace_id: str + + user_id: str + + trace_id: str + + span_id: str + + parent_span_id: str + + trace_state: str + + start_time: datetime + + end_time: datetime + + duration_ns: int + + span_name: str + + span_kind: str + + service_name: str + + status_code: GetSpanStatusCode + + status_message: str + + error_type: str + + operation_name: str + + provider_name: str + + request_model: str + + response_model: str + + response_id: str + + output_type: str + + conversation_id: str + + data_source_id: str + + agent_id: str + + agent_name: str + + agent_version: str + + agent_description: str + + workflow_name: str + + prompt_name: str + + tool_name: str + + tool_type: str + + tool_call_id: str + + input_messages: str + + output_messages: str + + system_instructions: str + + tool_definitions: str + + tool_call_arguments: str + + tool_call_result: str + + request_choice_count: int + + request_max_tokens: int + + request_temperature: Nullable[float] + + request_top_p: Nullable[float] + + request_top_k: Nullable[float] + + request_presence_penalty: Nullable[float] + + request_frequency_penalty: Nullable[float] + + request_seed: int + + request_stop_sequences: List[str] + + request_encoding_formats: List[str] + + response_finish_reasons: List[str] + + usage_input_tokens: int + + usage_output_tokens: int + + usage_cache_read_input_tokens: int + + usage_cache_creation_input_tokens: int + + resource_attributes: Dict[str, str] + + span_attributes: Dict[str, str] + + scope_name: str + + scope_version: str + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/getspanevaluation.py b/src/mistralai/client/models/getspanevaluation.py new file mode 100644 index 00000000..44e63d6f --- /dev/null +++ b/src/mistralai/client/models/getspanevaluation.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 274e902cefd1 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class GetSpanEvaluationTypedDict(TypedDict): + customer_id: str + organization_id: str + workspace_id: str + user_id: str + trace_id: str + span_id: str + response_id: str + conversation_id: str + timestamp: datetime + evaluation_name: str + score_value: float + score_label: str + explanation: str + metadata: Dict[str, str] + + +class GetSpanEvaluation(BaseModel): + customer_id: str + + organization_id: str + + workspace_id: str + + user_id: str + + trace_id: str + + span_id: str + + response_id: str + + conversation_id: str + + timestamp: datetime + + evaluation_name: str + + score_value: float + + score_label: str + + explanation: str + + metadata: Dict[str, str] diff --git a/src/mistralai/client/models/getspanevaluationfieldoptions.py b/src/mistralai/client/models/getspanevaluationfieldoptions.py new file mode 100644 index 00000000..5e91348f --- /dev/null +++ b/src/mistralai/client/models/getspanevaluationfieldoptions.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 345fd459adff + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class GetSpanEvaluationFieldOptionsTypedDict(TypedDict): + options: Nullable[List[str]] + + +class GetSpanEvaluationFieldOptions(BaseModel): + options: Nullable[List[str]] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/getspanevaluationfields.py b/src/mistralai/client/models/getspanevaluationfields.py new file mode 100644 index 00000000..06a11779 --- /dev/null +++ b/src/mistralai/client/models/getspanevaluationfields.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a35c5328a90e + +from __future__ import annotations +from .otelfielddefinition import OtelFieldDefinition, OtelFieldDefinitionTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class GetSpanEvaluationFieldsTypedDict(TypedDict): + field_definitions: List[OtelFieldDefinitionTypedDict] + + +class GetSpanEvaluationFields(BaseModel): + field_definitions: List[OtelFieldDefinition] diff --git a/src/mistralai/client/models/getspanevaluations.py b/src/mistralai/client/models/getspanevaluations.py new file mode 100644 index 00000000..742fdc0a --- /dev/null +++ b/src/mistralai/client/models/getspanevaluations.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 91934f70cd68 + +from __future__ import annotations +from .feedresultgetspanevaluation import ( + FeedResultGetSpanEvaluation, + FeedResultGetSpanEvaluationTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class GetSpanEvaluationsTypedDict(TypedDict): + span_evaluations: FeedResultGetSpanEvaluationTypedDict + + +class GetSpanEvaluations(BaseModel): + span_evaluations: FeedResultGetSpanEvaluation diff --git a/src/mistralai/client/models/getspanfieldoptions.py b/src/mistralai/client/models/getspanfieldoptions.py new file mode 100644 index 00000000..ac7b91a6 --- /dev/null +++ b/src/mistralai/client/models/getspanfieldoptions.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 44b61b93e49c + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class GetSpanFieldOptionsTypedDict(TypedDict): + options: Nullable[List[str]] + + +class GetSpanFieldOptions(BaseModel): + options: Nullable[List[str]] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/getspanfields.py b/src/mistralai/client/models/getspanfields.py new file mode 100644 index 00000000..09bd8171 --- /dev/null +++ b/src/mistralai/client/models/getspanfields.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 81804f477af7 + +from __future__ import annotations +from .otelfielddefinition import OtelFieldDefinition, OtelFieldDefinitionTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class GetSpanFieldsTypedDict(TypedDict): + field_definitions: List[OtelFieldDefinitionTypedDict] + + +class GetSpanFields(BaseModel): + field_definitions: List[OtelFieldDefinition] diff --git a/src/mistralai/client/models/getspans.py b/src/mistralai/client/models/getspans.py new file mode 100644 index 00000000..5878cb5c --- /dev/null +++ b/src/mistralai/client/models/getspans.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c95cbe1b0843 + +from __future__ import annotations +from .feedresultgetspan import FeedResultGetSpan, FeedResultGetSpanTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class GetSpansTypedDict(TypedDict): + spans: FeedResultGetSpanTypedDict + + +class GetSpans(BaseModel): + spans: FeedResultGetSpan diff --git a/src/mistralai/client/models/gettrace.py b/src/mistralai/client/models/gettrace.py new file mode 100644 index 00000000..572d7440 --- /dev/null +++ b/src/mistralai/client/models/gettrace.py @@ -0,0 +1,124 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3c7e1abbc64a + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel, UnrecognizedStr +from typing import List, Literal, Union +from typing_extensions import TypedDict + + +GetTraceStatusCode = Union[ + Literal[ + "Error", + "Unset", + ], + UnrecognizedStr, +] + + +class GetTraceTypedDict(TypedDict): + customer_id: str + organization_id: str + workspace_id: str + user_id: str + trace_id: str + root_span_id: str + root_span_name: str + start_time: datetime + end_time: datetime + duration_ns: int + service_name: str + environment: str + conversation_id: str + workflow_name: str + agent_id: str + agent_name: str + status_code: GetTraceStatusCode + error_count: int + span_count: int + gen_ai_span_count: int + llm_call_count: int + tool_call_count: int + retrieval_count: int + evaluation_count: int + input_tokens: int + output_tokens: int + cache_read_input_tokens: int + cache_creation_input_tokens: int + models_used: List[str] + tools_used: List[str] + first_turn_last_input_message: str + first_turn_last_output_message: str + last_turn_last_input_message: str + last_turn_last_output_message: str + + +class GetTrace(BaseModel): + customer_id: str + + organization_id: str + + workspace_id: str + + user_id: str + + trace_id: str + + root_span_id: str + + root_span_name: str + + start_time: datetime + + end_time: datetime + + duration_ns: int + + service_name: str + + environment: str + + conversation_id: str + + workflow_name: str + + agent_id: str + + agent_name: str + + status_code: GetTraceStatusCode + + error_count: int + + span_count: int + + gen_ai_span_count: int + + llm_call_count: int + + tool_call_count: int + + retrieval_count: int + + evaluation_count: int + + input_tokens: int + + output_tokens: int + + cache_read_input_tokens: int + + cache_creation_input_tokens: int + + models_used: List[str] + + tools_used: List[str] + + first_turn_last_input_message: str + + first_turn_last_output_message: str + + last_turn_last_input_message: str + + last_turn_last_output_message: str diff --git a/src/mistralai/client/models/gettracefieldoptions.py b/src/mistralai/client/models/gettracefieldoptions.py new file mode 100644 index 00000000..1dd9e51c --- /dev/null +++ b/src/mistralai/client/models/gettracefieldoptions.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9b0f5432d5ef + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class GetTraceFieldOptionsTypedDict(TypedDict): + options: Nullable[List[str]] + + +class GetTraceFieldOptions(BaseModel): + options: Nullable[List[str]] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/gettracefields.py b/src/mistralai/client/models/gettracefields.py new file mode 100644 index 00000000..085641a0 --- /dev/null +++ b/src/mistralai/client/models/gettracefields.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 528937f57e92 + +from __future__ import annotations +from .otelfielddefinition import OtelFieldDefinition, OtelFieldDefinitionTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class GetTraceFieldsTypedDict(TypedDict): + field_definitions: List[OtelFieldDefinitionTypedDict] + + +class GetTraceFields(BaseModel): + field_definitions: List[OtelFieldDefinition] diff --git a/src/mistralai/client/models/gettraces.py b/src/mistralai/client/models/gettraces.py new file mode 100644 index 00000000..86d87ddd --- /dev/null +++ b/src/mistralai/client/models/gettraces.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d94016253ab3 + +from __future__ import annotations +from .feedresultgettrace import FeedResultGetTrace, FeedResultGetTraceTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class GetTracesTypedDict(TypedDict): + traces: FeedResultGetTraceTypedDict + + +class GetTraces(BaseModel): + traces: FeedResultGetTrace diff --git a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py index 3237a29a..aad96c2d 100644 --- a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py +++ b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py @@ -7,6 +7,7 @@ WorkflowExecutionListResponseTypedDict, ) from .workflowexecutionstatus import WorkflowExecutionStatus +from datetime import datetime from mistralai.client.types import ( BaseModel, Nullable, @@ -16,7 +17,7 @@ ) from mistralai.client.utils import FieldMetadata, QueryParamMetadata from pydantic import model_serializer -from typing import Awaitable, Callable, List, Optional, Union +from typing import Awaitable, Callable, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -34,13 +35,41 @@ r"""Filter by workflow status""" +SortBy = Literal[ + "start_time", + "end_time", +] +r"""Field to sort by""" + + +ListRunsV1WorkflowsRunsGetOrder = Literal[ + "asc", + "desc", +] +r"""Sort direction""" + + class ListRunsV1WorkflowsRunsGetRequestTypedDict(TypedDict): workflow_identifier: NotRequired[Nullable[str]] r"""Filter by workflow name or id""" search: NotRequired[Nullable[str]] - r"""Search by workflow name, display name or id""" + r"""Search by workflow name, display name, or ID""" status: NotRequired[Nullable[ListRunsV1WorkflowsRunsGetStatusTypedDict]] r"""Filter by workflow status""" + deployment_name: NotRequired[Nullable[str]] + r"""Filter by deployment name""" + sort_by: NotRequired[Nullable[SortBy]] + r"""Field to sort by""" + order: NotRequired[ListRunsV1WorkflowsRunsGetOrder] + r"""Sort direction""" + start_time_after: NotRequired[Nullable[datetime]] + r"""Include runs with start_time >= value""" + start_time_before: NotRequired[Nullable[datetime]] + r"""Include runs with start_time <= value""" + end_time_after: NotRequired[Nullable[datetime]] + r"""Include runs with end_time >= value. Running executions (no end_time) are excluded; use the status filter to include them.""" + end_time_before: NotRequired[Nullable[datetime]] + r"""Include runs with end_time <= value. Running executions (no end_time) are excluded; use the status filter to include them.""" user_id: NotRequired[Nullable[str]] r"""Filter by user id. Use 'current' to filter by the authenticated user""" page_size: NotRequired[int] @@ -60,7 +89,7 @@ class ListRunsV1WorkflowsRunsGetRequest(BaseModel): OptionalNullable[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Search by workflow name, display name or id""" + r"""Search by workflow name, display name, or ID""" status: Annotated[ OptionalNullable[ListRunsV1WorkflowsRunsGetStatus], @@ -68,6 +97,48 @@ class ListRunsV1WorkflowsRunsGetRequest(BaseModel): ] = UNSET r"""Filter by workflow status""" + deployment_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by deployment name""" + + sort_by: Annotated[ + OptionalNullable[SortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Field to sort by""" + + order: Annotated[ + Optional[ListRunsV1WorkflowsRunsGetOrder], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "desc" + r"""Sort direction""" + + start_time_after: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Include runs with start_time >= value""" + + start_time_before: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Include runs with start_time <= value""" + + end_time_after: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Include runs with end_time >= value. Running executions (no end_time) are excluded; use the status filter to include them.""" + + end_time_before: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Include runs with end_time <= value. Running executions (no end_time) are excluded; use the status filter to include them.""" + user_id: Annotated[ OptionalNullable[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -93,13 +164,32 @@ def serialize_model(self, handler): "workflow_identifier", "search", "status", + "deployment_name", + "sort_by", + "order", + "start_time_after", + "start_time_before", + "end_time_after", + "end_time_before", "user_id", "page_size", "next_page_token", ] ) nullable_fields = set( - ["workflow_identifier", "search", "status", "user_id", "next_page_token"] + [ + "workflow_identifier", + "search", + "status", + "deployment_name", + "sort_by", + "start_time_after", + "start_time_before", + "end_time_after", + "end_time_before", + "user_id", + "next_page_token", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/logsrequest.py b/src/mistralai/client/models/logsrequest.py new file mode 100644 index 00000000..e52d4712 --- /dev/null +++ b/src/mistralai/client/models/logsrequest.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2972072d4ad2 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +Order = Literal[ + "asc", + "desc", +] + + +class LogsRequestTypedDict(TypedDict): + search_expression: NotRequired[Nullable[str]] + order: NotRequired[Order] + + +class LogsRequest(BaseModel): + search_expression: OptionalNullable[str] = UNSET + + order: Optional[Order] = "desc" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["search_expression", "order"]) + nullable_fields = set(["search_expression"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/oauthmetadata.py b/src/mistralai/client/models/oauthmetadata.py deleted file mode 100644 index 6b7c6711..00000000 --- a/src/mistralai/client/models/oauthmetadata.py +++ /dev/null @@ -1,171 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: eba3c5e15b74 - -from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import List, Optional -from typing_extensions import NotRequired, TypedDict - - -class OAuthMetadataTypedDict(TypedDict): - r"""RFC 8414 OAuth 2.0 Authorization Server Metadata. - See https://datatracker.ietf.org/doc/html/rfc8414#section-2 - """ - - issuer: str - authorization_endpoint: str - token_endpoint: str - registration_endpoint: NotRequired[Nullable[str]] - scopes_supported: NotRequired[Nullable[List[str]]] - response_types_supported: NotRequired[List[str]] - response_modes_supported: NotRequired[Nullable[List[str]]] - grant_types_supported: NotRequired[Nullable[List[str]]] - token_endpoint_auth_methods_supported: NotRequired[Nullable[List[str]]] - token_endpoint_auth_signing_alg_values_supported: NotRequired[Nullable[List[str]]] - service_documentation: NotRequired[Nullable[str]] - ui_locales_supported: NotRequired[Nullable[List[str]]] - op_policy_uri: NotRequired[Nullable[str]] - op_tos_uri: NotRequired[Nullable[str]] - revocation_endpoint: NotRequired[Nullable[str]] - revocation_endpoint_auth_methods_supported: NotRequired[Nullable[List[str]]] - revocation_endpoint_auth_signing_alg_values_supported: NotRequired[ - Nullable[List[str]] - ] - introspection_endpoint: NotRequired[Nullable[str]] - introspection_endpoint_auth_methods_supported: NotRequired[Nullable[List[str]]] - introspection_endpoint_auth_signing_alg_values_supported: NotRequired[ - Nullable[List[str]] - ] - code_challenge_methods_supported: NotRequired[Nullable[List[str]]] - client_id_metadata_document_supported: NotRequired[Nullable[bool]] - - -class OAuthMetadata(BaseModel): - r"""RFC 8414 OAuth 2.0 Authorization Server Metadata. - See https://datatracker.ietf.org/doc/html/rfc8414#section-2 - """ - - issuer: str - - authorization_endpoint: str - - token_endpoint: str - - registration_endpoint: OptionalNullable[str] = UNSET - - scopes_supported: OptionalNullable[List[str]] = UNSET - - response_types_supported: Optional[List[str]] = None - - response_modes_supported: OptionalNullable[List[str]] = UNSET - - grant_types_supported: OptionalNullable[List[str]] = UNSET - - token_endpoint_auth_methods_supported: OptionalNullable[List[str]] = UNSET - - token_endpoint_auth_signing_alg_values_supported: OptionalNullable[List[str]] = ( - UNSET - ) - - service_documentation: OptionalNullable[str] = UNSET - - ui_locales_supported: OptionalNullable[List[str]] = UNSET - - op_policy_uri: OptionalNullable[str] = UNSET - - op_tos_uri: OptionalNullable[str] = UNSET - - revocation_endpoint: OptionalNullable[str] = UNSET - - revocation_endpoint_auth_methods_supported: OptionalNullable[List[str]] = UNSET - - revocation_endpoint_auth_signing_alg_values_supported: OptionalNullable[ - List[str] - ] = UNSET - - introspection_endpoint: OptionalNullable[str] = UNSET - - introspection_endpoint_auth_methods_supported: OptionalNullable[List[str]] = UNSET - - introspection_endpoint_auth_signing_alg_values_supported: OptionalNullable[ - List[str] - ] = UNSET - - code_challenge_methods_supported: OptionalNullable[List[str]] = UNSET - - client_id_metadata_document_supported: OptionalNullable[bool] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - [ - "registration_endpoint", - "scopes_supported", - "response_types_supported", - "response_modes_supported", - "grant_types_supported", - "token_endpoint_auth_methods_supported", - "token_endpoint_auth_signing_alg_values_supported", - "service_documentation", - "ui_locales_supported", - "op_policy_uri", - "op_tos_uri", - "revocation_endpoint", - "revocation_endpoint_auth_methods_supported", - "revocation_endpoint_auth_signing_alg_values_supported", - "introspection_endpoint", - "introspection_endpoint_auth_methods_supported", - "introspection_endpoint_auth_signing_alg_values_supported", - "code_challenge_methods_supported", - "client_id_metadata_document_supported", - ] - ) - nullable_fields = set( - [ - "registration_endpoint", - "scopes_supported", - "response_modes_supported", - "grant_types_supported", - "token_endpoint_auth_methods_supported", - "token_endpoint_auth_signing_alg_values_supported", - "service_documentation", - "ui_locales_supported", - "op_policy_uri", - "op_tos_uri", - "revocation_endpoint", - "revocation_endpoint_auth_methods_supported", - "revocation_endpoint_auth_signing_alg_values_supported", - "introspection_endpoint", - "introspection_endpoint_auth_methods_supported", - "introspection_endpoint_auth_signing_alg_values_supported", - "code_challenge_methods_supported", - "client_id_metadata_document_supported", - ] - ) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py index 6c1826ed..f2a63b13 100644 --- a/src/mistralai/client/models/observabilityerrorcode.py +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -14,7 +14,6 @@ "AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN", "AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND", "AUTH_FORBIDDEN_ROLE_NOT_FOUND", - "AUTH_FORBIDDEN_ORG_NOT_WHITELISTED", "AUTH_UNAUTHORIZED", "FEATURE_NOT_SUPPORTED", "FIELDS_BAD_REQUEST", diff --git a/src/mistralai/client/models/otelfielddefinition.py b/src/mistralai/client/models/otelfielddefinition.py new file mode 100644 index 00000000..2bd04c1f --- /dev/null +++ b/src/mistralai/client/models/otelfielddefinition.py @@ -0,0 +1,106 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4bf75d7f4f70 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from pydantic import model_serializer +from typing import List, Literal, Union +from typing_extensions import NotRequired, TypedDict + + +OtelFieldDefinitionType = Union[ + Literal[ + "ENUM", + "TEXT", + "INT", + "FLOAT", + "BOOL", + "TIMESTAMP", + "ARRAY", + "MAP", + ], + UnrecognizedStr, +] + + +OtelFieldDefinitionSupportedOperator = Union[ + Literal[ + "eq", + "neq", + "lt", + "lte", + "gt", + "gte", + "like", + "ilike", + "not_like", + "not_ilike", + "between", + "not_between", + "in", + "not_in", + "exists", + "not_exists", + "regexp", + "not_regexp", + "contains", + "not_contains", + "has", + "hasAny", + "hasAll", + "hasToken", + ], + UnrecognizedStr, +] + + +class OtelFieldDefinitionTypedDict(TypedDict): + name: str + label: str + type: OtelFieldDefinitionType + supported_operators: List[OtelFieldDefinitionSupportedOperator] + group: NotRequired[Nullable[str]] + + +class OtelFieldDefinition(BaseModel): + name: str + + label: str + + type: OtelFieldDefinitionType + + supported_operators: List[OtelFieldDefinitionSupportedOperator] + + group: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["group"]) + nullable_fields = set(["group"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop.py b/src/mistralai/client/models/search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop.py new file mode 100644 index 00000000..d88c434c --- /dev/null +++ b/src/mistralai/client/models/search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_postop.py @@ -0,0 +1,86 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 26821a9e16a7 + +from __future__ import annotations +from .spanevaluationsrequest import ( + SpanEvaluationsRequest, + SpanEvaluationsRequestTypedDict, +) +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequestTypedDict( + TypedDict +): + span_evaluations_request: SpanEvaluationsRequestTypedDict + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest( + BaseModel +): + span_evaluations_request: Annotated[ + SpanEvaluationsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to", "page_size", "cursor"]) + nullable_fields = set(["from", "to", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/search_logs_v1_observability_logs_search_postop.py b/src/mistralai/client/models/search_logs_v1_observability_logs_search_postop.py new file mode 100644 index 00000000..fb63879d --- /dev/null +++ b/src/mistralai/client/models/search_logs_v1_observability_logs_search_postop.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 601f46c3df14 + +from __future__ import annotations +from .logsrequest import LogsRequest, LogsRequestTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SearchLogsV1ObservabilityLogsSearchPostRequestTypedDict(TypedDict): + logs_request: LogsRequestTypedDict + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class SearchLogsV1ObservabilityLogsSearchPostRequest(BaseModel): + logs_request: Annotated[ + LogsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to", "page_size", "cursor"]) + nullable_fields = set(["from", "to", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/search_span_evaluations_v1_observability_spans_evaluations_search_postop.py b/src/mistralai/client/models/search_span_evaluations_v1_observability_spans_evaluations_search_postop.py new file mode 100644 index 00000000..8647b630 --- /dev/null +++ b/src/mistralai/client/models/search_span_evaluations_v1_observability_spans_evaluations_search_postop.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 13b5c72c2e76 + +from __future__ import annotations +from .spanevaluationsrequest import ( + SpanEvaluationsRequest, + SpanEvaluationsRequestTypedDict, +) +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequestTypedDict( + TypedDict +): + span_evaluations_request: SpanEvaluationsRequestTypedDict + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest(BaseModel): + span_evaluations_request: Annotated[ + SpanEvaluationsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to", "page_size", "cursor"]) + nullable_fields = set(["from", "to", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/search_spans_v1_observability_spans_search_postop.py b/src/mistralai/client/models/search_spans_v1_observability_spans_search_postop.py new file mode 100644 index 00000000..158475f1 --- /dev/null +++ b/src/mistralai/client/models/search_spans_v1_observability_spans_search_postop.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0d9b8600ae11 + +from __future__ import annotations +from .spansrequest import SpansRequest, SpansRequestTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SearchSpansV1ObservabilitySpansSearchPostRequestTypedDict(TypedDict): + spans_request: SpansRequestTypedDict + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class SearchSpansV1ObservabilitySpansSearchPostRequest(BaseModel): + spans_request: Annotated[ + SpansRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to", "page_size", "cursor"]) + nullable_fields = set(["from", "to", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/search_traces_v1_observability_traces_search_postop.py b/src/mistralai/client/models/search_traces_v1_observability_traces_search_postop.py new file mode 100644 index 00000000..ad4d368f --- /dev/null +++ b/src/mistralai/client/models/search_traces_v1_observability_traces_search_postop.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b7758d63781e + +from __future__ import annotations +from .tracesrequest import TracesRequest, TracesRequestTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SearchTracesV1ObservabilityTracesSearchPostRequestTypedDict(TypedDict): + traces_request: TracesRequestTypedDict + from_: NotRequired[Nullable[datetime]] + to: NotRequired[Nullable[datetime]] + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class SearchTracesV1ObservabilityTracesSearchPostRequest(BaseModel): + traces_request: Annotated[ + TracesRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + from_: Annotated[ + OptionalNullable[datetime], + pydantic.Field(alias="from"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + to: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["from", "to", "page_size", "cursor"]) + nullable_fields = set(["from", "to", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/spanevaluationsrequest.py b/src/mistralai/client/models/spanevaluationsrequest.py new file mode 100644 index 00000000..08f020c5 --- /dev/null +++ b/src/mistralai/client/models/spanevaluationsrequest.py @@ -0,0 +1,46 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 89836411323a + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class SpanEvaluationsRequestTypedDict(TypedDict): + search_expression: NotRequired[Nullable[str]] + + +class SpanEvaluationsRequest(BaseModel): + search_expression: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["search_expression"]) + nullable_fields = set(["search_expression"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/spansrequest.py b/src/mistralai/client/models/spansrequest.py new file mode 100644 index 00000000..5f34709b --- /dev/null +++ b/src/mistralai/client/models/spansrequest.py @@ -0,0 +1,46 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: aca856aff5b4 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class SpansRequestTypedDict(TypedDict): + search_expression: NotRequired[Nullable[str]] + + +class SpansRequest(BaseModel): + search_expression: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["search_expression"]) + nullable_fields = set(["search_expression"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/stream_workflow_execution_logsop.py b/src/mistralai/client/models/stream_workflow_execution_logsop.py new file mode 100644 index 00000000..653d2a5b --- /dev/null +++ b/src/mistralai/client/models/stream_workflow_execution_logsop.py @@ -0,0 +1,140 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 33528845f8f2 + +from __future__ import annotations +from .executionlogrecord import ExecutionLogRecord, ExecutionLogRecordTypedDict +from .streamerror import StreamError, StreamErrorTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class StreamWorkflowExecutionLogsRequestTypedDict(TypedDict): + execution_id: str + run_id: NotRequired[Nullable[str]] + r"""Filter logs by workflow run ID""" + activity_id: NotRequired[Nullable[str]] + r"""Filter logs by activity ID""" + after: NotRequired[Nullable[datetime]] + r"""Start a fresh stream at this timestamp (ignored when resuming via last_event_id)""" + last_event_id: NotRequired[Nullable[str]] + r"""Resume from this cursor (a prior response's SSE id)""" + + +class StreamWorkflowExecutionLogsRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + run_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter logs by workflow run ID""" + + activity_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter logs by activity ID""" + + after: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Start a fresh stream at this timestamp (ignored when resuming via last_event_id)""" + + last_event_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Resume from this cursor (a prior response's SSE id)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["run_id", "activity_id", "after", "last_event_id"]) + nullable_fields = set(["run_id", "activity_id", "after", "last_event_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +StreamWorkflowExecutionLogsEvent = Union[ + Literal[ + "log", + "error", + ], + UnrecognizedStr, +] + + +StreamWorkflowExecutionLogsDataTypedDict = TypeAliasType( + "StreamWorkflowExecutionLogsDataTypedDict", + Union[StreamErrorTypedDict, ExecutionLogRecordTypedDict], +) + + +StreamWorkflowExecutionLogsData = TypeAliasType( + "StreamWorkflowExecutionLogsData", Union[StreamError, ExecutionLogRecord] +) + + +class StreamWorkflowExecutionLogsResponseBodyTypedDict(TypedDict): + r"""Stream of Server-Sent Events (SSE): `log` events carry an ExecutionLogRecord; `error` events carry a StreamError payload.""" + + event: NotRequired[StreamWorkflowExecutionLogsEvent] + id: NotRequired[str] + data: NotRequired[StreamWorkflowExecutionLogsDataTypedDict] + + +class StreamWorkflowExecutionLogsResponseBody(BaseModel): + r"""Stream of Server-Sent Events (SSE): `log` events carry an ExecutionLogRecord; `error` events carry a StreamError payload.""" + + event: Optional[StreamWorkflowExecutionLogsEvent] = None + + id: Optional[str] = None + + data: Optional[StreamWorkflowExecutionLogsData] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event", "id", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/streamerror.py b/src/mistralai/client/models/streamerror.py new file mode 100644 index 00000000..ddc939b2 --- /dev/null +++ b/src/mistralai/client/models/streamerror.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2632e221b587 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class StreamErrorTypedDict(TypedDict): + error: str + + +class StreamError(BaseModel): + error: str diff --git a/src/mistralai/client/models/tracesrequest.py b/src/mistralai/client/models/tracesrequest.py new file mode 100644 index 00000000..ac646efb --- /dev/null +++ b/src/mistralai/client/models/tracesrequest.py @@ -0,0 +1,46 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: df80914625df + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class TracesRequestTypedDict(TypedDict): + search_expression: NotRequired[Nullable[str]] + + +class TracesRequest(BaseModel): + search_expression: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["search_expression"]) + nullable_fields = set(["search_expression"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop.py b/src/mistralai/client/models/trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop.py new file mode 100644 index 00000000..46a68a00 --- /dev/null +++ b/src/mistralai/client/models/trigger_schedule_v1_workflows_schedules_schedule_id_trigger_postop.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 99d0d53968f6 + +from __future__ import annotations +from .workflowscheduletriggerrequest import ( + WorkflowScheduleTriggerRequest, + WorkflowScheduleTriggerRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequestTypedDict( + TypedDict +): + schedule_id: str + workflow_schedule_trigger_request: NotRequired[ + Nullable[WorkflowScheduleTriggerRequestTypedDict] + ] + + +class TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_schedule_trigger_request: Annotated[ + OptionalNullable[WorkflowScheduleTriggerRequest], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WorkflowScheduleTriggerRequest"]) + nullable_fields = set(["WorkflowScheduleTriggerRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflow.py b/src/mistralai/client/models/workflow.py index 646ad0b9..4c614b2f 100644 --- a/src/mistralai/client/models/workflow.py +++ b/src/mistralai/client/models/workflow.py @@ -35,8 +35,6 @@ class WorkflowTypedDict(TypedDict): r"""Whether the workflow is available in chat assistant""" is_technical: NotRequired[bool] r"""Whether the workflow is technical (e.g. SDK-managed)""" - on_behalf_of: NotRequired[bool] - r"""Whether the workflow must run associated to a user's identity""" archived: NotRequired[bool] r"""Whether the workflow is archived""" tags: NotRequired[List[str]] @@ -73,9 +71,6 @@ class Workflow(BaseModel): is_technical: Optional[bool] = False r"""Whether the workflow is technical (e.g. SDK-managed)""" - on_behalf_of: Optional[bool] = False - r"""Whether the workflow must run associated to a user's identity""" - archived: Optional[bool] = False r"""Whether the workflow is archived""" @@ -90,7 +85,6 @@ def serialize_model(self, handler): "shared_namespace", "available_in_chat_assistant", "is_technical", - "on_behalf_of", "archived", "tags", ] diff --git a/src/mistralai/client/models/workflowcodedefinition.py b/src/mistralai/client/models/workflowcodedefinition.py index 84444ce6..1f3009bf 100644 --- a/src/mistralai/client/models/workflowcodedefinition.py +++ b/src/mistralai/client/models/workflowcodedefinition.py @@ -30,6 +30,8 @@ class WorkflowCodeDefinitionTypedDict(TypedDict): r"""Update handlers defined by the workflow""" enforce_determinism: NotRequired[bool] r"""Whether the workflow enforces deterministic execution""" + on_behalf_of: NotRequired[bool] + r"""Whether the workflow must run associated to a user's identity""" execution_timeout: NotRequired[float] r"""Maximum total execution time including retries and continue-as-new""" plugin_metadata: NotRequired[Nullable[Dict[str, Any]]] @@ -55,6 +57,9 @@ class WorkflowCodeDefinition(BaseModel): enforce_determinism: Optional[bool] = False r"""Whether the workflow enforces deterministic execution""" + on_behalf_of: Optional[bool] = False + r"""Whether the workflow must run associated to a user's identity""" + execution_timeout: Optional[float] = None r"""Maximum total execution time including retries and continue-as-new""" @@ -70,6 +75,7 @@ def serialize_model(self, handler): "queries", "updates", "enforce_determinism", + "on_behalf_of", "execution_timeout", "plugin_metadata", ] diff --git a/src/mistralai/client/models/workflowscheduletriggerrequest.py b/src/mistralai/client/models/workflowscheduletriggerrequest.py new file mode 100644 index 00000000..38e3cc67 --- /dev/null +++ b/src/mistralai/client/models/workflowscheduletriggerrequest.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 794505d95b73 + +from __future__ import annotations +from .scheduleoverlappolicy import ScheduleOverlapPolicy +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowScheduleTriggerRequestTypedDict(TypedDict): + overlap: NotRequired[Nullable[ScheduleOverlapPolicy]] + r"""Optional overlap policy override to use for the immediate trigger.""" + + +class WorkflowScheduleTriggerRequest(BaseModel): + overlap: OptionalNullable[ScheduleOverlapPolicy] = UNSET + r"""Optional overlap policy override to use for the immediate trigger.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["overlap"]) + nullable_fields = set(["overlap"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowwithworkerstatus.py b/src/mistralai/client/models/workflowwithworkerstatus.py index 5411d961..cb8f97ef 100644 --- a/src/mistralai/client/models/workflowwithworkerstatus.py +++ b/src/mistralai/client/models/workflowwithworkerstatus.py @@ -37,8 +37,6 @@ class WorkflowWithWorkerStatusTypedDict(TypedDict): r"""Whether the workflow is available in chat assistant""" is_technical: NotRequired[bool] r"""Whether the workflow is technical (e.g. SDK-managed)""" - on_behalf_of: NotRequired[bool] - r"""Whether the workflow must run associated to a user's identity""" archived: NotRequired[bool] r"""Whether the workflow is archived""" tags: NotRequired[List[str]] @@ -78,9 +76,6 @@ class WorkflowWithWorkerStatus(BaseModel): is_technical: Optional[bool] = False r"""Whether the workflow is technical (e.g. SDK-managed)""" - on_behalf_of: Optional[bool] = False - r"""Whether the workflow must run associated to a user's identity""" - archived: Optional[bool] = False r"""Whether the workflow is archived""" @@ -95,7 +90,6 @@ def serialize_model(self, handler): "shared_namespace", "available_in_chat_assistant", "is_technical", - "on_behalf_of", "archived", "tags", ] diff --git a/src/mistralai/client/observability.py b/src/mistralai/client/observability.py index 4057909e..4d07debc 100644 --- a/src/mistralai/client/observability.py +++ b/src/mistralai/client/observability.py @@ -7,6 +7,9 @@ from mistralai.client.chat_completion_events import ChatCompletionEvents from mistralai.client.datasets import Datasets from mistralai.client.judges import Judges +from mistralai.client.logs import Logs +from mistralai.client.spans import Spans +from mistralai.client.traces import Traces from typing import Optional @@ -15,6 +18,9 @@ class Observability(BaseSDK): judges: Judges campaigns: Campaigns datasets: Datasets + logs: Logs + traces: Traces + spans: Spans def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -30,3 +36,6 @@ def _init_sdks(self): self.judges = Judges(self.sdk_configuration, parent_ref=self.parent_ref) self.campaigns = Campaigns(self.sdk_configuration, parent_ref=self.parent_ref) self.datasets = Datasets(self.sdk_configuration, parent_ref=self.parent_ref) + self.logs = Logs(self.sdk_configuration, parent_ref=self.parent_ref) + self.traces = Traces(self.sdk_configuration, parent_ref=self.parent_ref) + self.spans = Spans(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 01507e33..13a72034 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -2,6 +2,7 @@ # @generated-id: 4297d58aeb21 from .basesdk import BaseSDK +from datetime import datetime from jsonpath import JSONPath from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext @@ -23,6 +24,13 @@ def list_runs( models.ListRunsV1WorkflowsRunsGetStatusTypedDict, ] ] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + sort_by: OptionalNullable[models.SortBy] = UNSET, + order: Optional[models.ListRunsV1WorkflowsRunsGetOrder] = "desc", + start_time_after: OptionalNullable[datetime] = UNSET, + start_time_before: OptionalNullable[datetime] = UNSET, + end_time_after: OptionalNullable[datetime] = UNSET, + end_time_before: OptionalNullable[datetime] = UNSET, user_id: OptionalNullable[str] = UNSET, page_size: Optional[int] = 50, next_page_token: OptionalNullable[str] = UNSET, @@ -34,8 +42,15 @@ def list_runs( r"""List Runs :param workflow_identifier: Filter by workflow name or id - :param search: Search by workflow name, display name or id + :param search: Search by workflow name, display name, or ID :param status: Filter by workflow status + :param deployment_name: Filter by deployment name + :param sort_by: Field to sort by + :param order: Sort direction + :param start_time_after: Include runs with start_time >= value + :param start_time_before: Include runs with start_time <= value + :param end_time_after: Include runs with end_time >= value. Running executions (no end_time) are excluded; use the status filter to include them. + :param end_time_before: Include runs with end_time <= value. Running executions (no end_time) are excluded; use the status filter to include them. :param user_id: Filter by user id. Use 'current' to filter by the authenticated user :param page_size: Number of items per page :param next_page_token: Token for the next page of results @@ -61,6 +76,13 @@ def list_runs( workflow_identifier=workflow_identifier, search=search, status=status, + deployment_name=deployment_name, + sort_by=sort_by, + order=order, + start_time_after=start_time_after, + start_time_before=start_time_before, + end_time_after=end_time_after, + end_time_before=end_time_before, user_id=user_id, page_size=page_size, next_page_token=next_page_token, @@ -128,6 +150,13 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: workflow_identifier=workflow_identifier, search=search, status=status, + deployment_name=deployment_name, + sort_by=sort_by, + order=order, + start_time_after=start_time_after, + start_time_before=start_time_before, + end_time_after=end_time_after, + end_time_before=end_time_before, user_id=user_id, page_size=page_size, next_page_token=next_cursor, @@ -170,6 +199,13 @@ async def list_runs_async( models.ListRunsV1WorkflowsRunsGetStatusTypedDict, ] ] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + sort_by: OptionalNullable[models.SortBy] = UNSET, + order: Optional[models.ListRunsV1WorkflowsRunsGetOrder] = "desc", + start_time_after: OptionalNullable[datetime] = UNSET, + start_time_before: OptionalNullable[datetime] = UNSET, + end_time_after: OptionalNullable[datetime] = UNSET, + end_time_before: OptionalNullable[datetime] = UNSET, user_id: OptionalNullable[str] = UNSET, page_size: Optional[int] = 50, next_page_token: OptionalNullable[str] = UNSET, @@ -181,8 +217,15 @@ async def list_runs_async( r"""List Runs :param workflow_identifier: Filter by workflow name or id - :param search: Search by workflow name, display name or id + :param search: Search by workflow name, display name, or ID :param status: Filter by workflow status + :param deployment_name: Filter by deployment name + :param sort_by: Field to sort by + :param order: Sort direction + :param start_time_after: Include runs with start_time >= value + :param start_time_before: Include runs with start_time <= value + :param end_time_after: Include runs with end_time >= value. Running executions (no end_time) are excluded; use the status filter to include them. + :param end_time_before: Include runs with end_time <= value. Running executions (no end_time) are excluded; use the status filter to include them. :param user_id: Filter by user id. Use 'current' to filter by the authenticated user :param page_size: Number of items per page :param next_page_token: Token for the next page of results @@ -208,6 +251,13 @@ async def list_runs_async( workflow_identifier=workflow_identifier, search=search, status=status, + deployment_name=deployment_name, + sort_by=sort_by, + order=order, + start_time_after=start_time_after, + start_time_before=start_time_before, + end_time_after=end_time_after, + end_time_before=end_time_before, user_id=user_id, page_size=page_size, next_page_token=next_page_token, @@ -280,6 +330,13 @@ async def empty_result(): workflow_identifier=workflow_identifier, search=search, status=status, + deployment_name=deployment_name, + sort_by=sort_by, + order=order, + start_time_after=start_time_after, + start_time_before=start_time_before, + end_time_after=end_time_after, + end_time_before=end_time_before, user_id=user_id, page_size=page_size, next_page_token=next_cursor, diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py index c56e4973..bed0ee4e 100644 --- a/src/mistralai/client/schedules.py +++ b/src/mistralai/client/schedules.py @@ -1534,3 +1534,217 @@ async def resume_schedule_async( raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) + + def trigger_schedule( + self, + *, + schedule_id: str, + overlap: OptionalNullable[models.ScheduleOverlapPolicy] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Trigger Schedule + + :param schedule_id: + :param overlap: Optional overlap policy override to use for the immediate trigger. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest( + schedule_id=schedule_id, + workflow_schedule_trigger_request=models.WorkflowScheduleTriggerRequest( + overlap=overlap, + ), + ) + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/schedules/{schedule_id}/trigger", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_trigger_request + if request is not None + else None, + True, + True, + "json", + OptionalNullable[models.WorkflowScheduleTriggerRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="trigger_schedule_v1_workflows_schedules__schedule_id__trigger_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def trigger_schedule_async( + self, + *, + schedule_id: str, + overlap: OptionalNullable[models.ScheduleOverlapPolicy] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Trigger Schedule + + :param schedule_id: + :param overlap: Optional overlap policy override to use for the immediate trigger. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.TriggerScheduleV1WorkflowsSchedulesScheduleIDTriggerPostRequest( + schedule_id=schedule_id, + workflow_schedule_trigger_request=models.WorkflowScheduleTriggerRequest( + overlap=overlap, + ), + ) + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/schedules/{schedule_id}/trigger", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_trigger_request + if request is not None + else None, + True, + True, + "json", + OptionalNullable[models.WorkflowScheduleTriggerRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="trigger_schedule_v1_workflows_schedules__schedule_id__trigger_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/spans.py b/src/mistralai/client/spans.py new file mode 100644 index 00000000..ced45177 --- /dev/null +++ b/src/mistralai/client/spans.py @@ -0,0 +1,1433 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 408477ccb9d4 + +from .basesdk import BaseSDK +from datetime import datetime +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Spans(BaseSDK): + def search_spans( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpans: + r"""Search spans + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchSpansV1ObservabilitySpansSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + spans_request=models.SpansRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/spans/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.spans_request, False, False, "json", models.SpansRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_spans_v1_observability_spans_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpans, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_spans_async( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpans: + r"""Search spans + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchSpansV1ObservabilitySpansSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + spans_request=models.SpansRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/spans/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.spans_request, False, False, "json", models.SpansRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_spans_v1_observability_spans_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpans, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def search_span_evaluations( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluations: + r"""Search span evaluations + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + span_evaluations_request=models.SpanEvaluationsRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/spans/evaluations/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.span_evaluations_request, + False, + False, + "json", + models.SpanEvaluationsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_span_evaluations_v1_observability_spans_evaluations_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanEvaluations, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_span_evaluations_async( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluations: + r"""Search span evaluations + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchSpanEvaluationsV1ObservabilitySpansEvaluationsSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + span_evaluations_request=models.SpanEvaluationsRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/spans/evaluations/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.span_evaluations_request, + False, + False, + "json", + models.SpanEvaluationsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_span_evaluations_v1_observability_spans_evaluations_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanEvaluations, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def search_latest_span_evaluations( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluations: + r"""Search latest span evaluations + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + span_evaluations_request=models.SpanEvaluationsRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/spans/evaluations/search/latest", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.span_evaluations_request, + False, + False, + "json", + models.SpanEvaluationsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanEvaluations, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_latest_span_evaluations_async( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluations: + r"""Search latest span evaluations + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchLatestSpanEvaluationsV1ObservabilitySpansEvaluationsSearchLatestPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + span_evaluations_request=models.SpanEvaluationsRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/spans/evaluations/search/latest", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.span_evaluations_request, + False, + False, + "json", + models.SpanEvaluationsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_latest_span_evaluations_v1_observability_spans_evaluations_search_latest_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanEvaluations, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_span_fields( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanFields: + r"""Get span field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/observability/spans/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_fields_v1_observability_spans_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_span_fields_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanFields: + r"""Get span field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/observability/spans/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_fields_v1_observability_spans_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_span_eval_fields( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluationFields: + r"""Get span evaluation field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/observability/spans/evaluations/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_evaluation_fields_v1_observability_spans_evaluations_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanEvaluationFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_span_eval_fields_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluationFields: + r"""Get span evaluation field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/observability/spans/evaluations/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_evaluation_fields_v1_observability_spans_evaluations_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanEvaluationFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_span_field_options( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanFieldOptions: + r"""Get options for a span field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/spans/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_field_options_v1_observability_spans_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanFieldOptions, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_span_field_options_async( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanFieldOptions: + r"""Get options for a span field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSpanFieldOptionsV1ObservabilitySpansFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/spans/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_field_options_v1_observability_spans_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpanFieldOptions, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_span_eval_field_options( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluationFieldOptions: + r"""Get options for a span evaluation field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/spans/evaluations/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_evaluation_field_options_v1_observability_spans_evaluations_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.GetSpanEvaluationFieldOptions, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_span_eval_field_options_async( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpanEvaluationFieldOptions: + r"""Get options for a span evaluation field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSpanEvaluationFieldOptionsV1ObservabilitySpansEvaluationsFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/spans/evaluations/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_evaluation_field_options_v1_observability_spans_evaluations_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.GetSpanEvaluationFieldOptions, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/traces.py b/src/mistralai/client/traces.py new file mode 100644 index 00000000..ea8ad332 --- /dev/null +++ b/src/mistralai/client/traces.py @@ -0,0 +1,1203 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8af61cbcf718 + +from .basesdk import BaseSDK +from datetime import datetime +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Traces(BaseSDK): + def search( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTraces: + r"""Search traces + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchTracesV1ObservabilityTracesSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + traces_request=models.TracesRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/traces/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.traces_request, False, False, "json", models.TracesRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_traces_v1_observability_traces_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTraces, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_async( + self, + *, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + search_expression: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTraces: + r"""Search traces + + :param from_: + :param to: + :param page_size: + :param cursor: + :param search_expression: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchTracesV1ObservabilityTracesSearchPostRequest( + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + traces_request=models.TracesRequest( + search_expression=search_expression, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/traces/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.traces_request, False, False, "json", models.TracesRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="search_traces_v1_observability_traces_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTraces, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_trace_fields( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTraceFields: + r"""Get trace field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/observability/traces/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_fields_v1_observability_traces_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTraceFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_trace_fields_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTraceFields: + r"""Get trace field definitions + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/observability/traces/fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_fields_v1_observability_traces_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTraceFields, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_trace_by_id( + self, + *, + trace_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTrace: + r"""Get trace by id + + :param trace_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetTraceByIDV1ObservabilityTracesTraceIDGetRequest( + trace_id=trace_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/traces/{trace_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_by_id_v1_observability_traces__trace_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTrace, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_trace_by_id_async( + self, + *, + trace_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTrace: + r"""Get trace by id + + :param trace_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetTraceByIDV1ObservabilityTracesTraceIDGetRequest( + trace_id=trace_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/traces/{trace_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_by_id_v1_observability_traces__trace_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTrace, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_trace_spans( + self, + *, + trace_id: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpans: + r"""Get trace spans + + :param trace_id: + :param from_: + :param to: + :param page_size: + :param cursor: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest( + trace_id=trace_id, + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/traces/{trace_id}/spans", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_spans_v1_observability_traces__trace_id__spans_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpans, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_trace_spans_async( + self, + *, + trace_id: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpans: + r"""Get trace spans + + :param trace_id: + :param from_: + :param to: + :param page_size: + :param cursor: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetTraceSpansV1ObservabilityTracesTraceIDSpansGetRequest( + trace_id=trace_id, + from_=from_, + to=to, + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/traces/{trace_id}/spans", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_spans_v1_observability_traces__trace_id__spans_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpans, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_options( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTraceFieldOptions: + r"""Get options for a trace field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/traces/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_field_options_v1_observability_traces_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTraceFieldOptions, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_options_async( + self, + *, + field_name: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetTraceFieldOptions: + r"""Get options for a trace field + + :param field_name: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetTraceFieldOptionsV1ObservabilityTracesFieldsFieldNameOptionsGetRequest( + field_name=field_name, + from_=from_, + to=to, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/traces/fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_trace_field_options_v1_observability_traces_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetTraceFieldOptions, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_span_by_id( + self, + *, + trace_id: str, + span_id: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpan: + r"""Get span by id + + :param trace_id: + :param span_id: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest( + trace_id=trace_id, + span_id=span_id, + from_=from_, + to=to, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/traces/{trace_id}/spans/{span_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_by_id_v1_observability_traces__trace_id__spans__span_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpan, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_span_by_id_async( + self, + *, + trace_id: str, + span_id: str, + from_: OptionalNullable[datetime] = UNSET, + to: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetSpan: + r"""Get span by id + + :param trace_id: + :param span_id: + :param from_: + :param to: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSpanByIDV1ObservabilityTracesTraceIDSpansSpanIDGetRequest( + trace_id=trace_id, + span_id=span_id, + from_=from_, + to=to, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/traces/{trace_id}/spans/{span_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_span_by_id_v1_observability_traces__trace_id__spans__span_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GetSpan, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index af4c82f2..06661432 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -295,13 +295,22 @@ async def wait_for_workflow_completion_async( def get_workflows( self, *, - active_only: Optional[bool] = False, + status: OptionalNullable[ + Union[ + models.GetWorkflowsV1WorkflowsGetStatus, + models.GetWorkflowsV1WorkflowsGetStatusTypedDict, + ] + ] = UNSET, include_shared: Optional[bool] = True, available_in_chat_assistant: OptionalNullable[bool] = UNSET, + deployment_name: OptionalNullable[List[str]] = UNSET, + deployment_status: OptionalNullable[models.DeploymentStatus] = UNSET, archived: OptionalNullable[bool] = UNSET, tags: OptionalNullable[List[str]] = UNSET, + order: Optional[models.GetWorkflowsV1WorkflowsGetOrder] = "asc", cursor: OptionalNullable[str] = UNSET, limit: Optional[int] = 50, + active_only: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -309,13 +318,17 @@ def get_workflows( ) -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: r"""Get Workflows - :param active_only: Whether to only return active workflows + :param status: Filter by workflow status :param include_shared: Whether to include shared workflows :param available_in_chat_assistant: Whether to only return workflows available in chat assistant + :param deployment_name: Filter by deployment name(s) + :param deployment_status: Filter by deployment activity. active=only active, inactive=only inactive, None=no filter :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all :param tags: Filter to workflows tagged with all listed tags (AND). + :param order: Sort direction :param cursor: The cursor for pagination :param limit: The maximum number of workflows to return + :param active_only: Deprecated: use deployment_status instead :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -335,13 +348,17 @@ def get_workflows( base_url = self._get_url(base_url, url_variables) request = models.GetWorkflowsV1WorkflowsGetRequest( - active_only=active_only, + status=status, include_shared=include_shared, available_in_chat_assistant=available_in_chat_assistant, + deployment_name=deployment_name, + deployment_status=deployment_status, archived=archived, tags=tags, + order=order, cursor=cursor, limit=limit, + active_only=active_only, ) req = self._build_request( @@ -403,13 +420,17 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: return None return self.get_workflows( - active_only=active_only, + status=status, include_shared=include_shared, available_in_chat_assistant=available_in_chat_assistant, + deployment_name=deployment_name, + deployment_status=deployment_status, archived=archived, tags=tags, + order=order, cursor=next_cursor, limit=limit, + active_only=active_only, retries=retries, server_url=server_url, timeout_ms=timeout_ms, @@ -439,13 +460,22 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: async def get_workflows_async( self, *, - active_only: Optional[bool] = False, + status: OptionalNullable[ + Union[ + models.GetWorkflowsV1WorkflowsGetStatus, + models.GetWorkflowsV1WorkflowsGetStatusTypedDict, + ] + ] = UNSET, include_shared: Optional[bool] = True, available_in_chat_assistant: OptionalNullable[bool] = UNSET, + deployment_name: OptionalNullable[List[str]] = UNSET, + deployment_status: OptionalNullable[models.DeploymentStatus] = UNSET, archived: OptionalNullable[bool] = UNSET, tags: OptionalNullable[List[str]] = UNSET, + order: Optional[models.GetWorkflowsV1WorkflowsGetOrder] = "asc", cursor: OptionalNullable[str] = UNSET, limit: Optional[int] = 50, + active_only: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -453,13 +483,17 @@ async def get_workflows_async( ) -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: r"""Get Workflows - :param active_only: Whether to only return active workflows + :param status: Filter by workflow status :param include_shared: Whether to include shared workflows :param available_in_chat_assistant: Whether to only return workflows available in chat assistant + :param deployment_name: Filter by deployment name(s) + :param deployment_status: Filter by deployment activity. active=only active, inactive=only inactive, None=no filter :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all :param tags: Filter to workflows tagged with all listed tags (AND). + :param order: Sort direction :param cursor: The cursor for pagination :param limit: The maximum number of workflows to return + :param active_only: Deprecated: use deployment_status instead :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -479,13 +513,17 @@ async def get_workflows_async( base_url = self._get_url(base_url, url_variables) request = models.GetWorkflowsV1WorkflowsGetRequest( - active_only=active_only, + status=status, include_shared=include_shared, available_in_chat_assistant=available_in_chat_assistant, + deployment_name=deployment_name, + deployment_status=deployment_status, archived=archived, tags=tags, + order=order, cursor=cursor, limit=limit, + active_only=active_only, ) req = self._build_request_async( @@ -552,13 +590,17 @@ async def empty_result(): return empty_result() return self.get_workflows_async( - active_only=active_only, + status=status, include_shared=include_shared, available_in_chat_assistant=available_in_chat_assistant, + deployment_name=deployment_name, + deployment_status=deployment_status, archived=archived, tags=tags, + order=order, cursor=next_cursor, limit=limit, + active_only=active_only, retries=retries, server_url=server_url, timeout_ms=timeout_ms, diff --git a/uv.lock b/uv.lock index d07da473..bfbfa377 100644 --- a/uv.lock +++ b/uv.lock @@ -1047,7 +1047,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.9" +version = "2.4.10" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },