Demo video: link
Bot: Warpcast profile
API repo: GitHub link (for fetching AI responses)
A translation bot removing language barriers on the Farcaster client, Warpcast. Use @translate <language>
to get an instant AI translation in any language!
Examples:
@translate spanish
@translate to English
@translate what is translate bot?
@translate what languages can you translate?
Language barriers currently result in a poor user experience for both international and English-speaking users, as they need to switch apps to Google Translate for translations.
Many users having been asking for a translation feature, which is why I built Translate Bot. It's currently live, try it out! ππ
β farcaster-py: for detecting recent casts with the "@translate"
keyword, and posting cast responses
β OpenAI: for translating the actual text into the desired language
β FLock.io: for answering questions about the bot itself, like what it does or what languages it translates
When a user tags @translate
, the farcaster-py SDK will detect the cast. This cast has a cast.text
property, and the cast.parent_hash
property can be used to retrieve the parent cast's text. Both of these are either passed into OpenAI's API or FLock's API.
If it's a question about the bot itself, like "what is translate bot?" or "what languages can you translate?", the AI model I created through FLock will have enough context to answer accurately. I send a request to this API by using Axios in the Next.js repo. If it's a translation query, OpenAI's API will translate the text and provide a response.
Once I get the response back, I again use the farcaster-py SDK to help post an instant reply. If the text is over 320 characters, I set it to return a default phrase.
- Cast Actions: using the recently-released cast actions to make the bot a 2-click UX
- Neynar APIs: use their webhooks and APIs for easier bot maintenance, and use Frames to gamify the UX
- OpenAI/FLock: finetune the AI models and provide better data/prompts for more accurate responses