LangChain

Design of the conversational flow for the WhatsApp Chatbot in the whatlet project, using LangChain. See also: LangChain Implementation.

Workflow for:

  1. Genesis
  2. Funding
  3. Saving

Prompt

Hello! I am a chatbot that can help you perform several ETH transactions. You can instruct me to:
1. Transfer ETH to another user
2. Make a funding request
3. Request a loan from another user (P2P Lending)
4. Save in a DeFi protocol
5. Check balance

Please communicate your intention in natural language. You can write in English or Spanish. Make sure to mention the recipient, where the recipient is an address.

For example:
- "I want to transfer 10 dollars to Tony."
- "Quiero transferir 10 dolares a Tony."

After your message, I will generate a structured response to confirm the transaction details. You can then reply 'Yes' to confirm or 'No' to cancel.

Interaction Example

User A

[1] Hello!

Bot Response

[1 a] Hello $(CURRENT_USER_NAME)
I'm going to check if you have a wallet linked to this number. If I don't find one, I'll create one for you.
-------
Your wallet is $(CURRENT_WALLET)

User

[2] I want to request 10 dollars from Tony

Bot Response

[2 a] You are about to request 10 $USDC from Tony (+52-551-699-2713). Reply 'Yes' to confirm and 'No' to cancel

User’s Affirmative Response

[3] Yes

Bot Confirmation

[3 a] Request sent.

Message to Tony

[3 b] You have a request to transfer $10 USDC to $CURRENT_USER.
Reply Yes to accept, No to deny

Tony’s Affirmative Response

[4] Yes

Bot Confirmation

[4 b] Transfer of $10 sent to UserA.

[4 a] Transfer of $10 received from Tony

User A Checks Balance

[5] What's my balance?

Bot Response

[5 a] Your balance is $10.

User Saves a Portion

[6] Save $5

Bot Confirmation

[6 a] You are about to send 5 $USDC to AAVE. Reply Yes to continue and No to cancel

User A’s Affirmative Response

[7] Yes

Bot Response

[7a] You are saving 5 USDC in AAVE