Improve IGDB search capabilities.
This commit is contained in:
@@ -67,7 +67,7 @@ class TestIGDBIntegration(unittest.IsolatedAsyncioTestCase):
|
||||
igdb = IGDBQuery("test_client", "test_token")
|
||||
functions = igdb.get_openai_functions()
|
||||
|
||||
self.assertEqual(len(functions), 2)
|
||||
self.assertEqual(len(functions), 4)
|
||||
|
||||
# Check search_games function
|
||||
search_func = functions[0]
|
||||
@@ -76,8 +76,20 @@ class TestIGDBIntegration(unittest.IsolatedAsyncioTestCase):
|
||||
self.assertIn("parameters", search_func)
|
||||
self.assertIn("query", search_func["parameters"]["properties"])
|
||||
|
||||
# Check get_games_by_release_date function
|
||||
release_func = functions[1]
|
||||
self.assertEqual(release_func["name"], "get_games_by_release_date")
|
||||
self.assertIn("description", release_func)
|
||||
self.assertIn("parameters", release_func)
|
||||
|
||||
# Check get_games_by_platform function
|
||||
platform_func = functions[2]
|
||||
self.assertEqual(platform_func["name"], "get_games_by_platform")
|
||||
self.assertIn("description", platform_func)
|
||||
self.assertIn("parameters", platform_func)
|
||||
|
||||
# Check get_game_details function
|
||||
details_func = functions[1]
|
||||
details_func = functions[3]
|
||||
self.assertEqual(details_func["name"], "get_game_details")
|
||||
self.assertIn("game_id", details_func["parameters"]["properties"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user