mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-20 15:14:20 +01:00
➕ refactor: summarize error message without line number
This commit is contained in:
@@ -14,9 +14,7 @@ def test_no_search():
|
||||
tool_lines = get_available_tools().split('\n')
|
||||
assert len(tool_lines) == 1
|
||||
|
||||
def test_get_used_apis(tmpdir):
|
||||
os.environ['VERBOSE'] = 'true'
|
||||
GPTSession(os.path.join(str(tmpdir), 'log.json'), model='gpt-3.5-turbo')
|
||||
def test_get_used_apis(init_gpt):
|
||||
used_apis = PM.get_used_apis('''\
|
||||
This microservice listens for incoming requests and generates a fixed output of "test" upon receiving a request. \
|
||||
The response sent back to the requester includes the output as a string parameter. \
|
||||
@@ -24,9 +22,7 @@ No specific request parameters are required, and the response always follows a f
|
||||
)
|
||||
assert used_apis == []
|
||||
|
||||
def test_get_used_apis_2(tmpdir):
|
||||
os.environ['VERBOSE'] = 'true'
|
||||
GPTSession(os.path.join(str(tmpdir), 'log.json'), model='gpt-3.5-turbo')
|
||||
def test_get_used_apis_2(init_gpt):
|
||||
description = '''\
|
||||
This microservice accepts a 1-minute WAV audio file of speech, encoded as a base64 binary string, and performs the following tasks:
|
||||
|
||||
@@ -39,9 +35,7 @@ The microservice returns the summarized text converted to audio and encoded as a
|
||||
used_apis = PM.get_used_apis(description)
|
||||
assert used_apis == ['Whisper API', 'gpt_3_5_turbo', 'text-to-speech (TTS) library']
|
||||
|
||||
def test_get_used_apis_3(tmpdir):
|
||||
os.environ['VERBOSE'] = 'true'
|
||||
GPTSession(os.path.join(str(tmpdir), 'log.json'), model='gpt-3.5-turbo')
|
||||
def test_get_used_apis_3(init_gpt):
|
||||
description = '''\
|
||||
This microservice takes a PDF file as input and returns a summarized text output. \
|
||||
It uses PDF parsing and natural language processing tools to generate the summary, \
|
||||
@@ -51,9 +45,7 @@ and the output parameter is the summarized text.'''
|
||||
used_apis = PM.get_used_apis(description)
|
||||
assert used_apis == []
|
||||
|
||||
def test_get_used_apis_4(tmpdir):
|
||||
os.environ['VERBOSE'] = 'true'
|
||||
GPTSession(os.path.join(str(tmpdir), 'log.json'), model='gpt-3.5-turbo')
|
||||
def test_get_used_apis_4(init_gpt):
|
||||
description = '''\
|
||||
This microservice receives a tweet as input \
|
||||
and identifies passive aggressive language using natural language processing techniques. \
|
||||
|
||||
Reference in New Issue
Block a user