From 06e9154f7e9bd8dac7b71c070e3a2314de2f1e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Tue, 2 May 2023 14:08:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA4=EF=B8=8F=E2=83=A3=20test:=20level?= =?UTF-8?q?=203=20fix=20no=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/options/generate/templates_user.py | 2 +- test/test_generator.py | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/options/generate/templates_user.py b/src/options/generate/templates_user.py index 7e01ca0..4fbe0ed 100644 --- a/src/options/generate/templates_user.py +++ b/src/options/generate/templates_user.py @@ -24,7 +24,7 @@ The implemented function and the test must not contain prototype or placeholder The implemented function and the test must run in a docker container based on debian. The implemented function and the test must not use libraries like Flask. The implemented function and the test must not have a __main__ function. -The implemented function and the test must use gpt_3_5_turbo_api if the task requires understanding, generation, summarization, transformation, translation or classification of natural language or using any language model. Other language models are not allowed.''' +The implemented function and the test must use gpt_3_5_turbo_api if the task requires the processing of language (e.g., understanding, generation, summarization, transformation, translation, modification or classification). Other language models are not allowed.''' template_generate_microservice_name = PromptTemplate.from_template( diff --git a/test/test_generator.py b/test/test_generator.py index 5876bbf..b248bb7 100644 --- a/test/test_generator.py +++ b/test/test_generator.py @@ -81,18 +81,11 @@ def test_generation_level_3(tmpdir): os.environ['VERBOSE'] = 'true' generator = Generator( 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 (e.g., Alpha Vantage, Yahoo Finance, or any other API). +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. -3. Read a CSV file containing a list of stock symbols and their company names. -4. Find the input stock symbol in the CSV file and get the corresponding company name. 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. Example input: 'AAPL' -Example CSV file format: -symbol,company_name -AAPL,Apple Inc. -GOOGL,Alphabet Inc. -AMZN,Amazon.com, Inc. ''', str(tmpdir) + 'microservice', 'gpt-3.5-turbo'