mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-23 08:34:20 +01:00
➕ refactor: summarize error message without line number
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import os
|
||||
|
||||
from dev_gpt.apis.gpt import GPTSession
|
||||
from dev_gpt.options.generate.pm.pm import PM
|
||||
from dev_gpt.options.generate.tools.tools import get_available_tools
|
||||
|
||||
|
||||
@@ -10,4 +12,14 @@ def test_all_tools():
|
||||
def test_no_search():
|
||||
os.environ['GOOGLE_API_KEY'] = ''
|
||||
tool_lines = get_available_tools().split('\n')
|
||||
assert len(tool_lines) == 1
|
||||
assert len(tool_lines) == 1
|
||||
|
||||
def test_get_used_tools(tmpdir):
|
||||
os.environ['VERBOSE'] = 'true'
|
||||
GPTSession(os.path.join(str(tmpdir), 'log.json'), model='gpt-3.5-turbo')
|
||||
used_tools = PM.get_used_tools('''\
|
||||
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. \
|
||||
No specific request parameters are required, and the response always follows a fixed schema with a single "output" parameter.'''
|
||||
)
|
||||
assert used_tools == []
|
||||
Reference in New Issue
Block a user