diff --git a/ChatQnA/docker/chatqna.py b/ChatQnA/docker/chatqna.py index 79cb8c219..90e2a80da 100644 --- a/ChatQnA/docker/chatqna.py +++ b/ChatQnA/docker/chatqna.py @@ -63,13 +63,7 @@ class ChatQnAService: self.megaservice.flow_to(rerank, llm) self.gateway = ChatQnAGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port) - async def schedule(self): - await self.megaservice.schedule(initial_inputs={"text": "What is the revenue of Nike in 2023?"}) - result_dict = self.megaservice.result_dict - print(result_dict) - if __name__ == "__main__": chatqna = ChatQnAService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT) chatqna.add_remote_service() - asyncio.run(chatqna.schedule()) diff --git a/CodeGen/docker/codegen.py b/CodeGen/docker/codegen.py index e8a8e31e2..5c4b9012d 100644 --- a/CodeGen/docker/codegen.py +++ b/CodeGen/docker/codegen.py @@ -30,15 +30,7 @@ class CodeGenService: self.megaservice.add(llm) self.gateway = CodeGenGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port) - async def schedule(self): - await self.megaservice.schedule( - initial_inputs={"text": "Write a function that checks if a year is a leap year in Python."} - ) - result_dict = self.megaservice.result_dict - print(result_dict) - if __name__ == "__main__": chatqna = CodeGenService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT) chatqna.add_remote_service() - asyncio.run(chatqna.schedule()) diff --git a/CodeTrans/docker/code_translation.py b/CodeTrans/docker/code_translation.py index 2bf2a03e1..43c113b5c 100644 --- a/CodeTrans/docker/code_translation.py +++ b/CodeTrans/docker/code_translation.py @@ -29,28 +29,7 @@ class CodeTransService: self.megaservice.add(llm) self.gateway = CodeTransGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port) - async def schedule(self): - await self.megaservice.schedule( - initial_inputs={ - "text": """ - ### System: Please translate the following Golang codes into Python codes. - - ### Original codes: - '''Golang - - \npackage main\n\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello, World!\");\n - - ''' - - ### Translated codes: -""" - } - ) - result_dict = self.megaservice.result_dict - print(result_dict) - if __name__ == "__main__": service_ochestrator = CodeTransService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT) service_ochestrator.add_remote_service() - asyncio.run(service_ochestrator.schedule()) diff --git a/DocSum/docker/docsum.py b/DocSum/docker/docsum.py index 89a2113f1..8050059e7 100644 --- a/DocSum/docker/docsum.py +++ b/DocSum/docker/docsum.py @@ -30,17 +30,7 @@ class DocSumService: self.megaservice.add(llm) self.gateway = DocSumGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port) - async def schedule(self): - await self.megaservice.schedule( - initial_inputs={ - "text": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5." - } - ) - result_dict = self.megaservice.result_dict - print(result_dict) - if __name__ == "__main__": docsum = DocSumService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT) docsum.add_remote_service() - asyncio.run(docsum.schedule())