https://isehara-3lv.sakura.ne.jp/blog/2025/04/28/ラズパイ5のchatbot機能を統合/
4月にラズパイ5で作ったchatbot久々に動かそうとしたら動かない、より正確にはDifyからのレスポンスが返らない(回答が空か短すぎると言われる)、さらに調べるとgeminiへのqueryがエラーになっている
5月あたりにgoogleの対応が変わっていて、古いモデル名は使えなくなっているらしい、以下のFlash 001用のようなモデルは終了で末尾がlatestのモデルを選択したら動いた
変更後、
確認はcurlで、
curl -X POST 'http://localhost/v1/chat-messages' \
--header 'Authorization: Bearer app-***** your api key' \
--header 'Content-Type: application/json' \
--data-raw '{
"inputs": {},
"query": "What are the specs of the iPhone 13 Pro Max?",
"response_mode": "streaming",
"conversation_id": "",
"user": "abc-123",
"files": [
{
"type": "image",
"transfer_method": "remote_url",
"url": "https://cloud.dify.ai/logo/logo-site.png"
}
]
}'
但し、最近無償版は混雑しているようで、割と頻繁にbusyで帰ってくるから、使いたいなら有償にしなさいよと言ってるようだ、それならばローカルLLMの選択もありだよね
admin