Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [Bounty Candidate ] #1221 Eliza Dev Code Assistant default characterfile #1509

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

harperaa
Copy link
Contributor

@harperaa harperaa commented Dec 28, 2024

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:

  • Answers FAQ-style questions using repo knowledge as recommended first step
  • Suggests relevant examples based on current work
  • Guides contributors to relevant documentation/contributors with answers

What does this PR do?

  • New default characterfile shaiw.character.json and associated plugin-code-assistant
  • Provides a discord agent (shaiw) that has been trained on Shaw's bio, lore, and character...
    • Used 8 recent videos and interviews and AI to pull out bio, lore, adjectives, knowledge, etc...
  • Listen for questions (which are often repetitive), answer with patient, teaching tone, but slight sense of humor (like Shaw).
  • Search Github for answers concerning issues or PRs
  • Search Github Docs Site for answers (loads entire site into vectordb during initial load)
  • Search knowledge for previous answers on discord
  • 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?

  1. Review code updates, most are in the packages/plugin-code-assistant folder, but also notice the new shaiw.character.json in the characters folder.
  2. 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 new skipKnowledge message.

Detailed testing steps

  1. 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.
  2. 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).
  3. update .env with your:
  • ANTHROPIC_API_KEY (required for plugin)
  • GITHUB_TOKEN (required for plugin)
  • DISCORD_APPLICATION_ID
  • DISCORD_API_TOKEN
  1. Standard install and build. (I had a recent PR merged into elizaOS/develop that included these script calls):
pnpm clean && pnpm install && pnpm build
  1. Run the plugin:
pnpm start --characters characters/shaiw.character.json
  1. Run the plugin (with new database)
pnpm cleanstart --characters characters/shaiw.character.json
  1. Run the plugin (with new database and in debug mode)
pnpm cleanstart:debug --characters characters/shaiw.character.json
  1. Please let me know if anything is broke when you test it, it worked well on my end.

Screenshots

Shaiw Talks like Shaw

image

Casual Conversation

image

More

image

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)

@harperaa harperaa changed the title feat: [Bounty Candidate ] 1221 Eliza Dev Code Assistant default characterfile feat: [Bounty Candidate ] #1221 Eliza Dev Code Assistant default characterfile Dec 28, 2024
@harperaa
Copy link
Contributor Author

harperaa commented Jan 2, 2025

Most of those deleted lines are from a couple lock files, that were included in my branch... at this point, I don't know how to remove them. I guess you can just ignore them on merge...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant