diff --git a/.fern/metadata.json b/.fern/metadata.json index 4c10d2c6..434323ee 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "5.44.6", + "cliVersion": "5.95.1", "generatorName": "fernapi/fern-python-sdk", - "generatorVersion": "5.23.0", + "generatorVersion": "5.27.1", "generatorConfig": { "client": { "class_name": "BaseClient", @@ -13,11 +13,15 @@ "should_generate_websocket_clients": true, "enable_wire_tests": true, "runtime_version": true, + "extra_dev_dependencies": { + "pytest-cov": "^7.0.0", + "respx": ">=0.22.0,<1.0.0" + }, "pydantic_config": { "skip_validation": true } }, - "originGitCommit": "03f06776bbb692c49f8d76c4230bca7f4bc4bca7", + "originGitCommit": "068de888501fcc3b792086aab45de975587b89e1", "originGitCommitIsDirty": true, "invokedBy": "manual", "sdkVersion": "7.7.1" diff --git a/.fernignore b/.fernignore index 6fda5042..aec9b231 100644 --- a/.fernignore +++ b/.fernignore @@ -64,6 +64,31 @@ src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_func src/deepgram/types/create_key_v1request_one.py src/deepgram/requests/create_key_v1request_one.py +# Backward-compatibility alias shims for the 2026-08-18 regen renames. The generator +# dropped the *ThinkProvider*/*SpeakProvider* prefixes from these public model/voice/ +# version types (AnthropicThinkProviderModel -> AnthropicModel, CartesiaSpeakProvider* -> +# Cartesia*, DeepgramSpeakProviderModel -> DeepgramModel, GoogleThinkProvider* -> Google*, +# GroqThinkProviderReasoningMode -> GroqReasoningMode). Same regen renamed the agent +# conversation-history subtypes (AgentV1HistoryContentRole -> ConversationHistoryMessageRole, +# AgentV1HistoryFunctionCallsFunctionCallsItem -> FunctionCallHistoryMessageFunctionCallsItem) +# and deleted the doubled AgentV1SettingsAgentContextContextMessagesItem* leaf modules. These +# hand-written aliases preserve every old public import path. Regression coverage in +# tests/custom/test_compat_aliases.py. Remove and unfreeze when a future major retires them. +src/deepgram/types/anthropic_think_provider_model.py +src/deepgram/types/cartesia_speak_provider_model_id.py +src/deepgram/types/cartesia_speak_provider_voice.py +src/deepgram/types/deepgram_speak_provider_model.py +src/deepgram/types/google_think_provider_model.py +src/deepgram/types/google_think_provider_version.py +src/deepgram/types/groq_think_provider_reasoning_mode.py +src/deepgram/requests/cartesia_speak_provider_voice.py +src/deepgram/agent/v1/types/agent_v1history_content_role.py +src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.py +src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_content_role.py +src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py +src/deepgram/agent/v1/requests/agent_v1history_function_calls_function_calls_item.py +src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py + # Backward-compatibility alias shims for the 2026-05-14 listen-provider rename. # The spec deduplicated AgentV1SettingsAgent[Context]ListenProviderV1/V2/V2LanguageHint # into a single top-level DeepgramListenProvider* type. These hand-written aliases @@ -107,6 +132,15 @@ src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider.py # when the old provider payloads are retired in a future major. src/deepgram/agent/v1/types/agent_v1update_listen_listen.py +# Backward-compat patch for the 2026-08-18 regen SpeakV2Speed retype. The generator +# changed this from `float` to `Union[Literal["0.85"..."1.15"], Any]` -- a string-literal +# enum that contradicts the API contract (a numeric multiplier; cf. SpeakV2SpeedValue = +# float, used by the Configure message) and silently changed the documented domain of the +# `speak.v2.connect(speed=...)` param from numeric to string. Restored to `float` so the +# connect param stays exactly what it was on main and consistent with Configure. Unfreeze +# when the spec types the connect `speed` as a number. +src/deepgram/types/speak_v2speed.py + # Hand-written compat shim recreating ListenV2CloseStreamType, which Fern removed in the # 2026-06-15 regen (docs #946). The original generated type wrongly allowed # Union[Literal["Finalize","CloseStream","KeepAlive"], Any] — v2 copied v1's control-message @@ -184,6 +218,7 @@ tests/custom/test_listen_v2_regen_constraints.py tests/custom/test_logging_and_retry_branches.py tests/custom/test_model_dict_compat.py tests/custom/test_query_encoder.py +tests/custom/test_regen_response_fields.py tests/custom/test_secure_logging.py tests/custom/test_socket_client_shims.py tests/custom/test_speak_v2_connect_wire.py @@ -205,6 +240,15 @@ tests/wire/test_manage_v1_projects_keys.py # still forwards them. Frozen so future regens do not silently drop that check again. tests/wire/test_manage_v1_projects_requests.py +# Wire test with restored query-parameter coverage for listen.v1.media.transcribe_url. +# Third instance of the same mechanism as the two entries above: the 2026-08-18 regen +# simplified the upstream /v1/listen spec *example* (mapping renamed "default" -> +# "Remote File"), and Fern derives the wire test from the example, so the generated test +# dropped all 37 optional query params -- including the bool -> lowercase "true"/"false" +# assertions -- while the client signature still forwards every one of them. Frozen so +# future regens cannot silently drop that check again. +tests/wire/test_listen_v1_media.py + # Manual standalone tests tests/manual diff --git a/AGENTS.md b/AGENTS.md index e274f8dc..db24d6d8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,6 +29,7 @@ Current permanently frozen files: - `src/deepgram/agent/v1/types/agent_v1history_content.py`, `src/deepgram/agent/v1/types/agent_v1history_function_calls.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_content.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_content_role.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py` — hand-written compatibility aliases preserving old public Agent History type imports after regen renames - `src/deepgram/agent/v1/requests/agent_v1history_content.py`, `src/deepgram/agent/v1/requests/agent_v1history_function_calls.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_content.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py` — hand-written compatibility aliases preserving old public Agent History request-param imports after regen renames - `src/deepgram/types/create_key_v1request_one.py`, `src/deepgram/requests/create_key_v1request_one.py` — hand-written compatibility aliases preserving the old public create-key request imports after the regen rename to `CreateKeyV1Request` +- `src/deepgram/types/anthropic_think_provider_model.py`, `src/deepgram/types/cartesia_speak_provider_model_id.py`, `src/deepgram/types/cartesia_speak_provider_voice.py`, `src/deepgram/types/deepgram_speak_provider_model.py`, `src/deepgram/types/google_think_provider_model.py`, `src/deepgram/types/google_think_provider_version.py`, `src/deepgram/types/groq_think_provider_reasoning_mode.py`, `src/deepgram/requests/cartesia_speak_provider_voice.py`, `src/deepgram/agent/v1/types/agent_v1history_content_role.py`, `src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_content_role.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py`, `src/deepgram/agent/v1/requests/agent_v1history_function_calls_function_calls_item.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py` — hand-written compatibility aliases for the 2026-08-18 regen renames. The generator dropped the `*ThinkProvider*`/`*SpeakProvider*` prefixes from the public model/voice/version types (`AnthropicThinkProviderModel`→`AnthropicModel`, `CartesiaSpeakProvider*`→`Cartesia*`, `DeepgramSpeakProviderModel`→`DeepgramModel`, `GoogleThinkProvider*`→`Google*`, `GroqThinkProviderReasoningMode`→`GroqReasoningMode`), renamed the agent conversation-history subtypes (`AgentV1HistoryContentRole`→`ConversationHistoryMessageRole`, `AgentV1HistoryFunctionCallsFunctionCallsItem`→`FunctionCallHistoryMessageFunctionCallsItem`), and deleted the doubled `AgentV1SettingsAgentContextContextMessagesItem*` leaf modules. These aliases preserve every old public import path. (The parallel single-`Context` `agent_v1settings_agent_context_messages_item_content_role.py` / `..._function_calls_function_calls_item.py` shims, already listed in this permanently-frozen block above, were also re-pointed to the new targets in the same regen.) Regression coverage in `tests/custom/test_compat_aliases.py`. - `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider_v1.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider_v2.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider_v2language_hint.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider_v1.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider_v2.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v1.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v2.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v2language_hint.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_listen_provider_v1.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_listen_provider_v2.py` — hand-written compatibility aliases for the 2026-05-14 spec dedup that consolidated `AgentV1SettingsAgent[Context]ListenProviderV{1,2,V2LanguageHint}` into top-level `DeepgramListenProvider*` types - `src/deepgram/types/deepgram_listen_provider_v2language_hint.py`, `src/deepgram/requests/deepgram_listen_provider_v2language_hint.py` — hand-written shims recreating the top-level `DeepgramListenProviderV2LanguageHint`/`...Params` type (`Union[str, List[str]]`) that Fern removed in the 2026-06-15 regen. The `*V2LanguageHint` listen-provider aliases above import from these and they remain part of the public import surface, so they are recreated by hand and frozen so Fern won't delete them again - `src/deepgram/listen/v2/types/listen_v2close_stream_type.py` — hand-written shim recreating `ListenV2CloseStreamType`, which Fern removed in the 2026-06-15 regen (docs #946). The original generated type wrongly allowed `Union[Literal["Finalize","CloseStream","KeepAlive"], Any]` (v2 copied v1's control-message enum); a CloseStream message's `type` can only ever be `"CloseStream"`. Recreated as the corrected `Literal["CloseStream"]` to preserve the public import path without resurrecting the invalid values. Re-exported from the three `listen` `__init__.py` files (temporarily frozen, below). @@ -37,6 +38,7 @@ Current permanently frozen files: - `tests/custom/test_compat_aliases.py` — hand-written regression test for backward-compatible alias imports after regen renames - `tests/custom/test_model_dict_compat.py` — hand-written regression coverage for the read-only subscript compatibility shim on typed Listen V2 response models, including sync/async parsing, every response variant, nested objects, unknown fields, omitted-key behavior, and scope isolation from unrelated generated models - `tests/custom/test_query_encoder.py` — hand-written regression test that `core/query_encoder.py` coerces Python bools to lowercase `"true"`/`"false"` before `urlencode` so websocket query strings stay wire-correct +- `tests/custom/test_regen_response_fields.py` — hand-written regression test guarding the response fields added by the 2026-08-18 regen: `ListenV1Response/ResultsMetadata.diarize_info` (`model_uuid`, `arch`), per-word `speaker` / `speaker_confidence`, and `ListenV2TurnInfo.trigger`. Same rationale as `test_latency_report_stt_compat.py`: `UncheckedBaseModel` + `skip_validation` makes response parsing lenient, so a future spec removal would silently turn these into `None` rather than failing. Fixtures are real captured payloads; the `trigger` cases pin the parsing contract for the values the server sends (`model` / `manual` / `timeout`) plus the absent case, which is what a deployment without the server-gated `ForceEndTurn` feature returns. Live coverage of the same field lives in `tests/manual/listen/v2/force_end_turn/` - `tests/custom/test_secure_logging.py` — hand-written regression test that the `websockets` Authorization-header DEBUG logs are redacted (API key never logged in clear text) - `tests/custom/test_speak_v2_interrupt_configure.py` — hand-written coverage for the Speak V2 barge-in / mid-stream reconfigure surface (`send_interrupt`, `send_configure`, `SpeechInterrupted`, `ConfigureSuccess`/`ConfigureFailure`, and the `speed`/`expressivity` connect params) - `tests/custom/test_text_builder.py`, `tests/custom/test_transport.py` — hand-written tests @@ -67,9 +69,11 @@ Current temporarily frozen files: - `src/deepgram/core/query_encoder.py` — coerces Python bools to lowercase `"true"`/`"false"` before they reach `urllib.parse.urlencode` (which would otherwise produce `"True"`/`"False"` via `str()` and break websocket query strings). Only the four `*/connect()` paths call `urlencode`; HTTP raw clients hand params to httpx, which lowercases bools itself, so the patch is a no-op for the HTTP path. Once Fern's websocket codegen normalizes bools (or the spec types these as `boolean` end-to-end), this can be unfrozen. - `src/deepgram/listen/v2/types/listen_v2connected.py`, `src/deepgram/listen/v2/types/listen_v2turn_info.py`, `src/deepgram/listen/v2/types/listen_v2turn_info_words_item.py`, `src/deepgram/listen/v2/types/listen_v2configure_success.py`, `src/deepgram/listen/v2/types/listen_v2configure_success_thresholds.py`, `src/deepgram/listen/v2/types/listen_v2configure_failure.py`, `src/deepgram/listen/v2/types/listen_v2fatal_error.py` — read-side compatibility for the SDK 7.7 Listen V2 response retype. Through 7.6, `V2SocketClientResponse` contained `typing.Any`, so every response was returned as a raw dict; fixing the union made responses typed models and broke callers using `response["field"]`. These generated response classes inherit the hand-written base above, preserving read-only wire-key subscript access alongside canonical attribute access. Restore direct `UncheckedBaseModel` inheritance and unfreeze these files in the next major release. - `src/deepgram/types/deepgram_listen_provider_v2.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider.py` — behavioural back-compat shim for the `language_hint` -> `language_hints` rename (2026-06-15 regen). The public field was historically (incorrectly) singular and accepted a str or a list; the API field is `language_hints` (a list, and the server uses `deny_unknown_fields` so the singular key is rejected on the wire). Each carries a hand-added `model_validator(mode='before')` / `root_validator(pre=True)` that remaps a legacy `language_hint=` kwarg and drops the dead singular key. Remove and unfreeze when the singular alias is retired in a future major. +- `src/deepgram/types/speak_v2speed.py` — behavioural back-compat patch for the 2026-08-18 regen `SpeakV2Speed` retype. The generator changed it from `float` to `Union[Literal["0.85"…"1.15"], Any]` (a string-literal enum), which silently changed the documented domain of the `speak.v2.connect(speed=...)` parameter from numeric to string and contradicts the actual API contract (`SpeakV2SpeedValue = float`, used by the mid-stream `SpeakV2Configure` message). Only the `Any` fallback kept `speed=1.05` working. Restored to `float` so the connect param stays exactly what it was on `main`, mypy-precise, and consistent with the `Configure` message. Regression coverage in `tests/custom/test_speak_v2_coverage.py`. Unfreeze when the spec types the connect `speed` as a number. - `src/deepgram/agent/v1/types/agent_v1update_listen_listen.py` — backward-compat patch for the 2026-07-31 `AgentV1UpdateListen` provider retype. The `provider` field changed from a bare `DeepgramListenProviderV2` to the required discriminated union `AgentV1UpdateListenListenProvider` (`_V1`/`_V2`, discriminant `version`). Carries a hand-added `model_validator(mode='before')` / `root_validator(pre=True)` that coerces a legacy `DeepgramListenProviderV1`/`V2` (or a dict lacking the `version` discriminant) into the new shape so existing callers keep working. Remove and unfreeze when the old provider payloads are retired in a future major. NOTE: this patch was silently lost once (it was absent from `.fernignore`, so a regen overwrote it) — keep it frozen. - `tests/wire/test_manage_v1_projects_keys.py` — restored wire coverage for the legacy `CreateKeyV1RequestOneParams` request alias so future regens do not silently drop that compatibility check - `tests/wire/test_manage_v1_projects_requests.py` — restored query-parameter coverage for `manage.v1.projects.requests.list`. The 2026-08-11 regen simplified the upstream spec *example*, and Fern derives the wire test from the example, so all ten optional query params (and the `datetime` → ISO-8601 `Z` encoding) lost their assertions while the client signature still forwarded them. Frozen for the same reason as the `_keys.py` entry above. +- `tests/wire/test_listen_v1_media.py` — restored query-parameter coverage for `listen.v1.media.transcribe_url`. **Third instance of the same mechanism as the two entries above**, this time on the SDK's highest-traffic endpoint: the 2026-08-18 regen simplified the upstream `/v1/listen` spec *example* (the wiremock mapping was renamed `"default"` → `"Remote File"`), so the generated wire test dropped all 37 optional query params — including the bool → lowercase `"true"`/`"false"` assertions — while the client signature still forwards every one of them. The generated test is left untouched; a second hand-written test with its own `test_id` carries the assertions, which is why no change to `wiremock/wiremock-mappings.json` is needed (`verify_request_count` matches WireMock's *recorded* requests via the `X-Test-Id` header, not the stub matcher). **Pattern to watch:** any regen that simplifies an upstream example silently erodes that endpoint's wire coverage; check `git diff` on `tests/wire/` every cycle. - `src/deepgram/__init__.py`, `src/deepgram/agent/__init__.py`, `src/deepgram/agent/v1/__init__.py`, `src/deepgram/agent/v1/types/__init__.py`, `src/deepgram/agent/v1/requests/__init__.py`, `src/deepgram/types/__init__.py`, `src/deepgram/requests/__init__.py` — package `__init__.py` files carrying hand-applied legacy alias re-exports for `CreateKeyV1RequestOne`, `AgentV1HistoryContent`, `AgentV1HistoryFunctionCalls`, `AgentV1SettingsAgentContextMessagesItemContent`, `AgentV1SettingsAgentContextMessagesItemFunctionCalls` (and their `*Params` variants). Fern would otherwise regenerate these and strip the legacy entries. After unfreezing for the next regen and reviewing the new generated content, re-apply the legacy re-exports plus any genuine new entries Fern added. - `src/deepgram/listen/__init__.py`, `src/deepgram/listen/v2/__init__.py`, `src/deepgram/listen/v2/types/__init__.py` — `__init__.py` files re-exporting the hand-written `ListenV2CloseStreamType` shim. Frozen so Fern won't strip the re-export on regen. Same handling as the package `__init__.py` files above: after unfreezing, re-apply the `ListenV2CloseStreamType` re-export plus any genuine new entries Fern added. diff --git a/examples/16-transcription-force-end-turn.py b/examples/16-transcription-force-end-turn.py new file mode 100644 index 00000000..31df4f6d --- /dev/null +++ b/examples/16-transcription-force-end-turn.py @@ -0,0 +1,154 @@ +""" +Example: Taking manual control of turn endings (Listen V2 / Flux) + +By default Flux decides when a turn is over. Two connection options plus one control +message let the application decide instead: + + eot_threshold=1.0 suppresses Flux's confidence-based end-of-turn detection + eot_timeout_ms=60000 pushes out the separate inactivity timeout, which would + otherwise still end the turn after a pause + send_force_end_turn() ends the current turn immediately, whatever the confidence + +Both options are needed for full manual control. Setting eot_threshold=1.0 alone still +leaves eot_timeout_ms (default 5000) able to close a turn — a distinction visible only +through TurnInfo.trigger, which reports what actually ended the turn: + + model Flux's own end-of-turn detection + manual a ForceEndTurn message + timeout eot_timeout_ms elapsed + +This is useful when something outside the audio tells you the speaker is done, such as a +push-to-talk button being released. The connection stays open after a forced end: the +turn index advances and transcription continues. + +Note: ForceEndTurn requires server-side enablement and is not available on every +deployment. Where it is not enabled the server replies UNPARSABLE_CLIENT_MESSAGE and +closes the connection; this example reports that and exits. +""" + +import os +import threading +import time +from pathlib import Path +from typing import Union + +from dotenv import load_dotenv + +load_dotenv() + +from deepgram import DeepgramClient +from deepgram.core.events import EventType +from deepgram.environment import DeepgramClientEnvironment +from deepgram.listen.v2.types import ( + ListenV2CloseStream, + ListenV2Connected, + ListenV2FatalError, + ListenV2TurnInfo, +) + +ListenV2SocketClientResponse = Union[ListenV2Connected, ListenV2TurnInfo, ListenV2FatalError] + + +def _client_environment() -> DeepgramClientEnvironment: + """Because ForceEndTurn is gated, this example accepts DEEPGRAM_BASE_URL=wss:// + so it can be pointed at a deployment that has the feature. Defaults to production.""" + base = os.environ.get("DEEPGRAM_BASE_URL") + if not base: + return DeepgramClientEnvironment.PRODUCTION + base = base.replace("https://", "wss://").replace("http://", "ws://") + https = base.replace("wss://", "https://").replace("ws://", "http://") + return DeepgramClientEnvironment(base=https, production=base, agent=base, agent_rest=https) + + +client = DeepgramClient( + api_key=os.environ.get("DEEPGRAM_API_KEY"), environment=_client_environment() +) + +audio_path = Path(__file__).parent / "fixtures" / "audio.wav" + +turn_started = threading.Event() +feature_disabled = threading.Event() + +try: + with client.listen.v2.connect( + model="flux-general-en", + encoding="linear16", + sample_rate="44100", + # Never end a turn on Flux's own judgement... + eot_threshold="1.0", + # ...and do not let the inactivity timeout end it either. + eot_timeout_ms="60000", + ) as connection: + + def on_message(message: ListenV2SocketClientResponse) -> None: + msg_type = getattr(message, "type", None) + if msg_type == "TurnInfo": + event = getattr(message, "event", None) + if event == "StartOfTurn": + turn_started.set() + print(f"[StartOfTurn] turn={message.turn_index}") + elif event == "EndOfTurn": + trigger = getattr(message, "trigger", None) or "" + print( + f"[EndOfTurn] turn={message.turn_index} trigger={trigger} " + f"end_of_turn_confidence={message.end_of_turn_confidence}" + ) + print(f" transcript: {message.transcript!r}") + elif getattr(message, "code", None): + code = message.code + if code == "UNPARSABLE_CLIENT_MESSAGE": + feature_disabled.set() + print(f"Server error: {code} - {getattr(message, 'description', '')}") + + connection.on(EventType.OPEN, lambda _: print("Connection opened")) + connection.on(EventType.MESSAGE, on_message) + connection.on(EventType.ERROR, lambda error: print(f"Connection error: {error}")) + + def send_audio() -> None: + with open(audio_path, "rb") as f: + f.read(44) # skip the WAV header; we declared linear16 above + audio = f.read(44100 * 2 * 6) # 6 seconds of 16-bit mono PCM + + chunk_size = 44100 // 10 * 2 # 100ms + forced = False + print("Streaming audio...") + for i in range(0, len(audio), chunk_size): + try: + connection.send_media(audio[i : i + chunk_size]) + except Exception: + # A gated deployment closes the socket rather than ignoring the + # message, so later sends fail. Stop streaming. + break + time.sleep(0.1) + + # Wait for a turn to actually be open before ending it. + if not forced and turn_started.is_set(): + print("Sending ForceEndTurn mid-sentence...") + try: + connection.send_force_end_turn() + except Exception: + break + forced = True + + time.sleep(2) + try: + connection.send_close_stream(ListenV2CloseStream(type="CloseStream")) + except Exception: + # Already closed by the server — nothing to signal. + pass + + sender = threading.Thread(target=send_audio, daemon=True) + sender.start() + + # This blocks until the connection closes + connection.start_listening() + + # Reported here rather than in the sender thread: on a gated deployment the server + # closes the connection, start_listening() returns, and the daemon thread is killed + # before it could print anything. + if feature_disabled.is_set(): + print("\nForceEndTurn is not enabled on this deployment.") + print("Set DEEPGRAM_BASE_URL to a deployment that has the feature.") + +except Exception as e: + print(f"Error: {type(e).__name__}: {e}") diff --git a/poetry.lock b/poetry.lock index 05e2df2b..2872a619 100644 --- a/poetry.lock +++ b/poetry.lock @@ -259,105 +259,184 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.9" +version = "3.5.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" groups = ["dev"] files = [ - {file = "charset_normalizer-3.4.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd6280cf040f233bd7d3407b743b4b4c74f70e8e1c4199cb112a62c941c0772a"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aa99adc8f081b475a12843953db36831eaf83ec33eb46a90629ca6a5de45a616"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c1225416b463483160e4af85d5fc3a9690ccb53fd4b1865a6437825f5ede3209"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:16d10d789dd9bcca1173c95af82c58433122564b7bc39385124be735a35cbe99"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9bb41182d93ea91f60b4bc8fbf4c820c69ef8a12ab2d917f3f1834f1acad07e8"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-manylinux_2_31_armv7l.whl", hash = "sha256:bcf74c1df76758a395bf0af608c04c82257523f55c9868b334f06270d0f2112b"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b5314963fce9b0b12743891de876e724997864ee22aa496f903f426c7e2fa5b2"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e9701d0049d92c16703a42771b98d560b95248949f23f8cf7b4eddd201814fb9"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:65a7ff3f705e57d392f7261b6d0550fe137c3019477431f1c355e0db0a7d3e15"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79580094b00d1789d1f93ea55bc43cb2f611910c72235b7657f3482ddcc1b22d"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-win32.whl", hash = "sha256:432786d3561e69aeeae6c7e8648964ce0ad05736120135601f87ac26b9c83381"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-win_amd64.whl", hash = "sha256:8c041122946b7ba21bb32c45b1aa57b1be35527690aeb3c5c234521085632eee"}, - {file = "charset_normalizer-3.4.9-cp310-cp310-win_arm64.whl", hash = "sha256:375b83ed0aecfce76c16d198fbc21f3b11b337d68662bea0a995046682a11419"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0e94703ec9684807f20cfb5eed95c70f67f2a8f21ad620146d7b5a13677b93e5"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2a441ea71902098ffe78c5abe6c494f44160b4af614ed16c3d9a3b1d17fd8ee2"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:304b13570067b2547562e308af560b3963857b1fa90bd6afd978130130fe2d6a"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4773092f8019072343a7447203308b176e10199920eb02d6195e81bbb3274c29"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:04ce310cb89c15df659582aee80a0603788732a5e017d5bd5c81158106ce249c"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:c0323c9daef75ef2e5083624b4585018a0c9d5e3b40f607eed81a311270b934b"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:871ff67ea1aad4dfd91736464934d56b32dac49f9fbe16cddba36198a7b3a0db"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:67830fc78e67501f47bb950471b2dcb9b35b140084429318e862895a8e89c993"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:3d92613ec25e43b05f042302531ec0f00b8445190e43325880cbd6ab7c2581da"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:280081916dc341820640489a66e4696049401ef1cf6dd672f672e70ad915aca3"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-win32.whl", hash = "sha256:ac351b3b8014eead140e77e9717e2992c6bbe30b63bc3422422eb84865412e3d"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-win_amd64.whl", hash = "sha256:6366a16e1a25018694d6a5d784d09b046edc9eac40ea2b54065c3052672516a1"}, - {file = "charset_normalizer-3.4.9-cp311-cp311-win_arm64.whl", hash = "sha256:1d22856ffbe153a602df38e4a5464f0b748a54002e0d69ac6d2ad0a197cc99ec"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:45b0cc4e3556cd875e09102988d1ab8356c998b596c9fced84547c8138b487a0"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9b2aff1c7b3884512b9512c3eaadd9bab39fb45042ffaaa1dd08ff2b9f8109d9"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9104ed0bd76a429d46f9ec0dbc9b08ad1d2dcdf2b00a5a0daa1c145329b35b44"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7b86a2b16095d250c6f58b3d9b2eee6f4147754344f3dab0922f7c9bf7d226c9"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e226f6218febc71f6c1fc2fafb91c226f75bdc1d8fb12d66823716e891608fd"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:90c44bc373b7687f6948b693cceaea1348ae0975d7474746559494468e3c1d84"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cdef90ae47919cae358d8ab15797a800ed41da7aba5d72419fb510729e2ed4b"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:60f44ade2cf573dad7a277e6f8ca9a51a21dda572b13bd7d8539bb3cd5dbedde"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:a1786910334ed46ab1dd73222f2cd1e05c2c3bb39f6dddb4f8b36fc382058a39"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:03d07803992c6c7bbc976327f34b18b6160327fc81cb82c9d504720ac0be3b62"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-win32.whl", hash = "sha256:78841cccf1af7b40f6f716338d50c0902dbe88d9f800b3c973b7a9a0a693a642"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-win_amd64.whl", hash = "sha256:4b3dac63058cc36820b0dd072f89898604e2d39686fe05321729d00d8ac185a0"}, - {file = "charset_normalizer-3.4.9-cp312-cp312-win_arm64.whl", hash = "sha256:78fa18e436a1a0e58dbd7e02fc4473f3f32cceb12df9dfca542d075961c307d2"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:440eede837960000d74978f0eba527be106b5b9aee0daf779d395276ed0b0614"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21e764fd1e70b6a3e205a0e46f3051701f98a8cb3fad66eeb80e48bb502f8698"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e4fd89cc178bced6ad29cb3e6dd4aa63fa5017c3524dbd0b25998fb64a87cc8b"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bd47ba7fc3ca94896759ea0109775132d3e7ab921fbf54038e1bab2e46c313c9"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:84fd18bcc17526fc2b3c1af7d2b9217d32c9c04448c16ec693b9b4f1985c3d33"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:5b10cd92fc5c498b35a8635df6d5a100207f88b63a4dc1de7ef9a548e1e2cd63"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a4fbdde9dd4a9ce5fd52c2b3a347bb50cc89483ef783f1cb00d408c13f7a96c0"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:416c229f77e5ea25b3dfd4b582f8d73d7e43c22320302b9ab128a2d3a0b38efe"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:75286256590a6320cf106a0d28970d3560aad9ee09aa7b34fb40524792436d35"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:69b157c5d3292bcd443faca052f3096f637f1e074b98212a933c074ae23dc3b8"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-win32.whl", hash = "sha256:51307f5c71007673a2bf8232ad973483d281e74cb99c8c5a990af1eefa6277d9"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-win_amd64.whl", hash = "sha256:fe2c7201c642b7c308f1675355ad7ff7b66acfe3541625efe5a3ad38f29d6115"}, - {file = "charset_normalizer-3.4.9-cp313-cp313-win_arm64.whl", hash = "sha256:611057cc5d5c0afc743ba8be6bd828c17e0aaa8643f9d0a9b9bb7dea80eb8012"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:0327fcd59a935777d83410750c50600ee9571af2846f71ce40f25b13da1ef380"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a79d9f4d8001473a30c163556b3c3bfebec837495a412dde78b51672f6134f9"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:33bdcc2a32c0a0e861f60841a512c8acc658c87c2ac59d89e3a46dacf7d866e4"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f840ed6d8ecba8255df8c42b87fadeda98ddfc6eeec05e2dc66e26d46dd6f58a"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c25fe15c70c59eb7c5ce8c06a1f3fa1da0ecc5ea1e7a5922c40fd2fa9b0d5046"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:f7fb7d750cfa0a070d2c24e831fd3481019a60dd317ea2b39acbcebc08b6ed81"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4d1c96a7a18b9690a4d46df09e3e3382406ae3213727cd1019ebade1c4a81917"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a4cfde78a9f2880208d16a93b795726a3017d5977e08d1e162a7a31322479c41"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d4d6fcde76f94f5cb9e43e9e9a61f16dacefd228cbbf6f1a09bd9b219a92f1a1"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:898f0e9068ca27d37f8e83a5b962821df851532e6c4a7d615c1c033f9da6eedf"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-win32.whl", hash = "sha256:c1c948747b03be832dceed96ca815cef7360de9aa19d37c730f8e3f6101aca48"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-win_amd64.whl", hash = "sha256:16b65ea0f2465b6fb52aa22de5eca612aa964ddfec00a912e26f4656cbef890b"}, - {file = "charset_normalizer-3.4.9-cp314-cp314-win_arm64.whl", hash = "sha256:40a126142a56b2dfc0aacbad1de8310cbf60da7656db0e6b16eebd48e3e93519"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:609b3ba8fcc0fb5ab7af00719d0fb6ad0cb518e48e7712d12fd68f1327951198"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51447e9aa2684679af07ca5021c3db526e0284347ebf4ffcec1154c3350cfe32"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cc1b0fff8ead343dae06305f954eb8468ba0ec1a97881f42489d198e4ce3c632"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fa36ec09ef71d158186bc79e359ff5fdd6e7996fe8ab638f00d6b93139ba4fcf"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:df115d4d83168fdf2cae48ef1ff6d1cb4c466364e30861b37121de0f3bf1b990"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:f86c6358749bd4fda175388691e3ba8c46e24c5347d0afd20f9b7edfc9faf07d"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:32286a2c8d167e897177b673176c1e3e00d4057caf5d2b64eef9a3666b03018e"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:83aed2c10721ddd90f68140685391b50811a880af20654c59af6b6c66c40513c"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:cd6c3d4b783c556fa00bf540854e42f135e2f256abd29669fcd0da0f2dec79c2"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ee2f2a527e3c1a6e6411eb4209642e138b544a2d72fe5d0d76daf77b24063534"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-win32.whl", hash = "sha256:0d861473f743244d349b50f850d10eb87aeb22bbdcc8e64f79273c94af5a8226"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-win_amd64.whl", hash = "sha256:9b8e0f3107e2200b76f6054de99016eac3ee6762713587b36baaa7e4bd2ae177"}, - {file = "charset_normalizer-3.4.9-cp314-cp314t-win_arm64.whl", hash = "sha256:19ac87f93086ce37b86e098888555c4b4bc48102279bae3350098c0ed664b501"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:253a4a220747e8b5faf57ec320c4f5efb0cef05f647420bf267143ec15dba10a"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:68ce9f4d6b26d5ccbf7fd4459bf75f74a0a146677ebba80597df60cbdb20e6f4"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:58150c9f9b9a552505912d182ccdf26f6396fb6094816ceebcbb20eecabaed94"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:df7276909358e5635ae203673ab7e509ddd224225a8d6b0790bf13eb2bde1cc5"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3c09a49d6cde137258beb3d551994a2927fd35ad5cf96aed573f61bbd67c5f84"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-manylinux_2_31_armv7l.whl", hash = "sha256:231ddcbb35e2ff8973e1365db41fe0572662893b99a05deb183b68ad4c0c8bd4"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:920079c3f7456fa213e0829ed2073aaa727fd39d889ead5b4f35d0de5460d04f"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0fa1aec2d32bcc03c8fa0f6f1712caad1adc38509f31142112e5c9daf5b9c833"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:ad41ba96094304aa090f5a30cb6e4fb3b3f1c264c523394b4c39bbacc4dc92ba"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:43b9e366a31fdd1c87d0eb08f579b4a82b723ea54338f040d6b4e518a026ea29"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-win32.whl", hash = "sha256:93d59d504b230e83c7a843251681959a0b6a9cd76f6e146ce1b8a80eb8739af9"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-win_amd64.whl", hash = "sha256:ddf4af30b417d9fe16481e9b81c27ab2a7cde1ff7ba3e85653b02db7d145dc7b"}, - {file = "charset_normalizer-3.4.9-cp39-cp39-win_arm64.whl", hash = "sha256:476743fe6dfe14a2da12e3ac79125dc84a3b2cf8094369a47a1529b0cd8549fe"}, - {file = "charset_normalizer-3.4.9-py3-none-any.whl", hash = "sha256:68e5f26a1ad57ded6d1cfb85331d1c1a195314756471d97758c48498bb4dcdf5"}, - {file = "charset_normalizer-3.4.9.tar.gz", hash = "sha256:673611bbd43f0810bec0b0f028ddeaaa501190339cac411f347ac76917c3ae7b"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1ee1e296209fdce05b81b663250eefa02213a2da7b41bf26f7829b8ba3545aa"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9fbdce1e47394b09bc9f26ab117dfc8d6491977a11d86f592bb42c779db2fda"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:00668ebb0609751758682eb0b5857e7c35b9f00e84dfdef062e103244ec94d45"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba2f37ee79e6338845261a3c5b1784e5d1acdff2c0785b284f1b633033d136ab"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ce854f5f478050ade5a238731c4ca985a7d3b3cb53ff600a9b5c3b689b5f0a7a"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:96eefc178f8636b9c760c5829345307fd81cfae9ab1e80997dbddeb0f54ee9a3"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:366ec70f5547c640d3ce1985722490f23faf4eb5216a7eeba78277490e78dacb"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:950f23cb393f85543777b0433f082cddd25b51ab398eac7971146495679efe5f"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1dcc36dcb96abc02236e182d17e0f71430152a6c2c7447421da2d2dc144edea"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:07ffd07412fc5d5e84cd8952acf9ff7e4ed7a708e69d1bada19d8ba91711353f"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:f5542f9b941279d82d41eb0aa9f98eba36fe4df5c7086c651df7944935b37182"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:a545775cfe815855ea32d7c27731d79da358ef2055b4a25830231b1622dd18aa"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:494b70049a4d69aec6e8137c13af4cf8db8c9f9820a1392ac293b0dd2987a818"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-win32.whl", hash = "sha256:94fbf1c0c6cc0d3d5e50f9a9313a8cdca90dd696d34b381cd1704f8c9e939f20"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:be47f99644b208bff7766314013f9acf57b056b04191d570d68ad14022cf5b1d"}, + {file = "charset_normalizer-3.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:a6d095662e73e74f0a49988e0593373e243e3a52e27bfeea0a859e88acf4a0f5"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eda059b6bc8bc0812d626fd91a7ce01bf583df0a61296eff390fd94141a34e30"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aa2bb0b37202dca27175591f761108b5d34096ade1191ffe4808bdf6b1571488"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0b2b1b3fa5670c127b246df1d0c059defd41f689a868a3b9d79df9b1cac42d22"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6e5e4d73d588ca5ed09df1b7dcd1b203d1df3c542e3f50d126c947d432b10731"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b54e7e13267d49ffbfe68e25b3cbd774dab38fa37238f71265e91b36146eb21c"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7b742bf31c88566b4bb6335a7f393bb322e580b6bb98df7bd0c25e6e3519ce8"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6ba32c4d2abf1d2fe7cf27d280f4cca5664233b0f885549c7761719eb977f486"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0722590aabf9dc6a6c0343d523c05458fa2b5047dbe6302fd526bb570600753f"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:aa1099b956fb795e686d073568f6dc002a0bb89765ea6d5b055dd7d9bf1b116c"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:bd6c173f04743d483881bffa1478d5a4624475b8cd1d2194956a75548e191c18"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:f298e218441525d3794428b4c8b8fb8662c6d3ea79925d4807ee6b9a96a3bca5"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:6e2912d4babbc65196ac13c2f53468dc57fb8b9c25ef913e8c59ddf7c6dc0e1b"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3d27167433c0d5f18dc850f07d0b3816221984fecdc405d6c157a6f0b8f8e9e6"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-win32.whl", hash = "sha256:ac00177c4831ffa650f8609e4bdddd5fe09c03b1c0c47acece7e6ea20421598b"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:f9b1e28d0e8dbfa858abdba91d6b547beaf2df1a59bec6da6faae7b96a4991a9"}, + {file = "charset_normalizer-3.5.1-cp311-cp311-win_arm64.whl", hash = "sha256:ae31a1a1db2ee6cc2942fccaf695c934bc7f3db9f2133a3fef1f367cf1a4ab10"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:5b6d1386bf0096d26d3a863dc0a487a5b4eb9aa93cf5ba69683d29dde6b9d60f"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4582c27e8c889d64811987b5967fbd3ae0c823fe1fd933b543d55ac20bb475fa"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1d1c7a53a6c2103925cdd6d7229f8c567379f211c869793df679f2e9f738c369"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e6621fb2a4988d6e53eedc455e5903e2679f3967b8acb3d639f1b63c14a2e893"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7c0c10730342b0c9b35dd1d619beb8214e520bd96a1f870f452680b238aab3e0"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b9af956078716df40d985fb0dfeb2c2120c5ca92ba4ff4b388acfd01cdc14d08"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f9f8405c2c758532c74fed975dbee57be1f31a6e865c031870c79a6ed3212ada"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:96fef3e886d6a9874b14f27fc193fbdc69d5d8035783d86aa4e1cea594e695f9"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5d8531a6569d025f68e2321e7638fb7978f23db58e5f69f56913837aae03816e"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:aae2ee51122d3ae968a3837d97dc24a0aeebb0dea23694422cd172bd30017cd6"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:7235dc28fc6dd9d832ac7c7bce95367dedb85929f17368a0c2bee1e080b9acbf"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4abdc5f9ad448c1ecbfae2974b820535d6bc6e7eef63babbab3d81cf46968c71"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ba501e667c17d8411f98e67a022d9604ef179aff0e459b7e292c796837c13573"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-win32.whl", hash = "sha256:cfa1c0cc3a8f9f53f1243a5a99ac36fd003880199383b37672e86ddda9cb07e2"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:3617ac3cfd8b9888f145ad89dd6e692285834b0201c6074a5eeaad3fd4d668c2"}, + {file = "charset_normalizer-3.5.1-cp312-cp312-win_arm64.whl", hash = "sha256:88e85ab89cb822c1e635f51d6d32e488f94e002e70e2f492bdb8b945543f345a"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:4f298bdadb8f0b9e5672877f647d1be9373ef5320c9e2f049795e26cad28b6a9"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-android_24_x86_64.whl", hash = "sha256:88ca277405c2d3b71c4e1c2ee0e7966e807bcba86a69d11e19ba199d18ae4491"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:9362dd90aa7dab48c0054a21187791ccf05473f7dba5d92b8033ae62164675e7"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:977cdbd483a9cff38179bea4fd754289a6f2195c7abd414aba85410b3e66cc5e"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e90251c0c7bdd54a100a0dce3c07b7e637278c93af29dbf78ebb89a58c4bac7d"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:94d78ecec2605a8d0398b0f365d5f12a63248438516f5dac536a5eff7337df4a"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d59b75732e9b6f27388e10c14b0259cc5f2e48c78627d185e6a177b58ad3cffe"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0d929fc574b4d6fd9e7c0f5c2ede8716a41911923aa7fa5fce38e0818aa4a1ac"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:394fea06235c8543390050ed5f529187074b029fb027213f6c46ac11ab5d950e"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62b55f6722735a6c472f88361cde6640608773d9443cebdbb51abf436a1fcdd3"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fa48b1b63d639f9483e0633e092f5851e2348c352f1f9bb6c8182f87884ef876"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c71fb0d56c920c269cd3e2e3fe7c610e3f1fdb21a6ce60efa6430ff63676cea6"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:485a0d363cafefcd2538a73c7c838daa2035f09b2c9f9b5e3133f80c6aeb84c2"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c0ea61a470e070686aa30892fed79e297d2c8d0ab46b8bcdf027d38c51da591"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:90b7481fb62fbe172c558bc6fd1c4c98d82004a54a7551f20e11ac9bf0b8708c"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:35fe081843b35aad20ffeccec3eeffbe637b15d14f3fb22cc1b59cd8ec17e93c"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fd0350afdc3aabd5576f60ea109228bd5538139713c7b094c5cd27c73a98bc6f"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:9d9a0dc7cbe9bec24c3f767c9122c41fe5a1bc43f47cd099d00d393e09769de4"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-win32.whl", hash = "sha256:d63600d620ad0064c3a748b950ac5ea38a80190e5498532efefa4b7b3f1da1f3"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-win_amd64.whl", hash = "sha256:aea996a6aba25260827c9ea511d1addfde2da9eb686ac961838509086188b7e6"}, + {file = "charset_normalizer-3.5.1-cp313-cp313-win_arm64.whl", hash = "sha256:fd0a274c0e5f9a21565cd9d3dd749b61f96b7aa1e20a93aa1ba4029518f2e5c0"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:774d157f112367ff4abd29019f38f023c24e00e56edc7829c20e358a5a913ad8"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:26422d45fd13551cf564c58932f7d72b4f58b93b0fcf18c35ba6be12b46bb102"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:09a7bba9f739468c8e78c36a75c33768e53cb1959fc638f510454c14683f00d5"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c9548dc78002099910abaebc0a72ac58b7d30931869e0351c09b507dff4ece3"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:c428c6c31eb5f4277d7f8eccaf767fbd548ddd5ce3c8b4f4cbbfab3d96b5904c"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2f06b7eae9dbe77fe1d644ca244dad508de8d302870a43f3c559b521270938a0"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b7430cf5728e68f6c462254009a6ef4086e1bea43cf2f57aa9c55fb4f50ff96"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ab743e9bc90c1f73552ec33e10e3331315acd2c397b36065b591b0181de533cc"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f6f7deae3feb4edfa2efaf7c574fe88cbf055038a6abdb40188e4fff66d5699f"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15f024313246a4ed976c60f440bb8d257815513a681d212ff74fd46f7d715a90"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:823f82903d189af463d7df250ef1f7f696f3cee08cc8d91deb565e8d425f6506"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:01e93745f7f219b703b60ba7afead36cfc4242782be5af484673fc500df12da5"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:329fc3ccb63ad22d867d84c2adea759a64079a37ba4a343433b02c7a2816871e"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:bb57753e36e4855b8ca375069482250a6246372331a3e4f3407eaebb007443f5"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:fce8cbd4997efeb450bd298b54f755dcdff18d496f7a5ddbb4867c6d7c88fdc3"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:6c9cdde8becb25a7fde49924511aa2644d6f8081cc8df8e9452724303348d8e3"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9ac4444d8d4fd4c4bd08bf451ed3167aa9e7ec6cdb41b648794f1d1103652e36"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:f03ac127268b43ef4fe9e6ab6794a6794b49485a0cc0c1db79876d2f33f75bc7"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-win32.whl", hash = "sha256:1f5883d77fd409a261abb5dc8ccbe335720d798b1de4abb3b1d47ccbbc76b53b"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-win_amd64.whl", hash = "sha256:c658c50ac0c98cd755a2dd50b7977d3bca7df401dcc47fbdfa87db53ef7d4e8b"}, + {file = "charset_normalizer-3.5.1-cp314-cp314-win_arm64.whl", hash = "sha256:4bea7f8ebe90bbd7f0e4a2de42ca6924ba23e3e76418c408ff82f1d46fabd687"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:fbc597639158fd7c14d55e808718848319540f51b0e6746e3eefa59723a4a348"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e71c909f353863b2b89c83de2ebed71ea6d0df8a6ef65a128193c5e650766bef"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7ac76cf9afd34929d76eb7fcb63be476a4853d8a96f0dcf2d0db68a0cbdf9885"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a3a370082ce34d0612f421e15fe011c53bb1feff21a26d06ad4fb244dab5a375"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:256dd4d85d9e4dc595e2bc983c980e73f62ddeb3165c58b4c3dfe78c5c8548c1"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:58d4aa13a59c969dbfdf9e6a9560e242cbfd9e8a8f50c2747714df1a423adf65"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0c6dfb5ca6723eeed15aa8e564a014d69fcb8812f94eef11fe3631e0508199f5"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c010f5581d9c612804cc59fcf7b524b707fbcb72828551237ab545bb5c7034af"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:52ec005752a56ae79547a05c0139ca2501a0c866390b6115008456b9f0e7cde1"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:2bced4061f000f7187254a02ad3433ae17eaf991747ceea2f478422590a5bba9"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:9eea3ab2597a5e65fe65296e2d6a84570845a6b55532d90333d740d48bbc850a"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:496846868fea80e479324862fa877f02411f2fd0f83b79ccee2607aa68b2a032"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:85d5855daafc240cc045c026d7a15fd198a09b0fc8ff6f5ecbb5297b509cb11e"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-win32.whl", hash = "sha256:58d3e12c88e0950bca850ae1f7c256055c097639c2edb9eb123af9807d8b15e4"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-win_amd64.whl", hash = "sha256:acaf604462bf330b0d07e7a07c1d6e4adac79e5fb13e9c5140590542cafacc00"}, + {file = "charset_normalizer-3.5.1-cp314-cp314t-win_arm64.whl", hash = "sha256:fdb8a068947befafba9952162645dc2fecaeb400e64584829ed5e9b2fbe21a7f"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:9085f87b0e38a2b92b8923059b4e8789fe40d9279712d15dcc670048d77079af"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2679de311c7946dde5d3b6f44941844133ff5c7cb86099c0061ab1e8901c20a8"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:baf3775a2635e5a11fbd5e4e64ee69c7e86875d224a5c72aca4c141064589a90"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ac8c94b6539074e0f40899301273ac8402b9b3e01c7b7ba269ff30340aaaf20"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8fe532b3c966d1fb794e0698e4589d0444017ae77fc0b31edea13c0e35bcc449"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5c84bec0ab5ae0c64bfe73a7d2adcb5ce73b467523fc27fd6a28ab2aa6cbe35a"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:854066be00447fa8de2ccbbe893e2ffc4b123ef16d897af794c1e18bd4a714b0"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:21b82d8082f6f5e7f456ef0bd16323d08de1266efbfeb476e64b2a91d1471a4e"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:838648accb3a7fd9803fd45c87bce8509648eb0c11bc34e216141300977244f2"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:195ce897c6153c0700078142cf8efe3e6454ca4cf4357499e4078dfd83396626"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:978eab16f55b4ab2c2a745be9a0a840bf8f09a7f227d9c76eb30214d078865a5"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:cc0329df4caaceb950d2f580b5ac716a377f7059624a0bafaeaf8a218c6ed774"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:687c9ca3035544b113bea2055e180af96fb63c0c476e22a9180f51925186e7b7"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-win32.whl", hash = "sha256:706bfd38730a5ac7a365793269a00f4e988178cec121391f4248d84ad8c972e9"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-win_amd64.whl", hash = "sha256:92caef967d287a407085d61176fce4012b1dd62daed4eb6d5ceb26d3d2538712"}, + {file = "charset_normalizer-3.5.1-cp315-cp315-win_arm64.whl", hash = "sha256:5fc45d653ea8c9a20479167e11d4a0f8cb2fa3470737ab6f9c827532313187b7"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:59171c6e45bf07d0d5cab3b0bf81d945035530f6873398b3b531c31184d46663"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9dbdd9205662134957cf0c324f639bdc5031c0ca056e2369e238db75187c0f11"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e4b018dc5a0eee4676e38fe84a47a427816c590b93b55d9025274ec4d6ffc2dc"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ced3fdd71aaa83ce593746c2edb42b7a59cb4c19c8b5c407781c72e493aae55a"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:19a3dd5aa73cef1c99687c4fc57db016a9c17104ae1185da88ba566a5d3bebe4"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc5d36d96478aa9c60654bd932525bf32964c62a7281eafdf16d85003a8d6004"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04368edf83514385ffc3e1cfd4546e595f4f1272dd23ba437a93a9cc3741d47b"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:9b5db6052055d34d41230fb78d7c439c23dc536a9896f6cb039e8dd92cfc1263"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:252d099029bcbea642f2a06c4ed5046bdf8b5a8150b64afa5e027e88b106e5ee"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:6199d5606e2bbf2b096cf64d03f8b6790c91081d5ac866b8e7bb6422738cc60c"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:77efcff2b23071c349402ac1066667a3d011f62398d81408c9b88ad991747c9e"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:a5cbd90ecf0fc62e64726917ad083b73001f0563657a87ec3c0b504e277dc90d"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:4d26f14f041e83dd8edfd61f4cd4fa7285d31798b5bf1f28e70c367ba6c41d61"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-win32.whl", hash = "sha256:ac13b004224fb341e1e25a1ed5e19d32f57cdb2a403e01f003b46f051a550f6f"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-win_amd64.whl", hash = "sha256:35aea775dc2bd5f54cd84a1cd2696cc3207c479cb9cf0bd346f0d343e4300ddb"}, + {file = "charset_normalizer-3.5.1-cp315-cp315t-win_arm64.whl", hash = "sha256:fb78f6e7fcd8ad785d28cd577168bc1aaee827b25bb8755638f694794ea98f0a"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:41876ee62a3dddf48ff1121ad8f0798032aa03f2fd35f21f34a4cab14f18d8d2"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a6dac12ff6b846103483683f60c5f8fee205121adc58ffd87e90a90a3af69e99"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cee5dd7c6fb5dd52a0fe2a740f9bc6e3593f5f8b1788bde49de02086f30182b2"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:343fb4f2821043bd87095f7b08a1a181febc8e36ac64212143bbfd0a0e1bc235"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ae4a097991662cd4fff0ddc74e0fe7874f82e00042fa0ea00855645ed0c79598"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4b599739b93b2cbeded49645ae3c8d1405c29ddfbceac1545c87a3f9580a9e96"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b39b69b347e5e47a3b5b8cfc005c68c1ba347474e3960236c4944a8ecd174962"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:a2028475ba855475b8b4d3cfeb4994269c967aea8b9892dfba907f4263a863a3"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:36047af20e17097c3bb9476c2b7655f2f7aa51322c0ba58c07695bedf755a950"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:4c4fb141a727957c93edfe5c32a26ceb6b5f6461d67146e2d39f51e16170bea8"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:2f293479cce755c75f1697e87c409b7ae4c555c7dfecb6e988ad13abba943031"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:3588e376b3ea2eea84976f67273d679f229e24c66dce7b82ae45aef04ff6e072"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e199fb99720074809a7720f1c0b4d919eea8b87e88713e0f8f602f7bef543d9d"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-win32.whl", hash = "sha256:dd732602a7009217f658d5863d12d79d373a4de0eebc111094bcdd3bb8e0a6cc"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:70055ff39b97c99e7ae40ea3e393fb62aa2e44dbd9b29f8d14f42fb0025c3959"}, + {file = "charset_normalizer-3.5.1-cp37-abi3-win_arm64.whl", hash = "sha256:87e4f41d375c0b9be2fb5251aee4b8a689169e134535aed81bf085c3b647451e"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:85de3134b5379856e323ba37c19c9256d39425f7b76a63af52b09fb4664c2e8f"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3e5e1224c0a6a90e05843e07adfec669edebec17801c67072f51e59561d63c0b"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5e2d0e146dcb57034f8b97dc58d2d512cb90aba253960ce449f695fec6a82c6f"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e06efa066f7dbadbc84ebc126a97c452a6451dfcf589d89d788484949e1cf795"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:994e883d17c559cdfd38c84003c8b27d25424a1077272a17e7cd27bfe0bf57b2"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:789b8982559ae28dad2356519f841655756cdcd96616410590ae0b17454ee64f"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a951ad59cad9145664a730d3036b40b844e74d2d3683da40111463cd3a83845d"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:55261ac0d2941c42f196dd576f543d87a8ee03cd6f5e30dfb4d807b2e3b9121a"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:5ca0555312ae2fe82715cada7fac375530c2f3349e1eaa1bcb33d0283ac79a18"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:2e9cf9253119d8e5d111f05d71626786fd3d6193817316eab1ca088cdb8593cf"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_riscv64.whl", hash = "sha256:433c5a81eade63b47e522303bad236f59dba55ea6951746f5558355eeed8c75d"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:13e3afe97712e8887cd516e960c63f0b93122971e5b5e4b2622fe7701771e838"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb12fb2ba69ffa05f8695f61c69e591dc4b4a12ac3757ac8af8adb259bf56d17"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-win32.whl", hash = "sha256:56490c595a28b1bb27dfc583e816152a9767721ef58b2c03b13f954d2f707420"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:012a22b88a77ca2e59b98ac5889b0deb604147666032f45e6d6e217634d2550d"}, + {file = "charset_normalizer-3.5.1-cp39-cp39-win_arm64.whl", hash = "sha256:29880d17a8eb0b5cfdfd8944b468322928059aa35f1f5fa8ff22b149ec0b42f8"}, + {file = "charset_normalizer-3.5.1-py3-none-any.whl", hash = "sha256:6df0ec430f9a831772c23ca5a224cba36517a58a84bb32c32bb59a9fa67c47f6"}, + {file = "charset_normalizer-3.5.1.tar.gz", hash = "sha256:6117b84ea48435e5356dc737f5121485c30920ba43375fa7b434fd753df0eac3"}, ] [[package]] @@ -375,103 +454,133 @@ files = [ [[package]] name = "coverage" -version = "7.15.3" +version = "7.15.4" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "coverage-7.15.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3a82b2ceee91ba353e59fe2436d8a9eae799ff9825e5385423ea205d693e2949"}, - {file = "coverage-7.15.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3088cce65e54c2eefc08e7e1ca0b0acec1e95e8cf084ac848599103ed0367f74"}, - {file = "coverage-7.15.3-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a65e09efb0b5ab21fc54a8a65c5b2e533c0a4c0d064af0259a005dc656dc1b13"}, - {file = "coverage-7.15.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b51f279a2477b0e1f288b98f141fd227acfdd1d3f0370400e473788879b47871"}, - {file = "coverage-7.15.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7835176988cbcf1f014db683bc33aa15e0558e412bf08deaa99757335b88df15"}, - {file = "coverage-7.15.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f24896dc8863167f6732f4142f5d37e6195eccc8fe5fe528d35d49597d29fdb3"}, - {file = "coverage-7.15.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9490d43e5d041fdf376770a886a29722adb05f6b9c21a65c48c81fc8f1c33fd7"}, - {file = "coverage-7.15.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:225e359bd5dedaff6d68e36091af20555866c557d968167308b677379bf575c3"}, - {file = "coverage-7.15.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:22119e2e3b2ac5ac024d50131fdd4b22ab4c6cf8aa2fc792cce73c0d94c5812d"}, - {file = "coverage-7.15.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:12d555badc462b0f6037ce8bec8b4af8d71f90eb55b57d0a358731f7ee7883e2"}, - {file = "coverage-7.15.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:c4e2cf9cf774939b3dc581c6e31dfe7e8d7608b24f0f17524d6161f8235c3d2c"}, - {file = "coverage-7.15.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cea1b3e19d710f67e2ba9ce0b0b51032c2a9b4808a65ced48ddf336ef7e58058"}, - {file = "coverage-7.15.3-cp310-cp310-win32.whl", hash = "sha256:25c77560309f157e7b7ee8fe0bf78d047ba900b7ae42f0e50e559305b366fea2"}, - {file = "coverage-7.15.3-cp310-cp310-win_amd64.whl", hash = "sha256:179fbf847e6c3d90ea71bfd570fe57f1ddb1c51474754894871c1e11099efaa0"}, - {file = "coverage-7.15.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5f3f854ab4599d98f7799ac9b91e34e8ec9ebc9a6372ee8c1f3413a68cc8b5e9"}, - {file = "coverage-7.15.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75268348fee1f199653b8a846262aec5581c6bb008c4f58824959fb708cc688f"}, - {file = "coverage-7.15.3-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:21081739f6264cc594cad2d42b62befbd17633824022866c68720eb0c4b8d6b4"}, - {file = "coverage-7.15.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:718d366251b060c10731c7dd359de6caea72250036eb94576aa56dacbf830a11"}, - {file = "coverage-7.15.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fa1bbaa502a6e877f3ee67cbac3eba2bb637f623e454e6c37b81b38896dbd48f"}, - {file = "coverage-7.15.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:494880c9e60782610683f4eb9b65cce4f886673596b8f3cb2dfa079fc551c743"}, - {file = "coverage-7.15.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3db264ea689f9e8f9fa4fb9005fee4048c3bff4a547f4cfa27f5086cb0804ec0"}, - {file = "coverage-7.15.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4e869d4799674d67778e76ddbe2e26cf1673369262e231a8ec259421b1015fea"}, - {file = "coverage-7.15.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:696fc7a28bbf717aba8d2c6963d26702945c7832cb313ba3b323aa5b1afb3156"}, - {file = "coverage-7.15.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:3fe9be1c527497d047f770d88a0110189714c36383bb88384508f750c302bffa"}, - {file = "coverage-7.15.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2400591f4b2e33746c70846388f8bb4c7e33b820e31cb8c6cb2f25305310438b"}, - {file = "coverage-7.15.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:2e557178799282269412a672e5753f2179edfe1b3f0f19b0c98f8e72d482326a"}, - {file = "coverage-7.15.3-cp311-cp311-win32.whl", hash = "sha256:68ea6c947375982ae907e19e9d2ef156bd6e68e11f3566dd568d7f4ec974e715"}, - {file = "coverage-7.15.3-cp311-cp311-win_amd64.whl", hash = "sha256:28743dad31622e8c474b17446118037361f5b1f4f2ecdf72d4f6fde246d64446"}, - {file = "coverage-7.15.3-cp311-cp311-win_arm64.whl", hash = "sha256:c4398918c4fda32718191239e451fd86ac5ad1e8979b592f1921ee2d1f038965"}, - {file = "coverage-7.15.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:79a3e32e83227d83d9684459ed579769b56c369ac2d7313099b2d9e031d2e10f"}, - {file = "coverage-7.15.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:767feb87c5886d781d0a69fafd450a20826ddab7b79bce1665deb64d21441b60"}, - {file = "coverage-7.15.3-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:50951e37033c40548d777b8a8454a2cd622dba1136780065678dccaec307c47f"}, - {file = "coverage-7.15.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:63a4ff67364afb2cac826b8bbd78a5c50ce656a7b7137436b44d7b96a9271088"}, - {file = "coverage-7.15.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e95e42856509675fe26560310313a6117640e96f9a1e19bb3d220116a27c94c"}, - {file = "coverage-7.15.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:abad631cba27094b4631993f4c72e89ac0ca1b3a0236c7abaf8ca79aea619851"}, - {file = "coverage-7.15.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2b0807f1f051dd82a234ad6acdb6f1425baede60be1e84e862496c8cc9262ab9"}, - {file = "coverage-7.15.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8d6df7aeb5bc464040bbc9ae173d875785d3677ebc4307817997d622d74225e"}, - {file = "coverage-7.15.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:974471c506c9f5758808b47c1ebf7949ecd0848f5c1020e78675fefe5ff46866"}, - {file = "coverage-7.15.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5cba0c9c13e35c86df7998f1afaf6b1da224a3a39e4da59bdabf60c148046dcb"}, - {file = "coverage-7.15.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:4d608dc36a364dce33acbf4fc3a50f9d2054c945f233bb0a2cdb4b90bfa17646"}, - {file = "coverage-7.15.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2395869280554a1941da904423c12660c39f721315e1c02d076a7fe0971382f0"}, - {file = "coverage-7.15.3-cp312-cp312-win32.whl", hash = "sha256:24f3b21840c3eb76cef3cc70b2bf6649010c64471a84a446538a39306e1ba04d"}, - {file = "coverage-7.15.3-cp312-cp312-win_amd64.whl", hash = "sha256:fa7b17902c3c1dd8a7adb52679b7f6340bba08443d710c8838e04db8cf62be2a"}, - {file = "coverage-7.15.3-cp312-cp312-win_arm64.whl", hash = "sha256:fcbe83fb7258eacd293bf5322d88807acb35ed12a5cfa99dd8215c083e3b0235"}, - {file = "coverage-7.15.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1182eed05674c63d40951fae27c43e822749f04d25f75df64c2e4fa3168678de"}, - {file = "coverage-7.15.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c0c4b0d7c4cd56e470d0c9d8441f42e8a96cdfd95050fec027f1d4dd9f11006c"}, - {file = "coverage-7.15.3-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5c9fce9f4998b0d50a753da765b9215a14decc7863822c89d72da7a89ca625b3"}, - {file = "coverage-7.15.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7a47e2a0a0ace9241e70ee00e44520f88b843094603dd54303f1bafecd929c30"}, - {file = "coverage-7.15.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:95bad94f83807ae60ed76f3ac012f69b2605ac9ea81bee959a5a483f7fa09c10"}, - {file = "coverage-7.15.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:228e172a76c428bb17d1ab78a2ff188990b0597e5dbd291f52a4edf7412de049"}, - {file = "coverage-7.15.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cea9fb33887c99349996266f1fd60abe5af3577a90633392001d27ef46b4b66e"}, - {file = "coverage-7.15.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:81760de3155d7f52c21860c4046628dc6bed182f72e3c028e2b4fd46f65aa040"}, - {file = "coverage-7.15.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b47ea0a1d3a3d089826c6cbfad8429d7d8872e28e86baa95ddef330f6875da21"}, - {file = "coverage-7.15.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5459ba486b2a5d58a6c05254779ecdf525e7f20174d0210ceda75ba40fdb8f2c"}, - {file = "coverage-7.15.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c59209f80a08dbfcdd5109a80dc623cd3b9d22895c85757d34f57a6e6e95570f"}, - {file = "coverage-7.15.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f863856c1779d4a5bb6a94698a2f9073e09c6706501f76f3e7780e72df97d21c"}, - {file = "coverage-7.15.3-cp313-cp313-win32.whl", hash = "sha256:00cbdc5e322927dc30c5e42b863819b1bb867cc66f26ab5372c585850876ab93"}, - {file = "coverage-7.15.3-cp313-cp313-win_amd64.whl", hash = "sha256:835528518a1d823cf336740324b2f335f7c01e609e74abcb5d5163b3e66661e3"}, - {file = "coverage-7.15.3-cp313-cp313-win_arm64.whl", hash = "sha256:0d2e1f2cbbf36b842f3e2aff8d118c60d677adb498bc6c7fa9c6838738f82767"}, - {file = "coverage-7.15.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:1e3bb08ad574bd9fb6a991f645728f70d333c1c1958dd5fcde65e24cb862813d"}, - {file = "coverage-7.15.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9e5860eaff02a0b7f1b73304bdf846596ee62ab3a78d25c68044ebf684cb1fef"}, - {file = "coverage-7.15.3-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:60874e5bd67f0b1bdbe42ab42c7bafa66a6fb8de88721af6df3f7a02713960cd"}, - {file = "coverage-7.15.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f9147be876e9d83765e0b82176674dc248a6b9283e25e01e7462611b97e9b731"}, - {file = "coverage-7.15.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:61a01f8c3804760fcc5a3d31c4f3cab792d660d44e17bf7adeaf0ea51e07821e"}, - {file = "coverage-7.15.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:95bf3e7f26f792e25eb185f85a5a659d48479265176dcfe22b6f334fd0081b5c"}, - {file = "coverage-7.15.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:44c41eff9e413fed8740eca75d5438ebeb9d3e45e7cd37c67329213e7a72c764"}, - {file = "coverage-7.15.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:54146bafb61f3ba9895b43af0dd17eba01561d586d44ce84ea221b0cbbee5a9e"}, - {file = "coverage-7.15.3-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:af000dd1bb859ff8066fda4c79512ff938c798116540307226b373099c7b151f"}, - {file = "coverage-7.15.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:a1b82490577f3889950b5a04f18712aef0207243e0749d60fe28c3c73ebfd5fd"}, - {file = "coverage-7.15.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:c4fc90a60154c3e4b8a2dc206d6dbe852f1c235c249e0dc0cef909d032c9591a"}, - {file = "coverage-7.15.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f25bb884814a892948b4c20394db3f2364dd452d9492736479e7a493e63b0eb6"}, - {file = "coverage-7.15.3-cp314-cp314-win32.whl", hash = "sha256:722dbf8e7828fbcfe0dc8586167dc0a5ce85ad6ea171dbb21ed3f8d6581d3cb8"}, - {file = "coverage-7.15.3-cp314-cp314-win_amd64.whl", hash = "sha256:64d0845f9c3ed47302bed265c15ab4dbb64aa4ec1490839b8e328f4e7fa914d2"}, - {file = "coverage-7.15.3-cp314-cp314-win_arm64.whl", hash = "sha256:69bc14684f8fbbee9f9dbaa4fe79719b0da9725fc37956785c06ec365acf6926"}, - {file = "coverage-7.15.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:f92df943c24b96cb215ca26b4f6a2283e63c5db80f1635aceea7fff11311917b"}, - {file = "coverage-7.15.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:66591c46bdd2971d3ae2bc503a5f0459c2edcaf6b7e045b292000cc95bc6cb95"}, - {file = "coverage-7.15.3-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:caa64458b81b18bfc67cdf1f6dc02b23e3edc672f2f8e11771fad75865415a43"}, - {file = "coverage-7.15.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:447f5421ccf5475956cf516d4ca1d575f487947b6f4e11f9d80c6aefe24b3dc8"}, - {file = "coverage-7.15.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a0c77ef8cd483a4987a5d12d1d9d5f7ee598dfdc6c0844417d847e5768dc779"}, - {file = "coverage-7.15.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0b273f4ff657446a06c2d85bf80e134fa869a92852ba5f87854a70e1fb44da77"}, - {file = "coverage-7.15.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:daea8c4fafa22488600405be2c2be525a9406fba3fc0a83acc726db3e14e2005"}, - {file = "coverage-7.15.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:93ff57c530f3fa7aa69f92fb9b8892b8aa82712aa970842f4abf28657f42fb57"}, - {file = "coverage-7.15.3-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:4df21bef8b800eebda9018f53d49c9ace3aeb0090c850139b27923aafcb83e91"}, - {file = "coverage-7.15.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:db567b02685f26034adcbd85055f80d12cdf02111b8ed00886093d98b2874ce2"}, - {file = "coverage-7.15.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:5318dd51b8600b947e058cf5a4fe54d183d9d13c49b97b64ca7be05a34df9bef"}, - {file = "coverage-7.15.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c995bfa383c54704839b6c4c2627a1c00895597ada0e5e8190c81d8bd620555c"}, - {file = "coverage-7.15.3-cp314-cp314t-win32.whl", hash = "sha256:6433fafb8da0e1d02eb53411e0ecdadb6b88f0224fdc23317e703c0e88937d42"}, - {file = "coverage-7.15.3-cp314-cp314t-win_amd64.whl", hash = "sha256:fe578952b1b29fe8c777f43f241d49efac4b56724a3434f5d22ebe3c208df429"}, - {file = "coverage-7.15.3-cp314-cp314t-win_arm64.whl", hash = "sha256:d2e1acb7aee29dfa8f3e48c23f36670898baca1209d9bdd3985a50c7f982165e"}, - {file = "coverage-7.15.3-py3-none-any.whl", hash = "sha256:da78fa6fc7dafe4212839173133ee85afcf42c5cd5f3e47fa7c1c210453b445e"}, - {file = "coverage-7.15.3.tar.gz", hash = "sha256:ae7ea5a4614acf399ef0483c4cb34f8f8f01df848d8fcbe7d3ce0865733f1c4d"}, + {file = "coverage-7.15.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d0be6daac4cce6b8c8dc65886bae1b082ddbca4da8e5cbb5e15166acf253e264"}, + {file = "coverage-7.15.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b24e078eabcd6a9caa8b0713f9bc1eeb310bcc960a29d45a3b4fcd4b16d5b11d"}, + {file = "coverage-7.15.4-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cfe20cc8cf8821d4fe54f89106cbf06aa27f37b5bbe3535568065a81539b4150"}, + {file = "coverage-7.15.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:83cf06cdd687677742caff1a9134833b7a8b75f111519d2cb0e0ba1b9a851e15"}, + {file = "coverage-7.15.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8fa4de68e2a752468ff14b4e15db7def689a71be759e826a31ccecbef69c5fd0"}, + {file = "coverage-7.15.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4dff9daa47d83120c3ec38ce921214242944a832aa04e903e50b5b7ebac8972d"}, + {file = "coverage-7.15.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a093fd37229918976f602aa07aa59e0973cde82186f220c8e197f721f5be0ce4"}, + {file = "coverage-7.15.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:317db01a2cb02552fd67e2b1cca77a4b528a2a277176c5e0bf2cecbb639d3f54"}, + {file = "coverage-7.15.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:8ee3838dcb656602c3b51e16aed9bfb0822f8d8d6d1c5966d32ec8c104be8e20"}, + {file = "coverage-7.15.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:425920379052ff1fe465268f3361d35804a241bbdd5a1b592c8cb60df4c52325"}, + {file = "coverage-7.15.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:69bb2400abef928e365ea7d4d9925169ada78ed2295546780002d4b65de3df88"}, + {file = "coverage-7.15.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:81661f82d302484e3119e7c80c519c02fa9bcc2a6b339baf67d67bc89c580f04"}, + {file = "coverage-7.15.4-cp310-cp310-win32.whl", hash = "sha256:cb476b2e828ecb71cb6b6a928d23fd20a7ddb501188022dae1c37499149cc338"}, + {file = "coverage-7.15.4-cp310-cp310-win_amd64.whl", hash = "sha256:3fc2130bf37df31852a8384f12601563a45a0024bccc6624f38355cba7a8d360"}, + {file = "coverage-7.15.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bbac5abad70df71019988f83f26ac7092ff2642975def4429e98dc7585ef3490"}, + {file = "coverage-7.15.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:357a173465c7ce028d07a95cc2b63b5bf59f50ecdd5ad75c5cbb78ada984048e"}, + {file = "coverage-7.15.4-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:21b803935e2efc3acebe9697197a294fccf5dc4e5382bd6369542ff7a7d2a1d7"}, + {file = "coverage-7.15.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7a2b580774a4786c1053157c0165e04476e03ff293993d7c148eee784a94bae6"}, + {file = "coverage-7.15.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a9464451c4efffe8d47ace5a540b10b0dc10e879066290f8600872b7f54a419d"}, + {file = "coverage-7.15.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:de602f34123c2f4af1c1869c6dbbbd60da6d5983bf01937367295d135cccbfce"}, + {file = "coverage-7.15.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6879ded16a27f3eeca19b900c147e81616e7054db451471a611b2755ee5249f7"}, + {file = "coverage-7.15.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:986be58c3ab54aae8d3496a6225eea74f760fdbe739b38bd442c7e8d133aa53b"}, + {file = "coverage-7.15.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:c6103639613fe6c1e989082948419bc77a2d26b6c825c99d7fad25f7d3d87afc"}, + {file = "coverage-7.15.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d3af93dddb5659276c63bc16ac6466ac2033a70ca816097bbc06345b8ccdf571"}, + {file = "coverage-7.15.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:b10075e5421d04265766a6d1dac809bbeb8a946fbb23c8f82c227409b2190719"}, + {file = "coverage-7.15.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a67a9f78b2942d87ba8ce3059c642164d2aedd65337377fb52fe9803656bc5c7"}, + {file = "coverage-7.15.4-cp311-cp311-win32.whl", hash = "sha256:69484d1aca26e322e1c3ce03f09341e84524ababad2d7202161738d83cc9f82e"}, + {file = "coverage-7.15.4-cp311-cp311-win_amd64.whl", hash = "sha256:63fd6fcd1dd6e158f7eb78606e72933b3f6d01e7b747f99c6c12d764307a0fdc"}, + {file = "coverage-7.15.4-cp311-cp311-win_arm64.whl", hash = "sha256:ea82116c9893fa89e929b7f197ee5a1950a76e91cc5c85ba503fc02379d04890"}, + {file = "coverage-7.15.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d4fedd1f7f428f9fe83b1ead5e7cc87a43427be31aadafbac3ac0636dc7abb22"}, + {file = "coverage-7.15.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:37e2f0cdf58e2e1fed4e4d5a8f8786ae2f7eb80b478016876667dc4a01d60a97"}, + {file = "coverage-7.15.4-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:fb55d0e70bb15f2e81477613627286581414693d74ac7963c93a790dd453ca9d"}, + {file = "coverage-7.15.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:899b9da30f3c6c336566e3707495bb23e8302d39d862f01fa78c48b99b9437e2"}, + {file = "coverage-7.15.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d15715e8c46552827e5e4f30a35575a2dbcad14454cf3284c54483946bd16931"}, + {file = "coverage-7.15.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:002a438859f7b430bc99afeaf01a6d187dad1d0dc907b64cdeffc632a5db8fd8"}, + {file = "coverage-7.15.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e4193a04b518f7968f3099755f5509ee7cccc6dc2b92a6b14841934d22e222c9"}, + {file = "coverage-7.15.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e98dcc55d572b38e69d117da7e8e8efb8500f1f5eaf81ecd460a63220790b839"}, + {file = "coverage-7.15.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:af6c538498ce66c10d3fd541c2a8d5b03da5850355add34e6cba564210cb9e72"}, + {file = "coverage-7.15.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1d10025d96ea89fc2f73714dbc4cbd433fe012c1ac9e23f895d7728b238b6e52"}, + {file = "coverage-7.15.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d802e1947603162ded419bff83ac7489820355d2b856dfb09206574e3a37ac0c"}, + {file = "coverage-7.15.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c2de40895718f91951b86712b4c5b694acaf9a0a49be13874896f599a1eed3f4"}, + {file = "coverage-7.15.4-cp312-cp312-win32.whl", hash = "sha256:5c3431b2161279b7db5c2a1aa58ae02e5cb8c3c42d93a5094be3f5537bd5b11b"}, + {file = "coverage-7.15.4-cp312-cp312-win_amd64.whl", hash = "sha256:6befeab5fb2b51c958ca4ac6c5d141a1e8240f4f76e46350f1911963deda49cd"}, + {file = "coverage-7.15.4-cp312-cp312-win_arm64.whl", hash = "sha256:67bc345491ab55b837277d76f5775d057e8c7f1ac44d890d8c2c82adde258c6f"}, + {file = "coverage-7.15.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c705b28feb2775dc82a25f1d473a370bc37ff93f5177f4e29ce2425f560f6921"}, + {file = "coverage-7.15.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3ff205ab5e3ecc670f6a4dd19d9cbf12ede53dd41cfc1e15716ec961ea6d314e"}, + {file = "coverage-7.15.4-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5172326e861a38b48b48befca15e0f477a26b283337a33a739c8fed229934e36"}, + {file = "coverage-7.15.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:12b59c90084e3234fb11184886bf4a40f4f16a8c8f867be2e087b81f8e8868d4"}, + {file = "coverage-7.15.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:349062d66f00b40fa2c1c222438bad25fabf755631b5d82937fe985c8008615c"}, + {file = "coverage-7.15.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4256ced708e598e05209bc1a8ab4074e04a51dba4c62fb45926a229af675ace7"}, + {file = "coverage-7.15.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d80f974b20782d9612c8b4c9beeca867074c7cf4079d1419843fa25a26428b25"}, + {file = "coverage-7.15.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2e179f19bfe1d31f8eeeaa12990194d761c4f62f0759661000bca6cd8729f40b"}, + {file = "coverage-7.15.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:8bc16bb47b7679670eceff71d78bfb7d6e5b143f6c2cd117487ec7c75e0d4b78"}, + {file = "coverage-7.15.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1cd685005cd2c4200adfc14cf39a603b9320efab3f18a8f7f156d20c9cc3345f"}, + {file = "coverage-7.15.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:337399ad2c93b3acd2a937627dae8b3e86b66707cd3d3e856347999aadf1ef8d"}, + {file = "coverage-7.15.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:96e257121228ec5cd2bb919276e94ac11074471bc37d68dbae0e8308cce15fff"}, + {file = "coverage-7.15.4-cp313-cp313-win32.whl", hash = "sha256:c65a9e0dfc6143491879da4e13b5e30f8be192055de508d737fb14601edbd22c"}, + {file = "coverage-7.15.4-cp313-cp313-win_amd64.whl", hash = "sha256:2ff8f5e9b8f7a94f0c11c45631eee103dbcb7d63274edd12c56efe1be690b3b4"}, + {file = "coverage-7.15.4-cp313-cp313-win_arm64.whl", hash = "sha256:6e0a8a5083b096487d6cfced94cdd514d8f5db6f113610fb36c0620edb1028cf"}, + {file = "coverage-7.15.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:770e9325ab5ea6d56f77e59b29ecfe0ac20b57a82a601876f90494a4dda0386f"}, + {file = "coverage-7.15.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d12b33a3a50a1676b7784dc8d00a0c6d66a9f2add4b85a041c19b6a7e53ef23c"}, + {file = "coverage-7.15.4-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5669c8378ebde86f5def7a25d29586631b58acc27ffde04399f678f3dfc6e082"}, + {file = "coverage-7.15.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:ff97a14362eef486483ed44042ca2027ea257df6ff768e62358ee0c9776925ac"}, + {file = "coverage-7.15.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5a325e815318638aed1655d9c06e6d7c2d3d46c09231ce988070428a8762d734"}, + {file = "coverage-7.15.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:474223409d88eb20d2d6a0d37ea60e8647a65a90cc008dc1f0410af5f64f1e0d"}, + {file = "coverage-7.15.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7f2f62ae3cd189dd2e13aece758c57b3eecbd27be070dbd4cbd10936049e5dbf"}, + {file = "coverage-7.15.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:39ece820e29e0a2ba34b3ecb3be83c27e997eed8926f2ba6fe7ce7a0bda5843b"}, + {file = "coverage-7.15.4-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:f21b56dcace11dfe013014201f577dcd592b2a9b72182d930361b47cf6f73f25"}, + {file = "coverage-7.15.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:93a3a0b662abcc10c73a47cbc72cd60f63618d6989fb2d1286e50eacd974f303"}, + {file = "coverage-7.15.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:141fae2cabf5569b782c10afc4c850ce10f618c13f8db54765cba99cc839da1f"}, + {file = "coverage-7.15.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:81294c7e6ab30c5f74c0353b11b2fd6320e72d9bee6ac73b357caa8b916323a5"}, + {file = "coverage-7.15.4-cp314-cp314-win32.whl", hash = "sha256:7bbd7d6418e0dab31a206af5203bd43ae36edb8e7fba1940b055d3e9249290d7"}, + {file = "coverage-7.15.4-cp314-cp314-win_amd64.whl", hash = "sha256:f0204ed122758782970526057093f448051a39db9d810d4e344bb87a3546f425"}, + {file = "coverage-7.15.4-cp314-cp314-win_arm64.whl", hash = "sha256:9e71e7bc71c686a123347ae47a0de33a175e797a85bb57b791492adf4eec8ed8"}, + {file = "coverage-7.15.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7c922735321eef3f87c280a3d39afff6b646723a2880b862cda4ac7a093b8aa8"}, + {file = "coverage-7.15.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f41c17c4668a655ce96d090d8d5ffdc24ef64b5a02f9753884d08483e8a4a41a"}, + {file = "coverage-7.15.4-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:46822e9b6ff1c6a72b518c162c44a8f45a61a1d609c51084bf5b16c023c5037b"}, + {file = "coverage-7.15.4-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3d6f4955b73b5445271379a59e3792b0d978f42d4a01e0cf7a67d9c33a3bb0a5"}, + {file = "coverage-7.15.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3fc9e047706fb4a9abb54f719d3aa643e80e5bb3818182c40aee01ac0f0247ba"}, + {file = "coverage-7.15.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:05e491d4f3165d62d4f5c8fd48dfeabf2ae8f42cbbd484319af33ea851b78982"}, + {file = "coverage-7.15.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:226c66e80ec0598d3b9b4874123df167ccca342aca8714f77cac6829688ee09c"}, + {file = "coverage-7.15.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ac41cc14bebda0dbfb0628036b7f75706935c95bcc07fefe9a0f93614aa60a57"}, + {file = "coverage-7.15.4-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:8af623e5cd92080acddd02b38f2f406a2c3a0893c38950b211890361448fbf26"}, + {file = "coverage-7.15.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:07545711d4f0f32852a18f18ad11f76f0109909d09e78b9008b4cfc67e829429"}, + {file = "coverage-7.15.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:a0865421cfdc53654b342d515e5a233187590882d20b95752150e53f65460017"}, + {file = "coverage-7.15.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:460115e32ee40566476db5048f9bec1e842c127ad8e6f8be745aad3ac9cbc839"}, + {file = "coverage-7.15.4-cp314-cp314t-win32.whl", hash = "sha256:cbde877ef9dd7baf272b9bfef2b8a25edd45d9170fc326951dd20eb480335e85"}, + {file = "coverage-7.15.4-cp314-cp314t-win_amd64.whl", hash = "sha256:3da9e92d1c551fd7563833e9ade686efb0c4b7363ab7681a94283958c950bf5e"}, + {file = "coverage-7.15.4-cp314-cp314t-win_arm64.whl", hash = "sha256:3a54f5a0d85050c73a38f6793090ee83974531e67fe5e57a1da9bee11398aa5e"}, + {file = "coverage-7.15.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:2c9872e4d9dc5d3cf616bf4b382f5a00359305a5be666a3dd0b5cdb4e49597f9"}, + {file = "coverage-7.15.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:e101dbb4b9b72f0cddd8cdc8c9c5b47f456766f5e0ac82dbfb75e5c55409b78a"}, + {file = "coverage-7.15.4-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7d1abebdb047729e852b9c77a00497dfbeb11eb3a117e037d7dbc3ac8e5f5c54"}, + {file = "coverage-7.15.4-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d28a4a899354d0ea6214cc59b4fa19eefbce1b9ff1688ab579acf49e894bd3fb"}, + {file = "coverage-7.15.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ffb3c2aacea411cc7e1d27712490c11108e2de1d39019ae32915493a59a8b9ed"}, + {file = "coverage-7.15.4-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9447978a92f405d301123cfd39ff49895490efb769a758fe2734c7f631bf8ce"}, + {file = "coverage-7.15.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:050467a7983b8e2fe7dd41a78bb30c3e7f8c0b8cafda14b1c46f8b5e3cf2dd3c"}, + {file = "coverage-7.15.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:d003b7a5708ddad5c206c79607a6b92abb6fc13c57d99d8a4468cc03a2941ced"}, + {file = "coverage-7.15.4-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:c38efe30fd74e5c19e9433f11fb1f5dc9c6522770971b7c6145bbaa413dc8800"}, + {file = "coverage-7.15.4-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:1f4f826d70f772ab8b0c052329580d7fe8b8abd191e4ce0c8f81aec6614665d3"}, + {file = "coverage-7.15.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:4a4bf917c9953f57c957be31c1cd504e3bd2f34d4a352b9d391a3025336f6768"}, + {file = "coverage-7.15.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:1c9bf40ebef178a45192c75c4964760bb261b0e6ad725da5fc4c93f674f19753"}, + {file = "coverage-7.15.4-cp315-cp315-win32.whl", hash = "sha256:43619d04c3671792d2c4706ae8bf45e265dc87bbd4078189ef8b847ea1e74be2"}, + {file = "coverage-7.15.4-cp315-cp315-win_amd64.whl", hash = "sha256:be619439dbcd31a2eab10b32de9fff62c26ed4bab69dc32b8363fdaaa0882809"}, + {file = "coverage-7.15.4-cp315-cp315-win_arm64.whl", hash = "sha256:def597967dafc2e8d97c9097ea453c464e0bb8ed38f193a43070f10dc623bb6d"}, + {file = "coverage-7.15.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c7dbc748ac8a1e3e59a2b28bea47675e6e778081dbbf081bde0d75def2fcbe1d"}, + {file = "coverage-7.15.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:2413074a5ecbb61a01a7888fc72db0ca324d13588c5b38bc0dd8564cdcdfea26"}, + {file = "coverage-7.15.4-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4e6f6f632b7b2f714bf7a1346e8f97b650ee71f3c298aaad42a2ab60f0f07645"}, + {file = "coverage-7.15.4-cp315-cp315t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8df457da2249d3c75ca2e5e835d59c725abfe92d27fdff6cd99eed85b51d5e9a"}, + {file = "coverage-7.15.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:050f66a08805acb5b8a23c6d4a517b1ecf82c08e81ed0e4bd727df065e5c6624"}, + {file = "coverage-7.15.4-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1587fb771d1ccceef708fdde1e5af8c7ed24b486b61d13a321acb7d8145390aa"}, + {file = "coverage-7.15.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8b4f1c3a69ca580f3fbd6b2046915f536d7f586874f25c1bb23add2a3c88d50f"}, + {file = "coverage-7.15.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:ffb58d7eff5b7f6ecc6fa21d6288ab7f968a212cb67d682c269c09b9eba3b66f"}, + {file = "coverage-7.15.4-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:d9df165544774574ee004b953023d1bebada1894a80b1052a43d798b0f676e67"}, + {file = "coverage-7.15.4-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:f9de0a24a4079b53e523b5c5e2c5945ec251ab486652659955187cf255a259bc"}, + {file = "coverage-7.15.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:150089274bdc9f940628552cb92844e0223c987f1902ab8efe9f45a2ec758d88"}, + {file = "coverage-7.15.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:a58a94fed5da6997d258e8f7668c1e195fbd04a691d781b7558f1e468f9e68bc"}, + {file = "coverage-7.15.4-cp315-cp315t-win32.whl", hash = "sha256:ebd5a6d8466ff30836572f3ba2cae8a5e8f85029b1c6d5e2ed338dc472a5166a"}, + {file = "coverage-7.15.4-cp315-cp315t-win_amd64.whl", hash = "sha256:288bde2a2d7ab6b6c2d7252fcde8b524387f2d970bdba9658fc6f8bbcaef0f9b"}, + {file = "coverage-7.15.4-cp315-cp315t-win_arm64.whl", hash = "sha256:68be5e1de60ff13c9095bbec0e5a7fa45b33b101752215b91345ea1f61c4a278"}, + {file = "coverage-7.15.4-py3-none-any.whl", hash = "sha256:964730a1e9de9c0cf11be6a1a3c79ce419c34882842abd256086ba4698705e84"}, + {file = "coverage-7.15.4.tar.gz", hash = "sha256:0548198fff07ccf4faf469520bce1c2eceb1ce3e62891921138dec10907f9d00"}, ] [package.dependencies] @@ -733,18 +842,18 @@ httpx = ">=0.27.0" [[package]] name = "idna" -version = "3.18" +version = "3.19" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2"}, - {file = "idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848"}, + {file = "idna-3.19-py3-none-any.whl", hash = "sha256:815e7be7a7806d54abb586dc943addc79e8b2ee16915059658cbeff4b1b43bf4"}, + {file = "idna-3.19.tar.gz", hash = "sha256:5e0811a4383b21dc5838069f801c4fb62113b7447663d2530d2bd6e77b49bf15"}, ] [package.extras] -all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +all = ["coverage (>=7.10.0)", "hypothesis (>=6.141.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.16.0)", "ty (>=0.0.37)"] [[package]] name = "iniconfig" @@ -1301,14 +1410,14 @@ typing-extensions = ">=4.14.1" [[package]] name = "pygments" -version = "2.20.0" +version = "2.21.0" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176"}, - {file = "pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f"}, + {file = "pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9"}, + {file = "pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c"}, ] [package.extras] @@ -1591,14 +1700,14 @@ files = [ [[package]] name = "typing-inspection" -version = "0.4.3" +version = "0.4.4" description = "Runtime typing introspection tools" optional = false python-versions = ">=3.10" groups = ["main"] files = [ - {file = "typing_inspection-0.4.3-py3-none-any.whl", hash = "sha256:5f42b23858a91e0b4ef521f5418f03a0da3c9216fd2995ef5e73463100e676cd"}, - {file = "typing_inspection-0.4.3.tar.gz", hash = "sha256:c5f9ec1530b5c1e2c9bc34a84d9a3466ed1b2f3f2fa9f901368d9c5596210e4d"}, + {file = "typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147"}, + {file = "typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 5acb48e5..5ad8c863 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,14 +50,14 @@ websockets = ">=12.0" mypy = "==1.13.0" pytest = "^9.0.3" pytest-asyncio = "^1.0.0" -pytest-cov = "^7.0.0" pytest-xdist = "^3.6.1" python-dateutil = "^2.9.0" -respx = ">=0.22.0,<1.0.0" types-python-dateutil = "^2.9.0.20240316" urllib3 = ">=2.6.3,<3.0.0" requests = "^2.33.0" types-requests = "^2.33.0" +pytest-cov = "^7.0.0" +respx = ">=0.22.0,<1.0.0" ruff = "==0.11.5" [tool.pytest.ini_options] diff --git a/src/deepgram/__init__.py b/src/deepgram/__init__.py index 52de45c1..be1a85ec 100644 --- a/src/deepgram/__init__.py +++ b/src/deepgram/__init__.py @@ -6,12 +6,6 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import ( - GoogleThinkProviderVersion, - ListenV2Redact, - SpeakV2Expressivity, - SpeakV2Speed, - ) from .types import ( AgentConfigurationV1, AgentThinkModelsV1Response, @@ -26,7 +20,7 @@ AgentThinkModelsV1ResponseModelsItemZeroId, AgentVariableV1, Anthropic, - AnthropicThinkProviderModel, + AnthropicModel, AwsBedrockThinkProvider, AwsBedrockThinkProviderCredentials, AwsBedrockThinkProviderCredentialsType, @@ -41,11 +35,10 @@ BillingBreakdownV1ResponseResultsItem, BillingBreakdownV1ResponseResultsItemGrouping, Cartesia, - CartesiaSpeakProviderModelId, - CartesiaSpeakProviderVoice, + CartesiaModelId, + CartesiaVoice, CreateAgentConfigurationV1Response, CreateKeyV1Request, - CreateKeyV1RequestOne, CreateKeyV1Response, CreateProjectDistributionCredentialsV1Response, CreateProjectDistributionCredentialsV1ResponseDistributionCredentials, @@ -54,8 +47,7 @@ Deepgram, DeepgramListenProviderV1, DeepgramListenProviderV2, - DeepgramListenProviderV2LanguageHint, - DeepgramSpeakProviderModel, + DeepgramModel, DeleteAgentConfigurationV1Response, DeleteAgentVariableV1Response, DeleteProjectInviteV1Response, @@ -83,10 +75,11 @@ GetProjectRequestV1Response, GetProjectV1Response, Google, - GoogleThinkProviderModel, + GoogleModel, + GoogleVersion, GrantV1Response, Groq, - GroqThinkProviderReasoningMode, + GroqReasoningMode, LeaveProjectV1Response, ListAgentConfigurationsV1Response, ListAgentVariablesV1Response, @@ -141,6 +134,7 @@ ListenV1RequestFile, ListenV1Response, ListenV1ResponseMetadata, + ListenV1ResponseMetadataDiarizeInfo, ListenV1ResponseMetadataIntentsInfo, ListenV1ResponseMetadataSentimentInfo, ListenV1ResponseMetadataSummaryInfo, @@ -179,6 +173,7 @@ ListenV2Model, ListenV2Numerals, ListenV2ProfanityFilter, + ListenV2Redact, ListenV2SampleRate, ListenV2Tag, OpenAiSpeakProvider, @@ -231,10 +226,13 @@ SpeakV1Speed, SpeakV2AcceptedResponse, SpeakV2Encoding, + SpeakV2Expressivity, SpeakV2MipOptOut, SpeakV2Model, SpeakV2Response, SpeakV2SampleRate, + SpeakV2Speed, + SpeakV2SpeedValue, SpeakV2Tag, ThinkSettingsV1, ThinkSettingsV1ContextLength, @@ -283,7 +281,7 @@ BillingBreakdownV1ResponseResultsItemGroupingParams, BillingBreakdownV1ResponseResultsItemParams, CartesiaParams, - CartesiaSpeakProviderVoiceParams, + CartesiaVoiceParams, CreateAgentConfigurationV1ResponseParams, CreateKeyV1RequestParams, CreateKeyV1ResponseParams, @@ -292,7 +290,6 @@ CreateProjectDistributionCredentialsV1ResponseParams, CreateProjectInviteV1ResponseParams, DeepgramListenProviderV1Params, - DeepgramListenProviderV2LanguageHintParams, DeepgramListenProviderV2Params, DeepgramParams, DeleteProjectInviteV1ResponseParams, @@ -349,6 +346,7 @@ ListProjectsV1ResponseParams, ListProjectsV1ResponseProjectsItemParams, ListenV1AcceptedResponseParams, + ListenV1ResponseMetadataDiarizeInfoParams, ListenV1ResponseMetadataIntentsInfoParams, ListenV1ResponseMetadataParams, ListenV1ResponseMetadataSentimentInfoParams, @@ -436,11 +434,18 @@ UsageV1ResponseResolutionParams, ) from .version import __version__ + from .types import AnthropicThinkProviderModel + from .types import CartesiaSpeakProviderModelId + from .types import CartesiaSpeakProviderVoice + from .requests import CartesiaSpeakProviderVoiceParams + from .types import CreateKeyV1RequestOne + from .types import DeepgramListenProviderV2LanguageHint + from .requests import DeepgramListenProviderV2LanguageHintParams + from .types import DeepgramSpeakProviderModel + from .types import GoogleThinkProviderModel + from .types import GoogleThinkProviderVersion + from .types import GroqThinkProviderReasoningMode _dynamic_imports: typing.Dict[str, str] = { - "GoogleThinkProviderVersion": ".types", - "ListenV2Redact": ".types", - "SpeakV2Expressivity": ".types", - "SpeakV2Speed": ".types", "AgentConfigurationV1": ".types", "AgentConfigurationV1Params": ".requests", "AgentThinkModelsV1Response": ".types", @@ -463,6 +468,7 @@ "AgentVariableV1": ".types", "AgentVariableV1Params": ".requests", "Anthropic": ".types", + "AnthropicModel": ".types", "AnthropicParams": ".requests", "AnthropicThinkProviderModel": ".types", "AsyncDeepgramClient": ".client", @@ -489,10 +495,13 @@ "BillingBreakdownV1ResponseResultsItemGroupingParams": ".requests", "BillingBreakdownV1ResponseResultsItemParams": ".requests", "Cartesia": ".types", + "CartesiaModelId": ".types", "CartesiaParams": ".requests", "CartesiaSpeakProviderModelId": ".types", "CartesiaSpeakProviderVoice": ".types", "CartesiaSpeakProviderVoiceParams": ".requests", + "CartesiaVoice": ".types", + "CartesiaVoiceParams": ".requests", "CreateAgentConfigurationV1Response": ".types", "CreateAgentConfigurationV1ResponseParams": ".requests", "CreateKeyV1Request": ".types", @@ -517,6 +526,7 @@ "DeepgramListenProviderV2LanguageHint": ".types", "DeepgramListenProviderV2LanguageHintParams": ".requests", "DeepgramListenProviderV2Params": ".requests", + "DeepgramModel": ".types", "DeepgramParams": ".requests", "DeepgramSpeakProviderModel": ".types", "DefaultAioHttpClient": "._default_clients", @@ -570,12 +580,16 @@ "GetProjectV1Response": ".types", "GetProjectV1ResponseParams": ".requests", "Google": ".types", + "GoogleModel": ".types", "GoogleParams": ".requests", "GoogleThinkProviderModel": ".types", + "GoogleThinkProviderVersion": ".types", + "GoogleVersion": ".types", "GrantV1Response": ".types", "GrantV1ResponseParams": ".requests", "Groq": ".types", "GroqParams": ".requests", + "GroqReasoningMode": ".types", "GroqThinkProviderReasoningMode": ".types", "LeaveProjectV1Response": ".types", "LeaveProjectV1ResponseParams": ".requests", @@ -660,6 +674,8 @@ "ListenV1RequestFile": ".types", "ListenV1Response": ".types", "ListenV1ResponseMetadata": ".types", + "ListenV1ResponseMetadataDiarizeInfo": ".types", + "ListenV1ResponseMetadataDiarizeInfoParams": ".requests", "ListenV1ResponseMetadataIntentsInfo": ".types", "ListenV1ResponseMetadataIntentsInfoParams": ".requests", "ListenV1ResponseMetadataParams": ".requests", @@ -723,6 +739,7 @@ "ListenV2Model": ".types", "ListenV2Numerals": ".types", "ListenV2ProfanityFilter": ".types", + "ListenV2Redact": ".types", "ListenV2SampleRate": ".types", "ListenV2Tag": ".types", "OpenAiSpeakProvider": ".types", @@ -814,10 +831,13 @@ "SpeakV2AcceptedResponse": ".types", "SpeakV2AcceptedResponseParams": ".requests", "SpeakV2Encoding": ".types", + "SpeakV2Expressivity": ".types", "SpeakV2MipOptOut": ".types", "SpeakV2Model": ".types", "SpeakV2Response": ".types", "SpeakV2SampleRate": ".types", + "SpeakV2Speed": ".types", + "SpeakV2SpeedValue": ".types", "SpeakV2Tag": ".types", "ThinkSettingsV1": ".types", "ThinkSettingsV1ContextLength": ".types", @@ -895,10 +915,6 @@ def __dir__(): __all__ = [ - "GoogleThinkProviderVersion", - "ListenV2Redact", - "SpeakV2Expressivity", - "SpeakV2Speed", "AgentConfigurationV1", "AgentConfigurationV1Params", "AgentThinkModelsV1Response", @@ -921,6 +937,7 @@ def __dir__(): "AgentVariableV1", "AgentVariableV1Params", "Anthropic", + "AnthropicModel", "AnthropicParams", "AnthropicThinkProviderModel", "AsyncDeepgramClient", @@ -947,10 +964,13 @@ def __dir__(): "BillingBreakdownV1ResponseResultsItemGroupingParams", "BillingBreakdownV1ResponseResultsItemParams", "Cartesia", + "CartesiaModelId", "CartesiaParams", "CartesiaSpeakProviderModelId", "CartesiaSpeakProviderVoice", "CartesiaSpeakProviderVoiceParams", + "CartesiaVoice", + "CartesiaVoiceParams", "CreateAgentConfigurationV1Response", "CreateAgentConfigurationV1ResponseParams", "CreateKeyV1Request", @@ -975,6 +995,7 @@ def __dir__(): "DeepgramListenProviderV2LanguageHint", "DeepgramListenProviderV2LanguageHintParams", "DeepgramListenProviderV2Params", + "DeepgramModel", "DeepgramParams", "DeepgramSpeakProviderModel", "DefaultAioHttpClient", @@ -1028,12 +1049,16 @@ def __dir__(): "GetProjectV1Response", "GetProjectV1ResponseParams", "Google", + "GoogleModel", "GoogleParams", "GoogleThinkProviderModel", + "GoogleThinkProviderVersion", + "GoogleVersion", "GrantV1Response", "GrantV1ResponseParams", "Groq", "GroqParams", + "GroqReasoningMode", "GroqThinkProviderReasoningMode", "LeaveProjectV1Response", "LeaveProjectV1ResponseParams", @@ -1118,6 +1143,8 @@ def __dir__(): "ListenV1RequestFile", "ListenV1Response", "ListenV1ResponseMetadata", + "ListenV1ResponseMetadataDiarizeInfo", + "ListenV1ResponseMetadataDiarizeInfoParams", "ListenV1ResponseMetadataIntentsInfo", "ListenV1ResponseMetadataIntentsInfoParams", "ListenV1ResponseMetadataParams", @@ -1181,6 +1208,7 @@ def __dir__(): "ListenV2Model", "ListenV2Numerals", "ListenV2ProfanityFilter", + "ListenV2Redact", "ListenV2SampleRate", "ListenV2Tag", "OpenAiSpeakProvider", @@ -1272,10 +1300,13 @@ def __dir__(): "SpeakV2AcceptedResponse", "SpeakV2AcceptedResponseParams", "SpeakV2Encoding", + "SpeakV2Expressivity", "SpeakV2MipOptOut", "SpeakV2Model", "SpeakV2Response", "SpeakV2SampleRate", + "SpeakV2Speed", + "SpeakV2SpeedValue", "SpeakV2Tag", "ThinkSettingsV1", "ThinkSettingsV1ContextLength", diff --git a/src/deepgram/agent/__init__.py b/src/deepgram/agent/__init__.py index 554532fb..11be1460 100644 --- a/src/deepgram/agent/__init__.py +++ b/src/deepgram/agent/__init__.py @@ -6,14 +6,6 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .v1 import ( - AgentV1UpdateListenListenProvider, - AgentV1UpdateListenListenProviderParams, - AgentV1UpdateListenListenProvider_V1, - AgentV1UpdateListenListenProvider_V1Params, - AgentV1UpdateListenListenProvider_V2, - AgentV1UpdateListenListenProvider_V2Params, - ) from . import v1 from .v1 import ( AgentV1AgentAudioDone, @@ -32,13 +24,6 @@ AgentV1FunctionCallRequestFunctionsItemParams, AgentV1FunctionCallRequestParams, AgentV1History, - AgentV1HistoryContent, - AgentV1HistoryContentParams, - AgentV1HistoryContentRole, - AgentV1HistoryFunctionCalls, - AgentV1HistoryFunctionCallsFunctionCallsItem, - AgentV1HistoryFunctionCallsFunctionCallsItemParams, - AgentV1HistoryFunctionCallsParams, AgentV1HistoryParams, AgentV1InjectAgentMessage, AgentV1InjectAgentMessageBehavior, @@ -64,35 +49,17 @@ AgentV1SettingsAgentContext, AgentV1SettingsAgentContextContext, AgentV1SettingsAgentContextContextMessagesItem, - AgentV1SettingsAgentContextContextMessagesItemContentRole, - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, AgentV1SettingsAgentContextContextMessagesItemParams, AgentV1SettingsAgentContextContextParams, AgentV1SettingsAgentContextListen, AgentV1SettingsAgentContextListenParams, AgentV1SettingsAgentContextListenProvider, AgentV1SettingsAgentContextListenProviderParams, - AgentV1SettingsAgentContextListenProviderV1, - AgentV1SettingsAgentContextListenProviderV1Params, - AgentV1SettingsAgentContextListenProviderV2, - AgentV1SettingsAgentContextListenProviderV2LanguageHint, - AgentV1SettingsAgentContextListenProviderV2LanguageHintParams, - AgentV1SettingsAgentContextListenProviderV2Params, AgentV1SettingsAgentContextListenProvider_V1, AgentV1SettingsAgentContextListenProvider_V1Params, AgentV1SettingsAgentContextListenProvider_V2, AgentV1SettingsAgentContextListenProvider_V2Params, AgentV1SettingsAgentContextParams, - AgentV1SettingsAgentContextMessagesItem, - AgentV1SettingsAgentContextMessagesItemContent, - AgentV1SettingsAgentContextMessagesItemContentParams, - AgentV1SettingsAgentContextMessagesItemContentRole, - AgentV1SettingsAgentContextMessagesItemFunctionCalls, - AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem, - AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams, - AgentV1SettingsAgentContextMessagesItemFunctionCallsParams, - AgentV1SettingsAgentContextMessagesItemParams, AgentV1SettingsAgentContextSpeak, AgentV1SettingsAgentContextSpeakParams, AgentV1SettingsAgentContextThink, @@ -101,10 +68,6 @@ AgentV1SettingsAgentListenParams, AgentV1SettingsAgentListenProvider, AgentV1SettingsAgentListenProviderParams, - AgentV1SettingsAgentListenProviderV1, - AgentV1SettingsAgentListenProviderV1Params, - AgentV1SettingsAgentListenProviderV2, - AgentV1SettingsAgentListenProviderV2Params, AgentV1SettingsAgentListenProvider_V1, AgentV1SettingsAgentListenProvider_V1Params, AgentV1SettingsAgentListenProvider_V2, @@ -135,6 +98,12 @@ AgentV1UpdateListen, AgentV1UpdateListenListen, AgentV1UpdateListenListenParams, + AgentV1UpdateListenListenProvider, + AgentV1UpdateListenListenProviderParams, + AgentV1UpdateListenListenProvider_V1, + AgentV1UpdateListenListenProvider_V1Params, + AgentV1UpdateListenListenProvider_V2, + AgentV1UpdateListenListenProvider_V2Params, AgentV1UpdateListenParams, AgentV1UpdatePrompt, AgentV1UpdatePromptParams, @@ -154,16 +123,42 @@ AgentV1WelcomeParams, ConversationHistoryMessage, ConversationHistoryMessageParams, + ConversationHistoryMessageRole, FunctionCallHistoryMessage, + FunctionCallHistoryMessageFunctionCallsItem, + FunctionCallHistoryMessageFunctionCallsItemParams, FunctionCallHistoryMessageParams, ) + from .v1 import AgentV1HistoryContent + from .v1 import AgentV1HistoryContentParams + from .v1 import AgentV1HistoryContentRole + from .v1 import AgentV1HistoryFunctionCalls + from .v1 import AgentV1HistoryFunctionCallsFunctionCallsItem + from .v1 import AgentV1HistoryFunctionCallsFunctionCallsItemParams + from .v1 import AgentV1HistoryFunctionCallsParams + from .v1 import AgentV1SettingsAgentContextContextMessagesItemContentRole + from .v1 import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem + from .v1 import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams + from .v1 import AgentV1SettingsAgentContextListenProviderV1 + from .v1 import AgentV1SettingsAgentContextListenProviderV1Params + from .v1 import AgentV1SettingsAgentContextListenProviderV2 + from .v1 import AgentV1SettingsAgentContextListenProviderV2LanguageHint + from .v1 import AgentV1SettingsAgentContextListenProviderV2LanguageHintParams + from .v1 import AgentV1SettingsAgentContextListenProviderV2Params + from .v1 import AgentV1SettingsAgentContextMessagesItem + from .v1 import AgentV1SettingsAgentContextMessagesItemContent + from .v1 import AgentV1SettingsAgentContextMessagesItemContentParams + from .v1 import AgentV1SettingsAgentContextMessagesItemContentRole + from .v1 import AgentV1SettingsAgentContextMessagesItemFunctionCalls + from .v1 import AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem + from .v1 import AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams + from .v1 import AgentV1SettingsAgentContextMessagesItemFunctionCallsParams + from .v1 import AgentV1SettingsAgentContextMessagesItemParams + from .v1 import AgentV1SettingsAgentListenProviderV1 + from .v1 import AgentV1SettingsAgentListenProviderV1Params + from .v1 import AgentV1SettingsAgentListenProviderV2 + from .v1 import AgentV1SettingsAgentListenProviderV2Params _dynamic_imports: typing.Dict[str, str] = { - "AgentV1UpdateListenListenProvider": ".v1", - "AgentV1UpdateListenListenProviderParams": ".v1", - "AgentV1UpdateListenListenProvider_V1": ".v1", - "AgentV1UpdateListenListenProvider_V1Params": ".v1", - "AgentV1UpdateListenListenProvider_V2": ".v1", - "AgentV1UpdateListenListenProvider_V2Params": ".v1", "AgentV1AgentAudioDone": ".v1", "AgentV1AgentAudioDoneParams": ".v1", "AgentV1AgentStartedSpeaking": ".v1", @@ -283,6 +278,12 @@ "AgentV1UpdateListen": ".v1", "AgentV1UpdateListenListen": ".v1", "AgentV1UpdateListenListenParams": ".v1", + "AgentV1UpdateListenListenProvider": ".v1", + "AgentV1UpdateListenListenProviderParams": ".v1", + "AgentV1UpdateListenListenProvider_V1": ".v1", + "AgentV1UpdateListenListenProvider_V1Params": ".v1", + "AgentV1UpdateListenListenProvider_V2": ".v1", + "AgentV1UpdateListenListenProvider_V2Params": ".v1", "AgentV1UpdateListenParams": ".v1", "AgentV1UpdatePrompt": ".v1", "AgentV1UpdatePromptParams": ".v1", @@ -302,7 +303,10 @@ "AgentV1WelcomeParams": ".v1", "ConversationHistoryMessage": ".v1", "ConversationHistoryMessageParams": ".v1", + "ConversationHistoryMessageRole": ".v1", "FunctionCallHistoryMessage": ".v1", + "FunctionCallHistoryMessageFunctionCallsItem": ".v1", + "FunctionCallHistoryMessageFunctionCallsItemParams": ".v1", "FunctionCallHistoryMessageParams": ".v1", "v1": ".v1", } @@ -330,12 +334,6 @@ def __dir__(): __all__ = [ - "AgentV1UpdateListenListenProvider", - "AgentV1UpdateListenListenProviderParams", - "AgentV1UpdateListenListenProvider_V1", - "AgentV1UpdateListenListenProvider_V1Params", - "AgentV1UpdateListenListenProvider_V2", - "AgentV1UpdateListenListenProvider_V2Params", "AgentV1AgentAudioDone", "AgentV1AgentAudioDoneParams", "AgentV1AgentStartedSpeaking", @@ -455,6 +453,12 @@ def __dir__(): "AgentV1UpdateListen", "AgentV1UpdateListenListen", "AgentV1UpdateListenListenParams", + "AgentV1UpdateListenListenProvider", + "AgentV1UpdateListenListenProviderParams", + "AgentV1UpdateListenListenProvider_V1", + "AgentV1UpdateListenListenProvider_V1Params", + "AgentV1UpdateListenListenProvider_V2", + "AgentV1UpdateListenListenProvider_V2Params", "AgentV1UpdateListenParams", "AgentV1UpdatePrompt", "AgentV1UpdatePromptParams", @@ -474,7 +478,10 @@ def __dir__(): "AgentV1WelcomeParams", "ConversationHistoryMessage", "ConversationHistoryMessageParams", + "ConversationHistoryMessageRole", "FunctionCallHistoryMessage", + "FunctionCallHistoryMessageFunctionCallsItem", + "FunctionCallHistoryMessageFunctionCallsItemParams", "FunctionCallHistoryMessageParams", "v1", ] diff --git a/src/deepgram/agent/v1/__init__.py b/src/deepgram/agent/v1/__init__.py index 5530528c..59444380 100644 --- a/src/deepgram/agent/v1/__init__.py +++ b/src/deepgram/agent/v1/__init__.py @@ -6,16 +6,6 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import ( - AgentV1UpdateListenListenProvider, - AgentV1UpdateListenListenProvider_V1, - AgentV1UpdateListenListenProvider_V2, - ) - from .requests import ( - AgentV1UpdateListenListenProviderParams, - AgentV1UpdateListenListenProvider_V1Params, - AgentV1UpdateListenListenProvider_V2Params, - ) from .types import ( AgentV1AgentAudioDone, AgentV1AgentStartedSpeaking, @@ -26,10 +16,6 @@ AgentV1FunctionCallRequest, AgentV1FunctionCallRequestFunctionsItem, AgentV1History, - AgentV1HistoryContent, - AgentV1HistoryContentRole, - AgentV1HistoryFunctionCalls, - AgentV1HistoryFunctionCallsFunctionCallsItem, AgentV1InjectAgentMessage, AgentV1InjectAgentMessageBehavior, AgentV1InjectUserMessage, @@ -45,26 +31,14 @@ AgentV1SettingsAgentContext, AgentV1SettingsAgentContextContext, AgentV1SettingsAgentContextContextMessagesItem, - AgentV1SettingsAgentContextContextMessagesItemContentRole, - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, AgentV1SettingsAgentContextListen, AgentV1SettingsAgentContextListenProvider, - AgentV1SettingsAgentContextListenProviderV1, - AgentV1SettingsAgentContextListenProviderV2, - AgentV1SettingsAgentContextListenProviderV2LanguageHint, AgentV1SettingsAgentContextListenProvider_V1, AgentV1SettingsAgentContextListenProvider_V2, - AgentV1SettingsAgentContextMessagesItem, - AgentV1SettingsAgentContextMessagesItemContent, - AgentV1SettingsAgentContextMessagesItemContentRole, - AgentV1SettingsAgentContextMessagesItemFunctionCalls, - AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem, AgentV1SettingsAgentContextSpeak, AgentV1SettingsAgentContextThink, AgentV1SettingsAgentListen, AgentV1SettingsAgentListenProvider, - AgentV1SettingsAgentListenProviderV1, - AgentV1SettingsAgentListenProviderV2, AgentV1SettingsAgentListenProvider_V1, AgentV1SettingsAgentListenProvider_V2, AgentV1SettingsAgentSpeak, @@ -81,6 +55,9 @@ AgentV1ThinkUpdated, AgentV1UpdateListen, AgentV1UpdateListenListen, + AgentV1UpdateListenListenProvider, + AgentV1UpdateListenListenProvider_V1, + AgentV1UpdateListenListenProvider_V2, AgentV1UpdatePrompt, AgentV1UpdateSpeak, AgentV1UpdateSpeakSpeak, @@ -90,7 +67,9 @@ AgentV1Warning, AgentV1Welcome, ConversationHistoryMessage, + ConversationHistoryMessageRole, FunctionCallHistoryMessage, + FunctionCallHistoryMessageFunctionCallsItem, ) from . import settings from .requests import ( @@ -101,9 +80,6 @@ AgentV1ErrorParams, AgentV1FunctionCallRequestFunctionsItemParams, AgentV1FunctionCallRequestParams, - AgentV1HistoryContentParams, - AgentV1HistoryFunctionCallsFunctionCallsItemParams, - AgentV1HistoryFunctionCallsParams, AgentV1HistoryParams, AgentV1InjectAgentMessageParams, AgentV1InjectUserMessageParams, @@ -114,27 +90,17 @@ AgentV1PromptUpdatedParams, AgentV1ReceiveFunctionCallResponseParams, AgentV1SendFunctionCallResponseParams, - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, AgentV1SettingsAgentContextContextMessagesItemParams, AgentV1SettingsAgentContextContextParams, AgentV1SettingsAgentContextListenParams, AgentV1SettingsAgentContextListenProviderParams, - AgentV1SettingsAgentContextListenProviderV1Params, - AgentV1SettingsAgentContextListenProviderV2LanguageHintParams, - AgentV1SettingsAgentContextListenProviderV2Params, AgentV1SettingsAgentContextListenProvider_V1Params, AgentV1SettingsAgentContextListenProvider_V2Params, AgentV1SettingsAgentContextParams, - AgentV1SettingsAgentContextMessagesItemContentParams, - AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams, - AgentV1SettingsAgentContextMessagesItemFunctionCallsParams, - AgentV1SettingsAgentContextMessagesItemParams, AgentV1SettingsAgentContextSpeakParams, AgentV1SettingsAgentContextThinkParams, AgentV1SettingsAgentListenParams, AgentV1SettingsAgentListenProviderParams, - AgentV1SettingsAgentListenProviderV1Params, - AgentV1SettingsAgentListenProviderV2Params, AgentV1SettingsAgentListenProvider_V1Params, AgentV1SettingsAgentListenProvider_V2Params, AgentV1SettingsAgentParams, @@ -149,6 +115,9 @@ AgentV1SpeakUpdatedParams, AgentV1ThinkUpdatedParams, AgentV1UpdateListenListenParams, + AgentV1UpdateListenListenProviderParams, + AgentV1UpdateListenListenProvider_V1Params, + AgentV1UpdateListenListenProvider_V2Params, AgentV1UpdateListenParams, AgentV1UpdatePromptParams, AgentV1UpdateSpeakParams, @@ -159,15 +128,39 @@ AgentV1WarningParams, AgentV1WelcomeParams, ConversationHistoryMessageParams, + FunctionCallHistoryMessageFunctionCallsItemParams, FunctionCallHistoryMessageParams, ) + from .types import AgentV1HistoryContent + from .requests import AgentV1HistoryContentParams + from .types import AgentV1HistoryContentRole + from .types import AgentV1HistoryFunctionCalls + from .types import AgentV1HistoryFunctionCallsFunctionCallsItem + from .requests import AgentV1HistoryFunctionCallsFunctionCallsItemParams + from .requests import AgentV1HistoryFunctionCallsParams + from .types import AgentV1SettingsAgentContextContextMessagesItemContentRole + from .types import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem + from .requests import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams + from .types import AgentV1SettingsAgentContextListenProviderV1 + from .requests import AgentV1SettingsAgentContextListenProviderV1Params + from .types import AgentV1SettingsAgentContextListenProviderV2 + from .types import AgentV1SettingsAgentContextListenProviderV2LanguageHint + from .requests import AgentV1SettingsAgentContextListenProviderV2LanguageHintParams + from .requests import AgentV1SettingsAgentContextListenProviderV2Params + from .types import AgentV1SettingsAgentContextMessagesItem + from .types import AgentV1SettingsAgentContextMessagesItemContent + from .requests import AgentV1SettingsAgentContextMessagesItemContentParams + from .types import AgentV1SettingsAgentContextMessagesItemContentRole + from .types import AgentV1SettingsAgentContextMessagesItemFunctionCalls + from .types import AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem + from .requests import AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams + from .requests import AgentV1SettingsAgentContextMessagesItemFunctionCallsParams + from .requests import AgentV1SettingsAgentContextMessagesItemParams + from .types import AgentV1SettingsAgentListenProviderV1 + from .requests import AgentV1SettingsAgentListenProviderV1Params + from .types import AgentV1SettingsAgentListenProviderV2 + from .requests import AgentV1SettingsAgentListenProviderV2Params _dynamic_imports: typing.Dict[str, str] = { - "AgentV1UpdateListenListenProvider": ".types", - "AgentV1UpdateListenListenProviderParams": ".requests", - "AgentV1UpdateListenListenProvider_V1": ".types", - "AgentV1UpdateListenListenProvider_V1Params": ".requests", - "AgentV1UpdateListenListenProvider_V2": ".types", - "AgentV1UpdateListenListenProvider_V2Params": ".requests", "AgentV1AgentAudioDone": ".types", "AgentV1AgentAudioDoneParams": ".requests", "AgentV1AgentStartedSpeaking": ".types", @@ -235,7 +228,6 @@ "AgentV1SettingsAgentContextListenProvider_V1Params": ".requests", "AgentV1SettingsAgentContextListenProvider_V2": ".types", "AgentV1SettingsAgentContextListenProvider_V2Params": ".requests", - "AgentV1SettingsAgentContextParams": ".requests", "AgentV1SettingsAgentContextMessagesItem": ".types", "AgentV1SettingsAgentContextMessagesItemContent": ".types", "AgentV1SettingsAgentContextMessagesItemContentParams": ".requests", @@ -245,6 +237,7 @@ "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams": ".requests", "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams": ".requests", "AgentV1SettingsAgentContextMessagesItemParams": ".requests", + "AgentV1SettingsAgentContextParams": ".requests", "AgentV1SettingsAgentContextSpeak": ".types", "AgentV1SettingsAgentContextSpeakParams": ".requests", "AgentV1SettingsAgentContextThink": ".types", @@ -287,6 +280,12 @@ "AgentV1UpdateListen": ".types", "AgentV1UpdateListenListen": ".types", "AgentV1UpdateListenListenParams": ".requests", + "AgentV1UpdateListenListenProvider": ".types", + "AgentV1UpdateListenListenProviderParams": ".requests", + "AgentV1UpdateListenListenProvider_V1": ".types", + "AgentV1UpdateListenListenProvider_V1Params": ".requests", + "AgentV1UpdateListenListenProvider_V2": ".types", + "AgentV1UpdateListenListenProvider_V2Params": ".requests", "AgentV1UpdateListenParams": ".requests", "AgentV1UpdatePrompt": ".types", "AgentV1UpdatePromptParams": ".requests", @@ -306,7 +305,10 @@ "AgentV1WelcomeParams": ".requests", "ConversationHistoryMessage": ".types", "ConversationHistoryMessageParams": ".requests", + "ConversationHistoryMessageRole": ".types", "FunctionCallHistoryMessage": ".types", + "FunctionCallHistoryMessageFunctionCallsItem": ".types", + "FunctionCallHistoryMessageFunctionCallsItemParams": ".requests", "FunctionCallHistoryMessageParams": ".requests", "settings": ".settings", } @@ -334,12 +336,6 @@ def __dir__(): __all__ = [ - "AgentV1UpdateListenListenProvider", - "AgentV1UpdateListenListenProviderParams", - "AgentV1UpdateListenListenProvider_V1", - "AgentV1UpdateListenListenProvider_V1Params", - "AgentV1UpdateListenListenProvider_V2", - "AgentV1UpdateListenListenProvider_V2Params", "AgentV1AgentAudioDone", "AgentV1AgentAudioDoneParams", "AgentV1AgentStartedSpeaking", @@ -459,6 +455,12 @@ def __dir__(): "AgentV1UpdateListen", "AgentV1UpdateListenListen", "AgentV1UpdateListenListenParams", + "AgentV1UpdateListenListenProvider", + "AgentV1UpdateListenListenProviderParams", + "AgentV1UpdateListenListenProvider_V1", + "AgentV1UpdateListenListenProvider_V1Params", + "AgentV1UpdateListenListenProvider_V2", + "AgentV1UpdateListenListenProvider_V2Params", "AgentV1UpdateListenParams", "AgentV1UpdatePrompt", "AgentV1UpdatePromptParams", @@ -478,7 +480,10 @@ def __dir__(): "AgentV1WelcomeParams", "ConversationHistoryMessage", "ConversationHistoryMessageParams", + "ConversationHistoryMessageRole", "FunctionCallHistoryMessage", + "FunctionCallHistoryMessageFunctionCallsItem", + "FunctionCallHistoryMessageFunctionCallsItemParams", "FunctionCallHistoryMessageParams", "settings", ] diff --git a/src/deepgram/agent/v1/client.py b/src/deepgram/agent/v1/client.py index e1a53d78..38b43c6d 100644 --- a/src/deepgram/agent/v1/client.py +++ b/src/deepgram/agent/v1/client.py @@ -53,7 +53,7 @@ def connect( Parameters ---------- authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -138,7 +138,7 @@ async def connect( Parameters ---------- authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/agent/v1/raw_client.py b/src/deepgram/agent/v1/raw_client.py index 10f2330c..72334ef0 100644 --- a/src/deepgram/agent/v1/raw_client.py +++ b/src/deepgram/agent/v1/raw_client.py @@ -34,7 +34,7 @@ def connect( Parameters ---------- authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -98,7 +98,7 @@ async def connect( Parameters ---------- authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/agent/v1/requests/__init__.py b/src/deepgram/agent/v1/requests/__init__.py index 180e1675..387bc379 100644 --- a/src/deepgram/agent/v1/requests/__init__.py +++ b/src/deepgram/agent/v1/requests/__init__.py @@ -6,11 +6,6 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .agent_v1update_listen_listen_provider import ( - AgentV1UpdateListenListenProviderParams, - AgentV1UpdateListenListenProvider_V1Params, - AgentV1UpdateListenListenProvider_V2Params, - ) from .agent_v1agent_audio_done import AgentV1AgentAudioDoneParams from .agent_v1agent_started_speaking import AgentV1AgentStartedSpeakingParams from .agent_v1agent_thinking import AgentV1AgentThinkingParams @@ -19,9 +14,6 @@ from .agent_v1function_call_request import AgentV1FunctionCallRequestParams from .agent_v1function_call_request_functions_item import AgentV1FunctionCallRequestFunctionsItemParams from .agent_v1history import AgentV1HistoryParams - from .agent_v1history_content import AgentV1HistoryContentParams - from .agent_v1history_function_calls import AgentV1HistoryFunctionCallsParams - from .agent_v1history_function_calls_function_calls_item import AgentV1HistoryFunctionCallsFunctionCallsItemParams from .agent_v1inject_agent_message import AgentV1InjectAgentMessageParams from .agent_v1inject_user_message import AgentV1InjectUserMessageParams from .agent_v1injection_refused import AgentV1InjectionRefusedParams @@ -38,30 +30,12 @@ from .agent_v1settings_agent_context_context_messages_item import ( AgentV1SettingsAgentContextContextMessagesItemParams, ) - from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, - ) from .agent_v1settings_agent_context_listen import AgentV1SettingsAgentContextListenParams from .agent_v1settings_agent_context_listen_provider import ( AgentV1SettingsAgentContextListenProviderParams, AgentV1SettingsAgentContextListenProvider_V1Params, AgentV1SettingsAgentContextListenProvider_V2Params, ) - from .agent_v1settings_agent_context_listen_provider_v1 import AgentV1SettingsAgentContextListenProviderV1Params - from .agent_v1settings_agent_context_listen_provider_v2 import AgentV1SettingsAgentContextListenProviderV2Params - from .agent_v1settings_agent_context_listen_provider_v2language_hint import ( - AgentV1SettingsAgentContextListenProviderV2LanguageHintParams, - ) - from .agent_v1settings_agent_context_messages_item import AgentV1SettingsAgentContextMessagesItemParams - from .agent_v1settings_agent_context_messages_item_content import ( - AgentV1SettingsAgentContextMessagesItemContentParams, - ) - from .agent_v1settings_agent_context_messages_item_function_calls import ( - AgentV1SettingsAgentContextMessagesItemFunctionCallsParams, - ) - from .agent_v1settings_agent_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams, - ) from .agent_v1settings_agent_context_speak import AgentV1SettingsAgentContextSpeakParams from .agent_v1settings_agent_context_think import AgentV1SettingsAgentContextThinkParams from .agent_v1settings_agent_listen import AgentV1SettingsAgentListenParams @@ -70,8 +44,6 @@ AgentV1SettingsAgentListenProvider_V1Params, AgentV1SettingsAgentListenProvider_V2Params, ) - from .agent_v1settings_agent_listen_provider_v1 import AgentV1SettingsAgentListenProviderV1Params - from .agent_v1settings_agent_listen_provider_v2 import AgentV1SettingsAgentListenProviderV2Params from .agent_v1settings_agent_speak import AgentV1SettingsAgentSpeakParams from .agent_v1settings_agent_think import AgentV1SettingsAgentThinkParams from .agent_v1settings_applied import AgentV1SettingsAppliedParams @@ -83,6 +55,11 @@ from .agent_v1think_updated import AgentV1ThinkUpdatedParams from .agent_v1update_listen import AgentV1UpdateListenParams from .agent_v1update_listen_listen import AgentV1UpdateListenListenParams + from .agent_v1update_listen_listen_provider import ( + AgentV1UpdateListenListenProviderParams, + AgentV1UpdateListenListenProvider_V1Params, + AgentV1UpdateListenListenProvider_V2Params, + ) from .agent_v1update_prompt import AgentV1UpdatePromptParams from .agent_v1update_speak import AgentV1UpdateSpeakParams from .agent_v1update_speak_speak import AgentV1UpdateSpeakSpeakParams @@ -93,10 +70,21 @@ from .agent_v1welcome import AgentV1WelcomeParams from .conversation_history_message import ConversationHistoryMessageParams from .function_call_history_message import FunctionCallHistoryMessageParams + from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams + from .agent_v1history_content import AgentV1HistoryContentParams + from .agent_v1history_function_calls_function_calls_item import AgentV1HistoryFunctionCallsFunctionCallsItemParams + from .agent_v1history_function_calls import AgentV1HistoryFunctionCallsParams + from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams + from .agent_v1settings_agent_context_listen_provider_v1 import AgentV1SettingsAgentContextListenProviderV1Params + from .agent_v1settings_agent_context_listen_provider_v2language_hint import AgentV1SettingsAgentContextListenProviderV2LanguageHintParams + from .agent_v1settings_agent_context_listen_provider_v2 import AgentV1SettingsAgentContextListenProviderV2Params + from .agent_v1settings_agent_context_messages_item_content import AgentV1SettingsAgentContextMessagesItemContentParams + from .agent_v1settings_agent_context_messages_item_function_calls_function_calls_item import AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams + from .agent_v1settings_agent_context_messages_item_function_calls import AgentV1SettingsAgentContextMessagesItemFunctionCallsParams + from .agent_v1settings_agent_context_messages_item import AgentV1SettingsAgentContextMessagesItemParams + from .agent_v1settings_agent_listen_provider_v1 import AgentV1SettingsAgentListenProviderV1Params + from .agent_v1settings_agent_listen_provider_v2 import AgentV1SettingsAgentListenProviderV2Params _dynamic_imports: typing.Dict[str, str] = { - "AgentV1UpdateListenListenProviderParams": ".agent_v1update_listen_listen_provider", - "AgentV1UpdateListenListenProvider_V1Params": ".agent_v1update_listen_listen_provider", - "AgentV1UpdateListenListenProvider_V2Params": ".agent_v1update_listen_listen_provider", "AgentV1AgentAudioDoneParams": ".agent_v1agent_audio_done", "AgentV1AgentStartedSpeakingParams": ".agent_v1agent_started_speaking", "AgentV1AgentThinkingParams": ".agent_v1agent_thinking", @@ -127,11 +115,11 @@ "AgentV1SettingsAgentContextListenProviderV2Params": ".agent_v1settings_agent_context_listen_provider_v2", "AgentV1SettingsAgentContextListenProvider_V1Params": ".agent_v1settings_agent_context_listen_provider", "AgentV1SettingsAgentContextListenProvider_V2Params": ".agent_v1settings_agent_context_listen_provider", - "AgentV1SettingsAgentContextParams": ".agent_v1settings_agent_context", "AgentV1SettingsAgentContextMessagesItemContentParams": ".agent_v1settings_agent_context_messages_item_content", "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams": ".agent_v1settings_agent_context_messages_item_function_calls_function_calls_item", "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams": ".agent_v1settings_agent_context_messages_item_function_calls", "AgentV1SettingsAgentContextMessagesItemParams": ".agent_v1settings_agent_context_messages_item", + "AgentV1SettingsAgentContextParams": ".agent_v1settings_agent_context", "AgentV1SettingsAgentContextSpeakParams": ".agent_v1settings_agent_context_speak", "AgentV1SettingsAgentContextThinkParams": ".agent_v1settings_agent_context_think", "AgentV1SettingsAgentListenParams": ".agent_v1settings_agent_listen", @@ -152,6 +140,9 @@ "AgentV1SpeakUpdatedParams": ".agent_v1speak_updated", "AgentV1ThinkUpdatedParams": ".agent_v1think_updated", "AgentV1UpdateListenListenParams": ".agent_v1update_listen_listen", + "AgentV1UpdateListenListenProviderParams": ".agent_v1update_listen_listen_provider", + "AgentV1UpdateListenListenProvider_V1Params": ".agent_v1update_listen_listen_provider", + "AgentV1UpdateListenListenProvider_V2Params": ".agent_v1update_listen_listen_provider", "AgentV1UpdateListenParams": ".agent_v1update_listen", "AgentV1UpdatePromptParams": ".agent_v1update_prompt", "AgentV1UpdateSpeakParams": ".agent_v1update_speak", @@ -162,6 +153,7 @@ "AgentV1WarningParams": ".agent_v1warning", "AgentV1WelcomeParams": ".agent_v1welcome", "ConversationHistoryMessageParams": ".conversation_history_message", + "FunctionCallHistoryMessageFunctionCallsItemParams": ".function_call_history_message_function_calls_item", "FunctionCallHistoryMessageParams": ".function_call_history_message", } @@ -188,9 +180,6 @@ def __dir__(): __all__ = [ - "AgentV1UpdateListenListenProviderParams", - "AgentV1UpdateListenListenProvider_V1Params", - "AgentV1UpdateListenListenProvider_V2Params", "AgentV1AgentAudioDoneParams", "AgentV1AgentStartedSpeakingParams", "AgentV1AgentThinkingParams", @@ -221,11 +210,11 @@ def __dir__(): "AgentV1SettingsAgentContextListenProviderV2Params", "AgentV1SettingsAgentContextListenProvider_V1Params", "AgentV1SettingsAgentContextListenProvider_V2Params", - "AgentV1SettingsAgentContextParams", "AgentV1SettingsAgentContextMessagesItemContentParams", "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams", "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams", "AgentV1SettingsAgentContextMessagesItemParams", + "AgentV1SettingsAgentContextParams", "AgentV1SettingsAgentContextSpeakParams", "AgentV1SettingsAgentContextThinkParams", "AgentV1SettingsAgentListenParams", @@ -246,6 +235,9 @@ def __dir__(): "AgentV1SpeakUpdatedParams", "AgentV1ThinkUpdatedParams", "AgentV1UpdateListenListenParams", + "AgentV1UpdateListenListenProviderParams", + "AgentV1UpdateListenListenProvider_V1Params", + "AgentV1UpdateListenListenProvider_V2Params", "AgentV1UpdateListenParams", "AgentV1UpdatePromptParams", "AgentV1UpdateSpeakParams", @@ -256,5 +248,6 @@ def __dir__(): "AgentV1WarningParams", "AgentV1WelcomeParams", "ConversationHistoryMessageParams", + "FunctionCallHistoryMessageFunctionCallsItemParams", "FunctionCallHistoryMessageParams", ] diff --git a/src/deepgram/agent/v1/requests/agent_v1history_function_calls_function_calls_item.py b/src/deepgram/agent/v1/requests/agent_v1history_function_calls_function_calls_item.py index 18419c50..568836b3 100644 --- a/src/deepgram/agent/v1/requests/agent_v1history_function_calls_function_calls_item.py +++ b/src/deepgram/agent/v1/requests/agent_v1history_function_calls_function_calls_item.py @@ -1,35 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing_extensions +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams - -class AgentV1HistoryFunctionCallsFunctionCallsItemParams(typing_extensions.TypedDict): - id: str - """ - Unique identifier for the function call - """ - - name: str - """ - Name of the function called - """ - - client_side: bool - """ - Indicates if the call was client-side or server-side - """ - - arguments: str - """ - Arguments passed to the function - """ - - response: str - """ - Response from the function call - """ - - thought_signature: typing_extensions.NotRequired[str] - """ - Some Gemini models require this as an additional function call identifier - """ +AgentV1HistoryFunctionCallsFunctionCallsItemParams = FunctionCallHistoryMessageFunctionCallsItemParams diff --git a/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py b/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py index 8a045077..85e62510 100644 --- a/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py +++ b/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py @@ -1,35 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing_extensions +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams - -class AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams(typing_extensions.TypedDict): - id: str - """ - Unique identifier for the function call - """ - - name: str - """ - Name of the function called - """ - - client_side: bool - """ - Indicates if the call was client-side or server-side - """ - - arguments: str - """ - Arguments passed to the function - """ - - response: str - """ - Response from the function call - """ - - thought_signature: typing_extensions.NotRequired[str] - """ - Some Gemini models require this as an additional function call identifier - """ +AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams = FunctionCallHistoryMessageFunctionCallsItemParams diff --git a/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py b/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py index 48ada890..552a0c07 100644 --- a/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py +++ b/src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py @@ -1,9 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, -) +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams -AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams = ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams -) +AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams = FunctionCallHistoryMessageFunctionCallsItemParams diff --git a/src/deepgram/agent/v1/requests/conversation_history_message.py b/src/deepgram/agent/v1/requests/conversation_history_message.py index 965ccb42..e09fab60 100644 --- a/src/deepgram/agent/v1/requests/conversation_history_message.py +++ b/src/deepgram/agent/v1/requests/conversation_history_message.py @@ -3,9 +3,7 @@ import typing import typing_extensions -from ..types.agent_v1settings_agent_context_context_messages_item_content_role import ( - AgentV1SettingsAgentContextContextMessagesItemContentRole, -) +from ..types.conversation_history_message_role import ConversationHistoryMessageRole class ConversationHistoryMessageParams(typing_extensions.TypedDict): @@ -18,7 +16,7 @@ class ConversationHistoryMessageParams(typing_extensions.TypedDict): Message type identifier for conversation text """ - role: AgentV1SettingsAgentContextContextMessagesItemContentRole + role: ConversationHistoryMessageRole """ Identifies who spoke the statement """ diff --git a/src/deepgram/agent/v1/requests/function_call_history_message.py b/src/deepgram/agent/v1/requests/function_call_history_message.py index 6a607abd..b3fabb0a 100644 --- a/src/deepgram/agent/v1/requests/function_call_history_message.py +++ b/src/deepgram/agent/v1/requests/function_call_history_message.py @@ -3,9 +3,7 @@ import typing import typing_extensions -from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, -) +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams class FunctionCallHistoryMessageParams(typing_extensions.TypedDict): @@ -14,7 +12,7 @@ class FunctionCallHistoryMessageParams(typing_extensions.TypedDict): """ type: typing.Literal["History"] - function_calls: typing.Sequence[AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams] + function_calls: typing.Sequence[FunctionCallHistoryMessageFunctionCallsItemParams] """ List of function call objects """ diff --git a/src/deepgram/agent/v1/requests/function_call_history_message_function_calls_item.py b/src/deepgram/agent/v1/requests/function_call_history_message_function_calls_item.py new file mode 100644 index 00000000..1e23995d --- /dev/null +++ b/src/deepgram/agent/v1/requests/function_call_history_message_function_calls_item.py @@ -0,0 +1,35 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions + + +class FunctionCallHistoryMessageFunctionCallsItemParams(typing_extensions.TypedDict): + id: str + """ + Unique identifier for the function call + """ + + name: str + """ + Name of the function called + """ + + client_side: bool + """ + Indicates if the call was client-side or server-side + """ + + arguments: str + """ + Arguments passed to the function + """ + + response: str + """ + Response from the function call + """ + + thought_signature: typing_extensions.NotRequired[str] + """ + Some Gemini models require this as an additional function call identifier + """ diff --git a/src/deepgram/agent/v1/types/__init__.py b/src/deepgram/agent/v1/types/__init__.py index 3371b027..7c6e20c6 100644 --- a/src/deepgram/agent/v1/types/__init__.py +++ b/src/deepgram/agent/v1/types/__init__.py @@ -6,11 +6,6 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .agent_v1update_listen_listen_provider import ( - AgentV1UpdateListenListenProvider, - AgentV1UpdateListenListenProvider_V1, - AgentV1UpdateListenListenProvider_V2, - ) from .agent_v1agent_audio_done import AgentV1AgentAudioDone from .agent_v1agent_started_speaking import AgentV1AgentStartedSpeaking from .agent_v1agent_thinking import AgentV1AgentThinking @@ -20,10 +15,6 @@ from .agent_v1function_call_request import AgentV1FunctionCallRequest from .agent_v1function_call_request_functions_item import AgentV1FunctionCallRequestFunctionsItem from .agent_v1history import AgentV1History - from .agent_v1history_content import AgentV1HistoryContent - from .agent_v1history_content_role import AgentV1HistoryContentRole - from .agent_v1history_function_calls import AgentV1HistoryFunctionCalls - from .agent_v1history_function_calls_function_calls_item import AgentV1HistoryFunctionCallsFunctionCallsItem from .agent_v1inject_agent_message import AgentV1InjectAgentMessage from .agent_v1inject_agent_message_behavior import AgentV1InjectAgentMessageBehavior from .agent_v1inject_user_message import AgentV1InjectUserMessage @@ -39,34 +30,12 @@ from .agent_v1settings_agent_context import AgentV1SettingsAgentContext from .agent_v1settings_agent_context_context import AgentV1SettingsAgentContextContext from .agent_v1settings_agent_context_context_messages_item import AgentV1SettingsAgentContextContextMessagesItem - from .agent_v1settings_agent_context_context_messages_item_content_role import ( - AgentV1SettingsAgentContextContextMessagesItemContentRole, - ) - from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, - ) from .agent_v1settings_agent_context_listen import AgentV1SettingsAgentContextListen from .agent_v1settings_agent_context_listen_provider import ( AgentV1SettingsAgentContextListenProvider, AgentV1SettingsAgentContextListenProvider_V1, AgentV1SettingsAgentContextListenProvider_V2, ) - from .agent_v1settings_agent_context_listen_provider_v1 import AgentV1SettingsAgentContextListenProviderV1 - from .agent_v1settings_agent_context_listen_provider_v2 import AgentV1SettingsAgentContextListenProviderV2 - from .agent_v1settings_agent_context_listen_provider_v2language_hint import ( - AgentV1SettingsAgentContextListenProviderV2LanguageHint, - ) - from .agent_v1settings_agent_context_messages_item import AgentV1SettingsAgentContextMessagesItem - from .agent_v1settings_agent_context_messages_item_content import AgentV1SettingsAgentContextMessagesItemContent - from .agent_v1settings_agent_context_messages_item_content_role import ( - AgentV1SettingsAgentContextMessagesItemContentRole, - ) - from .agent_v1settings_agent_context_messages_item_function_calls import ( - AgentV1SettingsAgentContextMessagesItemFunctionCalls, - ) - from .agent_v1settings_agent_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem, - ) from .agent_v1settings_agent_context_speak import AgentV1SettingsAgentContextSpeak from .agent_v1settings_agent_context_think import AgentV1SettingsAgentContextThink from .agent_v1settings_agent_listen import AgentV1SettingsAgentListen @@ -75,8 +44,6 @@ AgentV1SettingsAgentListenProvider_V1, AgentV1SettingsAgentListenProvider_V2, ) - from .agent_v1settings_agent_listen_provider_v1 import AgentV1SettingsAgentListenProviderV1 - from .agent_v1settings_agent_listen_provider_v2 import AgentV1SettingsAgentListenProviderV2 from .agent_v1settings_agent_speak import AgentV1SettingsAgentSpeak from .agent_v1settings_agent_think import AgentV1SettingsAgentThink from .agent_v1settings_applied import AgentV1SettingsApplied @@ -91,6 +58,11 @@ from .agent_v1think_updated import AgentV1ThinkUpdated from .agent_v1update_listen import AgentV1UpdateListen from .agent_v1update_listen_listen import AgentV1UpdateListenListen + from .agent_v1update_listen_listen_provider import ( + AgentV1UpdateListenListenProvider, + AgentV1UpdateListenListenProvider_V1, + AgentV1UpdateListenListenProvider_V2, + ) from .agent_v1update_prompt import AgentV1UpdatePrompt from .agent_v1update_speak import AgentV1UpdateSpeak from .agent_v1update_speak_speak import AgentV1UpdateSpeakSpeak @@ -100,11 +72,26 @@ from .agent_v1warning import AgentV1Warning from .agent_v1welcome import AgentV1Welcome from .conversation_history_message import ConversationHistoryMessage + from .conversation_history_message_role import ConversationHistoryMessageRole from .function_call_history_message import FunctionCallHistoryMessage + from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem + from .agent_v1history_content import AgentV1HistoryContent + from .agent_v1history_content_role import AgentV1HistoryContentRole + from .agent_v1history_function_calls import AgentV1HistoryFunctionCalls + from .agent_v1history_function_calls_function_calls_item import AgentV1HistoryFunctionCallsFunctionCallsItem + from .agent_v1settings_agent_context_context_messages_item_content_role import AgentV1SettingsAgentContextContextMessagesItemContentRole + from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem + from .agent_v1settings_agent_context_listen_provider_v1 import AgentV1SettingsAgentContextListenProviderV1 + from .agent_v1settings_agent_context_listen_provider_v2 import AgentV1SettingsAgentContextListenProviderV2 + from .agent_v1settings_agent_context_listen_provider_v2language_hint import AgentV1SettingsAgentContextListenProviderV2LanguageHint + from .agent_v1settings_agent_context_messages_item import AgentV1SettingsAgentContextMessagesItem + from .agent_v1settings_agent_context_messages_item_content import AgentV1SettingsAgentContextMessagesItemContent + from .agent_v1settings_agent_context_messages_item_content_role import AgentV1SettingsAgentContextMessagesItemContentRole + from .agent_v1settings_agent_context_messages_item_function_calls import AgentV1SettingsAgentContextMessagesItemFunctionCalls + from .agent_v1settings_agent_context_messages_item_function_calls_function_calls_item import AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem + from .agent_v1settings_agent_listen_provider_v1 import AgentV1SettingsAgentListenProviderV1 + from .agent_v1settings_agent_listen_provider_v2 import AgentV1SettingsAgentListenProviderV2 _dynamic_imports: typing.Dict[str, str] = { - "AgentV1UpdateListenListenProvider": ".agent_v1update_listen_listen_provider", - "AgentV1UpdateListenListenProvider_V1": ".agent_v1update_listen_listen_provider", - "AgentV1UpdateListenListenProvider_V2": ".agent_v1update_listen_listen_provider", "AgentV1AgentAudioDone": ".agent_v1agent_audio_done", "AgentV1AgentStartedSpeaking": ".agent_v1agent_started_speaking", "AgentV1AgentThinking": ".agent_v1agent_thinking", @@ -169,6 +156,9 @@ "AgentV1ThinkUpdated": ".agent_v1think_updated", "AgentV1UpdateListen": ".agent_v1update_listen", "AgentV1UpdateListenListen": ".agent_v1update_listen_listen", + "AgentV1UpdateListenListenProvider": ".agent_v1update_listen_listen_provider", + "AgentV1UpdateListenListenProvider_V1": ".agent_v1update_listen_listen_provider", + "AgentV1UpdateListenListenProvider_V2": ".agent_v1update_listen_listen_provider", "AgentV1UpdatePrompt": ".agent_v1update_prompt", "AgentV1UpdateSpeak": ".agent_v1update_speak", "AgentV1UpdateSpeakSpeak": ".agent_v1update_speak_speak", @@ -178,7 +168,9 @@ "AgentV1Warning": ".agent_v1warning", "AgentV1Welcome": ".agent_v1welcome", "ConversationHistoryMessage": ".conversation_history_message", + "ConversationHistoryMessageRole": ".conversation_history_message_role", "FunctionCallHistoryMessage": ".function_call_history_message", + "FunctionCallHistoryMessageFunctionCallsItem": ".function_call_history_message_function_calls_item", } @@ -204,9 +196,6 @@ def __dir__(): __all__ = [ - "AgentV1UpdateListenListenProvider", - "AgentV1UpdateListenListenProvider_V1", - "AgentV1UpdateListenListenProvider_V2", "AgentV1AgentAudioDone", "AgentV1AgentStartedSpeaking", "AgentV1AgentThinking", @@ -271,6 +260,9 @@ def __dir__(): "AgentV1ThinkUpdated", "AgentV1UpdateListen", "AgentV1UpdateListenListen", + "AgentV1UpdateListenListenProvider", + "AgentV1UpdateListenListenProvider_V1", + "AgentV1UpdateListenListenProvider_V2", "AgentV1UpdatePrompt", "AgentV1UpdateSpeak", "AgentV1UpdateSpeakSpeak", @@ -280,5 +272,7 @@ def __dir__(): "AgentV1Warning", "AgentV1Welcome", "ConversationHistoryMessage", + "ConversationHistoryMessageRole", "FunctionCallHistoryMessage", + "FunctionCallHistoryMessageFunctionCallsItem", ] diff --git a/src/deepgram/agent/v1/types/agent_v1history_content_role.py b/src/deepgram/agent/v1/types/agent_v1history_content_role.py index 656a04b7..eea4a407 100644 --- a/src/deepgram/agent/v1/types/agent_v1history_content_role.py +++ b/src/deepgram/agent/v1/types/agent_v1history_content_role.py @@ -1,5 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .conversation_history_message_role import ConversationHistoryMessageRole -AgentV1HistoryContentRole = typing.Union[typing.Literal["user", "assistant"], typing.Any] +AgentV1HistoryContentRole = ConversationHistoryMessageRole diff --git a/src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.py b/src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.py index 38f4eed1..da63e980 100644 --- a/src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.py +++ b/src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.py @@ -1,48 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem -import pydantic -from ....core.pydantic_utilities import IS_PYDANTIC_V2 -from ....core.unchecked_base_model import UncheckedBaseModel - - -class AgentV1HistoryFunctionCallsFunctionCallsItem(UncheckedBaseModel): - id: str = pydantic.Field() - """ - Unique identifier for the function call - """ - - name: str = pydantic.Field() - """ - Name of the function called - """ - - client_side: bool = pydantic.Field() - """ - Indicates if the call was client-side or server-side - """ - - arguments: str = pydantic.Field() - """ - Arguments passed to the function - """ - - response: str = pydantic.Field() - """ - Response from the function call - """ - - thought_signature: typing.Optional[str] = pydantic.Field(default=None) - """ - Some Gemini models require this as an additional function call identifier - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow +AgentV1HistoryFunctionCallsFunctionCallsItem = FunctionCallHistoryMessageFunctionCallsItem diff --git a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_content_role.py b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_content_role.py index c1231ecb..b0395fe5 100644 --- a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_content_role.py +++ b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_content_role.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .conversation_history_message_role import ConversationHistoryMessageRole -AgentV1SettingsAgentContextContextMessagesItemContentRole = typing.Union[ - typing.Literal["user", "assistant"], typing.Any -] +AgentV1SettingsAgentContextContextMessagesItemContentRole = ConversationHistoryMessageRole diff --git a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py index a3b4e618..1aef2b98 100644 --- a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py +++ b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py @@ -1,48 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem -import pydantic -from ....core.pydantic_utilities import IS_PYDANTIC_V2 -from ....core.unchecked_base_model import UncheckedBaseModel - - -class AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem(UncheckedBaseModel): - id: str = pydantic.Field() - """ - Unique identifier for the function call - """ - - name: str = pydantic.Field() - """ - Name of the function called - """ - - client_side: bool = pydantic.Field() - """ - Indicates if the call was client-side or server-side - """ - - arguments: str = pydantic.Field() - """ - Arguments passed to the function - """ - - response: str = pydantic.Field() - """ - Response from the function call - """ - - thought_signature: typing.Optional[str] = pydantic.Field(default=None) - """ - Some Gemini models require this as an additional function call identifier - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow +AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem = FunctionCallHistoryMessageFunctionCallsItem diff --git a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_content_role.py b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_content_role.py index f868500a..5002127a 100644 --- a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_content_role.py +++ b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_content_role.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -from .agent_v1settings_agent_context_context_messages_item_content_role import ( - AgentV1SettingsAgentContextContextMessagesItemContentRole, -) +from .conversation_history_message_role import ConversationHistoryMessageRole -AgentV1SettingsAgentContextMessagesItemContentRole = AgentV1SettingsAgentContextContextMessagesItemContentRole +AgentV1SettingsAgentContextMessagesItemContentRole = ConversationHistoryMessageRole diff --git a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py index b66e0a04..63cd781b 100644 --- a/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py +++ b/src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py @@ -1,9 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, -) +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem -AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem = ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem -) +AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem = FunctionCallHistoryMessageFunctionCallsItem diff --git a/src/deepgram/agent/v1/types/conversation_history_message.py b/src/deepgram/agent/v1/types/conversation_history_message.py index c4553bba..00a84e9c 100644 --- a/src/deepgram/agent/v1/types/conversation_history_message.py +++ b/src/deepgram/agent/v1/types/conversation_history_message.py @@ -5,9 +5,7 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from .agent_v1settings_agent_context_context_messages_item_content_role import ( - AgentV1SettingsAgentContextContextMessagesItemContentRole, -) +from .conversation_history_message_role import ConversationHistoryMessageRole class ConversationHistoryMessage(UncheckedBaseModel): @@ -20,7 +18,7 @@ class ConversationHistoryMessage(UncheckedBaseModel): Message type identifier for conversation text """ - role: AgentV1SettingsAgentContextContextMessagesItemContentRole = pydantic.Field() + role: ConversationHistoryMessageRole = pydantic.Field() """ Identifies who spoke the statement """ diff --git a/src/deepgram/agent/v1/types/conversation_history_message_role.py b/src/deepgram/agent/v1/types/conversation_history_message_role.py new file mode 100644 index 00000000..136ed7d3 --- /dev/null +++ b/src/deepgram/agent/v1/types/conversation_history_message_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ConversationHistoryMessageRole = typing.Union[typing.Literal["user", "assistant"], typing.Any] diff --git a/src/deepgram/agent/v1/types/function_call_history_message.py b/src/deepgram/agent/v1/types/function_call_history_message.py index 7565b7c0..20387473 100644 --- a/src/deepgram/agent/v1/types/function_call_history_message.py +++ b/src/deepgram/agent/v1/types/function_call_history_message.py @@ -5,9 +5,7 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( - AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, -) +from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem class FunctionCallHistoryMessage(UncheckedBaseModel): @@ -16,9 +14,7 @@ class FunctionCallHistoryMessage(UncheckedBaseModel): """ type: typing.Literal["History"] = "History" - function_calls: typing.List[AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem] = ( - pydantic.Field() - ) + function_calls: typing.List[FunctionCallHistoryMessageFunctionCallsItem] = pydantic.Field() """ List of function call objects """ diff --git a/src/deepgram/agent/v1/types/function_call_history_message_function_calls_item.py b/src/deepgram/agent/v1/types/function_call_history_message_function_calls_item.py new file mode 100644 index 00000000..fddac89d --- /dev/null +++ b/src/deepgram/agent/v1/types/function_call_history_message_function_calls_item.py @@ -0,0 +1,48 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class FunctionCallHistoryMessageFunctionCallsItem(UncheckedBaseModel): + id: str = pydantic.Field() + """ + Unique identifier for the function call + """ + + name: str = pydantic.Field() + """ + Name of the function called + """ + + client_side: bool = pydantic.Field() + """ + Indicates if the call was client-side or server-side + """ + + arguments: str = pydantic.Field() + """ + Arguments passed to the function + """ + + response: str = pydantic.Field() + """ + Response from the function call + """ + + thought_signature: typing.Optional[str] = pydantic.Field(default=None) + """ + Some Gemini models require this as an additional function call identifier + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/core/client_wrapper.py b/src/deepgram/core/client_wrapper.py index 3f0a18a8..f02cdd03 100644 --- a/src/deepgram/core/client_wrapper.py +++ b/src/deepgram/core/client_wrapper.py @@ -37,7 +37,7 @@ def get_headers(self) -> typing.Dict[str, str]: try: _sdk_version = _fern_importlib_metadata.version("deepgram-sdk") except _fern_importlib_metadata.PackageNotFoundError: - _sdk_version = "7.6.1" + _sdk_version = "7.7.1" headers: typing.Dict[str, str] = { "User-Agent": "deepgram-sdk/" + _sdk_version, diff --git a/src/deepgram/core/jsonable_encoder.py b/src/deepgram/core/jsonable_encoder.py index 5b0902eb..f638cc9a 100644 --- a/src/deepgram/core/jsonable_encoder.py +++ b/src/deepgram/core/jsonable_encoder.py @@ -15,6 +15,7 @@ from pathlib import PurePath from types import GeneratorType from typing import Any, Callable, Dict, List, Optional, Set, Union +from urllib.parse import quote import pydantic from .datetime_utils import serialize_datetime @@ -118,3 +119,15 @@ def encode_path_param(obj: Any) -> str: if isinstance(obj, bool): return "true" if obj else "false" return str(jsonable_encoder(obj)) + + +def quote_path_param(obj: Any) -> str: + """Encode a value for use in a URL path segment, percent-encoding it. + + Same as encode_path_param, except the result is percent-encoded so + that a value containing "/" or ".." cannot change which endpoint + the request resolves to. + """ + if isinstance(obj, bool): + return "true" if obj else "false" + return quote(str(jsonable_encoder(obj)), safe="") diff --git a/src/deepgram/listen/__init__.py b/src/deepgram/listen/__init__.py index b3bccf31..54752b7b 100644 --- a/src/deepgram/listen/__init__.py +++ b/src/deepgram/listen/__init__.py @@ -30,6 +30,8 @@ ListenV1ResultsEntitiesItem, ListenV1ResultsEntitiesItemParams, ListenV1ResultsMetadata, + ListenV1ResultsMetadataDiarizeInfo, + ListenV1ResultsMetadataDiarizeInfoParams, ListenV1ResultsMetadataModelInfo, ListenV1ResultsMetadataModelInfoParams, ListenV1ResultsMetadataParams, @@ -42,7 +44,6 @@ from .v2 import ( ListenV2CloseStream, ListenV2CloseStreamParams, - ListenV2CloseStreamType, ListenV2Configure, ListenV2ConfigureFailure, ListenV2ConfigureFailureParams, @@ -57,12 +58,15 @@ ListenV2ConnectedParams, ListenV2FatalError, ListenV2FatalErrorParams, + ListenV2ForceEndTurn, + ListenV2ForceEndTurnParams, ListenV2TurnInfo, ListenV2TurnInfoEvent, ListenV2TurnInfoParams, ListenV2TurnInfoWordsItem, ListenV2TurnInfoWordsItemParams, ) + from .v2 import ListenV2CloseStreamType _dynamic_imports: typing.Dict[str, str] = { "DiarizeModel": ".v1", "ListenV1CloseStream": ".v1", @@ -86,6 +90,8 @@ "ListenV1ResultsEntitiesItem": ".v1", "ListenV1ResultsEntitiesItemParams": ".v1", "ListenV1ResultsMetadata": ".v1", + "ListenV1ResultsMetadataDiarizeInfo": ".v1", + "ListenV1ResultsMetadataDiarizeInfoParams": ".v1", "ListenV1ResultsMetadataModelInfo": ".v1", "ListenV1ResultsMetadataModelInfoParams": ".v1", "ListenV1ResultsMetadataParams": ".v1", @@ -111,6 +117,8 @@ "ListenV2ConnectedParams": ".v2", "ListenV2FatalError": ".v2", "ListenV2FatalErrorParams": ".v2", + "ListenV2ForceEndTurn": ".v2", + "ListenV2ForceEndTurnParams": ".v2", "ListenV2TurnInfo": ".v2", "ListenV2TurnInfoEvent": ".v2", "ListenV2TurnInfoParams": ".v2", @@ -165,6 +173,8 @@ def __dir__(): "ListenV1ResultsEntitiesItem", "ListenV1ResultsEntitiesItemParams", "ListenV1ResultsMetadata", + "ListenV1ResultsMetadataDiarizeInfo", + "ListenV1ResultsMetadataDiarizeInfoParams", "ListenV1ResultsMetadataModelInfo", "ListenV1ResultsMetadataModelInfoParams", "ListenV1ResultsMetadataParams", @@ -190,6 +200,8 @@ def __dir__(): "ListenV2ConnectedParams", "ListenV2FatalError", "ListenV2FatalErrorParams", + "ListenV2ForceEndTurn", + "ListenV2ForceEndTurnParams", "ListenV2TurnInfo", "ListenV2TurnInfoEvent", "ListenV2TurnInfoParams", diff --git a/src/deepgram/listen/v1/__init__.py b/src/deepgram/listen/v1/__init__.py index 9311daf3..43f24006 100644 --- a/src/deepgram/listen/v1/__init__.py +++ b/src/deepgram/listen/v1/__init__.py @@ -21,6 +21,7 @@ ListenV1ResultsChannelAlternativesItemWordsItem, ListenV1ResultsEntitiesItem, ListenV1ResultsMetadata, + ListenV1ResultsMetadataDiarizeInfo, ListenV1ResultsMetadataModelInfo, ListenV1SpeechStarted, ListenV1UtteranceEnd, @@ -47,6 +48,7 @@ ListenV1ResultsChannelAlternativesItemWordsItemParams, ListenV1ResultsChannelParams, ListenV1ResultsEntitiesItemParams, + ListenV1ResultsMetadataDiarizeInfoParams, ListenV1ResultsMetadataModelInfoParams, ListenV1ResultsMetadataParams, ListenV1ResultsParams, @@ -76,6 +78,8 @@ "ListenV1ResultsEntitiesItem": ".types", "ListenV1ResultsEntitiesItemParams": ".requests", "ListenV1ResultsMetadata": ".types", + "ListenV1ResultsMetadataDiarizeInfo": ".types", + "ListenV1ResultsMetadataDiarizeInfoParams": ".requests", "ListenV1ResultsMetadataModelInfo": ".types", "ListenV1ResultsMetadataModelInfoParams": ".requests", "ListenV1ResultsMetadataParams": ".requests", @@ -142,6 +146,8 @@ def __dir__(): "ListenV1ResultsEntitiesItem", "ListenV1ResultsEntitiesItemParams", "ListenV1ResultsMetadata", + "ListenV1ResultsMetadataDiarizeInfo", + "ListenV1ResultsMetadataDiarizeInfoParams", "ListenV1ResultsMetadataModelInfo", "ListenV1ResultsMetadataModelInfoParams", "ListenV1ResultsMetadataParams", diff --git a/src/deepgram/listen/v1/client.py b/src/deepgram/listen/v1/client.py index c0be4754..e257a08c 100644 --- a/src/deepgram/listen/v1/client.py +++ b/src/deepgram/listen/v1/client.py @@ -175,7 +175,7 @@ def connect( version : typing.Optional[ListenV1Version] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -382,7 +382,7 @@ async def connect( version : typing.Optional[ListenV1Version] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/listen/v1/media/client.py b/src/deepgram/listen/v1/media/client.py index a8f6655b..eb71694e 100644 --- a/src/deepgram/listen/v1/media/client.py +++ b/src/deepgram/listen/v1/media/client.py @@ -215,43 +215,6 @@ def transcribe_url( api_key="YOUR_API_KEY", ) client.listen.v1.media.transcribe_url( - callback="callback", - callback_method="POST", - extra="extra", - sentiment=True, - summarize="v2", - tag="tag", - topics=True, - custom_topic="custom_topic", - custom_topic_mode="extended", - intents=True, - custom_intent="custom_intent", - custom_intent_mode="extended", - detect_entities=True, - detect_language=True, - diarize=True, - diarize_model="latest", - dictation=True, - encoding="linear16", - filler_words=True, - keyterm=["keyterm"], - keywords="keywords", - language="language", - measurements=True, - model="nova-3", - multichannel=True, - numerals=True, - paragraphs=True, - profanity_filter=True, - punctuate=True, - redact="redact", - replace="replace", - search="search", - smart_format=True, - utterances=True, - utt_split=1.1, - version="latest", - mip_opt_out=True, url="https://dpgr.am/spacewalk.wav", ) """ @@ -725,43 +688,6 @@ async def transcribe_url( async def main() -> None: await client.listen.v1.media.transcribe_url( - callback="callback", - callback_method="POST", - extra="extra", - sentiment=True, - summarize="v2", - tag="tag", - topics=True, - custom_topic="custom_topic", - custom_topic_mode="extended", - intents=True, - custom_intent="custom_intent", - custom_intent_mode="extended", - detect_entities=True, - detect_language=True, - diarize=True, - diarize_model="latest", - dictation=True, - encoding="linear16", - filler_words=True, - keyterm=["keyterm"], - keywords="keywords", - language="language", - measurements=True, - model="nova-3", - multichannel=True, - numerals=True, - paragraphs=True, - profanity_filter=True, - punctuate=True, - redact="redact", - replace="replace", - search="search", - smart_format=True, - utterances=True, - utt_split=1.1, - version="latest", - mip_opt_out=True, url="https://dpgr.am/spacewalk.wav", ) diff --git a/src/deepgram/listen/v1/raw_client.py b/src/deepgram/listen/v1/raw_client.py index dc4bdecd..9330b1d0 100644 --- a/src/deepgram/listen/v1/raw_client.py +++ b/src/deepgram/listen/v1/raw_client.py @@ -156,7 +156,7 @@ def connect( version : typing.Optional[ListenV1Version] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -342,7 +342,7 @@ async def connect( version : typing.Optional[ListenV1Version] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/listen/v1/requests/__init__.py b/src/deepgram/listen/v1/requests/__init__.py index 828c41d2..f9e3c7fb 100644 --- a/src/deepgram/listen/v1/requests/__init__.py +++ b/src/deepgram/listen/v1/requests/__init__.py @@ -18,6 +18,7 @@ ) from .listen_v1results_entities_item import ListenV1ResultsEntitiesItemParams from .listen_v1results_metadata import ListenV1ResultsMetadataParams + from .listen_v1results_metadata_diarize_info import ListenV1ResultsMetadataDiarizeInfoParams from .listen_v1results_metadata_model_info import ListenV1ResultsMetadataModelInfoParams from .listen_v1speech_started import ListenV1SpeechStartedParams from .listen_v1utterance_end import ListenV1UtteranceEndParams @@ -30,6 +31,7 @@ "ListenV1ResultsChannelAlternativesItemWordsItemParams": ".listen_v1results_channel_alternatives_item_words_item", "ListenV1ResultsChannelParams": ".listen_v1results_channel", "ListenV1ResultsEntitiesItemParams": ".listen_v1results_entities_item", + "ListenV1ResultsMetadataDiarizeInfoParams": ".listen_v1results_metadata_diarize_info", "ListenV1ResultsMetadataModelInfoParams": ".listen_v1results_metadata_model_info", "ListenV1ResultsMetadataParams": ".listen_v1results_metadata", "ListenV1ResultsParams": ".listen_v1results", @@ -68,6 +70,7 @@ def __dir__(): "ListenV1ResultsChannelAlternativesItemWordsItemParams", "ListenV1ResultsChannelParams", "ListenV1ResultsEntitiesItemParams", + "ListenV1ResultsMetadataDiarizeInfoParams", "ListenV1ResultsMetadataModelInfoParams", "ListenV1ResultsMetadataParams", "ListenV1ResultsParams", diff --git a/src/deepgram/listen/v1/requests/listen_v1results_channel_alternatives_item_words_item.py b/src/deepgram/listen/v1/requests/listen_v1results_channel_alternatives_item_words_item.py index 9b48906b..d49a96bb 100644 --- a/src/deepgram/listen/v1/requests/listen_v1results_channel_alternatives_item_words_item.py +++ b/src/deepgram/listen/v1/requests/listen_v1results_channel_alternatives_item_words_item.py @@ -36,5 +36,5 @@ class ListenV1ResultsChannelAlternativesItemWordsItemParams(typing_extensions.Ty speaker: typing_extensions.NotRequired[int] """ - The speaker of the word + The speaker of the word, present when diarization is enabled """ diff --git a/src/deepgram/listen/v1/requests/listen_v1results_metadata.py b/src/deepgram/listen/v1/requests/listen_v1results_metadata.py index fb5037c8..f544ad4e 100644 --- a/src/deepgram/listen/v1/requests/listen_v1results_metadata.py +++ b/src/deepgram/listen/v1/requests/listen_v1results_metadata.py @@ -1,6 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing_extensions +from .listen_v1results_metadata_diarize_info import ListenV1ResultsMetadataDiarizeInfoParams from .listen_v1results_metadata_model_info import ListenV1ResultsMetadataModelInfoParams @@ -15,3 +16,8 @@ class ListenV1ResultsMetadataParams(typing_extensions.TypedDict): """ The model UUID """ + + diarize_info: typing_extensions.NotRequired[ListenV1ResultsMetadataDiarizeInfoParams] + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ diff --git a/src/deepgram/listen/v1/requests/listen_v1results_metadata_diarize_info.py b/src/deepgram/listen/v1/requests/listen_v1results_metadata_diarize_info.py new file mode 100644 index 00000000..010a204d --- /dev/null +++ b/src/deepgram/listen/v1/requests/listen_v1results_metadata_diarize_info.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions + + +class ListenV1ResultsMetadataDiarizeInfoParams(typing_extensions.TypedDict): + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + + model_uuid: str + """ + The diarizer model UUID + """ + + arch: str + """ + The diarizer arch, such as `v1` or `v2` + """ diff --git a/src/deepgram/listen/v1/types/__init__.py b/src/deepgram/listen/v1/types/__init__.py index 81de9477..1ad88785 100644 --- a/src/deepgram/listen/v1/types/__init__.py +++ b/src/deepgram/listen/v1/types/__init__.py @@ -20,6 +20,7 @@ from .listen_v1results_channel_alternatives_item_words_item import ListenV1ResultsChannelAlternativesItemWordsItem from .listen_v1results_entities_item import ListenV1ResultsEntitiesItem from .listen_v1results_metadata import ListenV1ResultsMetadata + from .listen_v1results_metadata_diarize_info import ListenV1ResultsMetadataDiarizeInfo from .listen_v1results_metadata_model_info import ListenV1ResultsMetadataModelInfo from .listen_v1speech_started import ListenV1SpeechStarted from .listen_v1utterance_end import ListenV1UtteranceEnd @@ -38,6 +39,7 @@ "ListenV1ResultsChannelAlternativesItemWordsItem": ".listen_v1results_channel_alternatives_item_words_item", "ListenV1ResultsEntitiesItem": ".listen_v1results_entities_item", "ListenV1ResultsMetadata": ".listen_v1results_metadata", + "ListenV1ResultsMetadataDiarizeInfo": ".listen_v1results_metadata_diarize_info", "ListenV1ResultsMetadataModelInfo": ".listen_v1results_metadata_model_info", "ListenV1SpeechStarted": ".listen_v1speech_started", "ListenV1UtteranceEnd": ".listen_v1utterance_end", @@ -80,6 +82,7 @@ def __dir__(): "ListenV1ResultsChannelAlternativesItemWordsItem", "ListenV1ResultsEntitiesItem", "ListenV1ResultsMetadata", + "ListenV1ResultsMetadataDiarizeInfo", "ListenV1ResultsMetadataModelInfo", "ListenV1SpeechStarted", "ListenV1UtteranceEnd", diff --git a/src/deepgram/listen/v1/types/listen_v1results_channel_alternatives_item_words_item.py b/src/deepgram/listen/v1/types/listen_v1results_channel_alternatives_item_words_item.py index dd4580e1..3ab0533c 100644 --- a/src/deepgram/listen/v1/types/listen_v1results_channel_alternatives_item_words_item.py +++ b/src/deepgram/listen/v1/types/listen_v1results_channel_alternatives_item_words_item.py @@ -40,7 +40,7 @@ class ListenV1ResultsChannelAlternativesItemWordsItem(UncheckedBaseModel): speaker: typing.Optional[int] = pydantic.Field(default=None) """ - The speaker of the word + The speaker of the word, present when diarization is enabled """ if IS_PYDANTIC_V2: diff --git a/src/deepgram/listen/v1/types/listen_v1results_metadata.py b/src/deepgram/listen/v1/types/listen_v1results_metadata.py index 8e086c1c..5dfefa84 100644 --- a/src/deepgram/listen/v1/types/listen_v1results_metadata.py +++ b/src/deepgram/listen/v1/types/listen_v1results_metadata.py @@ -5,6 +5,7 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel +from .listen_v1results_metadata_diarize_info import ListenV1ResultsMetadataDiarizeInfo from .listen_v1results_metadata_model_info import ListenV1ResultsMetadataModelInfo @@ -20,6 +21,11 @@ class ListenV1ResultsMetadata(UncheckedBaseModel): The model UUID """ + diarize_info: typing.Optional[ListenV1ResultsMetadataDiarizeInfo] = pydantic.Field(default=None) + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info.py b/src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info.py new file mode 100644 index 00000000..0efccd8e --- /dev/null +++ b/src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ListenV1ResultsMetadataDiarizeInfo(UncheckedBaseModel): + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + + model_uuid: str = pydantic.Field() + """ + The diarizer model UUID + """ + + arch: str = pydantic.Field() + """ + The diarizer arch, such as `v1` or `v2` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/listen/v2/__init__.py b/src/deepgram/listen/v2/__init__.py index ca134a12..ebb5f4a9 100644 --- a/src/deepgram/listen/v2/__init__.py +++ b/src/deepgram/listen/v2/__init__.py @@ -8,7 +8,6 @@ if typing.TYPE_CHECKING: from .types import ( ListenV2CloseStream, - ListenV2CloseStreamType, ListenV2Configure, ListenV2ConfigureFailure, ListenV2ConfigureSuccess, @@ -16,6 +15,7 @@ ListenV2ConfigureThresholds, ListenV2Connected, ListenV2FatalError, + ListenV2ForceEndTurn, ListenV2TurnInfo, ListenV2TurnInfoEvent, ListenV2TurnInfoWordsItem, @@ -29,9 +29,11 @@ ListenV2ConfigureThresholdsParams, ListenV2ConnectedParams, ListenV2FatalErrorParams, + ListenV2ForceEndTurnParams, ListenV2TurnInfoParams, ListenV2TurnInfoWordsItemParams, ) + from .types import ListenV2CloseStreamType _dynamic_imports: typing.Dict[str, str] = { "ListenV2CloseStream": ".types", "ListenV2CloseStreamParams": ".requests", @@ -50,6 +52,8 @@ "ListenV2ConnectedParams": ".requests", "ListenV2FatalError": ".types", "ListenV2FatalErrorParams": ".requests", + "ListenV2ForceEndTurn": ".types", + "ListenV2ForceEndTurnParams": ".requests", "ListenV2TurnInfo": ".types", "ListenV2TurnInfoEvent": ".types", "ListenV2TurnInfoParams": ".requests", @@ -97,6 +101,8 @@ def __dir__(): "ListenV2ConnectedParams", "ListenV2FatalError", "ListenV2FatalErrorParams", + "ListenV2ForceEndTurn", + "ListenV2ForceEndTurnParams", "ListenV2TurnInfo", "ListenV2TurnInfoEvent", "ListenV2TurnInfoParams", diff --git a/src/deepgram/listen/v2/client.py b/src/deepgram/listen/v2/client.py index eb92e294..b76e41be 100644 --- a/src/deepgram/listen/v2/client.py +++ b/src/deepgram/listen/v2/client.py @@ -103,7 +103,7 @@ def connect( tag : typing.Optional[ListenV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -246,7 +246,7 @@ async def connect( tag : typing.Optional[ListenV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/listen/v2/raw_client.py b/src/deepgram/listen/v2/raw_client.py index 304c2dac..f5160709 100644 --- a/src/deepgram/listen/v2/raw_client.py +++ b/src/deepgram/listen/v2/raw_client.py @@ -91,7 +91,7 @@ def connect( tag : typing.Optional[ListenV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -223,7 +223,7 @@ async def connect( tag : typing.Optional[ListenV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/listen/v2/requests/__init__.py b/src/deepgram/listen/v2/requests/__init__.py index 84e08faa..2f5e8b72 100644 --- a/src/deepgram/listen/v2/requests/__init__.py +++ b/src/deepgram/listen/v2/requests/__init__.py @@ -14,6 +14,7 @@ from .listen_v2configure_thresholds import ListenV2ConfigureThresholdsParams from .listen_v2connected import ListenV2ConnectedParams from .listen_v2fatal_error import ListenV2FatalErrorParams + from .listen_v2force_end_turn import ListenV2ForceEndTurnParams from .listen_v2turn_info import ListenV2TurnInfoParams from .listen_v2turn_info_words_item import ListenV2TurnInfoWordsItemParams _dynamic_imports: typing.Dict[str, str] = { @@ -25,6 +26,7 @@ "ListenV2ConfigureThresholdsParams": ".listen_v2configure_thresholds", "ListenV2ConnectedParams": ".listen_v2connected", "ListenV2FatalErrorParams": ".listen_v2fatal_error", + "ListenV2ForceEndTurnParams": ".listen_v2force_end_turn", "ListenV2TurnInfoParams": ".listen_v2turn_info", "ListenV2TurnInfoWordsItemParams": ".listen_v2turn_info_words_item", } @@ -60,6 +62,7 @@ def __dir__(): "ListenV2ConfigureThresholdsParams", "ListenV2ConnectedParams", "ListenV2FatalErrorParams", + "ListenV2ForceEndTurnParams", "ListenV2TurnInfoParams", "ListenV2TurnInfoWordsItemParams", ] diff --git a/src/deepgram/listen/v2/requests/listen_v2force_end_turn.py b/src/deepgram/listen/v2/requests/listen_v2force_end_turn.py new file mode 100644 index 00000000..19d28c95 --- /dev/null +++ b/src/deepgram/listen/v2/requests/listen_v2force_end_turn.py @@ -0,0 +1,12 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions + + +class ListenV2ForceEndTurnParams(typing_extensions.TypedDict): + type: typing.Literal["ForceEndTurn"] + """ + Message type identifier + """ diff --git a/src/deepgram/listen/v2/requests/listen_v2turn_info.py b/src/deepgram/listen/v2/requests/listen_v2turn_info.py index 71671453..4f18d57c 100644 --- a/src/deepgram/listen/v2/requests/listen_v2turn_info.py +++ b/src/deepgram/listen/v2/requests/listen_v2turn_info.py @@ -64,6 +64,19 @@ class ListenV2TurnInfoParams(typing_extensions.TypedDict): Confidence that no more speech is coming in this turn """ + trigger: typing_extensions.NotRequired[str] + """ + The cause of the turn ending. Present on every `EndOfTurn` event and only there. + + - **model** - the turn ended by Flux's native end-of-turn detection + + - **manual** - the turn ended because a `ForceEndTurn` message was sent + + - **timeout** - the turn ended because `eot_timeout_ms` elapsed + + This is an open enum. New values may be added over time, so clients must tolerate values they do not recognize. + """ + languages: typing_extensions.NotRequired[typing.Sequence[str]] """ Detected languages sorted by descending frequency in the diff --git a/src/deepgram/listen/v2/socket_client.py b/src/deepgram/listen/v2/socket_client.py index 13f81517..b441bbb0 100644 --- a/src/deepgram/listen/v2/socket_client.py +++ b/src/deepgram/listen/v2/socket_client.py @@ -13,6 +13,7 @@ from .types.listen_v2configure_success import ListenV2ConfigureSuccess from .types.listen_v2connected import ListenV2Connected from .types.listen_v2fatal_error import ListenV2FatalError +from .types.listen_v2force_end_turn import ListenV2ForceEndTurn from .types.listen_v2turn_info import ListenV2TurnInfo try: @@ -88,6 +89,22 @@ async def send_close_stream(self, message: typing.Optional[ListenV2CloseStream] """ await self._send_model(message or ListenV2CloseStream(type="CloseStream")) + async def send_force_end_turn(self, message: typing.Optional[ListenV2ForceEndTurn] = None) -> None: + """ + Send a message to the websocket connection. + The message will be sent as a ListenV2ForceEndTurn. + + Ends the current turn immediately, whatever the end-of-turn confidence. The + resulting ``TurnInfo`` carries ``trigger="manual"``, and the connection stays open + for the next turn. + + Requires server-side enablement. On a deployment without it the server replies + ``UNPARSABLE_CLIENT_MESSAGE`` ("The ForceEndTurn message is not enabled on this + deployment.") and **closes the connection**, so guard against that path until the + feature is confirmed live for the deployment you target. + """ + await self._send_model(message or ListenV2ForceEndTurn(type="ForceEndTurn")) + async def send_configure( self, message: typing.Union[ListenV2Configure, typing.Dict[str, typing.Any]] ) -> None: @@ -192,6 +209,22 @@ def send_close_stream(self, message: typing.Optional[ListenV2CloseStream] = None """ self._send_model(message or ListenV2CloseStream(type="CloseStream")) + def send_force_end_turn(self, message: typing.Optional[ListenV2ForceEndTurn] = None) -> None: + """ + Send a message to the websocket connection. + The message will be sent as a ListenV2ForceEndTurn. + + Ends the current turn immediately, whatever the end-of-turn confidence. The + resulting ``TurnInfo`` carries ``trigger="manual"``, and the connection stays open + for the next turn. + + Requires server-side enablement. On a deployment without it the server replies + ``UNPARSABLE_CLIENT_MESSAGE`` ("The ForceEndTurn message is not enabled on this + deployment.") and **closes the connection**, so guard against that path until the + feature is confirmed live for the deployment you target. + """ + self._send_model(message or ListenV2ForceEndTurn(type="ForceEndTurn")) + def send_configure(self, message: typing.Union[ListenV2Configure, typing.Dict[str, typing.Any]]) -> None: """ Send a message to the websocket connection. diff --git a/src/deepgram/listen/v2/types/__init__.py b/src/deepgram/listen/v2/types/__init__.py index 15cc6fba..7f084d96 100644 --- a/src/deepgram/listen/v2/types/__init__.py +++ b/src/deepgram/listen/v2/types/__init__.py @@ -7,7 +7,6 @@ if typing.TYPE_CHECKING: from .listen_v2close_stream import ListenV2CloseStream - from .listen_v2close_stream_type import ListenV2CloseStreamType from .listen_v2configure import ListenV2Configure from .listen_v2configure_failure import ListenV2ConfigureFailure from .listen_v2configure_success import ListenV2ConfigureSuccess @@ -15,9 +14,11 @@ from .listen_v2configure_thresholds import ListenV2ConfigureThresholds from .listen_v2connected import ListenV2Connected from .listen_v2fatal_error import ListenV2FatalError + from .listen_v2force_end_turn import ListenV2ForceEndTurn from .listen_v2turn_info import ListenV2TurnInfo from .listen_v2turn_info_event import ListenV2TurnInfoEvent from .listen_v2turn_info_words_item import ListenV2TurnInfoWordsItem + from .listen_v2close_stream_type import ListenV2CloseStreamType _dynamic_imports: typing.Dict[str, str] = { "ListenV2CloseStream": ".listen_v2close_stream", "ListenV2CloseStreamType": ".listen_v2close_stream_type", @@ -28,6 +29,7 @@ "ListenV2ConfigureThresholds": ".listen_v2configure_thresholds", "ListenV2Connected": ".listen_v2connected", "ListenV2FatalError": ".listen_v2fatal_error", + "ListenV2ForceEndTurn": ".listen_v2force_end_turn", "ListenV2TurnInfo": ".listen_v2turn_info", "ListenV2TurnInfoEvent": ".listen_v2turn_info_event", "ListenV2TurnInfoWordsItem": ".listen_v2turn_info_words_item", @@ -65,6 +67,7 @@ def __dir__(): "ListenV2ConfigureThresholds", "ListenV2Connected", "ListenV2FatalError", + "ListenV2ForceEndTurn", "ListenV2TurnInfo", "ListenV2TurnInfoEvent", "ListenV2TurnInfoWordsItem", diff --git a/src/deepgram/listen/v2/types/listen_v2force_end_turn.py b/src/deepgram/listen/v2/types/listen_v2force_end_turn.py new file mode 100644 index 00000000..a2f6b044 --- /dev/null +++ b/src/deepgram/listen/v2/types/listen_v2force_end_turn.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class ListenV2ForceEndTurn(UncheckedBaseModel): + type: typing.Literal["ForceEndTurn"] = pydantic.Field(default="ForceEndTurn") + """ + Message type identifier + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/listen/v2/types/listen_v2turn_info.py b/src/deepgram/listen/v2/types/listen_v2turn_info.py index d8fd72b9..969d6d0c 100644 --- a/src/deepgram/listen/v2/types/listen_v2turn_info.py +++ b/src/deepgram/listen/v2/types/listen_v2turn_info.py @@ -66,6 +66,19 @@ class ListenV2TurnInfo(ListenV2ResponseDictCompatModel): Confidence that no more speech is coming in this turn """ + trigger: typing.Optional[str] = pydantic.Field(default=None) + """ + The cause of the turn ending. Present on every `EndOfTurn` event and only there. + + - **model** - the turn ended by Flux's native end-of-turn detection + + - **manual** - the turn ended because a `ForceEndTurn` message was sent + + - **timeout** - the turn ended because `eot_timeout_ms` elapsed + + This is an open enum. New values may be added over time, so clients must tolerate values they do not recognize. + """ + languages: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ Detected languages sorted by descending frequency in the diff --git a/src/deepgram/requests/__init__.py b/src/deepgram/requests/__init__.py index c82a9fc2..e3de268f 100644 --- a/src/deepgram/requests/__init__.py +++ b/src/deepgram/requests/__init__.py @@ -25,10 +25,9 @@ from .billing_breakdown_v1response_results_item import BillingBreakdownV1ResponseResultsItemParams from .billing_breakdown_v1response_results_item_grouping import BillingBreakdownV1ResponseResultsItemGroupingParams from .cartesia import CartesiaParams - from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams + from .cartesia_voice import CartesiaVoiceParams from .create_agent_configuration_v1response import CreateAgentConfigurationV1ResponseParams from .create_key_v1request import CreateKeyV1RequestParams - from .create_key_v1request_one import CreateKeyV1RequestOneParams from .create_key_v1response import CreateKeyV1ResponseParams from .create_project_distribution_credentials_v1response import CreateProjectDistributionCredentialsV1ResponseParams from .create_project_distribution_credentials_v1response_distribution_credentials import ( @@ -41,7 +40,6 @@ from .deepgram import DeepgramParams from .deepgram_listen_provider_v1 import DeepgramListenProviderV1Params from .deepgram_listen_provider_v2 import DeepgramListenProviderV2Params - from .deepgram_listen_provider_v2language_hint import DeepgramListenProviderV2LanguageHintParams from .delete_project_invite_v1response import DeleteProjectInviteV1ResponseParams from .delete_project_key_v1response import DeleteProjectKeyV1ResponseParams from .delete_project_member_v1response import DeleteProjectMemberV1ResponseParams @@ -108,6 +106,7 @@ from .listen_v1accepted_response import ListenV1AcceptedResponseParams from .listen_v1response import ListenV1ResponseParams from .listen_v1response_metadata import ListenV1ResponseMetadataParams + from .listen_v1response_metadata_diarize_info import ListenV1ResponseMetadataDiarizeInfoParams from .listen_v1response_metadata_intents_info import ListenV1ResponseMetadataIntentsInfoParams from .listen_v1response_metadata_sentiment_info import ListenV1ResponseMetadataSentimentInfoParams from .listen_v1response_metadata_summary_info import ListenV1ResponseMetadataSummaryInfoParams @@ -219,6 +218,9 @@ from .usage_fields_v1response_models_item import UsageFieldsV1ResponseModelsItemParams from .usage_v1response import UsageV1ResponseParams from .usage_v1response_resolution import UsageV1ResponseResolutionParams + from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams + from .create_key_v1request_one import CreateKeyV1RequestOneParams + from .deepgram_listen_provider_v2language_hint import DeepgramListenProviderV2LanguageHintParams _dynamic_imports: typing.Dict[str, str] = { "AgentConfigurationV1Params": ".agent_configuration_v1", "AgentThinkModelsV1ResponseModelsItemIdParams": ".agent_think_models_v1response_models_item_id", @@ -240,9 +242,10 @@ "BillingBreakdownV1ResponseResultsItemParams": ".billing_breakdown_v1response_results_item", "CartesiaParams": ".cartesia", "CartesiaSpeakProviderVoiceParams": ".cartesia_speak_provider_voice", + "CartesiaVoiceParams": ".cartesia_voice", "CreateAgentConfigurationV1ResponseParams": ".create_agent_configuration_v1response", - "CreateKeyV1RequestParams": ".create_key_v1request", "CreateKeyV1RequestOneParams": ".create_key_v1request_one", + "CreateKeyV1RequestParams": ".create_key_v1request", "CreateKeyV1ResponseParams": ".create_key_v1response", "CreateProjectDistributionCredentialsV1ResponseDistributionCredentialsParams": ".create_project_distribution_credentials_v1response_distribution_credentials", "CreateProjectDistributionCredentialsV1ResponseMemberParams": ".create_project_distribution_credentials_v1response_member", @@ -306,6 +309,7 @@ "ListProjectsV1ResponseParams": ".list_projects_v1response", "ListProjectsV1ResponseProjectsItemParams": ".list_projects_v1response_projects_item", "ListenV1AcceptedResponseParams": ".listen_v1accepted_response", + "ListenV1ResponseMetadataDiarizeInfoParams": ".listen_v1response_metadata_diarize_info", "ListenV1ResponseMetadataIntentsInfoParams": ".listen_v1response_metadata_intents_info", "ListenV1ResponseMetadataParams": ".listen_v1response_metadata", "ListenV1ResponseMetadataSentimentInfoParams": ".listen_v1response_metadata_sentiment_info", @@ -436,9 +440,10 @@ def __dir__(): "BillingBreakdownV1ResponseResultsItemParams", "CartesiaParams", "CartesiaSpeakProviderVoiceParams", + "CartesiaVoiceParams", "CreateAgentConfigurationV1ResponseParams", - "CreateKeyV1RequestParams", "CreateKeyV1RequestOneParams", + "CreateKeyV1RequestParams", "CreateKeyV1ResponseParams", "CreateProjectDistributionCredentialsV1ResponseDistributionCredentialsParams", "CreateProjectDistributionCredentialsV1ResponseMemberParams", @@ -502,6 +507,7 @@ def __dir__(): "ListProjectsV1ResponseParams", "ListProjectsV1ResponseProjectsItemParams", "ListenV1AcceptedResponseParams", + "ListenV1ResponseMetadataDiarizeInfoParams", "ListenV1ResponseMetadataIntentsInfoParams", "ListenV1ResponseMetadataParams", "ListenV1ResponseMetadataSentimentInfoParams", diff --git a/src/deepgram/requests/anthropic.py b/src/deepgram/requests/anthropic.py index 3b60c72d..c5b22f99 100644 --- a/src/deepgram/requests/anthropic.py +++ b/src/deepgram/requests/anthropic.py @@ -3,7 +3,7 @@ import typing import typing_extensions -from ..types.anthropic_think_provider_model import AnthropicThinkProviderModel +from ..types.anthropic_model import AnthropicModel class AnthropicParams(typing_extensions.TypedDict): @@ -13,7 +13,7 @@ class AnthropicParams(typing_extensions.TypedDict): The REST API version for the Anthropic Messages API """ - model: AnthropicThinkProviderModel + model: AnthropicModel """ Anthropic model to use """ diff --git a/src/deepgram/requests/cartesia.py b/src/deepgram/requests/cartesia.py index 40d34328..91e7d2e1 100644 --- a/src/deepgram/requests/cartesia.py +++ b/src/deepgram/requests/cartesia.py @@ -3,8 +3,8 @@ import typing import typing_extensions -from ..types.cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId -from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams +from ..types.cartesia_model_id import CartesiaModelId +from .cartesia_voice import CartesiaVoiceParams class CartesiaParams(typing_extensions.TypedDict): @@ -14,12 +14,12 @@ class CartesiaParams(typing_extensions.TypedDict): The API version header for the Cartesia text-to-speech API """ - model_id: CartesiaSpeakProviderModelId + model_id: CartesiaModelId """ Cartesia model ID """ - voice: CartesiaSpeakProviderVoiceParams + voice: CartesiaVoiceParams language: typing_extensions.NotRequired[str] """ Cartesia language code diff --git a/src/deepgram/requests/cartesia_speak_provider_voice.py b/src/deepgram/requests/cartesia_speak_provider_voice.py index 89929e27..f6a8ea06 100644 --- a/src/deepgram/requests/cartesia_speak_provider_voice.py +++ b/src/deepgram/requests/cartesia_speak_provider_voice.py @@ -1,15 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing_extensions +from .cartesia_voice import CartesiaVoiceParams - -class CartesiaSpeakProviderVoiceParams(typing_extensions.TypedDict): - mode: str - """ - Cartesia voice mode - """ - - id: str - """ - Cartesia voice ID - """ +CartesiaSpeakProviderVoiceParams = CartesiaVoiceParams diff --git a/src/deepgram/requests/cartesia_voice.py b/src/deepgram/requests/cartesia_voice.py new file mode 100644 index 00000000..8b066f1e --- /dev/null +++ b/src/deepgram/requests/cartesia_voice.py @@ -0,0 +1,15 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions + + +class CartesiaVoiceParams(typing_extensions.TypedDict): + mode: str + """ + Cartesia voice mode + """ + + id: str + """ + Cartesia voice ID + """ diff --git a/src/deepgram/requests/deepgram.py b/src/deepgram/requests/deepgram.py index d0a5e24f..c8ddc121 100644 --- a/src/deepgram/requests/deepgram.py +++ b/src/deepgram/requests/deepgram.py @@ -3,12 +3,12 @@ import typing import typing_extensions -from ..types.deepgram_speak_provider_model import DeepgramSpeakProviderModel +from ..types.deepgram_model import DeepgramModel class DeepgramParams(typing_extensions.TypedDict): """ - Deepgram text-to-speech provider. Aura models use version v1 (default); Flux TTS uses version v2 and a flux-* model. + Deepgram text-to-speech provider. Aura models use version v1 (default); Flux TTS uses version v2 and a flux-* model. Flux TTS is the default when agent.speak is omitted, using the flux-kit-en voice. """ type: typing.Literal["deepgram"] @@ -17,12 +17,12 @@ class DeepgramParams(typing_extensions.TypedDict): The Deepgram text-to-speech model family. Accepted values: `v1` (Aura, the default) and `v2` (Flux TTS). Use `v1` with an aura-* model and `v2` with a flux-* model. Defaults to `v1` when omitted. """ - model: DeepgramSpeakProviderModel + model: DeepgramModel """ - Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). + Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). Defaults to flux-kit-en when agent.speak is omitted. """ speed: typing_extensions.NotRequired[float] """ - Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages. + Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Aura (version v1) accepts any value from 0.7 to 1.5. Flux TTS (version v2) accepts only 0.85, 0.9, 0.95, 1.0, 1.05, 1.1 and 1.15; another value ends the session with FAILED_TO_SPEAK. Not yet supported in all languages. """ diff --git a/src/deepgram/requests/google.py b/src/deepgram/requests/google.py index 3610ee95..a1173415 100644 --- a/src/deepgram/requests/google.py +++ b/src/deepgram/requests/google.py @@ -3,18 +3,18 @@ import typing import typing_extensions -from ..types.google_think_provider_model import GoogleThinkProviderModel -from ..types.google_think_provider_version import GoogleThinkProviderVersion +from ..types.google_model import GoogleModel +from ..types.google_version import GoogleVersion class GoogleParams(typing_extensions.TypedDict): type: typing.Literal["google"] - version: typing_extensions.NotRequired[GoogleThinkProviderVersion] + version: typing_extensions.NotRequired[GoogleVersion] """ The Google API used for the request: ai-studio-v1beta for the AI Studio API, or gemini-enterprise-agent-v1 for the Gemini Enterprise Agent (GEA) API. v1beta is accepted as an alias for ai-studio-v1beta. Defaults based on the Deepgram Voice Agent endpoint you connect to. """ - model: GoogleThinkProviderModel + model: GoogleModel """ Google model to use """ diff --git a/src/deepgram/requests/groq.py b/src/deepgram/requests/groq.py index 2f31525f..0988bb2d 100644 --- a/src/deepgram/requests/groq.py +++ b/src/deepgram/requests/groq.py @@ -3,7 +3,7 @@ import typing import typing_extensions -from ..types.groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode +from ..types.groq_reasoning_mode import GroqReasoningMode class GroqParams(typing_extensions.TypedDict): @@ -23,7 +23,7 @@ class GroqParams(typing_extensions.TypedDict): Groq temperature (0-2) """ - reasoning_mode: typing_extensions.NotRequired[GroqThinkProviderReasoningMode] + reasoning_mode: typing_extensions.NotRequired[GroqReasoningMode] """ OpenAI reasoning_effort """ diff --git a/src/deepgram/requests/listen_v1response_metadata.py b/src/deepgram/requests/listen_v1response_metadata.py index 100cb4a1..5dbe3f84 100644 --- a/src/deepgram/requests/listen_v1response_metadata.py +++ b/src/deepgram/requests/listen_v1response_metadata.py @@ -4,6 +4,7 @@ import typing import typing_extensions +from .listen_v1response_metadata_diarize_info import ListenV1ResponseMetadataDiarizeInfoParams from .listen_v1response_metadata_intents_info import ListenV1ResponseMetadataIntentsInfoParams from .listen_v1response_metadata_sentiment_info import ListenV1ResponseMetadataSentimentInfoParams from .listen_v1response_metadata_summary_info import ListenV1ResponseMetadataSummaryInfoParams @@ -19,6 +20,11 @@ class ListenV1ResponseMetadataParams(typing_extensions.TypedDict): channels: int models: typing.Sequence[str] model_info: typing.Dict[str, typing.Any] + diarize_info: typing_extensions.NotRequired[ListenV1ResponseMetadataDiarizeInfoParams] + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + summary_info: typing_extensions.NotRequired[ListenV1ResponseMetadataSummaryInfoParams] sentiment_info: typing_extensions.NotRequired[ListenV1ResponseMetadataSentimentInfoParams] topics_info: typing_extensions.NotRequired[ListenV1ResponseMetadataTopicsInfoParams] diff --git a/src/deepgram/requests/listen_v1response_metadata_diarize_info.py b/src/deepgram/requests/listen_v1response_metadata_diarize_info.py new file mode 100644 index 00000000..2d5920ad --- /dev/null +++ b/src/deepgram/requests/listen_v1response_metadata_diarize_info.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions + + +class ListenV1ResponseMetadataDiarizeInfoParams(typing_extensions.TypedDict): + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + + model_uuid: str + """ + The diarizer model UUID + """ + + arch: str + """ + The diarizer arch, such as `v1` or `v2` + """ diff --git a/src/deepgram/requests/listen_v1response_results_channels_item_alternatives_item_words_item.py b/src/deepgram/requests/listen_v1response_results_channels_item_alternatives_item_words_item.py index e8b15613..8a02b42f 100644 --- a/src/deepgram/requests/listen_v1response_results_channels_item_alternatives_item_words_item.py +++ b/src/deepgram/requests/listen_v1response_results_channels_item_alternatives_item_words_item.py @@ -8,3 +8,12 @@ class ListenV1ResponseResultsChannelsItemAlternativesItemWordsItemParams(typing_ start: typing_extensions.NotRequired[float] end: typing_extensions.NotRequired[float] confidence: typing_extensions.NotRequired[float] + speaker: typing_extensions.NotRequired[int] + """ + The speaker of the word, present when diarization is enabled + """ + + speaker_confidence: typing_extensions.NotRequired[float] + """ + Confidence in the speaker assignment. Returned only for pre-recorded diarization; not available for streaming + """ diff --git a/src/deepgram/requests/speak_settings_v1provider.py b/src/deepgram/requests/speak_settings_v1provider.py index a70fed91..185b1484 100644 --- a/src/deepgram/requests/speak_settings_v1provider.py +++ b/src/deepgram/requests/speak_settings_v1provider.py @@ -7,19 +7,19 @@ import typing_extensions from ..types.aws_polly_speak_provider_engine import AwsPollySpeakProviderEngine from ..types.aws_polly_speak_provider_voice import AwsPollySpeakProviderVoice -from ..types.cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId -from ..types.deepgram_speak_provider_model import DeepgramSpeakProviderModel +from ..types.cartesia_model_id import CartesiaModelId +from ..types.deepgram_model import DeepgramModel from ..types.eleven_labs_speak_provider_model_id import ElevenLabsSpeakProviderModelId from ..types.open_ai_speak_provider_model import OpenAiSpeakProviderModel from ..types.open_ai_speak_provider_voice import OpenAiSpeakProviderVoice from .aws_polly_speak_provider_credentials import AwsPollySpeakProviderCredentialsParams -from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams +from .cartesia_voice import CartesiaVoiceParams class SpeakSettingsV1Provider_DeepgramParams(typing_extensions.TypedDict): type: typing.Literal["deepgram"] version: typing_extensions.NotRequired[str] - model: DeepgramSpeakProviderModel + model: DeepgramModel speed: typing_extensions.NotRequired[float] @@ -34,8 +34,8 @@ class SpeakSettingsV1Provider_ElevenLabsParams(typing_extensions.TypedDict): class SpeakSettingsV1Provider_CartesiaParams(typing_extensions.TypedDict): type: typing.Literal["cartesia"] version: typing_extensions.NotRequired[typing.Literal["2025-03-17"]] - model_id: CartesiaSpeakProviderModelId - voice: CartesiaSpeakProviderVoiceParams + model_id: CartesiaModelId + voice: CartesiaVoiceParams language: typing_extensions.NotRequired[str] volume: typing_extensions.NotRequired[float] diff --git a/src/deepgram/requests/think_settings_v1provider.py b/src/deepgram/requests/think_settings_v1provider.py index 91222666..723b0e12 100644 --- a/src/deepgram/requests/think_settings_v1provider.py +++ b/src/deepgram/requests/think_settings_v1provider.py @@ -5,11 +5,11 @@ import typing import typing_extensions -from ..types.anthropic_think_provider_model import AnthropicThinkProviderModel +from ..types.anthropic_model import AnthropicModel from ..types.aws_bedrock_think_provider_model import AwsBedrockThinkProviderModel -from ..types.google_think_provider_model import GoogleThinkProviderModel -from ..types.google_think_provider_version import GoogleThinkProviderVersion -from ..types.groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode +from ..types.google_model import GoogleModel +from ..types.google_version import GoogleVersion +from ..types.groq_reasoning_mode import GroqReasoningMode from ..types.open_ai_think_provider_model import OpenAiThinkProviderModel from ..types.open_ai_think_provider_reasoning_mode import OpenAiThinkProviderReasoningMode from .aws_bedrock_think_provider_credentials import AwsBedrockThinkProviderCredentialsParams @@ -33,14 +33,14 @@ class ThinkSettingsV1Provider_AwsBedrockParams(typing_extensions.TypedDict): class ThinkSettingsV1Provider_AnthropicParams(typing_extensions.TypedDict): type: typing.Literal["anthropic"] version: typing_extensions.NotRequired[typing.Literal["v1"]] - model: AnthropicThinkProviderModel + model: AnthropicModel temperature: typing_extensions.NotRequired[float] class ThinkSettingsV1Provider_GoogleParams(typing_extensions.TypedDict): type: typing.Literal["google"] - version: typing_extensions.NotRequired[GoogleThinkProviderVersion] - model: GoogleThinkProviderModel + version: typing_extensions.NotRequired[GoogleVersion] + model: GoogleModel temperature: typing_extensions.NotRequired[float] @@ -49,7 +49,7 @@ class ThinkSettingsV1Provider_GroqParams(typing_extensions.TypedDict): version: typing_extensions.NotRequired[typing.Literal["v1"]] model: typing.Literal["openai/gpt-oss-20b"] temperature: typing_extensions.NotRequired[float] - reasoning_mode: typing_extensions.NotRequired[GroqThinkProviderReasoningMode] + reasoning_mode: typing_extensions.NotRequired[GroqReasoningMode] ThinkSettingsV1ProviderParams = typing.Union[ diff --git a/src/deepgram/speak/v1/client.py b/src/deepgram/speak/v1/client.py index 5ccfa933..9ca18428 100644 --- a/src/deepgram/speak/v1/client.py +++ b/src/deepgram/speak/v1/client.py @@ -76,7 +76,7 @@ def connect( speed : typing.Optional[SpeakV1Speed] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -184,7 +184,7 @@ async def connect( speed : typing.Optional[SpeakV1Speed] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/speak/v1/raw_client.py b/src/deepgram/speak/v1/raw_client.py index f2ecc306..48636494 100644 --- a/src/deepgram/speak/v1/raw_client.py +++ b/src/deepgram/speak/v1/raw_client.py @@ -57,7 +57,7 @@ def connect( speed : typing.Optional[SpeakV1Speed] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -144,7 +144,7 @@ async def connect( speed : typing.Optional[SpeakV1Speed] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/speak/v2/audio/client.py b/src/deepgram/speak/v2/audio/client.py index 47193389..6e72e33b 100644 --- a/src/deepgram/speak/v2/audio/client.py +++ b/src/deepgram/speak/v2/audio/client.py @@ -79,13 +79,13 @@ def generate( Encoding allows you to specify the expected encoding of your audio output expressivity : typing.Optional[int] - Expressive range of the generated speech. `0` is the voice's nominal delivery; negative values are flatter and more restrained, positive values more animated. + Expressive range of the generated speech, on a calm-to-animated axis. Accepted values: `-2`, `-1`, `0`, `1`, `2`. `0` (the default) is the voice's tuned delivery and the production-validated setting, with `-2` the calm end of the range and `2` the animated end. Supported on all Flux voices; applies to the whole request. Beta: behavior may change in future model versions, and non-default values increase the risk of hallucinations and pronunciation errors; audition before shipping. An invalid value is rejected with a `400` — `EXPRESSIVITY_OUT_OF_RANGE` for a value outside the range, `EXPRESSIVITY_INCREMENT_INVALID` for a fractional value. See [Expressivity](/docs/tts-expressivity). sample_rate : typing.Optional[int] Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable speed : typing.Optional[float] - Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Only the multipliers listed here are accepted — the range is 0.85 to 1.15 in 0.05 increments. Not yet supported in all languages. + Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run `0.85` to `1.15` in `0.05` increments. Not yet supported in all languages. priority : typing.Optional[typing.Literal["low"]] Processing priority for asynchronous (callback) requests. The only supported value is low. @@ -195,13 +195,13 @@ async def generate( Encoding allows you to specify the expected encoding of your audio output expressivity : typing.Optional[int] - Expressive range of the generated speech. `0` is the voice's nominal delivery; negative values are flatter and more restrained, positive values more animated. + Expressive range of the generated speech, on a calm-to-animated axis. Accepted values: `-2`, `-1`, `0`, `1`, `2`. `0` (the default) is the voice's tuned delivery and the production-validated setting, with `-2` the calm end of the range and `2` the animated end. Supported on all Flux voices; applies to the whole request. Beta: behavior may change in future model versions, and non-default values increase the risk of hallucinations and pronunciation errors; audition before shipping. An invalid value is rejected with a `400` — `EXPRESSIVITY_OUT_OF_RANGE` for a value outside the range, `EXPRESSIVITY_INCREMENT_INVALID` for a fractional value. See [Expressivity](/docs/tts-expressivity). sample_rate : typing.Optional[int] Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable speed : typing.Optional[float] - Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Only the multipliers listed here are accepted — the range is 0.85 to 1.15 in 0.05 increments. Not yet supported in all languages. + Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run `0.85` to `1.15` in `0.05` increments. Not yet supported in all languages. priority : typing.Optional[typing.Literal["low"]] Processing priority for asynchronous (callback) requests. The only supported value is low. diff --git a/src/deepgram/speak/v2/audio/raw_client.py b/src/deepgram/speak/v2/audio/raw_client.py index e53e0eb7..088e63b5 100644 --- a/src/deepgram/speak/v2/audio/raw_client.py +++ b/src/deepgram/speak/v2/audio/raw_client.py @@ -76,13 +76,13 @@ def generate( Encoding allows you to specify the expected encoding of your audio output expressivity : typing.Optional[int] - Expressive range of the generated speech. `0` is the voice's nominal delivery; negative values are flatter and more restrained, positive values more animated. + Expressive range of the generated speech, on a calm-to-animated axis. Accepted values: `-2`, `-1`, `0`, `1`, `2`. `0` (the default) is the voice's tuned delivery and the production-validated setting, with `-2` the calm end of the range and `2` the animated end. Supported on all Flux voices; applies to the whole request. Beta: behavior may change in future model versions, and non-default values increase the risk of hallucinations and pronunciation errors; audition before shipping. An invalid value is rejected with a `400` — `EXPRESSIVITY_OUT_OF_RANGE` for a value outside the range, `EXPRESSIVITY_INCREMENT_INVALID` for a fractional value. See [Expressivity](/docs/tts-expressivity). sample_rate : typing.Optional[int] Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable speed : typing.Optional[float] - Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Only the multipliers listed here are accepted — the range is 0.85 to 1.15 in 0.05 increments. Not yet supported in all languages. + Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run `0.85` to `1.15` in `0.05` increments. Not yet supported in all languages. priority : typing.Optional[typing.Literal["low"]] Processing priority for asynchronous (callback) requests. The only supported value is low. @@ -215,13 +215,13 @@ async def generate( Encoding allows you to specify the expected encoding of your audio output expressivity : typing.Optional[int] - Expressive range of the generated speech. `0` is the voice's nominal delivery; negative values are flatter and more restrained, positive values more animated. + Expressive range of the generated speech, on a calm-to-animated axis. Accepted values: `-2`, `-1`, `0`, `1`, `2`. `0` (the default) is the voice's tuned delivery and the production-validated setting, with `-2` the calm end of the range and `2` the animated end. Supported on all Flux voices; applies to the whole request. Beta: behavior may change in future model versions, and non-default values increase the risk of hallucinations and pronunciation errors; audition before shipping. An invalid value is rejected with a `400` — `EXPRESSIVITY_OUT_OF_RANGE` for a value outside the range, `EXPRESSIVITY_INCREMENT_INVALID` for a fractional value. See [Expressivity](/docs/tts-expressivity). sample_rate : typing.Optional[int] Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable speed : typing.Optional[float] - Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Only the multipliers listed here are accepted — the range is 0.85 to 1.15 in 0.05 increments. Not yet supported in all languages. + Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Accepted values run `0.85` to `1.15` in `0.05` increments. Not yet supported in all languages. priority : typing.Optional[typing.Literal["low"]] Processing priority for asynchronous (callback) requests. The only supported value is low. diff --git a/src/deepgram/speak/v2/client.py b/src/deepgram/speak/v2/client.py index d53c7022..904a5b18 100644 --- a/src/deepgram/speak/v2/client.py +++ b/src/deepgram/speak/v2/client.py @@ -86,7 +86,7 @@ def connect( tag : typing.Optional[SpeakV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -204,7 +204,7 @@ async def connect( tag : typing.Optional[SpeakV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/speak/v2/raw_client.py b/src/deepgram/speak/v2/raw_client.py index f11eef00..7aa71788 100644 --- a/src/deepgram/speak/v2/raw_client.py +++ b/src/deepgram/speak/v2/raw_client.py @@ -67,7 +67,7 @@ def connect( tag : typing.Optional[SpeakV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` @@ -164,7 +164,7 @@ async def connect( tag : typing.Optional[SpeakV2Tag] authorization : typing.Optional[str] - Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/guides/deep-dives/using-the-sec-websocket-protocol) header instead. + Use your API key or a [temporary token](/guides/fundamentals/token-based-authentication) for authentication via the `Authorization` header. In client-side environments where custom headers are not supported, use the [`Sec-WebSocket-Protocol`](/docs/using-the-sec-websocket-protocol) header instead. **Example:** `Authorization: Token %DEEPGRAM_API_KEY%` or `Authorization: Bearer %DEEPGRAM_TOKEN%` diff --git a/src/deepgram/speak/v2/requests/speak_v2configure.py b/src/deepgram/speak/v2/requests/speak_v2configure.py index 4201069f..282d52e1 100644 --- a/src/deepgram/speak/v2/requests/speak_v2configure.py +++ b/src/deepgram/speak/v2/requests/speak_v2configure.py @@ -3,7 +3,7 @@ import typing import typing_extensions -from ....types.speak_v2speed import SpeakV2Speed +from ....types.speak_v2speed_value import SpeakV2SpeedValue class SpeakV2ConfigureParams(typing_extensions.TypedDict): @@ -12,4 +12,4 @@ class SpeakV2ConfigureParams(typing_extensions.TypedDict): Message type identifier """ - speed: typing_extensions.NotRequired[SpeakV2Speed] + speed: typing_extensions.NotRequired[SpeakV2SpeedValue] diff --git a/src/deepgram/speak/v2/requests/speak_v2configure_success_applied.py b/src/deepgram/speak/v2/requests/speak_v2configure_success_applied.py index e4e91665..52399ece 100644 --- a/src/deepgram/speak/v2/requests/speak_v2configure_success_applied.py +++ b/src/deepgram/speak/v2/requests/speak_v2configure_success_applied.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing_extensions -from ....types.speak_v2speed import SpeakV2Speed +from ....types.speak_v2speed_value import SpeakV2SpeedValue class SpeakV2ConfigureSuccessAppliedParams(typing_extensions.TypedDict): @@ -9,4 +9,4 @@ class SpeakV2ConfigureSuccessAppliedParams(typing_extensions.TypedDict): Synthesis configuration. A field is present only when it has been set on this session. """ - speed: typing_extensions.NotRequired[SpeakV2Speed] + speed: typing_extensions.NotRequired[SpeakV2SpeedValue] diff --git a/src/deepgram/speak/v2/requests/speak_v2warning.py b/src/deepgram/speak/v2/requests/speak_v2warning.py index fb5df32b..043986a7 100644 --- a/src/deepgram/speak/v2/requests/speak_v2warning.py +++ b/src/deepgram/speak/v2/requests/speak_v2warning.py @@ -15,7 +15,7 @@ class SpeakV2WarningParams(typing_extensions.TypedDict): """ Warning code identifying the condition, in `SCREAMING_SNAKE_CASE`. - Turn-scoped codes: `NO_ACTIVE_SPEECH` (a speech-scoped message arrived with no active turn), `NO_SYNTHESIZABLE_TEXT` (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration `SpeechMetadata`).`SYNTHESIS_RETRYING` (a synthesis request failed and is being retried). + Turn-scoped codes: `NO_ACTIVE_SPEECH` (a speech-scoped message arrived with no active turn), `NO_SYNTHESIZABLE_TEXT` (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration `SpeechMetadata`), and `SYNTHESIS_RETRYING` (a synthesis request failed and is being retried). Inline-control codes are reserved and not currently emitted, because inline pause and pronunciation controls are not yet applied: `BREAKS_LIMIT_EXCEEDED` (too many pause controls, or two pauses with no intervening text), `BREAK_TOKENS_OUT_OF_RANGE` (pause durations outside the range the model supports), `BREAK_TOKENS_WITH_INVALID_INCREMENTS` (pause durations off the model's supported increment), `PRONUNCIATION_WARNINGS` (a pronunciation override contained invalid IPA), `PRONUNCIATION_TOO_LONG` (an IPA string exceeded the length limit), `PRONUNCIATIONS_LIMIT_EXCEEDED` (too many pronunciation controls in one turn). diff --git a/src/deepgram/speak/v2/types/speak_v2configure.py b/src/deepgram/speak/v2/types/speak_v2configure.py index 013a1f05..37e51d58 100644 --- a/src/deepgram/speak/v2/types/speak_v2configure.py +++ b/src/deepgram/speak/v2/types/speak_v2configure.py @@ -5,7 +5,7 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from ....types.speak_v2speed import SpeakV2Speed +from ....types.speak_v2speed_value import SpeakV2SpeedValue class SpeakV2Configure(UncheckedBaseModel): @@ -14,7 +14,7 @@ class SpeakV2Configure(UncheckedBaseModel): Message type identifier """ - speed: typing.Optional[SpeakV2Speed] = None + speed: typing.Optional[SpeakV2SpeedValue] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/deepgram/speak/v2/types/speak_v2configure_success_applied.py b/src/deepgram/speak/v2/types/speak_v2configure_success_applied.py index 507d9ea9..b8d2eab4 100644 --- a/src/deepgram/speak/v2/types/speak_v2configure_success_applied.py +++ b/src/deepgram/speak/v2/types/speak_v2configure_success_applied.py @@ -5,7 +5,7 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from ....types.speak_v2speed import SpeakV2Speed +from ....types.speak_v2speed_value import SpeakV2SpeedValue class SpeakV2ConfigureSuccessApplied(UncheckedBaseModel): @@ -13,7 +13,7 @@ class SpeakV2ConfigureSuccessApplied(UncheckedBaseModel): Synthesis configuration. A field is present only when it has been set on this session. """ - speed: typing.Optional[SpeakV2Speed] = None + speed: typing.Optional[SpeakV2SpeedValue] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/deepgram/speak/v2/types/speak_v2warning.py b/src/deepgram/speak/v2/types/speak_v2warning.py index 1097e63a..c4a06db4 100644 --- a/src/deepgram/speak/v2/types/speak_v2warning.py +++ b/src/deepgram/speak/v2/types/speak_v2warning.py @@ -17,7 +17,7 @@ class SpeakV2Warning(UncheckedBaseModel): """ Warning code identifying the condition, in `SCREAMING_SNAKE_CASE`. - Turn-scoped codes: `NO_ACTIVE_SPEECH` (a speech-scoped message arrived with no active turn), `NO_SYNTHESIZABLE_TEXT` (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration `SpeechMetadata`).`SYNTHESIS_RETRYING` (a synthesis request failed and is being retried). + Turn-scoped codes: `NO_ACTIVE_SPEECH` (a speech-scoped message arrived with no active turn), `NO_SYNTHESIZABLE_TEXT` (the turn's text was entirely whitespace or punctuation, so it produced no audio and is completed with a zero-duration `SpeechMetadata`), and `SYNTHESIS_RETRYING` (a synthesis request failed and is being retried). Inline-control codes are reserved and not currently emitted, because inline pause and pronunciation controls are not yet applied: `BREAKS_LIMIT_EXCEEDED` (too many pause controls, or two pauses with no intervening text), `BREAK_TOKENS_OUT_OF_RANGE` (pause durations outside the range the model supports), `BREAK_TOKENS_WITH_INVALID_INCREMENTS` (pause durations off the model's supported increment), `PRONUNCIATION_WARNINGS` (a pronunciation override contained invalid IPA), `PRONUNCIATION_TOO_LONG` (an IPA string exceeded the length limit), `PRONUNCIATIONS_LIMIT_EXCEEDED` (too many pronunciation controls in one turn). diff --git a/src/deepgram/types/__init__.py b/src/deepgram/types/__init__.py index d4a9b67d..54b2869d 100644 --- a/src/deepgram/types/__init__.py +++ b/src/deepgram/types/__init__.py @@ -6,10 +6,6 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .google_think_provider_version import GoogleThinkProviderVersion - from .listen_v2redact import ListenV2Redact - from .speak_v2expressivity import SpeakV2Expressivity - from .speak_v2speed import SpeakV2Speed from .agent_configuration_v1 import AgentConfigurationV1 from .agent_think_models_v1response import AgentThinkModelsV1Response from .agent_think_models_v1response_models_item import AgentThinkModelsV1ResponseModelsItem @@ -23,7 +19,7 @@ from .agent_think_models_v1response_models_item_zero_id import AgentThinkModelsV1ResponseModelsItemZeroId from .agent_variable_v1 import AgentVariableV1 from .anthropic import Anthropic - from .anthropic_think_provider_model import AnthropicThinkProviderModel + from .anthropic_model import AnthropicModel from .aws_bedrock_think_provider import AwsBedrockThinkProvider from .aws_bedrock_think_provider_credentials import AwsBedrockThinkProviderCredentials from .aws_bedrock_think_provider_credentials_type import AwsBedrockThinkProviderCredentialsType @@ -38,11 +34,10 @@ from .billing_breakdown_v1response_results_item import BillingBreakdownV1ResponseResultsItem from .billing_breakdown_v1response_results_item_grouping import BillingBreakdownV1ResponseResultsItemGrouping from .cartesia import Cartesia - from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId - from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice + from .cartesia_model_id import CartesiaModelId + from .cartesia_voice import CartesiaVoice from .create_agent_configuration_v1response import CreateAgentConfigurationV1Response from .create_key_v1request import CreateKeyV1Request - from .create_key_v1request_one import CreateKeyV1RequestOne from .create_key_v1response import CreateKeyV1Response from .create_project_distribution_credentials_v1response import CreateProjectDistributionCredentialsV1Response from .create_project_distribution_credentials_v1response_distribution_credentials import ( @@ -55,8 +50,7 @@ from .deepgram import Deepgram from .deepgram_listen_provider_v1 import DeepgramListenProviderV1 from .deepgram_listen_provider_v2 import DeepgramListenProviderV2 - from .deepgram_listen_provider_v2language_hint import DeepgramListenProviderV2LanguageHint - from .deepgram_speak_provider_model import DeepgramSpeakProviderModel + from .deepgram_model import DeepgramModel from .delete_agent_configuration_v1response import DeleteAgentConfigurationV1Response from .delete_agent_variable_v1response import DeleteAgentVariableV1Response from .delete_project_invite_v1response import DeleteProjectInviteV1Response @@ -88,10 +82,11 @@ from .get_project_request_v1response import GetProjectRequestV1Response from .get_project_v1response import GetProjectV1Response from .google import Google - from .google_think_provider_model import GoogleThinkProviderModel + from .google_model import GoogleModel + from .google_version import GoogleVersion from .grant_v1response import GrantV1Response from .groq import Groq - from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode + from .groq_reasoning_mode import GroqReasoningMode from .leave_project_v1response import LeaveProjectV1Response from .list_agent_configurations_v1response import ListAgentConfigurationsV1Response from .list_agent_variables_v1response import ListAgentVariablesV1Response @@ -152,6 +147,7 @@ from .listen_v1request_file import ListenV1RequestFile from .listen_v1response import ListenV1Response from .listen_v1response_metadata import ListenV1ResponseMetadata + from .listen_v1response_metadata_diarize_info import ListenV1ResponseMetadataDiarizeInfo from .listen_v1response_metadata_intents_info import ListenV1ResponseMetadataIntentsInfo from .listen_v1response_metadata_sentiment_info import ListenV1ResponseMetadataSentimentInfo from .listen_v1response_metadata_summary_info import ListenV1ResponseMetadataSummaryInfo @@ -208,6 +204,7 @@ from .listen_v2model import ListenV2Model from .listen_v2numerals import ListenV2Numerals from .listen_v2profanity_filter import ListenV2ProfanityFilter + from .listen_v2redact import ListenV2Redact from .listen_v2sample_rate import ListenV2SampleRate from .listen_v2tag import ListenV2Tag from .open_ai_speak_provider import OpenAiSpeakProvider @@ -264,10 +261,13 @@ from .speak_v1speed import SpeakV1Speed from .speak_v2accepted_response import SpeakV2AcceptedResponse from .speak_v2encoding import SpeakV2Encoding + from .speak_v2expressivity import SpeakV2Expressivity from .speak_v2mip_opt_out import SpeakV2MipOptOut from .speak_v2model import SpeakV2Model from .speak_v2response import SpeakV2Response from .speak_v2sample_rate import SpeakV2SampleRate + from .speak_v2speed import SpeakV2Speed + from .speak_v2speed_value import SpeakV2SpeedValue from .speak_v2tag import SpeakV2Tag from .think_settings_v1 import ThinkSettingsV1 from .think_settings_v1context_length import ThinkSettingsV1ContextLength @@ -292,11 +292,16 @@ from .usage_fields_v1response_models_item import UsageFieldsV1ResponseModelsItem from .usage_v1response import UsageV1Response from .usage_v1response_resolution import UsageV1ResponseResolution + from .anthropic_think_provider_model import AnthropicThinkProviderModel + from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId + from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice + from .create_key_v1request_one import CreateKeyV1RequestOne + from .deepgram_listen_provider_v2language_hint import DeepgramListenProviderV2LanguageHint + from .deepgram_speak_provider_model import DeepgramSpeakProviderModel + from .google_think_provider_model import GoogleThinkProviderModel + from .google_think_provider_version import GoogleThinkProviderVersion + from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode _dynamic_imports: typing.Dict[str, str] = { - "GoogleThinkProviderVersion": ".google_think_provider_version", - "ListenV2Redact": ".listen_v2redact", - "SpeakV2Expressivity": ".speak_v2expressivity", - "SpeakV2Speed": ".speak_v2speed", "AgentConfigurationV1": ".agent_configuration_v1", "AgentThinkModelsV1Response": ".agent_think_models_v1response", "AgentThinkModelsV1ResponseModelsItem": ".agent_think_models_v1response_models_item", @@ -310,6 +315,7 @@ "AgentThinkModelsV1ResponseModelsItemZeroId": ".agent_think_models_v1response_models_item_zero_id", "AgentVariableV1": ".agent_variable_v1", "Anthropic": ".anthropic", + "AnthropicModel": ".anthropic_model", "AnthropicThinkProviderModel": ".anthropic_think_provider_model", "AwsBedrockThinkProvider": ".aws_bedrock_think_provider", "AwsBedrockThinkProviderCredentials": ".aws_bedrock_think_provider_credentials", @@ -325,8 +331,10 @@ "BillingBreakdownV1ResponseResultsItem": ".billing_breakdown_v1response_results_item", "BillingBreakdownV1ResponseResultsItemGrouping": ".billing_breakdown_v1response_results_item_grouping", "Cartesia": ".cartesia", + "CartesiaModelId": ".cartesia_model_id", "CartesiaSpeakProviderModelId": ".cartesia_speak_provider_model_id", "CartesiaSpeakProviderVoice": ".cartesia_speak_provider_voice", + "CartesiaVoice": ".cartesia_voice", "CreateAgentConfigurationV1Response": ".create_agent_configuration_v1response", "CreateKeyV1Request": ".create_key_v1request", "CreateKeyV1RequestOne": ".create_key_v1request_one", @@ -339,6 +347,7 @@ "DeepgramListenProviderV1": ".deepgram_listen_provider_v1", "DeepgramListenProviderV2": ".deepgram_listen_provider_v2", "DeepgramListenProviderV2LanguageHint": ".deepgram_listen_provider_v2language_hint", + "DeepgramModel": ".deepgram_model", "DeepgramSpeakProviderModel": ".deepgram_speak_provider_model", "DeleteAgentConfigurationV1Response": ".delete_agent_configuration_v1response", "DeleteAgentVariableV1Response": ".delete_agent_variable_v1response", @@ -367,9 +376,13 @@ "GetProjectRequestV1Response": ".get_project_request_v1response", "GetProjectV1Response": ".get_project_v1response", "Google": ".google", + "GoogleModel": ".google_model", "GoogleThinkProviderModel": ".google_think_provider_model", + "GoogleThinkProviderVersion": ".google_think_provider_version", + "GoogleVersion": ".google_version", "GrantV1Response": ".grant_v1response", "Groq": ".groq", + "GroqReasoningMode": ".groq_reasoning_mode", "GroqThinkProviderReasoningMode": ".groq_think_provider_reasoning_mode", "LeaveProjectV1Response": ".leave_project_v1response", "ListAgentConfigurationsV1Response": ".list_agent_configurations_v1response", @@ -425,6 +438,7 @@ "ListenV1RequestFile": ".listen_v1request_file", "ListenV1Response": ".listen_v1response", "ListenV1ResponseMetadata": ".listen_v1response_metadata", + "ListenV1ResponseMetadataDiarizeInfo": ".listen_v1response_metadata_diarize_info", "ListenV1ResponseMetadataIntentsInfo": ".listen_v1response_metadata_intents_info", "ListenV1ResponseMetadataSentimentInfo": ".listen_v1response_metadata_sentiment_info", "ListenV1ResponseMetadataSummaryInfo": ".listen_v1response_metadata_summary_info", @@ -463,6 +477,7 @@ "ListenV2Model": ".listen_v2model", "ListenV2Numerals": ".listen_v2numerals", "ListenV2ProfanityFilter": ".listen_v2profanity_filter", + "ListenV2Redact": ".listen_v2redact", "ListenV2SampleRate": ".listen_v2sample_rate", "ListenV2Tag": ".listen_v2tag", "OpenAiSpeakProvider": ".open_ai_speak_provider", @@ -515,10 +530,13 @@ "SpeakV1Speed": ".speak_v1speed", "SpeakV2AcceptedResponse": ".speak_v2accepted_response", "SpeakV2Encoding": ".speak_v2encoding", + "SpeakV2Expressivity": ".speak_v2expressivity", "SpeakV2MipOptOut": ".speak_v2mip_opt_out", "SpeakV2Model": ".speak_v2model", "SpeakV2Response": ".speak_v2response", "SpeakV2SampleRate": ".speak_v2sample_rate", + "SpeakV2Speed": ".speak_v2speed", + "SpeakV2SpeedValue": ".speak_v2speed_value", "SpeakV2Tag": ".speak_v2tag", "ThinkSettingsV1": ".think_settings_v1", "ThinkSettingsV1ContextLength": ".think_settings_v1context_length", @@ -566,10 +584,6 @@ def __dir__(): __all__ = [ - "GoogleThinkProviderVersion", - "ListenV2Redact", - "SpeakV2Expressivity", - "SpeakV2Speed", "AgentConfigurationV1", "AgentThinkModelsV1Response", "AgentThinkModelsV1ResponseModelsItem", @@ -583,6 +597,7 @@ def __dir__(): "AgentThinkModelsV1ResponseModelsItemZeroId", "AgentVariableV1", "Anthropic", + "AnthropicModel", "AnthropicThinkProviderModel", "AwsBedrockThinkProvider", "AwsBedrockThinkProviderCredentials", @@ -598,8 +613,10 @@ def __dir__(): "BillingBreakdownV1ResponseResultsItem", "BillingBreakdownV1ResponseResultsItemGrouping", "Cartesia", + "CartesiaModelId", "CartesiaSpeakProviderModelId", "CartesiaSpeakProviderVoice", + "CartesiaVoice", "CreateAgentConfigurationV1Response", "CreateKeyV1Request", "CreateKeyV1RequestOne", @@ -612,6 +629,7 @@ def __dir__(): "DeepgramListenProviderV1", "DeepgramListenProviderV2", "DeepgramListenProviderV2LanguageHint", + "DeepgramModel", "DeepgramSpeakProviderModel", "DeleteAgentConfigurationV1Response", "DeleteAgentVariableV1Response", @@ -640,9 +658,13 @@ def __dir__(): "GetProjectRequestV1Response", "GetProjectV1Response", "Google", + "GoogleModel", "GoogleThinkProviderModel", + "GoogleThinkProviderVersion", + "GoogleVersion", "GrantV1Response", "Groq", + "GroqReasoningMode", "GroqThinkProviderReasoningMode", "LeaveProjectV1Response", "ListAgentConfigurationsV1Response", @@ -698,6 +720,7 @@ def __dir__(): "ListenV1RequestFile", "ListenV1Response", "ListenV1ResponseMetadata", + "ListenV1ResponseMetadataDiarizeInfo", "ListenV1ResponseMetadataIntentsInfo", "ListenV1ResponseMetadataSentimentInfo", "ListenV1ResponseMetadataSummaryInfo", @@ -736,6 +759,7 @@ def __dir__(): "ListenV2Model", "ListenV2Numerals", "ListenV2ProfanityFilter", + "ListenV2Redact", "ListenV2SampleRate", "ListenV2Tag", "OpenAiSpeakProvider", @@ -788,10 +812,13 @@ def __dir__(): "SpeakV1Speed", "SpeakV2AcceptedResponse", "SpeakV2Encoding", + "SpeakV2Expressivity", "SpeakV2MipOptOut", "SpeakV2Model", "SpeakV2Response", "SpeakV2SampleRate", + "SpeakV2Speed", + "SpeakV2SpeedValue", "SpeakV2Tag", "ThinkSettingsV1", "ThinkSettingsV1ContextLength", diff --git a/src/deepgram/types/anthropic.py b/src/deepgram/types/anthropic.py index c972254e..da882e5e 100644 --- a/src/deepgram/types/anthropic.py +++ b/src/deepgram/types/anthropic.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .anthropic_think_provider_model import AnthropicThinkProviderModel +from .anthropic_model import AnthropicModel class Anthropic(UncheckedBaseModel): @@ -15,7 +15,7 @@ class Anthropic(UncheckedBaseModel): The REST API version for the Anthropic Messages API """ - model: AnthropicThinkProviderModel = pydantic.Field() + model: AnthropicModel = pydantic.Field() """ Anthropic model to use """ diff --git a/src/deepgram/types/anthropic_model.py b/src/deepgram/types/anthropic_model.py new file mode 100644 index 00000000..452790d0 --- /dev/null +++ b/src/deepgram/types/anthropic_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AnthropicModel = typing.Union[typing.Literal["claude-3-5-haiku-latest", "claude-sonnet-4-20250514"], typing.Any] diff --git a/src/deepgram/types/anthropic_think_provider_model.py b/src/deepgram/types/anthropic_think_provider_model.py index 7c78238f..09284c12 100644 --- a/src/deepgram/types/anthropic_think_provider_model.py +++ b/src/deepgram/types/anthropic_think_provider_model.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .anthropic_model import AnthropicModel -AnthropicThinkProviderModel = typing.Union[ - typing.Literal["claude-3-5-haiku-latest", "claude-sonnet-4-20250514"], typing.Any -] +AnthropicThinkProviderModel = AnthropicModel diff --git a/src/deepgram/types/cartesia.py b/src/deepgram/types/cartesia.py index 5ec0b4d4..32378e58 100644 --- a/src/deepgram/types/cartesia.py +++ b/src/deepgram/types/cartesia.py @@ -5,8 +5,8 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId -from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice +from .cartesia_model_id import CartesiaModelId +from .cartesia_voice import CartesiaVoice class Cartesia(UncheckedBaseModel): @@ -16,12 +16,12 @@ class Cartesia(UncheckedBaseModel): The API version header for the Cartesia text-to-speech API """ - model_id: CartesiaSpeakProviderModelId = pydantic.Field() + model_id: CartesiaModelId = pydantic.Field() """ Cartesia model ID """ - voice: CartesiaSpeakProviderVoice + voice: CartesiaVoice language: typing.Optional[str] = pydantic.Field(default=None) """ Cartesia language code diff --git a/src/deepgram/types/cartesia_model_id.py b/src/deepgram/types/cartesia_model_id.py new file mode 100644 index 00000000..ae408ec6 --- /dev/null +++ b/src/deepgram/types/cartesia_model_id.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CartesiaModelId = typing.Union[typing.Literal["sonic-2", "sonic-multilingual"], typing.Any] diff --git a/src/deepgram/types/cartesia_speak_provider_model_id.py b/src/deepgram/types/cartesia_speak_provider_model_id.py index f8a9d7e9..6b3cad74 100644 --- a/src/deepgram/types/cartesia_speak_provider_model_id.py +++ b/src/deepgram/types/cartesia_speak_provider_model_id.py @@ -1,5 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .cartesia_model_id import CartesiaModelId -CartesiaSpeakProviderModelId = typing.Union[typing.Literal["sonic-2", "sonic-multilingual"], typing.Any] +CartesiaSpeakProviderModelId = CartesiaModelId diff --git a/src/deepgram/types/cartesia_speak_provider_voice.py b/src/deepgram/types/cartesia_speak_provider_voice.py index cfc897e7..952f4182 100644 --- a/src/deepgram/types/cartesia_speak_provider_voice.py +++ b/src/deepgram/types/cartesia_speak_provider_voice.py @@ -1,28 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .cartesia_voice import CartesiaVoice -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2 -from ..core.unchecked_base_model import UncheckedBaseModel - - -class CartesiaSpeakProviderVoice(UncheckedBaseModel): - mode: str = pydantic.Field() - """ - Cartesia voice mode - """ - - id: str = pydantic.Field() - """ - Cartesia voice ID - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow +CartesiaSpeakProviderVoice = CartesiaVoice diff --git a/src/deepgram/types/cartesia_voice.py b/src/deepgram/types/cartesia_voice.py new file mode 100644 index 00000000..9805e3da --- /dev/null +++ b/src/deepgram/types/cartesia_voice.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CartesiaVoice(UncheckedBaseModel): + mode: str = pydantic.Field() + """ + Cartesia voice mode + """ + + id: str = pydantic.Field() + """ + Cartesia voice ID + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/types/deepgram.py b/src/deepgram/types/deepgram.py index ba3c095f..a798a03b 100644 --- a/src/deepgram/types/deepgram.py +++ b/src/deepgram/types/deepgram.py @@ -5,12 +5,12 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .deepgram_speak_provider_model import DeepgramSpeakProviderModel +from .deepgram_model import DeepgramModel class Deepgram(UncheckedBaseModel): """ - Deepgram text-to-speech provider. Aura models use version v1 (default); Flux TTS uses version v2 and a flux-* model. + Deepgram text-to-speech provider. Aura models use version v1 (default); Flux TTS uses version v2 and a flux-* model. Flux TTS is the default when agent.speak is omitted, using the flux-kit-en voice. """ type: typing.Literal["deepgram"] = "deepgram" @@ -19,14 +19,14 @@ class Deepgram(UncheckedBaseModel): The Deepgram text-to-speech model family. Accepted values: `v1` (Aura, the default) and `v2` (Flux TTS). Use `v1` with an aura-* model and `v2` with a flux-* model. Defaults to `v1` when omitted. """ - model: DeepgramSpeakProviderModel = pydantic.Field() + model: DeepgramModel = pydantic.Field() """ - Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). + Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). Defaults to flux-kit-en when agent.speak is omitted. """ speed: typing.Optional[float] = pydantic.Field(default=None) """ - Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages. + Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Aura (version v1) accepts any value from 0.7 to 1.5. Flux TTS (version v2) accepts only 0.85, 0.9, 0.95, 1.0, 1.05, 1.1 and 1.15; another value ends the session with FAILED_TO_SPEAK. Not yet supported in all languages. """ if IS_PYDANTIC_V2: diff --git a/src/deepgram/types/deepgram_model.py b/src/deepgram/types/deepgram_model.py new file mode 100644 index 00000000..71402f99 --- /dev/null +++ b/src/deepgram/types/deepgram_model.py @@ -0,0 +1,108 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeepgramModel = typing.Union[ + typing.Literal[ + "aura-asteria-en", + "aura-luna-en", + "aura-stella-en", + "aura-athena-en", + "aura-hera-en", + "aura-orion-en", + "aura-arcas-en", + "aura-perseus-en", + "aura-angus-en", + "aura-orpheus-en", + "aura-helios-en", + "aura-zeus-en", + "aura-2-amalthea-en", + "aura-2-andromeda-en", + "aura-2-apollo-en", + "aura-2-arcas-en", + "aura-2-aries-en", + "aura-2-asteria-en", + "aura-2-athena-en", + "aura-2-atlas-en", + "aura-2-aurora-en", + "aura-2-callista-en", + "aura-2-cora-en", + "aura-2-cordelia-en", + "aura-2-delia-en", + "aura-2-draco-en", + "aura-2-electra-en", + "aura-2-harmonia-en", + "aura-2-helena-en", + "aura-2-hera-en", + "aura-2-hermes-en", + "aura-2-hyperion-en", + "aura-2-iris-en", + "aura-2-janus-en", + "aura-2-juno-en", + "aura-2-jupiter-en", + "aura-2-luna-en", + "aura-2-mars-en", + "aura-2-minerva-en", + "aura-2-neptune-en", + "aura-2-odysseus-en", + "aura-2-ophelia-en", + "aura-2-orion-en", + "aura-2-orpheus-en", + "aura-2-pandora-en", + "aura-2-phoebe-en", + "aura-2-pluto-en", + "aura-2-saturn-en", + "aura-2-selene-en", + "aura-2-thalia-en", + "aura-2-theia-en", + "aura-2-vesta-en", + "aura-2-zeus-en", + "aura-2-sirio-es", + "aura-2-nestor-es", + "aura-2-carina-es", + "aura-2-celeste-es", + "aura-2-alvaro-es", + "aura-2-diana-es", + "aura-2-aquila-es", + "aura-2-selena-es", + "aura-2-estrella-es", + "aura-2-javier-es", + "flux-alexis-en", + "flux-bree-en", + "flux-brittany-en", + "flux-brooke-en", + "flux-bruce-en", + "flux-cliff-en", + "flux-cole-en", + "flux-colin-en", + "flux-conor-en", + "flux-donovan-en", + "flux-drew-en", + "flux-elise-en", + "flux-gemma-en", + "flux-haley-en", + "flux-hannah-en", + "flux-heather-en", + "flux-jack-en", + "flux-kai-en", + "flux-kelsey-en", + "flux-kit-en", + "flux-maeve-en", + "flux-marcelo-en", + "flux-marcus-en", + "flux-meena-en", + "flux-meghan-en", + "flux-miles-en", + "flux-naveen-en", + "flux-paige-en", + "flux-priya-en", + "flux-rufus-en", + "flux-sean-en", + "flux-sharon-en", + "flux-sienna-en", + "flux-tanner-en", + "flux-wade-en", + "flux-wes-en", + ], + typing.Any, +] diff --git a/src/deepgram/types/deepgram_speak_provider_model.py b/src/deepgram/types/deepgram_speak_provider_model.py index a4530678..ed9646f8 100644 --- a/src/deepgram/types/deepgram_speak_provider_model.py +++ b/src/deepgram/types/deepgram_speak_provider_model.py @@ -1,84 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .deepgram_model import DeepgramModel -DeepgramSpeakProviderModel = typing.Union[ - typing.Literal[ - "aura-asteria-en", - "aura-luna-en", - "aura-stella-en", - "aura-athena-en", - "aura-hera-en", - "aura-orion-en", - "aura-arcas-en", - "aura-perseus-en", - "aura-angus-en", - "aura-orpheus-en", - "aura-helios-en", - "aura-zeus-en", - "aura-2-amalthea-en", - "aura-2-andromeda-en", - "aura-2-apollo-en", - "aura-2-arcas-en", - "aura-2-aries-en", - "aura-2-asteria-en", - "aura-2-athena-en", - "aura-2-atlas-en", - "aura-2-aurora-en", - "aura-2-callista-en", - "aura-2-cora-en", - "aura-2-cordelia-en", - "aura-2-delia-en", - "aura-2-draco-en", - "aura-2-electra-en", - "aura-2-harmonia-en", - "aura-2-helena-en", - "aura-2-hera-en", - "aura-2-hermes-en", - "aura-2-hyperion-en", - "aura-2-iris-en", - "aura-2-janus-en", - "aura-2-juno-en", - "aura-2-jupiter-en", - "aura-2-luna-en", - "aura-2-mars-en", - "aura-2-minerva-en", - "aura-2-neptune-en", - "aura-2-odysseus-en", - "aura-2-ophelia-en", - "aura-2-orion-en", - "aura-2-orpheus-en", - "aura-2-pandora-en", - "aura-2-phoebe-en", - "aura-2-pluto-en", - "aura-2-saturn-en", - "aura-2-selene-en", - "aura-2-thalia-en", - "aura-2-theia-en", - "aura-2-vesta-en", - "aura-2-zeus-en", - "aura-2-sirio-es", - "aura-2-nestor-es", - "aura-2-carina-es", - "aura-2-celeste-es", - "aura-2-alvaro-es", - "aura-2-diana-es", - "aura-2-aquila-es", - "aura-2-selena-es", - "aura-2-estrella-es", - "aura-2-javier-es", - "flux-haley-en", - "flux-heather-en", - "flux-cole-en", - "flux-alexis-en", - "flux-priya-en", - "flux-jack-en", - "flux-bruce-en", - "flux-rufus-en", - "flux-drew-en", - "flux-renee-en", - "flux-marcus-en", - "flux-sharon-en", - ], - typing.Any, -] +DeepgramSpeakProviderModel = DeepgramModel diff --git a/src/deepgram/types/google.py b/src/deepgram/types/google.py index 463bbc52..c4323d20 100644 --- a/src/deepgram/types/google.py +++ b/src/deepgram/types/google.py @@ -5,18 +5,18 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .google_think_provider_model import GoogleThinkProviderModel -from .google_think_provider_version import GoogleThinkProviderVersion +from .google_model import GoogleModel +from .google_version import GoogleVersion class Google(UncheckedBaseModel): type: typing.Literal["google"] = "google" - version: typing.Optional[GoogleThinkProviderVersion] = pydantic.Field(default=None) + version: typing.Optional[GoogleVersion] = pydantic.Field(default=None) """ The Google API used for the request: ai-studio-v1beta for the AI Studio API, or gemini-enterprise-agent-v1 for the Gemini Enterprise Agent (GEA) API. v1beta is accepted as an alias for ai-studio-v1beta. Defaults based on the Deepgram Voice Agent endpoint you connect to. """ - model: GoogleThinkProviderModel = pydantic.Field() + model: GoogleModel = pydantic.Field() """ Google model to use """ diff --git a/src/deepgram/types/google_model.py b/src/deepgram/types/google_model.py new file mode 100644 index 00000000..71a004d7 --- /dev/null +++ b/src/deepgram/types/google_model.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleModel = typing.Union[typing.Literal["gemini-2.0-flash", "gemini-2.0-flash-lite", "gemini-2.5-flash"], typing.Any] diff --git a/src/deepgram/types/google_think_provider_model.py b/src/deepgram/types/google_think_provider_model.py index a6061bac..74527b1f 100644 --- a/src/deepgram/types/google_think_provider_model.py +++ b/src/deepgram/types/google_think_provider_model.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .google_model import GoogleModel -GoogleThinkProviderModel = typing.Union[ - typing.Literal["gemini-2.0-flash", "gemini-2.0-flash-lite", "gemini-2.5-flash"], typing.Any -] +GoogleThinkProviderModel = GoogleModel diff --git a/src/deepgram/types/google_think_provider_version.py b/src/deepgram/types/google_think_provider_version.py index bc5e8997..20b6dc0f 100644 --- a/src/deepgram/types/google_think_provider_version.py +++ b/src/deepgram/types/google_think_provider_version.py @@ -1,7 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .google_version import GoogleVersion -GoogleThinkProviderVersion = typing.Union[ - typing.Literal["ai-studio-v1beta", "gemini-enterprise-agent-v1", "v1beta"], typing.Any -] +GoogleThinkProviderVersion = GoogleVersion diff --git a/src/deepgram/types/google_version.py b/src/deepgram/types/google_version.py new file mode 100644 index 00000000..f155d9b6 --- /dev/null +++ b/src/deepgram/types/google_version.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GoogleVersion = typing.Union[typing.Literal["ai-studio-v1beta", "gemini-enterprise-agent-v1", "v1beta"], typing.Any] diff --git a/src/deepgram/types/groq.py b/src/deepgram/types/groq.py index fa0350e7..53664f46 100644 --- a/src/deepgram/types/groq.py +++ b/src/deepgram/types/groq.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode +from .groq_reasoning_mode import GroqReasoningMode class Groq(UncheckedBaseModel): @@ -25,7 +25,7 @@ class Groq(UncheckedBaseModel): Groq temperature (0-2) """ - reasoning_mode: typing.Optional[GroqThinkProviderReasoningMode] = pydantic.Field(default=None) + reasoning_mode: typing.Optional[GroqReasoningMode] = pydantic.Field(default=None) """ OpenAI reasoning_effort """ diff --git a/src/deepgram/types/groq_reasoning_mode.py b/src/deepgram/types/groq_reasoning_mode.py new file mode 100644 index 00000000..7742b9f7 --- /dev/null +++ b/src/deepgram/types/groq_reasoning_mode.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +GroqReasoningMode = typing.Union[typing.Literal["none", "minimal", "low", "medium", "high"], typing.Any] diff --git a/src/deepgram/types/groq_think_provider_reasoning_mode.py b/src/deepgram/types/groq_think_provider_reasoning_mode.py index 2a5b1e8c..005dd23d 100644 --- a/src/deepgram/types/groq_think_provider_reasoning_mode.py +++ b/src/deepgram/types/groq_think_provider_reasoning_mode.py @@ -1,5 +1,5 @@ # This file was auto-generated by Fern from our API Definition. -import typing +from .groq_reasoning_mode import GroqReasoningMode -GroqThinkProviderReasoningMode = typing.Union[typing.Literal["none", "minimal", "low", "medium", "high"], typing.Any] +GroqThinkProviderReasoningMode = GroqReasoningMode diff --git a/src/deepgram/types/listen_v1response_metadata.py b/src/deepgram/types/listen_v1response_metadata.py index 974a9ecc..055c02ba 100644 --- a/src/deepgram/types/listen_v1response_metadata.py +++ b/src/deepgram/types/listen_v1response_metadata.py @@ -6,6 +6,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .listen_v1response_metadata_diarize_info import ListenV1ResponseMetadataDiarizeInfo from .listen_v1response_metadata_intents_info import ListenV1ResponseMetadataIntentsInfo from .listen_v1response_metadata_sentiment_info import ListenV1ResponseMetadataSentimentInfo from .listen_v1response_metadata_summary_info import ListenV1ResponseMetadataSummaryInfo @@ -21,6 +22,11 @@ class ListenV1ResponseMetadata(UncheckedBaseModel): channels: int models: typing.List[str] model_info: typing.Dict[str, typing.Any] + diarize_info: typing.Optional[ListenV1ResponseMetadataDiarizeInfo] = pydantic.Field(default=None) + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + summary_info: typing.Optional[ListenV1ResponseMetadataSummaryInfo] = None sentiment_info: typing.Optional[ListenV1ResponseMetadataSentimentInfo] = None topics_info: typing.Optional[ListenV1ResponseMetadataTopicsInfo] = None diff --git a/src/deepgram/types/listen_v1response_metadata_diarize_info.py b/src/deepgram/types/listen_v1response_metadata_diarize_info.py new file mode 100644 index 00000000..947e3627 --- /dev/null +++ b/src/deepgram/types/listen_v1response_metadata_diarize_info.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class ListenV1ResponseMetadataDiarizeInfo(UncheckedBaseModel): + """ + The diarizer that produced the speaker labels. Present only when a diarizer ran. + """ + + model_uuid: str = pydantic.Field() + """ + The diarizer model UUID + """ + + arch: str = pydantic.Field() + """ + The diarizer arch, such as `v1` or `v2` + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/types/listen_v1response_results_channels_item_alternatives_item_words_item.py b/src/deepgram/types/listen_v1response_results_channels_item_alternatives_item_words_item.py index c2b63fa5..2038fbce 100644 --- a/src/deepgram/types/listen_v1response_results_channels_item_alternatives_item_words_item.py +++ b/src/deepgram/types/listen_v1response_results_channels_item_alternatives_item_words_item.py @@ -12,6 +12,15 @@ class ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem(UncheckedBase start: typing.Optional[float] = None end: typing.Optional[float] = None confidence: typing.Optional[float] = None + speaker: typing.Optional[int] = pydantic.Field(default=None) + """ + The speaker of the word, present when diarization is enabled + """ + + speaker_confidence: typing.Optional[float] = pydantic.Field(default=None) + """ + Confidence in the speaker assignment. Returned only for pre-recorded diarization; not available for streaming + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/deepgram/types/listen_v2eot_threshold.py b/src/deepgram/types/listen_v2eot_threshold.py index c774974d..09fdb458 100644 --- a/src/deepgram/types/listen_v2eot_threshold.py +++ b/src/deepgram/types/listen_v2eot_threshold.py @@ -5,5 +5,6 @@ ListenV2EotThreshold = typing.Any """ End-of-turn confidence required to finish a turn. Valid Values 0.5 - -0.9. +1.0. Set to 1.0 to fully suppress natural end-of-turn detection and +drive turn endings yourself with the `ForceEndTurn` message. """ diff --git a/src/deepgram/types/speak_settings_v1provider.py b/src/deepgram/types/speak_settings_v1provider.py index 5c696e33..b8c3bdf6 100644 --- a/src/deepgram/types/speak_settings_v1provider.py +++ b/src/deepgram/types/speak_settings_v1provider.py @@ -11,9 +11,9 @@ from .aws_polly_speak_provider_credentials import AwsPollySpeakProviderCredentials from .aws_polly_speak_provider_engine import AwsPollySpeakProviderEngine from .aws_polly_speak_provider_voice import AwsPollySpeakProviderVoice -from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId -from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice -from .deepgram_speak_provider_model import DeepgramSpeakProviderModel +from .cartesia_model_id import CartesiaModelId +from .cartesia_voice import CartesiaVoice +from .deepgram_model import DeepgramModel from .eleven_labs_speak_provider_model_id import ElevenLabsSpeakProviderModelId from .open_ai_speak_provider_model import OpenAiSpeakProviderModel from .open_ai_speak_provider_voice import OpenAiSpeakProviderVoice @@ -22,7 +22,7 @@ class SpeakSettingsV1Provider_Deepgram(UncheckedBaseModel): type: typing.Literal["deepgram"] = "deepgram" version: typing.Optional[str] = None - model: DeepgramSpeakProviderModel + model: DeepgramModel speed: typing.Optional[float] = None if IS_PYDANTIC_V2: @@ -55,8 +55,8 @@ class Config: class SpeakSettingsV1Provider_Cartesia(UncheckedBaseModel): type: typing.Literal["cartesia"] = "cartesia" version: typing.Optional[typing.Literal["2025-03-17"]] = None - model_id: CartesiaSpeakProviderModelId - voice: CartesiaSpeakProviderVoice + model_id: CartesiaModelId + voice: CartesiaVoice language: typing.Optional[str] = None volume: typing.Optional[float] = None diff --git a/src/deepgram/types/speak_v2expressivity.py b/src/deepgram/types/speak_v2expressivity.py index 5b6b14b9..2adb0897 100644 --- a/src/deepgram/types/speak_v2expressivity.py +++ b/src/deepgram/types/speak_v2expressivity.py @@ -2,5 +2,5 @@ SpeakV2Expressivity = int """ -Expressive range of the generated speech. Accepted values: `-2`, `-1`, `0`, `1`, `2`. `0` is the voice's nominal delivery; negative values are flatter and more restrained, positive values more animated. +Expressive range of the generated speech, on a calm-to-animated axis. Accepted values: `-2`, `-1`, `0`, `1`, `2`. `0` (the default) is the voice's tuned delivery and the production-validated setting, with `-2` the calm end of the range and `2` the animated end. Supported on all Flux voices. Fixed for the connection — not settable via `Configure`. Beta: behavior may change in future model versions, and non-default values increase the risk of hallucinations and pronunciation errors; audition before shipping. An invalid value fails the connection with a `400` — `EXPRESSIVITY_OUT_OF_RANGE` for a value outside the range, `EXPRESSIVITY_INCREMENT_INVALID` for a fractional value. See [Expressivity](/docs/tts-expressivity). """ diff --git a/src/deepgram/types/speak_v2speed.py b/src/deepgram/types/speak_v2speed.py index de5837f3..b9e1e10c 100644 --- a/src/deepgram/types/speak_v2speed.py +++ b/src/deepgram/types/speak_v2speed.py @@ -1,6 +1,15 @@ # This file was auto-generated by Fern from our API Definition. +# Backward-compat patch (2026-08-18 regen): the generator retyped this from +# `float` to `Union[Literal["0.85"..."1.15"], Any]` -- a string-literal enum. +# That contradicts the actual API contract (a numeric speech-rate multiplier; +# see the sibling `SpeakV2SpeedValue = float` used by the Configure message) and +# silently changed the documented domain of the `speak.v2.connect(speed=...)` +# parameter from numeric to string. Only the `Any` fallback kept `speed=1.05` +# working. Restored to `float` so the connect param stays exactly what it was on +# `main`, mypy-precise (no reliance on `Any`), and consistent with the Configure +# message. Unfreeze when the spec types the connect `speed` as a number. SpeakV2Speed = float """ -Speech-rate multiplier. `1.0` is the model's nominal rate; lower is slower. Accepted values: `0.85`, `0.90`, `0.95`, `1.00`, `1.05`, `1.10`, `1.15`. Any other value is rejected with `SPEED_OUT_OF_RANGE`, and a value off the `0.05` increment with `SPEED_INCREMENT_INVALID`. +Speech-rate multiplier. `1.0` is the model's nominal rate; lower is slower. Accepted values run `0.85` to `1.15` in `0.05` increments. A value outside that range is rejected with `SPEED_OUT_OF_RANGE`; a value inside it but off the `0.05` increment with `SPEED_INCREMENT_INVALID`. Models and languages without runtime speed control reject any value with `SPEED_NOT_SUPPORTED`. """ diff --git a/src/deepgram/types/speak_v2speed_value.py b/src/deepgram/types/speak_v2speed_value.py new file mode 100644 index 00000000..2a6991ef --- /dev/null +++ b/src/deepgram/types/speak_v2speed_value.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +SpeakV2SpeedValue = float +""" +Speech-rate multiplier. `1.0` is the model's nominal rate; lower is slower. Accepted values run `0.85` to `1.15` in `0.05` increments. A value outside that range is rejected with `SPEED_OUT_OF_RANGE`; a value inside it but off the `0.05` increment with `SPEED_INCREMENT_INVALID`. Models and languages without runtime speed control reject any value with `SPEED_NOT_SUPPORTED`. +""" diff --git a/src/deepgram/types/think_settings_v1provider.py b/src/deepgram/types/think_settings_v1provider.py index 8d08f092..d46270d7 100644 --- a/src/deepgram/types/think_settings_v1provider.py +++ b/src/deepgram/types/think_settings_v1provider.py @@ -8,12 +8,12 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .anthropic_think_provider_model import AnthropicThinkProviderModel +from .anthropic_model import AnthropicModel from .aws_bedrock_think_provider_credentials import AwsBedrockThinkProviderCredentials from .aws_bedrock_think_provider_model import AwsBedrockThinkProviderModel -from .google_think_provider_model import GoogleThinkProviderModel -from .google_think_provider_version import GoogleThinkProviderVersion -from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode +from .google_model import GoogleModel +from .google_version import GoogleVersion +from .groq_reasoning_mode import GroqReasoningMode from .open_ai_think_provider_model import OpenAiThinkProviderModel from .open_ai_think_provider_reasoning_mode import OpenAiThinkProviderReasoningMode @@ -54,7 +54,7 @@ class Config: class ThinkSettingsV1Provider_Anthropic(UncheckedBaseModel): type: typing.Literal["anthropic"] = "anthropic" version: typing.Optional[typing.Literal["v1"]] = None - model: AnthropicThinkProviderModel + model: AnthropicModel temperature: typing.Optional[float] = None if IS_PYDANTIC_V2: @@ -69,8 +69,8 @@ class Config: class ThinkSettingsV1Provider_Google(UncheckedBaseModel): type: typing.Literal["google"] = "google" - version: typing.Optional[GoogleThinkProviderVersion] = None - model: GoogleThinkProviderModel + version: typing.Optional[GoogleVersion] = None + model: GoogleModel temperature: typing.Optional[float] = None if IS_PYDANTIC_V2: @@ -88,7 +88,7 @@ class ThinkSettingsV1Provider_Groq(UncheckedBaseModel): version: typing.Optional[typing.Literal["v1"]] = None model: typing.Literal["openai/gpt-oss-20b"] = "openai/gpt-oss-20b" temperature: typing.Optional[float] = None - reasoning_mode: typing.Optional[GroqThinkProviderReasoningMode] = None + reasoning_mode: typing.Optional[GroqReasoningMode] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/tests/custom/test_compat_aliases.py b/tests/custom/test_compat_aliases.py index ef094b6b..1b2679df 100644 --- a/tests/custom/test_compat_aliases.py +++ b/tests/custom/test_compat_aliases.py @@ -345,3 +345,62 @@ def test_listen_provider_request_aliases_resolve_to_deepgram_top_level() -> None assert AgentV1SettingsAgentContextListenProviderV2LanguageHintParams is DeepgramListenProviderV2LanguageHintParams assert AgentV1SettingsAgentListenProviderV1Params is DeepgramListenProviderV1Params assert AgentV1SettingsAgentListenProviderV2Params is DeepgramListenProviderV2Params + + +def test_renamed_provider_model_type_aliases_resolve() -> None: + # 2026-08-18 regen dropped the *ThinkProvider*/*SpeakProvider* prefixes from these + # public model/voice/version types. The old names stay importable as aliases. + from deepgram.types import ( + AnthropicModel, + AnthropicThinkProviderModel, + CartesiaModelId, + CartesiaSpeakProviderModelId, + CartesiaSpeakProviderVoice, + CartesiaVoice, + DeepgramModel, + DeepgramSpeakProviderModel, + GoogleModel, + GoogleThinkProviderModel, + GoogleThinkProviderVersion, + GoogleVersion, + GroqReasoningMode, + GroqThinkProviderReasoningMode, + ) + from deepgram.types.anthropic_think_provider_model import ( + AnthropicThinkProviderModel as ModuleAnthropicThinkProviderModel, + ) + + assert AnthropicThinkProviderModel is AnthropicModel + assert ModuleAnthropicThinkProviderModel is AnthropicModel + assert CartesiaSpeakProviderModelId is CartesiaModelId + assert CartesiaSpeakProviderVoice is CartesiaVoice + assert DeepgramSpeakProviderModel is DeepgramModel + assert GoogleThinkProviderModel is GoogleModel + assert GoogleThinkProviderVersion is GoogleVersion + assert GroqThinkProviderReasoningMode is GroqReasoningMode + + +def test_renamed_provider_model_request_aliases_resolve() -> None: + from deepgram.requests import CartesiaSpeakProviderVoiceParams, CartesiaVoiceParams + + assert CartesiaSpeakProviderVoiceParams is CartesiaVoiceParams + + +def test_renamed_agent_history_subtype_aliases_resolve() -> None: + # 2026-08-18 regen renamed the underlying history role / function-call-item types + # (ConversationHistoryMessageRole, FunctionCallHistoryMessageFunctionCallsItem). + # The old AgentV1History* public names stay importable as aliases. + from deepgram.agent.v1.requests import ( + AgentV1HistoryFunctionCallsFunctionCallsItemParams, + FunctionCallHistoryMessageFunctionCallsItemParams, + ) + from deepgram.agent.v1.types import ( + AgentV1HistoryContentRole, + AgentV1HistoryFunctionCallsFunctionCallsItem, + ConversationHistoryMessageRole, + FunctionCallHistoryMessageFunctionCallsItem, + ) + + assert AgentV1HistoryContentRole is ConversationHistoryMessageRole + assert AgentV1HistoryFunctionCallsFunctionCallsItem is FunctionCallHistoryMessageFunctionCallsItem + assert AgentV1HistoryFunctionCallsFunctionCallsItemParams is FunctionCallHistoryMessageFunctionCallsItemParams diff --git a/tests/custom/test_regen_response_fields.py b/tests/custom/test_regen_response_fields.py new file mode 100644 index 00000000..3288dcc9 --- /dev/null +++ b/tests/custom/test_regen_response_fields.py @@ -0,0 +1,146 @@ +"""Regression coverage for response fields added by the 2026-08-18 regen. + +The models use UncheckedBaseModel with skip_validation, so response parsing is lenient: +if a future spec change drops one of these fields the attribute silently becomes None +and nothing fails. That is exactly how the `stt_latency` break shipped (deepgram-docs +PR #1006), and why tests/custom/test_latency_report_stt_compat.py exists. These tests +are the same guard for this cycle's new fields: + + - ListenV1Response/ResultsMetadata.diarize_info (model_uuid, arch) + - words item .speaker / .speaker_confidence + - ListenV2TurnInfo.trigger + +Fixtures are real payloads captured from the live API (POST /v1/listen with +diarize=true), except TurnInfo.trigger: those cases pin the client-side contract, +and the "absent" case verifies backward compatibility when the field is omitted. +""" + +from deepgram.listen.v1.types.listen_v1results_metadata import ListenV1ResultsMetadata +from deepgram.listen.v1.types.listen_v1results_metadata_diarize_info import ( + ListenV1ResultsMetadataDiarizeInfo, +) +from deepgram.listen.v2.types.listen_v2turn_info import ListenV2TurnInfo +from deepgram.types.listen_v1response_metadata import ListenV1ResponseMetadata +from deepgram.types.listen_v1response_metadata_diarize_info import ( + ListenV1ResponseMetadataDiarizeInfo, +) +from deepgram.types.listen_v1response_results_channels_item_alternatives_item_words_item import ( + ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem, +) + +# Observed live: metadata.diarize_info on a diarize=true pre-recorded request. +DIARIZE_INFO = {"model_uuid": "a9f85c2b-5afb-4b9d-b49b-492c43a01cfb", "arch": "v1"} + +# Real POST /v1/listen response metadata (nova-3, diarize=true). +RESPONSE_METADATA = { + "transaction_key": "deprecated", + "request_id": "01a0159c-6f81-7fe3-ac3a-c03fcfbb3516", + "sha256": "154e291ecfa8be6ab8343560bcc109008fa7853eb5372533e8efdefc9b504c33", + "created": "2026-08-18T16:02:57.468000+00:00", + "duration": 25.933313, + "channels": 1, + "models": ["2187e11a-3532-4498-b076-81fa530bdd49"], + "model_info": { + "2187e11a-3532-4498-b076-81fa530bdd49": { + "name": "general-nova-3", + "version": "2025-07-31.0", + "arch": "nova-3", + } + }, + "diarize_info": DIARIZE_INFO, +} + +# Streaming-side twin; model_info is a typed object here, not a dict of objects. +RESULTS_METADATA = { + "request_id": "01a0159c-6f81-7fe3-ac3a-c03fcfbb3516", + "model_uuid": "2187e11a-3532-4498-b076-81fa530bdd49", + "model_info": {"name": "general-nova-3", "version": "2025-07-31.0", "arch": "nova-3"}, + "diarize_info": DIARIZE_INFO, +} + +# Real word from the same response. +WORD = { + "word": "yeah", + "start": 0.0, + "end": 0.48, + "confidence": 0.99592924, + "speaker": 0, + "speaker_confidence": 1.0, + "punctuated_word": "Yeah.", +} + + +class TestListenV1DiarizeInfo: + def test_response_metadata_parses_diarize_info(self) -> None: + md = ListenV1ResponseMetadata.model_validate(RESPONSE_METADATA) + assert md.diarize_info is not None + assert md.diarize_info.model_uuid == "a9f85c2b-5afb-4b9d-b49b-492c43a01cfb" + assert md.diarize_info.arch == "v1" + + def test_results_metadata_parses_diarize_info(self) -> None: + md = ListenV1ResultsMetadata.model_validate(RESULTS_METADATA) + assert md.diarize_info is not None + assert md.diarize_info.model_uuid == "a9f85c2b-5afb-4b9d-b49b-492c43a01cfb" + assert md.diarize_info.arch == "v1" + + def test_diarize_info_absent_when_diarization_not_run(self) -> None: + """Live behaviour: the key is omitted entirely when diarize is off.""" + without = {k: v for k, v in RESPONSE_METADATA.items() if k != "diarize_info"} + assert ListenV1ResponseMetadata.model_validate(without).diarize_info is None + + def test_diarize_info_types_are_constructible(self) -> None: + for cls in (ListenV1ResponseMetadataDiarizeInfo, ListenV1ResultsMetadataDiarizeInfo): + info = cls.model_validate(DIARIZE_INFO) + assert info.model_uuid == "a9f85c2b-5afb-4b9d-b49b-492c43a01cfb" + assert info.arch == "v1" + + +class TestListenV1WordSpeakerFields: + def test_word_parses_speaker_and_speaker_confidence(self) -> None: + word = ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.model_validate(WORD) + assert word.speaker == 0 + assert word.speaker_confidence == 1.0 + + def test_speaker_fields_absent_without_diarization(self) -> None: + """Live behaviour: keys are ['confidence', 'end', 'start', 'word'] with diarize off.""" + plain = {k: v for k, v in WORD.items() if k not in ("speaker", "speaker_confidence")} + word = ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.model_validate(plain) + assert word.speaker is None + assert word.speaker_confidence is None + + def test_speaker_zero_is_preserved(self) -> None: + """Speaker 0 is a real speaker; a falsy-check bug would drop it.""" + word = ListenV1ResponseResultsChannelsItemAlternativesItemWordsItem.model_validate( + {**WORD, "speaker": 0, "speaker_confidence": 0.0} + ) + assert word.speaker == 0 + assert word.speaker_confidence == 0.0 + + +class TestListenV2TurnInfoTrigger: + BASE = { + "type": "TurnInfo", + "request_id": "01a01588-b48d-7c82-84ad-e0a091c9d5bd", + "sequence_id": 13, + "event": "EndOfTurn", + "turn_index": 0, + "audio_window_start": 0.0, + "audio_window_end": 3.0, + "transcript": "yeah as much as", + "words": [{"word": "yeah", "confidence": 0.99}], + "end_of_turn_confidence": 0.92, + } + + def test_trigger_parses_documented_values(self) -> None: + for value in ("model", "manual", "timeout"): + info = ListenV2TurnInfo.model_validate({**self.BASE, "trigger": value}) + assert info.trigger == value + + def test_trigger_tolerates_unknown_values(self) -> None: + """Documented as an open enum -- new server values must not raise.""" + info = ListenV2TurnInfo.model_validate({**self.BASE, "trigger": "some_future_cause"}) + assert info.trigger == "some_future_cause" + + def test_trigger_absent_parses_as_none(self) -> None: + """The optional field remains backward-compatible when omitted.""" + assert ListenV2TurnInfo.model_validate(self.BASE).trigger is None diff --git a/tests/custom/test_socket_client_shims.py b/tests/custom/test_socket_client_shims.py index 22aba5a7..4d66f3f7 100644 --- a/tests/custom/test_socket_client_shims.py +++ b/tests/custom/test_socket_client_shims.py @@ -19,8 +19,10 @@ import json from deepgram.agent.v1.socket_client import V1SocketClient, _sanitize_numeric_types -from deepgram.listen.v2.socket_client import V2SocketClient +from deepgram.listen.v2.socket_client import AsyncV2SocketClient, V2SocketClient from deepgram.listen.v2.types.listen_v2close_stream import ListenV2CloseStream +from deepgram.listen.v2.types.listen_v2configure import ListenV2Configure +from deepgram.listen.v2.types.listen_v2force_end_turn import ListenV2ForceEndTurn from deepgram.speak.v2.socket_client import V2SocketClient as SpeakV2SocketClient @@ -34,6 +36,16 @@ def send(self, data): self.sent.append(data) +class _FakeAsyncWebSocket: + """Async counterpart of _FakeWebSocket for the async socket clients.""" + + def __init__(self): + self.sent = [] + + async def send(self, data): + self.sent.append(data) + + def _sent_json(ws): assert len(ws.sent) == 1 payload = ws.sent[0] @@ -97,6 +109,24 @@ def test_speak_v2_close_no_arg(self): SpeakV2SocketClient(websocket=ws).send_close() assert _sent_json(ws)["type"] == "Close" + def test_listen_v2_force_end_turn_no_arg(self): + # send_force_end_turn was added in the 2026-08-18 regen and given the same + # optional-no-payload default treatment as the sibling control sends. + ws = _FakeWebSocket() + V2SocketClient(websocket=ws).send_force_end_turn() + assert _sent_json(ws) == {"type": "ForceEndTurn"} + + def test_listen_v2_force_end_turn_explicit_message(self): + ws = _FakeWebSocket() + V2SocketClient(websocket=ws).send_force_end_turn(ListenV2ForceEndTurn(type="ForceEndTurn")) + assert _sent_json(ws)["type"] == "ForceEndTurn" + + async def test_listen_v2_force_end_turn_async_no_arg(self): + # Cover the async client's send_force_end_turn too (asyncio_mode="auto"). + ws = _FakeAsyncWebSocket() + await AsyncV2SocketClient(websocket=ws).send_force_end_turn() + assert _sent_json(ws) == {"type": "ForceEndTurn"} + class TestSendConfigureRawShim: def test_passthrough_dict_is_sent_verbatim(self): @@ -104,3 +134,25 @@ def test_passthrough_dict_is_sent_verbatim(self): body = {"type": "Configure", "language_hints": ["en", "es"]} V2SocketClient(websocket=ws).send_configure(body) assert _sent_json(ws) == body + + def test_typed_model_is_serialized_and_sent(self): + # The other branch of the Union[ListenV2Configure, dict] shim: a typed + # model goes through _send_model (.dict()) rather than the raw dict path. + ws = _FakeWebSocket() + V2SocketClient(websocket=ws).send_configure(ListenV2Configure(language_hints=["en"])) + sent = _sent_json(ws) + assert sent["type"] == "Configure" + assert sent["language_hints"] == ["en"] + + async def test_typed_model_is_serialized_and_sent_async(self): + ws = _FakeAsyncWebSocket() + await AsyncV2SocketClient(websocket=ws).send_configure(ListenV2Configure(language_hints=["en"])) + sent = _sent_json(ws) + assert sent["type"] == "Configure" + assert sent["language_hints"] == ["en"] + + async def test_passthrough_dict_is_sent_verbatim_async(self): + ws = _FakeAsyncWebSocket() + body = {"type": "Configure", "language_hints": ["en", "es"]} + await AsyncV2SocketClient(websocket=ws).send_configure(body) + assert _sent_json(ws) == body diff --git a/tests/custom/test_speak_v2_coverage.py b/tests/custom/test_speak_v2_coverage.py index 9eb24ccb..1cded6c4 100644 --- a/tests/custom/test_speak_v2_coverage.py +++ b/tests/custom/test_speak_v2_coverage.py @@ -519,3 +519,27 @@ async def test_async_start_listening_skips_on_construct_error(self) -> None: await client.start_listening() assert messages == [] assert errors == [] + + +class TestSpeakV2SpeedTypeIsFloat: + """Regression guard for the 2026-08-18 regen SpeakV2Speed retype (frozen patch). + + The generator changed SpeakV2Speed from ``float`` to + ``Union[Literal["0.85"..."1.15"], Any]`` -- a string-literal enum that + silently changed the ``speak.v2.connect(speed=...)`` parameter's documented + domain from numeric to string and contradicted the API contract + (``SpeakV2SpeedValue = float`` on the Configure message). We restored it to + ``float``; this test fails loudly if a future regen reverts the patch. + """ + + def test_connect_speed_type_is_plain_float(self) -> None: + from deepgram.types.speak_v2speed import SpeakV2Speed + + assert SpeakV2Speed is float + + def test_consistent_with_configure_speed_value(self) -> None: + from deepgram.types.speak_v2speed import SpeakV2Speed + from deepgram.types.speak_v2speed_value import SpeakV2SpeedValue + + # connect-time speed and mid-stream Configure speed must agree. + assert SpeakV2Speed is SpeakV2SpeedValue diff --git a/tests/manual/listen/v2/force_end_turn/async.py b/tests/manual/listen/v2/force_end_turn/async.py new file mode 100644 index 00000000..d38af3d0 --- /dev/null +++ b/tests/manual/listen/v2/force_end_turn/async.py @@ -0,0 +1,135 @@ +"""Async manual live-API check for listen v2 force-end-turn. + +The async client has its own `send_force_end_turn()` on `AsyncListenV2SocketClient`, so it +needs its own live check — the sync script next door cannot cover this path. This mirrors +step 1 of `main.py`: force an in-progress turn to end and confirm the resulting EndOfTurn +reports trigger="manual". See `main.py` for the full end-of-turn control matrix. + +ForceEndTurn is gated per deployment; where it is not enabled this reports SKIP rather +than failing. Point it at a deployment that has the feature with DEEPGRAM_BASE_URL. + +Requires DEEPGRAM_API_KEY. Run with: + + python tests/manual/listen/v2/force_end_turn/async.py + DEEPGRAM_BASE_URL=wss:// python tests/manual/listen/v2/force_end_turn/async.py +""" + +import asyncio +import os +import wave +from typing import Any, List + +from dotenv import load_dotenv + +print("Starting async listen v2 force-end-turn manual test") +load_dotenv() + +from deepgram import AsyncDeepgramClient +from deepgram.core.events import EventType +from deepgram.environment import DeepgramClientEnvironment + +SAMPLE_RATE = 44100 +CHUNK_BYTES = SAMPLE_RATE // 10 * 2 # 100ms of 16-bit mono PCM + +script_dir = os.path.dirname(os.path.abspath(__file__)) +audio_path = os.path.join(script_dir, "..", "..", "..", "fixtures", "audio.wav") + + +def _client_environment() -> DeepgramClientEnvironment: + """TEST ONLY: target a non-prod host by exporting DEEPGRAM_BASE_URL=wss://. + Defaults to production.""" + base = os.environ.get("DEEPGRAM_BASE_URL") + if not base: + return DeepgramClientEnvironment.PRODUCTION + base = base.replace("https://", "wss://").replace("http://", "ws://") + https = base.replace("wss://", "https://").replace("ws://", "http://") + return DeepgramClientEnvironment(base=https, production=base, agent=base, agent_rest=https) + + +async def main() -> None: + if not os.environ.get("DEEPGRAM_API_KEY"): + print(" SKIP: DEEPGRAM_API_KEY not set") + return + + environment = _client_environment() + print(f" Target: {environment.production}") + client = AsyncDeepgramClient(environment=environment) + + with wave.open(audio_path, "rb") as src: + audio = src.readframes(int(6 * src.getframerate())) + + end_of_turns: List[Any] = [] + errors: List[str] = [] + gated = False + started = asyncio.Event() + + def on_message(message: Any) -> None: + nonlocal gated + if getattr(message, "type", None) == "TurnInfo": + event = getattr(message, "event", None) + if event == "StartOfTurn": + started.set() + elif event == "EndOfTurn": + end_of_turns.append(message) + elif getattr(message, "code", None): + code = getattr(message, "code", "") + if code == "UNPARSABLE_CLIENT_MESSAGE": + gated = True + errors.append(f"{code}: {getattr(message, 'description', '')}") + + print("\n[1/1] ForceEndTurn ends an in-progress turn with trigger='manual'") + try: + async with client.listen.v2.connect( + model="flux-general-en", encoding="linear16", sample_rate=str(SAMPLE_RATE) + ) as connection: + connection.on(EventType.MESSAGE, on_message) + connection.on(EventType.ERROR, lambda error: errors.append(f"transport: {error}")) + listener = asyncio.create_task(connection.start_listening()) + + forced = False + for offset in range(0, len(audio), CHUNK_BYTES): + # A gated deployment closes the socket rather than ignoring the message, + # so later sends raise. Stop streaming so the gate can be reported. + try: + await connection.send_media(audio[offset : offset + CHUNK_BYTES]) + except Exception as e: # noqa: BLE001 + if not gated: + errors.append(f"send failed: {type(e).__name__}: {e}") + break + await asyncio.sleep(0.1) + if not forced and started.is_set(): + try: + await connection.send_force_end_turn() + except Exception as e: # noqa: BLE001 + errors.append(f"send_force_end_turn failed: {type(e).__name__}: {e}") + break + forced = True + + await asyncio.sleep(3) + listener.cancel() + except Exception as e: # noqa: BLE001 + if not gated: + errors.append(f"{type(e).__name__}: {e}") + + if gated: + print(" SKIP: ForceEndTurn is not enabled on this deployment") + print(f" ({errors[0]})") + print(" Set DEEPGRAM_BASE_URL to a deployment that has the feature.") + return + if errors: + print(f" FAIL: {errors[0]}") + raise SystemExit(1) + + triggers = [getattr(t, "trigger", None) for t in end_of_turns] + if "manual" not in triggers: + print(f" FAIL: expected trigger='manual', saw {triggers}") + raise SystemExit(1) + + forced_turn = next(t for t in end_of_turns if getattr(t, "trigger", None) == "manual") + print(f" PASS: trigger='manual' (end_of_turn_confidence={forced_turn.end_of_turn_confidence})") + print(f" transcript: {forced_turn.transcript!r}") + print("\nAsync force-end-turn manual test completed.") + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/tests/manual/listen/v2/force_end_turn/main.py b/tests/manual/listen/v2/force_end_turn/main.py new file mode 100644 index 00000000..d8d546b5 --- /dev/null +++ b/tests/manual/listen/v2/force_end_turn/main.py @@ -0,0 +1,221 @@ +"""Manual live-API check for listen v2 force-end-turn and the end-of-turn controls. + +`send_force_end_turn()` ends the current turn on demand instead of waiting for Flux to +decide. `ListenV2TurnInfo.trigger` then reports *what* ended the turn, and that field is +what makes the end-of-turn controls legible: + + model Flux's own end-of-turn detection fired + manual a ForceEndTurn message ended the turn + timeout eot_timeout_ms elapsed after speech + +The unit tests mock the websocket, so they pin the frame the SDK sends and nothing about +what the server does with it. This script covers the rest, in four steps: + + 1. ForceEndTurn ends an in-progress turn -> trigger="manual", connection survives + 2. eot_threshold=0.7 with trailing silence -> trigger="model" + 3. eot_threshold=1.0 with trailing silence -> trigger="timeout", NOT "model". + 1.0 suppresses Flux's confidence-based detection, but eot_timeout_ms is a + separate mechanism and still ends the turn. Reading only the event, step 3 looks + identical to step 2 — `trigger` is the sole thing that distinguishes them. + 4. eot_threshold=1.0 plus a long eot_timeout_ms -> no EndOfTurn at all, so + ForceEndTurn becomes the only way to close a turn. This is the combination to + reach for when the application owns turn boundaries. + +ForceEndTurn is gated per deployment. Where it is not enabled the server replies +UNPARSABLE_CLIENT_MESSAGE ("not enabled on this deployment") and closes the connection; +this script reports SKIP rather than failing. Point it at a deployment that has the +feature with DEEPGRAM_BASE_URL. + +Requires DEEPGRAM_API_KEY. Run with: + + python tests/manual/listen/v2/force_end_turn/main.py + DEEPGRAM_BASE_URL=wss:// python tests/manual/listen/v2/force_end_turn/main.py +""" + +import os +import threading +import time +import wave +from typing import Any, Dict, List, Optional, Tuple + +from dotenv import load_dotenv + +print("Starting listen v2 force-end-turn manual test") +load_dotenv() + +from deepgram import DeepgramClient +from deepgram.core.events import EventType +from deepgram.environment import DeepgramClientEnvironment + +SAMPLE_RATE = 44100 +CHUNK_BYTES = SAMPLE_RATE // 10 * 2 # 100ms of 16-bit mono PCM + +script_dir = os.path.dirname(os.path.abspath(__file__)) +audio_path = os.path.join(script_dir, "..", "..", "..", "fixtures", "audio.wav") + + +def load_audio(speech_seconds: float, silence_seconds: float) -> bytes: + """Return raw PCM: the first N seconds of the fixture, then digital silence. + + The trailing silence matters — Flux's end-of-turn detection and eot_timeout_ms both + key off a pause, so continuous speech never exercises either one. + """ + with wave.open(audio_path, "rb") as src: + frames = src.readframes(int(speech_seconds * src.getframerate())) + width = src.getsampwidth() * src.getnchannels() + silence = b"\x00" * int(silence_seconds * src.getframerate() * width) + return frames + silence + + +def _client_environment() -> DeepgramClientEnvironment: + """TEST ONLY: target a non-prod host by exporting DEEPGRAM_BASE_URL=wss://. + Defaults to production.""" + base = os.environ.get("DEEPGRAM_BASE_URL") + if not base: + return DeepgramClientEnvironment.PRODUCTION + base = base.replace("https://", "wss://").replace("http://", "ws://") + https = base.replace("wss://", "https://").replace("ws://", "http://") + return DeepgramClientEnvironment(base=https, production=base, agent=base, agent_rest=https) + + +def build_client() -> DeepgramClient: + environment = _client_environment() + print(f" Target: {environment.production}") + return DeepgramClient(environment=environment) + + +def run( + client: DeepgramClient, + audio: bytes, + *, + force: bool = False, + eot_threshold: Optional[str] = None, + eot_timeout_ms: Optional[str] = None, +) -> Tuple[List[Any], List[str], bool]: + """Stream audio, optionally forcing the turn to end, and collect every EndOfTurn.""" + end_of_turns: List[Any] = [] + errors: List[str] = [] + gated = False + started = threading.Event() + + def on_message(message: Any) -> None: + nonlocal gated + msg_type = getattr(message, "type", None) + if msg_type == "TurnInfo": + event = getattr(message, "event", None) + if event == "StartOfTurn": + started.set() + elif event == "EndOfTurn": + end_of_turns.append(message) + elif getattr(message, "code", None): + code = getattr(message, "code", "") + if code == "UNPARSABLE_CLIENT_MESSAGE": + gated = True + errors.append(f"{code}: {getattr(message, 'description', '')}") + + kwargs: Dict[str, Any] = { + "model": "flux-general-en", + "encoding": "linear16", + "sample_rate": str(SAMPLE_RATE), + } + if eot_threshold is not None: + kwargs["eot_threshold"] = eot_threshold + if eot_timeout_ms is not None: + kwargs["eot_timeout_ms"] = eot_timeout_ms + + try: + with client.listen.v2.connect(**kwargs) as connection: + connection.on(EventType.MESSAGE, on_message) + connection.on(EventType.ERROR, lambda error: errors.append(f"transport: {error}")) + threading.Thread(target=connection.start_listening, daemon=True).start() + + forced = False + for offset in range(0, len(audio), CHUNK_BYTES): + # A deployment without ForceEndTurn does not just refuse the message, it + # closes the socket — so every later send raises. Stop streaming instead + # of letting that escape, so the caller can report the gate. + try: + connection.send_media(audio[offset : offset + CHUNK_BYTES]) + except Exception as e: # noqa: BLE001 + if not gated: + errors.append(f"send failed: {type(e).__name__}: {e}") + break + time.sleep(0.1) + # Only force once a turn is genuinely open — forcing before StartOfTurn + # would have nothing to end. + if force and not forced and started.is_set(): + try: + connection.send_force_end_turn() + except Exception as e: # noqa: BLE001 + errors.append(f"send_force_end_turn failed: {type(e).__name__}: {e}") + break + forced = True + time.sleep(3) + except Exception as e: # noqa: BLE001 + # The context manager's exit closes a socket the server already tore down. + if not gated: + errors.append(f"{type(e).__name__}: {e}") + + return end_of_turns, errors, gated + + +def main() -> None: + if not os.environ.get("DEEPGRAM_API_KEY"): + print(" SKIP: DEEPGRAM_API_KEY not set") + return + + client = build_client() + speech_only = load_audio(speech_seconds=6, silence_seconds=0) + speech_then_silence = load_audio(speech_seconds=5, silence_seconds=14) + + print("\n[1/4] ForceEndTurn ends an in-progress turn with trigger='manual'") + end_of_turns, errors, gated = run(client, speech_only, force=True) + if gated: + print(" SKIP: ForceEndTurn is not enabled on this deployment") + print(f" ({errors[0]})") + print(" Set DEEPGRAM_BASE_URL to a deployment that has the feature.") + return + if errors: + raise AssertionError(errors[0]) + triggers = [getattr(t, "trigger", None) for t in end_of_turns] + assert "manual" in triggers, f"expected trigger='manual', saw {triggers}" + forced_turn = next(t for t in end_of_turns if getattr(t, "trigger", None) == "manual") + print(f" PASS: trigger='manual' (end_of_turn_confidence={forced_turn.end_of_turn_confidence})") + print(f" transcript: {forced_turn.transcript!r}") + + print("\n[2/4] eot_threshold=0.7 with trailing silence -> trigger='model'") + end_of_turns, errors, _ = run(client, speech_then_silence, eot_threshold="0.7") + if errors: + raise AssertionError(errors[0]) + triggers = [getattr(t, "trigger", None) for t in end_of_turns] + assert triggers == ["model"], f"expected ['model'], saw {triggers}" + print(" PASS: trigger='model' — Flux's own detection ended the turn") + + print("\n[3/4] eot_threshold=1.0 with trailing silence -> trigger='timeout', not 'model'") + end_of_turns, errors, _ = run(client, speech_then_silence, eot_threshold="1.0") + if errors: + raise AssertionError(errors[0]) + triggers = [getattr(t, "trigger", None) for t in end_of_turns] + assert "model" not in triggers, f"eot_threshold=1.0 should suppress model detection, saw {triggers}" + assert triggers == ["timeout"], f"expected ['timeout'], saw {triggers}" + print(" PASS: trigger='timeout' — confidence-based detection suppressed, but") + print(" eot_timeout_ms is a separate mechanism and still closed the turn") + + print("\n[4/4] eot_threshold=1.0 + long eot_timeout_ms -> nothing ends the turn on its own") + end_of_turns, errors, _ = run( + client, speech_then_silence, eot_threshold="1.0", eot_timeout_ms="60000" + ) + if errors: + raise AssertionError(errors[0]) + assert not end_of_turns, f"expected no EndOfTurn, saw {[getattr(t, 'trigger', None) for t in end_of_turns]}" + print(" PASS: 0 EndOfTurn — ForceEndTurn is now the only way to close a turn") + + print("\nForce-end-turn manual test completed.") + + +if __name__ == "__main__": + try: + main() + except AssertionError as e: + print(f" FAIL: {e}") + raise SystemExit(1) diff --git a/tests/wire/test_listen_v1_media.py b/tests/wire/test_listen_v1_media.py index 6150ace0..96a5bb28 100644 --- a/tests/wire/test_listen_v1_media.py +++ b/tests/wire/test_listen_v1_media.py @@ -5,6 +5,26 @@ def test_listen_v1_media_transcribe_url() -> None: """Test transcribeUrl endpoint with WireMock""" test_id = "listen.v1.media.transcribe_url.0" client = get_client(test_id) + client.listen.v1.media.transcribe_url( + url="https://dpgr.am/spacewalk.wav", + ) + verify_request_count(test_id, "POST", "/v1/listen", None, 1) + + +def test_listen_v1_media_transcribe_url_serializes_all_query_params() -> None: + """All 37 optional query params must reach the wire, with bools lowercased. + + The 2026-08-18 regen simplified the upstream spec *example* for this endpoint, + and Fern derives the wire test from that example -- so the generated test + dropped every query parameter, leaving their serialization unverified while + the client signature still forwards all 37. This restores that coverage; the + file is frozen in .fernignore so a future regen cannot silently drop it again. + + Same failure mode as tests/wire/test_manage_v1_projects_keys.py and + tests/wire/test_manage_v1_projects_requests.py, which are frozen for this reason. + """ + test_id = "listen.v1.media.transcribe_url.query_params" + client = get_client(test_id) client.listen.v1.media.transcribe_url( callback="callback", callback_method="POST", diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json index 8d49c170..f400cb61 100644 --- a/wiremock/wiremock-mappings.json +++ b/wiremock/wiremock-mappings.json @@ -59,8 +59,8 @@ } }, { - "id": "49d8d51a-7f01-4598-804f-b6f54cdc22da", - "name": "Transcribe and analyze pre-recorded audio and video - default", + "id": "6b897d7e-00ca-4224-9ffb-f7936c81ddfc", + "name": "Transcribe and analyze pre-recorded audio and video - Remote File", "request": { "urlPathTemplate": "/v1/listen", "method": "POST", @@ -68,133 +68,16 @@ "Authorization": { "matches": ".+" } - }, - "queryParameters": { - "callback": { - "equalTo": "callback" - }, - "callback_method": { - "equalTo": "POST" - }, - "extra": { - "equalTo": "extra" - }, - "sentiment": { - "equalTo": "true" - }, - "summarize": { - "equalTo": "v2" - }, - "tag": { - "equalTo": "tag" - }, - "topics": { - "equalTo": "true" - }, - "custom_topic": { - "equalTo": "custom_topic" - }, - "custom_topic_mode": { - "equalTo": "extended" - }, - "intents": { - "equalTo": "true" - }, - "custom_intent": { - "equalTo": "custom_intent" - }, - "custom_intent_mode": { - "equalTo": "extended" - }, - "detect_entities": { - "equalTo": "true" - }, - "detect_language": { - "equalTo": "true" - }, - "diarize": { - "equalTo": "true" - }, - "diarize_model": { - "equalTo": "latest" - }, - "dictation": { - "equalTo": "true" - }, - "encoding": { - "equalTo": "linear16" - }, - "filler_words": { - "equalTo": "true" - }, - "keyterm": { - "hasExactly": [ - { - "equalTo": "keyterm" - } - ] - }, - "keywords": { - "equalTo": "keywords" - }, - "language": { - "equalTo": "language" - }, - "measurements": { - "equalTo": "true" - }, - "model": { - "equalTo": "nova-3" - }, - "multichannel": { - "equalTo": "true" - }, - "numerals": { - "equalTo": "true" - }, - "paragraphs": { - "equalTo": "true" - }, - "profanity_filter": { - "equalTo": "true" - }, - "punctuate": { - "equalTo": "true" - }, - "redact": { - "equalTo": "redact" - }, - "replace": { - "equalTo": "replace" - }, - "search": { - "equalTo": "search" - }, - "smart_format": { - "equalTo": "true" - }, - "utterances": { - "equalTo": "true" - }, - "utt_split": { - "equalTo": "1.1" - }, - "version": { - "equalTo": "latest" - }, - "mip_opt_out": { - "equalTo": "true" - } } }, "response": { "status": 200, - "body": "{\n \"metadata\": {\n \"request_id\": \"a847f427-4ad5-4d67-9b95-db801e58251c\",\n \"sha256\": \"154e291ecfa8be6ab8343560bcc109008fa7853eb5372533e8efdefc9b504c33\",\n \"created\": \"2024-05-12T18:57:13Z\",\n \"duration\": 25.933313,\n \"channels\": 1,\n \"models\": [\n \"30089e05-99d1-4376-b32e-c263170674af\"\n ],\n \"model_info\": {\n \"30089e05-99d1-4376-b32e-c263170674af\": {\n \"name\": \"2-general-nova\",\n \"version\": \"2024-01-09.29447\",\n \"arch\": \"nova-2\"\n }\n },\n \"summary_info\": {\n \"model_uuid\": \"67875a7f-c9c4-48a0-aa55-5bdb8a91c34a\",\n \"input_tokens\": 95,\n \"output_tokens\": 63\n },\n \"sentiment_info\": {\n \"model_uuid\": \"80ab3179-d113-4254-bd6b-4a2f96498695\",\n \"input_tokens\": 105,\n \"output_tokens\": 105\n },\n \"topics_info\": {\n \"model_uuid\": \"80ab3179-d113-4254-bd6b-4a2f96498695\",\n \"input_tokens\": 105,\n \"output_tokens\": 7\n },\n \"intents_info\": {\n \"model_uuid\": \"80ab3179-d113-4254-bd6b-4a2f96498695\",\n \"input_tokens\": 105,\n \"output_tokens\": 4\n },\n \"tags\": [\n \"test\"\n ]\n },\n \"results\": {\n \"channels\": [\n {}\n ],\n \"utterances\": [\n {}\n ],\n \"summary\": {\n \"result\": \"success\",\n \"short\": \"Speaker 0 discusses the significance of the first all-female spacewalk with an all-female team, stating that it is a tribute to the skilled and qualified women who were denied opportunities in the past.\"\n },\n \"topics\": {\n \"results\": {\n \"topics\": {\n \"segments\": [\n {\n \"text\": \"And, um, I think if it signifies anything, it is, uh, to honor the the women who came before us who, um, were skilled and qualified, um, and didn't get the the same opportunities that we have today.\",\n \"start_word\": 32,\n \"end_word\": 69,\n \"topics\": [\n {\n \"topic\": \"Spacewalk\",\n \"confidence_score\": 0.91581345\n }\n ]\n }\n ]\n }\n }\n },\n \"intents\": {\n \"results\": {\n \"intents\": {\n \"segments\": [\n {\n \"text\": \"If you found this valuable, you can subscribe to the show on spotify or your favorite podcast app.\",\n \"start_word\": 354,\n \"end_word\": 414,\n \"intents\": [\n {\n \"intent\": \"Encourage podcasting\",\n \"confidence_score\": 0.0038975573\n }\n ]\n }\n ]\n }\n }\n },\n \"sentiments\": {\n \"segments\": [\n {\n \"text\": \"Yeah. As as much as, um, it's worth celebrating, uh, the first, uh, spacewalk, um, with an all-female team, I think many of us are looking forward to it just being normal. And, um, I think if it signifies anything, it is, uh, to honor the the women who came before us who, um, were skilled and qualified, um, and didn't get the the same opportunities that we have today.\",\n \"start_word\": 0,\n \"end_word\": 69,\n \"sentiment\": \"positive\",\n \"sentiment_score\": 0.5810546875\n }\n ],\n \"average\": {\n \"sentiment\": \"positive\",\n \"sentiment_score\": 0.5810185185185185\n }\n }\n }\n}", + "body": "{\n \"metadata\": {\n \"request_id\": \"a847f427-4ad5-4d67-9b95-db801e58251c\",\n \"sha256\": \"154e291ecfa8be6ab8343560bcc109008fa7853eb5372533e8efdefc9b504c33\",\n \"created\": \"2024-05-12T18:57:13.426Z\",\n \"duration\": 25.933313,\n \"channels\": 1,\n \"models\": [\n \"30089e05-99d1-4376-b32e-c263170674af\"\n ],\n \"model_info\": {\n \"30089e05-99d1-4376-b32e-c263170674af\": {\n \"name\": \"2-general-nova\",\n \"version\": \"2024-01-09.29447\",\n \"arch\": \"nova-2\"\n }\n },\n \"diarize_info\": {\n \"model_uuid\": \"9a1c8b3e-2f44-4c8a-b1d0-example0000\",\n \"arch\": \"v2\"\n }\n },\n \"results\": {\n \"channels\": [\n {\n \"alternatives\": [\n {\n \"transcript\": \"Yeah, as as much as, it's worth having a talk to the neighbors.\",\n \"confidence\": 0.9840088,\n \"words\": [\n {\n \"word\": \"yeah\",\n \"start\": 0.08,\n \"end\": 0.32,\n \"confidence\": 0.9975586,\n \"speaker\": 0,\n \"speaker_confidence\": 0.98\n },\n {\n \"word\": \"as\",\n \"start\": 0.32,\n \"end\": 0.48,\n \"confidence\": 0.9862061,\n \"speaker\": 0,\n \"speaker_confidence\": 0.98\n }\n ]\n }\n ]\n }\n ]\n }\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "49d8d51a-7f01-4598-804f-b6f54cdc22da", + "uuid": "6b897d7e-00ca-4224-9ffb-f7936c81ddfc", "persistent": true, "priority": 3, "metadata": {