|
|
@@ -1,8 +1,5 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
import time
|
|
|
-import subprocess
|
|
|
-import sys
|
|
|
-import timeit
|
|
|
from ollama import Client as oClient
|
|
|
|
|
|
class ChatBot:
|
|
|
@@ -27,13 +24,13 @@ class ChatBot:
|
|
|
print(f"\n发生错误: {e}")
|
|
|
|
|
|
|
|
|
-if __name__ == "__main__":
|
|
|
- C = ChatBot('http://192.168.31.28:11434', 'hello,你好呀', 'llava:13b')
|
|
|
- start_time = time.time()
|
|
|
-
|
|
|
- response_context = C.start_chat()
|
|
|
- print(response_context)
|
|
|
-
|
|
|
- end_time = time.time()
|
|
|
- run_time = end_time - start_time
|
|
|
- print(f"程序运行时间:{run_time} 秒\n")
|
|
|
+# if __name__ == "__main__":
|
|
|
+# C = ChatBot('http://127.0.0.1:11434', 'hello,你好呀', 'llava:13b')
|
|
|
+# start_time = time.time()
|
|
|
+#
|
|
|
+# response_context = C.start_chat()
|
|
|
+# print(response_context)
|
|
|
+#
|
|
|
+# end_time = time.time()
|
|
|
+# run_time = end_time - start_time
|
|
|
+# print(f"程序运行时间:{run_time} 秒\n")
|