mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
167 lines
5.7 KiB
Python
167 lines
5.7 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from .observabilityarizedestination import (
|
|
ObservabilityArizeDestination,
|
|
ObservabilityArizeDestinationTypedDict,
|
|
)
|
|
from .observabilitybraintrustdestination import (
|
|
ObservabilityBraintrustDestination,
|
|
ObservabilityBraintrustDestinationTypedDict,
|
|
)
|
|
from .observabilityclickhousedestination import (
|
|
ObservabilityClickhouseDestination,
|
|
ObservabilityClickhouseDestinationTypedDict,
|
|
)
|
|
from .observabilitydatadogdestination import (
|
|
ObservabilityDatadogDestination,
|
|
ObservabilityDatadogDestinationTypedDict,
|
|
)
|
|
from .observabilitygrafanadestination import (
|
|
ObservabilityGrafanaDestination,
|
|
ObservabilityGrafanaDestinationTypedDict,
|
|
)
|
|
from .observabilitylangfusedestination import (
|
|
ObservabilityLangfuseDestination,
|
|
ObservabilityLangfuseDestinationTypedDict,
|
|
)
|
|
from .observabilitylangsmithdestination import (
|
|
ObservabilityLangsmithDestination,
|
|
ObservabilityLangsmithDestinationTypedDict,
|
|
)
|
|
from .observabilitynewrelicdestination import (
|
|
ObservabilityNewrelicDestination,
|
|
ObservabilityNewrelicDestinationTypedDict,
|
|
)
|
|
from .observabilityopikdestination import (
|
|
ObservabilityOpikDestination,
|
|
ObservabilityOpikDestinationTypedDict,
|
|
)
|
|
from .observabilityotelcollectordestination import (
|
|
ObservabilityOtelCollectorDestination,
|
|
ObservabilityOtelCollectorDestinationTypedDict,
|
|
)
|
|
from .observabilityposthogdestination import (
|
|
ObservabilityPosthogDestination,
|
|
ObservabilityPosthogDestinationTypedDict,
|
|
)
|
|
from .observabilityrampdestination import (
|
|
ObservabilityRampDestination,
|
|
ObservabilityRampDestinationTypedDict,
|
|
)
|
|
from .observabilitys3destination import (
|
|
ObservabilityS3Destination,
|
|
ObservabilityS3DestinationTypedDict,
|
|
)
|
|
from .observabilitysentrydestination import (
|
|
ObservabilitySentryDestination,
|
|
ObservabilitySentryDestinationTypedDict,
|
|
)
|
|
from .observabilitysnowflakedestination import (
|
|
ObservabilitySnowflakeDestination,
|
|
ObservabilitySnowflakeDestinationTypedDict,
|
|
)
|
|
from .observabilityweavedestination import (
|
|
ObservabilityWeaveDestination,
|
|
ObservabilityWeaveDestinationTypedDict,
|
|
)
|
|
from .observabilitywebhookdestination import (
|
|
ObservabilityWebhookDestination,
|
|
ObservabilityWebhookDestinationTypedDict,
|
|
)
|
|
from functools import partial
|
|
from openrouter.types import BaseModel
|
|
from openrouter.utils.unions import parse_open_union
|
|
from pydantic import ConfigDict
|
|
from pydantic.functional_validators import BeforeValidator
|
|
from typing import Any, Literal, Union
|
|
from typing_extensions import Annotated, TypeAliasType
|
|
|
|
|
|
ObservabilityDestinationTypedDict = TypeAliasType(
|
|
"ObservabilityDestinationTypedDict",
|
|
Union[
|
|
ObservabilityArizeDestinationTypedDict,
|
|
ObservabilityBraintrustDestinationTypedDict,
|
|
ObservabilityClickhouseDestinationTypedDict,
|
|
ObservabilityDatadogDestinationTypedDict,
|
|
ObservabilityGrafanaDestinationTypedDict,
|
|
ObservabilityLangfuseDestinationTypedDict,
|
|
ObservabilityLangsmithDestinationTypedDict,
|
|
ObservabilityNewrelicDestinationTypedDict,
|
|
ObservabilityOpikDestinationTypedDict,
|
|
ObservabilityOtelCollectorDestinationTypedDict,
|
|
ObservabilityPosthogDestinationTypedDict,
|
|
ObservabilityRampDestinationTypedDict,
|
|
ObservabilityS3DestinationTypedDict,
|
|
ObservabilitySentryDestinationTypedDict,
|
|
ObservabilitySnowflakeDestinationTypedDict,
|
|
ObservabilityWeaveDestinationTypedDict,
|
|
ObservabilityWebhookDestinationTypedDict,
|
|
],
|
|
)
|
|
|
|
|
|
class UnknownObservabilityDestination(BaseModel):
|
|
r"""A ObservabilityDestination variant the SDK doesn't recognize. Preserves the raw payload."""
|
|
|
|
type: Literal["UNKNOWN"] = "UNKNOWN"
|
|
raw: Any
|
|
is_unknown: Literal[True] = True
|
|
|
|
model_config = ConfigDict(frozen=True)
|
|
|
|
|
|
_OBSERVABILITY_DESTINATION_VARIANTS: dict[str, Any] = {
|
|
"arize": ObservabilityArizeDestination,
|
|
"braintrust": ObservabilityBraintrustDestination,
|
|
"clickhouse": ObservabilityClickhouseDestination,
|
|
"datadog": ObservabilityDatadogDestination,
|
|
"grafana": ObservabilityGrafanaDestination,
|
|
"langfuse": ObservabilityLangfuseDestination,
|
|
"langsmith": ObservabilityLangsmithDestination,
|
|
"newrelic": ObservabilityNewrelicDestination,
|
|
"opik": ObservabilityOpikDestination,
|
|
"otel-collector": ObservabilityOtelCollectorDestination,
|
|
"posthog": ObservabilityPosthogDestination,
|
|
"ramp": ObservabilityRampDestination,
|
|
"s3": ObservabilityS3Destination,
|
|
"sentry": ObservabilitySentryDestination,
|
|
"snowflake": ObservabilitySnowflakeDestination,
|
|
"weave": ObservabilityWeaveDestination,
|
|
"webhook": ObservabilityWebhookDestination,
|
|
}
|
|
|
|
|
|
ObservabilityDestination = Annotated[
|
|
Union[
|
|
ObservabilityArizeDestination,
|
|
ObservabilityBraintrustDestination,
|
|
ObservabilityClickhouseDestination,
|
|
ObservabilityDatadogDestination,
|
|
ObservabilityGrafanaDestination,
|
|
ObservabilityLangfuseDestination,
|
|
ObservabilityLangsmithDestination,
|
|
ObservabilityNewrelicDestination,
|
|
ObservabilityOpikDestination,
|
|
ObservabilityOtelCollectorDestination,
|
|
ObservabilityPosthogDestination,
|
|
ObservabilityRampDestination,
|
|
ObservabilityS3Destination,
|
|
ObservabilitySentryDestination,
|
|
ObservabilitySnowflakeDestination,
|
|
ObservabilityWeaveDestination,
|
|
ObservabilityWebhookDestination,
|
|
UnknownObservabilityDestination,
|
|
],
|
|
BeforeValidator(
|
|
partial(
|
|
parse_open_union,
|
|
disc_key="type",
|
|
variants=_OBSERVABILITY_DESTINATION_VARIANTS,
|
|
unknown_cls=UnknownObservabilityDestination,
|
|
union_name="ObservabilityDestination",
|
|
)
|
|
),
|
|
]
|