0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MIT App Inventorでの,ChatBot(AI)を用いた組み合わせの序列付けの方法(出会い系アプリのマッチングみたいなやつ~)

Posted at

初めに

マッチングアプリのおすすめで出てくる順番ってどうやって決められているか気になりますよね!!
これをMIT App Inventorで考えてみました~~
マッチングアプリって,うまくマッチしちゃうとユーザーが減ってしまうような...アプリをリピートしてくれるような組み合わせにしてるのかな??

アプリの概要

ChatBot (gemini)にユーザーと複数のプロフィールを送信し,その中からユーザーと相性がよさそうな人を1~5人選んでもらう.出力は名前,相性がよさそうな理由,序列(1~5)とする.
ここでは,ChatBotの解答を制御するためにjson schemaを使用している.

デザイナー画面

スクリーンショット 2025-05-05 174050.png

機能 内容
Button_ai ボタンを押したらgeminiへ質問
Button_reset Label_infoを空白に
Label_info Geminiの解答を表示
Web1 Geminiへのアクセス

blocks画面

変数

url
Geminiへのアクセスリンク

https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=

blocks.png

APIKey
ご自身のAPIKeyを入れて下さい.
blocks (1).png

プロフィール本人
blocks (3).png

プロフィール
blocks (4).png

when Button_ai. Click

ボタンを押したらgeminiにプロフィールを送信する.ここでは,json schemaを用いてAIの解答をチューニングしている.

blocks (5).png

when Web1. GotText

Geminiからのレスポンスを処理する
blocks (6).png

when Button_reset. Click

ボタンを押したらラベルを空白にする.
blocks (2).png

実行結果

出力できてます! 序列も数値で出ました!これは他にも使い道がありそう!!

終わりに

Geminiってすごい,Json Schemaを使いこなせると,いろいろな用途にAiを活用できそうです.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?