commit c7b6eac715a6e9cf29b9b9661c541db3f39b4551
Author: 10-1 <10-1@sairate.top>
Date: Sat Nov 9 14:32:45 2024 +0800
Signed-off-by: 10-1 <10-1@sairate.top>
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..359bb53
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..9b73350
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7b071b0
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/钟淇奕.iml b/.idea/钟淇奕.iml
new file mode 100644
index 0000000..8e0301c
--- /dev/null
+++ b/.idea/钟淇奕.iml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/11.9.py b/11.9.py
new file mode 100644
index 0000000..b6fa7b1
--- /dev/null
+++ b/11.9.py
@@ -0,0 +1,17 @@
+#type()
+#int()
+#float()
+#str()
+#bool()
+# print(int(1.3453445))
+# print(float(2))
+# print(str(2))
+# print(type(str(2)))
+# print(bool(1))
+# print(bool(" "))
+# a=False
+# print(bool(str(a)))
+# a=int(input())
+# b=int(input())
+# c=int(input())
+# print(a*2+b*3+c*4)
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..1f75699
--- /dev/null
+++ b/main.py
@@ -0,0 +1,39 @@
+from ollama import Client
+def get_completion(prompt, model="solar"):
+ client = Client(host='http://8.130.118.164:11434/')
+ response = client.chat(model, messages=[
+ {
+ 'role': 'user',
+ 'content': prompt,
+ },
+ ])
+ print(response)
+ print(response['message'])
+ return response['message']['content']
+print(get_completion("你好,我是小明。"))
+# import cv2
+
+# def test_camera():
+# video_capture = cv2.VideoCapture(0) # 打开默认摄像头
+#
+# if not video_capture.isOpened():
+# print("无法打开摄像头")
+# return
+#
+# while True:
+# ret, frame = video_capture.read()
+# if not ret:
+# print("无法读取摄像头画面")
+# break
+#
+# cv2.imshow('Video', frame)
+#
+# if cv2.waitKey(1) & 0xFF == ord('q'): # 按 'q' 键退出
+# break
+#
+# video_capture.release()
+# cv2.destroyAllWindows()
+#
+# # 调用函数
+# test_camera()
+