2023-12-24 13:58:36 +08:00
|
|
|
import unittest
|
|
|
|
|
2023-12-26 13:56:12 +08:00
|
|
|
from keras.src.engine.base_preprocessing_layer import PreprocessingLayer
|
|
|
|
from langchain.memory import ConversationKGMemory
|
|
|
|
|
|
|
|
from knext.component.builder import UserDefinedExtractor, LLMBasedExtractor
|
2023-12-24 13:58:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
class TestUserDefinedExtractor(unittest.TestCase):
|
|
|
|
"""UserDefinedExtractor unit test stubs"""
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
self.component = UserDefinedExtractor()
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def testExecute(self):
|
|
|
|
"""Test execute"""
|
|
|
|
|
|
|
|
|
|
|
|
class TestLLMBasedExtractor(unittest.TestCase):
|
|
|
|
"""LLMBasedExtractor unit test stubs"""
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
self.component = LLMBasedExtractor()
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def testExecute(self):
|
|
|
|
"""Test execute"""
|
|
|
|
|
|
|
|
|
2023-12-26 11:59:20 +08:00
|
|
|
if __name__ == "__main__":
|
2023-12-24 13:58:36 +08:00
|
|
|
unittest.main()
|