refactor:
- changed method get_agent_tools for only get_tools on agent interface - changed OllamaModelManager to correc semantic OllamaService test: - added test for service initialization - added tests to list tools and create tools into PDF agent
This commit is contained in:
22
test/service/test_service.py
Normal file
22
test/service/test_service.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
|
||||
class TestService(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
||||
pass
|
||||
|
||||
def test_service_initialization(self):
|
||||
from src.service.service import Service
|
||||
|
||||
# Test Ollama service
|
||||
ollama_service = Service("ollama")
|
||||
self.assertIsNotNone(ollama_service.service)
|
||||
self.assertEqual(ollama_service.service.__class__.__name__,
|
||||
"OllamaService")
|
||||
|
||||
self.assertEqual(ollama_service.service.base_url,"http://localhost:11434")
|
||||
print(len(ollama_service.service.get_available_models()))
|
||||
self.assertGreater(len(ollama_service.service.get_available_models()), 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user