Controller.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import kbc_alt
  2. import Stateful
  3. import datetime
  4. class kbc_controller():
  5. def get_help():
  6. pass
  7. def rewrite_config():
  8. pass
  9. # [todo 3]
  10. def InUTC(timeZone:int=0):
  11. dt_now_UTC0 = str(datetime.datetime.now(datetime.timezone.utc))
  12. return(dt_now_UTC0)
  13. # [todo 2]
  14. # 前端只检查输入数量正确, 内容正确统一代回后端检查
  15. def InputHandler():
  16. pass
  17. def TransitCommand():
  18. # do while or for (1)
  19. while(1):
  20. app_commands = input(currentPath + "/: ", ).split(" ")
  21. # Input exception check
  22. # [todo 1]
  23. # Controller.InputCheck(app_commands)
  24. # [todo 4]
  25. def GenDB():# Stateful里面还有一个一样的方法
  26. pass
  27. # 1. 先检查是否已经存在DB? y/n?
  28. # 2. 连接性检查(是否要切换到新建的DB)y/n?
  29. def makeLog():
  30. pass
  31. # [todo 4]
  32. def start():
  33. pass
  34. # 2. Valid DB
  35. # startState = Stateful.Translator(['/', app_config["dbPath"], app_config["dbType"]])
  36. # print(startState)
  37. # kbc_controller.TransitCommand()
  38. # For ChatGLM3-6B
  39. class LLM():
  40. def call():
  41. pass
  42. def respond():
  43. pass
  44. if __name__ == "__main__":
  45. kbc_controller.start()