Skip to content

Chatting

EASYHZ edited this page May 1, 2023 · 13 revisions

GPT-2

with AI

  • Default Layout
    Ai Chat rooms are fixed at the top, and users and chats are listed chronologically below them.

  • When we first started
    Only ai chat room exists. So, You can chat with AI.


Socket Communication and Database Usage.
  1. Send Chat
  2. Communicate with servers and store databases
  3. Extract AI answers
    • It prevents you from sending continuous chats.
    • AI has a delay in answering like a real friend.
  4. Answer notification.
    • Using cloud messaging services
    • ChatRoomActivity.kt
    fun sendPostToFCM(destinationUid: String, myUid: String, pTitle: String?, pMessage: String?) { ... }
  5. Recommend a bulletin board of interest if it is determined that the conversation continues and the interests can be identified.

The conversation will be updated in AiChatAdapter. ( @/aifriend/recycler/AiChatAdapter.kt )

class AiChatAdapter : RecyclerView.Adapter<AiChatAdapter.ViewHolder>() { ... }

with Friend

  • Default Layout
    Ai Chat rooms are fixed at the top, and users and chats are listed chronologically below them.

  • When we first started
    Only ai chat room exists. So, You can chat with AI.


Chat with real users. (this is done by requesting conversations with users you met on the bulletin board of interest)
  1. Send Chat
  2. Save Database
  3. Check and reply to the other person's chat.
  4. Answer notification

The conversation will be updated in ChatAdapter. ( @/aifriend/recycler/ChatAdapter.kt )

class ChatAdapter: RecyclerView.Adapter<ChatAdapter.ViewHolder>() { ... }

Clone this wiki locally