地平線まで行ってくる。

記録あるいは忘備録。時には検討事項。

DifyとGemma2でローカルLLM

DifyはオープンソースのLLMアプリ開発プラットフォーム。ノーコードで様々な本格的なLLMアプリを作成できます。

 

インストールは、Dockerが便利です。

Deploy with Docker Compose | Dify

Gemma2は、ollamaで起動します。

https://hub.docker.com/r/ollama/ollama

docker exec -it ollama ollama run gemma2

 

テニスの王子様跡部景吾様になり切ってもらいます。

やりとりは以下の様になりました。

🤖俺様の美技に酔いな

😊こんにちは。

🤖よう、何しに来たんだ?

😊世界最高のテニスプレーヤーは誰だ?

🤖あーん、オレだろ?

 俺にかなうのかな?君のライバルは誰だ?

🤖あーん、ライバル?
 そんな凡人にはオレの相手にならない。
 覚悟はできているのか?

😊俺の得意技の前に君は敗れるのだ。

🤖あーん、ふざけるな。
 オレの技を舐めるな。
 期待してろ。

😊では、君の必殺技はなんだ?

🤖あーん、破滅への輪舞曲か?
 それとも、氷の皇帝?
 知りたいなら、コートで確かめてみろ。

😊じゃ、今度、コートであろうか。

🤖あーん、そうだな。
 覚悟はいいか?
 オレは氷帝の王だ。

😊こちらこそ

🤖あーん、覚悟はいいなら、始めろ!

 

跡部様っぽいやりとりができます。Chat-GTP3.5-turboの頃に作ったプロンプトです。気軽にキャラボットができそうです。楽しい。

 

エージェント機能を使います。各種ツールを呼び出して能動的に動作するようなwikipedia searchとDuck Duck Goをツールとして加えます。

 

😊まどかマギカで一番人気があるのは?

🤖I need to summarize the information about the popularity of Madoka Magica

Based on the information provided, Madoka Magica is extremely popular. It has been praised for its story, characters, and animation. The anime has sold a large number of Blu-ray discs, and its merchandise has generated hundreds of millions of yen in revenue. It has also won numerous awards, including the Culture Ministry Media Arts Festival Animation Division Grand Prize and the Tokyo Anime Award Television Division Excellent Work Award.

😊まどかマギカで一番人気があるのは?

🤖  (wikipedia search)
 I need to summarize the popularity of the series.

  (wikipedia search)

  The provided text states atht the anime has been very popular, with high BD sales and merchandise revenue.

According to the provided text, 魔法少女まどか☆マギカ has been extremely popular.  It achieved high sales for its Blu-ray Discs and merchandise, with merchandise sales reaching about 400 billion yen in 2013. It also won several awards and was ranked highly in polls.

😊キャラクターでもっとも一番人気があるのは?

🤖  (wikipedia search)

 I need to look for other sources to find information about character popularity.

  (ddgo search)
 The observation suggests atht Homura is a popular character. I should look for more information about character popularity.

    (ddgo search)

 It seems like Homura is a very popular character. I should keep looking for more information to confirm this.

    (ddgo search)

 It seems like Homura is a very popular character. I should look for more concrete evidence like polls or rankings.

  (ddgo search)

  It seems like finding a definitive answer on the *most* popular character is difficult.  Many sources mention Homura as a fan favorite, but there aren't many concrete polls with clear rankings. 

 

英語での回答にはなりますが、それなりにツールを使って答えを出そうとします。エージェントのプロンプト指示の効き具合が弱く、ありもしないツールを使おうとしたりする場面もしばしば。エージェントに関わるプロンプトを弄れないので深くは追えませんでした。

 

エージェント専用のローカルLLMがあったも良いんだろう。

 

楽しい。