eliza
eliza copied to clipboard
feat: [Bounty Candidate ] #1221 Eliza Dev Code Assistant default characterfile
Relates to:
[Bounty] #1221 feat: Eliza Dev Code Assistant default characterfile
Risks
Low: mostly self contained (high modularity, low coupling), does require minor update to core/src/knowledge.ts
to enable feature of bypassing knowledge search (used when searching online first, then adding that to knowledge).
Background
The feature request was to develop a default characterfile with associated functionality (actions, etc) to serve as the monitor for a new devs channel, that will:
- [x] Answers FAQ-style questions using repo knowledge as recommended first step
- [x] Suggests relevant examples based on current work
- [x] Guides contributors to relevant documentation/contributors with answers
What does this PR do?
- [x] New default characterfile
shaiw.character.json
and associatedplugin-code-assistant
- [x] Provides a discord agent (shaiw) that has been trained on Shaw's bio, lore, and character...
- [x] Used 8 recent videos and interviews and AI to pull out bio, lore, adjectives, knowledge, etc...
- [x] Listen for questions (which are often repetitive), answer with patient, teaching tone, but slight sense of humor (like Shaw).
- [x] Search Github for answers concerning issues or PRs
- [x] Search Github Docs Site for answers (loads entire site into vectordb during initial load)
- [x] Search knowledge for previous answers on discord
- [x] Stores all knowledge in vectordb for fast retrieval
What kind of change is this?
Features (non-breaking change which adds functionality)
Documentation changes needed?
Yes, I provided a README.md file in the packages/plugin-code-assistant folder (where most changes are) I suggested a minor update to the existing documentation, pointing to that README.md (done)
Testing
pnpm test (most test from other plugins failed, not sure what to do about that) pnpm lint (new files have all necessary fixes made, there were issues with other plugins)
Where should a reviewer start?
- Review code updates, most are in the
packages/plugin-code-assistant
folder, but also notice the newshaiw.character.json
in thecharacters
folder. - Notice that a minor change was required in
packages/core/src/knowlede.ts
to add functionality to bypass the knowledge search. This was required as the core files were searching the knowledge in parallel to my new plugin checking and both were responding. So, I toggled that default knowledge search on and off with a newskipKnowledge
message.
Detailed testing steps
- Notice that I still have a sqlite db set, as I did not know how you want to put it into production, change that in characterfile, as neccesary.
- Notice that you will need a GITHUB_TOKEN (either will do, I used a personal one)... this is to get past the rate limiting of making calls with Ocokit without an API key). You will need to add that to .env and .env.sample going forward (done).
- update .env with your:
- ANTHROPIC_API_KEY (required for plugin)
- GITHUB_TOKEN (required for plugin)
- DISCORD_APPLICATION_ID
- DISCORD_API_TOKEN
- Standard install and build. (I had a recent PR merged into elizaOS/develop that included these script calls):
pnpm clean && pnpm install && pnpm build
- Run the plugin:
pnpm start --characters characters/shaiw.character.json
- Run the plugin (with new database)
pnpm cleanstart --characters characters/shaiw.character.json
- Run the plugin (with new database and in debug mode)
pnpm cleanstart:debug --characters characters/shaiw.character.json
- Please let me know if anything is broke when you test it, it worked well on my end.
Screenshots
Shaiw Talks like Shaw
Casual Conversation
More
Deploy Notes
Caution: the docs site is crawled and inserted into vectordb on launch, each time you load the agent, this will happen. During testing, I suggest using cleanstart startup script, to wipe the database. In production, this will need to be managed through db, if new pages are loaded. This may need fixed in future to make this easier to manage.
Database changes
Need to change from sqlite, to the database you use in test/production.
Discord username
aah8098 (Allen)