💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Update test
davidmezzetti42814e2c90b5
diff --git a/test/python/testconsole.py b/test/python/testconsole.pyindex 21f0dd0e..49e55797 100644--- a/test/python/testconsole.py+++ b/test/python/testconsole.py@@ -11,6 +11,15 @@ import unittestfrom txtai.console import Consolefrom txtai.embeddings import Embeddings+APPLICATION = """+path: %s++workflow:+ test:+ tasks:+ - task: console+"""+class TestConsole(unittest.TestCase):"""@@ -44,16 +53,7 @@ class TestConsole(unittest.TestCase):# Create app.ymlwith open(cls.apppath, "w", encoding="utf-8") as out:- out.write(- fr"""- path: {cls.embedpath}-- workflow:- test:- tasks:- - task: console- """- )+ out.write(APPLICATION % cls.embedpath)# Save indexcls.embeddings.save(cls.embedpath)@@ -66,7 +66,7 @@ class TestConsole(unittest.TestCase):Test application"""- self.assertIn("console.yml", self.command(fr".load {self.apppath}"))+ self.assertIn("console.yml", self.command(".load " + self.apppath))self.assertIn("1", self.command(".limit 1"))self.assertIn("Maine man wins", self.command("feel good story"))@@ -82,7 +82,7 @@ class TestConsole(unittest.TestCase):Test embeddings index"""- self.assertIn("embeddings", self.command(fr".load {self.embedpath}"))+ self.assertIn("embeddings", self.command(".load " + self.embedpath))self.assertIn("1", self.command(".limit 1"))self.assertIn("Maine man wins", self.command("feel good story"))@@ -132,7 +132,7 @@ class TestConsole(unittest.TestCase):Test .workflow command"""- self.command(fr".load {self.apppath}")+ self.command(".load " + self.apppath)self.assertIn("echo", self.command(".workflow test echo"))def command(self, command, console=None):