From bef59e36ea47df73ded1ecd5896da4d62f23c1dc Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:52:21 +0100 Subject: [PATCH 01/10] fix(spec, sdk): remove references of Claude 1 and Basic models (#7201) GitOrigin-RevId: ad669bfbc9b07a31d10cde02894e2b65010e4403 --- .github/workflows/test.yml | 1 + assemblyai/__version__.py | 2 +- assemblyai/types.py | 97 ++------------------------- tests/unit/test_sentiment_analysis.py | 30 --------- 4 files changed, 8 insertions(+), 122 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48f696f..1f4a614 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,7 @@ jobs: - "3.11" - "3.10" - "3.9" + - "3.8" os: - ubuntu-22.04 steps: diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index da7ed90..d9f2629 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.40.0" +__version__ = "0.36.0" diff --git a/assemblyai/types.py b/assemblyai/types.py index 51177bf..1fb9c3c 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -1,16 +1,6 @@ from datetime import datetime from enum import Enum, EnumMeta -from typing import ( - TYPE_CHECKING, - Annotated, - Any, - Dict, - List, - Optional, - Sequence, - Tuple, - Union, -) +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union from urllib.parse import parse_qs, urlparse from warnings import warn @@ -19,13 +9,13 @@ try: # pydantic v2 import - from pydantic import UUID4, BaseModel, ConfigDict, Field, field_validator + from pydantic import UUID4, BaseModel, ConfigDict, Field from pydantic_settings import BaseSettings, SettingsConfigDict pydantic_v2 = True except ImportError: # pydantic v1 import - from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field, validator + from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field pydantic_v2 = False @@ -482,9 +472,6 @@ class SpeechModel(str, Enum): nano = "nano" "A lightweight, lower cost model for a wide range of languages." - slam_1 = "slam-1" - "A Speech Language Model optimized explicitly for speech-to-text tasks" - class RawTranscriptionConfig(BaseModel): language_code: Optional[Union[str, LanguageCode]] = None @@ -597,13 +584,6 @@ class RawTranscriptionConfig(BaseModel): """ The speech model to use for the transcription. """ - - prompt: Optional[str] = None - "The prompt used to generate the transcript with the Slam-1 speech model. Can't be used together with `keyterms_prompt`." - - keyterms_prompt: Optional[List[str]] = None - "The list of key terms used to generate the transcript with the Slam-1 speech model. Can't be used together with `prompt`." - model_config = ConfigDict(extra="allow") @@ -647,8 +627,6 @@ def __init__( speech_threshold: Optional[float] = None, raw_transcription_config: Optional[RawTranscriptionConfig] = None, speech_model: Optional[SpeechModel] = None, - prompt: Optional[str] = None, - keyterms_prompt: Optional[List[str]] = None, ) -> None: """ Args: @@ -737,8 +715,6 @@ def __init__( self.language_confidence_threshold = language_confidence_threshold self.speech_threshold = speech_threshold self.speech_model = speech_model - self.prompt = prompt - self.keyterms_prompt = keyterms_prompt @property def raw(self) -> RawTranscriptionConfig: @@ -767,26 +743,6 @@ def speech_model(self, speech_model: Optional[SpeechModel]) -> None: "Sets the speech model to use for the transcription." self._raw_transcription_config.speech_model = speech_model - @property - def prompt(self) -> Optional[str]: - "The prompt to use for the transcription." - return self._raw_transcription_config.prompt - - @prompt.setter - def prompt(self, prompt: Optional[str]) -> None: - "Sets the prompt to use for the transcription." - self._raw_transcription_config.prompt = prompt - - @property - def keyterms_prompt(self) -> Optional[List[str]]: - "The keyterms_prompt to use for the transcription." - return self._raw_transcription_config.keyterms_prompt - - @keyterms_prompt.setter - def keyterms_prompt(self, keyterms_prompt: Optional[List[str]]) -> None: - "Sets the prompt to use for the transcription." - self._raw_transcription_config.keyterms_prompt = keyterms_prompt - @property def punctuate(self) -> Optional[bool]: "Returns the status of the Automatic Punctuation feature." @@ -1468,19 +1424,6 @@ class Word(BaseModel): speaker: Optional[str] = None channel: Optional[str] = None - # This is a workaround to address an issue where sentiment_analysis_results - # may return contains sentiments where `start` is null. - if pydantic_v2: - - @field_validator("start", mode="before") - def set_start_default(cls, v): - return 0 if v is None else v - else: - - @validator("start", pre=True) - def set_start_default(cls, v): - return 0 if v is None else v - class UtteranceWord(Word): channel: Optional[str] = None @@ -1762,12 +1705,6 @@ class BaseTranscript(BaseModel): speech_model: Optional[SpeechModel] = None "The speech model to use for the transcription." - prompt: Optional[str] = None - "The prompt used to generate the transcript with the Slam-1 speech model. Can't be used together with `keyterms_prompt`." - - keyterms_prompt: Optional[List[str]] = None - "The list of key terms used to generate the transcript with the Slam-1 speech model. Can't be used together with `prompt`." - class TranscriptRequest(BaseTranscript): """ @@ -1833,12 +1770,6 @@ class TranscriptResponse(BaseTranscript): speech_model: Optional[SpeechModel] = None "The speech model used for the transcription" - prompt: Optional[str] = None - "When Slam-1 is enabled, the prompt used to generate the transcript" - - keyterms_prompt: Optional[List[str]] = None - "When Slam-1 is enabled, the list of key terms used to generate the transcript" - def __init__(self, **data: Any): # cleanup the response before creating the object if not data.get("iab_categories_result") or ( @@ -1876,14 +1807,8 @@ class ListTranscriptParameters(BaseModel): status: Optional[TranscriptStatus] = None "Filter by transcript status" - throttled_only: Annotated[ - Optional[bool], - Field( - deprecated="`throttled_only` is deprecated and will be removed in a future release.", - ), - ] = None + throttled_only: Optional[bool] = None "Get only throttled transcripts, overrides the status filter" - model_config = ConfigDict(use_enum_values=True) @@ -2044,14 +1969,9 @@ class LemurModel(str, Enum): LeMUR features different model modes that allow you to configure your request to suit your needs. """ - claude3_7_sonnet_20250219 = "anthropic/claude-3-7-sonnet" - """ - Claude 3.7 Sonnet is the most intelligent model to date, providing the highest level of intelligence and capability with toggleable extended thinking. - """ - claude3_5_sonnet = "anthropic/claude-3-5-sonnet" """ - Claude 3.5 Sonnet is the previous most intelligent model to date, providing high level of intelligence and capability. + Claude 3.5 Sonnet is the most intelligent model to date, outperforming Claude 3 Opus on a wide range of evaluations, with the speed and cost of Claude 3 Sonnet. """ claude3_opus = "anthropic/claude-3-opus" @@ -2059,14 +1979,9 @@ class LemurModel(str, Enum): Claude 3 Opus is good at handling complex analysis, longer tasks with many steps, and higher-order math and coding tasks. """ - claude3_5_haiku_20241022 = "anthropic/claude-3-5-haiku" - """ - Claude 3.5 Haiku is the fastest model, providing intelligence at blazing speeds. - """ - claude3_haiku = "anthropic/claude-3-haiku" """ - Claude 3 Haiku is the fastest and most compact model for near-instant responsiveness. + Claude 3 Haiku is the fastest model that can execute lightweight actions. """ claude3_sonnet = "anthropic/claude-3-sonnet" diff --git a/tests/unit/test_sentiment_analysis.py b/tests/unit/test_sentiment_analysis.py index 2d86c01..e8fdfd9 100644 --- a/tests/unit/test_sentiment_analysis.py +++ b/tests/unit/test_sentiment_analysis.py @@ -76,33 +76,3 @@ def test_sentiment_analysis_enabled(httpx_mock: HTTPXMock): assert ( transcript_sentiment_result.speaker == response_sentiment_result["speaker"] ) - - -def test_sentiment_analysis_null_start(httpx_mock: HTTPXMock): - """ - Tests that `start` converts null values to 0. - """ - mock_response = { - "audio_url": "https://example/audio.mp3", - "status": "completed", - "sentiment_analysis_results": [ - { - "text": "hi", - "start": None, - "end": 100, - "confidence": 0.99, - "sentiment": "POSITIVE", - } - ], - } - request_body, transcript = unit_test_utils.submit_mock_transcription_request( - httpx_mock, - mock_response=mock_response, - config=aai.TranscriptionConfig(sentiment_analysis=True), - ) - - for response_sentiment_result, transcript_sentiment_result in zip( - mock_response["sentiment_analysis_results"], - transcript.sentiment_analysis, - ): - assert transcript_sentiment_result.start == 0 From 03c4a37b941d3576ad1afd65ae244fedd55342e2 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:05:21 +0100 Subject: [PATCH 02/10] fix(sdk): Bump versions for Python, Go, and Typescript (#7981) GitOrigin-RevId: 0c4b5b870ed3cb099c8f163d0acd839e6d6413a4 --- assemblyai/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index d9f2629..2d93b0c 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.36.0" +__version__ = "0.37.0" From b51e07e8da691bb51f7447094a67f00f0d926135 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Fri, 7 Mar 2025 14:15:23 +0100 Subject: [PATCH 03/10] fix(sdk): Add slam-1 to SDKs (#8712) GitOrigin-RevId: 601d38d4d831e61415895c4b402b5b1dec32c862 --- assemblyai/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assemblyai/types.py b/assemblyai/types.py index 1fb9c3c..8141ff8 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -472,6 +472,9 @@ class SpeechModel(str, Enum): nano = "nano" "A lightweight, lower cost model for a wide range of languages." + slam_1 = "slam-1" + "A Speech Language Model optimized explicitly for speech-to-text tasks" + class RawTranscriptionConfig(BaseModel): language_code: Optional[Union[str, LanguageCode]] = None From 5d053278f518853d3309b7eb6d5260e338a6f3e3 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:10:25 +0100 Subject: [PATCH 04/10] fix(sdk/python): Deprecate throttled_only (#8705) GitOrigin-RevId: 7c49c9d925bea3b81fe7f5be5749355c1bc8a051 --- assemblyai/types.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/assemblyai/types.py b/assemblyai/types.py index 8141ff8..8767201 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -1,6 +1,16 @@ from datetime import datetime from enum import Enum, EnumMeta -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union +from typing import ( + TYPE_CHECKING, + Annotated, + Any, + Dict, + List, + Optional, + Sequence, + Tuple, + Union, +) from urllib.parse import parse_qs, urlparse from warnings import warn @@ -1810,8 +1820,15 @@ class ListTranscriptParameters(BaseModel): status: Optional[TranscriptStatus] = None "Filter by transcript status" - throttled_only: Optional[bool] = None + throttled_only: Annotated[ + Optional[bool], + Field( + default=None, + deprecated="`throttled_only` is deprecated and will be removed in a future release.", + ), + ] "Get only throttled transcripts, overrides the status filter" + model_config = ConfigDict(use_enum_values=True) From 54f32aec7330886cd42af0774120c365aefd70a8 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Thu, 20 Mar 2025 16:37:01 +0100 Subject: [PATCH 05/10] chore(sdk): bump sdk versions (#9037) GitOrigin-RevId: 8b35dc2dc984b8361db7a081dea54b149238f733 --- assemblyai/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index 2d93b0c..978180b 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.37.0" +__version__ = "0.38.0" From 98e0f7afc39afde2f32791e2218ece4e047c0545 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:57:54 +0200 Subject: [PATCH 06/10] feat(sdk): add prompt and keyterms_prompt attributes to sdks (#9565) GitOrigin-RevId: e11821742e766f34b1c4e748ea5b676a3b0482b4 --- assemblyai/__version__.py | 2 +- assemblyai/types.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index 978180b..e72781a 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.38.0" +__version__ = "0.39.0" diff --git a/assemblyai/types.py b/assemblyai/types.py index 8767201..12b7462 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -1718,6 +1718,12 @@ class BaseTranscript(BaseModel): speech_model: Optional[SpeechModel] = None "The speech model to use for the transcription." + prompt: Optional[str] = None + "The prompt used to generate the transcript with the Slam-1 speech model. Can't be used together with `keyterms_prompt`." + + keyterms_prompt: Optional[List[str]] = None + "The list of key terms used to generate the transcript with the Slam-1 speech model. Can't be used together with `prompt`." + class TranscriptRequest(BaseTranscript): """ @@ -1783,6 +1789,12 @@ class TranscriptResponse(BaseTranscript): speech_model: Optional[SpeechModel] = None "The speech model used for the transcription" + prompt: Optional[str] = None + "When Slam-1 is enabled, the prompt used to generate the transcript" + + keyterms_prompt: Optional[List[str]] = None + "When Slam-1 is enabled, the list of key terms used to generate the transcript" + def __init__(self, **data: Any): # cleanup the response before creating the object if not data.get("iab_categories_result") or ( From ef78d29256350e366e4d02ed9163ab3237f991cf Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:17:10 +0200 Subject: [PATCH 07/10] feat(sdk/python): add prompt and keyterms_prompt to python sdk (#9664) GitOrigin-RevId: 095507d6772acf0adc157a1a1cd321b8ccdfdd76 --- assemblyai/__version__.py | 2 +- assemblyai/types.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index e72781a..9442842 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.39.0" +__version__ = "0.39.1" diff --git a/assemblyai/types.py b/assemblyai/types.py index 12b7462..78990b7 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -597,6 +597,13 @@ class RawTranscriptionConfig(BaseModel): """ The speech model to use for the transcription. """ + + prompt: Optional[str] = None + "The prompt used to generate the transcript with the Slam-1 speech model. Can't be used together with `keyterms_prompt`." + + keyterms_prompt: Optional[List[str]] = None + "The list of key terms used to generate the transcript with the Slam-1 speech model. Can't be used together with `prompt`." + model_config = ConfigDict(extra="allow") @@ -640,6 +647,8 @@ def __init__( speech_threshold: Optional[float] = None, raw_transcription_config: Optional[RawTranscriptionConfig] = None, speech_model: Optional[SpeechModel] = None, + prompt: Optional[str] = None, + keyterms_prompt: Optional[List[str]] = None, ) -> None: """ Args: @@ -728,6 +737,8 @@ def __init__( self.language_confidence_threshold = language_confidence_threshold self.speech_threshold = speech_threshold self.speech_model = speech_model + self.prompt = prompt + self.keyterms_prompt = keyterms_prompt @property def raw(self) -> RawTranscriptionConfig: @@ -756,6 +767,26 @@ def speech_model(self, speech_model: Optional[SpeechModel]) -> None: "Sets the speech model to use for the transcription." self._raw_transcription_config.speech_model = speech_model + @property + def prompt(self) -> Optional[str]: + "The prompt to use for the transcription." + return self._raw_transcription_config.prompt + + @prompt.setter + def prompt(self, prompt: Optional[str]) -> None: + "Sets the prompt to use for the transcription." + self._raw_transcription_config.prompt = prompt + + @property + def keyterms_prompt(self) -> Optional[List[str]]: + "The keyterms_prompt to use for the transcription." + return self._raw_transcription_config.keyterms_prompt + + @keyterms_prompt.setter + def keyterms_prompt(self, keyterms_prompt: Optional[List[str]]) -> None: + "Sets the prompt to use for the transcription." + self._raw_transcription_config.keyterms_prompt = keyterms_prompt + @property def punctuate(self) -> Optional[bool]: "Returns the status of the Automatic Punctuation feature." From 0c9d3003655ac3cacf0963f2d89fff02564433bc Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:08:18 +0200 Subject: [PATCH 08/10] fix(sdk/python): add workaround for null timestamps in sentiment_analysis_results (#9705) GitOrigin-RevId: 6c59b979d7a2dc8af883adfed733d5a87f81806f --- assemblyai/types.py | 17 +++++++++++++-- tests/unit/test_sentiment_analysis.py | 30 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/assemblyai/types.py b/assemblyai/types.py index 78990b7..f841669 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -19,13 +19,13 @@ try: # pydantic v2 import - from pydantic import UUID4, BaseModel, ConfigDict, Field + from pydantic import UUID4, BaseModel, ConfigDict, Field, field_validator from pydantic_settings import BaseSettings, SettingsConfigDict pydantic_v2 = True except ImportError: # pydantic v1 import - from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field + from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field, validator pydantic_v2 = False @@ -1468,6 +1468,19 @@ class Word(BaseModel): speaker: Optional[str] = None channel: Optional[str] = None + # This is a workaround to address an issue where sentiment_analysis_results + # may return contains sentiments where `start` is null. + if pydantic_v2: + + @field_validator("start", mode="before") + def set_start_default(cls, v): + return 0 if v is None else v + else: + + @validator("start", pre=True) + def set_start_default(cls, v): + return 0 if v is None else v + class UtteranceWord(Word): channel: Optional[str] = None diff --git a/tests/unit/test_sentiment_analysis.py b/tests/unit/test_sentiment_analysis.py index e8fdfd9..2d86c01 100644 --- a/tests/unit/test_sentiment_analysis.py +++ b/tests/unit/test_sentiment_analysis.py @@ -76,3 +76,33 @@ def test_sentiment_analysis_enabled(httpx_mock: HTTPXMock): assert ( transcript_sentiment_result.speaker == response_sentiment_result["speaker"] ) + + +def test_sentiment_analysis_null_start(httpx_mock: HTTPXMock): + """ + Tests that `start` converts null values to 0. + """ + mock_response = { + "audio_url": "https://example/audio.mp3", + "status": "completed", + "sentiment_analysis_results": [ + { + "text": "hi", + "start": None, + "end": 100, + "confidence": 0.99, + "sentiment": "POSITIVE", + } + ], + } + request_body, transcript = unit_test_utils.submit_mock_transcription_request( + httpx_mock, + mock_response=mock_response, + config=aai.TranscriptionConfig(sentiment_analysis=True), + ) + + for response_sentiment_result, transcript_sentiment_result in zip( + mock_response["sentiment_analysis_results"], + transcript.sentiment_analysis, + ): + assert transcript_sentiment_result.start == 0 From 54384196b81629513cfce12cbfc13b805c36f8c2 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:08:29 +0200 Subject: [PATCH 09/10] feat(sdk): add claude 3.7 sonnet and 3.5 haiku models (#9706) GitOrigin-RevId: 866e85200029d50183dcca75a57d1a2030f35f71 --- .github/workflows/test.yml | 1 - assemblyai/__version__.py | 2 +- assemblyai/types.py | 17 +++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f4a614..48f696f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,6 @@ jobs: - "3.11" - "3.10" - "3.9" - - "3.8" os: - ubuntu-22.04 steps: diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index 9442842..da7ed90 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.39.1" +__version__ = "0.40.0" diff --git a/assemblyai/types.py b/assemblyai/types.py index f841669..51177bf 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -1879,10 +1879,9 @@ class ListTranscriptParameters(BaseModel): throttled_only: Annotated[ Optional[bool], Field( - default=None, deprecated="`throttled_only` is deprecated and will be removed in a future release.", ), - ] + ] = None "Get only throttled transcripts, overrides the status filter" model_config = ConfigDict(use_enum_values=True) @@ -2045,9 +2044,14 @@ class LemurModel(str, Enum): LeMUR features different model modes that allow you to configure your request to suit your needs. """ + claude3_7_sonnet_20250219 = "anthropic/claude-3-7-sonnet" + """ + Claude 3.7 Sonnet is the most intelligent model to date, providing the highest level of intelligence and capability with toggleable extended thinking. + """ + claude3_5_sonnet = "anthropic/claude-3-5-sonnet" """ - Claude 3.5 Sonnet is the most intelligent model to date, outperforming Claude 3 Opus on a wide range of evaluations, with the speed and cost of Claude 3 Sonnet. + Claude 3.5 Sonnet is the previous most intelligent model to date, providing high level of intelligence and capability. """ claude3_opus = "anthropic/claude-3-opus" @@ -2055,9 +2059,14 @@ class LemurModel(str, Enum): Claude 3 Opus is good at handling complex analysis, longer tasks with many steps, and higher-order math and coding tasks. """ + claude3_5_haiku_20241022 = "anthropic/claude-3-5-haiku" + """ + Claude 3.5 Haiku is the fastest model, providing intelligence at blazing speeds. + """ + claude3_haiku = "anthropic/claude-3-haiku" """ - Claude 3 Haiku is the fastest model that can execute lightweight actions. + Claude 3 Haiku is the fastest and most compact model for near-instant responsiveness. """ claude3_sonnet = "anthropic/claude-3-sonnet" From ceb26464ae7b876ce93efaf69c7fd6f9d4bd1847 Mon Sep 17 00:00:00 2001 From: Marcus Olsson <8396880+marcusolsson@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:52:45 +0200 Subject: [PATCH 10/10] fix(sdk): fix claude model identifiers (#9712) GitOrigin-RevId: 0ebd668934bfdccdddf40bc76be1c2196897054f --- assemblyai/__version__.py | 2 +- assemblyai/types.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index da7ed90..01b570a 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "0.40.0" +__version__ = "0.40.1" diff --git a/assemblyai/types.py b/assemblyai/types.py index 51177bf..ce12ba6 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -2044,7 +2044,7 @@ class LemurModel(str, Enum): LeMUR features different model modes that allow you to configure your request to suit your needs. """ - claude3_7_sonnet_20250219 = "anthropic/claude-3-7-sonnet" + claude3_7_sonnet_20250219 = "anthropic/claude-3-7-sonnet-20250219" """ Claude 3.7 Sonnet is the most intelligent model to date, providing the highest level of intelligence and capability with toggleable extended thinking. """ @@ -2059,7 +2059,7 @@ class LemurModel(str, Enum): Claude 3 Opus is good at handling complex analysis, longer tasks with many steps, and higher-order math and coding tasks. """ - claude3_5_haiku_20241022 = "anthropic/claude-3-5-haiku" + claude3_5_haiku_20241022 = "anthropic/claude-3-5-haiku-20241022" """ Claude 3.5 Haiku is the fastest model, providing intelligence at blazing speeds. """