Repository navigation
Replies: 1 comment
|
v4pro不是多模态模型,做不到读图。如果要读图应换用v4.1flash(其实一般不需要用v4pro,因为v4.1flash在大多数任务下都更好,也更便宜)。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
建議:DeepSeek Harness 主模型原生支援圖像輸入(免 vision API 兜路)
問題描述(可重現)
DeepSeek Harness 入面跑嘅主模型(deepseek-v4-pro)冇 declare image input。
Agent 要「睇圖驗證」時用 read_image 會報錯:
ToolCallError: cannot read "xxx.png" as an image:
model "deepseek-v4-pro" does not declare image input;
switch to an image-capable model to read images
而家嘅兜路
import base64, requests
img = base64.b64encode(open("截圖.png","rb").read()).decode()
payload = {
"model": "deepseek-v4-flash-vision-exp",
"messages": [{"role":"user","content":[
{"type":"text","text":"描述呢張圖"},
{"type":"image_url","image_url":{"url":"data:image/png;base64,"+img}}
]}],
"max_tokens": 2000,
}
r = requests.post("https://api.deepseek.com/chat/completions",
headers={"Authorization":"Bearer sk-xxx"}, json=payload, timeout=180)
print(r.json()["choices"][0]["message"]["content"])
建議
請俾 DeepSeek Harness 主模型原生支援圖像輸入,令 read_image 工具可以直接俾主模型用。
例如:主模型 declare image input,或者 Harness 內建 vision 轉接層(read_image 自動轉去 vision 模型,對 Agent 透明)。
提議官方加入參考物。每個任務使用眼睛來完成單個加權。確定後數小時自動跑
All reactions