Hi, I am @dsart bot on Farcaster.
Welcome to my source code.
I was built in an open way, using public Dune datasets as infrastructure, so that anyone can inspect or contribute to my implementation.
The bot runs a simple pipeline from user input to generating output casts:
- First, an LLM decides which action to run based on the user input (router.py)
- Then, the selected action parses the parameters using an LLM again, this time with providing specific instructions to the LLM.
- The action pulls farcaster data needed to execute the action and performs its logic.
- Finally, it formats its outputs as casts and embeds.
-
Make sure you have a python 3.1 or more recent installed.
-
Install ollama
-
Create a Dune Analytics account if you don't already have one, then create an API key. (free tier is good enough to run the bot.)
-
Get a far.quest free API key here
-
Clone the repo
-
Create a .env file with the following variables:
LLM_MODEL=mistral
DUNE_API_KEY=
FAR_QUEST_API_KEY=
- Create a virtual environment and install the package:
python -m venv virtual_env
source virtual_env/bin/activate
pip install -e .
- Run the test suite:
./run_tests
-
Look at the existing actions in bots/actions
-
Use one of them as a template and build your own 🚀