Skip to content

Commit 56b7602

Browse files
committed
revert accidental change to blob.py
1 parent ca8f143 commit 56b7602

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bigframes/operations/blob.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -974,23 +974,21 @@ def audio_transcribe(
974974

975975
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."
976976

977-
# Use bbq.ai.generate() to transcribe audio
977+
# Convert the audio series to the runtime representation required by the model.
978+
audio_runtime = audio_series.blob._get_runtime("R", with_metadata=True)
979+
978980
transcribed_results = bbq.ai.generate(
979-
prompt=(prompt_text, audio_series),
981+
prompt=(prompt_text, audio_runtime),
980982
connection_id=connection,
981983
endpoint=model_name,
982-
request_type="unspecified",
984+
model_params={"generationConfig": {"temperature": 0.0}},
983985
)
984986

985-
transcribed_content_series = transcribed_results.struct.field("result").rename(
986-
"transcribed_content"
987-
)
988987
transcribed_content_series = transcribed_results.struct.field("result").rename(
989988
"transcribed_content"
990989
)
991990

992991
if verbose:
993-
transcribed_status_series = transcribed_results.struct.field("status")
994992
transcribed_status_series = transcribed_results.struct.field("status")
995993
results_df = bpd.DataFrame(
996994
{

0 commit comments

Comments
 (0)