GPT-4 Claude 3 Gemini Pro對(duì)決,還是GPT-4勝一籌

大模型戰(zhàn)力排行榜
這兩天折騰了兩個(gè)Mac上的小應(yīng)用,一個(gè)是從視頻抽取音頻,一個(gè)是短視頻轉(zhuǎn)Gif。
功能分別是將視頻文件/文件夾拖拽到圖標(biāo)上,自動(dòng)抽取視頻中的音頻文件;將短視頻拖拽到圖標(biāo)上,自動(dòng)轉(zhuǎn)成Gif格式并保存到桌面。
這件事必然交給大模型來(lái)做最合適了,為了對(duì)比,我同時(shí)讓GPT-4、Claude 3 Sonnet、Gemini去幫我生成代碼。
以視頻轉(zhuǎn)Gif為例,我的Prompt是
我想在mac上將mp4格式的短視頻轉(zhuǎn)成gif,要求GIF的尺寸與原視頻保持一致。我希望你能用Apple script實(shí)現(xiàn)它,并另存為application,我想直接講視頻拖拽到這個(gè)app的圖標(biāo)上就自動(dòng)完成gif轉(zhuǎn)換,請(qǐng)給我具體代碼。
結(jié)果只有GPT-4給出的代碼非常精簡(jiǎn)、步驟詳實(shí)且沒(méi)有語(yǔ)法錯(cuò)誤
這個(gè)腳本之需要將其中ffmpeg的位置修改為自己電腦上的實(shí)際位置即可
我對(duì)Apple script一無(wú)所知,所以沒(méi)有深究其他大模型給出代碼的實(shí)際問(wèn)題,只知道在運(yùn)行時(shí)會(huì)報(bào)出語(yǔ)法錯(cuò)誤。
Claude 3 、Gemini,mistral,還有不點(diǎn)名的國(guó)產(chǎn)大模型,均敗北。
附件
順便分享這三個(gè)小玩意兒的代碼
Mp4轉(zhuǎn)Gif:
on open of theFiles
set desktopPath to POSIX path of (path to desktop)
repeat with aFile in theFiles
set filePath to POSIX path of aFile
set fileName to do shell script "basename " & quoted form of filePath
set destPath to desktopPath & text 1 thru -5 of fileName & ".gif"
set shellCommand to "/opt/homebrew/bin/ffmpeg -i " & quoted form of filePath & " -vf \"fps=10,scale=-1:-1:flags=lanczos\" -c:v gif -f gif " & quoted form of destPath
do shell script shellCommand
end repeat
end open
Video抽取音頻
on open of theFiles
set desktopPath to POSIX path of (path to desktop)
repeat with aFile in theFiles
set filePath to POSIX path of aFile
set fileName to do shell script "basename " & quoted form of filePath
set destPath to desktopPath & text 1 thru -5 of fileName & ".gif"
set shellCommand to "/opt/homebrew/bin/ffmpeg -i " & quoted form of filePath & " -vf \"fps=10,scale=-1:-1:flags=lanczos\" -c:v gif -f gif " & quoted form of destPath
do shell script shellCommand
end repeat
end open
webp轉(zhuǎn)PNG
on open of theFiles
repeat with aFile in theFiles
set filePath to POSIX path of aFile if filePath ends with "-webp" then
set outputPath to POSIX path of (path to desktop folder) & (do shell scri do shell script "sips-s format png " & quoted form of filePath & " --out
end if end repeat
end open
使用方法
- 打開(kāi)“腳本編輯器”(Script Editor)應(yīng)用程序。
- 粘貼上述AppleScript代碼到腳本編輯器中。
- 在腳本編輯器中,選擇“文件” > “導(dǎo)出...”。
- 在“導(dǎo)出”對(duì)話框中,選擇文件格式為“應(yīng)用程序”,給你的應(yīng)用程序命名,然后保存。
- 確保在“選項(xiàng)”下勾選了“保留運(yùn)行時(shí)的父腳本”。
Google Gemini 1.5 Pro和 OpenAI Sora的一些資料
用GPT-4學(xué)習(xí)董宇輝的文旅小作文風(fēng)格,回復(fù)城市名,自動(dòng)撰寫(xiě)同款
叫板GPT-4的Gemini,我做了一個(gè)聊天網(wǎng)頁(yè),可圖片輸入,附教程
