From 63e25d6bcf6ba97fda6c3f74b90f044c8b4e6784 Mon Sep 17 00:00:00 2001 From: Greg Holmes Date: Tue, 11 Aug 2026 10:34:33 +0100 Subject: [PATCH] Revert "feat(regen): listen v2 force-end-turn and redaction, listen v1 diarize metadata (#750)" This reverts commit 4678f0e230d590e1ad473ae2f3452619d21d3d6b. --- .fern/metadata.json | 9 +- .fernignore | 55 +-- .github/release-please-config.json | 4 + AGENTS.md | 9 +- poetry.lock | 262 ++++++------- pyproject.toml | 6 +- reference.md | 28 -- src/deepgram/__init__.py | 94 ++--- src/deepgram/agent/__init__.py | 203 +++++----- src/deepgram/agent/v1/__init__.py | 203 +++++----- src/deepgram/agent/v1/requests/__init__.py | 104 +++-- ...tory_function_calls_function_calls_item.py | 34 +- .../v1/requests/agent_v1latency_report.py | 6 +- ...item_function_calls_function_calls_item.py | 34 +- ...item_function_calls_function_calls_item.py | 8 +- .../v1/requests/agent_v1update_listen.py | 2 +- .../requests/agent_v1update_listen_listen.py | 6 +- .../agent_v1update_listen_listen_provider.py | 32 -- .../requests/conversation_history_message.py | 6 +- .../requests/function_call_history_message.py | 6 +- ...all_history_message_function_calls_item.py | 35 -- src/deepgram/agent/v1/types/__init__.py | 127 +++--- .../v1/types/agent_v1history_content_role.py | 4 +- ...tory_function_calls_function_calls_item.py | 47 ++- .../agent/v1/types/agent_v1latency_report.py | 8 +- ...text_context_messages_item_content_role.py | 6 +- ...item_function_calls_function_calls_item.py | 47 ++- ...gent_context_messages_item_content_role.py | 6 +- ...item_function_calls_function_calls_item.py | 8 +- .../agent/v1/types/agent_v1update_listen.py | 2 +- .../v1/types/agent_v1update_listen_listen.py | 39 +- .../agent_v1update_listen_listen_provider.py | 54 --- .../v1/types/conversation_history_message.py | 6 +- .../conversation_history_message_role.py | 5 - .../v1/types/function_call_history_message.py | 8 +- ...all_history_message_function_calls_item.py | 48 --- src/deepgram/base_client.py | 28 +- src/deepgram/core/client_wrapper.py | 28 +- src/deepgram/core/http_client.py | 62 +-- src/deepgram/core/http_sse/_api.py | 365 ++---------------- src/deepgram/core/http_sse/_decoders.py | 13 - src/deepgram/core/request_options.py | 7 +- src/deepgram/listen/__init__.py | 22 +- src/deepgram/listen/v1/__init__.py | 9 - src/deepgram/listen/v1/media/client.py | 98 ++++- src/deepgram/listen/v1/media/raw_client.py | 24 +- src/deepgram/listen/v1/requests/__init__.py | 3 - ...ts_channel_alternatives_item_words_item.py | 2 +- .../v1/requests/listen_v1results_metadata.py | 6 - .../listen_v1results_metadata_diarize_info.py | 20 - src/deepgram/listen/v1/types/__init__.py | 6 - ...ts_channel_alternatives_item_words_item.py | 2 +- .../v1/types/listen_v1results_metadata.py | 6 - .../listen_v1results_metadata_diarize_info.py | 33 -- ...en_v1results_metadata_diarize_info_arch.py | 5 - src/deepgram/listen/v2/__init__.py | 13 +- src/deepgram/listen/v2/client.py | 9 - src/deepgram/listen/v2/raw_client.py | 9 - src/deepgram/listen/v2/requests/__init__.py | 3 - .../v2/requests/listen_v2force_end_turn.py | 12 - .../listen/v2/requests/listen_v2turn_info.py | 13 - src/deepgram/listen/v2/socket_client.py | 41 +- src/deepgram/listen/v2/types/__init__.py | 10 +- .../v2/types/listen_v2force_end_turn.py | 23 -- .../listen/v2/types/listen_v2turn_info.py | 13 - .../manage/v1/projects/requests/client.py | 43 ++- src/deepgram/requests/__init__.py | 25 +- src/deepgram/requests/anthropic.py | 4 +- src/deepgram/requests/cartesia.py | 8 +- .../requests/cartesia_speak_provider_voice.py | 14 +- src/deepgram/requests/cartesia_voice.py | 15 - src/deepgram/requests/deepgram.py | 14 +- src/deepgram/requests/google.py | 4 +- src/deepgram/requests/groq.py | 4 +- .../requests/listen_v1response_metadata.py | 6 - ...listen_v1response_metadata_diarize_info.py | 20 - ...nnels_item_alternatives_item_words_item.py | 9 - .../requests/speak_settings_v1provider.py | 14 +- .../requests/think_settings_v1provider.py | 12 +- src/deepgram/types/__init__.py | 76 ++-- src/deepgram/types/anthropic.py | 4 +- src/deepgram/types/anthropic_model.py | 5 - .../types/anthropic_think_provider_model.py | 6 +- src/deepgram/types/cartesia.py | 8 +- src/deepgram/types/cartesia_model_id.py | 5 - .../types/cartesia_speak_provider_model_id.py | 4 +- .../types/cartesia_speak_provider_voice.py | 27 +- src/deepgram/types/cartesia_voice.py | 28 -- src/deepgram/types/deepgram.py | 14 +- src/deepgram/types/deepgram_model.py | 84 ---- .../types/deepgram_speak_provider_model.py | 71 +++- src/deepgram/types/google.py | 4 +- src/deepgram/types/google_model.py | 5 - .../types/google_think_provider_model.py | 6 +- src/deepgram/types/groq.py | 4 +- src/deepgram/types/groq_reasoning_mode.py | 5 - .../groq_think_provider_reasoning_mode.py | 4 +- src/deepgram/types/listen_v1keyterm.py | 6 +- .../types/listen_v1response_metadata.py | 6 - ...listen_v1response_metadata_diarize_info.py | 33 -- ...n_v1response_metadata_diarize_info_arch.py | 5 - ...nnels_item_alternatives_item_words_item.py | 9 - src/deepgram/types/listen_v2eot_threshold.py | 3 +- src/deepgram/types/listen_v2eot_timeout_ms.py | 2 +- src/deepgram/types/listen_v2redact.py | 5 - .../types/speak_settings_v1provider.py | 14 +- .../types/think_settings_v1provider.py | 12 +- tests/utils/test_http_client.py | 69 +--- tests/wire/test_listen_v1_media.py | 83 +++- .../wire/test_manage_v1_projects_requests.py | 43 ++- wiremock/wiremock-mappings.json | 179 ++++++++- 111 files changed, 1375 insertions(+), 2092 deletions(-) delete mode 100644 src/deepgram/agent/v1/requests/agent_v1update_listen_listen_provider.py delete mode 100644 src/deepgram/agent/v1/requests/function_call_history_message_function_calls_item.py delete mode 100644 src/deepgram/agent/v1/types/agent_v1update_listen_listen_provider.py delete mode 100644 src/deepgram/agent/v1/types/conversation_history_message_role.py delete mode 100644 src/deepgram/agent/v1/types/function_call_history_message_function_calls_item.py delete mode 100644 src/deepgram/listen/v1/requests/listen_v1results_metadata_diarize_info.py delete mode 100644 src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info.py delete mode 100644 src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info_arch.py delete mode 100644 src/deepgram/listen/v2/requests/listen_v2force_end_turn.py delete mode 100644 src/deepgram/listen/v2/types/listen_v2force_end_turn.py delete mode 100644 src/deepgram/requests/cartesia_voice.py delete mode 100644 src/deepgram/requests/listen_v1response_metadata_diarize_info.py delete mode 100644 src/deepgram/types/anthropic_model.py delete mode 100644 src/deepgram/types/cartesia_model_id.py delete mode 100644 src/deepgram/types/cartesia_voice.py delete mode 100644 src/deepgram/types/deepgram_model.py delete mode 100644 src/deepgram/types/google_model.py delete mode 100644 src/deepgram/types/groq_reasoning_mode.py delete mode 100644 src/deepgram/types/listen_v1response_metadata_diarize_info.py delete mode 100644 src/deepgram/types/listen_v1response_metadata_diarize_info_arch.py delete mode 100644 src/deepgram/types/listen_v2redact.py diff --git a/.fern/metadata.json b/.fern/metadata.json index 310c0c20..9210e15b 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "5.89.0", + "cliVersion": "5.44.6", "generatorName": "fernapi/fern-python-sdk", - "generatorVersion": "5.23.0", + "generatorVersion": "5.14.18", "generatorConfig": { "client": { "class_name": "BaseClient", @@ -12,13 +12,12 @@ "use_typeddict_requests": true, "should_generate_websocket_clients": true, "enable_wire_tests": true, - "runtime_version": true, "pydantic_config": { "skip_validation": true } }, - "originGitCommit": "9e641c9fb92e1e0398c79c196f6a71c70b4fdbf6", + "originGitCommit": "ff8fd2b74fdd5c081e9f111d59d3619f7e286dd8", "originGitCommitIsDirty": true, "invokedBy": "manual", - "sdkVersion": "7.6.1" + "sdkVersion": "7.6.0" } \ No newline at end of file diff --git a/.fernignore b/.fernignore index f54bb59c..a5763df0 100644 --- a/.fernignore +++ b/.fernignore @@ -43,16 +43,8 @@ src/deepgram/agent/v1/requests/agent_v1settings.py # Backward-compatibility alias shims for renamed generated public types/params. # These are hand-written wrappers around the current generated names and must not be regenerated. -# The *_content_role / *_function_calls_function_calls_item shims (and the double-`Context` -# variants below) were recreated by hand after the 2026-07-31 regen deleted the underlying -# generated modules; they now re-export the canonical ConversationHistoryMessageRole / -# FunctionCallHistoryMessageFunctionCallsItem types so the old public import paths keep working. src/deepgram/agent/v1/types/agent_v1history_content.py -src/deepgram/agent/v1/types/agent_v1history_content_role.py src/deepgram/agent/v1/types/agent_v1history_function_calls.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/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 @@ -60,8 +52,6 @@ src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_functio src/deepgram/agent/v1/types/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py 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_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 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 @@ -69,22 +59,6 @@ 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-07-31 provider/model type renames. -# The generator renamed these public types (dropping the Speak/Think provider prefixes) -# with no compat aliases: AnthropicThinkProviderModel->AnthropicModel, -# GoogleThinkProviderModel->GoogleModel, GroqThinkProviderReasoningMode->GroqReasoningMode, -# CartesiaSpeakProviderModelId->CartesiaModelId, CartesiaSpeakProviderVoice->CartesiaVoice, -# DeepgramSpeakProviderModel->DeepgramModel. These hand-written aliases re-export the new -# names under the old public import paths so existing callers keep working. No Fern -# equivalent — frozen so the generator won't delete them. -src/deepgram/types/anthropic_think_provider_model.py -src/deepgram/types/google_think_provider_model.py -src/deepgram/types/groq_think_provider_reasoning_mode.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/requests/cartesia_speak_provider_voice.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 @@ -119,17 +93,6 @@ 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 -# Behavioral back-compat shim for the AgentV1UpdateListen provider retype (2026-07-31 -# regen). The provider field changed from a bare DeepgramListenProviderV2 to the new -# required discriminated union AgentV1UpdateListenListenProvider (_V1/_V2, discriminant -# "version"), which rejects the old DeepgramListenProviderV1/V2 payloads. This generated -# model carries a hand-added model_validator(mode='before') / root_validator(pre=True) -# that coerces a legacy Deepgram provider (or a dict lacking the version discriminant) -# into the new shape so existing callers keep working. Frozen so Fern won't strip the -# validator on regen. Remove the shim and unfreeze when the old provider payloads are -# intentionally retired in a future major release. -src/deepgram/agent/v1/types/agent_v1update_listen_listen.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 @@ -138,6 +101,16 @@ src/deepgram/agent/v1/types/agent_v1update_listen_listen.py # resurrecting the invalid values. Frozen so Fern won't delete it again. src/deepgram/listen/v2/types/listen_v2close_stream_type.py +# Backward-compat shim for the `stt_latency` removal from AgentV1LatencyReport (the +# 2026-07-20 regen; API change in deepgram-docs #1006). LatencyReport is a +# server-emitted (read-only) message, so re-adding the optional `stt_latency` field +# has no request/wire impact — it keeps `report.stt_latency` resolving (to None, since +# the server no longer emits it) instead of raising AttributeError, so the removal +# stays a minor release rather than a major break. Remove the field and unfreeze when +# it is intentionally retired in a future major release. +src/deepgram/agent/v1/types/agent_v1latency_report.py +src/deepgram/agent/v1/requests/agent_v1latency_report.py + # Package __init__.py files that carry hand-applied legacy alias re-exports for the # above shims. Fern would otherwise regenerate these and strip the legacy entries on # every regen. Frozen to preserve the public-import surface for renamed types/params. @@ -161,6 +134,14 @@ src/deepgram/listen/v2/types/__init__.py # [temporarily frozen — manual patches listed above] src/deepgram/core/query_encoder.py +# Carries `# x-release-please-version` annotations on the User-Agent and +# X-Fern-SDK-Version header lines so release-please bumps the wire telemetry +# version in lockstep with the published package version (it is a `generic` +# extra-file in .github/release-please-config.json). Fern regenerates this file +# from scratch and would strip the annotations, so it is frozen to protect them. +# [temporarily frozen — manual patches listed above] +src/deepgram/core/client_wrapper.py + # Hand-written custom tests tests/custom/test_agent_history.py tests/custom/test_agent_update_listen.py diff --git a/.github/release-please-config.json b/.github/release-please-config.json index dc3946e4..c86c4914 100644 --- a/.github/release-please-config.json +++ b/.github/release-please-config.json @@ -16,6 +16,10 @@ "path": "pyproject.toml", "jsonpath": "$.tool.poetry.version" }, + { + "type": "generic", + "path": "src/deepgram/core/client_wrapper.py" + }, { "type": "json", "path": ".fern/metadata.json", diff --git a/AGENTS.md b/AGENTS.md index 55ce4761..2d811fc6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,10 +25,9 @@ Current permanently frozen files: - `src/deepgram/client.py` — entirely custom (Bearer auth, session ID, `transport_factory`, `reconnect` parity flag); no Fern equivalent - `src/deepgram/_secure_logging.py` — hand-written security utility that installs a `logging.Filter` on the `websockets` client/server loggers to mask the `Authorization` header in DEBUG handshake logs; called from `client.py`; no Fern equivalent - `src/deepgram/helpers/` — hand-written TextBuilder helpers -- `src/deepgram/agent/v1/types/agent_v1history_content.py`, `src/deepgram/agent/v1/types/agent_v1history_content_role.py`, `src/deepgram/agent/v1/types/agent_v1history_function_calls.py`, `src/deepgram/agent/v1/types/agent_v1history_function_calls_function_calls_item.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`, `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` — hand-written compatibility aliases preserving old public Agent History type imports after regen renames. The `*_content_role` / `*_function_calls_function_calls_item` shims (and the double-`Context` variants) were recreated by hand after the 2026-07-31 regen deleted the underlying generated modules; they re-export the canonical `ConversationHistoryMessageRole` / `FunctionCallHistoryMessageFunctionCallsItem` types. -- `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_v1history_function_calls_function_calls_item.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`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item.py` — hand-written compatibility aliases preserving old public Agent History request-param imports after regen renames (same 2026-07-31 recreation note as the type shims above). +- `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/google_think_provider_model.py`, `src/deepgram/types/groq_think_provider_reasoning_mode.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/requests/cartesia_speak_provider_voice.py` — hand-written compatibility aliases for the 2026-07-31 provider/model type renames (`AnthropicThinkProviderModel`→`AnthropicModel`, `GoogleThinkProviderModel`→`GoogleModel`, `GroqThinkProviderReasoningMode`→`GroqReasoningMode`, `CartesiaSpeakProviderModelId`→`CartesiaModelId`, `CartesiaSpeakProviderVoice`→`CartesiaVoice`, `DeepgramSpeakProviderModel`→`DeepgramModel`), re-exporting the new names under the old public import paths - `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). @@ -56,11 +55,11 @@ Current temporarily frozen files: - `src/deepgram/speak/v1/socket_client.py` — optional message param defaults, broad exception catch - `src/deepgram/speak/v2/socket_client.py` — same (optional `send_flush`/`send_close` defaults, broad exception catch); new websocket TTS client added in the 2026-07-08 regen - `src/deepgram/listen/v1/socket_client.py` — same -- `src/deepgram/listen/v2/socket_client.py` — same (broad except, optional `send_close_stream` default). As of the 2026-07-31 regen the generator properly types `send_configure(ListenV2Configure)` and the response Union with `ListenV2ConfigureSuccess`, so those parts are taken from the generator; the only `send_configure` patch retained is runtime tolerance for a raw dict (sent verbatim) for back-compat with pre-typed-model callers +- `src/deepgram/listen/v2/socket_client.py` — same + `send_configure` typing.Any/raw shim, response Union uses typing.Any instead of `ListenV2ConfigureSuccess` - `src/deepgram/agent/v1/socket_client.py` — same + `_sanitize_numeric_types` - `src/deepgram/agent/v1/types/agent_v1settings_agent_context.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent.py`, `src/deepgram/agent/v1/types/agent_v1settings.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent.py`, `src/deepgram/agent/v1/requests/agent_v1settings.py` — backward-compat patches for the 2026-05-05 Agent Settings schema restructure. These preserve callable `AgentV1SettingsAgent(...)`, keep `AgentV1Settings.agent` accepting both that wrapper and `agent_id` strings, restore the legacy request TypedDict shapes, remap legacy `messages=[...]` / nested `context=AgentV1SettingsAgentContext(messages=[...])` usage into the new `context={"messages": [...]}` wire shape, and keep read-side `obj.messages` access working. - `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/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 new 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. +- `src/deepgram/core/client_wrapper.py` — carries `# x-release-please-version` annotations on the `User-Agent` and `X-Fern-SDK-Version` header lines. `client_wrapper.py` is listed as a `generic` extra-file in `.github/release-please-config.json`, but the generic updater only rewrites annotated lines, so without these comments release-please never bumps the wire telemetry version and it drifts from the published package version (e.g. main shipping 7.4.0 while sending 7.3.2). Fern regenerates this file from scratch and would strip the annotations, so it is frozen to protect them. On regen, re-apply the two annotation comments to the freshly generated header lines. Unfreeze only if Fern's generator starts emitting the annotations itself. - `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 - `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/poetry.lock b/poetry.lock index a9b5c91a..04674910 100644 --- a/poetry.lock +++ b/poetry.lock @@ -15,132 +15,132 @@ files = [ [[package]] name = "aiohttp" -version = "3.14.3" +version = "3.14.1" description = "Async http client/server framework (asyncio)" optional = true python-versions = ">=3.10" groups = ["main"] markers = "extra == \"aiohttp\"" files = [ - {file = "aiohttp-3.14.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:eb0495d778817619273c108784292be161a924b9f5ae5cbbc70a2caa6838250b"}, - {file = "aiohttp-3.14.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c3c200cf9757edd785051dc699c7ecbec22110dbfcb3fefc7a9f9695eda8ea7a"}, - {file = "aiohttp-3.14.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd51ebf9d3a00c074df4ede271023f4d2dba289bcc740b88191872716014e3c5"}, - {file = "aiohttp-3.14.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:134ac5ddcf61c6fad984b9a5727d83492ada43d63471db20fb73042c13fca62f"}, - {file = "aiohttp-3.14.3-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:70c987b27534f9ae1a723f47ae921571d616da21d3208282bf4c52af5164ac43"}, - {file = "aiohttp-3.14.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1b59533861b70a2185c8f4f350f791f39d64358ef6944ce71c5240c9ec0982c9"}, - {file = "aiohttp-3.14.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1c5281acc88b92396f88c7e1e2748f8466689df22b80170e4f51efa712fb47a8"}, - {file = "aiohttp-3.14.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:48d67b87db6279c044760787eb01f6413032c2e6f3ba1cafaa492b1c8e578479"}, - {file = "aiohttp-3.14.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f53bcd52f585e1ac3e590d61434eb61f9a88c38df041b4ea126d97144344a77b"}, - {file = "aiohttp-3.14.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0fdea2281997af69da84c77ffa6f5938a0285f21fb3887c249d67419ca865b3d"}, - {file = "aiohttp-3.14.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:cda5fd5c95ad7a125a2e8464acc78b98b94c475a3780d6aa0aa157c93f470f4d"}, - {file = "aiohttp-3.14.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6debfa7312ff9d4c124dc71d72e9a0a4b9e0879e48ba6fcb42bef5c3300289e2"}, - {file = "aiohttp-3.14.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:f4e05329faa0ea1a404b37de4f034fd2c2defcca06a68dc6745e4e56c88e8a48"}, - {file = "aiohttp-3.14.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:a3a8296e7ab5c295f53f1041487cb088e1480775aafbf7fe545d93b770a0f96f"}, - {file = "aiohttp-3.14.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5373dc80ad1aa2fb9ad95c83f24eef418bbda3a61375f128e5b0192e4f3f9b32"}, - {file = "aiohttp-3.14.3-cp310-cp310-win32.whl", hash = "sha256:a3e22975f905b89a55a488c2a08f2fdb2186175349e917d48985cc468a3d4c6e"}, - {file = "aiohttp-3.14.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdd0e2834dce1a26c1bbe26464861e16bbe217042cbff619247c11594472518c"}, - {file = "aiohttp-3.14.3-cp310-cp310-win_arm64.whl", hash = "sha256:eac645b09bcfdf73df7536331f0678c1086ea250981118ddb5199e17ccef72bb"}, - {file = "aiohttp-3.14.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e568e14940c09955aa51f4e645b6daa18a581c5dcfcd73744dcc86a856e3ced3"}, - {file = "aiohttp-3.14.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:54cfcdee2770dac994417cbb0ee1f3eb0e7cb6b30c79bf44f2c02ff79ec5124a"}, - {file = "aiohttp-3.14.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:21c016079415ed3fd676963e9793700a566d85dbbd6bfc564b9b2d209147dcc8"}, - {file = "aiohttp-3.14.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d6088ec9894113802bddb3c09e974929aed2c7b3a8c456219b8aab4481f1a239"}, - {file = "aiohttp-3.14.3-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:16ea7e24c309fb7c0bbd505d149abe4fe4dccfb8db911db7dbec0921bc889a6f"}, - {file = "aiohttp-3.14.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56f355e79f71aef2a85c80305cc915f894b170dba76de5fe84f6351939b83c06"}, - {file = "aiohttp-3.14.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:18c441d0a8fca6de8d1f546849b9f0ab20d435993e2c5b59562b2fae6be2f929"}, - {file = "aiohttp-3.14.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:53e7b4ce82b54a8bcc71b3b67a5cbd177ca1d7f592cbc92cd38b7349f73482db"}, - {file = "aiohttp-3.14.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f55119f7bf25f49ed210f6096090715da24f2943c62102448915fde3c62877ce"}, - {file = "aiohttp-3.14.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9aa6e61fdf20105c4144e755bd586008ff450791d67b1c8146fdc15959c4d51c"}, - {file = "aiohttp-3.14.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ccd4893707b3e2a13e39c90d43cf80edf2e4d0457935bcc103bf2346214c3f15"}, - {file = "aiohttp-3.14.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b2466434105a4e03113c36ec775cc2ebe6676b62eae326fa670bb607ef788c1c"}, - {file = "aiohttp-3.14.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ba59d59aba08ac02fc03b0c8983ccd5ee39a199d0552ce9e6d2b4845b34d59ae"}, - {file = "aiohttp-3.14.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ed099d105449c4f9e84f24af203cd131349d4761d8813fa7e02c32e7128cd910"}, - {file = "aiohttp-3.14.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:152516815ef926786a0b6ae2b8f1fd2e0c71582dee0b435636865316fd4891b7"}, - {file = "aiohttp-3.14.3-cp311-cp311-win32.whl", hash = "sha256:a4af35c443e0b1a1bd6a8af3f3485d7fda15c142751a00f3ff8090f0b93346fa"}, - {file = "aiohttp-3.14.3-cp311-cp311-win_amd64.whl", hash = "sha256:e1e74298bab6ee0d6e749ed4fd1901c7e604bdda32c03d787a2cc71c46d0433d"}, - {file = "aiohttp-3.14.3-cp311-cp311-win_arm64.whl", hash = "sha256:03cd2bde3d7f085b64e549c985f4bb928cad7e8ecf5323bfca320db548d81b39"}, - {file = "aiohttp-3.14.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:39aded8c7f3b935b54aab1d8d73c70ec0ee2d3ec3b943e0e86611bc150ba47f5"}, - {file = "aiohttp-3.14.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5bcb6ff3fdab1258a192679ff1a05d44f59626430aa05cd1a9d2447423599228"}, - {file = "aiohttp-3.14.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:617105e2c3018ee38d0c8ce5ee3c84f621a6d8b9f723202aacaff28449ca91ee"}, - {file = "aiohttp-3.14.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f631fe87a6f30df5fbe6d79640b25e4cffb38c31c7fb6f10871517b84b0f8c1a"}, - {file = "aiohttp-3.14.3-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a94dbaae5ae27bd849c93570669bff91e0510f33a80805738e3de72a7be0447b"}, - {file = "aiohttp-3.14.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8f2f1c4c032c7cedd7d8da6f54c97b70266c6570c3108d3fdffee7188bb70529"}, - {file = "aiohttp-3.14.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ea05e1f97ceea523942d9b2a7d7c0359d781d683d6b043f5943a602b14da4787"}, - {file = "aiohttp-3.14.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:543906c127fb1d929b95076db19b83fa2d46751006ff1e23b093aa5ac4d8db42"}, - {file = "aiohttp-3.14.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0a5ff2dfbb9ce645fa5b8ef3e02c6c0b9cc3f6030ff863d0c51fffc50cb5541b"}, - {file = "aiohttp-3.14.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:041badb8f84396357c4d3ad26de6afd7a32b112f43d3c63045c0c8278cfd2043"}, - {file = "aiohttp-3.14.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:530125ee1163c4219af35dc3aa1206e541e7b31b6efc1a3f93b70a136f65d427"}, - {file = "aiohttp-3.14.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c8653fd547c93a61aadc612007790f5555cdd18946fa48cf45e26d8ea4ea473d"}, - {file = "aiohttp-3.14.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:89176250f686cb9853c0fb7ead90e639e915b84a6f43eedc2a4e7ec21f1037f0"}, - {file = "aiohttp-3.14.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3a26434dafe408229ff3403458ca58de24fb51936504decac49ce6755f77e59d"}, - {file = "aiohttp-3.14.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d1558173930a5a8d3069cee5c92fc91c87c4dbcb099debbb3622053717145a19"}, - {file = "aiohttp-3.14.3-cp312-cp312-win32.whl", hash = "sha256:16100ad3ab8d649fdfbee87602d9d2dcdca9df0b9eda8a1b5fdc0d41f96da559"}, - {file = "aiohttp-3.14.3-cp312-cp312-win_amd64.whl", hash = "sha256:33a2d7c28d33797a2e99923dffa63f83d908a19b6bf26cfe80fa790aa5e1a75a"}, - {file = "aiohttp-3.14.3-cp312-cp312-win_arm64.whl", hash = "sha256:362a3fd481769cac1a824514bcd86fda51c65e8fe6e051099e008fddde6db17c"}, - {file = "aiohttp-3.14.3-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:2e9878ae68e4a5f1c0abe4dd497dbc3d51946f5837b56759e2a02e78fa90ef86"}, - {file = "aiohttp-3.14.3-cp313-cp313-android_21_x86_64.whl", hash = "sha256:f3d2669fe7dec7fc359ecdb5984b29b50d85d5d00f8c1cb61de4f4a24ee42627"}, - {file = "aiohttp-3.14.3-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:cc7cb243a68167172f48c1fd43cee91ec4b1d40cefd190edd43369d1a6bc9c82"}, - {file = "aiohttp-3.14.3-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:78253b573e6ffab5028924fc98bc281aae05445969982a10864bc360dea2016c"}, - {file = "aiohttp-3.14.3-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:7041d52c3a7fa20c9e8c182b534704abb19502c8bdcbde7ab23bfda6f642394f"}, - {file = "aiohttp-3.14.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ac74facc01463f138b0da5580329cfcc82818dea5656e83ddcd11268fc12ff80"}, - {file = "aiohttp-3.14.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d6218d92e450824e9b4881f44e8c09f1853b490f9a64130801024a4793b1b3b0"}, - {file = "aiohttp-3.14.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:11fb37ef075669eee52ab1928fbf6e1741fada40409fa309ebde9607a962aebf"}, - {file = "aiohttp-3.14.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55bdcc472aafe2de4a253045cc128007a64f1e0264fb675791e132ea5edaa3bd"}, - {file = "aiohttp-3.14.3-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c39846c3aad97a8530c89d7a3869a8f8e9e3762c6ac0504481e5c80948f7e807"}, - {file = "aiohttp-3.14.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5895ef58c4620afe02fa16044f023dc4dafec08158f9d08874a46a7dbc0341b8"}, - {file = "aiohttp-3.14.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fa9467a8113aa69d3d7c55a70ef0b7c636010a40993f3df9d9d0d73b3eb7ef24"}, - {file = "aiohttp-3.14.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7d2deec16eeedf55f2c7cf75b521ea3856a5177e123844f8fd0f114ce252cb5"}, - {file = "aiohttp-3.14.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dd54d0e8717de95939766febac482ac0474d8ac3b048115f9f2b1d23a16e7db4"}, - {file = "aiohttp-3.14.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:df82f3787c940c94986b34222d59c9e38843fba85139f36e85255a82ad5355a9"}, - {file = "aiohttp-3.14.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:42a67efc36300d052fb4508a53e8b6901b9284b599ae63945c377569c5fcc1e1"}, - {file = "aiohttp-3.14.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7a75aa63cbf9b21cfaf60dc2657e19df2c2867d91707d653fee171ffeedd1371"}, - {file = "aiohttp-3.14.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e92eb8acc45eb6a9f4935071a77edf5b85cc6f8dfad5cd99e97653c26593cdde"}, - {file = "aiohttp-3.14.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b014a6ed7cf912e787149fdc529166d3ceabac23f26efeea3158c9aba2354e7e"}, - {file = "aiohttp-3.14.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3d4f72af88ac2474bb5bca640030320e3d38a0163a1d7533500e87be458eef71"}, - {file = "aiohttp-3.14.3-cp313-cp313-win32.whl", hash = "sha256:5f08ec777f35ee70720233b8b9811d3bb5d728137f30ac91b7457709c3261ac0"}, - {file = "aiohttp-3.14.3-cp313-cp313-win_amd64.whl", hash = "sha256:dff9461ec275f22135650d5ba4b4931a11f3958df7dfbb8db630000d4dee0883"}, - {file = "aiohttp-3.14.3-cp313-cp313-win_arm64.whl", hash = "sha256:ddcac3c6b382e81f1dd0499199d4136b877beb4cb5ef770bbbfba56c4b8f55d2"}, - {file = "aiohttp-3.14.3-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:49f7325beb0f85ef4aef5f48f490269575f83e6e2acad00a1d80b807eb027062"}, - {file = "aiohttp-3.14.3-cp314-cp314-android_24_x86_64.whl", hash = "sha256:e3be98a7c30b8c25d573dafba7171d66dfb05ee6a9070fc46535464ff97700a6"}, - {file = "aiohttp-3.14.3-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:614c61d478b83953e261d02bb2df750f17227cd33ef8002945bf5aebbde21919"}, - {file = "aiohttp-3.14.3-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:1caa7b0d05f3e3a36f87788c59e970a7ee1cefcfcbb924a9f138c4a6551c9cb7"}, - {file = "aiohttp-3.14.3-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:dfa68deb2a443bdaa3ea5297b0699c1464f08aef3812b486d1348eee61b07dc0"}, - {file = "aiohttp-3.14.3-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:e72ee89e28d907a18f46959b4eb0bb06701cc7f8cf4366e00029e2ccfaaf5924"}, - {file = "aiohttp-3.14.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ad4c8b7488d745d2ca4838ebd8ae5ba9b56341d30b1da43640e4ce87f9f49646"}, - {file = "aiohttp-3.14.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:db332af25642007330fca8be5c4d194caf2bea7a7fc84415aff3497af5dfee6b"}, - {file = "aiohttp-3.14.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:25bd2708db6bdf6a6630dd37bdcdfcb47c4434d22ac69c64665b802910140b30"}, - {file = "aiohttp-3.14.3-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:cef89a58e628c4efcac3275c2d68083f82426dcdc89c1492a6f654f9f7ea6ab9"}, - {file = "aiohttp-3.14.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c23ec8ee9d5ab2f5421f9c7fffce208435607af27fd46d4a44e031954352838f"}, - {file = "aiohttp-3.14.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e2667f0bbe7eb6c74eae5e9691441ad186e5845ca3cff63230fc09c4e7514f5d"}, - {file = "aiohttp-3.14.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18cb43369747b2ae007bd2655fb8e63a099c2ff1d207962943636dac989b3147"}, - {file = "aiohttp-3.14.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d77640cc618c1d99fc4f8589c0f24a730adfa54eb1e57ef7bf0c8dfb78da898c"}, - {file = "aiohttp-3.14.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:53e5179d8abb5710f8e83ba207c41c8d1261fcffd4616500e15ca2b7a33be10a"}, - {file = "aiohttp-3.14.3-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:cd817772b2fcf2b8c0905795318485f9ec16eae60b29feb7f4c77085311637f0"}, - {file = "aiohttp-3.14.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4e3ac92d90e92773b2362d506068e9a948192bd553e743c5b2429e28527c8661"}, - {file = "aiohttp-3.14.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:3f42e9b78301f11c8f861746175d8b9c1ccef713fcad9eab396e2f6db8ed4a22"}, - {file = "aiohttp-3.14.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:9d9edccfe496b476db5f398d97b865e9a6752bcf8aec4eef8390ce20fb64bb41"}, - {file = "aiohttp-3.14.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1c5ec8fb1bcc31a8466f74aaf26c345d5c386fa4bd08a3f0eb9c7a4a3fe8b5bf"}, - {file = "aiohttp-3.14.3-cp314-cp314-win32.whl", hash = "sha256:38901a84da3ce22249f6e860bf8f90d141bcab7da090cc398f8bb58c0e44b7da"}, - {file = "aiohttp-3.14.3-cp314-cp314-win_amd64.whl", hash = "sha256:8b3b60de05f3dcb6f6a00f818bb2ec781cee4de0645f59ccaf99b1d1823b6100"}, - {file = "aiohttp-3.14.3-cp314-cp314-win_arm64.whl", hash = "sha256:1576145bdceeb92382d899751e12743a3a5b8e460a841e3e50543859e54864dc"}, - {file = "aiohttp-3.14.3-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:8800c996b01c2772a783e3e46f3e1abd5823029adca0df54231960de9bfefa5b"}, - {file = "aiohttp-3.14.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ebe8e504f058fe91223351cecd2d9d6946c9d241bb0250d898ffbdf584cc72b0"}, - {file = "aiohttp-3.14.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:30402d03a7c0ff52bce290b57e564e9079fd9d0cb545c8aba73f86a103162d2e"}, - {file = "aiohttp-3.14.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fc7b5bfec6573f3ae844f457fdde5adeb713f8b8e4a81ad64fc207b49383716"}, - {file = "aiohttp-3.14.3-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8a5fd34f7f7410d1730d5c2ba873cacb2eed3fede366feb268a70ba22581ed8f"}, - {file = "aiohttp-3.14.3-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:270d3dace9ca2f10f0da5d8ebe519b7a310fc6112ed916e32df5866df0888553"}, - {file = "aiohttp-3.14.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3ae5b3a59436d089b5395d910121a390feed4d00578eb95a0fd1a329fe963100"}, - {file = "aiohttp-3.14.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2498f0fe69ead802f9675beca44a7c21c62fdaa4ec5145ea1c3ad6edbee29f85"}, - {file = "aiohttp-3.14.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a0dc483c00da8b673abbb367eb6f8d8f4bcec30eb58529ea13cb42e7fd2dfa33"}, - {file = "aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c7d3a97c678d34fc5b59da671ee9cd630096ddc643e7b5a30d54a2a6f3574d3f"}, - {file = "aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:f8fb78a83c9e5f741ca3a68cfb455c1f5bb83b4e7249a3848b3cd78d0a8563b0"}, - {file = "aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:74ab5b6a9fb13e873e5a90946588baecaf488745e1db1a4a5c433f971f035098"}, - {file = "aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:bd52f811e65f6fb634b1047159657c98f52b407f8efec907bcfc09da9a4c0a25"}, - {file = "aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:f0f177d1b195b9e06376cfd7d308d8a1b920909a609d03ac82a8c73bbb16d3b9"}, - {file = "aiohttp-3.14.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:498c6c623134f8e09a3c4e60bcd607a0b4590dd7dbf08dd40851b27cbb520ccb"}, - {file = "aiohttp-3.14.3-cp314-cp314t-win32.whl", hash = "sha256:b304db572b4368edd8dda8a2274f73156fe15558fca4a917cb8a09fc47af5963"}, - {file = "aiohttp-3.14.3-cp314-cp314t-win_amd64.whl", hash = "sha256:b20032766aedf6261c7a566585a40867d092ac03a0d81592d5370ef9b054f99b"}, - {file = "aiohttp-3.14.3-cp314-cp314t-win_arm64.whl", hash = "sha256:2e1161602f45a54de2ce0905243a95f58cb42dcd378402f3697f5e0b21e9d2e7"}, - {file = "aiohttp-3.14.3.tar.gz", hash = "sha256:9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f7844bc"}, + {file = "aiohttp-3.14.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8f6bb621e5863cfe8fe5ff5468002d200ec31f30f1280b259dc505b02595099e"}, + {file = "aiohttp-3.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4f7215cb3933784f79ed20e5f050e15984f390424339b22375d5a53c933a0491"}, + {file = "aiohttp-3.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d9d4e294455b23a68c9b8f042d0e8e377a265bcb15332753695f6e5b6819e0ce"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b238af795833d5731d049d82bc84b768ae6f8f97f0495963b3ed9935c5901cc3"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e4e5e0ae56914ecdbf446493addefc0159053dd53962cef37d7839f37f73d505"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:092e4ce3619a7c6dee52a6bdabda973d9b34b66781f840ce93c7e0cec30cf521"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb33777ea21e8b7ecde0e6fc84f598be0a1192eab1a63bc746d75aa75d38e7bd"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23119f8fd4f5d16902ed459b63b100bcd269628075162bddac56cc7b5273b3fb"}, + {file = "aiohttp-3.14.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:57fc6745a4b7d0f5a9eb4f40a69718be6c0bc1b8368cc9fe89e90118719f4f42"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6fd35beba67c4183b09375c5fff9accb47524191a244a99f95fd4472f5402c2b"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:672b9d65f42eb877f5c3f234a4547e4e1a226ca8c2eed879bb34670a0ce51192"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:24ba13339fed9251d9b1a1bec8c7ab84c0d1675d79d33501e11f94f8b9a84e05"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:94da27378da0610e341c4d30de29a191672683cc82b8f9556e8f7c7212a020fe"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:52cdac9432d8b4a719f35094a818d95adcae0f0b4fe9b9b921909e0c87de9e7d"}, + {file = "aiohttp-3.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:672ac254412a24d0d0cf00a9e6c238877e4be5e5fa2d188832c1244f45f31966"}, + {file = "aiohttp-3.14.1-cp310-cp310-win32.whl", hash = "sha256:2fe3607e71acc6ebb0ec8e492a247bf7a291226192dc0084236dfc12478916f6"}, + {file = "aiohttp-3.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:30099eda75a53c32efb0920e9c33c195314d2cc1c680fbfd30894932ac5f27df"}, + {file = "aiohttp-3.14.1-cp310-cp310-win_arm64.whl", hash = "sha256:5a837f49d901f9e368651b676912bff1104ed8c1a83b280bcd7b29adccef5c9c"}, + {file = "aiohttp-3.14.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:aa00140699487bd435fde4342d85c94cb256b7cd3a5b9c3396c67f19922afda2"}, + {file = "aiohttp-3.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1c1af67559445498b502030c35c59db59966f47041ca9de5b4e707f86bd10b5f"}, + {file = "aiohttp-3.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d44ec478e713ee7f29b439f7eb8dc2b9d4079e11ae114d2c2ac3d5daf30516c8"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3b1a184a9a8f548a6b73f1e26b96b052193e4b3175ed7342aaf1151a1f00a04"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5f2504bc0322437c9a1ff6d3333ca56c7477b727c995f036b976ae17b98372c8"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73f05ea02013e02512c3bf42714f1208c57168c779cc6fe23516e4543089d0a6"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:797457503c2d426bee06eef808d07b31ede30b65e054444e7de64cad0061b7af"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b821a1f7dedf7e37450654e620038ac3b2e81e8fa6ea269337e97101978ec730"}, + {file = "aiohttp-3.14.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4cd96b5ba05d67ed0cf00b5b405c8cd99586d8e3481e8ee0a831057591af7621"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d459b98a932296c6f0e94f87511a0b1b90a8a02c30a50e60a297619cd5a58ee"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:764457a7be60825fb770a644852ff717bcbb5042f189f2bd16df61a81b3f6573"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7a16ef45b081454ef844502d87a848876c490c4cb5c650c230f6ec79ed2c1e7"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2fbc3ed048b3475b9f0cbcb9978e9d2d3511acd91ead203af26ed9f0056004cf"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bedb0cd073cc2dc035e30aeb99444389d3cd2113afe4ef9fcd23d439f5bade85"}, + {file = "aiohttp-3.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b6feea921016eb3d4e04d65fc4e9ca402d1a3801f562aef94989f54694917af3"}, + {file = "aiohttp-3.14.1-cp311-cp311-win32.whl", hash = "sha256:313701e488100074ce99850404ee36e741abf6330179fec908a1944ecf570126"}, + {file = "aiohttp-3.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:03ab4530fdcb3a543a122ba4b65ac9919da9fe9f78a03d328a6e38ff962f7aa5"}, + {file = "aiohttp-3.14.1-cp311-cp311-win_arm64.whl", hash = "sha256:486f7d16ed54c39c2cbd7ca71fd8ba2b8bb7860df65bd7b6ed640bab96a38a8b"}, + {file = "aiohttp-3.14.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:d35143e27778b4bb0fb189562d7f275bff79c62ab8e98459717c0ea617ff2480"}, + {file = "aiohttp-3.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bcfb80a2cc36fba2534e5e5b5264dc7ae6fcd9bf15256da3e53d2f499e6fa29d"}, + {file = "aiohttp-3.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:27fd7c91e51729b4f7e1577865fa6d34c9adccbc39aabe9000285b48af9f0ec2"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c567bf9eaf664280116a8688f63016e6b32db2505908e2bdaca1b6438142f2"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:f5e6ff2bdbb8f4cd3fbe41f99e25bbcd58e3bf9f13d3dd31a11e7917251cc77a"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2f73e01dc37122325caf079982621262f96d74823c179038a82fddfc50359264"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bb2c0c80d431c0d03f2c7dbf125150fedd4f0de17366a7ca33f7ccb822391842"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3e6fc1a85fa7194a1a7d19f44e8609180f4a8eb5fa4c7ed8b4355f080fad235c"}, + {file = "aiohttp-3.14.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:686b6c0d3911ec387b444ddf5dc62fb7f7c0a7d5186a7861626496a5ab4aff95"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c6fa4dc7ad6f8109c70bb1499e589f76b0b792baf39f9b017eb92c8a81d0a199"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:87a5eea1b2a5e21e1ebdbb33ad4165359189327e63fc4e4894693e7f821ac817"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1c1421eb01d4fd608d88cc8290211d177a58532b55ad94076fb349c5bf467f0a"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:34b257ec41345c1e8f2df68fa908a7952f5de932723871eb633ecbbff396c9a4"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:de538791a80e5d862addbc183f70f0158ac9b9bb872bb147f1fd2a683691e087"}, + {file = "aiohttp-3.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6f71173be42d3241d428f760122febb748de0623f44308a6f120d0dd9ec572e3"}, + {file = "aiohttp-3.14.1-cp312-cp312-win32.whl", hash = "sha256:ec8dc383ee57ea3e883477dcca3f11b65d58199f1080acaf4cd6ad9a99698be4"}, + {file = "aiohttp-3.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:2aa92c87868cd13674989f9ee83e5f9f7ea4237589b728048e1f0c8f6caa3271"}, + {file = "aiohttp-3.14.1-cp312-cp312-win_arm64.whl", hash = "sha256:2c840c90759922cb5e6dda94596e079a30fb5a5ba548e7e0dc00574703940847"}, + {file = "aiohttp-3.14.1-cp313-cp313-android_21_arm64_v8a.whl", hash = "sha256:b3a03285a7f9c7b016324574a6d92a1c895da6b978cb8f1deee3ac72bc6da178"}, + {file = "aiohttp-3.14.1-cp313-cp313-android_21_x86_64.whl", hash = "sha256:2a73f487ab8ef5abbb24b7aa9b73e98eaba9e9e031804ff2416f02eca315ccaf"}, + {file = "aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:915fbb7b41b115192259f8c9ae58f3ddc444d2b5579917270211858e606a4afd"}, + {file = "aiohttp-3.14.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:7fb4bdf95b0561a79f259f9d28fbc109728c5ee7f27aff6391f0ca703a329abe"}, + {file = "aiohttp-3.14.1-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:1b9748363260121d2927704f5d4fc498150669ca3ae93625986ee89c8f80dcd4"}, + {file = "aiohttp-3.14.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:86a6dab78b0e43e2897a3bbe15745aa60dc5423ca437b7b0b164c069bf91b876"}, + {file = "aiohttp-3.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4dfd6e47d3c44c2279907607f73a4240b88c69eb8b90da7e2441a8045dfd21da"}, + {file = "aiohttp-3.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:317acd9f8602858dc7d59679812c376c7f0b97bcbbf16e0d6237f54141d8a8a6"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bd869c427324e5cb15195793de951295710db28be7d818247f3097b4ab5d4b96"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:93b032b5ec3255473c143627d21a69ac74ae12f7f33974cb587c564d11b1066f"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f234b4deb12f3ad59127e037bc57c40c21e45b45282df7d3a55a0f409f595296"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9af6779bfb46abf124068327abcdf9ce95c9ef8287a3e8da76ccf2d0f16c28fa"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:faccab372e66bc76d5731525e7f1143c922271725b9d38c9f97edcc66266b451"}, + {file = "aiohttp-3.14.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f380468b09d2a81633ee863b0ec5648d364bd17bb8ecfb8c2f387f7ac1faf42c"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:97e704dcd26271f5bda3fa07c3ce0fb76d6d3f8659f4baa1a24442cc9ba177ca"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:269b76ac5394092b95bc4a098f4fc6c191c083c3bd12775d1e30e663132f6a09"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c0b3e614340c889d575451696374c9d17affd54cd607ca0babed8f8c37b9397"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:5663ee9257cfa1add7253a7da3035a02f31b6600ec48261585e1800a81533080"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:603a2c834142172ffddc054067f5ec0ca65d57a0aa98a71bc81952573208e345"}, + {file = "aiohttp-3.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cb21957bb8aca671c1765e32f58164cf0c50e6bf41c0bbbd16da20732ecaf588"}, + {file = "aiohttp-3.14.1-cp313-cp313-win32.whl", hash = "sha256:e509a55f681e6158c20f70f102f9cf61fb20fbc382272bc6d94b7343f2582780"}, + {file = "aiohttp-3.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:1ac8531b638959718e18c2207fbfe297819875da46a740b29dfa29beba64355a"}, + {file = "aiohttp-3.14.1-cp313-cp313-win_arm64.whl", hash = "sha256:250d14af67f6b6a1a4a811049b1afa69d61d617fca6bf33149b3ab1a6dbcf7b8"}, + {file = "aiohttp-3.14.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:7c106c26852ca1c2047c6b80384f17100b4e439af276f21ef3d4e2f450ae7e15"}, + {file = "aiohttp-3.14.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:20205f7f5ade7aaec9f4b500549bbc071b046453aed72f9c06dcab87896a83e8"}, + {file = "aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:62a759436b29e677181a9e76bab8b8f689a29cb9c535f45f7c48c9c830d3f8c3"}, + {file = "aiohttp-3.14.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:2964cbf553df4d7a57348da44d961d871895fc1ee4e8c322b2a95612c7b17fba"}, + {file = "aiohttp-3.14.1-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:237651caadc3a59badd39319c54642b5299e9cc98a3a194310e55d5bb9f5e397"}, + {file = "aiohttp-3.14.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:896e12dfdbbab9d8f7e16d2b28c6769a60126fa92095d1ebf9473d02593a2448"}, + {file = "aiohttp-3.14.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d03f281ed22579314ba00821ce20115a7c0ac430660b4cc05704a3f818b3e004"}, + {file = "aiohttp-3.14.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:07eabb979d236335fed927e137a928c9adfb7df3b9ec7aa31726f133a62be983"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4fe1f1087cbadb280b5e1bb054a4f00d1423c74d6626c5e48400d871d34ecefe"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:367a9314fdc79dab0fac96e216cb41dd73c85bdca85306ce8999118ba7e0f333"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a24f677ebe83749039e7bdf862ff0bbb16818ae4193d4ef96505e269375bcce0"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c83afe0ba876be7e943d2e0ba645809ad441575d2840c895c21ee5de93b9377a"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:634e385930fb6d2d479cf3aa66515955863b77a5e3c2b5894ca259a25b308602"}, + {file = "aiohttp-3.14.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:eeea07c4397bbc57719c4eed8f9c284874d4f175f9b6d57f7a1546b976d455ca"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:335c0cc3e3545ce98dcb9cfcb836f40c3411f43fa03dab757597d80c89af8a35"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:ae6be797afdef264e8a84864a85b196ca06045586481b3df8a967322fd2fa844"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:8560b4d712474335d08907db7973f71912d3a9a8f1dee992ec06b5d2fe359496"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7edd08e0a5deb1e8564a2fcd8f4561014a3f05252334671bbf55ddd47db0e5"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:b6ff7fcee63287ae57b5df3e4f5957ce032122802509246dec1a5bcc55904c95"}, + {file = "aiohttp-3.14.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6ffbb2f4ec1ceaff7e07d43922954da26b223d188bf30658e561b98e23089444"}, + {file = "aiohttp-3.14.1-cp314-cp314-win32.whl", hash = "sha256:a9875b46d910cff3ea2f5962f9d266b465459fe634e22556ab9bd6fc1192eea0"}, + {file = "aiohttp-3.14.1-cp314-cp314-win_amd64.whl", hash = "sha256:af8b4b81a960eeaf1234971ac3cd0ba5901f3cd42eae42a46b4d089a8b492719"}, + {file = "aiohttp-3.14.1-cp314-cp314-win_arm64.whl", hash = "sha256:cf4491381b1b57425c315a56a439251b1bdac07b2275f19a8c44bc57744532ec"}, + {file = "aiohttp-3.14.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:819c054312f1af92947e6a55883d1b66feefab11531a7fc45e0fb9b63880b5c2"}, + {file = "aiohttp-3.14.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:10ee9c1753a8f706345b22496c79fbddb5be0599e0823f3738b1534058e25340"}, + {file = "aiohttp-3.14.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1601cc37baf5750ccacae618ec2daf020769581695550e3b654a911f859c563d"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d6e0ac9da31c9c04c84e1c0182ad8d6df35965a85cae29cd71d089621b3ae94"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9e8f2d660c350b3d0e259c7a7e3d9b7fc8b41210cbcc3d4a7076ff0a5e5c2fdc"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4691802dda97be727f79d86818acaad7eb8e9252626a1d6b519fedbb92d5e251"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c389c482a7e9b9dc3ee2701ac46c4125297a3818875b9c305ddb603c04828fd1"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fc0cacab7ba4e56f0f81c82a98c09bed2f39c940107b03a34b168bdf7597edd3"}, + {file = "aiohttp-3.14.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:979ed4717f59b8bb12e3963378fa285d93d367e15bcd66c721311826d3c44a6c"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:38e1e7daaea81df51c952e18483f323d878499a1e2bfe564790e0f9701d6f203"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:4132e72c608fe9fecb8f409113567605915b83e9bdd3ea56538d2f9cd35002f1"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:eefd9cc9b6d4a2db5f00a26bc3e4f9acf71926a6ec557cd56c9c6f27c290b665"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:b165790117eea512d7f3fb22f1f6dad3d55a7189571993eb015591c1401276d1"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ed09c7eb1c391271c2ed0314a51903e72a3acb653d5ccfc264cdf3ef11f8269d"}, + {file = "aiohttp-3.14.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:99abd37084b82f5830c635fddd0b4993b9742a66eb746dacf433c8590e8f9e3c"}, + {file = "aiohttp-3.14.1-cp314-cp314t-win32.whl", hash = "sha256:47ddf841cdecc810749921d25606dee45857d12d2ad5ddb7b5bd7eab12e4b365"}, + {file = "aiohttp-3.14.1-cp314-cp314t-win_amd64.whl", hash = "sha256:5e78b522b7a6e27e0b25d19b247b75039ac4c94f99823e3c9e53ae1603a9f7e9"}, + {file = "aiohttp-3.14.1-cp314-cp314t-win_arm64.whl", hash = "sha256:90d53f1609c29ccc2193945ef732428382a28f78d0456ae4d3daf0d48b74f0f6"}, + {file = "aiohttp-3.14.1.tar.gz", hash = "sha256:307f2cff90a764d329e77040603fa032db89c5c24fdad50c4c15334cba744035"}, ] [package.dependencies] @@ -176,14 +176,14 @@ typing-extensions = {version = ">=4.2", markers = "python_version < \"3.13\""} [[package]] name = "annotated-types" -version = "0.8.0" +version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false -python-versions = ">=3.10" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0"}, - {file = "annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] [[package]] @@ -247,14 +247,14 @@ files = [ [[package]] name = "certifi" -version = "2026.7.22" +version = "2026.6.17" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775"}, - {file = "certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55"}, + {file = "certifi-2026.6.17-py3-none-any.whl", hash = "sha256:2227dcbaafe0d2f59279d1762ddddc37783ed4354594f194ffc31d20f41fc3db"}, + {file = "certifi-2026.6.17.tar.gz", hash = "sha256:024c88eeec92ca068db80f02b8b07c9cef7b9fe261d1d535abfd5abd6f6af432"}, ] [[package]] @@ -609,15 +609,15 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "httpx-aiohttp" -version = "0.1.12" +version = "0.1.8" description = "Aiohttp transport for HTTPX" optional = true python-versions = ">=3.8" groups = ["main"] markers = "extra == \"aiohttp\"" files = [ - {file = "httpx_aiohttp-0.1.12-py3-none-any.whl", hash = "sha256:5b0eac39a7f360fa7867a60bcb46bb1024eada9c01cbfecdb54dc1edb3fb7141"}, - {file = "httpx_aiohttp-0.1.12.tar.gz", hash = "sha256:81feec51fd82c0ecfa0e9aaf1b1a6c2591260d5e2bcbeb7eb0277a78e610df2c"}, + {file = "httpx_aiohttp-0.1.8-py3-none-any.whl", hash = "sha256:b7bd958d1331f3759a38a0ba22ad29832cb63ca69498c17735228055bf78fa7e"}, + {file = "httpx_aiohttp-0.1.8.tar.gz", hash = "sha256:756c5e74cdb568c3248ba63fe82bfe8bbe64b928728720f7eaac64b3cf46f308"}, ] [package.dependencies] @@ -1725,4 +1725,4 @@ aiohttp = ["aiohttp", "httpx-aiohttp"] [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "da81cd862a1fa855037469ff02370744d0fdb4d757a53d9bae377f971e6f0fd2" +content-hash = "9720594db9f54f592921cb5f95880967c27258ad9fc3ddde5f3f9f174cfb0044" diff --git a/pyproject.toml b/pyproject.toml index 41703540..c56fdd2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ dynamic = ["version"] [tool.poetry] name = "deepgram-sdk" -version = "7.6.1" +version = "7.6.0" description = "" readme = "README.md" authors = [] @@ -38,9 +38,9 @@ Repository = 'https://github.com/deepgram/deepgram-python-sdk' [tool.poetry.dependencies] python = "^3.10" -aiohttp = { version = ">=3.14.1,<4", optional = true, python = ">=3.10"} +aiohttp = { version = ">=3.14.0,<4", optional = true, python = ">=3.10"} httpx = ">=0.21.2" -httpx-aiohttp = { version = "^0.1.8", optional = true, python = ">=3.10"} +httpx-aiohttp = { version = "0.1.8", optional = true, python = ">=3.10"} pydantic = ">= 1.9.2" pydantic-core = ">=2.18.2,<3.0.0" typing_extensions = ">= 4.0.0" diff --git a/reference.md b/reference.md index 98f1576a..05e739af 100644 --- a/reference.md +++ b/reference.md @@ -5396,26 +5396,6 @@ asyncio.run(main()) - `connection.send_close_stream()` - - - -
-
- -**`send_force_end_turn(message: ListenV2ForceEndTurn)`** — Force an immediate end-of-turn, prompting the model to finalize the current turn - -- `connection.send_force_end_turn(ListenV2ForceEndTurn(type="ForceEndTurn"))` - -
-
- -
-
- -**`send_configure(message: ListenV2Configure)`** — Update recognition settings mid-stream (a raw `dict` is also accepted and sent verbatim for back-compat) - -- `connection.send_configure(ListenV2Configure(...))` -
@@ -5509,14 +5489,6 @@ asyncio.run(main())
-**redact:** `typing.Optional[str]` — Redaction removes sensitive information from your transcripts (`numbers` or `aggressive_numbers`) - -
-
- -
-
- **mip_opt_out:** `typing.Optional[str]` — Opts out requests from the Deepgram Model Improvement Program
diff --git a/src/deepgram/__init__.py b/src/deepgram/__init__.py index d1eaeed0..98b9b5ad 100644 --- a/src/deepgram/__init__.py +++ b/src/deepgram/__init__.py @@ -20,7 +20,7 @@ AgentThinkModelsV1ResponseModelsItemZeroId, AgentVariableV1, Anthropic, - AnthropicModel, + AnthropicThinkProviderModel, AwsBedrockThinkProvider, AwsBedrockThinkProviderCredentials, AwsBedrockThinkProviderCredentialsType, @@ -35,10 +35,11 @@ BillingBreakdownV1ResponseResultsItem, BillingBreakdownV1ResponseResultsItemGrouping, Cartesia, - CartesiaModelId, - CartesiaVoice, + CartesiaSpeakProviderModelId, + CartesiaSpeakProviderVoice, CreateAgentConfigurationV1Response, CreateKeyV1Request, + CreateKeyV1RequestOne, CreateKeyV1Response, CreateProjectDistributionCredentialsV1Response, CreateProjectDistributionCredentialsV1ResponseDistributionCredentials, @@ -47,7 +48,8 @@ Deepgram, DeepgramListenProviderV1, DeepgramListenProviderV2, - DeepgramModel, + DeepgramListenProviderV2LanguageHint, + DeepgramSpeakProviderModel, DeleteAgentConfigurationV1Response, DeleteAgentVariableV1Response, DeleteProjectInviteV1Response, @@ -75,10 +77,10 @@ GetProjectRequestV1Response, GetProjectV1Response, Google, - GoogleModel, + GoogleThinkProviderModel, GrantV1Response, Groq, - GroqReasoningMode, + GroqThinkProviderReasoningMode, LeaveProjectV1Response, ListAgentConfigurationsV1Response, ListAgentVariablesV1Response, @@ -133,8 +135,6 @@ ListenV1RequestFile, ListenV1Response, ListenV1ResponseMetadata, - ListenV1ResponseMetadataDiarizeInfo, - ListenV1ResponseMetadataDiarizeInfoArch, ListenV1ResponseMetadataIntentsInfo, ListenV1ResponseMetadataSentimentInfo, ListenV1ResponseMetadataSummaryInfo, @@ -173,7 +173,6 @@ ListenV2Model, ListenV2Numerals, ListenV2ProfanityFilter, - ListenV2Redact, ListenV2SampleRate, ListenV2Tag, OpenAiSpeakProvider, @@ -278,7 +277,7 @@ BillingBreakdownV1ResponseResultsItemGroupingParams, BillingBreakdownV1ResponseResultsItemParams, CartesiaParams, - CartesiaVoiceParams, + CartesiaSpeakProviderVoiceParams, CreateAgentConfigurationV1ResponseParams, CreateKeyV1RequestParams, CreateKeyV1ResponseParams, @@ -287,6 +286,7 @@ CreateProjectDistributionCredentialsV1ResponseParams, CreateProjectInviteV1ResponseParams, DeepgramListenProviderV1Params, + DeepgramListenProviderV2LanguageHintParams, DeepgramListenProviderV2Params, DeepgramParams, DeleteProjectInviteV1ResponseParams, @@ -343,7 +343,6 @@ ListProjectsV1ResponseParams, ListProjectsV1ResponseProjectsItemParams, ListenV1AcceptedResponseParams, - ListenV1ResponseMetadataDiarizeInfoParams, ListenV1ResponseMetadataIntentsInfoParams, ListenV1ResponseMetadataParams, ListenV1ResponseMetadataSentimentInfoParams, @@ -431,17 +430,6 @@ 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 GroqThinkProviderReasoningMode - _dynamic_imports: typing.Dict[str, str] = { "AgentConfigurationV1": ".types", "AgentConfigurationV1Params": ".requests", @@ -465,8 +453,8 @@ "AgentVariableV1": ".types", "AgentVariableV1Params": ".requests", "Anthropic": ".types", - "AnthropicModel": ".types", "AnthropicParams": ".requests", + "AnthropicThinkProviderModel": ".types", "AsyncDeepgramClient": ".client", "AwsBedrockThinkProvider": ".types", "AwsBedrockThinkProviderCredentials": ".types", @@ -491,13 +479,14 @@ "BillingBreakdownV1ResponseResultsItemGroupingParams": ".requests", "BillingBreakdownV1ResponseResultsItemParams": ".requests", "Cartesia": ".types", - "CartesiaModelId": ".types", "CartesiaParams": ".requests", - "CartesiaVoice": ".types", - "CartesiaVoiceParams": ".requests", + "CartesiaSpeakProviderModelId": ".types", + "CartesiaSpeakProviderVoice": ".types", + "CartesiaSpeakProviderVoiceParams": ".requests", "CreateAgentConfigurationV1Response": ".types", "CreateAgentConfigurationV1ResponseParams": ".requests", "CreateKeyV1Request": ".types", + "CreateKeyV1RequestOne": ".types", "CreateKeyV1RequestParams": ".requests", "CreateKeyV1Response": ".types", "CreateKeyV1ResponseParams": ".requests", @@ -515,9 +504,11 @@ "DeepgramListenProviderV1": ".types", "DeepgramListenProviderV1Params": ".requests", "DeepgramListenProviderV2": ".types", + "DeepgramListenProviderV2LanguageHint": ".types", + "DeepgramListenProviderV2LanguageHintParams": ".requests", "DeepgramListenProviderV2Params": ".requests", - "DeepgramModel": ".types", "DeepgramParams": ".requests", + "DeepgramSpeakProviderModel": ".types", "DefaultAioHttpClient": "._default_clients", "DefaultAsyncHttpxClient": "._default_clients", "DeleteAgentConfigurationV1Response": ".types", @@ -569,13 +560,13 @@ "GetProjectV1Response": ".types", "GetProjectV1ResponseParams": ".requests", "Google": ".types", - "GoogleModel": ".types", "GoogleParams": ".requests", + "GoogleThinkProviderModel": ".types", "GrantV1Response": ".types", "GrantV1ResponseParams": ".requests", "Groq": ".types", "GroqParams": ".requests", - "GroqReasoningMode": ".types", + "GroqThinkProviderReasoningMode": ".types", "LeaveProjectV1Response": ".types", "LeaveProjectV1ResponseParams": ".requests", "ListAgentConfigurationsV1Response": ".types", @@ -659,9 +650,6 @@ "ListenV1RequestFile": ".types", "ListenV1Response": ".types", "ListenV1ResponseMetadata": ".types", - "ListenV1ResponseMetadataDiarizeInfo": ".types", - "ListenV1ResponseMetadataDiarizeInfoArch": ".types", - "ListenV1ResponseMetadataDiarizeInfoParams": ".requests", "ListenV1ResponseMetadataIntentsInfo": ".types", "ListenV1ResponseMetadataIntentsInfoParams": ".requests", "ListenV1ResponseMetadataParams": ".requests", @@ -725,7 +713,6 @@ "ListenV2Model": ".types", "ListenV2Numerals": ".types", "ListenV2ProfanityFilter": ".types", - "ListenV2Redact": ".types", "ListenV2SampleRate": ".types", "ListenV2Tag": ".types", "OpenAiSpeakProvider": ".types", @@ -873,16 +860,6 @@ "self_hosted": ".self_hosted", "speak": ".speak", "voice_agent": ".voice_agent", - "AnthropicThinkProviderModel": ".types", - "CartesiaSpeakProviderModelId": ".types", - "CartesiaSpeakProviderVoice": ".types", - "CartesiaSpeakProviderVoiceParams": ".requests", - "CreateKeyV1RequestOne": ".types", - "DeepgramListenProviderV2LanguageHint": ".types", - "DeepgramListenProviderV2LanguageHintParams": ".requests", - "DeepgramSpeakProviderModel": ".types", - "GoogleThinkProviderModel": ".types", - "GroqThinkProviderReasoningMode": ".types", } @@ -930,8 +907,8 @@ def __dir__(): "AgentVariableV1", "AgentVariableV1Params", "Anthropic", - "AnthropicModel", "AnthropicParams", + "AnthropicThinkProviderModel", "AsyncDeepgramClient", "AwsBedrockThinkProvider", "AwsBedrockThinkProviderCredentials", @@ -956,13 +933,14 @@ def __dir__(): "BillingBreakdownV1ResponseResultsItemGroupingParams", "BillingBreakdownV1ResponseResultsItemParams", "Cartesia", - "CartesiaModelId", "CartesiaParams", - "CartesiaVoice", - "CartesiaVoiceParams", + "CartesiaSpeakProviderModelId", + "CartesiaSpeakProviderVoice", + "CartesiaSpeakProviderVoiceParams", "CreateAgentConfigurationV1Response", "CreateAgentConfigurationV1ResponseParams", "CreateKeyV1Request", + "CreateKeyV1RequestOne", "CreateKeyV1RequestParams", "CreateKeyV1Response", "CreateKeyV1ResponseParams", @@ -980,9 +958,11 @@ def __dir__(): "DeepgramListenProviderV1", "DeepgramListenProviderV1Params", "DeepgramListenProviderV2", + "DeepgramListenProviderV2LanguageHint", + "DeepgramListenProviderV2LanguageHintParams", "DeepgramListenProviderV2Params", - "DeepgramModel", "DeepgramParams", + "DeepgramSpeakProviderModel", "DefaultAioHttpClient", "DefaultAsyncHttpxClient", "DeleteAgentConfigurationV1Response", @@ -1034,13 +1014,13 @@ def __dir__(): "GetProjectV1Response", "GetProjectV1ResponseParams", "Google", - "GoogleModel", "GoogleParams", + "GoogleThinkProviderModel", "GrantV1Response", "GrantV1ResponseParams", "Groq", "GroqParams", - "GroqReasoningMode", + "GroqThinkProviderReasoningMode", "LeaveProjectV1Response", "LeaveProjectV1ResponseParams", "ListAgentConfigurationsV1Response", @@ -1124,9 +1104,6 @@ def __dir__(): "ListenV1RequestFile", "ListenV1Response", "ListenV1ResponseMetadata", - "ListenV1ResponseMetadataDiarizeInfo", - "ListenV1ResponseMetadataDiarizeInfoArch", - "ListenV1ResponseMetadataDiarizeInfoParams", "ListenV1ResponseMetadataIntentsInfo", "ListenV1ResponseMetadataIntentsInfoParams", "ListenV1ResponseMetadataParams", @@ -1190,7 +1167,6 @@ def __dir__(): "ListenV2Model", "ListenV2Numerals", "ListenV2ProfanityFilter", - "ListenV2Redact", "ListenV2SampleRate", "ListenV2Tag", "OpenAiSpeakProvider", @@ -1338,14 +1314,4 @@ def __dir__(): "self_hosted", "speak", "voice_agent", - "AnthropicThinkProviderModel", - "CartesiaSpeakProviderModelId", - "CartesiaSpeakProviderVoice", - "CartesiaSpeakProviderVoiceParams", - "CreateKeyV1RequestOne", - "DeepgramListenProviderV2LanguageHint", - "DeepgramListenProviderV2LanguageHintParams", - "DeepgramSpeakProviderModel", - "GoogleThinkProviderModel", - "GroqThinkProviderReasoningMode", ] diff --git a/src/deepgram/agent/__init__.py b/src/deepgram/agent/__init__.py index f004bcc5..410c3fd0 100644 --- a/src/deepgram/agent/__init__.py +++ b/src/deepgram/agent/__init__.py @@ -24,6 +24,13 @@ AgentV1FunctionCallRequestFunctionsItemParams, AgentV1FunctionCallRequestParams, AgentV1History, + AgentV1HistoryContent, + AgentV1HistoryContentParams, + AgentV1HistoryContentRole, + AgentV1HistoryFunctionCalls, + AgentV1HistoryFunctionCallsFunctionCallsItem, + AgentV1HistoryFunctionCallsFunctionCallsItemParams, + AgentV1HistoryFunctionCallsParams, AgentV1HistoryParams, AgentV1InjectAgentMessage, AgentV1InjectAgentMessageBehavior, @@ -49,17 +56,35 @@ 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, @@ -68,6 +93,10 @@ AgentV1SettingsAgentListenParams, AgentV1SettingsAgentListenProvider, AgentV1SettingsAgentListenProviderParams, + AgentV1SettingsAgentListenProviderV1, + AgentV1SettingsAgentListenProviderV1Params, + AgentV1SettingsAgentListenProviderV2, + AgentV1SettingsAgentListenProviderV2Params, AgentV1SettingsAgentListenProvider_V1, AgentV1SettingsAgentListenProvider_V1Params, AgentV1SettingsAgentListenProvider_V2, @@ -98,12 +127,6 @@ AgentV1UpdateListen, AgentV1UpdateListenListen, AgentV1UpdateListenListenParams, - AgentV1UpdateListenListenProvider, - AgentV1UpdateListenListenProviderParams, - AgentV1UpdateListenListenProvider_V1, - AgentV1UpdateListenListenProvider_V1Params, - AgentV1UpdateListenListenProvider_V2, - AgentV1UpdateListenListenProvider_V2Params, AgentV1UpdateListenParams, AgentV1UpdatePrompt, AgentV1UpdatePromptParams, @@ -123,43 +146,9 @@ AgentV1WelcomeParams, ConversationHistoryMessage, ConversationHistoryMessageParams, - ConversationHistoryMessageRole, FunctionCallHistoryMessage, - FunctionCallHistoryMessageFunctionCallsItem, - FunctionCallHistoryMessageFunctionCallsItemParams, FunctionCallHistoryMessageParams, ) - from .v1 import AgentV1HistoryContent - from .v1 import AgentV1HistoryContentParams - from .v1 import AgentV1HistoryFunctionCalls - from .v1 import AgentV1HistoryFunctionCallsParams - 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 - - from .v1 import AgentV1HistoryContentRole - from .v1 import AgentV1HistoryFunctionCallsFunctionCallsItem - from .v1 import AgentV1SettingsAgentContextContextMessagesItemContentRole - from .v1 import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem - from .v1 import AgentV1HistoryFunctionCallsFunctionCallsItemParams - from .v1 import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams - _dynamic_imports: typing.Dict[str, str] = { "AgentV1AgentAudioDone": ".v1", "AgentV1AgentAudioDoneParams": ".v1", @@ -177,6 +166,13 @@ "AgentV1FunctionCallRequestFunctionsItemParams": ".v1", "AgentV1FunctionCallRequestParams": ".v1", "AgentV1History": ".v1", + "AgentV1HistoryContent": ".v1", + "AgentV1HistoryContentParams": ".v1", + "AgentV1HistoryContentRole": ".v1", + "AgentV1HistoryFunctionCalls": ".v1", + "AgentV1HistoryFunctionCallsFunctionCallsItem": ".v1", + "AgentV1HistoryFunctionCallsFunctionCallsItemParams": ".v1", + "AgentV1HistoryFunctionCallsParams": ".v1", "AgentV1HistoryParams": ".v1", "AgentV1InjectAgentMessage": ".v1", "AgentV1InjectAgentMessageBehavior": ".v1", @@ -202,16 +198,34 @@ "AgentV1SettingsAgentContext": ".v1", "AgentV1SettingsAgentContextContext": ".v1", "AgentV1SettingsAgentContextContextMessagesItem": ".v1", + "AgentV1SettingsAgentContextContextMessagesItemContentRole": ".v1", + "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem": ".v1", + "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams": ".v1", "AgentV1SettingsAgentContextContextMessagesItemParams": ".v1", "AgentV1SettingsAgentContextContextParams": ".v1", "AgentV1SettingsAgentContextListen": ".v1", "AgentV1SettingsAgentContextListenParams": ".v1", "AgentV1SettingsAgentContextListenProvider": ".v1", "AgentV1SettingsAgentContextListenProviderParams": ".v1", + "AgentV1SettingsAgentContextListenProviderV1": ".v1", + "AgentV1SettingsAgentContextListenProviderV1Params": ".v1", + "AgentV1SettingsAgentContextListenProviderV2": ".v1", + "AgentV1SettingsAgentContextListenProviderV2LanguageHint": ".v1", + "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams": ".v1", + "AgentV1SettingsAgentContextListenProviderV2Params": ".v1", "AgentV1SettingsAgentContextListenProvider_V1": ".v1", "AgentV1SettingsAgentContextListenProvider_V1Params": ".v1", "AgentV1SettingsAgentContextListenProvider_V2": ".v1", "AgentV1SettingsAgentContextListenProvider_V2Params": ".v1", + "AgentV1SettingsAgentContextMessagesItem": ".v1", + "AgentV1SettingsAgentContextMessagesItemContent": ".v1", + "AgentV1SettingsAgentContextMessagesItemContentParams": ".v1", + "AgentV1SettingsAgentContextMessagesItemContentRole": ".v1", + "AgentV1SettingsAgentContextMessagesItemFunctionCalls": ".v1", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem": ".v1", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams": ".v1", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams": ".v1", + "AgentV1SettingsAgentContextMessagesItemParams": ".v1", "AgentV1SettingsAgentContextParams": ".v1", "AgentV1SettingsAgentContextSpeak": ".v1", "AgentV1SettingsAgentContextSpeakParams": ".v1", @@ -221,6 +235,10 @@ "AgentV1SettingsAgentListenParams": ".v1", "AgentV1SettingsAgentListenProvider": ".v1", "AgentV1SettingsAgentListenProviderParams": ".v1", + "AgentV1SettingsAgentListenProviderV1": ".v1", + "AgentV1SettingsAgentListenProviderV1Params": ".v1", + "AgentV1SettingsAgentListenProviderV2": ".v1", + "AgentV1SettingsAgentListenProviderV2Params": ".v1", "AgentV1SettingsAgentListenProvider_V1": ".v1", "AgentV1SettingsAgentListenProvider_V1Params": ".v1", "AgentV1SettingsAgentListenProvider_V2": ".v1", @@ -251,12 +269,6 @@ "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", @@ -276,41 +288,9 @@ "AgentV1WelcomeParams": ".v1", "ConversationHistoryMessage": ".v1", "ConversationHistoryMessageParams": ".v1", - "ConversationHistoryMessageRole": ".v1", "FunctionCallHistoryMessage": ".v1", - "FunctionCallHistoryMessageFunctionCallsItem": ".v1", - "FunctionCallHistoryMessageFunctionCallsItemParams": ".v1", "FunctionCallHistoryMessageParams": ".v1", "v1": ".v1", - "AgentV1HistoryContent": ".v1", - "AgentV1HistoryContentParams": ".v1", - "AgentV1HistoryFunctionCalls": ".v1", - "AgentV1HistoryFunctionCallsParams": ".v1", - "AgentV1SettingsAgentContextListenProviderV1": ".v1", - "AgentV1SettingsAgentContextListenProviderV1Params": ".v1", - "AgentV1SettingsAgentContextListenProviderV2": ".v1", - "AgentV1SettingsAgentContextListenProviderV2LanguageHint": ".v1", - "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams": ".v1", - "AgentV1SettingsAgentContextListenProviderV2Params": ".v1", - "AgentV1SettingsAgentContextMessagesItem": ".v1", - "AgentV1SettingsAgentContextMessagesItemContent": ".v1", - "AgentV1SettingsAgentContextMessagesItemContentParams": ".v1", - "AgentV1SettingsAgentContextMessagesItemContentRole": ".v1", - "AgentV1SettingsAgentContextMessagesItemFunctionCalls": ".v1", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem": ".v1", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams": ".v1", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams": ".v1", - "AgentV1SettingsAgentContextMessagesItemParams": ".v1", - "AgentV1SettingsAgentListenProviderV1": ".v1", - "AgentV1SettingsAgentListenProviderV1Params": ".v1", - "AgentV1SettingsAgentListenProviderV2": ".v1", - "AgentV1SettingsAgentListenProviderV2Params": ".v1", - "AgentV1HistoryContentRole": ".v1", - "AgentV1HistoryFunctionCallsFunctionCallsItem": ".v1", - "AgentV1SettingsAgentContextContextMessagesItemContentRole": ".v1", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem": ".v1", - "AgentV1HistoryFunctionCallsFunctionCallsItemParams": ".v1", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams": ".v1", } @@ -352,6 +332,13 @@ def __dir__(): "AgentV1FunctionCallRequestFunctionsItemParams", "AgentV1FunctionCallRequestParams", "AgentV1History", + "AgentV1HistoryContent", + "AgentV1HistoryContentParams", + "AgentV1HistoryContentRole", + "AgentV1HistoryFunctionCalls", + "AgentV1HistoryFunctionCallsFunctionCallsItem", + "AgentV1HistoryFunctionCallsFunctionCallsItemParams", + "AgentV1HistoryFunctionCallsParams", "AgentV1HistoryParams", "AgentV1InjectAgentMessage", "AgentV1InjectAgentMessageBehavior", @@ -377,16 +364,34 @@ def __dir__(): "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", + "AgentV1SettingsAgentContextMessagesItem", + "AgentV1SettingsAgentContextMessagesItemContent", + "AgentV1SettingsAgentContextMessagesItemContentParams", + "AgentV1SettingsAgentContextMessagesItemContentRole", + "AgentV1SettingsAgentContextMessagesItemFunctionCalls", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams", + "AgentV1SettingsAgentContextMessagesItemParams", "AgentV1SettingsAgentContextParams", "AgentV1SettingsAgentContextSpeak", "AgentV1SettingsAgentContextSpeakParams", @@ -396,6 +401,10 @@ def __dir__(): "AgentV1SettingsAgentListenParams", "AgentV1SettingsAgentListenProvider", "AgentV1SettingsAgentListenProviderParams", + "AgentV1SettingsAgentListenProviderV1", + "AgentV1SettingsAgentListenProviderV1Params", + "AgentV1SettingsAgentListenProviderV2", + "AgentV1SettingsAgentListenProviderV2Params", "AgentV1SettingsAgentListenProvider_V1", "AgentV1SettingsAgentListenProvider_V1Params", "AgentV1SettingsAgentListenProvider_V2", @@ -426,12 +435,6 @@ def __dir__(): "AgentV1UpdateListen", "AgentV1UpdateListenListen", "AgentV1UpdateListenListenParams", - "AgentV1UpdateListenListenProvider", - "AgentV1UpdateListenListenProviderParams", - "AgentV1UpdateListenListenProvider_V1", - "AgentV1UpdateListenListenProvider_V1Params", - "AgentV1UpdateListenListenProvider_V2", - "AgentV1UpdateListenListenProvider_V2Params", "AgentV1UpdateListenParams", "AgentV1UpdatePrompt", "AgentV1UpdatePromptParams", @@ -451,39 +454,7 @@ def __dir__(): "AgentV1WelcomeParams", "ConversationHistoryMessage", "ConversationHistoryMessageParams", - "ConversationHistoryMessageRole", "FunctionCallHistoryMessage", - "FunctionCallHistoryMessageFunctionCallsItem", - "FunctionCallHistoryMessageFunctionCallsItemParams", "FunctionCallHistoryMessageParams", "v1", - "AgentV1HistoryContent", - "AgentV1HistoryContentParams", - "AgentV1HistoryFunctionCalls", - "AgentV1HistoryFunctionCallsParams", - "AgentV1SettingsAgentContextListenProviderV1", - "AgentV1SettingsAgentContextListenProviderV1Params", - "AgentV1SettingsAgentContextListenProviderV2", - "AgentV1SettingsAgentContextListenProviderV2LanguageHint", - "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams", - "AgentV1SettingsAgentContextListenProviderV2Params", - "AgentV1SettingsAgentContextMessagesItem", - "AgentV1SettingsAgentContextMessagesItemContent", - "AgentV1SettingsAgentContextMessagesItemContentParams", - "AgentV1SettingsAgentContextMessagesItemContentRole", - "AgentV1SettingsAgentContextMessagesItemFunctionCalls", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams", - "AgentV1SettingsAgentContextMessagesItemParams", - "AgentV1SettingsAgentListenProviderV1", - "AgentV1SettingsAgentListenProviderV1Params", - "AgentV1SettingsAgentListenProviderV2", - "AgentV1SettingsAgentListenProviderV2Params", - "AgentV1HistoryContentRole", - "AgentV1HistoryFunctionCallsFunctionCallsItem", - "AgentV1SettingsAgentContextContextMessagesItemContentRole", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem", - "AgentV1HistoryFunctionCallsFunctionCallsItemParams", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams", ] diff --git a/src/deepgram/agent/v1/__init__.py b/src/deepgram/agent/v1/__init__.py index 256a8e6c..e40c7a5e 100644 --- a/src/deepgram/agent/v1/__init__.py +++ b/src/deepgram/agent/v1/__init__.py @@ -16,6 +16,10 @@ AgentV1FunctionCallRequest, AgentV1FunctionCallRequestFunctionsItem, AgentV1History, + AgentV1HistoryContent, + AgentV1HistoryContentRole, + AgentV1HistoryFunctionCalls, + AgentV1HistoryFunctionCallsFunctionCallsItem, AgentV1InjectAgentMessage, AgentV1InjectAgentMessageBehavior, AgentV1InjectUserMessage, @@ -31,14 +35,26 @@ 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, @@ -55,9 +71,6 @@ AgentV1ThinkUpdated, AgentV1UpdateListen, AgentV1UpdateListenListen, - AgentV1UpdateListenListenProvider, - AgentV1UpdateListenListenProvider_V1, - AgentV1UpdateListenListenProvider_V2, AgentV1UpdatePrompt, AgentV1UpdateSpeak, AgentV1UpdateSpeakSpeak, @@ -67,9 +80,7 @@ AgentV1Warning, AgentV1Welcome, ConversationHistoryMessage, - ConversationHistoryMessageRole, FunctionCallHistoryMessage, - FunctionCallHistoryMessageFunctionCallsItem, ) from . import settings from .requests import ( @@ -80,6 +91,9 @@ AgentV1ErrorParams, AgentV1FunctionCallRequestFunctionsItemParams, AgentV1FunctionCallRequestParams, + AgentV1HistoryContentParams, + AgentV1HistoryFunctionCallsFunctionCallsItemParams, + AgentV1HistoryFunctionCallsParams, AgentV1HistoryParams, AgentV1InjectAgentMessageParams, AgentV1InjectUserMessageParams, @@ -90,17 +104,27 @@ 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, @@ -115,9 +139,6 @@ AgentV1SpeakUpdatedParams, AgentV1ThinkUpdatedParams, AgentV1UpdateListenListenParams, - AgentV1UpdateListenListenProviderParams, - AgentV1UpdateListenListenProvider_V1Params, - AgentV1UpdateListenListenProvider_V2Params, AgentV1UpdateListenParams, AgentV1UpdatePromptParams, AgentV1UpdateSpeakParams, @@ -128,40 +149,8 @@ AgentV1WarningParams, AgentV1WelcomeParams, ConversationHistoryMessageParams, - FunctionCallHistoryMessageFunctionCallsItemParams, FunctionCallHistoryMessageParams, ) - from .types import AgentV1HistoryContent - from .requests import AgentV1HistoryContentParams - from .types import AgentV1HistoryFunctionCalls - from .requests import AgentV1HistoryFunctionCallsParams - 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 - - from .types import AgentV1HistoryContentRole - from .types import AgentV1HistoryFunctionCallsFunctionCallsItem - from .types import AgentV1SettingsAgentContextContextMessagesItemContentRole - from .types import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem - from .requests import AgentV1HistoryFunctionCallsFunctionCallsItemParams - from .requests import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams - _dynamic_imports: typing.Dict[str, str] = { "AgentV1AgentAudioDone": ".types", "AgentV1AgentAudioDoneParams": ".requests", @@ -179,6 +168,13 @@ "AgentV1FunctionCallRequestFunctionsItemParams": ".requests", "AgentV1FunctionCallRequestParams": ".requests", "AgentV1History": ".types", + "AgentV1HistoryContent": ".types", + "AgentV1HistoryContentParams": ".requests", + "AgentV1HistoryContentRole": ".types", + "AgentV1HistoryFunctionCalls": ".types", + "AgentV1HistoryFunctionCallsFunctionCallsItem": ".types", + "AgentV1HistoryFunctionCallsFunctionCallsItemParams": ".requests", + "AgentV1HistoryFunctionCallsParams": ".requests", "AgentV1HistoryParams": ".requests", "AgentV1InjectAgentMessage": ".types", "AgentV1InjectAgentMessageBehavior": ".types", @@ -204,17 +200,35 @@ "AgentV1SettingsAgentContext": ".types", "AgentV1SettingsAgentContextContext": ".types", "AgentV1SettingsAgentContextContextMessagesItem": ".types", + "AgentV1SettingsAgentContextContextMessagesItemContentRole": ".types", + "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem": ".types", + "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams": ".requests", "AgentV1SettingsAgentContextContextMessagesItemParams": ".requests", "AgentV1SettingsAgentContextContextParams": ".requests", "AgentV1SettingsAgentContextListen": ".types", "AgentV1SettingsAgentContextListenParams": ".requests", "AgentV1SettingsAgentContextListenProvider": ".types", "AgentV1SettingsAgentContextListenProviderParams": ".requests", + "AgentV1SettingsAgentContextListenProviderV1": ".types", + "AgentV1SettingsAgentContextListenProviderV1Params": ".requests", + "AgentV1SettingsAgentContextListenProviderV2": ".types", + "AgentV1SettingsAgentContextListenProviderV2LanguageHint": ".types", + "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams": ".requests", + "AgentV1SettingsAgentContextListenProviderV2Params": ".requests", "AgentV1SettingsAgentContextListenProvider_V1": ".types", "AgentV1SettingsAgentContextListenProvider_V1Params": ".requests", "AgentV1SettingsAgentContextListenProvider_V2": ".types", "AgentV1SettingsAgentContextListenProvider_V2Params": ".requests", "AgentV1SettingsAgentContextParams": ".requests", + "AgentV1SettingsAgentContextMessagesItem": ".types", + "AgentV1SettingsAgentContextMessagesItemContent": ".types", + "AgentV1SettingsAgentContextMessagesItemContentParams": ".requests", + "AgentV1SettingsAgentContextMessagesItemContentRole": ".types", + "AgentV1SettingsAgentContextMessagesItemFunctionCalls": ".types", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem": ".types", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams": ".requests", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams": ".requests", + "AgentV1SettingsAgentContextMessagesItemParams": ".requests", "AgentV1SettingsAgentContextSpeak": ".types", "AgentV1SettingsAgentContextSpeakParams": ".requests", "AgentV1SettingsAgentContextThink": ".types", @@ -223,6 +237,10 @@ "AgentV1SettingsAgentListenParams": ".requests", "AgentV1SettingsAgentListenProvider": ".types", "AgentV1SettingsAgentListenProviderParams": ".requests", + "AgentV1SettingsAgentListenProviderV1": ".types", + "AgentV1SettingsAgentListenProviderV1Params": ".requests", + "AgentV1SettingsAgentListenProviderV2": ".types", + "AgentV1SettingsAgentListenProviderV2Params": ".requests", "AgentV1SettingsAgentListenProvider_V1": ".types", "AgentV1SettingsAgentListenProvider_V1Params": ".requests", "AgentV1SettingsAgentListenProvider_V2": ".types", @@ -253,12 +271,6 @@ "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", @@ -278,41 +290,9 @@ "AgentV1WelcomeParams": ".requests", "ConversationHistoryMessage": ".types", "ConversationHistoryMessageParams": ".requests", - "ConversationHistoryMessageRole": ".types", "FunctionCallHistoryMessage": ".types", - "FunctionCallHistoryMessageFunctionCallsItem": ".types", - "FunctionCallHistoryMessageFunctionCallsItemParams": ".requests", "FunctionCallHistoryMessageParams": ".requests", "settings": ".settings", - "AgentV1HistoryContent": ".types", - "AgentV1HistoryContentParams": ".requests", - "AgentV1HistoryFunctionCalls": ".types", - "AgentV1HistoryFunctionCallsParams": ".requests", - "AgentV1SettingsAgentContextListenProviderV1": ".types", - "AgentV1SettingsAgentContextListenProviderV1Params": ".requests", - "AgentV1SettingsAgentContextListenProviderV2": ".types", - "AgentV1SettingsAgentContextListenProviderV2LanguageHint": ".types", - "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams": ".requests", - "AgentV1SettingsAgentContextListenProviderV2Params": ".requests", - "AgentV1SettingsAgentContextMessagesItem": ".types", - "AgentV1SettingsAgentContextMessagesItemContent": ".types", - "AgentV1SettingsAgentContextMessagesItemContentParams": ".requests", - "AgentV1SettingsAgentContextMessagesItemContentRole": ".types", - "AgentV1SettingsAgentContextMessagesItemFunctionCalls": ".types", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem": ".types", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams": ".requests", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams": ".requests", - "AgentV1SettingsAgentContextMessagesItemParams": ".requests", - "AgentV1SettingsAgentListenProviderV1": ".types", - "AgentV1SettingsAgentListenProviderV1Params": ".requests", - "AgentV1SettingsAgentListenProviderV2": ".types", - "AgentV1SettingsAgentListenProviderV2Params": ".requests", - "AgentV1HistoryContentRole": ".types", - "AgentV1HistoryFunctionCallsFunctionCallsItem": ".types", - "AgentV1SettingsAgentContextContextMessagesItemContentRole": ".types", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem": ".types", - "AgentV1HistoryFunctionCallsFunctionCallsItemParams": ".requests", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams": ".requests", } @@ -354,6 +334,13 @@ def __dir__(): "AgentV1FunctionCallRequestFunctionsItemParams", "AgentV1FunctionCallRequestParams", "AgentV1History", + "AgentV1HistoryContent", + "AgentV1HistoryContentParams", + "AgentV1HistoryContentRole", + "AgentV1HistoryFunctionCalls", + "AgentV1HistoryFunctionCallsFunctionCallsItem", + "AgentV1HistoryFunctionCallsFunctionCallsItemParams", + "AgentV1HistoryFunctionCallsParams", "AgentV1HistoryParams", "AgentV1InjectAgentMessage", "AgentV1InjectAgentMessageBehavior", @@ -379,16 +366,34 @@ def __dir__(): "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", + "AgentV1SettingsAgentContextMessagesItem", + "AgentV1SettingsAgentContextMessagesItemContent", + "AgentV1SettingsAgentContextMessagesItemContentParams", + "AgentV1SettingsAgentContextMessagesItemContentRole", + "AgentV1SettingsAgentContextMessagesItemFunctionCalls", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams", + "AgentV1SettingsAgentContextMessagesItemParams", "AgentV1SettingsAgentContextParams", "AgentV1SettingsAgentContextSpeak", "AgentV1SettingsAgentContextSpeakParams", @@ -398,6 +403,10 @@ def __dir__(): "AgentV1SettingsAgentListenParams", "AgentV1SettingsAgentListenProvider", "AgentV1SettingsAgentListenProviderParams", + "AgentV1SettingsAgentListenProviderV1", + "AgentV1SettingsAgentListenProviderV1Params", + "AgentV1SettingsAgentListenProviderV2", + "AgentV1SettingsAgentListenProviderV2Params", "AgentV1SettingsAgentListenProvider_V1", "AgentV1SettingsAgentListenProvider_V1Params", "AgentV1SettingsAgentListenProvider_V2", @@ -428,12 +437,6 @@ def __dir__(): "AgentV1UpdateListen", "AgentV1UpdateListenListen", "AgentV1UpdateListenListenParams", - "AgentV1UpdateListenListenProvider", - "AgentV1UpdateListenListenProviderParams", - "AgentV1UpdateListenListenProvider_V1", - "AgentV1UpdateListenListenProvider_V1Params", - "AgentV1UpdateListenListenProvider_V2", - "AgentV1UpdateListenListenProvider_V2Params", "AgentV1UpdateListenParams", "AgentV1UpdatePrompt", "AgentV1UpdatePromptParams", @@ -453,39 +456,7 @@ def __dir__(): "AgentV1WelcomeParams", "ConversationHistoryMessage", "ConversationHistoryMessageParams", - "ConversationHistoryMessageRole", "FunctionCallHistoryMessage", - "FunctionCallHistoryMessageFunctionCallsItem", - "FunctionCallHistoryMessageFunctionCallsItemParams", "FunctionCallHistoryMessageParams", "settings", - "AgentV1HistoryContent", - "AgentV1HistoryContentParams", - "AgentV1HistoryFunctionCalls", - "AgentV1HistoryFunctionCallsParams", - "AgentV1SettingsAgentContextListenProviderV1", - "AgentV1SettingsAgentContextListenProviderV1Params", - "AgentV1SettingsAgentContextListenProviderV2", - "AgentV1SettingsAgentContextListenProviderV2LanguageHint", - "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams", - "AgentV1SettingsAgentContextListenProviderV2Params", - "AgentV1SettingsAgentContextMessagesItem", - "AgentV1SettingsAgentContextMessagesItemContent", - "AgentV1SettingsAgentContextMessagesItemContentParams", - "AgentV1SettingsAgentContextMessagesItemContentRole", - "AgentV1SettingsAgentContextMessagesItemFunctionCalls", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams", - "AgentV1SettingsAgentContextMessagesItemParams", - "AgentV1SettingsAgentListenProviderV1", - "AgentV1SettingsAgentListenProviderV1Params", - "AgentV1SettingsAgentListenProviderV2", - "AgentV1SettingsAgentListenProviderV2Params", - "AgentV1HistoryContentRole", - "AgentV1HistoryFunctionCallsFunctionCallsItem", - "AgentV1SettingsAgentContextContextMessagesItemContentRole", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem", - "AgentV1HistoryFunctionCallsFunctionCallsItemParams", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams", ] diff --git a/src/deepgram/agent/v1/requests/__init__.py b/src/deepgram/agent/v1/requests/__init__.py index 910dedbe..82a3d46a 100644 --- a/src/deepgram/agent/v1/requests/__init__.py +++ b/src/deepgram/agent/v1/requests/__init__.py @@ -14,6 +14,9 @@ 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 @@ -30,12 +33,30 @@ 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 @@ -44,6 +65,8 @@ 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 @@ -55,11 +78,6 @@ 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 @@ -70,22 +88,6 @@ 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 import AgentV1HistoryFunctionCallsParams - 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 - - from .agent_v1history_function_calls_function_calls_item import AgentV1HistoryFunctionCallsFunctionCallsItemParams - from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams - _dynamic_imports: typing.Dict[str, str] = { "AgentV1AgentAudioDoneParams": ".agent_v1agent_audio_done", "AgentV1AgentStartedSpeakingParams": ".agent_v1agent_started_speaking", @@ -94,6 +96,9 @@ "AgentV1ErrorParams": ".agent_v1error", "AgentV1FunctionCallRequestFunctionsItemParams": ".agent_v1function_call_request_functions_item", "AgentV1FunctionCallRequestParams": ".agent_v1function_call_request", + "AgentV1HistoryContentParams": ".agent_v1history_content", + "AgentV1HistoryFunctionCallsFunctionCallsItemParams": ".agent_v1history_function_calls_function_calls_item", + "AgentV1HistoryFunctionCallsParams": ".agent_v1history_function_calls", "AgentV1HistoryParams": ".agent_v1history", "AgentV1InjectAgentMessageParams": ".agent_v1inject_agent_message", "AgentV1InjectUserMessageParams": ".agent_v1inject_user_message", @@ -104,17 +109,27 @@ "AgentV1PromptUpdatedParams": ".agent_v1prompt_updated", "AgentV1ReceiveFunctionCallResponseParams": ".agent_v1receive_function_call_response", "AgentV1SendFunctionCallResponseParams": ".agent_v1send_function_call_response", + "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams": ".agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item", "AgentV1SettingsAgentContextContextMessagesItemParams": ".agent_v1settings_agent_context_context_messages_item", "AgentV1SettingsAgentContextContextParams": ".agent_v1settings_agent_context_context", "AgentV1SettingsAgentContextListenParams": ".agent_v1settings_agent_context_listen", "AgentV1SettingsAgentContextListenProviderParams": ".agent_v1settings_agent_context_listen_provider", + "AgentV1SettingsAgentContextListenProviderV1Params": ".agent_v1settings_agent_context_listen_provider_v1", + "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams": ".agent_v1settings_agent_context_listen_provider_v2language_hint", + "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", "AgentV1SettingsAgentContextSpeakParams": ".agent_v1settings_agent_context_speak", "AgentV1SettingsAgentContextThinkParams": ".agent_v1settings_agent_context_think", "AgentV1SettingsAgentListenParams": ".agent_v1settings_agent_listen", "AgentV1SettingsAgentListenProviderParams": ".agent_v1settings_agent_listen_provider", + "AgentV1SettingsAgentListenProviderV1Params": ".agent_v1settings_agent_listen_provider_v1", + "AgentV1SettingsAgentListenProviderV2Params": ".agent_v1settings_agent_listen_provider_v2", "AgentV1SettingsAgentListenProvider_V1Params": ".agent_v1settings_agent_listen_provider", "AgentV1SettingsAgentListenProvider_V2Params": ".agent_v1settings_agent_listen_provider", "AgentV1SettingsAgentParams": ".agent_v1settings_agent", @@ -129,9 +144,6 @@ "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", @@ -142,21 +154,7 @@ "AgentV1WarningParams": ".agent_v1warning", "AgentV1WelcomeParams": ".agent_v1welcome", "ConversationHistoryMessageParams": ".conversation_history_message", - "FunctionCallHistoryMessageFunctionCallsItemParams": ".function_call_history_message_function_calls_item", "FunctionCallHistoryMessageParams": ".function_call_history_message", - "AgentV1HistoryContentParams": ".agent_v1history_content", - "AgentV1HistoryFunctionCallsParams": ".agent_v1history_function_calls", - "AgentV1SettingsAgentContextListenProviderV1Params": ".agent_v1settings_agent_context_listen_provider_v1", - "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams": ".agent_v1settings_agent_context_listen_provider_v2language_hint", - "AgentV1SettingsAgentContextListenProviderV2Params": ".agent_v1settings_agent_context_listen_provider_v2", - "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", - "AgentV1SettingsAgentListenProviderV1Params": ".agent_v1settings_agent_listen_provider_v1", - "AgentV1SettingsAgentListenProviderV2Params": ".agent_v1settings_agent_listen_provider_v2", - "AgentV1HistoryFunctionCallsFunctionCallsItemParams": ".agent_v1history_function_calls_function_calls_item", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams": ".agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item", } @@ -189,6 +187,9 @@ def __dir__(): "AgentV1ErrorParams", "AgentV1FunctionCallRequestFunctionsItemParams", "AgentV1FunctionCallRequestParams", + "AgentV1HistoryContentParams", + "AgentV1HistoryFunctionCallsFunctionCallsItemParams", + "AgentV1HistoryFunctionCallsParams", "AgentV1HistoryParams", "AgentV1InjectAgentMessageParams", "AgentV1InjectUserMessageParams", @@ -199,17 +200,27 @@ def __dir__(): "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", @@ -224,9 +235,6 @@ def __dir__(): "AgentV1SpeakUpdatedParams", "AgentV1ThinkUpdatedParams", "AgentV1UpdateListenListenParams", - "AgentV1UpdateListenListenProviderParams", - "AgentV1UpdateListenListenProvider_V1Params", - "AgentV1UpdateListenListenProvider_V2Params", "AgentV1UpdateListenParams", "AgentV1UpdatePromptParams", "AgentV1UpdateSpeakParams", @@ -237,19 +245,5 @@ def __dir__(): "AgentV1WarningParams", "AgentV1WelcomeParams", "ConversationHistoryMessageParams", - "FunctionCallHistoryMessageFunctionCallsItemParams", "FunctionCallHistoryMessageParams", - "AgentV1HistoryContentParams", - "AgentV1HistoryFunctionCallsParams", - "AgentV1SettingsAgentContextListenProviderV1Params", - "AgentV1SettingsAgentContextListenProviderV2LanguageHintParams", - "AgentV1SettingsAgentContextListenProviderV2Params", - "AgentV1SettingsAgentContextMessagesItemContentParams", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsParams", - "AgentV1SettingsAgentContextMessagesItemParams", - "AgentV1SettingsAgentListenProviderV1Params", - "AgentV1SettingsAgentListenProviderV2Params", - "AgentV1HistoryFunctionCallsFunctionCallsItemParams", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams", ] 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 568836b3..18419c50 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,5 +1,35 @@ # This file was auto-generated by Fern from our API Definition. -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams +import typing_extensions -AgentV1HistoryFunctionCallsFunctionCallsItemParams = 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 + """ diff --git a/src/deepgram/agent/v1/requests/agent_v1latency_report.py b/src/deepgram/agent/v1/requests/agent_v1latency_report.py index bbbd696d..e62a6caf 100644 --- a/src/deepgram/agent/v1/requests/agent_v1latency_report.py +++ b/src/deepgram/agent/v1/requests/agent_v1latency_report.py @@ -11,9 +11,13 @@ class AgentV1LatencyReportParams(typing_extensions.TypedDict): Message type identifier for the latency report """ + # Backward-compat: mirrors the read-side shim in types/agent_v1latency_report.py. + # The API spec removed `stt_latency` (deepgram-docs #1006); kept here so the + # public request TypedDict shape is unchanged. No wire impact — the client never + # sends a LatencyReport. Remove and unfreeze in a future major. stt_latency: typing_extensions.NotRequired[float] """ - Speech-to-text: time from audio received to transcript produced, in seconds + Deprecated. Speech-to-text latency, no longer reported by the server. """ ttt_token_latency: typing_extensions.NotRequired[float] 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 85e62510..8a045077 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,5 +1,35 @@ # This file was auto-generated by Fern from our API Definition. -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams +import typing_extensions -AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams = 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 + """ 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 552a0c07..48ada890 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,5 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams +from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( + AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, +) -AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams = FunctionCallHistoryMessageFunctionCallsItemParams +AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItemParams = ( + AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams +) diff --git a/src/deepgram/agent/v1/requests/agent_v1update_listen.py b/src/deepgram/agent/v1/requests/agent_v1update_listen.py index bb7e0350..7309bc9e 100644 --- a/src/deepgram/agent/v1/requests/agent_v1update_listen.py +++ b/src/deepgram/agent/v1/requests/agent_v1update_listen.py @@ -14,5 +14,5 @@ class AgentV1UpdateListenParams(typing_extensions.TypedDict): listen: AgentV1UpdateListenListenParams """ - Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session. + Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session. """ diff --git a/src/deepgram/agent/v1/requests/agent_v1update_listen_listen.py b/src/deepgram/agent/v1/requests/agent_v1update_listen_listen.py index 56e84282..2a91d9f5 100644 --- a/src/deepgram/agent/v1/requests/agent_v1update_listen_listen.py +++ b/src/deepgram/agent/v1/requests/agent_v1update_listen_listen.py @@ -1,12 +1,12 @@ # This file was auto-generated by Fern from our API Definition. import typing_extensions -from .agent_v1update_listen_listen_provider import AgentV1UpdateListenListenProviderParams +from ....requests.deepgram_listen_provider_v2 import DeepgramListenProviderV2Params class AgentV1UpdateListenListenParams(typing_extensions.TypedDict): """ - Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session. + Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session. """ - provider: AgentV1UpdateListenListenProviderParams + provider: DeepgramListenProviderV2Params diff --git a/src/deepgram/agent/v1/requests/agent_v1update_listen_listen_provider.py b/src/deepgram/agent/v1/requests/agent_v1update_listen_listen_provider.py deleted file mode 100644 index 40d038e0..00000000 --- a/src/deepgram/agent/v1/requests/agent_v1update_listen_listen_provider.py +++ /dev/null @@ -1,32 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import typing_extensions - - -class AgentV1UpdateListenListenProvider_V1Params(typing_extensions.TypedDict): - version: typing.Literal["v1"] - type: typing.Literal["deepgram"] - model: typing_extensions.NotRequired[str] - language: typing_extensions.NotRequired[str] - keyterms: typing_extensions.NotRequired[typing.Sequence[str]] - smart_format: typing_extensions.NotRequired[bool] - - -class AgentV1UpdateListenListenProvider_V2Params(typing_extensions.TypedDict): - version: typing.Literal["v2"] - type: typing.Literal["deepgram"] - model: str - language_hints: typing_extensions.NotRequired[typing.Sequence[str]] - eot_threshold: typing_extensions.NotRequired[float] - eager_eot_threshold: typing_extensions.NotRequired[float] - eot_timeout_ms: typing_extensions.NotRequired[int] - keyterms: typing_extensions.NotRequired[typing.Sequence[str]] - - -AgentV1UpdateListenListenProviderParams = typing.Union[ - AgentV1UpdateListenListenProvider_V1Params, AgentV1UpdateListenListenProvider_V2Params -] diff --git a/src/deepgram/agent/v1/requests/conversation_history_message.py b/src/deepgram/agent/v1/requests/conversation_history_message.py index e09fab60..965ccb42 100644 --- a/src/deepgram/agent/v1/requests/conversation_history_message.py +++ b/src/deepgram/agent/v1/requests/conversation_history_message.py @@ -3,7 +3,9 @@ import typing import typing_extensions -from ..types.conversation_history_message_role import ConversationHistoryMessageRole +from ..types.agent_v1settings_agent_context_context_messages_item_content_role import ( + AgentV1SettingsAgentContextContextMessagesItemContentRole, +) class ConversationHistoryMessageParams(typing_extensions.TypedDict): @@ -16,7 +18,7 @@ class ConversationHistoryMessageParams(typing_extensions.TypedDict): Message type identifier for conversation text """ - role: ConversationHistoryMessageRole + role: AgentV1SettingsAgentContextContextMessagesItemContentRole """ 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 b3fabb0a..6a607abd 100644 --- a/src/deepgram/agent/v1/requests/function_call_history_message.py +++ b/src/deepgram/agent/v1/requests/function_call_history_message.py @@ -3,7 +3,9 @@ import typing import typing_extensions -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItemParams +from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( + AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams, +) class FunctionCallHistoryMessageParams(typing_extensions.TypedDict): @@ -12,7 +14,7 @@ class FunctionCallHistoryMessageParams(typing_extensions.TypedDict): """ type: typing.Literal["History"] - function_calls: typing.Sequence[FunctionCallHistoryMessageFunctionCallsItemParams] + function_calls: typing.Sequence[AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItemParams] """ 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 deleted file mode 100644 index 1e23995d..00000000 --- a/src/deepgram/agent/v1/requests/function_call_history_message_function_calls_item.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 402554a2..0d00a631 100644 --- a/src/deepgram/agent/v1/types/__init__.py +++ b/src/deepgram/agent/v1/types/__init__.py @@ -15,6 +15,10 @@ 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 @@ -30,12 +34,34 @@ 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 @@ -44,6 +70,8 @@ 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 @@ -58,11 +86,6 @@ 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 @@ -72,27 +95,7 @@ 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_function_calls import AgentV1HistoryFunctionCalls - 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 - - from .agent_v1history_content_role import AgentV1HistoryContentRole - 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 - _dynamic_imports: typing.Dict[str, str] = { "AgentV1AgentAudioDone": ".agent_v1agent_audio_done", "AgentV1AgentStartedSpeaking": ".agent_v1agent_started_speaking", @@ -103,6 +106,10 @@ "AgentV1FunctionCallRequest": ".agent_v1function_call_request", "AgentV1FunctionCallRequestFunctionsItem": ".agent_v1function_call_request_functions_item", "AgentV1History": ".agent_v1history", + "AgentV1HistoryContent": ".agent_v1history_content", + "AgentV1HistoryContentRole": ".agent_v1history_content_role", + "AgentV1HistoryFunctionCalls": ".agent_v1history_function_calls", + "AgentV1HistoryFunctionCallsFunctionCallsItem": ".agent_v1history_function_calls_function_calls_item", "AgentV1InjectAgentMessage": ".agent_v1inject_agent_message", "AgentV1InjectAgentMessageBehavior": ".agent_v1inject_agent_message_behavior", "AgentV1InjectUserMessage": ".agent_v1inject_user_message", @@ -118,14 +125,26 @@ "AgentV1SettingsAgentContext": ".agent_v1settings_agent_context", "AgentV1SettingsAgentContextContext": ".agent_v1settings_agent_context_context", "AgentV1SettingsAgentContextContextMessagesItem": ".agent_v1settings_agent_context_context_messages_item", + "AgentV1SettingsAgentContextContextMessagesItemContentRole": ".agent_v1settings_agent_context_context_messages_item_content_role", + "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem": ".agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item", "AgentV1SettingsAgentContextListen": ".agent_v1settings_agent_context_listen", "AgentV1SettingsAgentContextListenProvider": ".agent_v1settings_agent_context_listen_provider", + "AgentV1SettingsAgentContextListenProviderV1": ".agent_v1settings_agent_context_listen_provider_v1", + "AgentV1SettingsAgentContextListenProviderV2": ".agent_v1settings_agent_context_listen_provider_v2", + "AgentV1SettingsAgentContextListenProviderV2LanguageHint": ".agent_v1settings_agent_context_listen_provider_v2language_hint", "AgentV1SettingsAgentContextListenProvider_V1": ".agent_v1settings_agent_context_listen_provider", "AgentV1SettingsAgentContextListenProvider_V2": ".agent_v1settings_agent_context_listen_provider", + "AgentV1SettingsAgentContextMessagesItem": ".agent_v1settings_agent_context_messages_item", + "AgentV1SettingsAgentContextMessagesItemContent": ".agent_v1settings_agent_context_messages_item_content", + "AgentV1SettingsAgentContextMessagesItemContentRole": ".agent_v1settings_agent_context_messages_item_content_role", + "AgentV1SettingsAgentContextMessagesItemFunctionCalls": ".agent_v1settings_agent_context_messages_item_function_calls", + "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem": ".agent_v1settings_agent_context_messages_item_function_calls_function_calls_item", "AgentV1SettingsAgentContextSpeak": ".agent_v1settings_agent_context_speak", "AgentV1SettingsAgentContextThink": ".agent_v1settings_agent_context_think", "AgentV1SettingsAgentListen": ".agent_v1settings_agent_listen", "AgentV1SettingsAgentListenProvider": ".agent_v1settings_agent_listen_provider", + "AgentV1SettingsAgentListenProviderV1": ".agent_v1settings_agent_listen_provider_v1", + "AgentV1SettingsAgentListenProviderV2": ".agent_v1settings_agent_listen_provider_v2", "AgentV1SettingsAgentListenProvider_V1": ".agent_v1settings_agent_listen_provider", "AgentV1SettingsAgentListenProvider_V2": ".agent_v1settings_agent_listen_provider", "AgentV1SettingsAgentSpeak": ".agent_v1settings_agent_speak", @@ -142,9 +161,6 @@ "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", @@ -154,25 +170,7 @@ "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", - "AgentV1HistoryContent": ".agent_v1history_content", - "AgentV1HistoryFunctionCalls": ".agent_v1history_function_calls", - "AgentV1SettingsAgentContextListenProviderV1": ".agent_v1settings_agent_context_listen_provider_v1", - "AgentV1SettingsAgentContextListenProviderV2": ".agent_v1settings_agent_context_listen_provider_v2", - "AgentV1SettingsAgentContextListenProviderV2LanguageHint": ".agent_v1settings_agent_context_listen_provider_v2language_hint", - "AgentV1SettingsAgentContextMessagesItem": ".agent_v1settings_agent_context_messages_item", - "AgentV1SettingsAgentContextMessagesItemContent": ".agent_v1settings_agent_context_messages_item_content", - "AgentV1SettingsAgentContextMessagesItemContentRole": ".agent_v1settings_agent_context_messages_item_content_role", - "AgentV1SettingsAgentContextMessagesItemFunctionCalls": ".agent_v1settings_agent_context_messages_item_function_calls", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem": ".agent_v1settings_agent_context_messages_item_function_calls_function_calls_item", - "AgentV1SettingsAgentListenProviderV1": ".agent_v1settings_agent_listen_provider_v1", - "AgentV1SettingsAgentListenProviderV2": ".agent_v1settings_agent_listen_provider_v2", - "AgentV1HistoryContentRole": ".agent_v1history_content_role", - "AgentV1HistoryFunctionCallsFunctionCallsItem": ".agent_v1history_function_calls_function_calls_item", - "AgentV1SettingsAgentContextContextMessagesItemContentRole": ".agent_v1settings_agent_context_context_messages_item_content_role", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem": ".agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item", } @@ -207,6 +205,10 @@ def __dir__(): "AgentV1FunctionCallRequest", "AgentV1FunctionCallRequestFunctionsItem", "AgentV1History", + "AgentV1HistoryContent", + "AgentV1HistoryContentRole", + "AgentV1HistoryFunctionCalls", + "AgentV1HistoryFunctionCallsFunctionCallsItem", "AgentV1InjectAgentMessage", "AgentV1InjectAgentMessageBehavior", "AgentV1InjectUserMessage", @@ -222,14 +224,26 @@ def __dir__(): "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", @@ -246,9 +260,6 @@ def __dir__(): "AgentV1ThinkUpdated", "AgentV1UpdateListen", "AgentV1UpdateListenListen", - "AgentV1UpdateListenListenProvider", - "AgentV1UpdateListenListenProvider_V1", - "AgentV1UpdateListenListenProvider_V2", "AgentV1UpdatePrompt", "AgentV1UpdateSpeak", "AgentV1UpdateSpeakSpeak", @@ -258,23 +269,5 @@ def __dir__(): "AgentV1Warning", "AgentV1Welcome", "ConversationHistoryMessage", - "ConversationHistoryMessageRole", "FunctionCallHistoryMessage", - "FunctionCallHistoryMessageFunctionCallsItem", - "AgentV1HistoryContent", - "AgentV1HistoryFunctionCalls", - "AgentV1SettingsAgentContextListenProviderV1", - "AgentV1SettingsAgentContextListenProviderV2", - "AgentV1SettingsAgentContextListenProviderV2LanguageHint", - "AgentV1SettingsAgentContextMessagesItem", - "AgentV1SettingsAgentContextMessagesItemContent", - "AgentV1SettingsAgentContextMessagesItemContentRole", - "AgentV1SettingsAgentContextMessagesItemFunctionCalls", - "AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem", - "AgentV1SettingsAgentListenProviderV1", - "AgentV1SettingsAgentListenProviderV2", - "AgentV1HistoryContentRole", - "AgentV1HistoryFunctionCallsFunctionCallsItem", - "AgentV1SettingsAgentContextContextMessagesItemContentRole", - "AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem", ] 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 eea4a407..656a04b7 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. -from .conversation_history_message_role import ConversationHistoryMessageRole +import typing -AgentV1HistoryContentRole = ConversationHistoryMessageRole +AgentV1HistoryContentRole = typing.Union[typing.Literal["user", "assistant"], typing.Any] 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 da63e980..38f4eed1 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,5 +1,48 @@ # This file was auto-generated by Fern from our API Definition. -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem +import typing -AgentV1HistoryFunctionCallsFunctionCallsItem = 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 diff --git a/src/deepgram/agent/v1/types/agent_v1latency_report.py b/src/deepgram/agent/v1/types/agent_v1latency_report.py index a20e3f06..f39d3b01 100644 --- a/src/deepgram/agent/v1/types/agent_v1latency_report.py +++ b/src/deepgram/agent/v1/types/agent_v1latency_report.py @@ -13,9 +13,15 @@ class AgentV1LatencyReport(UncheckedBaseModel): Message type identifier for the latency report """ + # Backward-compat: the API spec removed `stt_latency` from the LatencyReport + # schema (deepgram-docs #1006). LatencyReport is a server-emitted (read-only) + # message, so re-adding the field has no request/wire impact — it simply keeps + # `report.stt_latency` resolving (to None, since the server no longer emits it) + # instead of raising AttributeError, avoiding a major-version break. Remove this + # shim and unfreeze when the field is intentionally retired in a future major. stt_latency: typing.Optional[float] = pydantic.Field(default=None) """ - Speech-to-text: time from audio received to transcript produced, in seconds + Deprecated. Speech-to-text latency, no longer reported by the server. """ ttt_token_latency: typing.Optional[float] = pydantic.Field(default=None) 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 b0395fe5..c1231ecb 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,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from .conversation_history_message_role import ConversationHistoryMessageRole +import typing -AgentV1SettingsAgentContextContextMessagesItemContentRole = ConversationHistoryMessageRole +AgentV1SettingsAgentContextContextMessagesItemContentRole = typing.Union[ + typing.Literal["user", "assistant"], typing.Any +] 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 1aef2b98..a3b4e618 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,5 +1,48 @@ # This file was auto-generated by Fern from our API Definition. -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem +import typing -AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem = 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 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 5002127a..f868500a 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,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from .conversation_history_message_role import ConversationHistoryMessageRole +from .agent_v1settings_agent_context_context_messages_item_content_role import ( + AgentV1SettingsAgentContextContextMessagesItemContentRole, +) -AgentV1SettingsAgentContextMessagesItemContentRole = ConversationHistoryMessageRole +AgentV1SettingsAgentContextMessagesItemContentRole = AgentV1SettingsAgentContextContextMessagesItemContentRole 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 63cd781b..b66e0a04 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,5 +1,9 @@ # This file was auto-generated by Fern from our API Definition. -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem +from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( + AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, +) -AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem = FunctionCallHistoryMessageFunctionCallsItem +AgentV1SettingsAgentContextMessagesItemFunctionCallsFunctionCallsItem = ( + AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem +) diff --git a/src/deepgram/agent/v1/types/agent_v1update_listen.py b/src/deepgram/agent/v1/types/agent_v1update_listen.py index 124232d2..a25a4ae1 100644 --- a/src/deepgram/agent/v1/types/agent_v1update_listen.py +++ b/src/deepgram/agent/v1/types/agent_v1update_listen.py @@ -16,7 +16,7 @@ class AgentV1UpdateListen(UncheckedBaseModel): listen: AgentV1UpdateListenListen = pydantic.Field() """ - Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session. + Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session. """ if IS_PYDANTIC_V2: diff --git a/src/deepgram/agent/v1/types/agent_v1update_listen_listen.py b/src/deepgram/agent/v1/types/agent_v1update_listen_listen.py index 3d513125..386483eb 100644 --- a/src/deepgram/agent/v1/types/agent_v1update_listen_listen.py +++ b/src/deepgram/agent/v1/types/agent_v1update_listen_listen.py @@ -5,50 +5,15 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from ....types.deepgram_listen_provider_v1 import DeepgramListenProviderV1 from ....types.deepgram_listen_provider_v2 import DeepgramListenProviderV2 -from .agent_v1update_listen_listen_provider import AgentV1UpdateListenListenProvider - - -def _coerce_legacy_update_listen_provider(values: typing.Any) -> typing.Any: - # Backward-compat: before the 2026-07-31 regen the provider field was a bare - # DeepgramListenProviderV2. The regen replaced it with the versioned - # AgentV1UpdateListenListenProvider union (discriminant="version"). Coerce a - # legacy Deepgram provider (or a dict lacking the version discriminant) into - # the new shape so existing callers keep producing the correct wire payload. - if not isinstance(values, dict): - return values - provider = values.get("provider") - if isinstance(provider, DeepgramListenProviderV2): - values = dict(values) - values["provider"] = {**provider.dict(), "version": "v2"} - elif isinstance(provider, DeepgramListenProviderV1): - values = dict(values) - values["provider"] = {**provider.dict(), "version": "v1"} - elif isinstance(provider, dict) and "version" not in provider: - values = dict(values) - values["provider"] = {**provider, "version": "v2"} - return values class AgentV1UpdateListenListen(UncheckedBaseModel): """ - Listen configuration to update. Contains a provider object with the same schema as Settings. The model and language can be changed mid-session. + Listen configuration to update. Contains a provider object with the same schema as Settings. The provider identity (type, version, model) is required and must match the current session. """ - provider: AgentV1UpdateListenListenProvider - - if IS_PYDANTIC_V2: - - @pydantic.model_validator(mode="before") - @classmethod - def _migrate_legacy_provider(cls, values: typing.Any) -> typing.Any: - return _coerce_legacy_update_listen_provider(values) - else: - - @pydantic.root_validator(pre=True) # type: ignore[deprecated] - def _migrate_legacy_provider(cls, values: typing.Any) -> typing.Any: # type: ignore[no-redef] - return _coerce_legacy_update_listen_provider(values) + provider: DeepgramListenProviderV2 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/agent/v1/types/agent_v1update_listen_listen_provider.py b/src/deepgram/agent/v1/types/agent_v1update_listen_listen_provider.py deleted file mode 100644 index 26420cc4..00000000 --- a/src/deepgram/agent/v1/types/agent_v1update_listen_listen_provider.py +++ /dev/null @@ -1,54 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -import typing_extensions -from ....core.pydantic_utilities import IS_PYDANTIC_V2 -from ....core.unchecked_base_model import UncheckedBaseModel, UnionMetadata - - -class AgentV1UpdateListenListenProvider_V1(UncheckedBaseModel): - version: typing.Literal["v1"] = "v1" - type: typing.Literal["deepgram"] = "deepgram" - model: typing.Optional[str] = None - language: typing.Optional[str] = None - keyterms: typing.Optional[typing.List[str]] = None - smart_format: typing.Optional[bool] = None - - 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 - - -class AgentV1UpdateListenListenProvider_V2(UncheckedBaseModel): - version: typing.Literal["v2"] = "v2" - type: typing.Literal["deepgram"] = "deepgram" - model: str - language_hints: typing.Optional[typing.List[str]] = None - eot_threshold: typing.Optional[float] = None - eager_eot_threshold: typing.Optional[float] = None - eot_timeout_ms: typing.Optional[int] = None - keyterms: typing.Optional[typing.List[str]] = None - - 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 - - -AgentV1UpdateListenListenProvider = typing_extensions.Annotated[ - typing.Union[AgentV1UpdateListenListenProvider_V1, AgentV1UpdateListenListenProvider_V2], - UnionMetadata(discriminant="version"), -] diff --git a/src/deepgram/agent/v1/types/conversation_history_message.py b/src/deepgram/agent/v1/types/conversation_history_message.py index 00a84e9c..c4553bba 100644 --- a/src/deepgram/agent/v1/types/conversation_history_message.py +++ b/src/deepgram/agent/v1/types/conversation_history_message.py @@ -5,7 +5,9 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from .conversation_history_message_role import ConversationHistoryMessageRole +from .agent_v1settings_agent_context_context_messages_item_content_role import ( + AgentV1SettingsAgentContextContextMessagesItemContentRole, +) class ConversationHistoryMessage(UncheckedBaseModel): @@ -18,7 +20,7 @@ class ConversationHistoryMessage(UncheckedBaseModel): Message type identifier for conversation text """ - role: ConversationHistoryMessageRole = pydantic.Field() + role: AgentV1SettingsAgentContextContextMessagesItemContentRole = 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 deleted file mode 100644 index 136ed7d3..00000000 --- a/src/deepgram/agent/v1/types/conversation_history_message_role.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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 20387473..7565b7c0 100644 --- a/src/deepgram/agent/v1/types/function_call_history_message.py +++ b/src/deepgram/agent/v1/types/function_call_history_message.py @@ -5,7 +5,9 @@ import pydantic from ....core.pydantic_utilities import IS_PYDANTIC_V2 from ....core.unchecked_base_model import UncheckedBaseModel -from .function_call_history_message_function_calls_item import FunctionCallHistoryMessageFunctionCallsItem +from .agent_v1settings_agent_context_context_messages_item_function_calls_function_calls_item import ( + AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem, +) class FunctionCallHistoryMessage(UncheckedBaseModel): @@ -14,7 +16,9 @@ class FunctionCallHistoryMessage(UncheckedBaseModel): """ type: typing.Literal["History"] = "History" - function_calls: typing.List[FunctionCallHistoryMessageFunctionCallsItem] = pydantic.Field() + function_calls: typing.List[AgentV1SettingsAgentContextContextMessagesItemFunctionCallsFunctionCallsItem] = ( + 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 deleted file mode 100644 index fddac89d..00000000 --- a/src/deepgram/agent/v1/types/function_call_history_message_function_calls_item.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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/base_client.py b/src/deepgram/base_client.py index ef741870..ab515926 100644 --- a/src/deepgram/base_client.py +++ b/src/deepgram/base_client.py @@ -47,12 +47,6 @@ class BaseClient: max_retries : typing.Optional[int] The default maximum number of retries for failed requests. Defaults to 2. Per-request `max_retries` in `request_options` takes precedence over this value. - stream_reconnection_enabled : typing.Optional[bool] - Whether to automatically reconnect on stream disconnection for resumable streaming endpoints. Defaults to True. Per-request `stream_reconnection_enabled` in `request_options` takes precedence over this value. - - max_stream_reconnection_attempts : typing.Optional[int] - The maximum number of reconnection attempts for resumable streaming endpoints. Defaults to no limit. Per-request `max_stream_reconnection_attempts` in `request_options` takes precedence over this value. - follow_redirects : typing.Optional[bool] Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. @@ -79,13 +73,13 @@ def __init__( headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, max_retries: typing.Optional[int] = None, - stream_reconnection_enabled: typing.Optional[bool] = None, - max_stream_reconnection_attempts: typing.Optional[int] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None, logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + _defaulted_timeout = ( + timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read + ) _defaulted_max_retries = max_retries if max_retries is not None else 2 if api_key is None: raise ApiError( @@ -102,8 +96,6 @@ def __init__( else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, max_retries=_defaulted_max_retries, - stream_reconnection_enabled=stream_reconnection_enabled, - max_stream_reconnection_attempts=max_stream_reconnection_attempts, logging=logging, ) self._agent: typing.Optional[AgentClient] = None @@ -223,12 +215,6 @@ class AsyncBaseClient: max_retries : typing.Optional[int] The default maximum number of retries for failed requests. Defaults to 2. Per-request `max_retries` in `request_options` takes precedence over this value. - stream_reconnection_enabled : typing.Optional[bool] - Whether to automatically reconnect on stream disconnection for resumable streaming endpoints. Defaults to True. Per-request `stream_reconnection_enabled` in `request_options` takes precedence over this value. - - max_stream_reconnection_attempts : typing.Optional[int] - The maximum number of reconnection attempts for resumable streaming endpoints. Defaults to no limit. Per-request `max_stream_reconnection_attempts` in `request_options` takes precedence over this value. - follow_redirects : typing.Optional[bool] Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in. @@ -255,13 +241,13 @@ def __init__( headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, max_retries: typing.Optional[int] = None, - stream_reconnection_enabled: typing.Optional[bool] = None, - max_stream_reconnection_attempts: typing.Optional[int] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None, logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): - _defaulted_timeout = timeout if timeout is not None else 60 if httpx_client is None else None + _defaulted_timeout = ( + timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read + ) _defaulted_max_retries = max_retries if max_retries is not None else 2 if api_key is None: raise ApiError( @@ -276,8 +262,6 @@ def __init__( else _make_default_async_client(timeout=_defaulted_timeout, follow_redirects=follow_redirects), timeout=_defaulted_timeout, max_retries=_defaulted_max_retries, - stream_reconnection_enabled=stream_reconnection_enabled, - max_stream_reconnection_attempts=max_stream_reconnection_attempts, logging=logging, ) self._agent: typing.Optional[AsyncAgentClient] = None diff --git a/src/deepgram/core/client_wrapper.py b/src/deepgram/core/client_wrapper.py index 3f0a18a8..acc02d24 100644 --- a/src/deepgram/core/client_wrapper.py +++ b/src/deepgram/core/client_wrapper.py @@ -17,8 +17,6 @@ def __init__( environment: DeepgramClientEnvironment, timeout: typing.Optional[float] = None, max_retries: int = 2, - stream_reconnection_enabled: typing.Optional[bool] = None, - max_stream_reconnection_attempts: typing.Optional[int] = None, logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, ): self.api_key = api_key @@ -26,26 +24,18 @@ def __init__( self._environment = environment self._timeout = timeout self._max_retries = max_retries - self._stream_reconnection_enabled = stream_reconnection_enabled - self._max_stream_reconnection_attempts = max_stream_reconnection_attempts self._logging = logging def get_headers(self) -> typing.Dict[str, str]: import platform - from importlib import metadata as _fern_importlib_metadata - - try: - _sdk_version = _fern_importlib_metadata.version("deepgram-sdk") - except _fern_importlib_metadata.PackageNotFoundError: - _sdk_version = "7.6.1" headers: typing.Dict[str, str] = { - "User-Agent": "deepgram-sdk/" + _sdk_version, + "User-Agent": "deepgram-sdk/7.6.0", # x-release-please-version "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "deepgram-sdk", - "X-Fern-SDK-Version": _sdk_version, + "X-Fern-SDK-Version": "7.6.0", # x-release-please-version **(self.get_custom_headers() or {}), } headers["Authorization"] = f"Token {self.api_key}" @@ -63,12 +53,6 @@ def get_timeout(self) -> typing.Optional[float]: def get_max_retries(self) -> int: return self._max_retries - def get_stream_reconnection_enabled(self) -> bool: - return self._stream_reconnection_enabled if self._stream_reconnection_enabled is not None else True - - def get_max_stream_reconnection_attempts(self) -> typing.Optional[int]: - return self._max_stream_reconnection_attempts - class SyncClientWrapper(BaseClientWrapper): def __init__( @@ -79,8 +63,6 @@ def __init__( environment: DeepgramClientEnvironment, timeout: typing.Optional[float] = None, max_retries: int = 2, - stream_reconnection_enabled: typing.Optional[bool] = None, - max_stream_reconnection_attempts: typing.Optional[int] = None, logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, httpx_client: httpx.Client, ): @@ -90,8 +72,6 @@ def __init__( environment=environment, timeout=timeout, max_retries=max_retries, - stream_reconnection_enabled=stream_reconnection_enabled, - max_stream_reconnection_attempts=max_stream_reconnection_attempts, logging=logging, ) self.httpx_client = HttpClient( @@ -112,8 +92,6 @@ def __init__( environment: DeepgramClientEnvironment, timeout: typing.Optional[float] = None, max_retries: int = 2, - stream_reconnection_enabled: typing.Optional[bool] = None, - max_stream_reconnection_attempts: typing.Optional[int] = None, logging: typing.Optional[typing.Union[LogConfig, Logger]] = None, async_token: typing.Optional[typing.Callable[[], typing.Awaitable[str]]] = None, httpx_client: httpx.AsyncClient, @@ -124,8 +102,6 @@ def __init__( environment=environment, timeout=timeout, max_retries=max_retries, - stream_reconnection_enabled=stream_reconnection_enabled, - max_stream_reconnection_attempts=max_stream_reconnection_attempts, logging=logging, ) self._async_token = async_token diff --git a/src/deepgram/core/http_client.py b/src/deepgram/core/http_client.py index 409d2670..f686c571 100644 --- a/src/deepgram/core/http_client.py +++ b/src/deepgram/core/http_client.py @@ -3,7 +3,6 @@ import asyncio import email.utils import re -import socket import time import typing from contextlib import asynccontextmanager, contextmanager @@ -24,39 +23,6 @@ JITTER_FACTOR = 0.2 # 20% random jitter -def get_keepalive_socket_options( - idle: int = 60, - intvl: int = 30, - cnt: int = 5, -) -> typing.List[typing.Tuple[int, int, int]]: - """ - Build TCP keepalive socket options for the current platform. - - Keepalive probes keep otherwise-idle connections alive so that long, - non-streaming requests survive idle-connection reaping by a firewall, - load balancer, or NAT. The available socket constants are OS-dependent, - so each option is guarded and only emitted when the platform defines it: - - - ``SO_KEEPALIVE`` is portable (Linux/macOS/Windows). - - The idle-before-first-probe knob is ``TCP_KEEPIDLE`` on Linux and modern - Windows, but ``TCP_KEEPALIVE`` on macOS. - - ``TCP_KEEPINTVL`` / ``TCP_KEEPCNT`` exist on Linux/macOS/modern Windows. - - Passing these tuples to ``httpx.HTTPTransport(socket_options=...)`` / - ``httpx.AsyncHTTPTransport(socket_options=...)`` applies them to every - connection the transport opens. - """ - opts: typing.List[typing.Tuple[int, int, int]] = [(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)] - idle_const = getattr(socket, "TCP_KEEPIDLE", None) or getattr(socket, "TCP_KEEPALIVE", None) - if idle_const: - opts.append((socket.IPPROTO_TCP, idle_const, idle)) - if hasattr(socket, "TCP_KEEPINTVL"): - opts.append((socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, intvl)) - if hasattr(socket, "TCP_KEEPCNT"): - opts.append((socket.IPPROTO_TCP, socket.TCP_KEEPCNT, cnt)) - return opts - - def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]: """ This function parses the `Retry-After` header in a HTTP response and returns the number of seconds to wait. @@ -346,14 +312,11 @@ def request( force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) - _timeout = ( - request_options.get("timeout") - if request_options is not None and request_options.get("timeout") is not None - else request_options.get("timeout_in_seconds") + timeout = ( + request_options.get("timeout_in_seconds") if request_options is not None and request_options.get("timeout_in_seconds") is not None else self.base_timeout() ) - timeout = _timeout if _timeout is not None else httpx.USE_CLIENT_DEFAULT json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit) @@ -509,14 +472,11 @@ def stream( force_multipart: typing.Optional[bool] = None, ) -> typing.Iterator[httpx.Response]: base_url = self.get_base_url(base_url) - _timeout = ( - request_options.get("timeout") - if request_options is not None and request_options.get("timeout") is not None - else request_options.get("timeout_in_seconds") + timeout = ( + request_options.get("timeout_in_seconds") if request_options is not None and request_options.get("timeout_in_seconds") is not None else self.base_timeout() ) - timeout = _timeout if _timeout is not None else httpx.USE_CLIENT_DEFAULT request_files: typing.Optional[RequestFiles] = ( convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) @@ -641,14 +601,11 @@ async def request( force_multipart: typing.Optional[bool] = None, ) -> httpx.Response: base_url = self.get_base_url(base_url) - _timeout = ( - request_options.get("timeout") - if request_options is not None and request_options.get("timeout") is not None - else request_options.get("timeout_in_seconds") + timeout = ( + request_options.get("timeout_in_seconds") if request_options is not None and request_options.get("timeout_in_seconds") is not None else self.base_timeout() ) - timeout = _timeout if _timeout is not None else httpx.USE_CLIENT_DEFAULT request_files: typing.Optional[RequestFiles] = ( convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) @@ -807,14 +764,11 @@ async def stream( force_multipart: typing.Optional[bool] = None, ) -> typing.AsyncIterator[httpx.Response]: base_url = self.get_base_url(base_url) - _timeout = ( - request_options.get("timeout") - if request_options is not None and request_options.get("timeout") is not None - else request_options.get("timeout_in_seconds") + timeout = ( + request_options.get("timeout_in_seconds") if request_options is not None and request_options.get("timeout_in_seconds") is not None else self.base_timeout() ) - timeout = _timeout if _timeout is not None else httpx.USE_CLIENT_DEFAULT request_files: typing.Optional[RequestFiles] = ( convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit)) diff --git a/src/deepgram/core/http_sse/_api.py b/src/deepgram/core/http_sse/_api.py index 9ca5602c..fd137301 100644 --- a/src/deepgram/core/http_sse/_api.py +++ b/src/deepgram/core/http_sse/_api.py @@ -2,20 +2,9 @@ import codecs import re -import time from contextlib import asynccontextmanager, contextmanager -from typing import ( - Any, - AsyncContextManager, - AsyncGenerator, - AsyncIterator, - Callable, - ContextManager, - Iterator, - Optional, -) - -import anyio +from typing import Any, AsyncGenerator, AsyncIterator, Iterator + import httpx from ._decoders import SSEDecoder from ._exceptions import SSEError @@ -23,60 +12,21 @@ MAX_LINE_SIZE: int = 1_048_576 # 1 MiB -# Reconnection defaults, mirroring the TypeScript SDK's Stream implementation. -DEFAULT_MAX_RECONNECTION_ATTEMPTS: int = 5 -DEFAULT_RECONNECT_DELAY_MS: int = 1_000 -MAX_RECONNECT_DELAY_MS: int = 30_000 - -# A reconnect callback re-issues the original request (with a ``Last-Event-ID`` -# header set to the supplied event id) and returns a *context manager* yielding -# a fresh streaming ``httpx.Response``. Sync clients supply a sync context -# manager; async clients supply an async one. class EventSource: - def __init__( - self, - response: httpx.Response, - *, - resumable: bool = False, - stream_reconnection_enabled: bool = True, - max_stream_reconnection_attempts: Optional[int] = None, - stream_terminator: Optional[str] = None, - reconnect: Optional[Callable[[str], Any]] = None, - ) -> None: + def __init__(self, response: httpx.Response) -> None: self._response = response - self._resumable = resumable - self._stream_reconnection_enabled = stream_reconnection_enabled - self._max_stream_reconnection_attempts = max_stream_reconnection_attempts - self._stream_terminator = stream_terminator - self._reconnect = reconnect - - @staticmethod - def _is_event_stream(response: httpx.Response) -> bool: - content_type = response.headers.get("content-type", "").partition(";")[0] - return "text/event-stream" in content_type def _check_content_type(self) -> None: - if not self._is_event_stream(self._response): - content_type = self._response.headers.get("content-type", "").partition(";")[0] + content_type = self._response.headers.get("content-type", "").partition(";")[0] + if "text/event-stream" not in content_type: raise SSEError( f"Expected response header Content-Type to contain 'text/event-stream', got {content_type!r}" ) - def _is_reconnect_response_usable(self, response: httpx.Response) -> bool: - """Whether a reconnected response can be resumed as an SSE stream. - - ``httpx.stream`` does not raise on non-success status, so a resume that - returns an error page (e.g. ``200 text/html`` or a ``500`` body) would - otherwise be parsed as SSE and yield garbage/zero events. Such a - response is treated as a failed attempt (back off and retry) instead. - """ - return response.status_code < 400 and self._is_event_stream(response) - - def _get_charset(self, response: Optional[httpx.Response] = None) -> str: + def _get_charset(self) -> str: """Extract charset from Content-Type header, fallback to UTF-8.""" - resolved = response if response is not None else self._response - content_type = resolved.headers.get("content-type", "") + content_type = self._response.headers.get("content-type", "") # Parse charset parameter using regex charset_match = re.search(r"charset=([^;\s]+)", content_type, re.IGNORECASE) @@ -110,83 +60,14 @@ def _normalize_sse_line_endings(buf: str) -> str: return buf[:-1].replace("\r", "\n") + "\r" return buf.replace("\r", "\n") - def _new_text_decoder(self, response: Optional[httpx.Response] = None) -> "codecs.IncrementalDecoder": - return codecs.getincrementaldecoder(self._get_charset(response))(errors="replace") - - def _reconnect_applicable(self) -> bool: - """Whether reconnection is configured for this stream at all. - - This is the terminator-gating half of the reconnect decision, kept - separate from :meth:`_should_reconnect` (which additionally requires a - last *dispatched* id and an unexhausted attempt budget). The split lets - a mid-stream transport error terminate consistently: - - a stream that can never reconnect (non-resumable, no terminator, - disabled, or no callback) must re-raise the error to the caller, so a - truncated stream is not mistaken for a clean completion; - - a resumable stream that has merely run out of attempts (or has no id - to resume from) ends cleanly — the same way an exhausted empty/error - -body resume already does, matching the TypeScript ``return``. - """ - return ( - self._resumable - and self._stream_terminator is not None - and self._stream_reconnection_enabled - and self._reconnect is not None - ) - - def _should_reconnect(self, last_dispatched_id: Optional[str], reconnect_attempts: int) -> bool: - """Decide whether a prematurely-ended stream should be reconnected. - - Mirrors the TypeScript ``shouldReconnect`` gating: - - only resumable SSE endpoints with a configured terminator, reconnect - enabled, and a reconnect callback are eligible (see - :meth:`_reconnect_applicable`); - - a last *dispatched* event id must exist to resume from; - - the consecutive-failed-attempt cap must not be exceeded. - """ - if not self._reconnect_applicable(): - return False - if not last_dispatched_id: - return False - max_attempts = ( - self._max_stream_reconnection_attempts - if self._max_stream_reconnection_attempts is not None - else DEFAULT_MAX_RECONNECTION_ATTEMPTS - ) - if reconnect_attempts >= max_attempts: - return False - return True - - def _reconnect_delay_seconds(self, last_retry: Optional[int]) -> float: - """Backoff before a reconnect. - - Uses the server's most recent ``retry:`` directive (milliseconds) when - present, otherwise a default of ``DEFAULT_RECONNECT_DELAY_MS``, clamped - to ``MAX_RECONNECT_DELAY_MS``. - """ - base_ms = last_retry if (last_retry is not None and last_retry > 0) else DEFAULT_RECONNECT_DELAY_MS - return min(base_ms, MAX_RECONNECT_DELAY_MS) / 1000.0 - - def _sleep_before_reconnect(self, last_retry: Optional[int]) -> None: - # ``time.sleep`` blocks the calling thread but remains interruptible by - # signals (e.g. ``KeyboardInterrupt``), which propagate out and abort - # the reconnect without issuing another request. - time.sleep(self._reconnect_delay_seconds(last_retry)) - - async def _asleep_before_reconnect(self, last_retry: Optional[int]) -> None: - # ``anyio.sleep`` is cancellation-aware: if the consumer cancels the task - # or closes the async generator mid-delay, this raises (and no further - # request is issued) instead of blocking for the whole interval. - await anyio.sleep(self._reconnect_delay_seconds(last_retry)) - - def _decode_response( - self, - response: httpx.Response, - decoder: SSEDecoder, - text_decoder: "codecs.IncrementalDecoder", - ) -> Iterator[ServerSentEvent]: + def iter_sse(self) -> Iterator[ServerSentEvent]: + self._check_content_type() + decoder = SSEDecoder() + charset = self._get_charset() + text_decoder = codecs.getincrementaldecoder(charset)(errors="replace") + buf = "" - for chunk in response.iter_bytes(): + for chunk in self._response.iter_bytes(): buf += text_decoder.decode(chunk) buf = self._normalize_sse_line_endings(buf) @@ -201,16 +82,34 @@ def _decode_response( f"SSE line exceeded maximum size of {MAX_LINE_SIZE} characters without encountering a newline" ) - yield from self._flush_decoder(buf, decoder, text_decoder) + # Flush any remaining bytes from the incremental decoder + buf += text_decoder.decode(b"", final=True) + buf = buf.replace("\r\n", "\n").replace("\r", "\n") + + if len(buf) > MAX_LINE_SIZE: + raise SSEError( + f"SSE line exceeded maximum size of {MAX_LINE_SIZE} characters without encountering a newline" + ) + + while "\n" in buf: + line, buf = buf.split("\n", 1) + sse = decoder.decode(line) + if sse is not None: + yield sse + + if buf.strip(): + sse = decoder.decode(buf) + if sse is not None: + yield sse + + async def aiter_sse(self) -> AsyncGenerator[ServerSentEvent, None]: + self._check_content_type() + decoder = SSEDecoder() + charset = self._get_charset() + text_decoder = codecs.getincrementaldecoder(charset)(errors="replace") - async def _adecode_response( - self, - response: httpx.Response, - decoder: SSEDecoder, - text_decoder: "codecs.IncrementalDecoder", - ) -> AsyncGenerator[ServerSentEvent, None]: buf = "" - async for chunk in response.aiter_bytes(): + async for chunk in self._response.aiter_bytes(): buf += text_decoder.decode(chunk) buf = self._normalize_sse_line_endings(buf) @@ -225,15 +124,6 @@ async def _adecode_response( f"SSE line exceeded maximum size of {MAX_LINE_SIZE} characters without encountering a newline" ) - for sse in self._flush_decoder(buf, decoder, text_decoder): - yield sse - - def _flush_decoder( - self, - buf: str, - decoder: SSEDecoder, - text_decoder: "codecs.IncrementalDecoder", - ) -> Iterator[ServerSentEvent]: # Flush any remaining bytes from the incremental decoder buf += text_decoder.decode(b"", final=True) buf = buf.replace("\r\n", "\n").replace("\r", "\n") @@ -254,181 +144,6 @@ def _flush_decoder( if sse is not None: yield sse - def iter_sse(self) -> Iterator[ServerSentEvent]: - self._check_content_type() - decoder = SSEDecoder() - text_decoder = self._new_text_decoder() - - last_dispatched_id: Optional[str] = None - last_retry: Optional[int] = None - # Consecutive failed reconnection attempts. Reset to 0 whenever an event - # is successfully dispatched (reset-on-progress) — matching browser - # `EventSource` semantics: a server that emits >=1 event then drops on - # every connection can reconnect indefinitely. - reconnect_attempts = 0 - - # ``None`` means there is no live stream to read this iteration (e.g. a - # failed reconnect); the loop then re-evaluates the reconnect decision - # without re-reading an exhausted response. - response: Optional[httpx.Response] = self._response - # Context manager for a response we opened ourselves and must close. - # The initial response is owned by the caller, so it starts as None. - owned_cm: Optional[ContextManager[httpx.Response]] = None - try: - while True: - if response is not None: - events = self._decode_response(response, decoder, text_decoder) - while True: - try: - sse = next(events) - except StopIteration: - break - except SSEError: - # A protocol violation (e.g. an oversized line) is a - # genuine error, not a dropped connection; propagate it. - # Listed first because ``SSEError`` subclasses - # ``httpx.TransportError``. - raise - except httpx.TransportError: - # A transport error mid-stream (e.g. the server dropped - # the connection: ``ReadError``/``RemoteProtocolError``) - # is a premature end. Only swallow it when reconnection - # is configured for this stream; otherwise re-raise so a - # non-resumable stream still surfaces the error to the - # caller instead of looking like a clean completion. - # When reconnection is applicable but the attempt budget - # is exhausted, we ``break`` and end cleanly below — the - # same way an exhausted empty/error-body resume does, so - # give-up is consistent regardless of failure shape. - # ``next`` is used rather than ``for`` so this cannot - # swallow a ``GeneratorExit`` raised at a ``yield``. - if not self._reconnect_applicable(): - raise - break - yield sse - if sse.id: - last_dispatched_id = sse.id - if sse.retry is not None: - last_retry = sse.retry - reconnect_attempts = 0 - - if not self._should_reconnect(last_dispatched_id, reconnect_attempts): - return - reconnect_attempts += 1 - - self._sleep_before_reconnect(last_retry) - - # Close the previously-opened reconnect response before opening - # a new one so we never hold more than one extra connection. - if owned_cm is not None: - owned_cm.__exit__(None, None, None) - owned_cm = None - - assert self._reconnect is not None # guaranteed by _should_reconnect - try: - cm: ContextManager[httpx.Response] = self._reconnect(last_dispatched_id or "") - new_response = cm.__enter__() - except Exception: - # A failed reconnect consumes an attempt; back off and retry. - response = None - continue - owned_cm = cm - if new_response is None or not self._is_reconnect_response_usable(new_response): - # Null/empty body or a non-SSE/error response (e.g. 204/304, - # a 500, or an HTML error page): treat as a failed attempt. - response = None - continue - - response = new_response - # Drop any partial event left over from the dropped stream, but - # keep the last event id (per the SSE spec) and start a fresh - # incremental text decoder for the new connection. - decoder.reset_in_progress_event() - text_decoder = self._new_text_decoder(new_response) - finally: - if owned_cm is not None: - owned_cm.__exit__(None, None, None) - - async def aiter_sse(self) -> AsyncGenerator[ServerSentEvent, None]: - self._check_content_type() - decoder = SSEDecoder() - text_decoder = self._new_text_decoder() - - last_dispatched_id: Optional[str] = None - last_retry: Optional[int] = None - reconnect_attempts = 0 - - response: Optional[httpx.Response] = self._response - owned_cm: Optional[AsyncContextManager[httpx.Response]] = None - try: - while True: - if response is not None: - events = self._adecode_response(response, decoder, text_decoder) - while True: - try: - sse = await events.__anext__() - except StopAsyncIteration: - break - except SSEError: - # A protocol violation (e.g. an oversized line) is a - # genuine error, not a dropped connection; propagate it. - # Listed first because ``SSEError`` subclasses - # ``httpx.TransportError``. - raise - except httpx.TransportError: - # A transport error mid-stream (e.g. the server dropped - # the connection: ``ReadError``/``RemoteProtocolError``) - # is a premature end. Only swallow it when reconnection - # is configured for this stream; otherwise re-raise so a - # non-resumable stream still surfaces the error to the - # caller instead of looking like a clean completion. - # When reconnection is applicable but the attempt budget - # is exhausted, we ``break`` and end cleanly below — the - # same way an exhausted empty/error-body resume does, so - # give-up is consistent regardless of failure shape. - if not self._reconnect_applicable(): - raise - break - yield sse - if sse.id: - last_dispatched_id = sse.id - if sse.retry is not None: - last_retry = sse.retry - reconnect_attempts = 0 - - if not self._should_reconnect(last_dispatched_id, reconnect_attempts): - return - reconnect_attempts += 1 - - await self._asleep_before_reconnect(last_retry) - - if owned_cm is not None: - await owned_cm.__aexit__(None, None, None) - owned_cm = None - - assert self._reconnect is not None # guaranteed by _should_reconnect - try: - cm: AsyncContextManager[httpx.Response] = self._reconnect(last_dispatched_id or "") - new_response = await cm.__aenter__() - except Exception: - response = None - continue - owned_cm = cm - if new_response is None or not self._is_reconnect_response_usable(new_response): - response = None - continue - - response = new_response - decoder.reset_in_progress_event() - text_decoder = self._new_text_decoder(new_response) - finally: - if owned_cm is not None: - # Shield the close so a cancellation delivered while reading a - # reconnected response still fully tears the connection down - # instead of leaking it until the client is closed. - with anyio.CancelScope(shield=True): - await owned_cm.__aexit__(None, None, None) - @contextmanager def connect_sse(client: httpx.Client, method: str, url: str, **kwargs: Any) -> Iterator[EventSource]: diff --git a/src/deepgram/core/http_sse/_decoders.py b/src/deepgram/core/http_sse/_decoders.py index 1f6b35ec..339b0890 100644 --- a/src/deepgram/core/http_sse/_decoders.py +++ b/src/deepgram/core/http_sse/_decoders.py @@ -12,19 +12,6 @@ def __init__(self) -> None: self._last_event_id = "" self._retry: Optional[int] = None - def reset_in_progress_event(self) -> None: - """Discard any partially-parsed (undispatched) event. - - Used when a stream ends mid-event before reconnecting: the buffered - ``event``/``data``/``retry`` fields of the never-dispatched event must - be dropped so they do not corrupt the first event of the reconnected - stream. Per the SSE spec the last event id is *not* reset here — it - persists across connections. - """ - self._event = "" - self._data = [] - self._retry = None - def decode(self, line: str) -> Optional[ServerSentEvent]: # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 diff --git a/src/deepgram/core/request_options.py b/src/deepgram/core/request_options.py index caa6f669..1b388044 100644 --- a/src/deepgram/core/request_options.py +++ b/src/deepgram/core/request_options.py @@ -14,9 +14,7 @@ class RequestOptions(typing.TypedDict, total=False): This is used primarily as an optional final parameter for service functions. Attributes: - - timeout: float. The number of seconds to await an API call before timing out. - - - timeout_in_seconds: int. Deprecated alias for `timeout`; both are in seconds. Prefer `timeout`. + - timeout_in_seconds: int. The number of seconds to await an API call before timing out. - max_retries: int. The max number of retries to attempt if the API call fails. @@ -29,12 +27,9 @@ class RequestOptions(typing.TypedDict, total=False): - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads. """ - timeout: NotRequired[float] timeout_in_seconds: NotRequired[int] max_retries: NotRequired[int] additional_headers: NotRequired[typing.Dict[str, typing.Any]] additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]] additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]] chunk_size: NotRequired[int] - stream_reconnection_enabled: NotRequired[bool] - max_stream_reconnection_attempts: NotRequired[int] diff --git a/src/deepgram/listen/__init__.py b/src/deepgram/listen/__init__.py index 64d56944..b3bccf31 100644 --- a/src/deepgram/listen/__init__.py +++ b/src/deepgram/listen/__init__.py @@ -30,9 +30,6 @@ ListenV1ResultsEntitiesItem, ListenV1ResultsEntitiesItemParams, ListenV1ResultsMetadata, - ListenV1ResultsMetadataDiarizeInfo, - ListenV1ResultsMetadataDiarizeInfoArch, - ListenV1ResultsMetadataDiarizeInfoParams, ListenV1ResultsMetadataModelInfo, ListenV1ResultsMetadataModelInfoParams, ListenV1ResultsMetadataParams, @@ -45,6 +42,7 @@ from .v2 import ( ListenV2CloseStream, ListenV2CloseStreamParams, + ListenV2CloseStreamType, ListenV2Configure, ListenV2ConfigureFailure, ListenV2ConfigureFailureParams, @@ -59,16 +57,12 @@ ListenV2ConnectedParams, ListenV2FatalError, ListenV2FatalErrorParams, - ListenV2ForceEndTurn, - ListenV2ForceEndTurnParams, ListenV2TurnInfo, ListenV2TurnInfoEvent, ListenV2TurnInfoParams, ListenV2TurnInfoWordsItem, ListenV2TurnInfoWordsItemParams, ) - from .v2 import ListenV2CloseStreamType - _dynamic_imports: typing.Dict[str, str] = { "DiarizeModel": ".v1", "ListenV1CloseStream": ".v1", @@ -92,9 +86,6 @@ "ListenV1ResultsEntitiesItem": ".v1", "ListenV1ResultsEntitiesItemParams": ".v1", "ListenV1ResultsMetadata": ".v1", - "ListenV1ResultsMetadataDiarizeInfo": ".v1", - "ListenV1ResultsMetadataDiarizeInfoArch": ".v1", - "ListenV1ResultsMetadataDiarizeInfoParams": ".v1", "ListenV1ResultsMetadataModelInfo": ".v1", "ListenV1ResultsMetadataModelInfoParams": ".v1", "ListenV1ResultsMetadataParams": ".v1", @@ -105,6 +96,7 @@ "ListenV1UtteranceEndParams": ".v1", "ListenV2CloseStream": ".v2", "ListenV2CloseStreamParams": ".v2", + "ListenV2CloseStreamType": ".v2", "ListenV2Configure": ".v2", "ListenV2ConfigureFailure": ".v2", "ListenV2ConfigureFailureParams": ".v2", @@ -119,8 +111,6 @@ "ListenV2ConnectedParams": ".v2", "ListenV2FatalError": ".v2", "ListenV2FatalErrorParams": ".v2", - "ListenV2ForceEndTurn": ".v2", - "ListenV2ForceEndTurnParams": ".v2", "ListenV2TurnInfo": ".v2", "ListenV2TurnInfoEvent": ".v2", "ListenV2TurnInfoParams": ".v2", @@ -128,7 +118,6 @@ "ListenV2TurnInfoWordsItemParams": ".v2", "v1": ".v1", "v2": ".v2", - "ListenV2CloseStreamType": ".v2", } @@ -176,9 +165,6 @@ def __dir__(): "ListenV1ResultsEntitiesItem", "ListenV1ResultsEntitiesItemParams", "ListenV1ResultsMetadata", - "ListenV1ResultsMetadataDiarizeInfo", - "ListenV1ResultsMetadataDiarizeInfoArch", - "ListenV1ResultsMetadataDiarizeInfoParams", "ListenV1ResultsMetadataModelInfo", "ListenV1ResultsMetadataModelInfoParams", "ListenV1ResultsMetadataParams", @@ -189,6 +175,7 @@ def __dir__(): "ListenV1UtteranceEndParams", "ListenV2CloseStream", "ListenV2CloseStreamParams", + "ListenV2CloseStreamType", "ListenV2Configure", "ListenV2ConfigureFailure", "ListenV2ConfigureFailureParams", @@ -203,8 +190,6 @@ def __dir__(): "ListenV2ConnectedParams", "ListenV2FatalError", "ListenV2FatalErrorParams", - "ListenV2ForceEndTurn", - "ListenV2ForceEndTurnParams", "ListenV2TurnInfo", "ListenV2TurnInfoEvent", "ListenV2TurnInfoParams", @@ -212,5 +197,4 @@ def __dir__(): "ListenV2TurnInfoWordsItemParams", "v1", "v2", - "ListenV2CloseStreamType", ] diff --git a/src/deepgram/listen/v1/__init__.py b/src/deepgram/listen/v1/__init__.py index aacafeab..9311daf3 100644 --- a/src/deepgram/listen/v1/__init__.py +++ b/src/deepgram/listen/v1/__init__.py @@ -21,8 +21,6 @@ ListenV1ResultsChannelAlternativesItemWordsItem, ListenV1ResultsEntitiesItem, ListenV1ResultsMetadata, - ListenV1ResultsMetadataDiarizeInfo, - ListenV1ResultsMetadataDiarizeInfoArch, ListenV1ResultsMetadataModelInfo, ListenV1SpeechStarted, ListenV1UtteranceEnd, @@ -49,7 +47,6 @@ ListenV1ResultsChannelAlternativesItemWordsItemParams, ListenV1ResultsChannelParams, ListenV1ResultsEntitiesItemParams, - ListenV1ResultsMetadataDiarizeInfoParams, ListenV1ResultsMetadataModelInfoParams, ListenV1ResultsMetadataParams, ListenV1ResultsParams, @@ -79,9 +76,6 @@ "ListenV1ResultsEntitiesItem": ".types", "ListenV1ResultsEntitiesItemParams": ".requests", "ListenV1ResultsMetadata": ".types", - "ListenV1ResultsMetadataDiarizeInfo": ".types", - "ListenV1ResultsMetadataDiarizeInfoArch": ".types", - "ListenV1ResultsMetadataDiarizeInfoParams": ".requests", "ListenV1ResultsMetadataModelInfo": ".types", "ListenV1ResultsMetadataModelInfoParams": ".requests", "ListenV1ResultsMetadataParams": ".requests", @@ -148,9 +142,6 @@ def __dir__(): "ListenV1ResultsEntitiesItem", "ListenV1ResultsEntitiesItemParams", "ListenV1ResultsMetadata", - "ListenV1ResultsMetadataDiarizeInfo", - "ListenV1ResultsMetadataDiarizeInfoArch", - "ListenV1ResultsMetadataDiarizeInfoParams", "ListenV1ResultsMetadataModelInfo", "ListenV1ResultsMetadataModelInfoParams", "ListenV1ResultsMetadataParams", diff --git a/src/deepgram/listen/v1/media/client.py b/src/deepgram/listen/v1/media/client.py index eb71694e..866110b9 100644 --- a/src/deepgram/listen/v1/media/client.py +++ b/src/deepgram/listen/v1/media/client.py @@ -142,11 +142,7 @@ def transcribe_url( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands @@ -215,6 +211,43 @@ 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", ) """ @@ -369,11 +402,7 @@ def transcribe_file( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands @@ -610,11 +639,7 @@ async def transcribe_url( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands @@ -688,6 +713,43 @@ 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", ) @@ -845,11 +907,7 @@ async def transcribe_file( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands diff --git a/src/deepgram/listen/v1/media/raw_client.py b/src/deepgram/listen/v1/media/raw_client.py index e8c3767c..d21a900a 100644 --- a/src/deepgram/listen/v1/media/raw_client.py +++ b/src/deepgram/listen/v1/media/raw_client.py @@ -137,11 +137,7 @@ def transcribe_url( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands @@ -392,11 +388,7 @@ def transcribe_file( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands @@ -650,11 +642,7 @@ async def transcribe_url( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands @@ -905,11 +893,7 @@ async def transcribe_file( Filler Words can help transcribe interruptions in your audio, like "uh" and "um" keyterm : typing.Optional[typing.Union[str, typing.Sequence[str]]] - Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - - `keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - - To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. + Key term prompting can boost or suppress specialized terminology and brands. Only compatible with Nova-3 keywords : typing.Optional[typing.Union[str, typing.Sequence[str]]] Keywords can boost or suppress specialized terminology and brands diff --git a/src/deepgram/listen/v1/requests/__init__.py b/src/deepgram/listen/v1/requests/__init__.py index f9e3c7fb..828c41d2 100644 --- a/src/deepgram/listen/v1/requests/__init__.py +++ b/src/deepgram/listen/v1/requests/__init__.py @@ -18,7 +18,6 @@ ) 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 @@ -31,7 +30,6 @@ "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", @@ -70,7 +68,6 @@ 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 d49a96bb..9b48906b 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, present when diarization is enabled + The speaker of the word """ diff --git a/src/deepgram/listen/v1/requests/listen_v1results_metadata.py b/src/deepgram/listen/v1/requests/listen_v1results_metadata.py index f544ad4e..fb5037c8 100644 --- a/src/deepgram/listen/v1/requests/listen_v1results_metadata.py +++ b/src/deepgram/listen/v1/requests/listen_v1results_metadata.py @@ -1,7 +1,6 @@ # 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 @@ -16,8 +15,3 @@ 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 deleted file mode 100644 index 96f98a76..00000000 --- a/src/deepgram/listen/v1/requests/listen_v1results_metadata_diarize_info.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing_extensions -from ..types.listen_v1results_metadata_diarize_info_arch import ListenV1ResultsMetadataDiarizeInfoArch - - -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: ListenV1ResultsMetadataDiarizeInfoArch - """ - The diarizer arch - """ diff --git a/src/deepgram/listen/v1/types/__init__.py b/src/deepgram/listen/v1/types/__init__.py index 02cb0da4..81de9477 100644 --- a/src/deepgram/listen/v1/types/__init__.py +++ b/src/deepgram/listen/v1/types/__init__.py @@ -20,8 +20,6 @@ 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_diarize_info_arch import ListenV1ResultsMetadataDiarizeInfoArch from .listen_v1results_metadata_model_info import ListenV1ResultsMetadataModelInfo from .listen_v1speech_started import ListenV1SpeechStarted from .listen_v1utterance_end import ListenV1UtteranceEnd @@ -40,8 +38,6 @@ "ListenV1ResultsChannelAlternativesItemWordsItem": ".listen_v1results_channel_alternatives_item_words_item", "ListenV1ResultsEntitiesItem": ".listen_v1results_entities_item", "ListenV1ResultsMetadata": ".listen_v1results_metadata", - "ListenV1ResultsMetadataDiarizeInfo": ".listen_v1results_metadata_diarize_info", - "ListenV1ResultsMetadataDiarizeInfoArch": ".listen_v1results_metadata_diarize_info_arch", "ListenV1ResultsMetadataModelInfo": ".listen_v1results_metadata_model_info", "ListenV1SpeechStarted": ".listen_v1speech_started", "ListenV1UtteranceEnd": ".listen_v1utterance_end", @@ -84,8 +80,6 @@ def __dir__(): "ListenV1ResultsChannelAlternativesItemWordsItem", "ListenV1ResultsEntitiesItem", "ListenV1ResultsMetadata", - "ListenV1ResultsMetadataDiarizeInfo", - "ListenV1ResultsMetadataDiarizeInfoArch", "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 3ab0533c..dd4580e1 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, present when diarization is enabled + The speaker of the word """ 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 5dfefa84..8e086c1c 100644 --- a/src/deepgram/listen/v1/types/listen_v1results_metadata.py +++ b/src/deepgram/listen/v1/types/listen_v1results_metadata.py @@ -5,7 +5,6 @@ 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 @@ -21,11 +20,6 @@ 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 deleted file mode 100644 index 9f4de48b..00000000 --- a/src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 -from .listen_v1results_metadata_diarize_info_arch import ListenV1ResultsMetadataDiarizeInfoArch - - -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: ListenV1ResultsMetadataDiarizeInfoArch = pydantic.Field() - """ - The diarizer arch - """ - - 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/v1/types/listen_v1results_metadata_diarize_info_arch.py b/src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info_arch.py deleted file mode 100644 index 7dad2a09..00000000 --- a/src/deepgram/listen/v1/types/listen_v1results_metadata_diarize_info_arch.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ListenV1ResultsMetadataDiarizeInfoArch = typing.Union[typing.Literal["v1", "v2"], typing.Any] diff --git a/src/deepgram/listen/v2/__init__.py b/src/deepgram/listen/v2/__init__.py index f1427c70..ca134a12 100644 --- a/src/deepgram/listen/v2/__init__.py +++ b/src/deepgram/listen/v2/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .types import ( ListenV2CloseStream, + ListenV2CloseStreamType, ListenV2Configure, ListenV2ConfigureFailure, ListenV2ConfigureSuccess, @@ -15,7 +16,6 @@ ListenV2ConfigureThresholds, ListenV2Connected, ListenV2FatalError, - ListenV2ForceEndTurn, ListenV2TurnInfo, ListenV2TurnInfoEvent, ListenV2TurnInfoWordsItem, @@ -29,15 +29,13 @@ ListenV2ConfigureThresholdsParams, ListenV2ConnectedParams, ListenV2FatalErrorParams, - ListenV2ForceEndTurnParams, ListenV2TurnInfoParams, ListenV2TurnInfoWordsItemParams, ) - from .types import ListenV2CloseStreamType - _dynamic_imports: typing.Dict[str, str] = { "ListenV2CloseStream": ".types", "ListenV2CloseStreamParams": ".requests", + "ListenV2CloseStreamType": ".types", "ListenV2Configure": ".types", "ListenV2ConfigureFailure": ".types", "ListenV2ConfigureFailureParams": ".requests", @@ -52,14 +50,11 @@ "ListenV2ConnectedParams": ".requests", "ListenV2FatalError": ".types", "ListenV2FatalErrorParams": ".requests", - "ListenV2ForceEndTurn": ".types", - "ListenV2ForceEndTurnParams": ".requests", "ListenV2TurnInfo": ".types", "ListenV2TurnInfoEvent": ".types", "ListenV2TurnInfoParams": ".requests", "ListenV2TurnInfoWordsItem": ".types", "ListenV2TurnInfoWordsItemParams": ".requests", - "ListenV2CloseStreamType": ".types", } @@ -87,6 +82,7 @@ def __dir__(): __all__ = [ "ListenV2CloseStream", "ListenV2CloseStreamParams", + "ListenV2CloseStreamType", "ListenV2Configure", "ListenV2ConfigureFailure", "ListenV2ConfigureFailureParams", @@ -101,12 +97,9 @@ def __dir__(): "ListenV2ConnectedParams", "ListenV2FatalError", "ListenV2FatalErrorParams", - "ListenV2ForceEndTurn", - "ListenV2ForceEndTurnParams", "ListenV2TurnInfo", "ListenV2TurnInfoEvent", "ListenV2TurnInfoParams", "ListenV2TurnInfoWordsItem", "ListenV2TurnInfoWordsItemParams", - "ListenV2CloseStreamType", ] diff --git a/src/deepgram/listen/v2/client.py b/src/deepgram/listen/v2/client.py index eb92e294..28277568 100644 --- a/src/deepgram/listen/v2/client.py +++ b/src/deepgram/listen/v2/client.py @@ -23,7 +23,6 @@ from ...types.listen_v2model import ListenV2Model from ...types.listen_v2numerals import ListenV2Numerals from ...types.listen_v2profanity_filter import ListenV2ProfanityFilter -from ...types.listen_v2redact import ListenV2Redact from ...types.listen_v2sample_rate import ListenV2SampleRate from ...types.listen_v2tag import ListenV2Tag from .raw_client import AsyncRawV2Client, RawV2Client @@ -64,7 +63,6 @@ def connect( language_hint: typing.Optional[ListenV2LanguageHintParams] = None, profanity_filter: typing.Optional[ListenV2ProfanityFilter] = None, numerals: typing.Optional[ListenV2Numerals] = None, - redact: typing.Optional[ListenV2Redact] = None, mip_opt_out: typing.Optional[ListenV2MipOptOut] = None, tag: typing.Optional[ListenV2Tag] = None, authorization: typing.Optional[str] = None, @@ -96,8 +94,6 @@ def connect( numerals : typing.Optional[ListenV2Numerals] - redact : typing.Optional[ListenV2Redact] - mip_opt_out : typing.Optional[ListenV2MipOptOut] tag : typing.Optional[ListenV2Tag] @@ -141,7 +137,6 @@ def connect( ), "profanity_filter": profanity_filter, "numerals": numerals, - "redact": redact, "mip_opt_out": mip_opt_out, "tag": tag, **( @@ -207,7 +202,6 @@ async def connect( language_hint: typing.Optional[ListenV2LanguageHintParams] = None, profanity_filter: typing.Optional[ListenV2ProfanityFilter] = None, numerals: typing.Optional[ListenV2Numerals] = None, - redact: typing.Optional[ListenV2Redact] = None, mip_opt_out: typing.Optional[ListenV2MipOptOut] = None, tag: typing.Optional[ListenV2Tag] = None, authorization: typing.Optional[str] = None, @@ -239,8 +233,6 @@ async def connect( numerals : typing.Optional[ListenV2Numerals] - redact : typing.Optional[ListenV2Redact] - mip_opt_out : typing.Optional[ListenV2MipOptOut] tag : typing.Optional[ListenV2Tag] @@ -284,7 +276,6 @@ async def connect( ), "profanity_filter": profanity_filter, "numerals": numerals, - "redact": redact, "mip_opt_out": mip_opt_out, "tag": tag, **( diff --git a/src/deepgram/listen/v2/raw_client.py b/src/deepgram/listen/v2/raw_client.py index 304c2dac..52b0ab9e 100644 --- a/src/deepgram/listen/v2/raw_client.py +++ b/src/deepgram/listen/v2/raw_client.py @@ -23,7 +23,6 @@ from ...types.listen_v2model import ListenV2Model from ...types.listen_v2numerals import ListenV2Numerals from ...types.listen_v2profanity_filter import ListenV2ProfanityFilter -from ...types.listen_v2redact import ListenV2Redact from ...types.listen_v2sample_rate import ListenV2SampleRate from ...types.listen_v2tag import ListenV2Tag from .socket_client import AsyncV2SocketClient, V2SocketClient @@ -52,7 +51,6 @@ def connect( language_hint: typing.Optional[ListenV2LanguageHintParams] = None, profanity_filter: typing.Optional[ListenV2ProfanityFilter] = None, numerals: typing.Optional[ListenV2Numerals] = None, - redact: typing.Optional[ListenV2Redact] = None, mip_opt_out: typing.Optional[ListenV2MipOptOut] = None, tag: typing.Optional[ListenV2Tag] = None, authorization: typing.Optional[str] = None, @@ -84,8 +82,6 @@ def connect( numerals : typing.Optional[ListenV2Numerals] - redact : typing.Optional[ListenV2Redact] - mip_opt_out : typing.Optional[ListenV2MipOptOut] tag : typing.Optional[ListenV2Tag] @@ -129,7 +125,6 @@ def connect( ), "profanity_filter": profanity_filter, "numerals": numerals, - "redact": redact, "mip_opt_out": mip_opt_out, "tag": tag, **( @@ -184,7 +179,6 @@ async def connect( language_hint: typing.Optional[ListenV2LanguageHintParams] = None, profanity_filter: typing.Optional[ListenV2ProfanityFilter] = None, numerals: typing.Optional[ListenV2Numerals] = None, - redact: typing.Optional[ListenV2Redact] = None, mip_opt_out: typing.Optional[ListenV2MipOptOut] = None, tag: typing.Optional[ListenV2Tag] = None, authorization: typing.Optional[str] = None, @@ -216,8 +210,6 @@ async def connect( numerals : typing.Optional[ListenV2Numerals] - redact : typing.Optional[ListenV2Redact] - mip_opt_out : typing.Optional[ListenV2MipOptOut] tag : typing.Optional[ListenV2Tag] @@ -261,7 +253,6 @@ async def connect( ), "profanity_filter": profanity_filter, "numerals": numerals, - "redact": redact, "mip_opt_out": mip_opt_out, "tag": tag, **( diff --git a/src/deepgram/listen/v2/requests/__init__.py b/src/deepgram/listen/v2/requests/__init__.py index 2f5e8b72..84e08faa 100644 --- a/src/deepgram/listen/v2/requests/__init__.py +++ b/src/deepgram/listen/v2/requests/__init__.py @@ -14,7 +14,6 @@ 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] = { @@ -26,7 +25,6 @@ "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", } @@ -62,7 +60,6 @@ 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 deleted file mode 100644 index 19d28c95..00000000 --- a/src/deepgram/listen/v2/requests/listen_v2force_end_turn.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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 4f18d57c..71671453 100644 --- a/src/deepgram/listen/v2/requests/listen_v2turn_info.py +++ b/src/deepgram/listen/v2/requests/listen_v2turn_info.py @@ -64,19 +64,6 @@ 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 434016b4..d214f0f5 100644 --- a/src/deepgram/listen/v2/socket_client.py +++ b/src/deepgram/listen/v2/socket_client.py @@ -8,12 +8,9 @@ from ...core.events import EventEmitterMixin, EventType from ...core.unchecked_base_model import construct_type from .types.listen_v2close_stream import ListenV2CloseStream -from .types.listen_v2configure import ListenV2Configure from .types.listen_v2configure_failure import ListenV2ConfigureFailure -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: @@ -23,7 +20,7 @@ _logger = logging.getLogger(__name__) V2SocketClientResponse = typing.Union[ - ListenV2Connected, ListenV2TurnInfo, ListenV2ConfigureSuccess, ListenV2ConfigureFailure, ListenV2FatalError + ListenV2Connected, ListenV2TurnInfo, typing.Any, ListenV2ConfigureFailure, ListenV2FatalError ] @@ -89,24 +86,12 @@ 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: ListenV2ForceEndTurn) -> None: + async def send_configure(self, message: typing.Any) -> None: """ Send a message to the websocket connection. - The message will be sent as a ListenV2ForceEndTurn. + The message will be sent as a typing.Any. """ - await self._send_model(message) - - async def send_configure(self, message: typing.Union[ListenV2Configure, typing.Dict[str, typing.Any]]) -> None: - """ - Send a message to the websocket connection. - The message will be sent as a ListenV2Configure. - - Back-compat: a raw dict is accepted and sent verbatim (the pre-typed-model behavior). - """ - if hasattr(message, "dict"): - await self._send_model(message) - else: - await self._send(message) + await self._send(message) async def recv(self) -> V2SocketClientResponse: """ @@ -199,24 +184,12 @@ 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: ListenV2ForceEndTurn) -> None: + def send_configure(self, message: typing.Any) -> None: """ Send a message to the websocket connection. - The message will be sent as a ListenV2ForceEndTurn. + The message will be sent as a typing.Any. """ - self._send_model(message) - - def send_configure(self, message: typing.Union[ListenV2Configure, typing.Dict[str, typing.Any]]) -> None: - """ - Send a message to the websocket connection. - The message will be sent as a ListenV2Configure. - - Back-compat: a raw dict is accepted and sent verbatim (the pre-typed-model behavior). - """ - if hasattr(message, "dict"): - self._send_model(message) - else: - self._send(message) + self._send(message) def recv(self) -> V2SocketClientResponse: """ diff --git a/src/deepgram/listen/v2/types/__init__.py b/src/deepgram/listen/v2/types/__init__.py index b6579685..15cc6fba 100644 --- a/src/deepgram/listen/v2/types/__init__.py +++ b/src/deepgram/listen/v2/types/__init__.py @@ -7,6 +7,7 @@ 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 @@ -14,14 +15,12 @@ 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", "ListenV2Configure": ".listen_v2configure", "ListenV2ConfigureFailure": ".listen_v2configure_failure", "ListenV2ConfigureSuccess": ".listen_v2configure_success", @@ -29,11 +28,9 @@ "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", - "ListenV2CloseStreamType": ".listen_v2close_stream_type", } @@ -60,6 +57,7 @@ def __dir__(): __all__ = [ "ListenV2CloseStream", + "ListenV2CloseStreamType", "ListenV2Configure", "ListenV2ConfigureFailure", "ListenV2ConfigureSuccess", @@ -67,9 +65,7 @@ def __dir__(): "ListenV2ConfigureThresholds", "ListenV2Connected", "ListenV2FatalError", - "ListenV2ForceEndTurn", "ListenV2TurnInfo", "ListenV2TurnInfoEvent", "ListenV2TurnInfoWordsItem", - "ListenV2CloseStreamType", ] diff --git a/src/deepgram/listen/v2/types/listen_v2force_end_turn.py b/src/deepgram/listen/v2/types/listen_v2force_end_turn.py deleted file mode 100644 index a2f6b044..00000000 --- a/src/deepgram/listen/v2/types/listen_v2force_end_turn.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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 d87a1032..dd60abf5 100644 --- a/src/deepgram/listen/v2/types/listen_v2turn_info.py +++ b/src/deepgram/listen/v2/types/listen_v2turn_info.py @@ -66,19 +66,6 @@ class ListenV2TurnInfo(UncheckedBaseModel): 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/manage/v1/projects/requests/client.py b/src/deepgram/manage/v1/projects/requests/client.py index 7d71b8c5..6d1435aa 100644 --- a/src/deepgram/manage/v1/projects/requests/client.py +++ b/src/deepgram/manage/v1/projects/requests/client.py @@ -93,13 +93,29 @@ def list( Examples -------- + import datetime + from deepgram import DeepgramClient client = DeepgramClient( api_key="YOUR_API_KEY", ) client.manage.v1.projects.requests.list( - project_id="12345678-90ab-cdef-1234-567890abcdef", + project_id="123456-7890-1234-5678-901234", + start=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + end=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + limit=1.1, + page=1.1, + accessor="12345678-1234-1234-1234-123456789012", + request_id="12345678-1234-1234-1234-123456789012", + deployment="hosted", + endpoint="listen", + method="sync", + status="succeeded", ) """ _response = self._raw_client.list( @@ -148,8 +164,8 @@ def get( api_key="YOUR_API_KEY", ) client.manage.v1.projects.requests.get( - project_id="12345678-90ab-cdef-1234-567890abcdef", - request_id="a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d", + project_id="123456-7890-1234-5678-901234", + request_id="123456-7890-1234-5678-901234", ) """ _response = self._raw_client.get(project_id, request_id, request_options=request_options) @@ -236,6 +252,7 @@ async def list( Examples -------- import asyncio + import datetime from deepgram import AsyncDeepgramClient @@ -246,7 +263,21 @@ async def list( async def main() -> None: await client.manage.v1.projects.requests.list( - project_id="12345678-90ab-cdef-1234-567890abcdef", + project_id="123456-7890-1234-5678-901234", + start=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + end=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + limit=1.1, + page=1.1, + accessor="12345678-1234-1234-1234-123456789012", + request_id="12345678-1234-1234-1234-123456789012", + deployment="hosted", + endpoint="listen", + method="sync", + status="succeeded", ) @@ -303,8 +334,8 @@ async def get( async def main() -> None: await client.manage.v1.projects.requests.get( - project_id="12345678-90ab-cdef-1234-567890abcdef", - request_id="a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d", + project_id="123456-7890-1234-5678-901234", + request_id="123456-7890-1234-5678-901234", ) diff --git a/src/deepgram/requests/__init__.py b/src/deepgram/requests/__init__.py index 9a0e1e7a..c82a9fc2 100644 --- a/src/deepgram/requests/__init__.py +++ b/src/deepgram/requests/__init__.py @@ -25,9 +25,10 @@ from .billing_breakdown_v1response_results_item import BillingBreakdownV1ResponseResultsItemParams from .billing_breakdown_v1response_results_item_grouping import BillingBreakdownV1ResponseResultsItemGroupingParams from .cartesia import CartesiaParams - from .cartesia_voice import CartesiaVoiceParams + from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams 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 ( @@ -40,6 +41,7 @@ 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 @@ -106,7 +108,6 @@ 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 @@ -218,10 +219,6 @@ 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", @@ -242,15 +239,17 @@ "BillingBreakdownV1ResponseResultsItemGroupingParams": ".billing_breakdown_v1response_results_item_grouping", "BillingBreakdownV1ResponseResultsItemParams": ".billing_breakdown_v1response_results_item", "CartesiaParams": ".cartesia", - "CartesiaVoiceParams": ".cartesia_voice", + "CartesiaSpeakProviderVoiceParams": ".cartesia_speak_provider_voice", "CreateAgentConfigurationV1ResponseParams": ".create_agent_configuration_v1response", "CreateKeyV1RequestParams": ".create_key_v1request", + "CreateKeyV1RequestOneParams": ".create_key_v1request_one", "CreateKeyV1ResponseParams": ".create_key_v1response", "CreateProjectDistributionCredentialsV1ResponseDistributionCredentialsParams": ".create_project_distribution_credentials_v1response_distribution_credentials", "CreateProjectDistributionCredentialsV1ResponseMemberParams": ".create_project_distribution_credentials_v1response_member", "CreateProjectDistributionCredentialsV1ResponseParams": ".create_project_distribution_credentials_v1response", "CreateProjectInviteV1ResponseParams": ".create_project_invite_v1response", "DeepgramListenProviderV1Params": ".deepgram_listen_provider_v1", + "DeepgramListenProviderV2LanguageHintParams": ".deepgram_listen_provider_v2language_hint", "DeepgramListenProviderV2Params": ".deepgram_listen_provider_v2", "DeepgramParams": ".deepgram", "DeleteProjectInviteV1ResponseParams": ".delete_project_invite_v1response", @@ -307,7 +306,6 @@ "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", @@ -393,9 +391,6 @@ "UsageFieldsV1ResponseParams": ".usage_fields_v1response", "UsageV1ResponseParams": ".usage_v1response", "UsageV1ResponseResolutionParams": ".usage_v1response_resolution", - "CartesiaSpeakProviderVoiceParams": ".cartesia_speak_provider_voice", - "CreateKeyV1RequestOneParams": ".create_key_v1request_one", - "DeepgramListenProviderV2LanguageHintParams": ".deepgram_listen_provider_v2language_hint", } @@ -440,15 +435,17 @@ def __dir__(): "BillingBreakdownV1ResponseResultsItemGroupingParams", "BillingBreakdownV1ResponseResultsItemParams", "CartesiaParams", - "CartesiaVoiceParams", + "CartesiaSpeakProviderVoiceParams", "CreateAgentConfigurationV1ResponseParams", "CreateKeyV1RequestParams", + "CreateKeyV1RequestOneParams", "CreateKeyV1ResponseParams", "CreateProjectDistributionCredentialsV1ResponseDistributionCredentialsParams", "CreateProjectDistributionCredentialsV1ResponseMemberParams", "CreateProjectDistributionCredentialsV1ResponseParams", "CreateProjectInviteV1ResponseParams", "DeepgramListenProviderV1Params", + "DeepgramListenProviderV2LanguageHintParams", "DeepgramListenProviderV2Params", "DeepgramParams", "DeleteProjectInviteV1ResponseParams", @@ -505,7 +502,6 @@ def __dir__(): "ListProjectsV1ResponseParams", "ListProjectsV1ResponseProjectsItemParams", "ListenV1AcceptedResponseParams", - "ListenV1ResponseMetadataDiarizeInfoParams", "ListenV1ResponseMetadataIntentsInfoParams", "ListenV1ResponseMetadataParams", "ListenV1ResponseMetadataSentimentInfoParams", @@ -591,7 +587,4 @@ def __dir__(): "UsageFieldsV1ResponseParams", "UsageV1ResponseParams", "UsageV1ResponseResolutionParams", - "CartesiaSpeakProviderVoiceParams", - "CreateKeyV1RequestOneParams", - "DeepgramListenProviderV2LanguageHintParams", ] diff --git a/src/deepgram/requests/anthropic.py b/src/deepgram/requests/anthropic.py index c5b22f99..3b60c72d 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_model import AnthropicModel +from ..types.anthropic_think_provider_model import AnthropicThinkProviderModel class AnthropicParams(typing_extensions.TypedDict): @@ -13,7 +13,7 @@ class AnthropicParams(typing_extensions.TypedDict): The REST API version for the Anthropic Messages API """ - model: AnthropicModel + model: AnthropicThinkProviderModel """ Anthropic model to use """ diff --git a/src/deepgram/requests/cartesia.py b/src/deepgram/requests/cartesia.py index 91e7d2e1..40d34328 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_model_id import CartesiaModelId -from .cartesia_voice import CartesiaVoiceParams +from ..types.cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId +from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams 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: CartesiaModelId + model_id: CartesiaSpeakProviderModelId """ Cartesia model ID """ - voice: CartesiaVoiceParams + voice: CartesiaSpeakProviderVoiceParams 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 f6a8ea06..89929e27 100644 --- a/src/deepgram/requests/cartesia_speak_provider_voice.py +++ b/src/deepgram/requests/cartesia_speak_provider_voice.py @@ -1,5 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from .cartesia_voice import CartesiaVoiceParams +import typing_extensions -CartesiaSpeakProviderVoiceParams = CartesiaVoiceParams + +class CartesiaSpeakProviderVoiceParams(typing_extensions.TypedDict): + mode: str + """ + Cartesia voice mode + """ + + id: str + """ + Cartesia voice ID + """ diff --git a/src/deepgram/requests/cartesia_voice.py b/src/deepgram/requests/cartesia_voice.py deleted file mode 100644 index 8b066f1e..00000000 --- a/src/deepgram/requests/cartesia_voice.py +++ /dev/null @@ -1,15 +0,0 @@ -# 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 2324f818..a5ad6104 100644 --- a/src/deepgram/requests/deepgram.py +++ b/src/deepgram/requests/deepgram.py @@ -3,23 +3,19 @@ import typing import typing_extensions -from ..types.deepgram_model import DeepgramModel +from ..types.deepgram_speak_provider_model import DeepgramSpeakProviderModel 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. Flux TTS is in Early Access — the Flux TTS-specific API surface and voice catalog may change before general availability. - """ - type: typing.Literal["deepgram"] - version: typing_extensions.NotRequired[str] + version: typing_extensions.NotRequired[typing.Literal["v1"]] """ - The Deepgram text-to-speech model family. Accepted values: `v1` (Aura, the default) and `v2` (Flux TTS, Early Access). Use `v1` with an aura-* model and `v2` with a flux-* model. Defaults to `v1` when omitted. + The REST API version for the Deepgram text-to-speech API """ - model: DeepgramModel + model: DeepgramSpeakProviderModel """ - Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2, Early Access) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). + Deepgram TTS model """ speed: typing_extensions.NotRequired[float] diff --git a/src/deepgram/requests/google.py b/src/deepgram/requests/google.py index 2c2a4765..7c183372 100644 --- a/src/deepgram/requests/google.py +++ b/src/deepgram/requests/google.py @@ -3,7 +3,7 @@ import typing import typing_extensions -from ..types.google_model import GoogleModel +from ..types.google_think_provider_model import GoogleThinkProviderModel class GoogleParams(typing_extensions.TypedDict): @@ -13,7 +13,7 @@ class GoogleParams(typing_extensions.TypedDict): The REST API version for the Google generative language API """ - model: GoogleModel + model: GoogleThinkProviderModel """ Google model to use """ diff --git a/src/deepgram/requests/groq.py b/src/deepgram/requests/groq.py index 0988bb2d..2f31525f 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_reasoning_mode import GroqReasoningMode +from ..types.groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode class GroqParams(typing_extensions.TypedDict): @@ -23,7 +23,7 @@ class GroqParams(typing_extensions.TypedDict): Groq temperature (0-2) """ - reasoning_mode: typing_extensions.NotRequired[GroqReasoningMode] + reasoning_mode: typing_extensions.NotRequired[GroqThinkProviderReasoningMode] """ OpenAI reasoning_effort """ diff --git a/src/deepgram/requests/listen_v1response_metadata.py b/src/deepgram/requests/listen_v1response_metadata.py index 5dbe3f84..100cb4a1 100644 --- a/src/deepgram/requests/listen_v1response_metadata.py +++ b/src/deepgram/requests/listen_v1response_metadata.py @@ -4,7 +4,6 @@ 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 @@ -20,11 +19,6 @@ 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 deleted file mode 100644 index 7cd4abee..00000000 --- a/src/deepgram/requests/listen_v1response_metadata_diarize_info.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing_extensions -from ..types.listen_v1response_metadata_diarize_info_arch import ListenV1ResponseMetadataDiarizeInfoArch - - -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: ListenV1ResponseMetadataDiarizeInfoArch - """ - The diarizer arch - """ 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 8a02b42f..e8b15613 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,12 +8,3 @@ 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 185b1484..db3fac4e 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_model_id import CartesiaModelId -from ..types.deepgram_model import DeepgramModel +from ..types.cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId +from ..types.deepgram_speak_provider_model import DeepgramSpeakProviderModel 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_voice import CartesiaVoiceParams +from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams class SpeakSettingsV1Provider_DeepgramParams(typing_extensions.TypedDict): type: typing.Literal["deepgram"] - version: typing_extensions.NotRequired[str] - model: DeepgramModel + version: typing_extensions.NotRequired[typing.Literal["v1"]] + model: DeepgramSpeakProviderModel 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: CartesiaModelId - voice: CartesiaVoiceParams + model_id: CartesiaSpeakProviderModelId + voice: CartesiaSpeakProviderVoiceParams 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 e64b16a8..1174d0d8 100644 --- a/src/deepgram/requests/think_settings_v1provider.py +++ b/src/deepgram/requests/think_settings_v1provider.py @@ -5,10 +5,10 @@ import typing import typing_extensions -from ..types.anthropic_model import AnthropicModel +from ..types.anthropic_think_provider_model import AnthropicThinkProviderModel from ..types.aws_bedrock_think_provider_model import AwsBedrockThinkProviderModel -from ..types.google_model import GoogleModel -from ..types.groq_reasoning_mode import GroqReasoningMode +from ..types.google_think_provider_model import GoogleThinkProviderModel +from ..types.groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode 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 @@ -32,14 +32,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: AnthropicModel + model: AnthropicThinkProviderModel temperature: typing_extensions.NotRequired[float] class ThinkSettingsV1Provider_GoogleParams(typing_extensions.TypedDict): type: typing.Literal["google"] version: typing_extensions.NotRequired[typing.Literal["v1beta"]] - model: GoogleModel + model: GoogleThinkProviderModel temperature: typing_extensions.NotRequired[float] @@ -48,7 +48,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[GroqReasoningMode] + reasoning_mode: typing_extensions.NotRequired[GroqThinkProviderReasoningMode] ThinkSettingsV1ProviderParams = typing.Union[ diff --git a/src/deepgram/types/__init__.py b/src/deepgram/types/__init__.py index 39fcc665..fa49f377 100644 --- a/src/deepgram/types/__init__.py +++ b/src/deepgram/types/__init__.py @@ -19,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_model import AnthropicModel + from .anthropic_think_provider_model import AnthropicThinkProviderModel from .aws_bedrock_think_provider import AwsBedrockThinkProvider from .aws_bedrock_think_provider_credentials import AwsBedrockThinkProviderCredentials from .aws_bedrock_think_provider_credentials_type import AwsBedrockThinkProviderCredentialsType @@ -34,10 +34,11 @@ from .billing_breakdown_v1response_results_item import BillingBreakdownV1ResponseResultsItem from .billing_breakdown_v1response_results_item_grouping import BillingBreakdownV1ResponseResultsItemGrouping from .cartesia import Cartesia - from .cartesia_model_id import CartesiaModelId - from .cartesia_voice import CartesiaVoice + from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId + from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice 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 ( @@ -50,7 +51,8 @@ from .deepgram import Deepgram from .deepgram_listen_provider_v1 import DeepgramListenProviderV1 from .deepgram_listen_provider_v2 import DeepgramListenProviderV2 - from .deepgram_model import DeepgramModel + from .deepgram_listen_provider_v2language_hint import DeepgramListenProviderV2LanguageHint + from .deepgram_speak_provider_model import DeepgramSpeakProviderModel from .delete_agent_configuration_v1response import DeleteAgentConfigurationV1Response from .delete_agent_variable_v1response import DeleteAgentVariableV1Response from .delete_project_invite_v1response import DeleteProjectInviteV1Response @@ -82,10 +84,10 @@ from .get_project_request_v1response import GetProjectRequestV1Response from .get_project_v1response import GetProjectV1Response from .google import Google - from .google_model import GoogleModel + from .google_think_provider_model import GoogleThinkProviderModel from .grant_v1response import GrantV1Response from .groq import Groq - from .groq_reasoning_mode import GroqReasoningMode + from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode from .leave_project_v1response import LeaveProjectV1Response from .list_agent_configurations_v1response import ListAgentConfigurationsV1Response from .list_agent_variables_v1response import ListAgentVariablesV1Response @@ -146,8 +148,6 @@ 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_diarize_info_arch import ListenV1ResponseMetadataDiarizeInfoArch from .listen_v1response_metadata_intents_info import ListenV1ResponseMetadataIntentsInfo from .listen_v1response_metadata_sentiment_info import ListenV1ResponseMetadataSentimentInfo from .listen_v1response_metadata_summary_info import ListenV1ResponseMetadataSummaryInfo @@ -204,7 +204,6 @@ 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 @@ -289,15 +288,6 @@ 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 .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode - _dynamic_imports: typing.Dict[str, str] = { "AgentConfigurationV1": ".agent_configuration_v1", "AgentThinkModelsV1Response": ".agent_think_models_v1response", @@ -312,7 +302,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", "AwsBedrockThinkProviderCredentialsType": ".aws_bedrock_think_provider_credentials_type", @@ -327,10 +317,11 @@ "BillingBreakdownV1ResponseResultsItem": ".billing_breakdown_v1response_results_item", "BillingBreakdownV1ResponseResultsItemGrouping": ".billing_breakdown_v1response_results_item_grouping", "Cartesia": ".cartesia", - "CartesiaModelId": ".cartesia_model_id", - "CartesiaVoice": ".cartesia_voice", + "CartesiaSpeakProviderModelId": ".cartesia_speak_provider_model_id", + "CartesiaSpeakProviderVoice": ".cartesia_speak_provider_voice", "CreateAgentConfigurationV1Response": ".create_agent_configuration_v1response", "CreateKeyV1Request": ".create_key_v1request", + "CreateKeyV1RequestOne": ".create_key_v1request_one", "CreateKeyV1Response": ".create_key_v1response", "CreateProjectDistributionCredentialsV1Response": ".create_project_distribution_credentials_v1response", "CreateProjectDistributionCredentialsV1ResponseDistributionCredentials": ".create_project_distribution_credentials_v1response_distribution_credentials", @@ -339,7 +330,8 @@ "Deepgram": ".deepgram", "DeepgramListenProviderV1": ".deepgram_listen_provider_v1", "DeepgramListenProviderV2": ".deepgram_listen_provider_v2", - "DeepgramModel": ".deepgram_model", + "DeepgramListenProviderV2LanguageHint": ".deepgram_listen_provider_v2language_hint", + "DeepgramSpeakProviderModel": ".deepgram_speak_provider_model", "DeleteAgentConfigurationV1Response": ".delete_agent_configuration_v1response", "DeleteAgentVariableV1Response": ".delete_agent_variable_v1response", "DeleteProjectInviteV1Response": ".delete_project_invite_v1response", @@ -367,10 +359,10 @@ "GetProjectRequestV1Response": ".get_project_request_v1response", "GetProjectV1Response": ".get_project_v1response", "Google": ".google", - "GoogleModel": ".google_model", + "GoogleThinkProviderModel": ".google_think_provider_model", "GrantV1Response": ".grant_v1response", "Groq": ".groq", - "GroqReasoningMode": ".groq_reasoning_mode", + "GroqThinkProviderReasoningMode": ".groq_think_provider_reasoning_mode", "LeaveProjectV1Response": ".leave_project_v1response", "ListAgentConfigurationsV1Response": ".list_agent_configurations_v1response", "ListAgentVariablesV1Response": ".list_agent_variables_v1response", @@ -425,8 +417,6 @@ "ListenV1RequestFile": ".listen_v1request_file", "ListenV1Response": ".listen_v1response", "ListenV1ResponseMetadata": ".listen_v1response_metadata", - "ListenV1ResponseMetadataDiarizeInfo": ".listen_v1response_metadata_diarize_info", - "ListenV1ResponseMetadataDiarizeInfoArch": ".listen_v1response_metadata_diarize_info_arch", "ListenV1ResponseMetadataIntentsInfo": ".listen_v1response_metadata_intents_info", "ListenV1ResponseMetadataSentimentInfo": ".listen_v1response_metadata_sentiment_info", "ListenV1ResponseMetadataSummaryInfo": ".listen_v1response_metadata_summary_info", @@ -465,7 +455,6 @@ "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", @@ -544,14 +533,6 @@ "UsageFieldsV1ResponseModelsItem": ".usage_fields_v1response_models_item", "UsageV1Response": ".usage_v1response", "UsageV1ResponseResolution": ".usage_v1response_resolution", - "AnthropicThinkProviderModel": ".anthropic_think_provider_model", - "CartesiaSpeakProviderModelId": ".cartesia_speak_provider_model_id", - "CartesiaSpeakProviderVoice": ".cartesia_speak_provider_voice", - "CreateKeyV1RequestOne": ".create_key_v1request_one", - "DeepgramListenProviderV2LanguageHint": ".deepgram_listen_provider_v2language_hint", - "DeepgramSpeakProviderModel": ".deepgram_speak_provider_model", - "GoogleThinkProviderModel": ".google_think_provider_model", - "GroqThinkProviderReasoningMode": ".groq_think_provider_reasoning_mode", } @@ -590,7 +571,7 @@ def __dir__(): "AgentThinkModelsV1ResponseModelsItemZeroId", "AgentVariableV1", "Anthropic", - "AnthropicModel", + "AnthropicThinkProviderModel", "AwsBedrockThinkProvider", "AwsBedrockThinkProviderCredentials", "AwsBedrockThinkProviderCredentialsType", @@ -605,10 +586,11 @@ def __dir__(): "BillingBreakdownV1ResponseResultsItem", "BillingBreakdownV1ResponseResultsItemGrouping", "Cartesia", - "CartesiaModelId", - "CartesiaVoice", + "CartesiaSpeakProviderModelId", + "CartesiaSpeakProviderVoice", "CreateAgentConfigurationV1Response", "CreateKeyV1Request", + "CreateKeyV1RequestOne", "CreateKeyV1Response", "CreateProjectDistributionCredentialsV1Response", "CreateProjectDistributionCredentialsV1ResponseDistributionCredentials", @@ -617,7 +599,8 @@ def __dir__(): "Deepgram", "DeepgramListenProviderV1", "DeepgramListenProviderV2", - "DeepgramModel", + "DeepgramListenProviderV2LanguageHint", + "DeepgramSpeakProviderModel", "DeleteAgentConfigurationV1Response", "DeleteAgentVariableV1Response", "DeleteProjectInviteV1Response", @@ -645,10 +628,10 @@ def __dir__(): "GetProjectRequestV1Response", "GetProjectV1Response", "Google", - "GoogleModel", + "GoogleThinkProviderModel", "GrantV1Response", "Groq", - "GroqReasoningMode", + "GroqThinkProviderReasoningMode", "LeaveProjectV1Response", "ListAgentConfigurationsV1Response", "ListAgentVariablesV1Response", @@ -703,8 +686,6 @@ def __dir__(): "ListenV1RequestFile", "ListenV1Response", "ListenV1ResponseMetadata", - "ListenV1ResponseMetadataDiarizeInfo", - "ListenV1ResponseMetadataDiarizeInfoArch", "ListenV1ResponseMetadataIntentsInfo", "ListenV1ResponseMetadataSentimentInfo", "ListenV1ResponseMetadataSummaryInfo", @@ -743,7 +724,6 @@ def __dir__(): "ListenV2Model", "ListenV2Numerals", "ListenV2ProfanityFilter", - "ListenV2Redact", "ListenV2SampleRate", "ListenV2Tag", "OpenAiSpeakProvider", @@ -822,12 +802,4 @@ def __dir__(): "UsageFieldsV1ResponseModelsItem", "UsageV1Response", "UsageV1ResponseResolution", - "AnthropicThinkProviderModel", - "CartesiaSpeakProviderModelId", - "CartesiaSpeakProviderVoice", - "CreateKeyV1RequestOne", - "DeepgramListenProviderV2LanguageHint", - "DeepgramSpeakProviderModel", - "GoogleThinkProviderModel", - "GroqThinkProviderReasoningMode", ] diff --git a/src/deepgram/types/anthropic.py b/src/deepgram/types/anthropic.py index da882e5e..c972254e 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_model import AnthropicModel +from .anthropic_think_provider_model import AnthropicThinkProviderModel class Anthropic(UncheckedBaseModel): @@ -15,7 +15,7 @@ class Anthropic(UncheckedBaseModel): The REST API version for the Anthropic Messages API """ - model: AnthropicModel = pydantic.Field() + model: AnthropicThinkProviderModel = pydantic.Field() """ Anthropic model to use """ diff --git a/src/deepgram/types/anthropic_model.py b/src/deepgram/types/anthropic_model.py deleted file mode 100644 index 452790d0..00000000 --- a/src/deepgram/types/anthropic_model.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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 09284c12..7c78238f 100644 --- a/src/deepgram/types/anthropic_think_provider_model.py +++ b/src/deepgram/types/anthropic_think_provider_model.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from .anthropic_model import AnthropicModel +import typing -AnthropicThinkProviderModel = AnthropicModel +AnthropicThinkProviderModel = typing.Union[ + typing.Literal["claude-3-5-haiku-latest", "claude-sonnet-4-20250514"], typing.Any +] diff --git a/src/deepgram/types/cartesia.py b/src/deepgram/types/cartesia.py index 32378e58..5ec0b4d4 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_model_id import CartesiaModelId -from .cartesia_voice import CartesiaVoice +from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId +from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice class Cartesia(UncheckedBaseModel): @@ -16,12 +16,12 @@ class Cartesia(UncheckedBaseModel): The API version header for the Cartesia text-to-speech API """ - model_id: CartesiaModelId = pydantic.Field() + model_id: CartesiaSpeakProviderModelId = pydantic.Field() """ Cartesia model ID """ - voice: CartesiaVoice + voice: CartesiaSpeakProviderVoice 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 deleted file mode 100644 index ae408ec6..00000000 --- a/src/deepgram/types/cartesia_model_id.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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 6b3cad74..f8a9d7e9 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. -from .cartesia_model_id import CartesiaModelId +import typing -CartesiaSpeakProviderModelId = CartesiaModelId +CartesiaSpeakProviderModelId = typing.Union[typing.Literal["sonic-2", "sonic-multilingual"], typing.Any] diff --git a/src/deepgram/types/cartesia_speak_provider_voice.py b/src/deepgram/types/cartesia_speak_provider_voice.py index 952f4182..cfc897e7 100644 --- a/src/deepgram/types/cartesia_speak_provider_voice.py +++ b/src/deepgram/types/cartesia_speak_provider_voice.py @@ -1,5 +1,28 @@ # This file was auto-generated by Fern from our API Definition. -from .cartesia_voice import CartesiaVoice +import typing -CartesiaSpeakProviderVoice = 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 diff --git a/src/deepgram/types/cartesia_voice.py b/src/deepgram/types/cartesia_voice.py deleted file mode 100644 index 9805e3da..00000000 --- a/src/deepgram/types/cartesia_voice.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 5fdceebc..88579177 100644 --- a/src/deepgram/types/deepgram.py +++ b/src/deepgram/types/deepgram.py @@ -5,23 +5,19 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .deepgram_model import DeepgramModel +from .deepgram_speak_provider_model import DeepgramSpeakProviderModel class Deepgram(UncheckedBaseModel): - """ - Deepgram text-to-speech provider. Aura models use version v1 (default); Flux TTS uses version v2 and a flux-* model. Flux TTS is in Early Access — the Flux TTS-specific API surface and voice catalog may change before general availability. - """ - type: typing.Literal["deepgram"] = "deepgram" - version: typing.Optional[str] = pydantic.Field(default=None) + version: typing.Optional[typing.Literal["v1"]] = pydantic.Field(default=None) """ - The Deepgram text-to-speech model family. Accepted values: `v1` (Aura, the default) and `v2` (Flux TTS, Early Access). Use `v1` with an aura-* model and `v2` with a flux-* model. Defaults to `v1` when omitted. + The REST API version for the Deepgram text-to-speech API """ - model: DeepgramModel = pydantic.Field() + model: DeepgramSpeakProviderModel = pydantic.Field() """ - Deepgram TTS model. Aura models (version v1) use the aura-* voices; Flux TTS (version v2, Early Access) uses the flux-{voice}-{language} voices (e.g. flux-alexis-en). + Deepgram TTS model """ speed: typing.Optional[float] = pydantic.Field(default=None) diff --git a/src/deepgram/types/deepgram_model.py b/src/deepgram/types/deepgram_model.py deleted file mode 100644 index ad2d8f26..00000000 --- a/src/deepgram/types/deepgram_model.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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-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, -] diff --git a/src/deepgram/types/deepgram_speak_provider_model.py b/src/deepgram/types/deepgram_speak_provider_model.py index ed9646f8..72bcae5c 100644 --- a/src/deepgram/types/deepgram_speak_provider_model.py +++ b/src/deepgram/types/deepgram_speak_provider_model.py @@ -1,5 +1,72 @@ # This file was auto-generated by Fern from our API Definition. -from .deepgram_model import DeepgramModel +import typing -DeepgramSpeakProviderModel = 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", + ], + typing.Any, +] diff --git a/src/deepgram/types/google.py b/src/deepgram/types/google.py index b3d34a1b..56e86997 100644 --- a/src/deepgram/types/google.py +++ b/src/deepgram/types/google.py @@ -5,7 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel -from .google_model import GoogleModel +from .google_think_provider_model import GoogleThinkProviderModel class Google(UncheckedBaseModel): @@ -15,7 +15,7 @@ class Google(UncheckedBaseModel): The REST API version for the Google generative language API """ - model: GoogleModel = pydantic.Field() + model: GoogleThinkProviderModel = pydantic.Field() """ Google model to use """ diff --git a/src/deepgram/types/google_model.py b/src/deepgram/types/google_model.py deleted file mode 100644 index 71a004d7..00000000 --- a/src/deepgram/types/google_model.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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 74527b1f..a6061bac 100644 --- a/src/deepgram/types/google_think_provider_model.py +++ b/src/deepgram/types/google_think_provider_model.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from .google_model import GoogleModel +import typing -GoogleThinkProviderModel = GoogleModel +GoogleThinkProviderModel = 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/groq.py b/src/deepgram/types/groq.py index 53664f46..fa0350e7 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_reasoning_mode import GroqReasoningMode +from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode class Groq(UncheckedBaseModel): @@ -25,7 +25,7 @@ class Groq(UncheckedBaseModel): Groq temperature (0-2) """ - reasoning_mode: typing.Optional[GroqReasoningMode] = pydantic.Field(default=None) + reasoning_mode: typing.Optional[GroqThinkProviderReasoningMode] = 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 deleted file mode 100644 index 7742b9f7..00000000 --- a/src/deepgram/types/groq_reasoning_mode.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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 005dd23d..2a5b1e8c 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. -from .groq_reasoning_mode import GroqReasoningMode +import typing -GroqThinkProviderReasoningMode = GroqReasoningMode +GroqThinkProviderReasoningMode = typing.Union[typing.Literal["none", "minimal", "low", "medium", "high"], typing.Any] diff --git a/src/deepgram/types/listen_v1keyterm.py b/src/deepgram/types/listen_v1keyterm.py index 85e7d587..67bd49f0 100644 --- a/src/deepgram/types/listen_v1keyterm.py +++ b/src/deepgram/types/listen_v1keyterm.py @@ -4,9 +4,5 @@ ListenV1Keyterm = typing.Any """ -Key term prompting improves recognition of specialized terminology and brands. Only compatible with Nova-3. - -`keyterm` accepts plain terms only. Unlike the legacy `keywords` feature, it does not support weights or intensifiers. Appending one (for example, `keyterm=term:0.15`) is not rejected—the weight is silently ignored and the entire value is treated as a literal keyterm. - -To boost multiple separate keyterms, repeat the `keyterm` parameter (for example, `keyterm=term1&keyterm=term2`). To boost one multi-word phrase as a single keyterm, join the words with `%20` or `+` (for example, `keyterm=customer%20service`). Do not separate keyterms with commas, semicolons, or line breaks. +Key term prompting can boost specialized terminology and brands. Only compatible with Nova-3 """ diff --git a/src/deepgram/types/listen_v1response_metadata.py b/src/deepgram/types/listen_v1response_metadata.py index 055c02ba..974a9ecc 100644 --- a/src/deepgram/types/listen_v1response_metadata.py +++ b/src/deepgram/types/listen_v1response_metadata.py @@ -6,7 +6,6 @@ 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 @@ -22,11 +21,6 @@ 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 deleted file mode 100644 index 99c09148..00000000 --- a/src/deepgram/types/listen_v1response_metadata_diarize_info.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 -from .listen_v1response_metadata_diarize_info_arch import ListenV1ResponseMetadataDiarizeInfoArch - - -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: ListenV1ResponseMetadataDiarizeInfoArch = pydantic.Field() - """ - The diarizer arch - """ - - 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_metadata_diarize_info_arch.py b/src/deepgram/types/listen_v1response_metadata_diarize_info_arch.py deleted file mode 100644 index e07b4241..00000000 --- a/src/deepgram/types/listen_v1response_metadata_diarize_info_arch.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ListenV1ResponseMetadataDiarizeInfoArch = typing.Union[typing.Literal["v1", "v2"], typing.Any] 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 2038fbce..c2b63fa5 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,15 +12,6 @@ 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 09fdb458..c774974d 100644 --- a/src/deepgram/types/listen_v2eot_threshold.py +++ b/src/deepgram/types/listen_v2eot_threshold.py @@ -5,6 +5,5 @@ ListenV2EotThreshold = typing.Any """ End-of-turn confidence required to finish a turn. Valid Values 0.5 - -1.0. Set to 1.0 to fully suppress natural end-of-turn detection and -drive turn endings yourself with the `ForceEndTurn` message. +0.9. """ diff --git a/src/deepgram/types/listen_v2eot_timeout_ms.py b/src/deepgram/types/listen_v2eot_timeout_ms.py index e47d48ad..9f4c05c0 100644 --- a/src/deepgram/types/listen_v2eot_timeout_ms.py +++ b/src/deepgram/types/listen_v2eot_timeout_ms.py @@ -5,5 +5,5 @@ ListenV2EotTimeoutMs = typing.Any """ A turn will be finished when this much time has passed after speech, -regardless of EOT confidence. Valid Values 500 - 60000. +regardless of EOT confidence. """ diff --git a/src/deepgram/types/listen_v2redact.py b/src/deepgram/types/listen_v2redact.py deleted file mode 100644 index 5484d329..00000000 --- a/src/deepgram/types/listen_v2redact.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -ListenV2Redact = typing.Union[typing.Literal["numbers", "aggressive_numbers"], typing.Any] diff --git a/src/deepgram/types/speak_settings_v1provider.py b/src/deepgram/types/speak_settings_v1provider.py index b8c3bdf6..409122ed 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_model_id import CartesiaModelId -from .cartesia_voice import CartesiaVoice -from .deepgram_model import DeepgramModel +from .cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId +from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoice +from .deepgram_speak_provider_model import DeepgramSpeakProviderModel 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 @@ -21,8 +21,8 @@ class SpeakSettingsV1Provider_Deepgram(UncheckedBaseModel): type: typing.Literal["deepgram"] = "deepgram" - version: typing.Optional[str] = None - model: DeepgramModel + version: typing.Optional[typing.Literal["v1"]] = None + model: DeepgramSpeakProviderModel 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: CartesiaModelId - voice: CartesiaVoice + model_id: CartesiaSpeakProviderModelId + voice: CartesiaSpeakProviderVoice language: typing.Optional[str] = None volume: typing.Optional[float] = None diff --git a/src/deepgram/types/think_settings_v1provider.py b/src/deepgram/types/think_settings_v1provider.py index e937112c..756dc5ab 100644 --- a/src/deepgram/types/think_settings_v1provider.py +++ b/src/deepgram/types/think_settings_v1provider.py @@ -8,11 +8,11 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel, UnionMetadata -from .anthropic_model import AnthropicModel +from .anthropic_think_provider_model import AnthropicThinkProviderModel from .aws_bedrock_think_provider_credentials import AwsBedrockThinkProviderCredentials from .aws_bedrock_think_provider_model import AwsBedrockThinkProviderModel -from .google_model import GoogleModel -from .groq_reasoning_mode import GroqReasoningMode +from .google_think_provider_model import GoogleThinkProviderModel +from .groq_think_provider_reasoning_mode import GroqThinkProviderReasoningMode from .open_ai_think_provider_model import OpenAiThinkProviderModel from .open_ai_think_provider_reasoning_mode import OpenAiThinkProviderReasoningMode @@ -53,7 +53,7 @@ class Config: class ThinkSettingsV1Provider_Anthropic(UncheckedBaseModel): type: typing.Literal["anthropic"] = "anthropic" version: typing.Optional[typing.Literal["v1"]] = None - model: AnthropicModel + model: AnthropicThinkProviderModel temperature: typing.Optional[float] = None if IS_PYDANTIC_V2: @@ -69,7 +69,7 @@ class Config: class ThinkSettingsV1Provider_Google(UncheckedBaseModel): type: typing.Literal["google"] = "google" version: typing.Optional[typing.Literal["v1beta"]] = None - model: GoogleModel + model: GoogleThinkProviderModel temperature: typing.Optional[float] = None if IS_PYDANTIC_V2: @@ -87,7 +87,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[GroqReasoningMode] = None + reasoning_mode: typing.Optional[GroqThinkProviderReasoningMode] = 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/utils/test_http_client.py b/tests/utils/test_http_client.py index 8a8f2387..9bcc5235 100644 --- a/tests/utils/test_http_client.py +++ b/tests/utils/test_http_client.py @@ -1,6 +1,6 @@ # This file was auto-generated by Fern from our API Definition. -from typing import Any, Dict, Tuple, cast +from typing import Any, Dict from unittest.mock import AsyncMock, MagicMock, patch import httpx @@ -692,70 +692,3 @@ def test_should_not_retry_non_retryable_status_codes(status_code: int) -> None: def test_should_retry_599_upper_boundary() -> None: """Legacy mode retries on >= 500, which includes 599.""" assert _should_retry(_make_response(599)) is True - - -# --------------------------------------------------------------------------- -# RequestOptions timeout resolution tests (timeout / deprecated timeout_in_seconds) -# --------------------------------------------------------------------------- - - -def _sync_client_with_base_timeout(base_timeout: Any) -> Tuple[HttpClient, _DummySyncClient]: - dummy_client = _DummySyncClient() - http_client = HttpClient( - httpx_client=dummy_client, # type: ignore[arg-type] - base_timeout=lambda: base_timeout, - base_headers=lambda: {}, - base_url=lambda: "https://example.com", - ) - return http_client, dummy_client - - -def test_sync_request_options_timeout_used() -> None: - """The new `timeout` request option is passed through to httpx (in seconds).""" - http_client, dummy_client = _sync_client_with_base_timeout(60) - http_client.request(path="/test", method="GET", request_options={"timeout": 30}) - assert dummy_client.last_request_kwargs["timeout"] == 30 - - -def test_sync_request_options_timeout_in_seconds_still_works() -> None: - """The deprecated `timeout_in_seconds` request option remains backwards compatible.""" - http_client, dummy_client = _sync_client_with_base_timeout(60) - http_client.request(path="/test", method="GET", request_options={"timeout_in_seconds": 45}) - assert dummy_client.last_request_kwargs["timeout"] == 45 - - -def test_sync_request_options_timeout_takes_precedence() -> None: - """When both are set, `timeout` wins over `timeout_in_seconds` (same seconds unit).""" - http_client, dummy_client = _sync_client_with_base_timeout(60) - http_client.request(path="/test", method="GET", request_options={"timeout": 30, "timeout_in_seconds": 45}) - assert dummy_client.last_request_kwargs["timeout"] == 30 - - -def test_sync_request_options_timeout_falls_back_to_base() -> None: - """When neither key is set, the client-level base timeout is used.""" - http_client, dummy_client = _sync_client_with_base_timeout(60) - http_client.request(path="/test", method="GET", request_options=None) - assert dummy_client.last_request_kwargs["timeout"] == 60 - - -def test_sync_request_options_timeout_none_falls_back_to_deprecated() -> None: - """An explicit `timeout=None` (dynamic caller) falls back to the deprecated `timeout_in_seconds`.""" - http_client, dummy_client = _sync_client_with_base_timeout(60) - request_options = cast(RequestOptions, {"timeout": None, "timeout_in_seconds": 45}) - http_client.request(path="/test", method="GET", request_options=request_options) - assert dummy_client.last_request_kwargs["timeout"] == 45 - - -@pytest.mark.asyncio -async def test_async_request_options_timeout_takes_precedence() -> None: - """Async: `timeout` wins over the deprecated `timeout_in_seconds`.""" - dummy_client = _DummyAsyncClient() - http_client = AsyncHttpClient( - httpx_client=dummy_client, # type: ignore[arg-type] - base_timeout=lambda: 60, - base_headers=lambda: {}, - base_url=lambda: "https://example.com", - async_base_headers=None, - ) - await http_client.request(path="/test", method="GET", request_options={"timeout": 30, "timeout_in_seconds": 45}) - assert dummy_client.last_request_kwargs["timeout"] == 30 diff --git a/tests/wire/test_listen_v1_media.py b/tests/wire/test_listen_v1_media.py index e4264985..6150ace0 100644 --- a/tests/wire/test_listen_v1_media.py +++ b/tests/wire/test_listen_v1_media.py @@ -6,6 +6,87 @@ def test_listen_v1_media_transcribe_url() -> None: test_id = "listen.v1.media.transcribe_url.0" client = get_client(test_id) 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", ) - verify_request_count(test_id, "POST", "/v1/listen", None, 1) + verify_request_count( + test_id, + "POST", + "/v1/listen", + { + "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", + }, + 1, + ) diff --git a/tests/wire/test_manage_v1_projects_requests.py b/tests/wire/test_manage_v1_projects_requests.py index 71a888c7..fd361042 100644 --- a/tests/wire/test_manage_v1_projects_requests.py +++ b/tests/wire/test_manage_v1_projects_requests.py @@ -1,3 +1,5 @@ +import datetime + from .conftest import get_client, verify_request_count @@ -6,9 +8,36 @@ def test_manage_v1_projects_requests_list_() -> None: test_id = "manage.v1.projects.requests.list_.0" client = get_client(test_id) client.manage.v1.projects.requests.list( - project_id="12345678-90ab-cdef-1234-567890abcdef", + project_id="123456-7890-1234-5678-901234", + start=datetime.datetime.fromisoformat("2024-01-15T09:30:00+00:00"), + end=datetime.datetime.fromisoformat("2024-01-15T09:30:00+00:00"), + limit=1.1, + page=1.1, + accessor="12345678-1234-1234-1234-123456789012", + request_id="12345678-1234-1234-1234-123456789012", + deployment="hosted", + endpoint="listen", + method="sync", + status="succeeded", + ) + verify_request_count( + test_id, + "GET", + "/v1/projects/123456-7890-1234-5678-901234/requests", + { + "start": "2024-01-15T09:30:00Z", + "end": "2024-01-15T09:30:00Z", + "limit": "1.1", + "page": "1.1", + "accessor": "12345678-1234-1234-1234-123456789012", + "request_id": "12345678-1234-1234-1234-123456789012", + "deployment": "hosted", + "endpoint": "listen", + "method": "sync", + "status": "succeeded", + }, + 1, ) - verify_request_count(test_id, "GET", "/v1/projects/12345678-90ab-cdef-1234-567890abcdef/requests", None, 1) def test_manage_v1_projects_requests_get() -> None: @@ -16,13 +45,9 @@ def test_manage_v1_projects_requests_get() -> None: test_id = "manage.v1.projects.requests.get.0" client = get_client(test_id) client.manage.v1.projects.requests.get( - project_id="12345678-90ab-cdef-1234-567890abcdef", - request_id="a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d", + project_id="123456-7890-1234-5678-901234", + request_id="123456-7890-1234-5678-901234", ) verify_request_count( - test_id, - "GET", - "/v1/projects/12345678-90ab-cdef-1234-567890abcdef/requests/a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d", - None, - 1, + test_id, "GET", "/v1/projects/123456-7890-1234-5678-901234/requests/123456-7890-1234-5678-901234", None, 1 ) diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json index 535982ea..67ae5cc3 100644 --- a/wiremock/wiremock-mappings.json +++ b/wiremock/wiremock-mappings.json @@ -59,8 +59,8 @@ } }, { - "id": "6b897d7e-00ca-4224-9ffb-f7936c81ddfc", - "name": "Transcribe and analyze pre-recorded audio and video - Remote File", + "id": "49d8d51a-7f01-4598-804f-b6f54cdc22da", + "name": "Transcribe and analyze pre-recorded audio and video - default", "request": { "urlPathTemplate": "/v1/listen", "method": "POST", @@ -68,16 +68,133 @@ "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: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 },\n {\n \"word\": \"as\",\n \"start\": 0.32,\n \"end\": 0.48,\n \"confidence\": 0.9862061\n }\n ]\n }\n ]\n }\n ]\n }\n}", + "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}", "headers": { "Content-Type": "application/json" } }, - "uuid": "6b897d7e-00ca-4224-9ffb-f7936c81ddfc", + "uuid": "49d8d51a-7f01-4598-804f-b6f54cdc22da", "persistent": true, "priority": 3, "metadata": { @@ -657,8 +774,8 @@ } }, { - "id": "1aa49f93-05d3-41e6-a9b6-b87abe58f653", - "name": "List Project Requests - List Project Requests", + "id": "d6a14959-05fa-4aec-9f0c-ba2a817c66e5", + "name": "List Project Requests - default", "request": { "urlPathTemplate": "/v1/projects/{project_id}/requests", "method": "GET", @@ -669,18 +786,50 @@ }, "pathParameters": { "project_id": { - "equalTo": "12345678-90ab-cdef-1234-567890abcdef" + "equalTo": "123456-7890-1234-5678-901234" + } + }, + "queryParameters": { + "start": { + "equalTo": "2024-01-15T09:30:00Z" + }, + "end": { + "equalTo": "2024-01-15T09:30:00Z" + }, + "limit": { + "equalTo": "1.1" + }, + "page": { + "equalTo": "1.1" + }, + "accessor": { + "equalTo": "12345678-1234-1234-1234-123456789012" + }, + "request_id": { + "equalTo": "12345678-1234-1234-1234-123456789012" + }, + "deployment": { + "equalTo": "hosted" + }, + "endpoint": { + "equalTo": "listen" + }, + "method": { + "equalTo": "sync" + }, + "status": { + "equalTo": "succeeded" } } }, "response": { "status": 200, - "body": "{\n \"page\": 0,\n \"limit\": 10,\n \"requests\": [\n {\n \"request_id\": \"a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d\",\n \"project_uuid\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"created\": \"2024-01-15T09:48:20.000Z\",\n \"path\": \"/v1/listen?\",\n \"api_key_id\": \"b1e2c3d4-5678-90ab-cdef-1234567890ab\",\n \"response\": {\n \"details\": {\n \"usd\": 0.0075,\n \"duration\": 30,\n \"total_audio\": 30,\n \"channels\": 1,\n \"streams\": 1,\n \"tier\": \"base\",\n \"metadata\": {},\n \"models\": [\n \"1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d\"\n ],\n \"method\": \"sync\",\n \"tags\": [],\n \"features\": [],\n \"config\": {}\n },\n \"token_details\": [],\n \"code\": 200,\n \"completed\": \"2024-01-15T09:48:21.000Z\",\n \"deployment\": \"hosted:us\"\n },\n \"callback\": null\n }\n ]\n}", + "body": "{\n \"page\": 1.1,\n \"limit\": 1.1,\n \"requests\": [\n {\n \"request_id\": \"request_id\",\n \"project_uuid\": \"project_uuid\",\n \"created\": \"2024-01-15T09:30:00Z\",\n \"path\": \"path\",\n \"api_key_id\": \"api_key_id\",\n \"response\": {\n \"key\": \"value\"\n },\n \"code\": 1.1,\n \"deployment\": \"deployment\",\n \"callback\": \"callback\"\n }\n ]\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "1aa49f93-05d3-41e6-a9b6-b87abe58f653", + "uuid": "d6a14959-05fa-4aec-9f0c-ba2a817c66e5", "persistent": true, "priority": 3, "metadata": { @@ -693,8 +842,8 @@ } }, { - "id": "0c5ca54d-c4a7-42fd-b595-b0c6d34b82f9", - "name": "Get a Project Request - Get a Project Request", + "id": "733e39aa-d3ef-4ea7-8062-af080c6288c4", + "name": "Get a Project Request - default", "request": { "urlPathTemplate": "/v1/projects/{project_id}/requests/{request_id}", "method": "GET", @@ -705,21 +854,21 @@ }, "pathParameters": { "project_id": { - "equalTo": "12345678-90ab-cdef-1234-567890abcdef" + "equalTo": "123456-7890-1234-5678-901234" }, "request_id": { - "equalTo": "a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d" + "equalTo": "123456-7890-1234-5678-901234" } } }, "response": { "status": 200, - "body": "{\n \"request\": {\n \"request_id\": \"a3f1c9d2-4b7e-4f9a-8c3d-2e5f7b9a1c0d\",\n \"project_uuid\": \"12345678-90ab-cdef-1234-567890abcdef\",\n \"created\": \"2024-01-15T09:48:20.000Z\",\n \"path\": \"/v1/listen?\",\n \"api_key_id\": \"b1e2c3d4-5678-90ab-cdef-1234567890ab\",\n \"response\": {\n \"details\": {\n \"usd\": 0.0075,\n \"duration\": 30,\n \"total_audio\": 30,\n \"channels\": 1,\n \"streams\": 1,\n \"tier\": \"base\",\n \"metadata\": {},\n \"models\": [\n \"1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d\"\n ],\n \"method\": \"sync\",\n \"tags\": [],\n \"features\": [],\n \"config\": {}\n },\n \"token_details\": [],\n \"code\": 200,\n \"completed\": \"2024-01-15T09:48:21.000Z\",\n \"deployment\": \"hosted:us\"\n },\n \"callback\": null\n }\n}", + "body": "{\n \"request\": {\n \"request_id\": \"request_id\",\n \"project_uuid\": \"project_uuid\",\n \"created\": \"2024-01-15T09:30:00Z\",\n \"path\": \"path\",\n \"api_key_id\": \"api_key_id\",\n \"response\": {\n \"key\": \"value\"\n },\n \"code\": 1.1,\n \"deployment\": \"deployment\",\n \"callback\": \"callback\"\n }\n}", "headers": { "Content-Type": "application/json" } }, - "uuid": "0c5ca54d-c4a7-42fd-b595-b0c6d34b82f9", + "uuid": "733e39aa-d3ef-4ea7-8062-af080c6288c4", "persistent": true, "priority": 3, "metadata": {