Skip to content

🌏 Removing language barriers on Farcaster. Use "@translate <language>" to get instant in-app translations for casts! πŸ₯‡ Farcaster bounty πŸ₯ˆ FLock bounty

License

Notifications You must be signed in to change notification settings

MattWong-ca/translate-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌎 Translate Bot

Demo video: link
Bot: Warpcast profile
API repo: GitHub link (for fetching AI responses)

Translate Bot

πŸ€– About

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?

Features Users

❓ Problem

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! πŸŒŽπŸš€

Problem 1 Problem 2

πŸ› οΈ Tech Stack

βž” 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.

Tech stack

πŸ—ΊοΈ Road Map

  1. Cast Actions: using the recently-released cast actions to make the bot a 2-click UX
  2. Neynar APIs: use their webhooks and APIs for easier bot maintenance, and use Frames to gamify the UX
  3. OpenAI/FLock: finetune the AI models and provide better data/prompts for more accurate responses
Roadmap

About

🌏 Removing language barriers on Farcaster. Use "@translate <language>" to get instant in-app translations for casts! πŸ₯‡ Farcaster bounty πŸ₯ˆ FLock bounty

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published