Skip to content

Commit 9276c56

Browse files
committed
convert the input data type
1 parent 5ee3a21 commit 9276c56

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

bigframes/operations/blob.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,15 @@ def audio_transcribe(
811811

812812
prompt_text = "**Task:** Transcribe the provided audio. **Instructions:** - Your response must contain only the verbatim transcription of the audio. - Do not include any introductory text, summaries, or conversational filler in your response. The output should begin directly with the first word of the audio."
813813

814-
# Use bbq.ai.generate() to transcribe audio
814+
# Convert the audio series to the runtime representation required by the model.
815+
audio_runtime = audio_series.blob._get_runtime("R", with_metadata=True)
816+
815817
transcribed_results = bbq.ai.generate(
816-
prompt=(prompt_text, audio_series),
818+
prompt=(prompt_text, audio_runtime),
817819
connection_id=connection,
818820
endpoint=model_name,
819821
request_type="unspecified",
822+
model_params={"generationConfig": {"temperature": 0.0}},
820823
)
821824

822825
transcribed_content_series = transcribed_results.struct.field("result").rename(

tests/system/large/blob/test_function.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ def test_blob_transcribe(
424424
)
425425
.to_pandas()
426426
)
427-
print(actual)
428427

429428
# check relative length
430429
expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"

0 commit comments

Comments
 (0)