Skip to content

feat: add optional json_output param to support JSON response#194

Open
himynameisben wants to merge 1 commit into
souzatharsis:mainfrom
himynameisben:main
Open

feat: add optional json_output param to support JSON response#194
himynameisben wants to merge 1 commit into
souzatharsis:mainfrom
himynameisben:main

Conversation

@himynameisben

Copy link
Copy Markdown

Description

This pull request updates the generate_podcast and process_content function in client.py to include an optional parameter for returning a JSON dictionary with detailed output information. If the parameter is not used, the function retains its original behavior to ensure backward compatibility.

Changes Made

Updated the generate_podcast function to collect the paths of the transcript and audio files.
Modified the return value of the generate_podcast function to be a JSON string containing the paths to the transcript and audio files.

Example JSON Output

{
  "transcript_file": "path/to/transcript.txt",
  "audio_file": "path/to/audio.mp3"
}

Files Modified

client.py

Testing

Verified that the generate_podcast function returns the correct JSON output with the paths to the transcript and audio files.
Ensured that the function handles cases where only a transcript is generated or both transcript and audio are generated.

Please review the changes and provide feedback. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant