We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb4446 commit 5e4d71eCopy full SHA for 5e4d71e
examples/04_audio_classifier_agent.py
@@ -14,12 +14,12 @@
14
15
import workflowai
16
from workflowai import Model, Run
17
-from workflowai.fields import File
+from workflowai.fields import Audio
18
19
20
class AudioInput(BaseModel):
21
"""Input containing the audio file to analyze."""
22
- audio: File = Field(
+ audio: Audio = Field(
23
description="The audio recording to analyze for spam/robocall detection",
24
)
25
@@ -108,7 +108,7 @@ async def main():
108
with open(audio_path, "rb") as f: # noqa: ASYNC230
109
audio_data = f.read()
110
111
- audio = File(
+ audio = Audio(
112
content_type="audio/mp3",
113
data=base64.b64encode(audio_data).decode(),
114
0 commit comments