Skip to content

Commit d418799

Browse files
committed
revert accidental change to blob.py
1 parent 237c134 commit d418799

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
@@ -816,23 +816,21 @@ def audio_transcribe(
816816

817817
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."
818818

819-
# Use bbq.ai.generate() to transcribe audio
819+
# Convert the audio series to the runtime representation required by the model.
820+
audio_runtime = audio_series.blob._get_runtime("R", with_metadata=True)
821+
820822
transcribed_results = bbq.ai.generate(
821-
prompt=(prompt_text, audio_series),
823+
prompt=(prompt_text, audio_runtime),
822824
connection_id=connection,
823825
endpoint=model_name,
824-
request_type="unspecified",
826+
model_params={"generationConfig": {"temperature": 0.0}},
825827
)
826828

827-
transcribed_content_series = transcribed_results.struct.field("result").rename(
828-
"transcribed_content"
829-
)
830829
transcribed_content_series = transcribed_results.struct.field("result").rename(
831830
"transcribed_content"
832831
)
833832

834833
if verbose:
835-
transcribed_status_series = transcribed_results.struct.field("status")
836834
transcribed_status_series = transcribed_results.struct.field("status")
837835
results_df = bpd.DataFrame(
838836
{

0 commit comments

Comments
 (0)