mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-04 22:04:35 +01:00
test: fix typo and add newline at the end
- Fixed "embeder" typo to "embedder" - Added newline at the end of test unit
This commit is contained in:
@@ -9,25 +9,26 @@ def MockConfig():
|
||||
'debug_mode': False,
|
||||
'continuous_mode': False,
|
||||
'speak_mode': False,
|
||||
'memory_embeder': 'sbert'
|
||||
'memory_embedder': 'sbert'
|
||||
})
|
||||
|
||||
class TestMemoryEmbeder(unittest.TestCase):
|
||||
def setUp(self):
|
||||
class TestMemoryEmbedder(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.cfg = MockConfig()
|
||||
|
||||
def test_ada(self):
|
||||
self.cfg.memory_embeder = "ada"
|
||||
self.cfg.memory_embedder = "ada"
|
||||
text = "Sample text"
|
||||
result = get_embedding(text)
|
||||
self.assertEqual(result.shape, (1536,))
|
||||
|
||||
def test_sbert(self):
|
||||
self.cfg.memory_embeder = "sbert"
|
||||
self.cfg.memory_embedder = "sbert"
|
||||
text = "Sample text"
|
||||
result = get_embedding(text)
|
||||
self.assertEqual(result.shape, (768,))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user