Skip to content

Commit 8da87a4

Browse files
committed
feat: add audio
* fix: file * fix: file * fix: file * fix: file * fix: comment * fix: comment * fix: comment * fix: audio comment * fix: audio * fix: add expor * feat: add audio * feat: add audio See merge request: !428
1 parent 00b540e commit 8da87a4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from ..._models import BaseModel
2+
3+
__all__ = ["ChatCompletionAudio"]
4+
5+
6+
class ChatCompletionAudio(BaseModel):
7+
id: str
8+
"""Unique identifier for this audio response."""
9+
10+
data: str
11+
"""
12+
Base64 encoded audio bytes generated by the model.
13+
"""
14+
15+
expires_at: int
16+
"""
17+
The Unix timestamp (in seconds) for when this audio response will no longer be
18+
accessible on the server for use in multi-turn conversations.
19+
"""
20+
21+
transcript: str
22+
"""Transcript of the audio generated by the model."""

volcenginesdkarkruntime/types/chat/chat_completion_message.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from ..._models import BaseModel
55
from .chat_completion_message_tool_call import ChatCompletionMessageToolCall
6+
from .chat_completion_audio import ChatCompletionAudio
67

78
__all__ = ["ChatCompletionMessage", "FunctionCall"]
89

@@ -36,3 +37,6 @@ class ChatCompletionMessage(BaseModel):
3637

3738
tool_calls: Optional[List[ChatCompletionMessageToolCall]] = None
3839
"""The tool calls generated by the model, such as function calls."""
40+
41+
audio: Optional[ChatCompletionAudio] = None
42+
"""Audio response from the model."""

0 commit comments

Comments
 (0)