Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
souzatharsis committed Nov 6, 2024
1 parent 61d52d5 commit c1fd8c8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,9 @@ This sample collection is also [available at audio.com](https://audio.com/thatup

## Updates 🚀

### v0.2.3 release
- Add support for running LLMs locally
- Enable config for running podcastfy with no API KEYs
- and [more...](https://github.com/souzatharsis/podcastfy/blob/main/CHANGELOG.md#023---2024-10-15)

### v0.2.2 release
- Podcastfy is now multi-modal! Users can generate audio from images + text inputs!

### v0.2.0 release
- Users can now customize podcast style, structure, and content
- Integration with LangChain for better LLM management
### v0.3.0+ release
- Integrate with 100+ LLM models (OpenAI, Anthropic, Google etc) for transcript generation
- Integrate with Google's Multispeaker TTS model for high-quality audio generation

## Quickstart 💻

Expand Down
11 changes: 10 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ elevenlabs==1.10.0 ; python_version >= "3.11" and python_version < "4.0"
execnet==2.1.1 ; python_version >= "3.11" and python_version < "4.0"
fastjsonschema==2.20.0 ; python_version >= "3.11" and python_version < "4.0"
ffmpeg==1.4 ; python_version >= "3.11" and python_version < "4.0"
filelock==3.16.1 ; python_version >= "3.11" and python_version < "4.0"
frozenlist==1.5.0 ; python_version >= "3.11" and python_version < "4.0"
fsspec==2024.10.0 ; python_version >= "3.11" and python_version < "4.0"
fuzzywuzzy==0.18.0 ; python_version >= "3.11" and python_version < "4.0"
google-ai-generativelanguage==0.6.10 ; python_version >= "3.11" and python_version < "4.0"
google-api-core==2.21.0 ; python_version >= "3.11" and python_version < "4.0"
Expand Down Expand Up @@ -53,8 +55,10 @@ httpcore==1.0.6 ; python_version >= "3.11" and python_version < "4.0"
httplib2==0.22.0 ; python_version >= "3.11" and python_version < "4.0"
httpx-sse==0.4.0 ; python_version >= "3.11" and python_version < "4.0"
httpx==0.27.2 ; python_version >= "3.11" and python_version < "4.0"
huggingface-hub==0.26.2 ; python_version >= "3.11" and python_version < "4.0"
idna==3.10 ; python_version >= "3.11" and python_version < "4.0"
imagesize==1.4.1 ; python_version >= "3.11" and python_version < "4.0"
importlib-metadata==8.5.0 ; python_version >= "3.11" and python_version < "4.0"
iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "4.0"
jinja2==3.1.4 ; python_version >= "3.11" and python_version < "4.0"
jiter==0.6.1 ; python_version >= "3.11" and python_version < "4.0"
Expand All @@ -73,6 +77,7 @@ langchain-text-splitters==0.3.0 ; python_version >= "3.11" and python_version <
langchain==0.3.4 ; python_version >= "3.11" and python_version < "4.0"
langsmith==0.1.137 ; python_version >= "3.11" and python_version < "4.0"
levenshtein==0.26.0 ; python_version >= "3.11" and python_version < "4.0"
litellm==1.52.0 ; python_version >= "3.11" and python_version < "4.0"
markdown-it-py==3.0.0 ; python_version >= "3.11" and python_version < "4.0"
markupsafe==3.0.2 ; python_version >= "3.11" and python_version < "4.0"
marshmallow==3.23.0 ; python_version >= "3.11" and python_version < "4.0"
Expand All @@ -86,7 +91,7 @@ nbformat==5.10.4 ; python_version >= "3.11" and python_version < "4.0"
nbsphinx==0.9.5 ; python_version >= "3.11" and python_version < "4.0"
nest-asyncio==1.6.0 ; python_version >= "3.11" and python_version < "4.0"
numpy==1.26.4 ; python_version >= "3.11" and python_version < "4.0"
openai==1.52.2 ; python_version >= "3.11" and python_version < "4.0"
openai==1.54.2 ; python_version >= "3.11" and python_version < "4.0"
orjson==3.10.10 ; python_version >= "3.11" and python_version < "4.0"
packaging==24.1 ; python_version >= "3.11" and python_version < "4.0"
pandas==2.2.3 ; python_version >= "3.11" and python_version < "4.0"
Expand Down Expand Up @@ -120,6 +125,7 @@ pyyaml==6.0.2 ; python_version >= "3.11" and python_version < "4.0"
pyzmq==26.2.0 ; python_version >= "3.11" and python_version < "4.0"
rapidfuzz==3.10.1 ; python_version >= "3.11" and python_version < "4.0"
referencing==0.35.1 ; python_version >= "3.11" and python_version < "4.0"
regex==2024.9.11 ; python_version >= "3.11" and python_version < "4.0"
requests-toolbelt==1.0.0 ; python_version >= "3.11" and python_version < "4.0"
requests==2.32.3 ; python_version >= "3.11" and python_version < "4.0"
rich==13.9.3 ; python_version >= "3.11" and python_version < "4.0"
Expand All @@ -144,7 +150,9 @@ sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.11" and python_version < "4.0
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.11" and python_version < "4.0"
sqlalchemy==2.0.36 ; python_version >= "3.11" and python_version < "4.0"
tenacity==9.0.0 ; python_version >= "3.11" and python_version < "4.0"
tiktoken==0.8.0 ; python_version >= "3.11" and python_version < "4.0"
tinycss2==1.4.0 ; python_version >= "3.11" and python_version < "4.0"
tokenizers==0.20.3 ; python_version >= "3.11" and python_version < "4.0"
tornado==6.4.1 ; python_version >= "3.11" and python_version < "4.0"
tqdm==4.66.5 ; python_version >= "3.11" and python_version < "4.0"
traitlets==5.14.3 ; python_version >= "3.11" and python_version < "4.0"
Expand All @@ -160,3 +168,4 @@ websockets==13.1 ; python_version >= "3.11" and python_version < "4.0"
wheel==0.44.0 ; python_version >= "3.11" and python_version < "4.0"
yarl==1.16.0 ; python_version >= "3.11" and python_version < "4.0"
youtube-transcript-api==0.6.2 ; python_version >= "3.11" and python_version < "4.0"
zipp==3.20.2 ; python_version >= "3.11" and python_version < "4.0"
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def test_generate_podcast_with_custom_llm():
[
"--url", MOCK_URLS[0],
"--tts-model", "edge",
"--llm-model-name", "gpt-4-turbo",
"--api-key-label", "OPENAI_API_KEY"
"--llm-model-name", "gemini-1.5-pro-latest",
"--api-key-label", "GEMINI_API_KEY"
]
)

Expand All @@ -292,8 +292,8 @@ def test_generate_transcript_only_with_custom_llm():
[
"--url", MOCK_URLS[0],
"--transcript-only",
"--llm-model-name", "gpt-4-turbo",
"--api-key-label", "OPENAI_API_KEY"
"--llm-model-name", "gemini-1.5-pro-latest",
"--api-key-label", "GEMINI_API_KEY"
]
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_genai_podcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def test_generate_qa_content_with_custom_model(self):
# Test with OpenAI model
result = content_generator.generate_qa_content(
input_text,
model_name="gpt-4-turbo",
api_key_label="OPENAI_API_KEY"
model_name="gemini-1.5-pro-latest",
api_key_label="GEMINI_API_KEY"
)

self.assertIsNotNone(result)
Expand Down
10 changes: 4 additions & 6 deletions tests/test_generate_podcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ def test_generate_transcript_with_user_instructions(
conversation_config["podcast_tagline"].lower() in content.lower()
), f"Expected to find podcast tagline '{conversation_config['podcast_tagline']}' in transcript"

@pytest.mark.skip(reason="Testing edge only on Github Action as it's free")
def test_generate_podcast_with_custom_llm(sample_config, default_conversation_config):
"""Test generating a podcast with a custom LLM model."""
urls = ["https://en.wikipedia.org/wiki/Artificial_intelligence"]
Expand All @@ -327,8 +326,8 @@ def test_generate_podcast_with_custom_llm(sample_config, default_conversation_co
urls=urls,
tts_model="edge",
config=sample_config,
llm_model_name="gpt-4-turbo",
api_key_label="OPENAI_API_KEY"
llm_model_name="gemini-1.5-pro-latest",
api_key_label="GEMINI_API_KEY"
)

assert audio_file is not None
Expand All @@ -339,7 +338,6 @@ def test_generate_podcast_with_custom_llm(sample_config, default_conversation_co
"text_to_speech", {}
).get("output_directories", {}).get("audio")

@pytest.mark.skip(reason="Testing edge only on Github Action as it's free")
def test_generate_transcript_only_with_custom_llm(sample_config, default_conversation_config):
"""Test generating only a transcript with a custom LLM model."""
urls = ["https://en.wikipedia.org/wiki/Artificial_intelligence"]
Expand All @@ -349,8 +347,8 @@ def test_generate_transcript_only_with_custom_llm(sample_config, default_convers
urls=urls,
transcript_only=True,
config=sample_config,
llm_model_name="gpt-4-turbo",
api_key_label="OPENAI_API_KEY"
llm_model_name="gemini-1.5-pro-latest",
api_key_label="GEMINI_API_KEY"
)

assert result is not None
Expand Down

0 comments on commit c1fd8c8

Please sign in to comment.