Skip to content

chore: sync sdk code with DeepLearning repo #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assemblyai/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.38.0"
__version__ = "0.39.0"
12 changes: 12 additions & 0 deletions assemblyai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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 (
Expand Down