diff --git a/AI/WxMini/Milvus/Config/__pycache__/MulvusConfig.cpython-310.pyc b/AI/WxMini/Milvus/Config/__pycache__/MulvusConfig.cpython-310.pyc index 3f2c9382..e0328876 100644 Binary files a/AI/WxMini/Milvus/Config/__pycache__/MulvusConfig.cpython-310.pyc and b/AI/WxMini/Milvus/Config/__pycache__/MulvusConfig.cpython-310.pyc differ diff --git a/AI/WxMini/Test/Math_PiJuan.py b/AI/WxMini/Test/Math_PiJuan.py new file mode 100644 index 00000000..bfb8d75a --- /dev/null +++ b/AI/WxMini/Test/Math_PiJuan.py @@ -0,0 +1,47 @@ + +# https://qwenlm.github.io/zh/blog/qwen2.5-vl-32b/ +from openai import OpenAI +from WxMini.Milvus.Config.MulvusConfig import * + +client = OpenAI( + api_key=MODELSCOPE_ACCESS_TOKEN, + base_url="https://api-inference.modelscope.cn/v1" +) +# 提示词 +prompt = "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step." + +# 要解决的图片问题 +#img_url = 'https://qianwen-res.oss-cn-beijing.aliyuncs.com/QVQ/demo.png' +# 答案=46 + +#img_url='https://hzkc.oss-cn-beijing.aliyuncs.com/Temp/simple_math.jpeg' +# 答案应该是80度 + +#img_url='https://hzkc.oss-cn-beijing.aliyuncs.com/Temp/child_math.jpeg' +img_url='https://hzkc.oss-cn-beijing.aliyuncs.com/Temp/child_math2.jpg' + +response = client.chat.completions.create( + #model="Qwen/QVQ-72B-Preview", + model="Qwen/Qwen2.5-VL-32B-Instruct", + messages=[ + { + "role": "system", + "content": [ + {"type": "text", "text": prompt} + ], + }, + { + "role": "user", + "content": [ + { + "type": "image_url", + "image_url": {"url": img_url} + }, + {"type": "text", "text": "请使用中文回答:帮我看看计算的对不对?"}, + ], + } + ], + stream=True +) +for chunk in response: + print(chunk.choices[0].delta.content, end='', flush=True) diff --git a/AI/WxMini/Test/Math1.py b/AI/WxMini/Test/Math_ZuoTi.py similarity index 100% rename from AI/WxMini/Test/Math1.py rename to AI/WxMini/Test/Math_ZuoTi.py