diff --git a/src/options/generate/generator.py b/src/options/generate/generator.py index ae02e65..9dcadfe 100644 --- a/src/options/generate/generator.py +++ b/src/options/generate/generator.py @@ -547,8 +547,11 @@ Test scenario: # filter out complete package lists packages_list = [ packages for packages in packages_list if all([ - is_package_on_pypi(pkg) # all packages must be on pypi - and pkg not in BLACKLISTED_PACKAGES # no package is allowed to be blacklisted + pkg == 'gpt_3_5_turbo' + or ( + is_package_on_pypi(pkg) # all packages must be on pypi or it is gpt_3_5_turbo + and pkg not in BLACKLISTED_PACKAGES # no package is allowed to be blacklisted + ) for pkg in packages ]) ] diff --git a/test/test_generator.py b/test/test_generator.py index f0b0d67..7f7b022 100644 --- a/test/test_generator.py +++ b/test/test_generator.py @@ -71,8 +71,8 @@ def test_generation_level_2(tmpdir): def test_generation_level_3(tmpdir): """ Requirements: - coding challenge: ❌ - pip packages: ✅ (csv parser) + coding challenge: ✅ (calculate the average closing price) + pip packages: ❌ environment: ❌ GPT-3.5-turbo: ✅ (for processing the text) APIs: ✅ (financial data API) @@ -83,8 +83,8 @@ def test_generation_level_3(tmpdir): f'''The input is a stock symbol (e.g., AAPL for Apple Inc.). 1. Fetch stock data (open, high, low, close, volume) for the past 30 days using a financial data API Yahoo Finance. 2. Calculate the average closing price over the 30 days. -5. Generate a brief summary of the company's stock performance over the past 30 days, including the average closing price and the company name. -6. Return the summary as a string. +3. Generate a brief summary of the company's stock performance over the past 30 days, including the average closing price and the company name. +4. Return the summary as a string. Example input: 'AAPL' ''', str(tmpdir),